repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/solr
1,129
solr/core/src/java/org/apache/solr/security/SecurityPluginHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.security; public class SecurityPluginHolder<T> { private final int znodeVersion; public final T plugin; public SecurityPluginHolder(int znodeVersion, T plugin) { this.znodeVersion = znodeVersion; this.plugin = plugin; } public int getZnodeVersion() { return znodeVersion; } }
apache/stratos
1,056
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/instance/notifier/ArtifactUpdateEventListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.stratos.messaging.listener.instance.notifier; import org.apache.stratos.messaging.listener.EventListener; /** * Artifact update event listener. */ public abstract class ArtifactUpdateEventListener extends EventListener { }
apache/stratos
1,064
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/application/locking/ApplicationLock.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.stratos.messaging.domain.application.locking; import org.apache.stratos.common.concurrent.locks.ReadWriteLock; public class ApplicationLock extends ReadWriteLock { public ApplicationLock() { super("application"); } }
apache/streams
1,094
streams-contrib/streams-provider-sprinklr/src/main/java/org/apache/streams/sprinklr/Bootstrap.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.streams.sprinklr; import org.apache.streams.sprinklr.api.PartnerAccountsResponse; import org.apache.juneau.http.remote.Remote; import org.apache.juneau.http.remote.RemoteGet; @Remote(path = "https://api2.sprinklr.com/api/") public interface Bootstrap { @RemoteGet public PartnerAccountsResponse getPartnerAccounts(); }
apache/struts
1,104
plugins/tiles/src/main/java/org/apache/tiles/autotag/generate/TemplateGeneratorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tiles.autotag.generate; /** * Creates a new template generator. */ public interface TemplateGeneratorFactory { /** * Creates a template generator. * * @return The newly created template generator. */ TemplateGenerator createTemplateGenerator(); }
apache/struts
1,129
core/src/main/java/org/apache/struts2/util/location/Locatable.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts2.util.location; /** * A interface that should be implemented by objects knowning their location (i.e. where they * have been created from). */ public interface Locatable { /** * Get the location of this object * * @return the location */ Location getLocation(); }
apache/syncope
1,112
common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/AccessPolicyConf.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.common.lib.policy; import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.apache.syncope.common.lib.BaseBean; @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "_class") public interface AccessPolicyConf extends BaseBean { }
apache/tapestry-5
1,071
genericsresolver-guava/src/test/java/org/apache/tapestry5/genericsresolverguava/internal/NonVisualBean.java
// Copyright 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.genericsresolverguava.internal; import org.apache.tapestry5.beaneditor.NonVisual; public class NonVisualBean { private int id; private String name; @NonVisual public int getId() { return id; } public String getName() { return name; } public void setId(int id) { this.id = id; } public void setName(String name) { this.name = name; } }
apache/tapestry-5
1,098
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/ReverseStrings.java
// Copyright 2008 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.integration.app1.services; import java.lang.annotation.Documented; import static java.lang.annotation.ElementType.METHOD; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Marker annotation used with {@link org.apache.tapestry5.integration.app1.services.StringReversalAdvice}. */ @Target(METHOD) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface ReverseStrings { }
apache/tapestry-5
1,124
tapestry-func/src/main/java/org/apache/tapestry5/func/Mapper.java
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.func; /** * Interface for operation {@link Flow#map(Mapper)} to define how Flow elements are mapped from one type * to another (or otherwise transformed). * * This changed in 5.3 from an abstract base class to an interface. * * @since 5.2.0 * @param <S> * type of source flow * @param <T> * type of target (output) flow */ public interface Mapper<S, T> { /** * Implemented in subclasses to map an element from the source flow to an element of the target * flow. */ T map(S element); }
apache/tika
1,038
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-html-module/src/main/java/org/apache/tika/parser/html/DataURISchemeParseException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tika.parser.html; import org.apache.tika.exception.TikaException; public class DataURISchemeParseException extends TikaException { public DataURISchemeParseException(String msg) { super(msg); } }
apache/uniffle
1,126
server/src/test/java/org/apache/uniffle/server/MockedShuffleServer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.uniffle.server; public class MockedShuffleServer extends ShuffleServer { public MockedShuffleServer(ShuffleServerConf shuffleServerConf) throws Exception { super(shuffleServerConf); } @Override public void setServer() { setServer(new MockedShuffleServerFactory(this).getServer()); } }
apache/usergrid
1,088
stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/core/CassandraClient.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.core; import com.datastax.driver.core.Session; /** * Created by Dave Johnson (snoopdave@apache.org) on 9/9/16. */ public interface CassandraClient { Session getApplicationSession(); Session getQueueMessageSession(); }
apache/wicket
1,098
wicket-core-tests/src/test/java/org/apache/wicket/markupFragments/MyBorder2.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markupFragments; import org.apache.wicket.markup.html.border.Border; /** * */ public class MyBorder2 extends Border { private static final long serialVersionUID = 1L; /** * Construct. * * @param id */ public MyBorder2(String id) { super(id); } }
apache/wicket
1,101
wicket-core-tests/src/test/java/org/apache/wicket/resource/DummySubClassPage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.resource; /** * Dummy subclass page used for resource testing. * * @author Chris Turner */ public class DummySubClassPage extends DummyPage { private static final long serialVersionUID = 1L; /** * Construct. */ public DummySubClassPage() { super(); } }
apache/wicket
1,104
wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page2.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.examples.navomatic; import org.apache.wicket.examples.WicketExamplePage; /** * Trivial page. * * @author Jonathan Locke */ public class Page2 extends WicketExamplePage { /** * Constructor */ public Page2() { add(new NavomaticBorder("navomaticBorder")); } }
apache/xmlgraphics-fop
1,109
fop-core/src/test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id$ */ package org.apache.fop.render.rtf; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * Test suite for FOP's RTF library. */ @RunWith(Suite.class) @SuiteClasses(Bug39607TestCase.class) public class RichTextFormatTestSuite { }
google-ar/sceneform-android-sdk
1,073
sceneformsrc/sceneform/src/main/java/com/google/ar/sceneform/lullmodel/VariantDef.java
// automatically generated by the FlatBuffers compiler, do not modify package com.google.ar.sceneform.lullmodel; /** * A variant type that can be converted into a lull::Variant. */ public final class VariantDef { private VariantDef() { } public static final byte NONE = 0; public static final byte DataBool = 1; public static final byte DataInt = 2; public static final byte DataFloat = 3; public static final byte DataString = 4; public static final byte DataHashValue = 5; public static final byte DataVec2 = 6; public static final byte DataVec3 = 7; public static final byte DataVec4 = 8; public static final byte DataQuat = 9; public static final byte DataBytes = 10; public static final byte VariantArrayDef = 11; public static final byte VariantMapDef = 12; public static final String[] names = { "NONE", "DataBool", "DataInt", "DataFloat", "DataString", "DataHashValue", "DataVec2", "DataVec3", "DataVec4", "DataQuat", "DataBytes", "VariantArrayDef", "VariantMapDef", }; public static String name(int e) { return names[e]; } }
google/bindiff
1,078
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/editmode/actions/CDefaultEdgePressedRightAction.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.zylib.gui.zygraph.editmode.actions; import com.google.security.zynamics.zylib.gui.zygraph.editmode.IStateAction; import com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.editmode.states.CEdgePressedRightState; import java.awt.event.MouseEvent; public class CDefaultEdgePressedRightAction implements IStateAction<CEdgePressedRightState> { @Override public void execute(final CEdgePressedRightState state, final MouseEvent event) {} }
google/bindiff
1,078
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/editmode/actions/CDefaultNodePressedRightAction.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.zylib.gui.zygraph.editmode.actions; import com.google.security.zynamics.zylib.gui.zygraph.editmode.IStateAction; import com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.editmode.states.CNodePressedRightState; import java.awt.event.MouseEvent; public class CDefaultNodePressedRightAction implements IStateAction<CNodePressedRightState> { @Override public void execute(final CNodePressedRightState state, final MouseEvent event) {} }
google/bindiff
1,093
java/ui/src/main/java/com/google/security/zynamics/bindiff/project/matches/IMatchesChangeListener.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.project.matches; import com.google.security.zynamics.zylib.disassembly.IAddress; public interface IMatchesChangeListener { void addedBasicBlockMatch( IAddress priFunctionAddr, IAddress secFunctionAddr, IAddress priBasicblockAddr, IAddress secBasicBlockaddr); void removedBasicBlockMatch( IAddress priFunctionAddr, IAddress secFunctionAddr, IAddress priBasicblockAddr, IAddress secBasicBlockaddr); }
google/cdep
1,129
cdep/src/main/java/io/cdep/cdep/ast/finder/IfSwitchExpression.java
/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.cdep.cdep.ast.finder; import io.cdep.annotations.NotNull; public class IfSwitchExpression extends StatementExpression { @NotNull final public Expression conditions[]; @NotNull final public Expression expressions[]; @NotNull final public Expression elseExpression; IfSwitchExpression(@NotNull Expression conditions[], @NotNull Expression expressions[], @NotNull Expression elseExpression) { this.conditions = conditions; this.expressions = expressions; this.elseExpression = elseExpression; } }
google/conscrypt
1,111
common/src/test/java/org/conscrypt/java/security/KeyPairGeneratorTestDH.java
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.conscrypt.java.security; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public class KeyPairGeneratorTestDH extends AbstractKeyPairGeneratorTest { public KeyPairGeneratorTestDH() { super("DH", new KeyAgreementHelper("DH")); } // Broken Test: Takes ages due to DH computations. Disabling for now. @Override public void testKeyPairGenerator() throws Exception { super.testKeyPairGenerator(); } }
google/easybundler
1,097
bundler-api/src/test/java/pub/devrel/bundler/objects/PrivateFieldsNoSetterObject.java
/* * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package pub.devrel.bundler.objects; import pub.devrel.bundler.BundlerClass; /** * Class with a private field that has a setter and no getter. */ @BundlerClass public class PrivateFieldsNoSetterObject { public String publicString; private int privateInt; public PrivateFieldsNoSetterObject() {} public PrivateFieldsNoSetterObject(int privateInt) { this.privateInt = privateInt; } public int getPrivateInt() { return privateInt; } }
google/error-prone
1,098
core/src/test/java/com/google/errorprone/refaster/testdata/template/BinaryTemplate.java
/* * Copyright 2014 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.testdata.template; import com.google.errorprone.refaster.annotation.AfterTemplate; import com.google.errorprone.refaster.annotation.BeforeTemplate; /** * Example template using binary expressions. * * @author lowasser@google.com (Louis Wasserman) */ public class BinaryTemplate { @BeforeTemplate public int divide(int a, int b) { return (a + b) / 2; } @AfterTemplate public int shift(int a, int b) { return (a + b) >> 1; } }
google/google-ctf
1,094
2020/quals/pwn-app-ads/app/ads-common/src/main/java/com/ads/sdk/common/dynamic/AidlUtils.java
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.ads.sdk.common.dynamic; import android.os.RemoteException; import com.ads.sdk.common.Logger; public class AidlUtils { public interface RemoteThrowingFunction<T> { T run() throws RemoteException; } public static <T> T runRemote(RemoteThrowingFunction<T> f) { try { return f.run(); } catch (RuntimeException | RemoteException e) { Logger.e("Something bad happened on the remote end", e); return null; } } }
google/j2cl
1,091
transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester477.java
/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package allsimplebridges; import static com.google.j2cl.integration.testing.Asserts.assertTrue; public class Tester477 { static class C1 { C1() {} public String get(Object value) { return "C1.get"; } } static class C2 extends C1 { C2() {} public String get(String value) { return "C2.get"; } } public static void test() { C2 s = new C2(); assertTrue(s.get("").equals("C2.get")); assertTrue(((C1) s).get("").equals("C1.get")); } }
google/j2cl
1,093
transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester505.java
/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package allsimplebridges; import static com.google.j2cl.integration.testing.Asserts.assertTrue; import jsinterop.annotations.JsType; public class Tester505 { @JsType static class C1 { C1() {} public String get(Object value) { return "C1.get"; } } @SuppressWarnings("unchecked") static class C2 extends C1 { C2() {} } @SuppressWarnings("unchecked") public static void test() { C2 s = new C2(); assertTrue(((C1) s).get("").equals("C1.get")); } }
google/j2cl
1,128
transpiler/javatests/com/google/j2cl/ported/java6/package1/Caller.java
/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.j2cl.ported.java6.package1; /** * Class in the same package as the {@link SomeParentParent} to be able to call the package private * method. */ public class Caller { /** * This method should always call the method m() from the {@link SomeParentParent}. It should * never trigger a call to the one in the {@link SomeSubClassInAnotherPackage} subclass because it * is not actually overriding it. */ public String callPackagePrivatem(SomeParentParent someClass) { return someClass.m(); } }
google/j2objc
1,093
jre_emul/android/platform/libcore/luni/src/test/java/libcore/libcore/util/SneakyThrowTest.java
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package libcore.libcore.util; import junit.framework.TestCase; import libcore.util.SneakyThrow; /** * Tests for {@link SneakyThrow} */ public class SneakyThrowTest extends TestCase { public void testSneakyThrow() { try { throwsChecked(); fail("Expecting exception"); } catch(Exception e) { // Expected. } } private void throwsChecked() { SneakyThrow.sneakyThrow(new Exception()); } }
google/nomulus
1,103
core/src/main/java/google/registry/persistence/converter/BillingCostTransitionUserType.java
// Copyright 2024 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.persistence.converter; import google.registry.model.common.TimedTransitionProperty; import org.joda.money.Money; /** Hibernate custom type for {@link TimedTransitionProperty} of {@link Money}. */ public class BillingCostTransitionUserType extends TimedTransitionBaseUserType<Money> { @Override String valueToString(Money value) { return value.toString(); } @Override Money stringToValue(String string) { return Money.parse(string); } }
google/oss-fuzz
1,141
projects/apache-commons-net/NTFTPEntryParserFuzzer.java
// Copyright 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////////// import com.code_intelligence.jazzer.api.FuzzedDataProvider; import org.apache.commons.net.ftp.FTPFileEntryParser; import org.apache.commons.net.ftp.parser.NTFTPEntryParser; public class NTFTPEntryParserFuzzer { public static void fuzzerTestOneInput(FuzzedDataProvider data) { try{ FTPFileEntryParser parser = new NTFTPEntryParser(); parser.parseFTPEntry(data.consumeRemainingAsString()); } catch (java.lang.NumberFormatException e) {} } }
google/paco
1,111
Paco/src/com/pacoapp/paco/sensors/android/diagnostics/PacoVersionDiagnostic.java
package com.pacoapp.paco.sensors.android.diagnostics; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import com.google.common.base.Strings; import com.pacoapp.paco.R; public class PacoVersionDiagnostic extends Diagnostic { public PacoVersionDiagnostic(Context context) { super(context.getString(R.string.diagnostic_paco_version)); } @Override public void run(Context context) { String pacoVersion = pacoVersion = getVersion(context); if (Strings.isNullOrEmpty(pacoVersion)) { pacoVersion = "?"; } setValue(context.getString(R.string.diagnostic_paco_version) + ": " + pacoVersion); } private String getVersion(Context context) { PackageInfo pInfo = null; try { pInfo = context.getPackageManager().getPackageInfo((String) context.getText(R.string.app_package), PackageManager.GET_META_DATA); return pInfo.versionName; } catch (NameNotFoundException e) { e.printStackTrace(); } return "unknown"; } }
googleads/google-ads-java
1,069
google-ads-stubs-v19/src/main/java/com/google/ads/googleads/v19/common/SearchVolumeRangeOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v19/common/metrics.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v19.common; public interface SearchVolumeRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v19.common.SearchVolumeRange) com.google.protobuf.MessageOrBuilder { /** * <pre> * Lower bound of search volume. * </pre> * * <code>optional int64 min = 1;</code> * @return Whether the min field is set. */ boolean hasMin(); /** * <pre> * Lower bound of search volume. * </pre> * * <code>optional int64 min = 1;</code> * @return The min. */ long getMin(); /** * <pre> * Upper bound of search volume. * </pre> * * <code>optional int64 max = 2;</code> * @return Whether the max field is set. */ boolean hasMax(); /** * <pre> * Upper bound of search volume. * </pre> * * <code>optional int64 max = 2;</code> * @return The max. */ long getMax(); }
googleads/google-ads-java
1,069
google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/common/SearchVolumeRangeOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v20/common/metrics.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v20.common; public interface SearchVolumeRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v20.common.SearchVolumeRange) com.google.protobuf.MessageOrBuilder { /** * <pre> * Lower bound of search volume. * </pre> * * <code>optional int64 min = 1;</code> * @return Whether the min field is set. */ boolean hasMin(); /** * <pre> * Lower bound of search volume. * </pre> * * <code>optional int64 min = 1;</code> * @return The min. */ long getMin(); /** * <pre> * Upper bound of search volume. * </pre> * * <code>optional int64 max = 2;</code> * @return Whether the max field is set. */ boolean hasMax(); /** * <pre> * Upper bound of search volume. * </pre> * * <code>optional int64 max = 2;</code> * @return The max. */ long getMax(); }
googleads/google-ads-java
1,069
google-ads-stubs-v21/src/main/java/com/google/ads/googleads/v21/common/SearchVolumeRangeOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v21/common/metrics.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v21.common; public interface SearchVolumeRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v21.common.SearchVolumeRange) com.google.protobuf.MessageOrBuilder { /** * <pre> * Lower bound of search volume. * </pre> * * <code>optional int64 min = 1;</code> * @return Whether the min field is set. */ boolean hasMin(); /** * <pre> * Lower bound of search volume. * </pre> * * <code>optional int64 min = 1;</code> * @return The min. */ long getMin(); /** * <pre> * Upper bound of search volume. * </pre> * * <code>optional int64 max = 2;</code> * @return Whether the max field is set. */ boolean hasMax(); /** * <pre> * Upper bound of search volume. * </pre> * * <code>optional int64 max = 2;</code> * @return The max. */ long getMax(); }
googleapis/google-cloud-java
1,030
java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ProvisionProjectMetadataOrBuilder.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/discoveryengine/v1alpha/project_service.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.discoveryengine.v1alpha; public interface ProvisionProjectMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ProvisionProjectMetadata) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,114
java-dns/src/test/java/com/google/cloud/dns/DnsOptionsTest.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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.cloud.dns; import com.google.cloud.TransportOptions; import org.easymock.EasyMock; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; public class DnsOptionsTest { @Rule public ExpectedException thrown = ExpectedException.none(); @Test public void testInvalidTransport() { thrown.expect(IllegalArgumentException.class); DnsOptions.newBuilder() .setTransportOptions(EasyMock.<TransportOptions>createMock(TransportOptions.class)); } }
googleapis/google-http-java-client
1,097
google-http-client/src/main/java/com/google/api/client/util/NullValue.java
/* * Copyright (c) 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.api.client.util; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Use this annotation to specify that an enum constant is the "null" data value to use for {@link * Data#nullOf(Class)}. * * <p>See {@link Value} for an example. * * @since 1.4 * @author Yaniv Inbar */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface NullValue {}
googlemaps/google-maps-services-java
1,122
src/main/java/com/google/maps/model/Bounds.java
/* * Copyright 2014 Google Inc. All rights reserved. * * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF * ANY KIND, either express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.google.maps.model; import java.io.Serializable; /** The northeast and southwest points that delineate the outer bounds of a map. */ public class Bounds implements Serializable { private static final long serialVersionUID = 1L; /** The northeast corner of the bounding box. */ public LatLng northeast; /** The southwest corner of the bounding box. */ public LatLng southwest; @Override public String toString() { return String.format("[%s, %s]", northeast, southwest); } }
googleworkspace/java-samples
1,130
gmail/snippets/src/test/java/TestSendMessage.java
// Copyright 2022 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. import static org.junit.Assert.assertNotNull; import com.google.api.services.gmail.model.Message; import java.io.IOException; import javax.mail.MessagingException; import org.junit.Test; // Unit testcase for gmail send email snippet public class TestSendMessage extends BaseTest { @Test public void testSendEmail() throws MessagingException, IOException { Message message = SendMessage.sendEmail(RECIPIENT, TEST_USER); assertNotNull(message); this.service.users().messages().delete("me", message.getId()).execute(); } }
hibernate/hibernate-orm
1,031
hibernate-core/src/test/java/org/hibernate/orm/test/immutable/Party.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.immutable; import java.io.Serializable; import java.util.HashSet; import java.util.Set; public class Party implements Serializable { private long id; private long version; private Contract contract; private String name; private Set infos = new HashSet(); public Party() { super(); } public Party(String name) { this.name = name; } public long getVersion() { return version; } public void setVersion(long version) { this.version = version; } public String getName() { return name; } public void setName(String name) { this.name = name; } public long getId() { return id; } public void setId(long id) { this.id = id; } public Contract getContract() { return contract; } public void setContract(Contract contract) { this.contract = contract; } public Set getInfos() { return infos; } public void setInfos(Set infos) { this.infos = infos; } }
hibernate/hibernate-orm
1,052
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/embeddables/nested/Customer.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.annotations.embeddables.nested; import java.util.ArrayList; import java.util.List; import jakarta.persistence.ElementCollection; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import org.hibernate.annotations.GenericGenerator; /** * @author Thomas Vanstals * @author Steve Ebersole */ @Entity public class Customer { private Long id; private List<Investment> investments = new ArrayList<Investment>(); @Id @GeneratedValue( generator="increment" ) @GenericGenerator( name = "increment", strategy = "increment" ) public Long getId() { return id; } public void setId(Long id) { this.id = id; } @ElementCollection(fetch = FetchType.EAGER) public List<Investment> getInvestments() { return investments; } public void setInvestments(List<Investment> investments) { this.investments = investments; } }
hibernate/hibernate-orm
1,069
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/cascade/Parent.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.annotations.cascade; import java.util.Set; import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.OneToMany; import jakarta.persistence.OneToOne; /** * @author Jeff Schnitzer */ @Entity public class Parent { /** */ @Id @GeneratedValue public Long id; /** */ @OneToMany(cascade=CascadeType.ALL, mappedBy="parent") public Set<Child> children; /** */ @OneToOne(cascade=CascadeType.ALL) @JoinColumn(name="defaultChildId", nullable=false) Child defaultChild; /** */ public Parent() {} /** */ public Child getDefaultChild() { return this.defaultChild; } public void setDefaultChild(Child value) { this.defaultChild = value; } /** */ public Set<Child> getChildren() { return this.children; } public void setChildren(Set<Child> value) { this.children = value; } }
hibernate/hibernate-search
1,081
v5migrationhelper/engine/src/main/java/org/hibernate/search/backend/IndexingMonitor.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend; /** * @author Sanne Grinovero (C) 2011 Red Hat Inc. * @deprecated See the deprecation note on {@link org.hibernate.search.batchindexing.MassIndexerProgressMonitor}. */ @Deprecated public interface IndexingMonitor { /** * Notify the monitor that {@code increment} more documents have been added to the index. * <p> * Summing the numbers passed to this method gives the total * number of documents that have been added to the index so far. * <p> * This method is invoked several times during indexing, * and calls are <strong>incremental</strong>: * calling {@code documentsAdded(3)} and then {@code documentsAdded(1)} * should be understood as "3+1 documents, i.e. 4 documents have been added to the index". * <p> * This method can be invoked from several threads thus implementors are required to be thread-safe. * * @param increment additional number of documents built */ void documentsAdded(long increment); }
hibernate/hibernate-tools
1,087
orm/src/main/java/org/hibernate/tool/internal/util/TableNameQualifier.java
/* * Hibernate Tools, Tooling for your Hibernate Projects * * Copyright 2016-2025 Red Hat, 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 org.hibernate.tool.internal.util; public class TableNameQualifier { public static String qualify(String catalog, String schema, String table) { StringBuilder qualifiedName = new StringBuilder(); if ( catalog != null ) { qualifiedName.append( catalog ).append( '.' ); } if ( schema != null ) { qualifiedName.append( schema ).append( '.' ); } return qualifiedName.append( table ).toString(); } }
openjdk/jdk8
1,127
langtools/test/tools/javac/diags/examples/ImportRequiresCanonical/p/Base.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. */ package p; public class Base { public static class NestedInBase { } }
openjdk/jdk8
1,138
langtools/test/tools/javac/generics/diamond/7057297/T7057297.java
/* * @test /nodynamiccopyright/ * @bug 7057297 * * @summary Project Coin: diamond erroneously accepts in array initializer expressions * @compile/fail/ref=T7057297.out T7057297.java -XDrawDiagnostics * */ class T7205797<X> { class Inner<Y> {} T7205797<String>[] o1 = new T7205797<>[1]; //error T7205797<String>[] o2 = new T7205797<>[1][1]; //error T7205797<String>[] o3 = new T7205797<>[1][1][1]; //error T7205797<String>[] o4 = new T7205797<>[] { }; //error T7205797<String>[] o5 = new T7205797<>[][] { }; //error T7205797<String>[] o6 = new T7205797<>[][][] { }; //error T7205797<String>.Inner<String>[] o1 = new T7205797<String>.Inner<>[1]; //error T7205797<String>.Inner<String>[] o2 = new T7205797<String>.Inner<>[1][1]; //error T7205797<String>.Inner<String>[] o3 = new T7205797<String>.Inner<>[1][1][1]; //error T7205797<String>.Inner<String>[] o4 = new T7205797<String>.Inner<>[] { }; //error T7205797<String>.Inner<String>[] o5 = new T7205797<String>.Inner<>[][] { }; //error T7205797<String>.Inner<String>[] o6 = new T7205797<String>.Inner<>[][][] { }; //error }
openjdk/jdk8
1,141
langtools/test/tools/javac/diags/examples/ModifierNotAllowed.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.mod.not.allowed.here synchronized interface ModifierNotAllowed { }
openjdk/jdk8
1,141
langtools/test/tools/javac/diags/examples/UnexpectedLambda.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. */ // key: compiler.err.unexpected.lambda class UnexpectedLambda { { (()-> { })++; } }
openjdk/jdk8
1,145
langtools/test/com/sun/javadoc/AccessSummary/p1/C1.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p1; public class C1 { public static final String STATICFINALFIELD = "test"; }
openjdk/skara
1,144
bots/pr/src/main/java/org/openjdk/skara/bots/pr/PRRecord.java
/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.skara.bots.pr; public record PRRecord(String repoName, String prId) { }
oracle/coherence
1,067
prj/coherence-bedrock/coherence-bedrock/src/main/java/com/oracle/bedrock/runtime/coherence/callables/HasRunningCluster.java
/* * Copyright (c) 2000, 2023, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package com.oracle.bedrock.runtime.coherence.callables; import com.oracle.bedrock.runtime.concurrent.RemoteCallable; import com.tangosol.net.CacheFactory; import java.util.Enumeration; import java.util.HashSet; import java.util.Set; /** * A {@link RemoteCallable} to determine whether the * member has a running cluster. */ public class HasRunningCluster implements RemoteCallable<Boolean> { @Override public Boolean call() throws Exception { // attempt to get the cluster com.tangosol.net.Cluster cluster = CacheFactory.getCluster(); return cluster != null && cluster.isRunning(); } // ----- constants ------------------------------------------------------ /** * A singleton instance of {@link HasRunningCluster}. */ public static final HasRunningCluster INSTANCE = new HasRunningCluster(); }
oracle/coherence
1,096
prj/coherence-core/src/main/java/com/tangosol/coherence/reporter/DateView.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.reporter; import java.text.SimpleDateFormat; import java.util.Date; /** * Class to include execution date as a macro in the Filename. * * @author ew 2008.01.28 * @since Coherence 3.4 */ public class DateView extends ColumnView { /** * Obtain the start date time for the report. * * @param oObject ignored * @return the date the report is executed in YYYYMMDD format */ public String getOutputString(Object oObject) { long ldtStartTime = ((JMXQueryHandler) m_handler).getStartTime(); return new SimpleDateFormat("yyyyMMddHH") .format(new Date(ldtStartTime)); } /** * DateView is never visible in the report. It is only used as a "macro" in * the output filename. * * @return false */ public boolean isVisible() { return false; } }
apache/commons-imaging
1,121
src/main/java/org/apache/commons/imaging/common/ImageMetadata.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.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.imaging.common; import java.util.List; public interface ImageMetadata { interface ImageMetadataItem { @Override String toString(); String toString(String prefix); } List<? extends ImageMetadataItem> getItems(); String toString(String prefix); }
apache/commons-ognl
1,118
src/test/java/org/apache/commons/ognl/test/objects/TestImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.commons.ognl.test.objects; import java.util.HashMap; import java.util.Map; /** */ public class TestImpl extends TestClass { public Map<String, String> getTheMap() { Map<String, String> map = new HashMap(); map.put( "key", "value" ); return map; } }
apache/curator
1,115
curator-framework/src/main/java/org/apache/curator/framework/api/GetConfigBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.curator.framework.api; public interface GetConfigBuilder extends Ensembleable<byte[]>, Backgroundable<ErrorListenerEnsembleable<byte[]>>, Watchable<BackgroundEnsembleable<byte[]>>, Statable<WatchBackgroundEnsembleable<byte[]>> {}
apache/cxf
1,081
maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/java/HelloWorldImpl.java
## licensed to the Apache Software Foundation (ASF) under one ## or more contributor license agreements. See the NOTICE file ## distributed with this work for additional information ## regarding copyright ownership. The ASF licenses this file ## to you under the Apache License, Version 2.0 (the ## "License"); you may not use this file except in compliance ## with the License. You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, ## software distributed under the License is distributed on an ## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ## KIND, either express or implied. See the License for the ## specific language governing permissions and limitations ## under the License. package ${package}; import jakarta.jws.WebService; @WebService(endpointInterface = "${package}.HelloWorld") public class HelloWorldImpl implements HelloWorld { public String sayHi(String text) { return "Hello " + text; } }
apache/cxf
1,113
rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/DestinationResolver.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.transport.jms.util; import jakarta.jms.Destination; import jakarta.jms.JMSException; import jakarta.jms.Session; public interface DestinationResolver { Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException; }
apache/cxf
1,115
rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ns1/Complex1.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.services.ns1; import org.apache.cxf.aegis.services.ns2.Complex2; public class Complex1 { private Complex2 property; public Complex2 getProperty() { return property; } public void setProperty(Complex2 property) { this.property = property; } }
apache/directory-server
1,090
kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * Provides the implementation for storing Kerberos principals * and symmetric keys backed by JNDI. * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ package org.apache.directory.server.kerberos.shared.store;
apache/distributedlog
1,101
distributedlog-common/src/main/java/org/apache/distributedlog/common/util/Sequencer.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.distributedlog.common.util; /** * Sequencer generating transaction id. */ public interface Sequencer { /** * Return next transaction id generated by the sequencer. * * @return next transaction id generated by the sequencer. */ long nextId(); }
apache/drill
1,126
logical/src/main/java/org/apache/drill/common/expression/FunctionName.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.common.expression; 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.TYPE}) public @interface FunctionName { String value(); }
apache/druid
1,055
extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchSetUnionOperatorConversion.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.query.aggregation.datasketches.theta.sql; public class ThetaSketchSetUnionOperatorConversion extends ThetaSketchSetBaseOperatorConversion { @Override public String getSetOperationName() { return "UNION"; } }
apache/druid
1,097
extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.client.cache; import com.fasterxml.jackson.annotation.JsonTypeName; @JsonTypeName("redis") public class RedisCacheProvider extends RedisCacheConfig implements CacheProvider { @Override public Cache get() { return RedisCacheFactory.create(this); } }
apache/druid
1,125
processing/src/test/java/org/apache/druid/StupidPoolPoisonedTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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; import org.apache.druid.collections.StupidPool; import org.junit.Assert; import org.junit.Test; public class StupidPoolPoisonedTest { @Test public void testStupidPoolPoisoned() { Assert.assertTrue("StupidPool should've been poisoned, it wasn't", StupidPool.isPoisoned()); } }
apache/druid
1,126
server/src/test/java/org/apache/druid/indexing/IndexingWorkerTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.indexing; import nl.jqno.equalsverifier.EqualsVerifier; import org.apache.druid.client.indexing.IndexingWorker; import org.junit.Test; public class IndexingWorkerTest { @Test public void testEquals() { EqualsVerifier.forClass(IndexingWorker.class).usingGetClass().verify(); } }
apache/dubbo-go-samples
1,068
compatibility/registry/servicediscovery/zookeeper/java-client/src/main/java/com/apache/dubbo/sample/basic/IGreeter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.apache.dubbo.sample.basic; import org.apache.dubbo.sample.hello.Helloworld; public interface IGreeter { /** * <pre> * Sends a greeting * </pre> */ Helloworld.User sayHello(Helloworld.HelloRequest request); }
apache/dubbo-samples
1,059
2-advanced/dubbo-samples-seata/dubbo-samples-seata-account/src/test/java/org/apache/dubbo/samples/seata/AccountApplicationTests.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.samples.seata; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class AccountApplicationTests { @Test void contextLoads() { } }
apache/dubbo
1,113
dubbo-rpc/dubbo-rpc-api/src/test/java/org/apache/dubbo/rpc/support/DemoServiceStub.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.support; public class DemoServiceStub extends DemoServiceImpl { private DemoService demoService; public DemoServiceStub(DemoService demoService) { this.demoService = demoService; } public DemoService getDemoService() { return demoService; } }
apache/eventmesh
1,065
eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/config/PulsarServerConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.pulsar.config; import org.apache.eventmesh.common.config.connector.Config; import lombok.Data; @Data public class PulsarServerConfig extends Config { private boolean sourceEnable; private boolean sinkEnable; }
apache/fineract
1,067
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanDisbursalTransactionEvent.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.test.messaging.event.loan.transaction; public class LoanDisbursalTransactionEvent extends AbstractLoanTransactionEvent { @Override public String getEventName() { return "LoanDisbursalTransactionBusinessEvent"; } }
apache/flex-utilities
1,079
FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/ClassAsDocNode.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.adobe.ac.pmd.nodes.asdoc.impl; /** * @author xagnetti */ public class ClassAsDocNode extends AsDocNodeBase { /** * @param descriptionToBeSet */ public ClassAsDocNode( final String descriptionToBeSet ) { super( descriptionToBeSet ); } }
apache/flink-cdc
1,111
flink-cdc-common/src/main/java/org/apache/flink/cdc/common/event/OperationType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.cdc.common.event; import org.apache.flink.cdc.common.annotation.PublicEvolving; /** * Enum {@code OperationType} describes the type of operation that the data change event reports. */ @PublicEvolving public enum OperationType { INSERT, UPDATE, REPLACE, DELETE }
apache/flink
1,096
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/NoOpBufferAvailablityListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.io.network.partition; /** Test implementation of {@link BufferAvailabilityListener}. */ public class NoOpBufferAvailablityListener implements BufferAvailabilityListener { @Override public void notifyDataAvailable(ResultSubpartitionView view) {} }
apache/flink
1,102
flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/CoordinationRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.operators.coordination; import java.io.Serializable; /** * Root interface for all requests from the client to a {@link OperatorCoordinator} which requests * for a {@link CoordinationResponse}. */ public interface CoordinationRequest extends Serializable {}
apache/flink
1,116
flink-filesystems/flink-s3-fs-presto/src/main/java/org/openjdk/jol/info/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. */ /** * This package contains mock classes to avoid a dependency on OpenJDK JOL, which is incompatible * with the Apache License. This package does not contain any implementation of similar logic, it * simply puts dummy place holders here to make the code work without JOL. */ package org.openjdk.jol.info;
apache/geaflow
1,078
geaflow/geaflow-metrics/geaflow-metrics-common/src/main/java/org/apache/geaflow/metrics/common/api/HistogramImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.api; import com.codahale.metrics.Reservoir; public class HistogramImpl extends com.codahale.metrics.Histogram implements Histogram { public HistogramImpl(Reservoir reservoir) { super(reservoir); } }
apache/geaflow
1,093
geaflow/geaflow-state/geaflow-state-api/src/main/java/org/apache/geaflow/state/query/QueryType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.state.query; import org.apache.geaflow.state.data.DataType; public class QueryType<T> { private final DataType type; public QueryType(DataType type) { this.type = type; } public DataType getType() { return type; } }
apache/geode
1,085
extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/internal/DeltaSessionAttributeEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.modules.session.catalina.internal; import org.apache.geode.DataSerializable; import org.apache.geode.modules.session.catalina.DeltaSessionInterface; public interface DeltaSessionAttributeEvent extends DataSerializable { void apply(DeltaSessionInterface session); }
apache/geode
1,117
geode-core/src/main/java/org/apache/geode/internal/cache/backup/AbortBackup.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.internal.cache.backup; import org.apache.geode.internal.cache.InternalCache; class AbortBackup { private final InternalCache cache; AbortBackup(InternalCache cache) { this.cache = cache; } void run() { if (cache != null) { cache.getBackupService().abortBackup(); } } }
apache/geode
1,120
geode-core/src/main/java/org/apache/geode/internal/cache/TXBucketRegionState.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.internal.cache; public class TXBucketRegionState extends TXRegionState { private final PartitionedRegion pr; public TXBucketRegionState(BucketRegion r, TXState txs) { super(r, txs); pr = r.getPartitionedRegion(); } public PartitionedRegion getPartitionedRegion() { return pr; } }
apache/giraph
1,126
giraph-core/src/test/java/org/apache/giraph/utils/IntNoOpComputation.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.giraph.utils; import org.apache.hadoop.io.IntWritable; /** * Computation which does nothing, used for testing. Vertex ids, values, * edge values and messages are all integers. */ public class IntNoOpComputation extends NoOpComputation<IntWritable, IntWritable, IntWritable, IntWritable> { }
apache/giraph
1,131
giraph-core/src/main/java/org/apache/giraph/utils/Trimmable.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.giraph.utils; /** * Interface for {@link org.apache.giraph.edge.OutEdges} and * {@link org.apache.giraph.graph.Vertex} implementations capable to optimize * in-memory data representation. */ public interface Trimmable { /** * Compacts all recent updates to this object. */ void trim(); }
apache/gobblin
1,117
gobblin-utility/src/main/java/org/apache/gobblin/runtime/cli/CliApplication.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.runtime.cli; /** * An application that can be called by {@link GobblinCli}. */ public interface CliApplication { /** * Run this application. Note the array of args contains the alias of this applicaiton as its firts argument. */ void run(String[] args) throws Exception; }
apache/gobblin
1,130
gobblin-api/src/main/java/org/apache/gobblin/fork/Copyable.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.gobblin.fork; /** * An interface for classes that supports making copies of their instances. * * @author Yinan Li */ public interface Copyable<T> { /** * Make a new copy of this instance. * * @return new copy of this instance */ public T copy() throws CopyNotSupportedException; }
apache/gravitino
1,121
common/src/main/java/org/apache/gravitino/auth/AuthenticatorType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.gravitino.auth; /** The type of authenticator for http/https request. */ public enum AuthenticatorType { /** No authentication. */ NONE, /** Simple authentication. */ SIMPLE, /** Authentication that uses OAuth. */ OAUTH, /** Authentication that uses Kerberos. */ KERBEROS }
apache/groovy
1,129
src/main/java/org/codehaus/groovy/tools/javac/JavacCompilerFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.tools.javac; import org.codehaus.groovy.control.CompilerConfiguration; public class JavacCompilerFactory implements JavaCompilerFactory { @Override public JavaCompiler createCompiler(CompilerConfiguration config) { return new JavacJavaCompiler(config); } }
apache/hadoop-common
1,092
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/PathAccessDeniedException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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; /** EACCES */ public class PathAccessDeniedException extends PathIOException { static final long serialVersionUID = 0L; /** @param path for the exception */ public PathAccessDeniedException(String path) { super(path, "Permission denied"); } }
apache/hadoop-common
1,097
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * A collection of library classes for implementing metrics sources */ @InterfaceAudience.Public @InterfaceStability.Evolving package org.apache.hadoop.metrics2.lib; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,102
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/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. */ /** * The Balancer is a tool for balancing the data across * the storage devices of an HDFS cluster. * Over time, the data in the HDFS storage can become skewed, * The Balancer moves data blocks between DataNodes to balance data distribution. */ package org.apache.hadoop.hdfs.server.balancer;
apache/hbase
1,076
hbase-archetypes/hbase-shaded-client-project/src/main/java/org/apache/hbase/archetypes/exemplars/shaded_client/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. */ /** * This package provides fully-functional exemplar Java code demonstrating * simple usage of the hbase-client API, for incorporation into a Maven * archetype with hbase-shaded-client dependency. */ package org.apache.hbase.archetypes.exemplars.shaded_client;
apache/hudi
1,101
hudi-common/src/main/java/org/apache/hudi/exception/HoodieDuplicateDataFileDetectedException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.exception; /** * <p> * Exception thrown for duplicate data files detection failures . * </p> */ public class HoodieDuplicateDataFileDetectedException extends HoodieException { public HoodieDuplicateDataFileDetectedException(String msg) { super(msg); } }
apache/hudi
1,101
hudi-flink-datasource/hudi-flink2.0.x/src/test/java/org/apache/hudi/adapter/TestHoodieCatalogs.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.adapter; /** * Tools to indicate whether current Flink version support advanced alter table syntax. * It is supported since Flink 1.17 version. */ public class TestHoodieCatalogs { public static boolean supportAdvancedAlterTableSyntax() { return true; } }
apache/ignite-extensions
1,080
modules/hibernate-ext/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateKeyTransformer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.cache.hibernate; /** * An interface for transforming hibernate keys to Ignite keys. */ public interface HibernateKeyTransformer { /** * @param key Hibernate key. * @return Transformed key. */ public Object transform(Object key); }
apache/ignite
1,111
modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionV1SelfTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.websession; /** * Tests the correctness of web sessions caching functionality in compatibility mode. */ public class WebSessionV1SelfTest extends WebSessionSelfTest { /** {@inheritDoc} */ @Override protected boolean keepBinary() { return false; } }
apache/impala
1,120
java/test-hive-udfs/src/main/java/org/apache/impala/UtilForUdfInitialize.java
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.apache.impala; import java.text.ParseException; import org.apache.hadoop.hive.ql.exec.UDF; import org.apache.hadoop.io.Text; /** IMPALA-11342 regression test: Helper for ImportNearbyClasses. */ public class UtilForUdfInitialize extends UDF { public static String getHello() { return "Hello"; } }
apache/incubator-kie-drools
1,046
drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/util/lambdareplace/NonExternalisedLambdaFoundException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.codegen.execmodel.util.lambdareplace; public class NonExternalisedLambdaFoundException extends RuntimeException { public NonExternalisedLambdaFoundException(String message) { super(message); } }
apache/incubator-kie-drools
1,102
drools-compiler/src/main/java/org/drools/compiler/builder/impl/AssetFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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 org.kie.internal.builder.ResourceChange; public interface AssetFilter { enum Action { DO_NOTHING, ADD, REMOVE, UPDATE } Action accept(ResourceChange.Type type, String pkgName, String assetName); }
apache/incubator-kie-drools
1,103
drools-templates/src/main/java/org/drools/template/parser/TemplateColumn.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.template.parser; import org.drools.template.model.Rule; /** * A column condition for a rule template to be generated. */ interface TemplateColumn { void addCondition(final Rule rule); String getName(); boolean isNotCondition(); String getCondition(); }