Dataset Viewer (First 5GB)
repo_id
stringclasses 875
values | size
int64 974
38.9k
| file_path
stringlengths 10
308
| content
stringlengths 974
38.9k
|
|---|---|---|---|
apache/pig
| 1,024
|
src/org/apache/pig/builtin/FloatSum.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pig.builtin;
/**
* This method should never be used directly, use {@link SUM}.
*/
public class FloatSum extends DoubleSum {
// just here for backwards compatibility
public FloatSum() {}
}
|
google/sagetv
| 1,027
|
java/sage/SageTVInputPlugin.java
|
/*
* Copyright 2015 The SageTV 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 sage;
public interface SageTVInputPlugin
{
/*
* Called to intialize the input plugin.
*
* callback - the SageTVInputCallback object that should be used to send events to SageTV
*/
public boolean openInputPlugin(SageTVInputCallback callback);
/*
* Called to close down the input plugin.
* Any resource cleanup should be done here.
*/
public void closeInputPlugin();
}
|
apache/tomcat
| 1,026
|
test/org/apache/el/lang/TesterType.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.el.lang;
public class TesterType {
private final String value;
public TesterType(String value) {
this.value = value;
}
public String getValue() {
return value;
}
}
|
apache/wicket
| 1,001
|
wicket-core/src/main/java/org/apache/wicket/mock/MockHomePage.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.mock;
import org.apache.wicket.markup.html.WebPage;
/**
* Mock Page
*/
public class MockHomePage extends WebPage
{
private static final long serialVersionUID = 1L;
}
|
apache/tomcat80
| 1,026
|
test/org/apache/el/lang/TesterType.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.el.lang;
public class TesterType {
private final String value;
public TesterType(String value) {
this.value = value;
}
public String getValue() {
return value;
}
}
|
apache/groovy
| 1,033
|
src/test/groovy/bugs/ScriptBug.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package bugs;
import org.codehaus.groovy.classgen.TestSupport;
public class ScriptBug extends TestSupport {
public void testBug() throws Exception {
assertScript("println 'hello world'");
}
}
|
google/flatbuffers
| 1,026
|
tests/MyGame/Example/TestT.java
|
// automatically generated by the FlatBuffers compiler, do not modify
package MyGame.Example;
import com.google.flatbuffers.BaseVector;
import com.google.flatbuffers.BooleanVector;
import com.google.flatbuffers.ByteVector;
import com.google.flatbuffers.Constants;
import com.google.flatbuffers.DoubleVector;
import com.google.flatbuffers.FlatBufferBuilder;
import com.google.flatbuffers.FloatVector;
import com.google.flatbuffers.IntVector;
import com.google.flatbuffers.LongVector;
import com.google.flatbuffers.ShortVector;
import com.google.flatbuffers.StringVector;
import com.google.flatbuffers.Struct;
import com.google.flatbuffers.Table;
import com.google.flatbuffers.UnionVector;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
public class TestT {
private short a;
private byte b;
public short getA() { return a; }
public void setA(short a) { this.a = a; }
public byte getB() { return b; }
public void setB(byte b) { this.b = b; }
public TestT() {
this.a = 0;
this.b = 0;
}
}
|
google/sagetv
| 1,030
|
java/sage/media/sub/DTVCCEffect.java
|
/*
* Copyright 2015 The SageTV 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 sage.media.sub;
public enum DTVCCEffect {
SNAP, // Window open at full opacity, immediately
FADE, // Fade in or out at a given speed
WIPE, // Fly on or off from a border at a given speed
NONE;
public static DTVCCEffect from(int data) {
switch (data) {
case 0:
return SNAP;
case 1:
return FADE;
case 2:
return WIPE;
}
return NONE;
}
}
|
apache/pig
| 1,037
|
src/org/apache/pig/builtin/EXP.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pig.builtin;
/**
* Given a single data atom it returns the Euler's number e raised to the power of input
*/
public class EXP extends DoubleBase {
Double compute(Double input){
return Math.exp(input);
}
}
|
apache/tomcat
| 1,027
|
java/org/apache/catalina/ha/tcp/Constants.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.ha.tcp;
/**
* Manifest constants for the <code>org.apache.catalina.ha.tcp</code> package.
*/
public class Constants {
public static final String Package = "org.apache.catalina.ha.tcp";
}
|
google/sagetv
| 1,038
|
java/sage/Version.java
|
/*
* Copyright 2015 The SageTV 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 sage;
/**
*
* @author Narflex
*/
public class Version
{
public static final byte MAJOR_VERSION = 9;
public static final byte MINOR_VERSION = 2;
public static final byte MICRO_VERSION = 15;
public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + MICRO_VERSION + "." + SageConstants.BUILD_VERSION;
/** Creates a new instance of Version */
private Version()
{
}
}
|
google/zetasql
| 1,029
|
java/com/google/zetasql/TestAccess.java
|
/*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.google.zetasql;
import com.google.common.collect.ImmutableList;
/** Class that gives tests access to package-private methods. */
public final class TestAccess {
private TestAccess() {}
/** Returns {@link FileDescriptorSetsBuilder#getDescriptorPools}. */
public static ImmutableList<DescriptorPool> getDescriptorPools(
FileDescriptorSetsBuilder builder) {
return builder.getDescriptorPools();
}
}
|
apache/tomcat80
| 1,041
|
java/javax/el/ELClass.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.el;
/**
* @since EL 3.0
*/
public class ELClass {
private final Class<?> clazz;
public ELClass(Class<?> clazz) {
this.clazz = clazz;
}
public Class<?> getKlass() {
return clazz;
}
}
|
google/gson
| 1,032
|
test-jpms/src/test/java/module-info.java
|
/*
* Copyright (C) 2024 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.
*/
@SuppressWarnings("requires-automatic") // for automatic module names for 'junit' and 'truth'
module com.google.gson.jpms_test {
requires com.google.gson;
// Test dependencies
requires junit;
requires truth; // has no proper module name yet, see https://github.com/google/truth/issues/605
opens com.google.gson.jpms_test to
junit;
opens com.google.gson.jpms_test.opened to
junit,
com.google.gson;
}
|
apache/harmony
| 1,027
|
drlvm/vm/tests/kernel/notfound/MissingAntn.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package notfound;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* @author Alexey V. Varlamov
*/
@Retention(RetentionPolicy.RUNTIME)
public @interface MissingAntn {
}
|
apache/tomcat
| 1,042
|
java/jakarta/el/VariableMapper.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package jakarta.el;
/**
*
*/
public abstract class VariableMapper {
public abstract ValueExpression resolveVariable(String variable);
public abstract ValueExpression setVariable(String variable, ValueExpression expression);
}
|
apache/tomcat
| 1,043
|
java/jakarta/el/ELClass.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package jakarta.el;
/**
* @since EL 3.0
*/
public class ELClass {
private final Class<?> clazz;
public ELClass(Class<?> clazz) {
this.clazz = clazz;
}
public Class<?> getKlass() {
return clazz;
}
}
|
apache/tomcat80
| 1,041
|
java/javax/el/VariableMapper.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.el;
/**
*
*/
public abstract class VariableMapper {
public abstract ValueExpression resolveVariable(String variable);
public abstract ValueExpression setVariable(String variable, ValueExpression expression);
}
|
apache/wicket
| 1,012
|
wicket-util/src/main/java/org/apache/wicket/util/thread/Lock.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.util.thread;
/**
* Type-safe monitor class to be used in place of <code>Object</code> for readability.
*
* @author Jonathan Locke
* @since 1.2.6
*/
public final class Lock
{
}
|
apache/datafu
| 1,026
|
datafu-pig/src/main/java/datafu/pig/util/In.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package datafu.pig.util;
/**
* In has been renamed to InUDF.
*
* This class is provided for backward compatibility.
*
* @deprecated Use {@link InUDF} instead.
*/
@Deprecated
public class In extends InUDF
{
}
|
apache/eventmesh
| 997
|
eventmesh-runtime-v2/src/main/java/org/apache/eventmesh/runtime/Runtime.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.runtime;
/**
* Runtime
*/
public interface Runtime {
void init() throws Exception;
void start() throws Exception;
void stop() throws Exception;
}
|
apache/pig
| 1,037
|
src/org/apache/pig/impl/bloom/Murmur3Hash.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pig.impl.bloom;
public class Murmur3Hash extends Hash {
@Override
public int[] hash(byte[] bytes, int maxValue, int numHash) {
return HashProvider.hashMurmur3(bytes, maxValue, numHash);
}
}
|
apache/tomcat
| 1,040
|
test/org/apache/el/TesterBeanBB.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.el;
public class TesterBeanBB extends TesterBeanB {
private String extra;
public String getExtra() {
return extra;
}
public void setExtra(String extra) {
this.extra = extra;
}
}
|
apache/tomcat80
| 1,040
|
java/javax/websocket/Extension.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.websocket;
import java.util.List;
public interface Extension {
String getName();
List<Parameter> getParameters();
interface Parameter {
String getName();
String getValue();
}
}
|
apache/tvm
| 1,024
|
jvm/core/src/main/java/org/apache/tvm/TVMValueLong.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tvm;
public class TVMValueLong extends TVMValue {
public final long value;
public TVMValueLong(long value) {
this.value = value;
}
@Override public long asLong() {
return value;
}
}
|
google/gson
| 1,031
|
gson/src/main/java/com/google/gson/Strictness.java
|
package com.google.gson;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Modes that indicate how strictly a JSON {@linkplain JsonReader reader} or {@linkplain JsonWriter
* writer} follows the syntax laid out in the <a href="https://www.ietf.org/rfc/rfc8259.txt">RFC
* 8259 JSON specification</a>.
*
* <p>You can look at {@link JsonReader#setStrictness(Strictness)} to see how the strictness affects
* the {@link JsonReader} and you can look at {@link JsonWriter#setStrictness(Strictness)} to see
* how the strictness affects the {@link JsonWriter}.
*
* @see GsonBuilder#setStrictness(Strictness)
* @see JsonReader#setStrictness(Strictness)
* @see JsonWriter#setStrictness(Strictness)
* @since 2.11.0
*/
public enum Strictness {
/** Allow large deviations from the JSON specification. */
LENIENT,
/** Allow certain small deviations from the JSON specification for legacy reasons. */
LEGACY_STRICT,
/** Strict compliance with the JSON specification. */
STRICT
}
|
apache/commons-ognl
| 1,002
|
src/test/java/org/apache/commons/ognl/test/objects/GenericObject.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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;
/**
* Used by {@link BaseGeneric} to reference a class type.
*/
public interface GenericObject
{
int getId();
String getDisplayName();
}
|
google/oss-fuzz
| 1,024
|
projects/apache-commons-validator/UrlValidatorFuzzer.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.validator.routines.UrlValidator;
public class UrlValidatorFuzzer {
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
UrlValidator validator = UrlValidator.getInstance();
validator.isValid(data.consumeRemainingAsString());
}
}
|
apache/harmony
| 1,031
|
drlvm/src/test/regression/H3098/JsrNoRetTest.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.drlvm.tests.regression.h3098;
import junit.framework.TestCase;
public class JsrNoRetTest extends TestCase {
public void test() throws Exception {
JsrNoRet.testcase();
}
}
|
apache/harmony
| 1,032
|
drlvm/src/test/regression/H2926/MyException.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.drlvm.tests.regression.h2926;
public class MyException extends Exception {
public MyException() {
super();
}
public MyException(String msg) {
super(msg);
}
}
|
apache/hop
| 1,027
|
engine/src/main/java/org/apache/hop/core/IExecutor.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hop.core;
public interface IExecutor {
String getExecutingServer();
void setExecutingServer(String executingServer);
String getExecutingUser();
void setExecutingUser(String executingUser);
}
|
apache/poi
| 1,026
|
poi/src/main/java/org/apache/poi/ss/formula/eval/ValueEval.java
|
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.ss.formula.eval;
public interface ValueEval {
// no methods
}
|
google/j2cl
| 1,031
|
jre/java/java/lang/IllegalStateException.java
|
/*
* Copyright 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package java.lang;
/** Indicates that an objet was in an invalid state during an attempted operation. */
public class IllegalStateException extends RuntimeException {
public IllegalStateException() {}
public IllegalStateException(String s) {
super(s);
}
public IllegalStateException(String message, Throwable cause) {
super(message, cause);
}
public IllegalStateException(Throwable cause) {
super(cause);
}
}
|
google/startup-os
| 1,029
|
common/grpc_auth/ClientAuthInterceptor.java
|
package com.google.startupos.common.grpc_auth;
import io.grpc.CallOptions;
import io.grpc.Channel;
import io.grpc.ClientCall;
import io.grpc.ClientInterceptor;
import io.grpc.ForwardingClientCall;
import io.grpc.Metadata;
import io.grpc.MethodDescriptor;
import static io.grpc.Metadata.ASCII_STRING_MARSHALLER;
public class ClientAuthInterceptor implements ClientInterceptor {
private String tokenValue;
public ClientAuthInterceptor(String token) {
tokenValue = token;
}
@Override
public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(
MethodDescriptor<ReqT, RespT> methodDescriptor, CallOptions callOptions, Channel channel) {
return new ForwardingClientCall.SimpleForwardingClientCall<ReqT, RespT>(
channel.newCall(methodDescriptor, callOptions)) {
@Override
public void start(Listener<RespT> listener, Metadata metadata) {
metadata.put(Metadata.Key.of("token", ASCII_STRING_MARSHALLER), tokenValue);
super.start(listener, metadata);
}
};
}
}
|
apache/hive
| 1,028
|
hplsql/src/main/java/org/apache/hive/hplsql/SqlCodes.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hive.hplsql;
public class SqlCodes {
public static int NO_DATA_FOUND = 100;
public static int TOO_MANY_ROWS = -1422;
public static int SUCCESS = 0;
public static int ERROR = -1;
}
|
google/oss-fuzz
| 1,025
|
projects/apache-commons-validator/UrlValidator2Fuzzer.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.validator.UrlValidator;
public class UrlValidator2Fuzzer {
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
UrlValidator validator = new UrlValidator(data.consumeInt());
validator.isValid(data.consumeRemainingAsString());
}
}
|
apache/commons-ognl
| 1,002
|
src/test/java/org/apache/commons/ognl/test/objects/IFormComponent.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.commons.ognl.test.objects;
/**
*/
public interface IFormComponent
extends IComponent
{
String getClientId();
IForm getForm();
void setForm( IForm form );
}
|
apache/harmony
| 1,029
|
drlvm/vm/tests/kernel/java/lang/pkg2/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.
*/
/**
* @author Alexey V. Varlamov
*/
@TagAntn
@ValAntn
package java.lang.pkg2;
import org.apache.harmony.lang.AnnotatedElementTestFrame.TagAntn;
import org.apache.harmony.lang.AnnotatedElementTestFrame.ValAntn;
|
apache/hop
| 1,024
|
core/src/main/java/org/apache/hop/core/IRunnableWithProgress.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hop.core;
import java.lang.reflect.InvocationTargetException;
public interface IRunnableWithProgress {
void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException;
}
|
apache/solr
| 1,027
|
solr/core/src/java/org/apache/solr/highlight/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.
*/
/**
* {@link org.apache.solr.highlight.SolrHighlighter} API and related implementations and utilities
*
* <p>See {@link org.apache.lucene.search.highlight} for addition information.
*/
package org.apache.solr.highlight;
|
apache/solr
| 1,027
|
solr/core/src/java/org/apache/solr/util/hll/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 fork of <a href="https://github.com/aggregateknowledge/java-hll/">Java-HyperLogLog</a> package
* tweaked not to depend on fastutil and with cleanups to make it lean and clean.
*/
package org.apache.solr.util.hll;
|
apache/tomcat
| 1,033
|
test/org/apache/el/lang/TesterTypeEditorNoError.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.el.lang;
public class TesterTypeEditorNoError extends TesterTypeEditorBase {
@Override
public void setAsText(String text) throws IllegalArgumentException {
type = new TesterType(text);
}
}
|
apache/tomcat80
| 1,041
|
test/org/apache/el/TesterBeanBB.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.el;
public class TesterBeanBB extends TesterBeanB {
private String extra;
public String getExtra() {
return extra;
}
public void setExtra(String extra) {
this.extra = extra;
}
}
|
google/j2cl
| 1,039
|
jre/java/java/util/SortedMap.java
|
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package java.util;
/**
* A map with ordering. <a
* href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/SortedMap.html">[Sun docs]</a>
*
* @param <K> key type.
* @param <V> value type.
*/
public interface SortedMap<K, V> extends Map<K, V> {
Comparator<? super K> comparator();
K firstKey();
SortedMap<K, V> headMap(K toKey);
K lastKey();
SortedMap<K, V> subMap(K fromKey, K toKey);
SortedMap<K, V> tailMap(K fromKey);
}
|
apache/commons-ognl
| 1,013
|
src/main/java/org/apache/commons/ognl/internal/Cache.java
|
package org.apache.commons.ognl.internal;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
*/
public interface Cache<K, V>
{
void clear();
int getSize();
V get( K key )
throws CacheException;
V put( K key, V value );
}
|
apache/commons-vfs
| 1,026
|
commons-vfs2/src/test/java/code/ClassToLoad.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.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 code;
/**
* The test class for the VFS ClassLoader.
*/
public class ClassToLoad {
private final String message = "**PRIVATE**";
@Override
public String toString() {
return message;
}
}
|
apache/hop
| 1,024
|
core/src/main/java/org/apache/hop/core/gui/IGuiPosition.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hop.core.gui;
public interface IGuiPosition {
Point getLocation();
void setLocation(Point p);
void setLocation(int x, int y);
boolean isSelected();
void setSelected(boolean selected);
}
|
apache/jena
| 1,026
|
jena-core/src/main/java/org/apache/jena/util/Locator.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.util;
/**
* Interface to things that open streams by some string reference
*/
public interface Locator
{
public TypedStream open(String filenameOrURI) ;
public String getName() ;
}
|
apache/joshua
| 1,032
|
src/main/java/org/apache/joshua/zmert/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 code for performing minimum error rate training.
* Much of the code in this package is based on Och (2003).
* A deeper description of the algorithm is in Zaidan (2009).
*/
package org.apache.joshua.zmert;
|
google/sagetv
| 1,030
|
java/sage/media/sub/RawSubtitleHandler.java
|
/*
* Copyright 2015 The SageTV 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 sage.media.sub;
/**
*
* @author Narflex
*/
public class RawSubtitleHandler extends SubtitleHandler
{
/** Creates a new instance of RawSubtitleHandler */
public RawSubtitleHandler()
{
super(null);
}
public void loadSubtitlesFromFiles(sage.MediaFile sourceFile)
{
throw new UnsupportedOperationException("RawSubtitleHandler cannot load subtitles from external files!");
}
}
|
openjdk/jtreg
| 1,064
|
test/groups/d4/NoTests.java
|
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// no tests
|
apache/commons-ognl
| 1,009
|
src/main/java/org/apache/commons/ognl/internal/CacheException.java
|
package org.apache.commons.ognl.internal;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
*/
public class CacheException
extends RuntimeException
{
public CacheException( Throwable e )
{
super( e.getMessage(), e );
}
}
|
apache/mina
| 1,027
|
http/src/main/java/org/apache/mina/http/api/HttpVerb.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.mina.http.api;
/**
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*/
public enum HttpVerb {
GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, CONNECT
}
|
apache/pekko
| 1,027
|
docs/src/test/java/jdocs/cluster/StatsWorker.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* license agreements; and to You under the Apache License, version 2.0:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* This file is part of the Apache Pekko project, which was derived from Akka.
*/
/*
* Copyright (C) 2018-2022 Lightbend Inc. <https://www.lightbend.com>
*/
package jdocs.cluster;
import java.util.HashMap;
import java.util.Map;
import org.apache.pekko.actor.AbstractActor;
// #worker
public class StatsWorker extends AbstractActor {
Map<String, Integer> cache = new HashMap<String, Integer>();
@Override
public Receive createReceive() {
return receiveBuilder()
.match(
String.class,
word -> {
Integer length = cache.get(word);
if (length == null) {
length = word.length();
cache.put(word, length);
}
getSender().tell(length, getSelf());
})
.build();
}
}
// #worker
|
apache/tomcat
| 1,044
|
java/jakarta/websocket/Extension.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package jakarta.websocket;
import java.util.List;
public interface Extension {
String getName();
List<Parameter> getParameters();
interface Parameter {
String getName();
String getValue();
}
}
|
apache/tomcat80
| 1,033
|
test/org/apache/el/lang/TesterTypeEditorNoError.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.el.lang;
public class TesterTypeEditorNoError extends TesterTypeEditorBase {
@Override
public void setAsText(String text) throws IllegalArgumentException {
type = new TesterType(text);
}
}
|
google/oss-fuzz
| 1,028
|
projects/apache-commons-validator/IBANValidatorFuzzer.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.validator.routines.IBANValidator;
public class IBANValidatorFuzzer {
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
IBANValidator validator = IBANValidator.getInstance();
validator.isValid(data.consumeRemainingAsString());
}
}
|
apache/dubbo
| 1,024
|
dubbo-common/src/main/java/org/apache/dubbo/rpc/model/Pack.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.model;
public interface Pack {
/**
* @param obj instance
* @return byte array
* @throws Exception when error occurs
*/
byte[] pack(Object obj) throws Exception;
}
|
apache/eagle
| 1,002
|
eagle-server/src/main/java/org/apache/eagle/server/security/encrypt/EncryptorFactory.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.server.security.encrypt;
public class EncryptorFactory {
public static PasswordEncryptor getPasswordEncryptor() {
return new PasswordEncryptorImpl();
}
}
|
google/j2objc
| 1,034
|
jre_emul/Classes/java/lang/management/ThreadInfo.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package java.lang.management;
/**
* Stub implementation of ThreadInfo. No methods are declared, since
* this class is referenced by other classes in the package, but
* never returned.
*/
public class ThreadInfo {
}
|
apache/eagle
| 1,010
|
eagle-core/eagle-common/src/test/java/org/apache/eagle/common/TestVersion.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.common;
import org.junit.Assert;
import org.junit.Test;
public class TestVersion {
@Test
public void testVersion(){
Assert.assertNotNull(Version.str());
}
}
|
apache/myfaces
| 1,030
|
api/src/main/java/jakarta/faces/flow/ReturnNode.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package jakarta.faces.flow;
import jakarta.faces.context.FacesContext;
/**
*
* @since 2.2
*/
public abstract class ReturnNode extends FlowNode
{
public abstract String getFromOutcome(FacesContext context);
}
|
google/guava
| 1,033
|
guava/src/com/google/common/graph/package-info.java
|
/*
* Copyright (C) 2015 The Guava 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.
*/
/**
* An API for representing graph (node and edge) data. It is analogous to the Java Collections
* Framework APIs for lists, maps, sets, etc.
*
* <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
* library.
*/
@CheckReturnValue
@NullMarked
package com.google.common.graph;
import com.google.errorprone.annotations.CheckReturnValue;
import org.jspecify.annotations.NullMarked;
|
apache/commons-ognl
| 1,009
|
src/test/java/org/apache/commons/ognl/test/objects/BaseIndexed.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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;
/**
* Class used to test inheritance.
*/
public class BaseIndexed
{
public Object getLine( int index )
{
return "line:" + index;
}
}
|
apache/cxf
| 1,027
|
core/src/main/java/org/apache/cxf/service/model/NamedItem.java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.service.model;
import javax.xml.namespace.QName;
/**
* All elements of the service model that are named by a QName implement this interface.
*/
public interface NamedItem {
QName getName();
}
|
apache/synapse
| 1,024
|
modules/tasks/src/main/java/org/apache/synapse/task/Task.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.synapse.task;
/**
* Represents an executable Task
*/
public interface Task {
/**
* Execute method will be invoked by the QuartzJOb.
*/
public void execute();
}
|
apache/tomcat
| 1,040
|
test/org/apache/el/lang/TesterTypeEditorError.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.el.lang;
public class TesterTypeEditorError extends TesterTypeEditorBase {
@Override
public void setAsText(String text) throws IllegalArgumentException {
throw new IllegalArgumentException();
}
}
|
google/jsonnet
| 1,047
|
java_comparison/SubTemplate.java
|
/*
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class SubTemplate extends BaseTemplate {
// Supply my access token and pinned version.
public String accessToken() {
return "xxxxx";
}
public String image() {
return "gcr.io/cooltool-1009/pipeline_image@sha256:....";
}
public class SubTemplateSpec extends BaseTemplate.BaseTemplateSpec {
public Object replicas() { return 2.0; }
}
public Object spec() {
return new SubTemplateSpec();
}
}
|
google/nomulus
| 1,027
|
core/src/main/java/google/registry/xml/XmlException.java
|
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.xml;
/**
* An exception thrown by {@link XmlTransformer} when marshalling or unmarshalling fails.
*
* <p>Upstream errors such as {@link jakarta.xml.bind.JAXBException} will be wrapped by this class.
*/
public class XmlException extends Exception {
public XmlException(String message) {
super(message);
}
public XmlException(Throwable cause) {
super(cause);
}
}
|
apache/druid
| 1,025
|
processing/src/main/java/org/apache/druid/tasklogs/TaskLogs.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.tasklogs;
import org.apache.druid.guice.annotations.ExtensionPoint;
@ExtensionPoint
public interface TaskLogs extends TaskLogStreamer, TaskLogPusher, TaskLogKiller, TaskPayloadManager
{
}
|
apache/felix-dev
| 1,043
|
scr/src/test/java/DefaultPackageClass.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT 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 DefaultPackageClass is just present for the
* {@link org.apache.felix.scr.impl.ReflectionHelperTest} to be able to test
* the <code>ReflectionHelper.getPackageName</code> method.
*/
public class DefaultPackageClass
{
}
|
apache/flink
| 1,031
|
flink-core/src/main/java/org/apache/flink/types/Nothing.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.types;
import org.apache.flink.annotation.Public;
/** A type for (synthetic) operators that do not output data. For example, data sinks. */
@Public
public class Nothing {
private Nothing() {}
}
|
apache/gora
| 1,024
|
gora-gradle-plugin/examples/simple/src/main/java/test/Sample.java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package test;
import org.apache.gora.mongodb.beans.tests.Test1;
public class Sample {
public static void main(String[] args) {
// Try to create new Test1 item
Test1 item = new Test1();
}
}
|
apache/hadoop-mapreduce
| 1,024
|
src/java/org/apache/hadoop/mapreduce/split/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.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
package org.apache.hadoop.mapreduce.split;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
|
apache/hadoop-mapreduce
| 1,024
|
src/java/org/apache/hadoop/mapreduce/task/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.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
package org.apache.hadoop.mapreduce.task;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
|
apache/tvm
| 1,033
|
jvm/core/src/main/java/org/apache/tvm/TVMValueBytes.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tvm;
public class TVMValueBytes extends TVMValue {
public final byte[] value;
public TVMValueBytes(byte[] value) {
this.value = value;
}
@Override public byte[] asBytes() {
return value;
}
}
|
google/oss-fuzz
| 1,034
|
projects/jackson-dataformats-binary/CborFuzzer.java
|
// Copyright 2021 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.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.cbor.databind.CBORMapper;
import java.io.IOException;
public class CborFuzzer {
public static void fuzzerTestOneInput(byte[] input) {
ObjectMapper mapper = new CBORMapper();
try {
mapper.readTree(input);
} catch (IOException ignored) {
}
}
}
|
google/sagetv
| 1,052
|
java/tv/sage/mod/Simple.java
|
/*
* Copyright 2015 The SageTV 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 tv.sage.mod;
/**
*
* @author 601
*/
public class Simple extends GenericWidget
{
public Simple(RawWidget rawWidget)
{
super(rawWidget);
// 601 if (rawWidget.properties().size() > 2) throw new RuntimeException("Simple w/+2 props " + rawWidget);
}
public Simple(byte inType, String inName, String[] propValz, int inIndex, String inSymbol)
{
super(inType, inName, propValz, inIndex, inSymbol);
}
}
|
apache/iceberg
| 1,025
|
api/src/main/java/org/apache/iceberg/expressions/UnboundTerm.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iceberg.expressions;
/**
* Represents an unbound term.
*
* @param <T> the Java type of values produced by this term
*/
public interface UnboundTerm<T> extends Unbound<T, BoundTerm<T>>, Term {}
|
apache/myfaces
| 1,026
|
api/src/main/java/jakarta/faces/flow/FlowHandlerFactory.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package jakarta.faces.flow;
import jakarta.faces.context.FacesContext;
/**
* @since 2.2
*/
public abstract class FlowHandlerFactory
{
public abstract FlowHandler createFlowHandler(FacesContext context);
}
|
apache/tapestry-5
| 1,029
|
plastic/src/test/java/testannotations/Property.java
|
// Copyright 2011 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package testannotations;
import static java.lang.annotation.ElementType.FIELD;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Marks that a field should be converted into a read/write JavaBeans property.
*/
@Target(FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Property
{
}
|
apache/thrift
| 1,027
|
lib/javame/src/org/apache/thrift/protocol/TStruct.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.thrift.protocol;
/**
* Helper class that encapsulates struct metadata.
*
*/
public class TStruct {
public TStruct() {}
public TStruct(String n) {
name = n;
}
public String name = "";
}
|
apache/tomcat
| 1,046
|
test/org/apache/el/parser/TesterBeanA.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.el.parser;
public class TesterBeanA {
private String keywordInt;
public String getInt() {
return keywordInt;
}
public void setInt(String keywordInt) {
this.keywordInt = keywordInt;
}
}
|
apache/tomcat80
| 1,040
|
test/org/apache/el/lang/TesterTypeEditorError.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.el.lang;
public class TesterTypeEditorError extends TesterTypeEditorBase {
@Override
public void setAsText(String text) throws IllegalArgumentException {
throw new IllegalArgumentException();
}
}
|
apache/commons-ognl
| 998
|
src/main/java/org/apache/commons/ognl/internal/entry/ParametrizedCacheEntryFactory.java
|
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.internal.entry;
import java.util.Map;
public interface ParametrizedCacheEntryFactory
{
void setParameterValues( Map<String, String> parameters );
}
|
apache/cxf
| 1,028
|
testutils/src/main/java/org/apache/cxf/customer/bare/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.
*/
@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://cxf.apache.org/jra",
elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED)
package org.apache.cxf.customer.bare;
|
apache/lucene
| 1,030
|
lucene/core/src/java/org/apache/lucene/util/hnsw/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.
*/
/**
* Navigable Small-World graph, nominally Hierarchical but currently only has a single layer.
* Provides efficient approximate nearest neighbor search for high dimensional vectors.
*/
package org.apache.lucene.util.hnsw;
|
apache/lucene
| 1,039
|
lucene/core/src/java/org/apache/lucene/geo/Geometry.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.lucene.geo;
/** Base class for {@link LatLonGeometry} and {@link XYGeometry} */
public abstract class Geometry {
/** get a Component2D from the geometry object */
protected abstract Component2D toComponent2D();
}
|
apache/solr
| 1,030
|
solr/core/src/java/org/apache/solr/util/plugin/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.
*/
/**
* Common APIs related to implementing <a
* href="https://solr.apache.org/guide/solr-plugins.html">Solr plugins</a>
*
* <p>See also: {@link org.apache.solr.util.SolrPluginUtils}.
*/
package org.apache.solr.util.plugin;
|
apache/sqoop
| 1,024
|
src/test/org/apache/sqoop/testcategories/thirdpartytest/CubridTest.java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.sqoop.testcategories.thirdpartytest;
/**
* A CubridTest shall test scenarios where a Cubrid driver and/or external instance is required.
*/
public interface CubridTest extends ThirdPartyTest {
}
|
apache/tomcat80
| 1,048
|
java/javax/servlet/jsp/tagext/JspTag.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.servlet.jsp.tagext;
/**
* Serves as a base class for Tag and SimpleTag.
* This is mostly for organizational and type-safety purposes.
*
* @since 2.0
*/
public interface JspTag {
// No methods even through there are some common methods
}
|
google/j2cl
| 1,049
|
jre/java/java/lang/SecurityException.java
|
/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package java.lang;
/**
* See <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/SecurityException.html">the
* official Java API doc</a> for details.
*
* <p>This exception is never thrown by GWT or GWT's libraries, as GWT does not have a
* SecurityManager. It is provided in GWT only for compatibility with user code that explicitly
* catches it.
*/
public class SecurityException extends RuntimeException {
private SecurityException() {}
}
|
google/jimfs
| 1,031
|
jimfs/src/main/java/com/google/common/jimfs/package-info.java
|
/*
* Copyright 2013 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 containing the Jimfs file system API and implementation. Most users should only need to
* use the {@link com.google.common.jimfs.Jimfs Jimfs} and {@link
* com.google.common.jimfs.Configuration Configuration} classes.
*/
@CheckReturnValue
@ParametersAreNonnullByDefault
package com.google.common.jimfs;
import com.google.errorprone.annotations.CheckReturnValue;
import javax.annotation.ParametersAreNonnullByDefault;
|
google/or-tools
| 1,046
|
examples/contrib/Issue173.java
|
package com.google.ortools.contrib;
import com.google.ortools.Loader;
import com.google.ortools.linearsolver.MPConstraint;
import com.google.ortools.linearsolver.MPObjective;
import com.google.ortools.linearsolver.MPSolver;
import com.google.ortools.linearsolver.MPVariable;
public class Issue173 {
public static void breakit() {
for (int i = 0; i < 50000; i++) {
solveLP();
}
}
private static void solveLP() {
MPSolver solver = MPSolver.createSolver("CBC");
if (solver == null) {
System.out.println("Could not create solver CBC");
return;
}
MPVariable x = solver.makeNumVar(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, "x");
final MPObjective objective = solver.objective();
objective.setMaximization();
objective.setCoefficient(x, 1);
MPConstraint constraint = solver.makeConstraint(0, 5);
constraint.setCoefficient(x, 1);
solver.solve();
}
public static void main(String[] args) throws Exception {
Loader.loadNativeLibraries();
breakit();
}
}
|
google/oss-fuzz
| 1,053
|
projects/tomcat/HttpParserFuzzer.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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT 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 com.code_intelligence.jazzer.api.FuzzerSecurityIssueHigh;
import org.apache.tomcat.util.http.parser.HttpParser;
public class HttpParserFuzzer {
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
String input = data.consumeRemainingAsString();
HttpParser.unquote(input);
}
}
|
google/sagetv
| 1,038
|
java/sage/TreeNodeDuplicate.java
|
/*
* Copyright 2015 The SageTV 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 sage;
public class TreeNodeDuplicate
{
public TreeNodeDuplicate(Widget inSource, int inNum)
{
source = inSource;
num = inNum;
}
public Widget getSource()
{
return source;
}
public int getNum()
{
return num;
}
public String toString()
{
return "TreeNodeDuplicate[num=" + num + ", source=" +
source + ']';
}
private Widget source;
private int num;
}
|
apache/commons-ognl
| 1,018
|
src/test/java/org/apache/commons/ognl/test/objects/Cracker.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.io.Serializable;
/**
* Generic test object.
*/
public interface Cracker<T extends Serializable>
{
T getParam();
void setParam( T param );
}
|
apache/cxf
| 1,032
|
core/src/main/java/org/apache/cxf/phase/PhaseComparator.java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.phase;
import java.util.Comparator;
public class PhaseComparator implements Comparator<Phase> {
public int compare(Phase o1, Phase o2) {
return o1.getPriority() - o2.getPriority();
}
}
|
apache/datafu
| 1,034
|
datafu-pig/src/main/java/datafu/pig/util/BoolToInt.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package datafu.pig.util;
/**
* UDF which converts a Boolean to an Integer.
*/
public class BoolToInt extends SimpleEvalFunc<Integer>
{
public Integer call(Boolean val)
{
return (val == null || !val) ? 0 : 1;
}
}
|
apache/hudi
| 1,025
|
hudi-common/src/main/java/org/apache/hudi/common/model/IOType.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.hudi.common.model;
/**
* Types of lower level I/O operations done on each file slice.
*/
public enum IOType {
MERGE,
CREATE,
// APPEND is only used by table version 6 and below
APPEND
}
|
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 58