blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
⌀ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6aa37b19177305b77f7beccc04d904d8fd8e4acf | fa1408365e2e3f372aa61e7d1e5ea5afcd652199 | /src/testcases/CWE129_Improper_Validation_of_Array_Index/s01/CWE129_Improper_Validation_of_Array_Index__database_array_read_check_min_74b.java | 02c9e9ed456912bebacda692f333d22c88c82f41 | [] | no_license | bqcuong/Juliet-Test-Case | 31e9c89c27bf54a07b7ba547eddd029287b2e191 | e770f1c3969be76fdba5d7760e036f9ba060957d | refs/heads/master | 2020-07-17T14:51:49.610703 | 2019-09-03T16:22:58 | 2019-09-03T16:22:58 | 206,039,578 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,061 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE129_Improper_Validation_of_Array_Index__database_array_read_check_min_74b.java
Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml
Template File: sources-sinks-74b.tmpl.java
*/
/*
* @description
* CWE: 129 Improper Validation of Array Index
* BadSource: database Read data from a database
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: array_read_check_min
* GoodSink: Read from array after verifying that data is at least 0 and less than array.length
* BadSink : Read from array after verifying that data is at least 0 (but not verifying that data less than array.length)
* Flow Variant: 74 Data flow: data passed in a HashMap from one method to another in different source files in the same package
*
* */
package testcases.CWE129_Improper_Validation_of_Array_Index.s01;
import testcasesupport.*;
import java.util.HashMap;
import javax.servlet.http.*;
public class CWE129_Improper_Validation_of_Array_Index__database_array_read_check_min_74b
{
public void badSink(HashMap<Integer,Integer> dataHashMap ) throws Throwable
{
int data = dataHashMap.get(2);
/* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */
int array[] = { 0, 1, 2, 3, 4 };
/* POTENTIAL FLAW: Verify that data >= 0, but don't verify that data < array.length, so may be attempting to read out of the array bounds */
if (data >= 0)
{
IO.writeLine(array[data]);
}
else
{
IO.writeLine("Array index out of bounds");
}
}
/* goodG2B() - use GoodSource and BadSink */
public void goodG2BSink(HashMap<Integer,Integer> dataHashMap ) throws Throwable
{
int data = dataHashMap.get(2);
/* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */
int array[] = { 0, 1, 2, 3, 4 };
/* POTENTIAL FLAW: Verify that data >= 0, but don't verify that data < array.length, so may be attempting to read out of the array bounds */
if (data >= 0)
{
IO.writeLine(array[data]);
}
else
{
IO.writeLine("Array index out of bounds");
}
}
/* goodB2G() - use BadSource and GoodSink */
public void goodB2GSink(HashMap<Integer,Integer> dataHashMap ) throws Throwable
{
int data = dataHashMap.get(2);
/* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */
int array[] = { 0, 1, 2, 3, 4 };
/* FIX: Fully verify data before reading from array at location data */
if (data >= 0 && data < array.length)
{
IO.writeLine(array[data]);
}
else
{
IO.writeLine("Array index out of bounds");
}
}
}
| [
"[email protected]"
] | |
9bdac05ecb564649883ab343567bef296c33ee83 | de3c2d89f623527b35cc5dd936773f32946025d2 | /src/main/java/com/bytedance/sdk/openadsdk/utils/Reflection.java | 25825fd1d4f667ef4df6c95307d953a7cbbd8597 | [] | no_license | ren19890419/lvxing | 5f89f7b118df59fd1da06aaba43bd9b41b5da1e6 | 239875461cb39e58183ac54e93565ec5f7f28ddb | refs/heads/master | 2023-04-15T08:56:25.048806 | 2020-06-05T10:46:05 | 2020-06-05T10:46:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,597 | java | package com.bytedance.sdk.openadsdk.utils;
import java.lang.reflect.Method;
/* renamed from: com.bytedance.sdk.openadsdk.utils.aa */
public class Reflection {
/* renamed from: a */
private static Object f9107a;
/* renamed from: b */
private static Method f9108b;
static {
try {
Method declaredMethod = Class.class.getDeclaredMethod("forName", new Class[]{String.class});
Method declaredMethod2 = Class.class.getDeclaredMethod("getDeclaredMethod", new Class[]{String.class, Class[].class});
Class cls = (Class) declaredMethod.invoke(null, new Object[]{"dalvik.system.VMRuntime"});
Method method = (Method) declaredMethod2.invoke(cls, new Object[]{"getRuntime", null});
f9108b = (Method) declaredMethod2.invoke(cls, new Object[]{"setHiddenApiExemptions", new Class[]{String[].class}});
f9107a = method.invoke(null, new Object[0]);
} catch (Throwable th) {
C2564t.m12221b("Reflection", "reflect bootstrap failed:", th);
}
}
/* renamed from: a */
public static boolean m11928a(String... strArr) {
Object obj = f9107a;
if (obj != null) {
Method method = f9108b;
if (method != null) {
try {
method.invoke(obj, new Object[]{strArr});
return true;
} catch (Throwable unused) {
}
}
}
return false;
}
/* renamed from: a */
public static boolean m11927a() {
return m11928a("L");
}
}
| [
"[email protected]"
] | |
7fa3e9a6f791d5d9da192d25fc6bd180b712db7b | 551507b5ba52c3341aeadd1df596d949f8f7fbe6 | /webflux/src/main/java/org/springframework/security/web/server/authentication/AuthenticationEntryPointFailureHandler.java | 95cd2cf5d5621a6ae72d04650e6a15108645a809 | [
"Apache-2.0"
] | permissive | hoomanb1/spring-security | eb591ccd1b9ec43067c596887b84ba6fdb53d19f | c2fa89f11e7714c96783ae962ffe24b4d08c4731 | refs/heads/master | 2021-12-03T15:32:47.214165 | 2021-11-29T01:07:03 | 2021-11-29T01:07:03 | 106,230,005 | 0 | 0 | null | 2017-10-09T02:56:40 | 2017-10-09T02:56:40 | null | UTF-8 | Java | false | false | 1,655 | java | /*
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.web.server.authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.server.AuthenticationEntryPoint;
import org.springframework.security.web.server.WebFilterExchange;
import org.springframework.util.Assert;
import reactor.core.publisher.Mono;
/**
* @author Rob Winch
* @since 5.0
*/
public class AuthenticationEntryPointFailureHandler implements AuthenticationFailureHandler {
private final AuthenticationEntryPoint authenticationEntryPoint;
public AuthenticationEntryPointFailureHandler(
AuthenticationEntryPoint authenticationEntryPoint) {
Assert.notNull(authenticationEntryPoint, "authenticationEntryPoint cannot be null");
this.authenticationEntryPoint = authenticationEntryPoint;
}
@Override
public Mono<Void> onAuthenticationFailure(WebFilterExchange webFilterExchange,
AuthenticationException exception) {
return this.authenticationEntryPoint.commence(webFilterExchange.getExchange(), exception);
}
}
| [
"[email protected]"
] | |
35b721c3f240be62881e9494d84ece7f3b2a8892 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MATH-84b-1-24-PESA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/optimization/direct/DirectSearchOptimizer_ESTest.java | 96443967029dc22acfa5808f29907a88a933fb7f | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,313 | java | /*
* This file was automatically generated by EvoSuite
* Fri Apr 03 08:38:28 UTC 2020
*/
package org.apache.commons.math.optimization.direct;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math.optimization.OptimizationException;
import org.apache.commons.math.optimization.direct.MultiDirectional;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DirectSearchOptimizer_ESTest extends DirectSearchOptimizer_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
MultiDirectional multiDirectional0 = new MultiDirectional();
multiDirectional0.setMaxIterations((-2146160621));
try {
multiDirectional0.incrementIterationsCounter();
fail("Expecting exception: OptimizationException");
} catch(OptimizationException e) {
//
// org.apache.commons.math.MaxIterationsExceededException: Maximal number of iterations (-2,146,160,621) exceeded
//
verifyException("org.apache.commons.math.optimization.direct.DirectSearchOptimizer", e);
}
}
}
| [
"[email protected]"
] | |
036019c8562984235a353fac849f1c3c5846c1b2 | 726b6d9f5bd965b8047662cdf3c7f2796139e69c | /InteraxTelephonyAsteriskJava/src/org/asteriskjava/fastagi/command/AnswerCommand.java | e38f24bdd04f943372604a9dae90278b242d7003 | [] | no_license | adiquintero/interaxtelephony | 794e8311d3f61e3fdec233c055c0e5df4db3274a | 14dcd109fa3dd5ed74797f681dd87ec793ded703 | refs/heads/master | 2020-08-23T09:24:31.158545 | 2019-10-21T14:21:34 | 2019-10-21T14:21:34 | 216,584,831 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,241 | java | /*
* Copyright 2004-2006 Stefan Reuter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.asteriskjava.fastagi.command;
/**
* Answers channel if not already in answer state.<p>
* Returns -1 on channel failure, or 0 if successful.
*
* @author srt
* @version $Id: AnswerCommand.java,v 1.1 2010/09/19 19:11:20 yusmery Exp $
*/
public class AnswerCommand extends AbstractAgiCommand
{
/**
* Serial version identifier.
*/
private static final long serialVersionUID = 3762248656229053753L;
/**
* Creates a new AnswerCommand.
*/
public AnswerCommand()
{
super();
}
@Override
public String buildCommand()
{
return "ANSWER";
}
}
| [
"[email protected]"
] | |
dd742b5a7773f833c44828fa5c2f0e8c73489ed6 | ae5eb1a38b4d22c82dfd67c86db73592094edc4b | /project269/src/test/java/org/gradle/test/performance/largejavamultiproject/project269/p1345/Test26903.java | e9cf6ccc7e3d620e714f1a97002212d3f9012934 | [] | no_license | big-guy/largeJavaMultiProject | 405cc7f55301e1fd87cee5878a165ec5d4a071aa | 1cd6a3f9c59e9b13dffa35ad27d911114f253c33 | refs/heads/main | 2023-03-17T10:59:53.226128 | 2021-03-04T01:01:39 | 2021-03-04T01:01:39 | 344,307,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,182 | java | package org.gradle.test.performance.largejavamultiproject.project269.p1345;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test26903 {
Production26903 objectUnderTest = new Production26903();
@Test
public void testProperty0() {
Production26900 value = new Production26900();
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
Production26901 value = new Production26901();
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
Production26902 value = new Production26902();
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
} | [
"[email protected]"
] | |
4dc481e046c7bb1304d3716a591ed4d2699f3cbc | 736fef3dcf85164cf103976e1753c506eb13ae09 | /seccon_2015/Reverse-Engineering Android APK 1/files/source/src/android/support/v4/graphics/drawable/DrawableCompat$LollipopMr1DrawableImpl.java | 224f414a32df8abf437065f1f8e64ecca6050638 | [
"MIT"
] | permissive | Hamz-a/MyCTFWriteUps | 4b7dac9a7eb71fceb7d83966dc63cf4e5a796007 | ffa98e4c096ff1751f5f729d0ec882e079a6b604 | refs/heads/master | 2021-01-10T17:46:10.014480 | 2018-04-01T22:14:31 | 2018-04-01T22:14:31 | 47,495,748 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 556 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package android.support.v4.graphics.drawable;
import android.graphics.drawable.Drawable;
// Referenced classes of package android.support.v4.graphics.drawable:
// DrawableCompat, DrawableCompatApi22
static class Q extends Q
{
public Drawable wrap(Drawable drawable)
{
return DrawableCompatApi22.wrapForTinting(drawable);
}
Q()
{
}
}
| [
"[email protected]"
] | |
baef96823ac7e0c3b5cc6f003b3f422f955fba24 | 9f2614252555e8d149565032f1496eedd9773081 | /esac-commons-core/src/main/java/com/esacinc/commons/logging/logstash/impl/TimestampJsonProvider.java | 58632bcd6261c479d1d60ba8c1b8d4c13d940df2 | [
"Apache-2.0"
] | permissive | mkotelba/esac-commons | bd9033df7191c4ca1efeb5fabb085f6e353821ff | 81f1567e16fc796dec6694d7929d900deb6a4b78 | refs/heads/master | 2021-01-12T11:38:12.464762 | 2017-01-24T03:17:13 | 2017-01-24T03:17:13 | 72,240,463 | 0 | 0 | null | 2016-10-28T20:39:51 | 2016-10-28T20:39:50 | null | UTF-8 | Java | false | false | 1,143 | java | package com.esacinc.commons.logging.logstash.impl;
import ch.qos.logback.classic.spi.LoggingEvent;
import com.esacinc.commons.config.property.PropertyTrie;
import com.esacinc.commons.logging.elasticsearch.ElasticsearchDatatype;
import com.esacinc.commons.logging.elasticsearch.ElasticsearchFieldMapping;
import com.esacinc.commons.logging.elasticsearch.impl.ElasticsearchFieldMappingImpl;
import javax.annotation.Nullable;
import net.logstash.logback.composite.FormattedTimestampJsonProvider;
import org.apache.commons.lang3.ArrayUtils;
public class TimestampJsonProvider extends AbstractEsacJsonProvider {
private final static ElasticsearchFieldMapping[] FIELD_MAPPINGS =
ArrayUtils.toArray(new ElasticsearchFieldMappingImpl(FormattedTimestampJsonProvider.FIELD_TIMESTAMP, ElasticsearchDatatype.DATE));
@Override
protected void writeToInternal(PropertyTrie<Object> fields, LoggingEvent event) {
fields.put(FormattedTimestampJsonProvider.FIELD_TIMESTAMP, event.getTimeStamp());
}
@Nullable
@Override
public ElasticsearchFieldMapping[] getFieldMappings() {
return FIELD_MAPPINGS;
}
}
| [
"[email protected]"
] | |
e789ade847c54211eabea83000708a6f4030aa21 | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /iot-20180120/src/main/java/com/aliyun/iot20180120/models/QueryMessageInfoRequest.java | c58087b47b245ed327343e1bfaa276991fb70773 | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 943 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.iot20180120.models;
import com.aliyun.tea.*;
public class QueryMessageInfoRequest extends TeaModel {
@NameInMap("IotInstanceId")
public String iotInstanceId;
@NameInMap("UniMsgId")
public String uniMsgId;
public static QueryMessageInfoRequest build(java.util.Map<String, ?> map) throws Exception {
QueryMessageInfoRequest self = new QueryMessageInfoRequest();
return TeaModel.build(map, self);
}
public QueryMessageInfoRequest setIotInstanceId(String iotInstanceId) {
this.iotInstanceId = iotInstanceId;
return this;
}
public String getIotInstanceId() {
return this.iotInstanceId;
}
public QueryMessageInfoRequest setUniMsgId(String uniMsgId) {
this.uniMsgId = uniMsgId;
return this;
}
public String getUniMsgId() {
return this.uniMsgId;
}
}
| [
"[email protected]"
] | |
5c4ca9c8c5914fbc4a750aeb9bbe7d81c8543838 | bd729ef9fcd96ea62e82bb684c831d9917017d0e | /CHPT/source/trunk/supp_app/SspDispatchService/src/com/ctfo/storage/model/basedata/TbVehicleModels.java | eb4495f5f0bd8ebd5feba0dc3dbf17dbeed40c1e | [] | no_license | shanghaif/workspace-kepler | 849c7de67b1f3ee5e7da55199c05c737f036780c | ac1644be26a21f11a3a4a00319c450eb590c1176 | refs/heads/master | 2023-03-22T03:38:55.103692 | 2018-03-24T02:39:41 | 2018-03-24T02:39:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,797 | java | package com.ctfo.storage.model.basedata;
import java.io.Serializable;
import java.math.BigDecimal;
/**
*
*
* <p>
* ----------------------------------------------------------------------------- <br>
* 工程名 : SspDispatchService <br>
* 功能: 车型档案<br>
* 描述: 车型档案<br>
* 授权 : (C) Copyright (c) 2011 <br>
* 公司 : 北京中交慧联信息科技有限公司 <br>
* ----------------------------------------------------------------------------- <br>
* 修改历史 <br>
* <table width="432" border="1">
* <tr>
* <td>版本</td>
* <td>时间</td>
* <td>作者</td>
* <td>改变</td>
* </tr>
* <tr>
* <td>1.0</td>
* <td>2014-11-5</td>
* <td>xuehui</td>
* <td>创建</td>
* </tr>
* </table>
* <br>
* <font color="#FF0000">注意: 本内容仅限于[北京中交慧联信息科技有限公司]内部使用,禁止转发</font> <br>
*
* @version 1.0
*
* @author xuehui
* @since JDK1.6
*/
public class TbVehicleModels implements Serializable {
/** */
private static final long serialVersionUID = -3650287222202590535L;
/** 车型档案ID */
private String vmId;
/** 数据来源,关联字典码表 */
private String dataSource;
/** 车辆品牌,关联字典码表 */
private String vBrand;
/** 车型类别,关联字典码表 */
private String vmType;
/** 车型分类,字典 */
private String vmClass;
/** 车型编号 */
private String vmCode;
/** 车型名称 */
private String vmName;
/** 备注 */
private String remark;
/** 外出里程单价---宇通 */
private BigDecimal outPrice;
/** 外出里程单价(特殊)---宇通 */
private BigDecimal outSpecialPrice;
/** 可售车型---宇通 */
private String vSaleType;
/** 报到单价---宇通 */
private BigDecimal reportPrice;
/** 特殊里程单价时间(开始)---宇通 */
private String beginDate;
/** 特殊里程单价时间(结束)---宇通 */
private String endDate;
/** 保养单价---宇通 */
private BigDecimal repairPrice;
/** 删除标记,0为删除,1未删除 默认1 */
private String enableFlag;
/** 状态 0,停用 1,启用 */
private String status;
/** 最后编辑时间 */
private Long updateTime;
/** 创建人,关联人员表 */
private String createBy;
/** 创建时间 */
private Long createTime;
/** 最后编辑人,关联人员表 */
private String updateBy;
/** 服务站id,云平台用 */
private String serStationId;
/** 帐套id,云平台用 */
private String setBookId;
/** 宇通CRMid */
private String modelsCrmId;
public String getSerStationId() {
return serStationId;
}
public void setSerStationId(String serStationId) {
this.serStationId = serStationId;
}
public String getSetBookId() {
return setBookId;
}
public void setSetBookId(String setBookId) {
this.setBookId = setBookId;
}
public String getVmId() {
return vmId;
}
public void setVmId(String vmId) {
this.vmId = vmId;
}
public String getDataSource() {
return dataSource;
}
public void setDataSource(String dataSource) {
this.dataSource = dataSource;
}
public String getVBrand() {
return vBrand;
}
public void setVBrand(String vBrand) {
this.vBrand = vBrand;
}
public String getVmType() {
return vmType;
}
public void setVmType(String vmType) {
this.vmType = vmType;
}
public String getVmClass() {
return vmClass;
}
public void setVmClass(String vmClass) {
this.vmClass = vmClass;
}
public String getVmCode() {
return vmCode;
}
public void setVmCode(String vmCode) {
this.vmCode = vmCode;
}
public String getVmName() {
return vmName;
}
public void setVmName(String vmName) {
this.vmName = vmName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public BigDecimal getOutPrice() {
return outPrice;
}
public void setOutPrice(BigDecimal outPrice) {
this.outPrice = outPrice;
}
public BigDecimal getOutSpecialPrice() {
return outSpecialPrice;
}
public void setOutSpecialPrice(BigDecimal outSpecialPrice) {
this.outSpecialPrice = outSpecialPrice;
}
public String getVSaleType() {
return vSaleType;
}
public void setVSaleType(String vSaleType) {
this.vSaleType = vSaleType;
}
public BigDecimal getReportPrice() {
return reportPrice;
}
public void setReportPrice(BigDecimal reportPrice) {
this.reportPrice = reportPrice;
}
public String getBeginDate() {
return beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public BigDecimal getRepairPrice() {
return repairPrice;
}
public void setRepairPrice(BigDecimal repairPrice) {
this.repairPrice = repairPrice;
}
public String getEnableFlag() {
return enableFlag;
}
public void setEnableFlag(String enableFlag) {
this.enableFlag = enableFlag;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Long getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Long updateTime) {
this.updateTime = updateTime;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public String getModelsCrmId() {
return modelsCrmId;
}
public void setModelsCrmId(String modelsCrmId) {
this.modelsCrmId = modelsCrmId;
}
} | [
"[email protected]"
] | |
a8d52a946b343b95545fdd2ad1dc56efe1a70a15 | 6a57764caa0c2652ee2334c3e9ce74536db248d7 | /Fn/src/fn/ContextFnNode.java | ad586ee2e8c60b336941f9fc1476a01410eefa38 | [] | no_license | calvinashmore/painter | 2da46d3b7f55b4bae849d645cafee74fea2ae50d | bb25d9cb02ecb347e13e96247e11fcbb14290116 | refs/heads/master | 2021-03-12T23:59:20.720280 | 2011-09-22T17:28:56 | 2011-09-22T17:28:56 | 26,514,507 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,555 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fn;
import fn.parser.ASTBlock;
import fn.parser.ASTFnDefinition;
import fn.parser.ASTFnDefinition.TypeAndName;
import fn.parser.Token;
import java.util.ArrayList;
import java.util.List;
import jd.ClassDescriptor;
import jd.CodeBlockDescriptor;
import jd.CodeStringDescriptor;
import jd.MethodDescriptor;
/**
*
* @author Calvin Ashmore
*/
abstract public class ContextFnNode extends FnNode {
public ContextFnNode(ASTFnDefinition fn) {
super(fn);
}
@Override
ClassDescriptor make_class() {
ClassDescriptor c = super.make_class();
if (hasContextVariables()) {
c.addMethod(make_getNumberContextVariables());
c.addMethod(make_getContextVariableIntendedName());
c.addMethod(make_getContextVariableType());
}
return c;
}
String convertContextVariables(ASTBlock execBlock) {
StringBuffer sb = new StringBuffer();
List<String> cvNames = new ArrayList();
//List<TypeAndName> cvs = new ArrayList<TypeAndName>();
for (TypeAndName cv : getFn().getTypeAndNames("cvar")) {
cvNames.add(cv.getName());
}
//cvs.add(cv)
Token currentToken;
if (execBlock.firstToken.next == execBlock.lastToken) {
return "";
}
// first to last exclusive, ignore "{" "}"
for (currentToken = execBlock.firstToken.next; currentToken.next != execBlock.lastToken; currentToken = currentToken.next) {
// see if the context variable is used.
if (cvNames.contains(currentToken.image)) {
if (currentToken.next.image.equals("=")) {
String cvName = currentToken.image;
StringBuffer assignment = new StringBuffer();
Token assignToken;
for (assignToken = currentToken.next.next; !assignToken.image.equals(";"); assignToken = assignToken.next) {
assignment.append(assignToken.image + " ");
}
currentToken = assignToken;
sb.append(cvName + " = " + assignment + "; ");
sb.append("context.setVariable(" + "__" + cvName + ", " + cvName + ");");
} else {
sb.append(currentToken.image);
}
} else {
sb.append(currentToken.image);
}
if (currentToken.image.equals(";") || currentToken.image.equals("{") || currentToken.image.equals("}")) {
sb.append("\n");
} else {
sb.append(" ");
}
}
sb.append(currentToken.image);
// Add the last token to the image to return.
return sb.toString();
}
boolean hasContextVariables() {
return getFn().getTypeAndNames("cvar").size() > 0;
}
CodeStringDescriptor make_contextVariableDeclarations() {
StringBuffer sb = new StringBuffer();
for (TypeAndName cv : getFn().getTypeAndNames("cvar")) {
sb.append("final String __" + cv.getName() + " = getContextVariableActualName(\"" + cv.getName() + "\");\n");
sb.append(cv.getType().dumpTokens() + " " + cv.getName() + ";\n");
}
return new CodeStringDescriptor(sb.toString());
}
public MethodDescriptor make_getContextVariableIntendedName() {
MethodDescriptor method = new MethodDescriptor("getContextVariableIntendedName");
method.addModifier("public");
method.addModifier("String");
method.addArgument("int", "i");
// switch on parameters
CodeBlockDescriptor block = new CodeBlockDescriptor();
block.setBlockHeader("switch(i) {");
int i = 0;
for (TypeAndName contextVariable : getFn().getTypeAndNames("cvar")) {
block.addToBlockBody(new CodeStringDescriptor("case " + i + ": return \"" + contextVariable.getName() + "\";\n"));
i++;
}
block.addToBlockBody(new CodeStringDescriptor("default: return null;\n"));
block.setBlockFooter("}");
method.addToBlockBody(block);
return method;
}
public MethodDescriptor make_getContextVariableType() {
MethodDescriptor method = new MethodDescriptor("getContextVariableType");
method.addModifier("public");
method.addModifier("Class");
method.addArgument("int", "i");
// switch on parameters
CodeBlockDescriptor block = new CodeBlockDescriptor();
block.setBlockHeader("switch(i) {");
int i = 0;
for (TypeAndName contextVariable : getFn().getTypeAndNames("cvar")) {
block.addToBlockBody(new CodeStringDescriptor("case " + i + ": return " + contextVariable.getType().dumpTokens() + ".class;\n"));
i++;
}
block.addToBlockBody(new CodeStringDescriptor("default: return null;\n"));
block.setBlockFooter("}");
method.addToBlockBody(block);
return method;
}
public MethodDescriptor make_getNumberContextVariables() {
MethodDescriptor method = new MethodDescriptor("getNumberContextVariables");
method.addModifier("public");
method.addModifier("int");
int numberContextVariables = getFn().getTypeAndNames("cvar").size();
method.addToBlockBody(new CodeStringDescriptor("return " + numberContextVariables + ";"));
return method;
}
}
| [
"ashmore@a3f7fd50-973e-0410-8b28-ed0ccb69969c"
] | ashmore@a3f7fd50-973e-0410-8b28-ed0ccb69969c |
4977a09e2ba8c88daeb283201e201bf24b24264e | 9630c7c54e36bf6f1e5f6921f0890f9725f972b9 | /src/main/java/com/jxf/task/tasks/trans/ImportUpdateMemberMsgTask4.java | 4b8373b65fdb225c80d78b067abd17e7fdf858f2 | [] | no_license | happyjianguo/wyjt | df1539f6227ff38b7b7990fb0c56d20105d9c0b1 | a5de0f17db2e5e7baf25ea72159e100c656920ea | refs/heads/master | 2022-11-18T01:16:29.783973 | 2020-07-14T10:32:42 | 2020-07-14T10:32:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 562 | java | package com.jxf.task.tasks.trans;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import com.jxf.transplantation.temp.message.ImportUpdateMessageUtils4;
/**
* 导入好友数据
*
* @author wo
*/
@DisallowConcurrentExecution
public class ImportUpdateMemberMsgTask4 implements Job {
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
ImportUpdateMessageUtils4.importMessage();
}
} | [
"[email protected]"
] | |
398707076586a30a1468f4e6b6e7974ecf3ac035 | 128da67f3c15563a41b6adec87f62bf501d98f84 | /com/emt/proteus/duchampopt/__tcf_25139.java | 45bd99f67f649dac83ea256ac892d4e7a784f969 | [] | no_license | Creeper20428/PRT-S | 60ff3bea6455c705457bcfcc30823d22f08340a4 | 4f6601fb0dd00d7061ed5ee810a3252dcb2efbc6 | refs/heads/master | 2020-03-26T03:59:25.725508 | 2018-08-12T16:05:47 | 2018-08-12T16:05:47 | 73,244,383 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,639 | java | /* */ package com.emt.proteus.duchampopt;
/* */
/* */ import com.emt.proteus.runtime.api.Env;
/* */ import com.emt.proteus.runtime.api.Frame;
/* */ import com.emt.proteus.runtime.api.Function;
/* */ import com.emt.proteus.runtime.api.ImplementedFunction;
/* */ import com.emt.proteus.runtime.library.strings._ZNSsD1Ev;
/* */
/* */ public final class __tcf_25139 extends ImplementedFunction
/* */ {
/* */ public static final int FNID = 1600;
/* 12 */ public static final Function _instance = new __tcf_25139();
/* 13 */ public final Function resolve() { return _instance; }
/* */
/* 15 */ public __tcf_25139() { super("__tcf_25139", 1, false); }
/* */
/* */ public int execute(int paramInt)
/* */ {
/* 19 */ call(paramInt);
/* 20 */ return 0;
/* */ }
/* */
/* */ public int execute(Env paramEnv, Frame paramFrame, int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4)
/* */ {
/* 25 */ int i = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 26 */ paramInt4 += 2;
/* 27 */ paramInt3--;
/* 28 */ call(i);
/* 29 */ return paramInt4;
/* */ }
/* */
/* */
/* */
/* */
/* */ public static void call(int paramInt)
/* */ {
/* */ try
/* */ {
/* 39 */ _ZNSsD1Ev.call(463680);
/* 40 */ return;
/* */ }
/* */ finally {}
/* */ }
/* */ }
/* Location: /home/jkim13/Desktop/emediatrack/codejar_s.jar!/com/emt/proteus/duchampopt/__tcf_25139.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"[email protected]"
] | |
8b817d2ab164885d1ec602a6323887b1f993d90d | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MATH-70b-1-25-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/math/analysis/solvers/BisectionSolver_ESTest.java | a75bf1827d26a786399574ef1f85710c2b7ae905 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,157 | java | /*
* This file was automatically generated by EvoSuite
* Sun Apr 05 13:27:00 UTC 2020
*/
package org.apache.commons.math.analysis.solvers;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.analysis.solvers.BisectionSolver;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class BisectionSolver_ESTest extends BisectionSolver_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
BisectionSolver bisectionSolver0 = new BisectionSolver();
UnivariateRealFunction univariateRealFunction0 = mock(UnivariateRealFunction.class, new ViolatedAssumptionAnswer());
// Undeclared exception!
bisectionSolver0.solve(univariateRealFunction0, (-490.0), 1.0E-14, 2218.8437910497);
}
}
| [
"[email protected]"
] | |
eaacee027b80cb58005594b1747c7f703c617b3a | 2577325d9ffd99ecbf569648d2315e08368c476f | /RushuWechatCP/src/main/java/com/rushucloud/wechat/cp/Application.java | 63973565cd88c02540cb77f158837e2d31778205 | [
"Unlicense"
] | permissive | yangboz/north-american-adventure | b1f69b283241984bccfc3d9be1ccd3711b1d0356 | 544c89fac8c861216c40bef01badeade65409a23 | refs/heads/master | 2021-03-19T07:07:18.855860 | 2015-04-10T12:47:33 | 2015-04-10T12:47:33 | 23,430,933 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,196 | java | package com.rushucloud.wechat.cp;
import java.util.List;
import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.cp.api.WxCpInMemoryConfigStorage;
import me.chanjar.weixin.cp.api.WxCpServiceImpl;
import me.chanjar.weixin.cp.bean.WxCpMessage;
import me.chanjar.weixin.cp.bean.WxCpUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.context.annotation.ComponentScan;
@ComponentScan
@EnableAutoConfiguration
public class Application {
private static Logger LOG = LoggerFactory.getLogger(Application.class);
public static void main(String[] args) throws WxErrorException {
SpringApplication.run(Application.class, args);
// Wechat-CP testing code here:
// @see:
// https://github.com/chanjarster/weixin-java-tools/wiki/CP_Quick-Start
WxCpInMemoryConfigStorage config = new WxCpInMemoryConfigStorage();
config.setCorpId("wxdb1834a05c43e4fa"); // 设置微信企业号的appid
config.setCorpSecret("Yzo8BH1brF7J-pe1wndApJTWrJe73DaAYTpBpk0-DuTPCSPWShK7WD0l4Nrhr-pu"); // 设置微信企业号的app
// corpSecret
config.setAgentId("2"); // 设置微信企业号应用ID
config.setToken("TzAPtuMryApadDWWmGHo"); // 设置微信企业号应用的token
config.setAesKey("eHOhWSIZIkkMjxB440hSTEkyMwH4Amkqwm7Prw8XSCt"); // 设置微信企业号应用的EncodingAESKey
WxCpServiceImpl wxCpService = new WxCpServiceImpl();
wxCpService.setWxCpConfigStorage(config);
LOG.info("wxDepartGet:"+wxCpService.departGet().toString());
List<WxCpUser> users = wxCpService.departGetUsers(1, true, 1);
for(int i=0;i<users.size();i++)
{
LOG.info("wxDepartGetUser["+i+":"+users.get(i).toJson().toString());
}
// String userId = "yangbozhou";
// WxCpMessage message = WxCpMessage.TEXT().agentId("2")
// .toParty("1")
// .toUser(userId)
// .content("Foo bar!").build();
// try {
// LOG.info("wxMessageSend:"+message.toJson().toString());
// wxCpService.messageSend(message);
// } catch (WxErrorException e) {
// LOG.error(e.toString());
// }
}
}
| [
"[email protected]"
] | |
11a517ce74978f233fdd7d19c567970bb74b70bd | ebff50ab6612e289f04181d92d1ce94769873240 | /java/com/google/gerrit/server/change/AbandonUtil.java | f505f6d1d2bc2db9748b70780ee629f26dd22453 | [
"Apache-2.0"
] | permissive | ycj211/gerrit_chinese | 9a2b3bdb84a130293f92e776471145286aeabe43 | 6daa275bb3337f7e4c277740319826ba0829646f | refs/heads/master | 2022-12-14T00:11:08.778824 | 2019-01-21T00:54:23 | 2019-01-21T00:54:23 | 166,319,815 | 0 | 1 | Apache-2.0 | 2022-11-28T13:41:22 | 2019-01-18T00:56:53 | Java | UTF-8 | Java | false | false | 4,892 | java | // Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.server.change;
import com.google.common.collect.ImmutableListMultimap;
import com.google.common.collect.ListMultimap;
import com.google.common.flogger.FluentLogger;
import com.google.gerrit.index.query.QueryParseException;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gerrit.server.InternalUser;
import com.google.gerrit.server.config.ChangeCleanupConfig;
import com.google.gerrit.server.query.change.ChangeData;
import com.google.gerrit.server.query.change.ChangeQueryBuilder;
import com.google.gerrit.server.query.change.ChangeQueryProcessor;
import com.google.gerrit.server.update.BatchUpdate;
import com.google.gwtorm.server.OrmException;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.TimeUnit;
@Singleton
public class AbandonUtil {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
private final ChangeCleanupConfig cfg;
private final Provider<ChangeQueryProcessor> queryProvider;
private final ChangeQueryBuilder queryBuilder;
private final BatchAbandon batchAbandon;
private final InternalUser internalUser;
@Inject
AbandonUtil(
ChangeCleanupConfig cfg,
InternalUser.Factory internalUserFactory,
Provider<ChangeQueryProcessor> queryProvider,
ChangeQueryBuilder queryBuilder,
BatchAbandon batchAbandon) {
this.cfg = cfg;
this.queryProvider = queryProvider;
this.queryBuilder = queryBuilder;
this.batchAbandon = batchAbandon;
internalUser = internalUserFactory.create();
}
public void abandonInactiveOpenChanges(BatchUpdate.Factory updateFactory) {
if (cfg.getAbandonAfter() <= 0) {
return;
}
try {
String query =
"status:new age:" + TimeUnit.MILLISECONDS.toMinutes(cfg.getAbandonAfter()) + "m";
if (!cfg.getAbandonIfMergeable()) {
query += " -is:mergeable";
}
List<ChangeData> changesToAbandon =
queryProvider.get().enforceVisibility(false).query(queryBuilder.parse(query)).entities();
ImmutableListMultimap.Builder<Project.NameKey, ChangeData> builder =
ImmutableListMultimap.builder();
for (ChangeData cd : changesToAbandon) {
builder.put(cd.project(), cd);
}
int count = 0;
ListMultimap<Project.NameKey, ChangeData> abandons = builder.build();
String message = cfg.getAbandonMessage();
for (Project.NameKey project : abandons.keySet()) {
Collection<ChangeData> changes = getValidChanges(abandons.get(project), query);
try {
batchAbandon.batchAbandon(updateFactory, project, internalUser, changes, message);
count += changes.size();
} catch (Throwable e) {
StringBuilder msg = new StringBuilder("Failed to auto-abandon inactive change(s):");
for (ChangeData change : changes) {
msg.append(" ").append(change.getId().get());
}
msg.append(".");
logger.atSevere().withCause(e).log(msg.toString());
}
}
logger.atInfo().log("Auto-Abandoned %d of %d changes.", count, changesToAbandon.size());
} catch (QueryParseException | OrmException e) {
logger.atSevere().withCause(e).log(
"Failed to query inactive open changes for auto-abandoning.");
}
}
private Collection<ChangeData> getValidChanges(Collection<ChangeData> changes, String query)
throws OrmException, QueryParseException {
Collection<ChangeData> validChanges = new ArrayList<>();
for (ChangeData cd : changes) {
String newQuery = query + " change:" + cd.getId();
List<ChangeData> changesToAbandon =
queryProvider
.get()
.enforceVisibility(false)
.query(queryBuilder.parse(newQuery))
.entities();
if (!changesToAbandon.isEmpty()) {
validChanges.add(cd);
} else {
logger.atFine().log(
"Change data with id \"%s\" does not satisfy the query \"%s\""
+ " any more, hence skipping it in clean up",
cd.getId(), query);
}
}
return validChanges;
}
}
| [
"[email protected]"
] | |
b1b41171060db740190b044eb5d893dcb2fe24b1 | 6345f2e959be705441fb63f8cfbaee4d1e8bdf3a | /src/org/iplantcollaborative/AccessPermissionCache.java | 8bbdb1806d6ba51a5e60927fced723ffe4724063 | [
"Apache-2.0"
] | permissive | iychoi/iPlantBorderMessageServer | a93ca6eee61bc33a903be20d98957ffa6773f887 | cbb540202d5a222339b689c79622a7cceddbcb4f | refs/heads/master | 2021-01-18T23:55:58.081587 | 2016-07-26T02:04:16 | 2016-07-26T02:04:16 | 46,043,496 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,677 | java | /*
* Copyright 2015 iychoi.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.iplantcollaborative;
import java.util.Objects;
import org.apache.commons.collections4.map.LRUMap;
/**
*
* @author iychoi
*/
public class AccessPermissionCache {
private static final int DEFAULT_CACHE_SIZE = 100000;
private LRUMap<AccessPermissionKey, Boolean> cache = new LRUMap<AccessPermissionKey, Boolean>(DEFAULT_CACHE_SIZE);
public static class AccessPermissionKey {
private String userId;
private String path;
public AccessPermissionKey(String userId, String path) {
this.userId = userId;
this.path = path;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
@Override
public int hashCode() {
return this.userId.hashCode() ^ this.path.hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final AccessPermissionKey other = (AccessPermissionKey) obj;
if (!Objects.equals(this.userId, other.userId)) {
return false;
}
if (!Objects.equals(this.path, other.path)) {
return false;
}
return true;
}
@Override
public String toString() {
return this.userId + "@" + this.path;
}
}
public AccessPermissionCache() {
}
public void cache(AccessPermissionKey key, Boolean allowed) {
this.cache.put(key, allowed);
}
public Boolean get(AccessPermissionKey key) {
return this.cache.get(key);
}
public void clearCache() {
this.cache.clear();
}
}
| [
"[email protected]"
] | |
cacb514a4788fb1bed7cb42e4e85b03fddeb15e4 | 4da9097315831c8639a8491e881ec97fdf74c603 | /src/StockIT-v2-release_source_from_JADX/sources/com/google/android/gms/internal/vision/zzq.java | 45f8ae2b18cca9dee50fef4dcecac0280840f99e | [
"Apache-2.0"
] | permissive | atul-vyshnav/2021_IBM_Code_Challenge_StockIT | 5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1 | 25c26a4cc59a3f3e575f617b59acc202ee6ee48a | refs/heads/main | 2023-08-11T06:17:05.659651 | 2021-10-01T08:48:06 | 2021-10-01T08:48:06 | 410,595,708 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,202 | java | package com.google.android.gms.internal.vision;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import com.facebook.imagepipeline.common.RotationOptions;
/* compiled from: com.google.android.gms:play-services-vision-common@@19.0.0 */
public final class zzq {
public static Bitmap zzb(Bitmap bitmap, zzp zzp) {
int i;
int width = bitmap.getWidth();
int height = bitmap.getHeight();
if (zzp.rotation != 0) {
Matrix matrix = new Matrix();
int i2 = zzp.rotation;
if (i2 == 0) {
i = 0;
} else if (i2 == 1) {
i = 90;
} else if (i2 == 2) {
i = RotationOptions.ROTATE_180;
} else if (i2 == 3) {
i = 270;
} else {
throw new IllegalArgumentException("Unsupported rotation degree.");
}
matrix.postRotate((float) i);
bitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, false);
}
if (zzp.rotation == 1 || zzp.rotation == 3) {
zzp.width = height;
zzp.height = width;
}
return bitmap;
}
}
| [
"[email protected]"
] | |
a7e72f637f0a188534ad8a72730140ae5c48fccb | 6252c165657baa6aa605337ebc38dd44b3f694e2 | /org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-800-Files/boiler-To-Generate-800-Files/syncregions-800Files/BoilerActuator1639.java | d5fe54758ff935d0da8e7426f24e903143056d05 | [] | no_license | soha500/EglSync | 00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638 | 55101bc781349bb14fefc178bf3486e2b778aed6 | refs/heads/master | 2021-06-23T02:55:13.464889 | 2020-12-11T19:10:01 | 2020-12-11T19:10:01 | 139,832,721 | 0 | 1 | null | 2019-05-31T11:34:02 | 2018-07-05T10:20:00 | Java | UTF-8 | Java | false | false | 263 | java | package syncregions;
public class BoilerActuator1639 {
public execute(int temperatureDifference1639, boolean boilerStatus1639) {
//sync _bfpnGUbFEeqXnfGWlV1639, behaviour
Half Change - return temperature - targetTemperature;
//endSync
}
}
| [
"[email protected]"
] | |
51632b3066c88d94b5458fe13cf02788599083ea | 208ba847cec642cdf7b77cff26bdc4f30a97e795 | /fg/fd/src/main/java/org.wp.fd/widgets/WPAlertDialogFragment.java | 784254ae7484c64198c5b60b320837b353bc4887 | [] | no_license | kageiit/perf-android-large | ec7c291de9cde2f813ed6573f706a8593be7ac88 | 2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8 | refs/heads/master | 2021-01-12T14:00:19.468063 | 2016-09-27T13:10:42 | 2016-09-27T13:10:42 | 69,685,305 | 0 | 0 | null | 2016-09-30T16:59:49 | 2016-09-30T16:59:48 | null | UTF-8 | Java | false | false | 5,790 | java | package org.wp.fd.widgets;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import org.wp.fd.R;
import org.wp.fd.WordPress;
import org.wp.fd.util.StringUtils;
public class WPAlertDialogFragment extends DialogFragment implements DialogInterface.OnClickListener {
private static enum WPAlertDialogType {ALERT, // simple ok dialog with error message
CONFIRM, // dialog with yes/no and callback when positive button clicked
URL_INFO} // info dialog that shows url when positive button clicked
private static final String ARG_TITLE = "title";
private static final String ARG_MESSAGE = "message";
private static final String ARG_TYPE = "type";
private static final String ARG_INFO_TITLE = "info-title";
private static final String ARG_INFO_URL = "info-url";
public interface OnDialogConfirmListener {
public void onDialogConfirm();
}
public static WPAlertDialogFragment newAlertDialog(String message) {
String title = WordPress.getContext().getString(R.string.error_generic);
return newAlertDialog(title, message);
}
public static WPAlertDialogFragment newAlertDialog(String title, String message) {
return newInstance(title, message, WPAlertDialogType.ALERT, null, null);
}
public static WPAlertDialogFragment newConfirmDialog(String title,
String message) {
return newInstance(title, message, WPAlertDialogType.CONFIRM, null, null);
}
public static WPAlertDialogFragment newUrlInfoDialog(String title,
String message,
String infoTitle,
String infoUrl) {
return newInstance(title, message, WPAlertDialogType.URL_INFO, infoTitle, infoUrl);
}
private static WPAlertDialogFragment newInstance(String title,
String message,
WPAlertDialogType alertType,
String infoTitle,
String infoUrl) {
WPAlertDialogFragment dialog = new WPAlertDialogFragment();
Bundle bundle = new Bundle();
bundle.putString(ARG_TITLE, StringUtils.notNullStr(title));
bundle.putString(ARG_MESSAGE, StringUtils.notNullStr(message));
bundle.putSerializable(ARG_TYPE, (alertType != null ? alertType : WPAlertDialogType.ALERT));
if (alertType == WPAlertDialogType.URL_INFO) {
bundle.putString(ARG_INFO_TITLE, StringUtils.notNullStr(infoTitle));
bundle.putString(ARG_INFO_URL, StringUtils.notNullStr(infoUrl));
}
dialog.setArguments(bundle);
return dialog;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setCancelable(true);
int style = DialogFragment.STYLE_NORMAL, theme = 0;
setStyle(style, theme);
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
Bundle bundle = getArguments();
final String title = StringUtils.notNullStr(bundle.getString(ARG_TITLE));
final String message = StringUtils.notNullStr(bundle.getString(ARG_MESSAGE));
final WPAlertDialogType dialogType;
if (bundle.containsKey(ARG_TYPE) && bundle.getSerializable(ARG_TYPE) instanceof WPAlertDialogType) {
dialogType = (WPAlertDialogType) bundle.getSerializable(ARG_TYPE);
} else {
dialogType = WPAlertDialogType.ALERT;
}
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(title);
builder.setMessage(message);
switch (dialogType) {
case ALERT:
builder.setIcon(android.R.drawable.ic_dialog_alert);
builder.setNeutralButton(R.string.ok, this);
break;
case CONFIRM:
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (getActivity() instanceof OnDialogConfirmListener) {
OnDialogConfirmListener act = (OnDialogConfirmListener) getActivity();
act.onDialogConfirm();
}
}
});
builder.setNegativeButton(R.string.no, this);
break;
case URL_INFO:
final String infoTitle = StringUtils.notNullStr(bundle.getString(ARG_INFO_TITLE));
final String infoURL = StringUtils.notNullStr(bundle.getString(ARG_INFO_URL));
builder.setPositiveButton(infoTitle, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (!TextUtils.isEmpty(infoURL))
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(infoURL)));
}
});
break;
}
return builder.create();
}
@Override
public void onClick(DialogInterface dialog, int which) {
}
}
| [
"[email protected]"
] | |
82c1fff5b84902bf75b623ebee122f6b5986a93a | 18f59c5325b32199b9da56ca9db2c23623be67f2 | /examples/group-rest-controller/rest-controller-extendable-model/src/main/java/io/rxmicro/examples/rest/controller/extendable/model/response/body_only/child_model_without_fields/grand/GrandParent.java | 736fabf06f921f0b74fe7ea33162c46781e9e463 | [
"Classpath-exception-2.0",
"SSPL-1.0",
"PostgreSQL",
"GPL-2.0-only",
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | rxmicro/rxmicro-usage | 87f6cc0fb38995b850eb2366c81ae57f3276fa65 | 57fad6d2f168dddda68c4ce38214de024c475f42 | refs/heads/master | 2022-12-23T17:56:41.534691 | 2022-12-14T17:53:12 | 2022-12-14T18:28:47 | 248,581,825 | 0 | 0 | Apache-2.0 | 2022-12-13T11:39:41 | 2020-03-19T18:56:25 | Java | UTF-8 | Java | false | false | 852 | java | /*
* Copyright (c) 2020. http://rxmicro.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.rxmicro.examples.rest.controller.extendable.model.response.body_only.child_model_without_fields.grand;
import io.rxmicro.model.BaseModel;
public class GrandParent extends BaseModel {
String grandParameter = "grandParameter";
}
| [
"[email protected]"
] | |
15f8f7c7311fbe5c656bc96059fd239e5d043f1b | b66bff974b820c9dc66651da3f1912edcf44cbc1 | /mall-mbg/src/main/java/com/mall/mbg/entity/UmsIntegrationConsumeSetting.java | 141bb3b050908133d39ccb541e5572050e4abf5d | [] | no_license | kitonGao/mall-springclound | e8c16176bb0e542210b1445548d618a46d12895d | 98b4682ce03fa21f677c06412a82d119156fe20f | refs/heads/master | 2022-07-12T18:30:54.400621 | 2020-04-20T01:51:50 | 2020-04-20T01:51:50 | 251,230,894 | 0 | 0 | null | 2022-06-21T03:05:51 | 2020-03-30T07:21:27 | Java | UTF-8 | Java | false | false | 2,201 | java | package com.mall.mbg.entity;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
public class UmsIntegrationConsumeSetting implements Serializable {
private Long id;
@ApiModelProperty(value = "每一元需要抵扣的积分数量")
private Integer deductionPerAmount;
@ApiModelProperty(value = "每笔订单最高抵用百分比")
private Integer maxPercentPerOrder;
@ApiModelProperty(value = "每次使用积分最小单位100")
private Integer useUnit;
@ApiModelProperty(value = "是否可以和优惠券同用;0->不可以;1->可以")
private Integer couponStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getDeductionPerAmount() {
return deductionPerAmount;
}
public void setDeductionPerAmount(Integer deductionPerAmount) {
this.deductionPerAmount = deductionPerAmount;
}
public Integer getMaxPercentPerOrder() {
return maxPercentPerOrder;
}
public void setMaxPercentPerOrder(Integer maxPercentPerOrder) {
this.maxPercentPerOrder = maxPercentPerOrder;
}
public Integer getUseUnit() {
return useUnit;
}
public void setUseUnit(Integer useUnit) {
this.useUnit = useUnit;
}
public Integer getCouponStatus() {
return couponStatus;
}
public void setCouponStatus(Integer couponStatus) {
this.couponStatus = couponStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", deductionPerAmount=").append(deductionPerAmount);
sb.append(", maxPercentPerOrder=").append(maxPercentPerOrder);
sb.append(", useUnit=").append(useUnit);
sb.append(", couponStatus=").append(couponStatus);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | [
"[email protected]"
] | |
71c5bf5f64c9a883f09327820ec99a473ef6675a | 34ff872e5f9bc89255c0109aa3e60e8c9fbdb869 | /dataCleaner/src/main/java/org/datacleaner/example/EmbeddedSample.java | f46289aa6f792dc621ae5d69331f62bad03b944d | [] | no_license | kylinsoong/data | abfcc5633c8341b478a06f5df0e3c5f2f95c1378 | 9b39e4872f10506b3c9ed97b3169295cb154bd83 | refs/heads/master | 2021-01-17T07:02:17.717856 | 2016-04-04T10:49:23 | 2016-04-04T10:49:23 | 11,713,447 | 0 | 5 | null | null | null | null | UTF-8 | Java | false | false | 417 | java | package org.datacleaner.example;
import org.datacleaner.bootstrap.Bootstrap;
import org.datacleaner.bootstrap.BootstrapOptions;
import org.datacleaner.bootstrap.DefaultBootstrapOptions;
public class EmbeddedSample {
public static void main(String[] args) {
BootstrapOptions bootstrapOptions = new DefaultBootstrapOptions(args);
Bootstrap bootstrap = new Bootstrap(bootstrapOptions);
bootstrap.run();
}
}
| [
"[email protected]"
] | |
bfaffa4229b5ab8b32f7edd799fa08220987e12b | b733c258761e7d91a7ef0e15ca0e01427618dc33 | /cards/src/main/java/org/rnd/jmagic/cards/AvenFisher.java | efc7060eff878b4fe8689743266c2345e11107e0 | [] | no_license | jmagicdev/jmagic | d43aa3d2288f46a5fa950152486235614c6783e6 | 40e573f8e6d1cf42603fd05928f42e7080ce0f0d | refs/heads/master | 2021-01-20T06:57:51.007411 | 2014-10-22T03:03:34 | 2014-10-22T03:03:34 | 9,589,102 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 862 | java | package org.rnd.jmagic.cards;
import static org.rnd.jmagic.Convenience.*;
import org.rnd.jmagic.engine.*;
import org.rnd.jmagic.engine.generators.*;
@Name("Aven Fisher")
@Types({Type.CREATURE})
@SubTypes({SubType.SOLDIER, SubType.BIRD})
@ManaCost("3U")
@ColorIdentity({Color.BLUE})
public final class AvenFisher extends Card
{
public static final class DeadFish extends EventTriggeredAbility
{
public DeadFish(GameState state)
{
super(state, "When Aven Fisher dies, you may draw a card.");
this.addPattern(whenThisDies());
this.addEffect(youMay(drawCards(You.instance(), 1, "Draw a card"), "You may draw a card."));
}
}
public AvenFisher(GameState state)
{
super(state);
this.setPower(2);
this.setToughness(2);
this.addAbility(new org.rnd.jmagic.abilities.keywords.Flying(state));
this.addAbility(new DeadFish(state));
}
}
| [
"robyter@gmail"
] | robyter@gmail |
0dd930761295a75fd29424f2e586bada4fafb27b | 6ad79e90644fb2a697c6b8c17bbe9cff1846015c | /teacher_model/src/main/java/hanlonglin/com/teacher_model/teaApp/TeaApplication.java | 1b359eb5042c5efdf9095aa5882e54f724be3f3f | [] | no_license | hanlonglinandroidstudys/ClassAssitant | 9734104ee7a79d650510bd31552b49cf6fbb5f8a | 0f32d6b345e9bd15c417efaca951408fc49119e2 | refs/heads/master | 2020-04-28T14:29:02.065034 | 2019-03-08T00:15:41 | 2019-03-08T00:15:41 | 175,340,260 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 963 | java | package hanlonglin.com.teacher_model.teaApp;
import android.app.Application;
import android.util.Log;
import org.litepal.LitePalApplication;
import org.litepal.crud.DataSupport;
import java.util.List;
import hanlonglin.com.common.AppData.CommonApplication;
import hanlonglin.com.common.AppData.TeaData;
import hanlonglin.com.common.database.model.Teacher;
import hanlonglin.com.common.database.util.DBTool;
import hanlonglin.com.common.database.util.PerferenceUtil;
public class TeaApplication extends CommonApplication {
@Override
public void onCreate() {
super.onCreate();
Log.e("TAG", "加载Teacher Application...");
if (PerferenceUtil.checkIsFirst(this))
DBTool.getInstance().mockData();
//模拟数据
int tid = 1;
List<Teacher> teaList = DataSupport.where("tid=?", tid + "").find(Teacher.class);
if (teaList.size() > 0)
TeaData.loginer = teaList.get(0);
}
}
| [
"[email protected]"
] | |
6e54acec76379a9a997cda08738bee594f376940 | 4473046026ff215c6c9fbb6ecd1cad9b1f95a67e | /JavaAdvanced/JavaOOPAdvanced/DependencyInversionAndInterfaceSegregationPrinciples/BoatRacingSimulator/models/engines/SterndriveEngine.java | a6e5f5beb909611f07440ea3941ca57f8acaff93 | [] | no_license | miroslavangelov/Java-Development | e105248d82dd0772902eeeefbeb2389919fec262 | 61fcc2fb8a5ae9f38647f85eb63f809e7d8df350 | refs/heads/master | 2022-12-12T04:27:27.932969 | 2019-12-08T12:38:36 | 2019-12-08T12:38:36 | 138,468,780 | 0 | 0 | null | 2022-11-24T08:50:00 | 2018-06-24T09:18:55 | Java | UTF-8 | Java | false | false | 481 | java | package JavaOOPAdvanced.DependencyInversionAndInterfaceSegregationPrinciples.BoatRacingSimulator.models.engines;;
public class SterndriveEngine extends BaseEngine {
private static final int MULTIPLIER = 7;
public SterndriveEngine(String model, int horsepower, int displacement) {
super(model, horsepower, displacement);
}
@Override
public int calculateOutput() {
return (super.getHorsepower() * MULTIPLIER) + super.getDisplacement();
}
}
| [
"[email protected]"
] | |
f0324a22f9e855d92c36f526730efa82ec005c66 | bcb9cc3f498b3803429d712c448f5ffa771eb306 | /app/src/main/java/cn/itsite/suiliao/common/Constants.java | df5ee7c4f29bde44ac88a030c95ad0a529a8b5f5 | [] | no_license | leguang/SuiLiao | 6200589e146514b0f6478338fb2afdf228cfa5ff | 8338c1fe795e2f1e2c8e07a202d881ee8c971768 | refs/heads/master | 2021-09-03T00:46:52.971044 | 2018-01-04T09:52:26 | 2018-01-04T09:52:26 | 115,178,614 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 466 | java | package cn.itsite.suiliao.common;
import cn.itsite.abase.common.BaseConstants;
/**
* Author:leguang on 2016/10/9 0009 15:49
* Email:[email protected]
*/
public class Constants extends BaseConstants {
private final String TAG = this.getClass().getSimpleName();
/**
* 不允许new
*/
private Constants() {
throw new Error("Do not need instantiate!");
}
public static final String KEY_POSITION = "key_position";
}
| [
"[email protected]"
] | |
56cfceeb68903367eb1cc3470e23f838f1f4b5f0 | ff443bad5681f9aa8868a2f4000406a1668d1da6 | /groovy-psi/src/main/java/org/jetbrains/plugins/groovy/lang/psi/dataFlow/reachingDefs/DefinitionMap.java | 8e16bf1d54711d21c8305bca627ca12667b4682c | [
"Apache-2.0"
] | permissive | consulo/consulo-groovy | db1b6108922e838b40c590ba33b495d2d7084d1d | f632985a683dfc6053f5602c50a23f619aca78cf | refs/heads/master | 2023-09-03T19:47:57.655695 | 2023-09-02T11:02:52 | 2023-09-02T11:02:52 | 14,021,532 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,417 | java | /*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.plugins.groovy.lang.psi.dataFlow.reachingDefs;
import consulo.util.collection.primitive.ints.*;
import org.jetbrains.plugins.groovy.lang.psi.controlFlow.Instruction;
import javax.annotation.Nullable;
import java.util.function.Consumer;
/**
* @author peter
*/
public class DefinitionMap
{
private final IntObjectMap<IntSet> myMap = IntMaps.newIntObjectHashMap();
public void registerDef(Instruction varInsn, int varId)
{
IntSet defs = myMap.get(varId);
if(defs == null)
{
myMap.put(varId, defs = IntSets.newHashSet());
}
else
{
defs.clear();
}
defs.add(varInsn.num());
}
public void merge(DefinitionMap map2)
{
map2.myMap.forEach(new IntObjConsumer<IntSet>()
{
public void accept(int num, IntSet defs)
{
IntSet defs2 = myMap.get(num);
if(defs2 == null)
{
defs2 = IntSets.newHashSet(defs.toArray());
myMap.put(num, defs2);
}
else
{
defs2.addAll(defs.toArray());
}
}
});
}
public boolean eq(final DefinitionMap m2)
{
if(myMap.size() != m2.myMap.size())
{
return false;
}
for(IntObjectMap.IntObjectEntry<IntSet> entry : myMap.entrySet())
{
int num = entry.getKey();
IntSet defs1 = entry.getValue();
final IntSet defs2 = m2.myMap.get(num);
if(!(defs2 != null && defs2.equals(defs1)))
{
return false;
}
}
return true;
}
public void copyFrom(DefinitionMap map, int fromIndex, int toIndex)
{
IntSet defs = map.myMap.get(fromIndex);
if(defs == null)
{
defs = IntSets.newHashSet();
}
myMap.put(toIndex, defs);
}
@Nullable
public int[] getDefinitions(int varId)
{
IntSet set = myMap.get(varId);
return set == null ? null : set.toArray();
}
public void forEachValue(Consumer<IntSet> procedure)
{
myMap.values().forEach(procedure);
}
}
| [
"[email protected]"
] | |
7d818047f1c0dfa90054d36dff6c2faea2952236 | 863acb02a064a0fc66811688a67ce3511f1b81af | /sources/com/flurry/sdk/C7386Gd.java | 754c393270fbe72dff52e114281f81970552e57a | [
"MIT"
] | permissive | Game-Designing/Custom-Football-Game | 98d33eb0c04ca2c48620aa4a763b91bc9c1b7915 | 47283462b2066ad5c53b3c901182e7ae62a34fc8 | refs/heads/master | 2020-08-04T00:02:04.876780 | 2019-10-06T06:55:08 | 2019-10-06T06:55:08 | 211,914,568 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,404 | java | package com.flurry.sdk;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.DataOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Locale;
/* renamed from: com.flurry.sdk.Gd */
public final class C7386Gd {
/* renamed from: a */
private static SimpleDateFormat f14467a = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US);
/* renamed from: b */
String f14468b;
/* renamed from: c */
long f14469c;
public C7386Gd(String str, long j) {
this.f14468b = str;
this.f14469c = j;
}
/* renamed from: a */
public final byte[] mo23824a() {
Throwable th;
DataOutputStream dataOutputStream = null;
try {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
DataOutputStream dataOutputStream2 = new DataOutputStream(byteArrayOutputStream);
try {
dataOutputStream2.writeLong(this.f14469c);
dataOutputStream2.writeUTF(this.f14468b);
dataOutputStream2.flush();
byte[] byteArray = byteArrayOutputStream.toByteArray();
C7354Ad.m16261a((Closeable) dataOutputStream2);
return byteArray;
} catch (IOException e) {
dataOutputStream = dataOutputStream2;
try {
byte[] bArr = new byte[0];
C7354Ad.m16261a((Closeable) dataOutputStream);
return bArr;
} catch (Throwable th2) {
dataOutputStream2 = dataOutputStream;
th = th2;
C7354Ad.m16261a((Closeable) dataOutputStream2);
throw th;
}
} catch (Throwable th3) {
th = th3;
C7354Ad.m16261a((Closeable) dataOutputStream2);
throw th;
}
} catch (IOException e2) {
byte[] bArr2 = new byte[0];
C7354Ad.m16261a((Closeable) dataOutputStream);
return bArr2;
}
}
public final String toString() {
StringBuilder sb = new StringBuilder();
sb.append(f14467a.format(Long.valueOf(this.f14469c)));
sb.append(": ");
sb.append(this.f14468b);
sb.append("\n");
return sb.toString();
}
}
| [
"[email protected]"
] | |
61f5d7ee8078d425ac88b9ec5d35f3e8705e83ed | d241ff38bb205942c3408bc6692ba5eb09874c34 | /src/com/sccc/entity/Admin.java | c8c51551691a67ecbba6c778a1cd1e40a9ce9dc0 | [] | no_license | Dark1X/BBSforStruts2 | 2b85f993c314715b4c1227d16891d0b0724d0570 | 48e17abd46a8316ffae0e9649eeb0647e5cd61e7 | refs/heads/master | 2021-06-17T03:56:22.775729 | 2017-04-14T03:35:30 | 2017-04-14T03:35:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 365 | java | package com.sccc.entity;
public class Admin {
private String username;
private String passwd;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPasswd() {
return passwd;
}
public void setPasswd(String passwd) {
this.passwd = passwd;
}
}
| [
"="
] | = |
40f6d49df4b458b036835594a8c994f807afdc5e | 2548d35c32b63d1b1c813702a8a739c7f0ef657e | /src/testGui/java/org/intellij/xquery/runner/ui/run/main/datasource/DataSourcesDialogGuiTest.java | 231af613921becd073b4077ce81e600a06bdf202 | [
"Apache-2.0"
] | permissive | overstory/marklogic-intellij-plugin | 5a0da9e0e2f3771fa2444e56af4e24991fd3e077 | 82a07f36b7ac79fa0b701d3caaa67846d9dce896 | refs/heads/master | 2022-05-11T07:55:04.498910 | 2020-02-20T09:37:01 | 2020-02-20T09:37:01 | 84,892,241 | 12 | 2 | Apache-2.0 | 2022-05-04T12:11:09 | 2017-03-14T01:38:44 | Java | UTF-8 | Java | false | false | 7,885 | java | /*
* Copyright 2013-2014 Grzegorz Ligas <[email protected]> and other contributors
* (see the CONTRIBUTORS file).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.intellij.xquery.runner.ui.run.main.datasource;
import net.java.openjdk.cacio.ctc.junit.CacioTestRunner;
import org.intellij.xquery.CheatingIdeaApplicationManager;
import org.intellij.xquery.runner.state.datasources.XQueryDataSourceConfiguration;
import org.intellij.xquery.runner.state.datasources.XQueryDataSourcesSettings;
import org.intellij.xquery.runner.ui.datasources.DataSourcesSettingsForm;
import org.jetbrains.annotations.NotNull;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import javax.swing.Action;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.event.ActionEvent;
import static org.mockito.BDDMockito.given;
import static org.mockito.Matchers.anyListOf;
import static org.mockito.Mockito.atLeast;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions;
/**
* User: ligasgr
* Date: 10/11/13
* Time: 00:50
*/
@RunWith(CacioTestRunner.class)
@Ignore("Temporarily switching off until I have better idea how to rewrite dialog not to be too bound to idea")
public class DataSourcesDialogGuiTest {
private JPanel parent;
private DataSourceSelector selector;
private DataSourcesSettingsForm settingsForm;
private TestDataSourcesDialog dialog;
private XQueryDataSourcesSettings dataSourceSettings;
private Object showMonitor;
@Before
public void setUp() throws Exception {
CheatingIdeaApplicationManager.removeApplication();
selector = mock(DataSourceSelector.class);
settingsForm = mock(DataSourcesSettingsForm.class);
dataSourceSettings = mock(XQueryDataSourcesSettings.class);
parent = mock(JPanel.class);
given(parent.isShowing()).willReturn(true);
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
dialog = new TestDataSourcesDialog(parent, selector, settingsForm);
}
});
showMonitor = new Object();
}
@After
public void tearDown() throws Exception {
CheatingIdeaApplicationManager.restoreApplication();
}
@Test
public void shouldDelegateCreationOfCenterPanelToSettingsForm() throws InterruptedException {
showDialog();
clickCancelButton();
performVerifications(new Runnable() {
@Override
public void run() {
verify(settingsForm).getFormComponent();
}
});
}
@Test
public void shouldUpdateDataSourceConfigurationsWithCurrentStateFromForm() throws InterruptedException {
showDialog();
clickOkButton();
performVerifications(new Runnable() {
@Override
public void run() {
verify(settingsForm, atLeastOnce()).getCurrentConfigurations();
verify(dataSourceSettings).setDataSourceConfigurations(anyListOf(XQueryDataSourceConfiguration.class));
}
});
}
@Test
public void shouldUpdateDataSourceSelectorWithCurrentConfigurations() throws InterruptedException {
showDialog();
clickOkButton();
performVerifications(new Runnable() {
@Override
public void run() {
verify(settingsForm, atLeast(2)).getCurrentConfigurations();
verify(selector).setDataSources(anyListOf(XQueryDataSourceConfiguration.class));
}
});
}
@Test
public void shouldUpdateCurrentlySelectedDataSourceWithSelectionFromDialog() throws InterruptedException {
final XQueryDataSourceConfiguration cfg = new XQueryDataSourceConfiguration();
given(settingsForm.getSelectedDataSource()).willReturn(cfg);
showDialog();
clickOkButton();
performVerifications(new Runnable() {
@Override
public void run() {
verify(settingsForm).getSelectedDataSource();
verify(selector).setSelectedDataSource(cfg);
}
});
}
@Test
public void shouldNotUpdateCurrentlySelectedDataSourceWhenNoSelectionInDialog() throws InterruptedException {
given(settingsForm.getSelectedDataSource()).willReturn(null);
showDialog();
clickOkButton();
performVerifications(new Runnable() {
@Override
public void run() {
verify(selector).setDataSources(anyListOf(XQueryDataSourceConfiguration.class));
verify(settingsForm).getSelectedDataSource();
verifyNoMoreInteractions(selector);
}
});
}
@Test
public void shouldDoNothingIfWasClosedWithClose() throws InterruptedException {
showDialog();
clickCancelButton();
performVerifications(new Runnable() {
@Override
public void run() {
verifyZeroInteractions(selector, dataSourceSettings);
}
});
}
private void clickOkButton() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
Action okAction = dialog.getOKAction();
ActionEvent event = new ActionEvent(DataSourcesDialogGuiTest.this, 0, "command");
okAction.actionPerformed(event);
}
});
}
private void clickCancelButton() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
Action cancelAction = dialog.getCancelAction();
ActionEvent event = new ActionEvent(DataSourcesDialogGuiTest.this, 0, "command");
cancelAction.actionPerformed(event);
}
});
}
private void performVerifications(Runnable verifications) throws InterruptedException {
synchronized (showMonitor) {
showMonitor.wait();
verifications.run();
}
}
private void showDialog() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
synchronized (showMonitor) {
dialog.show();
showMonitor.notify();
}
}
});
}
private class TestDataSourcesDialog extends DataSourcesDialog {
public TestDataSourcesDialog(JComponent parent, DataSourceSelector selector,
DataSourcesSettingsForm settingsForm) {
super(parent, selector, settingsForm);
}
@NotNull
@Override
public Action getOKAction() {
return super.getOKAction();
}
@NotNull
@Override
public Action getCancelAction() {
return super.getCancelAction();
}
@Override
protected XQueryDataSourcesSettings getDataSourceSettings() {
return dataSourceSettings;
}
}
}
| [
"[email protected]"
] | |
8f5e94f1d43a92df6873e6ffc53012c39e3b09ea | 63990ae44ac4932f17801d051b2e6cec4abb8ad8 | /bus-image/src/main/java/org/aoju/bus/image/nimble/opencv/J2kImageWriteParam.java | 7bd3c6ce62eec1d983a1c76d2113d8fd95c0c1a3 | [
"MIT"
] | permissive | xeon-ye/bus | 2cca99406a540cf23153afee8c924433170b8ba5 | 6e927146074fe2d23f9c9f23433faad5f9e40347 | refs/heads/master | 2023-03-16T17:47:35.172996 | 2021-02-22T10:31:48 | 2021-02-22T10:31:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,303 | java | /*********************************************************************************
* *
* The MIT License (MIT) *
* *
* Copyright (c) 2015-2021 aoju.org and other contributors. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy *
* of this software and associated documentation files (the "Software"), to deal *
* in the Software without restriction, including without limitation the rights *
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN *
* THE SOFTWARE. *
* *
********************************************************************************/
package org.aoju.bus.image.nimble.opencv;
import javax.imageio.ImageWriteParam;
import java.util.Locale;
/**
* @author Kimi Liu
* @version 6.2.0
* @since JDK 1.8+
*/
public class J2kImageWriteParam extends ImageWriteParam {
private static final String[] COMPRESSION_TYPES = {"LOSSY", "LOSSLESS"};
private int compressionRatiofactor;
public J2kImageWriteParam(Locale locale) {
super(locale);
super.canWriteCompressed = true;
super.compressionMode = MODE_EXPLICIT;
super.compressionType = "LOSSY";
super.compressionTypes = COMPRESSION_TYPES;
this.compressionRatiofactor = 10;
}
@Override
public void setCompressionType(String compressionType) {
super.setCompressionType(compressionType);
if (isCompressionLossless()) {
this.compressionRatiofactor = 0;
}
}
@Override
public boolean isCompressionLossless() {
return compressionType.equals("LOSSLESS");
}
public int getCompressionRatiofactor() {
return compressionRatiofactor;
}
public void setCompressionRatiofactor(int compressionRatiofactor) {
this.compressionRatiofactor = compressionRatiofactor;
}
}
| [
"[email protected]"
] | |
dbe3ebf0f0842b5ae044f3898faa433210bc8f5b | e050c1103f20e94b9868c8acf477a48191178d3a | /instrument-starters/opentracing-spring-cloud-mongo-starter/src/test/java/io/opentracing/contrib/spring/cloud/mongo/TracingMongoClientPostProcessorTest.java | 5979ab862939c2d6ca6c9336982d58bec4dcfc7a | [
"Apache-2.0"
] | permissive | wuyupengwoaini/java-spring-cloud | 51d99f6186c18bc4f8d8bdf6a4c9a12f26e6b752 | fe7b110d57ab2cc953a5d0a0eb6fc5895e096531 | refs/heads/master | 2020-08-10T10:42:50.104822 | 2019-10-12T09:34:25 | 2019-10-12T09:34:25 | 165,630,232 | 0 | 0 | Apache-2.0 | 2019-01-14T09:09:31 | 2019-01-14T09:09:31 | null | UTF-8 | Java | false | false | 2,112 | java | /**
* Copyright 2017-2019 The OpenTracing Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package io.opentracing.contrib.spring.cloud.mongo;
import static org.assertj.core.api.Assertions.assertThat;
import com.mongodb.MongoClient;
import com.mongodb.MongoClientOptions;
import com.mongodb.MongoClientURI;
import io.opentracing.Tracer;
import io.opentracing.contrib.mongo.TracingMongoClient;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
public class TracingMongoClientPostProcessorTest {
@Mock
private Tracer tracer;
@Mock
private TracingMongoClient tracingClient;
private TracingMongoClientPostProcessor processor;
@Before
public void setup() {
processor = new TracingMongoClientPostProcessor(tracer);
}
@Test
public void testNonMongoClientBeansAreReturnedUnaltered() {
final Object expected = new Object();
final Object actual = processor.postProcessAfterInitialization(expected, "any-bean-name");
assertThat(actual).isSameAs(expected);
}
@Test
public void testMongoClientBeansReplacedWithTracingClient() {
final MongoClient client = new MongoClient(new MongoClientURI("mongodb://localhost/test", MongoClientOptions.builder()));
final Object actual = processor.postProcessAfterInitialization(client, "any-bean-name");
assertThat(actual).isInstanceOf(TracingMongoClient.class);
}
@Test
public void testTracingMongoClientBeanNotWrapped() {
final Object actual = processor.postProcessAfterInitialization(tracingClient, "any-bean-name");
assertThat(actual).isSameAs(tracingClient);
}
}
| [
"[email protected]"
] | |
9398e7e6d64dfc7d20da531fd7782063eea3981c | fe53c7b237a65e823b0a6549ab6977690ee95321 | /src/main/java/ch/fer/epost/application/repository/UserRepository.java | 31db6b57ebd9a000fdbf5ca6ea3f6ea759d26a3b | [] | no_license | savoy750/ePostBox | 84ace59b881f02f503fb25b8f10799108f4634d0 | 0d4e3e971ed959678971ba055173deab06593802 | refs/heads/master | 2020-03-12T00:05:38.771154 | 2018-04-20T09:30:46 | 2018-04-20T09:30:46 | 130,340,956 | 0 | 0 | null | 2018-04-20T09:42:02 | 2018-04-20T09:30:43 | Java | UTF-8 | Java | false | false | 1,548 | java | package ch.fer.epost.application.repository;
import ch.fer.epost.application.domain.User;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Optional;
import java.time.Instant;
/**
* Spring Data JPA repository for the User entity.
*/
@Repository
public interface UserRepository extends JpaRepository<User, Long> {
String USERS_BY_LOGIN_CACHE = "usersByLogin";
String USERS_BY_EMAIL_CACHE = "usersByEmail";
Optional<User> findOneByActivationKey(String activationKey);
List<User> findAllByActivatedIsFalseAndCreatedDateBefore(Instant dateTime);
Optional<User> findOneByResetKey(String resetKey);
Optional<User> findOneByEmailIgnoreCase(String email);
Optional<User> findOneByLogin(String login);
@EntityGraph(attributePaths = "authorities")
Optional<User> findOneWithAuthoritiesById(Long id);
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_LOGIN_CACHE)
Optional<User> findOneWithAuthoritiesByLogin(String login);
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_EMAIL_CACHE)
Optional<User> findOneWithAuthoritiesByEmail(String email);
Page<User> findAllByLoginNot(Pageable pageable, String login);
}
| [
"[email protected]"
] | |
b1f7621968b7756d96923b11f016bc27c1a76e58 | e41507592722fd1549a9b43d7545b4d6d5d256ed | /src/main/java/org/fhir/pojo/ClaimInsuranceHelper.java | 179a580062edd022cb3902fbd0c4cd688ff72150 | [
"MIT"
] | permissive | gmai2006/fhir | a91636495409615ab41cc2a01e296cddc64159ee | 8613874a4a93a108c8520f8752155449464deb48 | refs/heads/master | 2021-05-02T07:11:25.129498 | 2021-02-26T00:17:15 | 2021-02-26T00:17:15 | 120,861,248 | 2 | 0 | null | 2020-01-14T22:16:55 | 2018-02-09T05:29:57 | Java | UTF-8 | Java | false | false | 2,194 | java | /*
* #%L
* FHIR Implementation
* %%
* Copyright (C) 2018 DataScience 9 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.
* #L%
*/
/**
* This code is 100% AUTO generated. Please do not modify it DIRECTLY
* If you need new features or function or changes please update the templates
* then submit the template through our web interface.
*/
package org.fhir.pojo;
import org.fhir.entity.ClaimInsuranceModel;
import com.google.gson.GsonBuilder;
/**
* Auto generated from the FHIR specification
* generated on 07/14/2018
*/
public class ClaimInsuranceHelper {
public static java.util.List<ClaimInsurance> fromArray2Array(java.util.List<ClaimInsuranceModel> list) {
return
list.stream()
.map(x -> new ClaimInsurance(x))
.collect(java.util.stream.Collectors.toList());
}
public static ClaimInsurance fromArray2Object(java.util.List<ClaimInsuranceModel> list) {
return new ClaimInsurance(list.get(0));
}
public static java.util.List<ClaimInsuranceModel> toModel(ClaimInsurance reference, String parentId) {
ClaimInsuranceModel model = new ClaimInsuranceModel(reference, parentId);
return java.util.Arrays.asList(new ClaimInsuranceModel[] { model });
}
public static java.util.List<ClaimInsuranceModel> toModelFromArray(java.util.List<ClaimInsurance> list, String parentId) {
return (java.util.List<ClaimInsuranceModel>)list.stream()
.map(x -> new ClaimInsuranceModel(x, parentId))
.collect(java.util.stream.Collectors.toList());
}
public static ClaimInsurance fromJson(String json) {
if (null == json) return null;
return new GsonBuilder().create().fromJson(json, ClaimInsurance.class);
}
} | [
"[email protected]"
] | |
401c0b71eecf0496858d6380d44fed3da860e526 | cdd87204a5c8576f39daa7b027406a8787ca4628 | /app/src/main/java/yc/com/pinyin_study/mine/model/engine/ShareEngine.java | 026940a224e2e81eb30da8010c7a955391911fef | [] | no_license | YangChengTeam/pingyin-study | 0016b9662088b221da627f17131336ea541ce26c | d1724abadc989e946ab6e94449aaa0106d9b4493 | refs/heads/master | 2022-02-18T11:05:13.811404 | 2022-02-11T06:07:30 | 2022-02-11T06:07:30 | 174,971,529 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 846 | java | package yc.com.pinyin_study.mine.model.engine;
import android.content.Context;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import yc.com.pinyin_study.base.model.engine.BaseEngine;
import yc.com.rthttplibrary.bean.ResultInfo;
/**
* Created by wanglin on 2019/5/10 10:32.
*/
public class ShareEngine extends BaseEngine {
public ShareEngine(Context context) {
super(context);
}
public Observable<ResultInfo<String>> share() {
// return HttpCoreEngin.get(mContext).rxpost(UrlConfig.share_reward_url, new TypeReference<ResultInfo<String>>() {
// }.getType(), null, true, true, true);
return request.share().subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
}
}
| [
"[email protected]"
] | |
8f65b53a477ebf24da0ff1e38031490a2d047b23 | 822e7f6744ae54d6405f11b75a01479849ee1ff5 | /基础/Design pattern/Factory(工厂模式)/Factory1.3/src/com/ypy/dp/factory/Apple.java | 653b8d2a2733aad54650ac1dd0f044a5f444a2c4 | [] | no_license | dl-ypy/java | 05c8c2fc21b460d33efa1e2e04a65993e7c71845 | 794be9fff1db12ca92d69b44c17f189a85e7c1dc | refs/heads/master | 2021-05-05T18:12:24.688574 | 2019-03-15T07:45:01 | 2019-03-15T07:45:01 | 106,920,362 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 132 | java | package com.ypy.dp.factory;
public class Apple extends Foot{
public void printName() {
System.out.println("apple");
}
}
| [
"[email protected]"
] | |
ed068b629ba875e6fe2d78da04d8eafcf59e8b95 | 4b5abde75a6daab68699a9de89945d8bf583e1d0 | /app-release-unsigned/sources/m/q.java | ab2be037e4377a8c07d937a1218b5ebee5d68325 | [] | no_license | agustrinaldokurniawan/News_Android_Kotlin_Mobile_Apps | 95d270d4fa2a47f599204477cb25bae7bee6e030 | a1f2e186970cef9043458563437b9c691725bcb5 | refs/heads/main | 2023-07-03T01:03:22.307300 | 2021-08-08T10:47:00 | 2021-08-08T10:47:00 | 375,330,796 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 419 | java | package m;
import h.a.t.a;
import i.q.d;
public final class q implements Runnable {
public final /* synthetic */ d e;
/* renamed from: f reason: collision with root package name */
public final /* synthetic */ Exception f3840f;
public q(d dVar, Exception exc) {
this.e = dVar;
this.f3840f = exc;
}
public final void run() {
a.z(this.e).a(a.n(this.f3840f));
}
}
| [
"[email protected]"
] | |
2539b164837ce3ab745e5cedee844b4ae98937b4 | 421f0a75a6b62c5af62f89595be61f406328113b | /generated_tests/model_seeding/83_xbus-net.sf.xbus.base.core.timeoutcall.ThreadFactoryUser-1.0-10/net/sf/xbus/base/core/timeoutcall/ThreadFactoryUser_ESTest.java | d45214bb1cf43737e77e58273b6abb27bcf921eb | [] | no_license | tigerqiu712/evosuite-model-seeding-empirical-evaluation | c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6 | 11a920b8213d9855082d3946233731c843baf7bc | refs/heads/master | 2020-12-23T21:04:12.152289 | 2019-10-30T08:02:29 | 2019-10-30T08:02:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 673 | java | /*
* This file was automatically generated by EvoSuite
* Sat Oct 26 02:16:40 GMT 2019
*/
package net.sf.xbus.base.core.timeoutcall;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class ThreadFactoryUser_ESTest extends ThreadFactoryUser_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"[email protected]"
] | |
9479e6bcf90d0d04caca123918594d2a7e80280c | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_146b2f98c2d276bcb8b7f1e6a20586a63fd3a57b/JaasTest/2_146b2f98c2d276bcb8b7f1e6a20586a63fd3a57b_JaasTest_s.java | d2757fa3979550f16eecbde1674204fd847ce133 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 2,653 | java | /**********************************************************************************
* $URL$
* $Id$
***********************************************************************************
*
* Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
*
* Licensed under the Educational Community License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/ecl1.php
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT 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 javax.security.auth.*;
import javax.security.auth.callback.*;
import javax.security.auth.login.*;
import com.sun.security.auth.callback.TextCallbackHandler;
/*
* JaasTest -- attempts to authenticate a user and reports success or an error message
* Argument: LoginContext [optional, default is "JaasAuthentication"]
* (must exist in "login configuration file" specified in ${java.home}/lib/security/java.security)
*
* Seth Theriault ([email protected])
* Academic Information Systems, Columbia University
* (based on code from various contributors)
*
*/
public class JaasTest {
public static void main(String[] args) {
String testcontext = "";
if (null == args || args.length != 1) {
testcontext = "JaasAuthentication";
} else testcontext = args[0];
System.out.println("\nLoginContext for testing: " + testcontext);
System.out.println("Enter a username and password to test this LoginContext.\n");
LoginContext lc = null;
try {
lc = new LoginContext(testcontext, new TextCallbackHandler());
} catch (LoginException le) {
System.err.println("Cannot create LoginContext. " + le.getMessage());
System.exit(-1);
} catch (SecurityException se) {
System.err.println("Cannot create LoginContext. " + se.getMessage());
System.exit(-1);
}
try {
// attempt authentication
lc.login();
lc.logout();
} catch (LoginException le) {
System.err.println("\nAuthentication FAILED.");
System.err.println("Error message:\n --> " + le.getMessage());
System.exit(-1);
}
System.out.println("Authentication SUCCEEDED.");
}
}
| [
"[email protected]"
] | |
6983c2f2027c5a135dc2dddb61f0e067a552e853 | 63e0cd899972adbb117a17d8d40eef8fefb56d62 | /spring_framework/s4-09-mongodb-oid-serialization/src/main/java/com/sc/repository/OrderRepository.java | d3ad86185672429b03d677c51c3ae7c39e05d61e | [] | no_license | sherazc/playground | 8b90e1f7b624a77a3f3e9cf5f71eecf984aa8180 | 7fe926d2564b12d96f237b253511dd7c2a302b64 | refs/heads/master | 2023-08-16T17:22:29.564713 | 2023-08-16T04:34:52 | 2023-08-16T04:34:52 | 87,116,642 | 2 | 1 | null | 2023-05-04T18:25:45 | 2017-04-03T20:15:15 | PHP | UTF-8 | Java | false | false | 303 | java | package com.sc.repository;
import java.util.List;
import com.sc.modal.Order;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;
public interface OrderRepository extends MongoRepository<Order, String> {
List<Order> findByUserId(ObjectId userId);
}
| [
"[email protected]"
] | |
1892a126bdaa7bbcd8150208f9d49463e7994003 | acae1a673e42c881fc8af74a3d1059d4130cf316 | /src/libra/common/kmermatch/KmerMatchRecordReader.java | 1ee052f580657d25e593df5bc426cc2cd50b4cb4 | [
"Apache-2.0"
] | permissive | ashwin41291/libra | db84e78848525e214c82ee7b0ea78e06b5e302d8 | c0b75cb092641bc6fc4913df2eacc3e5a67c6c77 | refs/heads/master | 2020-12-24T07:52:22.551707 | 2016-11-10T10:06:28 | 2016-11-10T10:15:31 | 73,358,917 | 0 | 0 | null | 2016-11-10T07:51:39 | 2016-11-10T07:51:38 | null | UTF-8 | Java | false | false | 2,903 | java | /*
* Copyright 2016 iychoi.
*
* 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 libra.common.kmermatch;
import java.io.IOException;
import libra.common.hadoop.io.datatypes.CompressedSequenceWritable;
import libra.preprocess.common.kmerhistogram.KmerRangePartition;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
/**
*
* @author iychoi
*/
public class KmerMatchRecordReader extends RecordReader<CompressedSequenceWritable, KmerMatchResult> {
private static final Log LOG = LogFactory.getLog(KmerMatchRecordReader.class);
private Path[] inputIndexPath;
private KmerJoiner joiner;
private Configuration conf;
private KmerMatchResult curResult;
@Override
public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException {
if(!(split instanceof KmerMatchInputSplit)) {
throw new IOException("split is not an instance of KmerMatchIndexSplit");
}
KmerMatchInputSplit kmerIndexSplit = (KmerMatchInputSplit) split;
this.conf = context.getConfiguration();
this.inputIndexPath = kmerIndexSplit.getIndexFilePath();
KmerRangePartition partition = kmerIndexSplit.getPartition();
this.joiner = new KmerJoiner(this.inputIndexPath, partition, context);
}
@Override
@SuppressWarnings("unchecked")
public boolean nextKeyValue() throws IOException, InterruptedException {
this.curResult = this.joiner.stepNext();
if(this.curResult != null) {
return true;
}
return false;
}
@Override
public CompressedSequenceWritable getCurrentKey() {
if(this.curResult != null) {
return this.curResult.getKey();
}
return null;
}
@Override
public KmerMatchResult getCurrentValue() {
return this.curResult;
}
@Override
public float getProgress() throws IOException {
return this.joiner.getProgress();
}
@Override
public synchronized void close() throws IOException {
this.joiner.close();
}
}
| [
"[email protected]"
] | |
1bd9dd1aee82c90e2792ab22fb22f35665ab28e6 | 6c1c18f95d0bfe3e300c775ecacd296cb0ec176e | /lotterylib/src/main/java/com/android/residemenu/lt_lib/enumdata/core/JczqHhdgEnum.java | cea3e1de476091b8d85606ac31f7d01b7ccc7a15 | [] | no_license | winnxiegang/save | a7ea6a3dcee7a9ebda8c6ad89957ae0e4d3c430d | 16ad3a98e8b6ab5d17acacce322dfc5e51ab3330 | refs/heads/master | 2020-03-13T04:27:26.650719 | 2018-04-26T01:18:59 | 2018-04-26T01:18:59 | 130,963,368 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,617 | java | /**
* BenchCode.com Inc.
* Copyright (c) 2005-2009 All Rights Reserved.
*/
package com.android.residemenu.lt_lib.enumdata.core;
import com.android.residemenu.lt_lib.enumdata.EnumBase;
import com.android.residemenu.lt_lib.enumdata.core.jczq.JczqScoreEnum;
import com.android.residemenu.lt_lib.utils.lang.StringUtils;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author cold
*
* @version $Id: JczqHhggOptionEnum.java, v 0.1 2013-6-1 下午04:59:05 cold Exp $
*/
public enum JczqHhdgEnum implements HhggEnum {
RQSPF_WIN("让胜", RaceResultEnum.WIN, LotterySubTypeEnum.JCZQ_RQSPF),
RQSPF_DRAW("让平", RaceResultEnum.DRAW, LotterySubTypeEnum.JCZQ_RQSPF),
RQSPF_LOST("让负", RaceResultEnum.LOST, LotterySubTypeEnum.JCZQ_RQSPF),
SPF_WIN("胜", JczqSpfEnum.SPF_WIN, LotterySubTypeEnum.JCZQ_SPF),
SPF_DRAW("平", JczqSpfEnum.SPF_DRAW, LotterySubTypeEnum.JCZQ_SPF),
SPF_LOST("负", JczqSpfEnum.SPF_LOST, LotterySubTypeEnum.JCZQ_SPF),
BF_S_1_0("1:0", JczqScoreEnum.S_1_0, LotterySubTypeEnum.JCZQ_BF),
BF_S_2_0("2:0", JczqScoreEnum.S_2_0, LotterySubTypeEnum.JCZQ_BF),
BF_S_2_1("2:1", JczqScoreEnum.S_2_1, LotterySubTypeEnum.JCZQ_BF),
BF_S_3_0("3:0", JczqScoreEnum.S_3_0, LotterySubTypeEnum.JCZQ_BF),
BF_S_3_1("3:1", JczqScoreEnum.S_3_1, LotterySubTypeEnum.JCZQ_BF),
BF_S_3_2("3:2", JczqScoreEnum.S_3_2, LotterySubTypeEnum.JCZQ_BF),
BF_S_4_0("4:0", JczqScoreEnum.S_4_0, LotterySubTypeEnum.JCZQ_BF),
BF_S_4_1("4:1", JczqScoreEnum.S_4_1, LotterySubTypeEnum.JCZQ_BF),
BF_S_4_2("4:2", JczqScoreEnum.S_4_2, LotterySubTypeEnum.JCZQ_BF),
BF_S_5_0("5:0", JczqScoreEnum.S_5_0, LotterySubTypeEnum.JCZQ_BF),
BF_S_5_1("5:1", JczqScoreEnum.S_5_1, LotterySubTypeEnum.JCZQ_BF),
BF_S_5_2("5:2", JczqScoreEnum.S_5_2, LotterySubTypeEnum.JCZQ_BF),
BF_S_W_O("胜其他", JczqScoreEnum.S_W_O, LotterySubTypeEnum.JCZQ_BF),
BF_S_0_0("0:0", JczqScoreEnum.S_0_0, LotterySubTypeEnum.JCZQ_BF),
BF_S_1_1("1:1", JczqScoreEnum.S_1_1, LotterySubTypeEnum.JCZQ_BF),
BF_S_2_2("2:2", JczqScoreEnum.S_2_2, LotterySubTypeEnum.JCZQ_BF),
BF_S_3_3("3:3", JczqScoreEnum.S_3_3, LotterySubTypeEnum.JCZQ_BF),
BF_S_D_O("平其他", JczqScoreEnum.S_D_O, LotterySubTypeEnum.JCZQ_BF),
BF_S_0_1("0:1", JczqScoreEnum.S_0_1, LotterySubTypeEnum.JCZQ_BF),
BF_S_0_2("0:2", JczqScoreEnum.S_0_2, LotterySubTypeEnum.JCZQ_BF),
BF_S_1_2("1:2", JczqScoreEnum.S_1_2, LotterySubTypeEnum.JCZQ_BF),
BF_S_0_3("0:3", JczqScoreEnum.S_0_3, LotterySubTypeEnum.JCZQ_BF),
BF_S_1_3("1:3", JczqScoreEnum.S_1_3, LotterySubTypeEnum.JCZQ_BF),
BF_S_2_3("2:3", JczqScoreEnum.S_2_3, LotterySubTypeEnum.JCZQ_BF),
BF_S_0_4("0:4", JczqScoreEnum.S_0_4, LotterySubTypeEnum.JCZQ_BF),
BF_S_1_4("1:4", JczqScoreEnum.S_1_4, LotterySubTypeEnum.JCZQ_BF),
BF_S_2_4("2:4", JczqScoreEnum.S_2_4, LotterySubTypeEnum.JCZQ_BF),
BF_S_0_5("0:5", JczqScoreEnum.S_0_5, LotterySubTypeEnum.JCZQ_BF),
BF_S_1_5("1:5", JczqScoreEnum.S_1_5, LotterySubTypeEnum.JCZQ_BF),
BF_S_2_5("2:5", JczqScoreEnum.S_2_5, LotterySubTypeEnum.JCZQ_BF),
BF_S_L_O("负其他", JczqScoreEnum.S_L_O, LotterySubTypeEnum.JCZQ_BF),
BQC_WW("胜胜", JczqHalfFullRaceResultEnum.WW, LotterySubTypeEnum.JCZQ_BQC),
BQC_WD("胜平", JczqHalfFullRaceResultEnum.WD, LotterySubTypeEnum.JCZQ_BQC),
BQC_WL("胜负", JczqHalfFullRaceResultEnum.WL, LotterySubTypeEnum.JCZQ_BQC),
BQC_DW("平胜", JczqHalfFullRaceResultEnum.DW, LotterySubTypeEnum.JCZQ_BQC),
BQC_DD("平平", JczqHalfFullRaceResultEnum.DD, LotterySubTypeEnum.JCZQ_BQC),
BQC_DL("平负", JczqHalfFullRaceResultEnum.DL, LotterySubTypeEnum.JCZQ_BQC),
BQC_LW("负胜", JczqHalfFullRaceResultEnum.LW, LotterySubTypeEnum.JCZQ_BQC),
BQC_LD("负平", JczqHalfFullRaceResultEnum.LD, LotterySubTypeEnum.JCZQ_BQC),
BQC_LL("负负", JczqHalfFullRaceResultEnum.LL, LotterySubTypeEnum.JCZQ_BQC),
JQS_G0("0球", JczqGoalsEnum.G0, LotterySubTypeEnum.JCZQ_JQS),
JQS_G1("1球", JczqGoalsEnum.G1, LotterySubTypeEnum.JCZQ_JQS),
JQS_G2("2球", JczqGoalsEnum.G2, LotterySubTypeEnum.JCZQ_JQS),
JQS_G3("3球", JczqGoalsEnum.G3, LotterySubTypeEnum.JCZQ_JQS),
JQS_G4("4球", JczqGoalsEnum.G4, LotterySubTypeEnum.JCZQ_JQS),
JQS_G5("5球", JczqGoalsEnum.G5, LotterySubTypeEnum.JCZQ_JQS),
JQS_G6("6球", JczqGoalsEnum.G6, LotterySubTypeEnum.JCZQ_JQS),
JQS_G7("7球+", JczqGoalsEnum.G7, LotterySubTypeEnum.JCZQ_JQS), ;
;
private int value;
private LotterySubTypeEnum subType;
private String message;
private EnumBase realResultEnum;
private JczqHhdgEnum(String message, EnumBase realResultEnum, LotterySubTypeEnum subType) {
this.message = message;
this.subType = subType;
this.realResultEnum = realResultEnum;
}
public static JczqHhdgEnum valueOfRealResultEnumValue(EnumBase realResultEnum) {
for (JczqHhdgEnum option : JczqHhdgEnum.values()) {
if (option.realResultEnum == realResultEnum)
return option;
}
return null;
}
public static List<JczqHhdgEnum> valueOfRealResultEnumValues(List<EnumBase> realResultEnums) {
List<JczqHhdgEnum> returnList = new ArrayList<JczqHhdgEnum>();
for (EnumBase enumBase : realResultEnums) {
returnList.add(valueOfRealResultEnumValue(enumBase));
}
return returnList;
}
/**
* 根据玩法,与真实的枚举名称获得枚举
*
* @param subType
* @param option
* @return
*/
public static JczqHhdgEnum valueOfSubTypeRealName(LotterySubTypeEnum subType, String option) {
for (JczqHhdgEnum hhdgEnum : JczqHhdgEnum.values()) {
if (hhdgEnum.subType == subType && StringUtils.equals(hhdgEnum.realResultEnum.name(), option)) {
return hhdgEnum;
}
}
return null;
}
public static List<JczqHhdgEnum> valueOfSubTypeRealNames(LotterySubTypeEnum subType, List<String> options) {
List<JczqHhdgEnum> returnList = new ArrayList<JczqHhdgEnum>();
for (String otpion : options) {
returnList.add(valueOfSubTypeRealName(subType, otpion));
}
return returnList;
}
public LotterySubTypeEnum subType() {
return this.subType;
}
/*
* (non-Javadoc)
*
* @see com.bench.common.enums.EnumBase#message()
*/
public String message() {
// TODO Auto-generated method stub
return message;
}
/*
* (non-Javadoc)
*
* @see com.bench.common.enums.EnumBase#value()
*/
public Number value() {
// TODO Auto-generated method stub
return value;
}
public EnumBase realResultEnum() {
// TODO Auto-generated method stub
return realResultEnum;
}
}
| [
"[email protected]"
] | |
6ae888b26c42b7fc58705d685df0e61328432c5a | dfdcabb891e69aaefe6aeab2304b9f4741b4a5af | /reactive-jhipster/gateway/src/main/java/com/okta/developer/gateway/aop/logging/LoggingAspect.java | 5dc04e92da8441a2ce3aebbf04a3832cc0d0a31b | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | StefanScherer/java-microservices-examples | 23a0b9aaca5ece13ca46f24bcdbb0341bf715c79 | 64df95742c71d55f297b32faa3c3789edb3aba35 | refs/heads/main | 2023-04-20T01:33:13.537920 | 2021-04-29T15:15:41 | 2021-04-29T15:15:41 | 365,267,825 | 1 | 1 | Apache-2.0 | 2021-05-07T14:56:06 | 2021-05-07T14:56:05 | null | UTF-8 | Java | false | false | 4,208 | java | package com.okta.developer.gateway.aop.logging;
import java.util.Arrays;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
import tech.jhipster.config.JHipsterConstants;
/**
* Aspect for logging execution of service and repository Spring components.
*
* By default, it only runs with the "dev" profile.
*/
@Aspect
public class LoggingAspect {
private final Environment env;
public LoggingAspect(Environment env) {
this.env = env;
}
/**
* Pointcut that matches all repositories, services and Web REST endpoints.
*/
@Pointcut(
"within(@org.springframework.stereotype.Repository *)" +
" || within(@org.springframework.stereotype.Service *)" +
" || within(@org.springframework.web.bind.annotation.RestController *)"
)
public void springBeanPointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
/**
* Pointcut that matches all Spring beans in the application's main packages.
*/
@Pointcut(
"within(com.okta.developer.gateway.repository..*)" +
" || within(com.okta.developer.gateway.service..*)" +
" || within(com.okta.developer.gateway.web.rest..*)"
)
public void applicationPackagePointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
/**
* Retrieves the {@link Logger} associated to the given {@link JoinPoint}.
*
* @param joinPoint join point we want the logger for.
* @return {@link Logger} associated to the given {@link JoinPoint}.
*/
private Logger logger(JoinPoint joinPoint) {
return LoggerFactory.getLogger(joinPoint.getSignature().getDeclaringTypeName());
}
/**
* Advice that logs methods throwing exceptions.
*
* @param joinPoint join point for advice.
* @param e exception.
*/
@AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e")
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))) {
logger(joinPoint)
.error(
"Exception in {}() with cause = \'{}\' and exception = \'{}\'",
joinPoint.getSignature().getName(),
e.getCause() != null ? e.getCause() : "NULL",
e.getMessage(),
e
);
} else {
logger(joinPoint)
.error(
"Exception in {}() with cause = {}",
joinPoint.getSignature().getName(),
e.getCause() != null ? e.getCause() : "NULL"
);
}
}
/**
* Advice that logs when a method is entered and exited.
*
* @param joinPoint join point for advice.
* @return result.
* @throws Throwable throws {@link IllegalArgumentException}.
*/
@Around("applicationPackagePointcut() && springBeanPointcut()")
public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
Logger log = logger(joinPoint);
if (log.isDebugEnabled()) {
log.debug("Enter: {}() with argument[s] = {}", joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs()));
}
try {
Object result = joinPoint.proceed();
if (log.isDebugEnabled()) {
log.debug("Exit: {}() with result = {}", joinPoint.getSignature().getName(), result);
}
return result;
} catch (IllegalArgumentException e) {
log.error("Illegal argument: {} in {}()", Arrays.toString(joinPoint.getArgs()), joinPoint.getSignature().getName());
throw e;
}
}
}
| [
"[email protected]"
] | |
976b1ba130f0e262b8578b3a3520d2ee9e43ae40 | bdcdcf52c63a1037786ac97fbb4da88a0682e0e8 | /src/test/java/io/akeyless/client/model/CreateAuthMethodEmailOutputTest.java | 01b56b685537fea7de6805085c6f773d2d4db8b9 | [
"Apache-2.0"
] | permissive | akeylesslabs/akeyless-java | 6e37d9ec59d734f9b14e475ce0fa3e4a48fc99ea | cfb00a0e2e90ffc5c375b62297ec64373892097b | refs/heads/master | 2023-08-03T15:06:06.802513 | 2023-07-30T11:59:23 | 2023-07-30T11:59:23 | 341,514,151 | 2 | 4 | Apache-2.0 | 2023-07-11T08:57:17 | 2021-02-23T10:22:38 | Java | UTF-8 | Java | false | false | 1,300 | java | /*
* Akeyless API
* The purpose of this application is to provide access to Akeyless API.
*
* The version of the OpenAPI document: 2.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.akeyless.client.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for CreateAuthMethodEmailOutput
*/
public class CreateAuthMethodEmailOutputTest {
private final CreateAuthMethodEmailOutput model = new CreateAuthMethodEmailOutput();
/**
* Model tests for CreateAuthMethodEmailOutput
*/
@Test
public void testCreateAuthMethodEmailOutput() {
// TODO: test CreateAuthMethodEmailOutput
}
/**
* Test the property 'accessId'
*/
@Test
public void accessIdTest() {
// TODO: test accessId
}
}
| [
"[email protected]"
] | |
7283954cb9a08afbcd79930bffa33e419dcc11ae | d71e879b3517cf4fccde29f7bf82cff69856cfcd | /ExtractedJars/Health_com.huawei.health/javafiles/android/support/v7/widget/helper/ItemTouchUIUtilImpl$Gingerbread.java | 1c979f650586cda77519ef25e20e641800e2d56e | [
"MIT"
] | permissive | Andreas237/AndroidPolicyAutomation | b8e949e072d08cf6c6166c3f15c9c63379b8f6ce | c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a | refs/heads/master | 2020-04-10T02:14:08.789751 | 2019-05-16T19:29:11 | 2019-05-16T19:29:11 | 160,739,088 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,191 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package android.support.v7.widget.helper;
import android.graphics.Canvas;
import android.support.v7.widget.RecyclerView;
import android.view.View;
// Referenced classes of package android.support.v7.widget.helper:
// ItemTouchUIUtil, ItemTouchUIUtilImpl
static class ItemTouchUIUtilImpl$Gingerbread
implements ItemTouchUIUtil
{
private void draw(Canvas canvas, RecyclerView recyclerview, View view, float f, float f1)
{
canvas.save();
// 0 0:aload_1
// 1 1:invokevirtual #22 <Method int Canvas.save()>
// 2 4:pop
canvas.translate(f, f1);
// 3 5:aload_1
// 4 6:fload 4
// 5 8:fload 5
// 6 10:invokevirtual #26 <Method void Canvas.translate(float, float)>
recyclerview.drawChild(canvas, view, 0L);
// 7 13:aload_2
// 8 14:aload_1
// 9 15:aload_3
// 10 16:lconst_0
// 11 17:invokevirtual #32 <Method boolean RecyclerView.drawChild(Canvas, View, long)>
// 12 20:pop
canvas.restore();
// 13 21:aload_1
// 14 22:invokevirtual #35 <Method void Canvas.restore()>
// 15 25:return
}
public void clearView(View view)
{
view.setVisibility(0);
// 0 0:aload_1
// 1 1:iconst_0
// 2 2:invokevirtual #43 <Method void View.setVisibility(int)>
// 3 5:return
}
public void onDraw(Canvas canvas, RecyclerView recyclerview, View view, float f, float f1, int i, boolean flag)
{
if(i != 2)
//* 0 0:iload 6
//* 1 2:iconst_2
//* 2 3:icmpeq 17
draw(canvas, recyclerview, view, f, f1);
// 3 6:aload_0
// 4 7:aload_1
// 5 8:aload_2
// 6 9:aload_3
// 7 10:fload 4
// 8 12:fload 5
// 9 14:invokespecial #47 <Method void draw(Canvas, RecyclerView, View, float, float)>
// 10 17:return
}
public void onDrawOver(Canvas canvas, RecyclerView recyclerview, View view, float f, float f1, int i, boolean flag)
{
if(i == 2)
//* 0 0:iload 6
//* 1 2:iconst_2
//* 2 3:icmpne 17
draw(canvas, recyclerview, view, f, f1);
// 3 6:aload_0
// 4 7:aload_1
// 5 8:aload_2
// 6 9:aload_3
// 7 10:fload 4
// 8 12:fload 5
// 9 14:invokespecial #47 <Method void draw(Canvas, RecyclerView, View, float, float)>
// 10 17:return
}
public void onSelected(View view)
{
view.setVisibility(4);
// 0 0:aload_1
// 1 1:iconst_4
// 2 2:invokevirtual #43 <Method void View.setVisibility(int)>
// 3 5:return
}
ItemTouchUIUtilImpl$Gingerbread()
{
// 0 0:aload_0
// 1 1:invokespecial #13 <Method void Object()>
// 2 4:return
}
}
| [
"[email protected]"
] | |
8182a7db5bcbb183fa9c292403c0afda4a3029ef | f164b56ed542b35b257c947b59ff79c708c72009 | /Shohan/src/shamim/interfaceimplement/App.java | c6c22881588ca1cffa5d17ed656b5f49be19bea9 | [] | no_license | MAYURIGAURAV/CoreJavaNew | f1593b27cb8800e1bd8833aec8ba495d53e21f90 | e1cd5825acde15c797c6ce9c777758a5db01bcfa | refs/heads/master | 2020-03-24T04:59:17.180787 | 2017-10-30T12:26:30 | 2017-10-30T12:26:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 790 | java | package shamim.interfaceimplement;
public class App implements InterfaceExample, InterfaceExample2 {
@Override
public void method1() {
int x = 10;
int y = 20;
int z = x+y;
System.out.println(z);
}
@Override
public void method2() {
}
public static void main(String[] args) {
App obj = new App();
obj.method1();
}
@Override
public void method3() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void method4() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
}
| [
"[email protected]"
] | |
b36049d75c488d369acf15133e9f8845fd8cd283 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/google--error-prone/d6494a8eadecc6b2e70c7976fb5256c42669cbe7/before/ErrorReporter.java | 14a4e0d8db51b5de97deb350f8e1c6aaeb0cf9fa | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 910 | java | /*
* Copyright 2011 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.errorprone;
import com.google.errorprone.checkers.ErrorChecker.AstError;
/**
* Strategies for making our errors appear to the user and break their build.
* @author [email protected] (Alex Eagle)
*/
public interface ErrorReporter {
void emitError(AstError error);
} | [
"[email protected]"
] | |
35f315cc83c2c1ab93a0c1cde66f5883b294d9a6 | b28d60148840faf555babda5ed44ed0f1b164b2c | /java/misshare_cloud-multi-tenant/common-entity/src/main/java/com/qhieco/request/web/OrderRefundRequest.java | 4e2b5d02b0d0de1eb67973f50dbac83d47f9e6d7 | [] | no_license | soon14/Easy_Spring_Backend | e2ec16afb1986ea19df70821d96edcb922d7978e | 49bceae4b0c3294945dc4ad7ff53cae586127e50 | refs/heads/master | 2020-07-26T16:12:01.337615 | 2019-04-09T08:15:37 | 2019-04-09T08:15:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 547 | java | package com.qhieco.request.web;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* @author 王宇 [email protected]
* @version 2.0.1 创建时间: 18-3-30 上午9:46
* <p>
* 类说明:
* ${description}
*/
@Data
public class OrderRefundRequest extends QueryPaged{
private String phone;
private BigDecimal feeMax;
private BigDecimal feeMin;
private String tradeNo;
private Integer state;
private List<Integer> channel;
private Long startCreateTime;
private Long endCreateTime;
}
| [
"[email protected]"
] | |
01dd1dc6fd5913d30103608ab22568960a3d93f5 | 1c9589d4e3bc1523ba1e745a2155433e4bd4b85c | /src/com/javarush/test/level36/lesson04/big01/model/ModelData.java | 9bc54948e668fedf11c19c22c120210c40057e31 | [] | no_license | Adeptius/JavaRushHomeWork | 230a7dfd48b063bf7e62d5b50e7fc3f4b529fc0a | ee587724a7d579463d5deb5211b8e2f4bf902fdb | refs/heads/master | 2020-05-22T06:42:56.780076 | 2019-09-12T15:43:25 | 2019-09-12T15:43:25 | 65,140,116 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 922 | java | package com.javarush.test.level36.lesson04.big01.model;
import com.javarush.test.level36.lesson04.big01.bean.User;
import java.util.List;
/**
* Created by Владелец on 10.08.2016.
*/
public class ModelData {
private List<User> users;
private User activeUser;
private boolean displayDeletedUserList;
public boolean isDisplayDeletedUserList() {
return displayDeletedUserList;
}
public void setDisplayDeletedUserList(boolean displayDeletedUserList) {
this.displayDeletedUserList = displayDeletedUserList;
}
public User getActiveUser()
{
return activeUser;
}
public void setActiveUser(User activeUser)
{
this.activeUser = activeUser;
}
public void setUsers(List<User> users) {
this.users = users;
}
public List<User> getUsers() {
return users;
}
}
| [
"[email protected]"
] | |
fb9ced6d1be8fa0fb0dcf2834b381e26d56de734 | 2dc55280583e54cd3745fad4145eb7a0712eb503 | /stardust-engine-base/src/main/java/org/eclipse/stardust/common/EqualPredicate.java | d6f6cc8a04d145e1c33d111b9d29cae7a4d31037 | [] | no_license | markus512/stardust.engine | 9d5f4fd7016a38c5b3a1fe09cc7a445c00a31b57 | 76e0b326446e440468b4ab54cfb8e26a6403f7d8 | refs/heads/master | 2022-02-06T23:03:21.305045 | 2016-03-09T14:56:01 | 2016-03-09T14:56:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,203 | java | /*******************************************************************************
* Copyright (c) 2015 SunGard CSA LLC and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* SunGard CSA LLC - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.eclipse.stardust.common;
/**
* This predicate accepts all elements which are equal to fixed value.
*
* @author Stephan.Born
*
* @param <E>
*/
public class EqualPredicate<E> implements Predicate<E>
{
private final E value;
/**
* Constructs predicate which accepts all elements which are equal to given value.
*
* @param value value to compare elements with
*/
public EqualPredicate(E value)
{
if (value == null)
{
new IllegalArgumentException();
}
this.value = value;
}
@Override
public boolean accept(E o)
{
return value.equals(o);
}
}
| [
"[email protected]"
] | |
ce2f8dbc9a0f2d59e06226e86449ff66a5375fb8 | e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3 | /src/chosun/ciis/se/boi/rec/SE_BOI_2700_MPART_CDCURRecord.java | 01ebb890c31f4b141ffc95e43d2a4f4e06aa78cd | [] | no_license | nosmoon/misdevteam | 4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60 | 1829d5bd489eb6dd307ca244f0e183a31a1de773 | refs/heads/master | 2020-04-15T15:57:05.480056 | 2019-01-10T01:12:01 | 2019-01-10T01:12:01 | 164,812,547 | 1 | 0 | null | null | null | null | UHC | Java | false | false | 1,414 | java | /***************************************************************************************************
* 파일명 : .java
* 기능 :
* 작성일자 :
* 작성자 : 심정보
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.se.boi.rec;
import java.sql.*;
import chosun.ciis.se.boi.dm.*;
import chosun.ciis.se.boi.ds.*;
/**
*
*/
public class SE_BOI_2700_MPART_CDCURRecord extends java.lang.Object implements java.io.Serializable{
public String dept_cd;
public String dept_nm;
public String supr_dept_cd;
public SE_BOI_2700_MPART_CDCURRecord(){}
public void setDept_cd(String dept_cd){
this.dept_cd = dept_cd;
}
public void setDept_nm(String dept_nm){
this.dept_nm = dept_nm;
}
public void setSupr_dept_cd(String supr_dept_cd){
this.supr_dept_cd = supr_dept_cd;
}
public String getDept_cd(){
return this.dept_cd;
}
public String getDept_nm(){
return this.dept_nm;
}
public String getSupr_dept_cd(){
return this.supr_dept_cd;
}
}
/* 작성시간 : Tue Dec 02 19:46:24 KST 2014 */ | [
"[email protected]"
] | |
59e4088b2ae42ee15a2b469fb86806fb0fd940f3 | 4b4df51041551c9a855468ddf1d5004a988f59a2 | /data_structure/java/dict.java | 5d5b4dc883fd93c4741106a5f52519840135bd4f | [] | no_license | yennanliu/CS_basics | 99b7ad3ef6817f04881d6a1993ec634f81525596 | 035ef08434fa1ca781a6fb2f9eed3538b7d20c02 | refs/heads/master | 2023-09-03T13:42:26.611712 | 2023-09-03T12:46:08 | 2023-09-03T12:46:08 | 66,194,791 | 64 | 40 | null | 2022-08-20T09:44:48 | 2016-08-21T11:11:35 | Python | UTF-8 | Java | false | false | 1,201 | java |
import java.util.*;
public class Dict {
public static void main(String[] args)
{
// Initializing a Dictionary
Dictionary geek = new Hashtable();
// put() method
geek.put("123", "Code");
geek.put("456", "Program");
// elements() method :
for (Enumeration i = geek.elements(); i.hasMoreElements();)
{
System.out.println("Value in Dictionary : " + i.nextElement());
}
// get() method :
System.out.println("\nValue at key = 6 : " + geek.get("6"));
System.out.println("Value at key = 456 : " + geek.get("123"));
// isEmpty() method :
System.out.println("\nThere is no key-value pair : " + geek.isEmpty() + "\n");
// keys() method :
for (Enumeration k = geek.keys(); k.hasMoreElements();)
{
System.out.println("Keys in Dictionary : " + k.nextElement());
}
// remove() method :
System.out.println("\nRemove : " + geek.remove("123"));
System.out.println("Check the value of removed key : " + geek.get("123"));
System.out.println("\nSize of Dictionary : " + geek.size());
}
}
| [
"[email protected]"
] | |
ea66269ccd099e309f686fd0bf6658cfd157be1d | 3c863b8bb0ff824777c4f46576f0aae4b13cc96f | /TestandoFor.java | fffd5b0492fa7f92bb7db4f111d1f756a084e291 | [] | no_license | adrianovp/java_19 | 3bf718d1a9ceded882dbac8ad3dd040b260e1d53 | 27809788ad1bc8edafa21f04c3814f164472c060 | refs/heads/master | 2023-05-12T01:24:24.267082 | 2021-05-26T15:15:54 | 2021-05-26T15:15:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 216 | java | public class TestandoFor{
public static void main(String args[]){
for (int valor = 1; valor <= 10 ; valor = valor + 1 ){
System.out.println("valor = "+valor);
}
}
} | [
"[email protected]"
] | |
ba5d019da7f2d9386d7b981d6cf0eedf5af17646 | 028d6009f3beceba80316daa84b628496a210f8d | /uidesigner/com.nokia.sdt.uimodel.tests/src/com/nokia/sdt/uimodel/tests/TestsPlugin.java | 4e572d1e5b366a478419fc92b95626faa7576c31 | [] | no_license | JamesLinus/oss.FCL.sftools.dev.ide.carbidecpp | fa50cafa69d3e317abf0db0f4e3e557150fd88b3 | 4420f338bc4e522c563f8899d81201857236a66a | refs/heads/master | 2020-12-30T16:45:28.474973 | 2010-10-20T16:19:31 | 2010-10-20T16:19:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,125 | java | /*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/
package com.nokia.sdt.uimodel.tests;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
import java.util.*;
/**
* The main plugin class to be used in the desktop.
*/
public class TestsPlugin extends Plugin {
//The shared instance.
private static TestsPlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
/**
* The constructor.
*/
public TestsPlugin() {
super();
plugin = this;
}
/**
* This method is called upon plug-in activation
*/
public void start(BundleContext context) throws Exception {
super.start(context);
}
/**
* This method is called when the plug-in is stopped
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
plugin = null;
resourceBundle = null;
}
/**
* Returns the shared instance.
*/
public static TestsPlugin getDefault() {
return plugin;
}
/**
* Returns the string from the plugin's resource bundle,
* or 'key' if not found.
*/
public static String getResourceString(String key) {
ResourceBundle bundle = TestsPlugin.getDefault().getResourceBundle();
try {
return (bundle != null) ? bundle.getString(key) : key;
} catch (MissingResourceException e) {
return key;
}
}
/**
* Returns the plugin's resource bundle,
*/
public ResourceBundle getResourceBundle() {
try {
if (resourceBundle == null)
resourceBundle = ResourceBundle.getBundle("com.nokia.sdt.uimodel.tests.TestsPluginResources");
} catch (MissingResourceException x) {
resourceBundle = null;
}
return resourceBundle;
}
}
| [
"[email protected]"
] | |
0495a3a4b938b9b0924bc65302565f6209e420ff | 9dfb07095844525a9d1b5a3e5de3cb840486c12b | /MinecraftServer/src/net/minecraft/util/text/TextComponentString.java | df4ca60f127711390cb74852cd4e47513ac72921 | [] | no_license | ilYYYa/ModdedMinecraftServer | 0ae1870e6ba9d388afb8fd6e866ca6a62f96a628 | 7b8143a11f848bf6411917e3d9c60b0289234a3f | refs/heads/master | 2020-12-24T20:10:30.533606 | 2017-04-03T15:32:15 | 2017-04-03T15:32:15 | 86,241,373 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,009 | java | package net.minecraft.util.text;
public class TextComponentString extends TextComponentBase
{
private final String text;
public TextComponentString(String msg)
{
this.text = msg;
}
/**
* Gets the text value of this ChatComponentText. TODO: what are getUnformattedText and getUnformattedTextForChat
* missing that made someone decide to create a third equivalent method that only ChatComponentText can implement?
*/
public String getText()
{
return this.text;
}
/**
* Gets the text of this component, without any special formatting codes added, for chat. TODO: why is this two
* different methods?
*/
public String getUnformattedComponentText()
{
return this.text;
}
/**
* Creates a copy of this component. Almost a deep copy, except the style is shallow-copied.
*/
public TextComponentString createCopy()
{
TextComponentString textcomponentstring = new TextComponentString(this.text);
textcomponentstring.setStyle(this.getStyle().createShallowCopy());
for (ITextComponent itextcomponent : this.getSiblings())
{
textcomponentstring.appendSibling(itextcomponent.createCopy());
}
return textcomponentstring;
}
public boolean equals(Object p_equals_1_)
{
if (this == p_equals_1_)
{
return true;
}
else if (!(p_equals_1_ instanceof TextComponentString))
{
return false;
}
else
{
TextComponentString textcomponentstring = (TextComponentString)p_equals_1_;
return this.text.equals(textcomponentstring.getText()) && super.equals(p_equals_1_);
}
}
public String toString()
{
return "TextComponent{text=\'" + this.text + '\'' + ", siblings=" + this.siblings + ", style=" + this.getStyle() + '}';
}
}
| [
"[email protected]"
] | |
3771d11260d6e43d69dd583e890d16afdcd8831a | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-14227-25-9-SPEA2-WeightedSum:TestLen:CallDiversity/org/xwiki/job/AbstractJob_ESTest.java | 59e0db077ec8f75bad819ed88444918ca3dc29d7 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 542 | java | /*
* This file was automatically generated by EvoSuite
* Sun Jan 19 00:11:19 UTC 2020
*/
package org.xwiki.job;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class AbstractJob_ESTest extends AbstractJob_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"[email protected]"
] | |
8f6a8455a9788a9ca43cafc587ffd2a83691a338 | 612dcd2dda7b762cec49ef740497b4481be2fdbf | /src/com/rtg/util/arithcode/Order0ModelBuilder.java | a61de0b55eb4ac4a05824aced0119120b7dacc64 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | usernamegemaoa/rtg-tools | 01c38c2d88ef318f2bddedde5bb08821f5c9d204 | eb13bbb82d2fbeab7d54a92e8493ddd2acf0d349 | refs/heads/master | 2021-01-19T21:41:59.433014 | 2016-10-17T21:47:27 | 2016-10-17T21:47:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,940 | java | /*
* Copyright (c) 2014. Real Time Genomics Limited.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.rtg.util.arithcode;
/**
*/
public class Order0ModelBuilder implements ArithModelBuilder {
private final int[] mCounts;
/**
* @param range number of different symbols > 0
*/
public Order0ModelBuilder(final int range) {
mCounts = new int[range];
}
@Override
public void add(byte[] buffer, int offset, int length) {
for (int i = offset; i < offset + length; i++) {
mCounts[buffer[i]]++;
}
}
@Override
public ArithCodeModel model() {
return new StaticModel(mCounts);
}
}
| [
"[email protected]"
] | |
683e1724d73ac8809fe09718e94894c1d41f3d4f | 64efda733945bb6b239a7f792bd26f0dcafd02c7 | /Zoo/src/codekamp/Dog.java | a5db53bd51565fb3b09c82b5a5b2cebe5c6c2438 | [] | no_license | puneetrix/java_aug | 54622cf99fb5212363a714db3a2ab27f36a89cb3 | ca5f2b4b39ec11b6e5d98e3b565734ece5185f1d | refs/heads/master | 2021-06-24T00:27:04.261701 | 2017-08-16T16:25:01 | 2017-08-16T16:25:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 485 | java | package codekamp;
/**
* Created by cerebro on 14/08/17.
*/
public class Dog extends Animal {
public void bark() {
System.out.println("Wuff Wuff");
}
public void bark(String a, int b) {
System.out.println("Wuff " + a);
}
//method overloading
public void bark(int x, String y) {
System.out.println("Wuff " + y);
}
// this is method overriding
public void walk() {
System.out.println("fire fire");
}
}
| [
"[email protected]"
] | |
28aba595db7c9ed0e0968df0f73106827a6e8468 | 12563229bd1c69d26900d4a2ea34fe4c64c33b7e | /nan21.dnet.module.md/nan21.dnet.module.md.presenter/src/main/java/net/nan21/dnet/module/md/base/tx/ds/model/PaymentMethodDs.java | b54525ba83233c7c7bbc989bb40e0b917672fa6f | [] | no_license | nan21/nan21.dnet.modules | 90b002c6847aa491c54bd38f163ba40a745a5060 | 83e5f02498db49e3d28f92bd8216fba5d186dd27 | refs/heads/master | 2023-03-15T16:22:57.059953 | 2012-08-01T07:36:57 | 2012-08-01T07:36:57 | 1,918,395 | 0 | 1 | null | 2012-07-24T03:23:00 | 2011-06-19T05:56:03 | Java | UTF-8 | Java | false | false | 1,626 | java | /*
* DNet eBusiness Suite
* Copyright: 2008-2012 Nan21 Electronics SRL. All rights reserved.
* Use is subject to license terms.
*/
package net.nan21.dnet.module.md.base.tx.ds.model;
import net.nan21.dnet.core.api.annotation.Ds;
import net.nan21.dnet.core.api.annotation.DsField;
import net.nan21.dnet.core.api.annotation.SortField;
import net.nan21.dnet.core.presenter.model.base.AbstractTypeDs;
import net.nan21.dnet.module.md.base.tx.domain.entity.PaymentMethod;
@Ds(entity = PaymentMethod.class, sort = { @SortField(field = PaymentMethodDs.fNAME) })
public class PaymentMethodDs extends AbstractTypeDs<PaymentMethod> {
public static final String fTYPE = "type";
public static final String fDOCTYPEID = "docTypeId";
public static final String fDOCTYPE = "docType";
@DsField()
private String type;
@DsField(join = "left", path = "docType.id")
private Long docTypeId;
@DsField(join = "left", path = "docType.name")
private String docType;
public PaymentMethodDs() {
super();
}
public PaymentMethodDs(PaymentMethod e) {
super(e);
}
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
public Long getDocTypeId() {
return this.docTypeId;
}
public void setDocTypeId(Long docTypeId) {
this.docTypeId = docTypeId;
}
public String getDocType() {
return this.docType;
}
public void setDocType(String docType) {
this.docType = docType;
}
}
| [
"[email protected]"
] | |
c76d413eac5d2db807d66a86695d72729454cb8f | 22e506ee8e3620ee039e50de447def1e1b9a8fb3 | /java_src/android/support/p007v4/widget/CursorFilter.java | d04e430f1302a52f6082707847834e338bba0f9a | [] | no_license | Qiangong2/GraffitiAllianceSource | 477152471c02aa2382814719021ce22d762b1d87 | 5a32de16987709c4e38594823cbfdf1bd37119c5 | refs/heads/master | 2023-07-04T23:09:23.004755 | 2021-08-11T18:10:17 | 2021-08-11T18:10:17 | 395,075,728 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,629 | java | package android.support.p007v4.widget;
import android.database.Cursor;
import android.widget.Filter;
/* renamed from: android.support.v4.widget.CursorFilter */
class CursorFilter extends Filter {
CursorFilterClient mClient;
/* renamed from: android.support.v4.widget.CursorFilter$CursorFilterClient */
interface CursorFilterClient {
void changeCursor(Cursor cursor);
CharSequence convertToString(Cursor cursor);
Cursor getCursor();
Cursor runQueryOnBackgroundThread(CharSequence charSequence);
}
CursorFilter(CursorFilterClient client) {
this.mClient = client;
}
public CharSequence convertResultToString(Object resultValue) {
return this.mClient.convertToString((Cursor) resultValue);
}
/* access modifiers changed from: protected */
public Filter.FilterResults performFiltering(CharSequence constraint) {
Cursor cursor = this.mClient.runQueryOnBackgroundThread(constraint);
Filter.FilterResults results = new Filter.FilterResults();
if (cursor != null) {
results.count = cursor.getCount();
results.values = cursor;
} else {
results.count = 0;
results.values = null;
}
return results;
}
/* access modifiers changed from: protected */
public void publishResults(CharSequence constraint, Filter.FilterResults results) {
Cursor oldCursor = this.mClient.getCursor();
if (results.values != null && results.values != oldCursor) {
this.mClient.changeCursor((Cursor) results.values);
}
}
}
| [
"[email protected]"
] | |
78d3bbf0306adbfdc11d3e7467f11da8406328bf | 32bd72a946608931d979b1f475bec15aa020edb9 | /apktool/apk/wkhelper_1.6.6.4_167/smali/android/support/v4/app/e.java | 193b561eb1c58eb359faff27d3e6c264ee0df823 | [] | no_license | Jagle/mytools | 80d3a68b3dc70cbffaf8c4f3a5e9d855734da2af | 8aef2f8400b6e9a4b0fad9292332c93f594053e6 | refs/heads/master | 2016-08-12T20:39:27.614965 | 2015-08-07T11:32:25 | 2015-08-07T11:32:25 | 36,046,910 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,416 | java | package android.support.v4.app; class e { void a() { int a;
a=0;// .class final Landroid/support/v4/app/e;
a=0;// .super Ljava/lang/Object;
a=0;//
a=0;// # interfaces
a=0;// .implements Landroid/view/ViewTreeObserver$OnPreDrawListener;
a=0;//
a=0;//
a=0;// # instance fields
a=0;// .field final synthetic a:Landroid/view/View;
a=0;//
a=0;// .field final synthetic b:Ljava/lang/Object;
a=0;//
a=0;// .field final synthetic c:Ljava/util/ArrayList;
a=0;//
a=0;// .field final synthetic d:Landroid/support/v4/app/h;
a=0;//
a=0;// .field final synthetic e:Z
a=0;//
a=0;// .field final synthetic f:Landroid/support/v4/app/Fragment;
a=0;//
a=0;// .field final synthetic g:Landroid/support/v4/app/Fragment;
a=0;//
a=0;// .field final synthetic h:Landroid/support/v4/app/c;
a=0;//
a=0;//
a=0;// # direct methods
a=0;// .method constructor <init>(Landroid/support/v4/app/c;Landroid/view/View;Ljava/lang/Object;Ljava/util/ArrayList;Landroid/support/v4/app/h;ZLandroid/support/v4/app/Fragment;Landroid/support/v4/app/Fragment;)V
a=0;// .locals 0
a=0;//
a=0;// iput-object p1, p0, Landroid/support/v4/app/e;->h:Landroid/support/v4/app/c;
a=0;//
a=0;// iput-object p2, p0, Landroid/support/v4/app/e;->a:Landroid/view/View;
a=0;//
a=0;// iput-object p3, p0, Landroid/support/v4/app/e;->b:Ljava/lang/Object;
a=0;//
a=0;// iput-object p4, p0, Landroid/support/v4/app/e;->c:Ljava/util/ArrayList;
a=0;//
a=0;// iput-object p5, p0, Landroid/support/v4/app/e;->d:Landroid/support/v4/app/h;
a=0;//
a=0;// iput-boolean p6, p0, Landroid/support/v4/app/e;->e:Z
a=0;//
a=0;// iput-object p7, p0, Landroid/support/v4/app/e;->f:Landroid/support/v4/app/Fragment;
a=0;//
a=0;// iput-object p8, p0, Landroid/support/v4/app/e;->g:Landroid/support/v4/app/Fragment;
a=0;//
a=0;// invoke-direct {p0}, Ljava/lang/Object;-><init>()V
a=0;//
a=0;// #p0=(Reference,Landroid/support/v4/app/e;);
a=0;// return-void
a=0;// .end method
a=0;//
a=0;//
a=0;// # virtual methods
a=0;// .method public final onPreDraw()Z
a=0;// .locals 4
a=0;//
a=0;// iget-object v0, p0, Landroid/support/v4/app/e;->a:Landroid/view/View;
a=0;//
a=0;// #v0=(Reference,Landroid/view/View;);
a=0;// invoke-virtual {v0}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
a=0;//
a=0;// move-result-object v0
a=0;//
a=0;// invoke-virtual {v0, p0}, Landroid/view/ViewTreeObserver;->removeOnPreDrawListener(Landroid/view/ViewTreeObserver$OnPreDrawListener;)V
a=0;//
a=0;// iget-object v0, p0, Landroid/support/v4/app/e;->b:Ljava/lang/Object;
a=0;//
a=0;// if-eqz v0, :cond_0
a=0;//
a=0;// iget-object v0, p0, Landroid/support/v4/app/e;->b:Ljava/lang/Object;
a=0;//
a=0;// iget-object v1, p0, Landroid/support/v4/app/e;->c:Ljava/util/ArrayList;
a=0;//
a=0;// #v1=(Reference,Ljava/util/ArrayList;);
a=0;// invoke-static {v0, v1}, Landroid/support/v4/app/z;->a(Ljava/lang/Object;Ljava/util/ArrayList;)V
a=0;//
a=0;// iget-object v0, p0, Landroid/support/v4/app/e;->c:Ljava/util/ArrayList;
a=0;//
a=0;// invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
a=0;//
a=0;// iget-object v0, p0, Landroid/support/v4/app/e;->h:Landroid/support/v4/app/c;
a=0;//
a=0;// iget-object v1, p0, Landroid/support/v4/app/e;->d:Landroid/support/v4/app/h;
a=0;//
a=0;// iget-boolean v2, p0, Landroid/support/v4/app/e;->e:Z
a=0;//
a=0;// #v2=(Boolean);
a=0;// iget-object v3, p0, Landroid/support/v4/app/e;->f:Landroid/support/v4/app/Fragment;
a=0;//
a=0;// #v3=(Reference,Landroid/support/v4/app/Fragment;);
a=0;// invoke-static {v0, v1, v2, v3}, Landroid/support/v4/app/c;->a(Landroid/support/v4/app/c;Landroid/support/v4/app/h;ZLandroid/support/v4/app/Fragment;)Landroid/support/v4/c/a;
a=0;//
a=0;// move-result-object v0
a=0;//
a=0;// invoke-virtual {v0}, Landroid/support/v4/c/a;->isEmpty()Z
a=0;//
a=0;// move-result v1
a=0;//
a=0;// #v1=(Boolean);
a=0;// if-eqz v1, :cond_1
a=0;//
a=0;// iget-object v1, p0, Landroid/support/v4/app/e;->c:Ljava/util/ArrayList;
a=0;//
a=0;// #v1=(Reference,Ljava/util/ArrayList;);
a=0;// iget-object v2, p0, Landroid/support/v4/app/e;->d:Landroid/support/v4/app/h;
a=0;//
a=0;// #v2=(Reference,Landroid/support/v4/app/h;);
a=0;// iget-object v2, v2, Landroid/support/v4/app/h;->d:Landroid/view/View;
a=0;//
a=0;// invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
a=0;//
a=0;// :goto_0
a=0;// iget-object v1, p0, Landroid/support/v4/app/e;->b:Ljava/lang/Object;
a=0;//
a=0;// iget-object v2, p0, Landroid/support/v4/app/e;->c:Ljava/util/ArrayList;
a=0;//
a=0;// invoke-static {v1, v2}, Landroid/support/v4/app/z;->b(Ljava/lang/Object;Ljava/util/ArrayList;)V
a=0;//
a=0;// iget-object v1, p0, Landroid/support/v4/app/e;->h:Landroid/support/v4/app/c;
a=0;//
a=0;// iget-object v2, p0, Landroid/support/v4/app/e;->d:Landroid/support/v4/app/h;
a=0;//
a=0;// invoke-static {v1, v0, v2}, Landroid/support/v4/app/c;->a(Landroid/support/v4/app/c;Landroid/support/v4/c/a;Landroid/support/v4/app/h;)V
a=0;//
a=0;// iget-object v1, p0, Landroid/support/v4/app/e;->f:Landroid/support/v4/app/Fragment;
a=0;//
a=0;// iget-object v2, p0, Landroid/support/v4/app/e;->g:Landroid/support/v4/app/Fragment;
a=0;//
a=0;// iget-boolean v3, p0, Landroid/support/v4/app/e;->e:Z
a=0;//
a=0;// #v3=(Boolean);
a=0;// invoke-static {v1, v2, v3, v0}, Landroid/support/v4/app/c;->a(Landroid/support/v4/app/Fragment;Landroid/support/v4/app/Fragment;ZLandroid/support/v4/c/a;)V
a=0;//
a=0;// :cond_0
a=0;// #v1=(Conflicted);v2=(Conflicted);v3=(Conflicted);
a=0;// const/4 v0, 0x1
a=0;//
a=0;// #v0=(One);
a=0;// return v0
a=0;//
a=0;// :cond_1
a=0;// #v0=(Reference,Landroid/support/v4/c/a;);v1=(Boolean);v2=(Boolean);v3=(Reference,Landroid/support/v4/app/Fragment;);
a=0;// iget-object v1, p0, Landroid/support/v4/app/e;->c:Ljava/util/ArrayList;
a=0;//
a=0;// #v1=(Reference,Ljava/util/ArrayList;);
a=0;// invoke-virtual {v0}, Landroid/support/v4/c/a;->values()Ljava/util/Collection;
a=0;//
a=0;// move-result-object v2
a=0;//
a=0;// #v2=(Reference,Ljava/util/Collection;);
a=0;// invoke-virtual {v1, v2}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
a=0;//
a=0;// goto :goto_0
a=0;// .end method
}}
| [
"[email protected]"
] | |
f9c1dcc25ba4dbcca5beaa66d13a4c25639669ac | edc139b0268d5568df88255df03585b5c340b8ca | /projects/org.activebpel.rt.b4p/src/org/activebpel/rt/b4p/impl/engine/AeNotification.java | beba6e593dfae3b115dad8293c8e59faced8b27f | [] | no_license | wangzm05/provenancesys | 61bad1933b2ff5398137fbbeb930a77086e8660b | 031c84095c2a7afc4873bd6ef97012831f88e5a8 | refs/heads/master | 2020-03-27T19:50:15.067788 | 2009-05-08T06:02:31 | 2009-05-08T06:02:31 | 32,144,610 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,476 | java | // $Header: /Development/AEDevelopment/projects/org.activebpel.rt.b4p/src/org/activebpel/rt/b4p/impl/engine/AeNotification.java,v 1.2 2008/02/16 22:29:48 mford Exp $
/////////////////////////////////////////////////////////////////////////////
// PROPRIETARY RIGHTS STATEMENT
// The contents of this file represent confidential information that is the
// proprietary property of Active Endpoints, Inc. Viewing or use of
// this information is prohibited without the express written consent of
// Active Endpoints, Inc. Removal of this PROPRIETARY RIGHTS STATEMENT
// is strictly forbidden. Copyright (c) 2002-2007 All rights reserved.
/////////////////////////////////////////////////////////////////////////////
package org.activebpel.rt.b4p.impl.engine;
import org.activebpel.rt.b4p.def.AePeopleActivityDef;
import org.activebpel.rt.message.IAeMessageData;
/**
* Passed to the B4P manager when a notification needs to be
* executed.
*/
public class AeNotification extends AeB4PQueueObject
{
/**
* C'tor.
*
* @param aProcessId
* @param aLocationId
* @param aLocationPath
* @param aMessageData
* @param aPeopleActivityDef
*/
public AeNotification(long aProcessId, int aLocationId, String aLocationPath, IAeMessageData aMessageData,
AePeopleActivityDef aPeopleActivityDef)
{
super(aProcessId, aLocationId, aLocationPath, aMessageData, aPeopleActivityDef);
}
}
| [
"wangzm05@ca528a1e-3b83-11de-a81c-fde7d73ceb89"
] | wangzm05@ca528a1e-3b83-11de-a81c-fde7d73ceb89 |
1647c3535b4ee12474fa8311afa32c411674b4b5 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_7722f819948c51090c0ee7b95826563f2ce161fa/BasicWebSteps/2_7722f819948c51090c0ee7b95826563f2ce161fa_BasicWebSteps_s.java | 53dbf18d7be61651a8b4b427b5d8e73b0c0ae42b | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,500 | java | package org.sukrupa.cucumber.steps;
import cuke4duke.annotation.After;
import cuke4duke.annotation.I18n.EN.Given;
import cuke4duke.annotation.I18n.EN.Then;
import cuke4duke.annotation.I18n.EN.When;
import net.sf.sahi.client.Browser;
import net.sf.sahi.client.ElementStub;
import org.sukrupa.cucumber.SahiFacade;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.*;
import static org.sukrupa.cucumber.SahiFacade.browser;
public class BasicWebSteps {
protected static final String TOP_LEVEL_DIV = "page";
@When("^I select \"([^\"]*)\" from \"([^\"]*)\"$")
public void choseFrom(String choice, String ObjectID) {
browser().byId(ObjectID).choose(choice);
}
@Then("^([^\" ]*) should contain ([^\"]*)$")
public void shouldContain(String ObjectID, String objectValueToMatch) {
String objectValue = browser().byId(ObjectID).getValue();
assertThat(objectValue, containsString(objectValueToMatch));
}
@Then("^([^\"]*) is blank")
public void shouldbeBlank(String ObjectID) {
String objectValue = browser().byId(ObjectID).getValue();
// assertThat(objectValue, is(""));
}
@Then("^\"([^\"]*)\" should not contain \"([^\"]*)\"$")
public void shouldNotContain(String ObjectID, String objectValueToMatch) {
String objectValue = browser().byId(ObjectID).getValue();
assertThat(objectValue, not(containsString(objectValueToMatch)));
}
@When("^I click \"([^\"]*)\" button$")
public void clickButton(String buttonText) {
browser().button(buttonText).click();
}
@When("^I click \"([^\"]*)\" submit button$")
public void clickSubmitButton(String buttonText) {
browser().submit(buttonText).click();
}
@When("^I submit a search$")
public void submitSearch() {
browser().submit("Search").click();
}
@Then("^the button ([^\"]*) must be displayed$")
public void buttonShouldBeDisplayed(String text) {
assertTrue(browser().submit(text).exists());
}
@Then("\"([^\"]*)\" should be displayed$")
public void shouldBeDisplayed(String text) {
ElementStub pageDiv = browser().div(TOP_LEVEL_DIV);
assertTrue(pageDiv.exists());
assertTrue(browser().containsText(pageDiv, text));
}
@Then("^([^\"]*) should not be displayed$")
public void shouldNotBeDisplayed(String text) {
assertFalse(browser().containsText(browser().div(TOP_LEVEL_DIV), text));
}
@When("^I click \"([^\"]*)\" link$")
public void clickLink(String text) {
browser().link(text).click();
}
@When("^I fill in the \"([^\"]*)\" with \"([^\"]*)\"$")
public void fillInTheTextfieldWith(String field, String fieldContent) {
browser().textbox(field).setValue(fieldContent);
}
@Then("^student ([^\"]*) is displayed$")
public void studentIsDisplayed(String text) {
Browser browser = browser();
assertTrue(browser.containsText(browser.div(TOP_LEVEL_DIV), text));
}
@Then("^student \"([^\"]*)\" is not displayed$")
public void studentIsNotDisplayed(String text) {
assertFalse(browser().containsText(browser().div("page"), text));
}
@Then("^\"([^\"]*)\" should be displayed in \"([^\"]*)\"$")
public void shouldBeDisplayedInField(String text, String field) {
assertTrue(browser().select(field).getText().contains(text));
}
@Then("^the ([^\"]*) page is displayed")
public void pageIsDisplayed(String pageName) {
assertTrue(browser().containsText(browser().div(TOP_LEVEL_DIV), pageName));
}
@When("^I \"([^\"]*)\" in the sidebar")
public void clickLinkInSidebar(String text) {
browser().link(text).click();
}
@When("^I enter ([^\"']*) as ([^\"]*)")
public void enterIntoTheTextBox(String text, String elementId) {
if (browser().label(elementId).exists(true)) {
elementId = browser().label(elementId).fetch("htmlFor");
}
browser().byId(elementId).setValue(text);
}
@When("^I select ([^\"']*) as ([^\"]*)")
public void selectFromDropDown(String value, String dropDownName) {
browser().select(dropDownName).choose(value);
}
@Then("^the message \"([^\"]*)\" is displayed$")
public void displayErrorMessage(String errorMessage) {
assertTrue(browser().containsText(browser().div(TOP_LEVEL_DIV), errorMessage));
}
@When("^I \"([^\"]*)\" the form")
public void submitForm(String submitButtonName) {
browser().submit(submitButtonName).click();
}
@Given("^I am on the ([^\"]*) page$")
public void navigateToAdminPages(String pageName) {
navigateTo(pageName);
}
@When("^I navigate to the ([^\"]*) page$")
public void navigateToPage(String pageName) {
navigateTo(pageName);
}
private void navigateTo(String pageName) {
browser().link(pageName).click();
}
@Then("^the message \"([^\"]*)\" should be displayed$")
public void displayMessage(String message) {
assertTrue(browser().containsText(browser().div(TOP_LEVEL_DIV), message));
}
@After
public void closeBrowser() {
SahiFacade.closeBrowser();
}
}
| [
"[email protected]"
] | |
1ac8797dfc1752e9daeaa97a51f4364bb09608a3 | 3a856a230c169110607c23c2c88bcc931356c7bb | /05-architecture/XX-UIWebViewComponent/webview/src/main/java/com/xiangxue/webview/webviewprocess/BaseWebView.java | e1c57c82de941b8f9157c3a2d8c7eabf86926722 | [] | no_license | klzhong69/android-code | de9627fe3c5f890011d3bd0809e73fa8da5b0f3e | 7e07776c9dc61e857ca5c36ab81a0fb22cd619c1 | refs/heads/main | 2023-08-13T16:08:29.994460 | 2021-10-13T15:22:50 | 2021-10-13T15:22:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,663 | java | package com.xiangxue.webview.webviewprocess;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.webkit.JavascriptInterface;
import android.webkit.WebView;
import com.google.gson.Gson;
import com.xiangxue.webview.WebViewCallBack;
import com.xiangxue.webview.bean.JsParam;
import com.xiangxue.webview.webviewprocess.settings.WebViewDefaultSettings;
import com.xiangxue.webview.webviewprocess.webchromeclient.XiangxueWebChromeClient;
import com.xiangxue.webview.webviewprocess.webviewclient.XiangxueWebViewClient;
public class BaseWebView extends WebView {
public static final String TAG = "XiangxueWebView";
public BaseWebView(Context context) {
super(context);
init();
}
public BaseWebView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public BaseWebView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
public BaseWebView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
init();
}
public void init() {
WebViewProcessCommandDispatcher.getInstance().initAidlConnection();
WebViewDefaultSettings.getInstance().setSettings(this);
addJavascriptInterface(this, "xiangxuewebview");
}
public void registerWebViewCallBack(WebViewCallBack webViewCallBack) {
setWebViewClient(new XiangxueWebViewClient(webViewCallBack));
setWebChromeClient(new XiangxueWebChromeClient(webViewCallBack));
}
@JavascriptInterface
public void takeNativeAction(final String jsParam) {
Log.i(TAG, jsParam);
if (!TextUtils.isEmpty(jsParam)) {
final JsParam jsParamObject = new Gson().fromJson(jsParam, JsParam.class);
if (jsParamObject != null) {
WebViewProcessCommandDispatcher.getInstance().executeCommand(jsParamObject.name, new Gson().toJson(jsParamObject.param), this);
}
}
}
public void handleCallback(final String callbackname, final String response){
if(!TextUtils.isEmpty(callbackname) && !TextUtils.isEmpty(response)){
post(new Runnable() {
@Override
public void run() {
String jscode = "javascript:xiangxuejs.callback('" + callbackname + "'," + response + ")";
Log.e("xxxxxx", jscode);
evaluateJavascript(jscode, null);
}
});
}
}
}
| [
"[email protected]"
] | |
e73fc08466abcb5f99f3b6fbcb899f9de5b7da36 | 07efa03a2f3bdaecb69c2446a01ea386c63f26df | /eclipse_jee/Pdf/IndiaExtracts2/com/hertz/hercutil/presentation/HercDate.java | 45b80466ab740caf6d36203cc4e082eca4e0cf89 | [] | no_license | johnvincentio/repo-java | cc21e2b6e4d2bed038e2f7138bb8a269dfabeb2c | 1824797cb4e0c52e0945248850e40e20b09effdd | refs/heads/master | 2022-07-08T18:14:36.378588 | 2020-01-29T20:55:49 | 2020-01-29T20:55:49 | 84,679,095 | 0 | 0 | null | 2022-06-30T20:11:56 | 2017-03-11T20:51:46 | Java | UTF-8 | Java | false | false | 6,894 | java | /********************************************************************
* Copyright (c) 2006 The Hertz Corporation *
* All Rights Reserved. (Unpublished.) *
* *
* The information contained herein is confidential and *
* proprietary to The Hertz Corporation and may not be *
* duplicated, disclosed to third parties, or used for any *
* purpose not expressly authorized by it. Any unauthorized *
* use, duplication, or disclosure is prohibited by law. *
* *
*********************************************************************/
package com.hertz.hercutil.presentation;
import java.io.Serializable;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/**
* Herc Address object
*
* @author John Vincent
*/
public class HercDate implements Serializable, Cloneable {
private Date date;
/**
* Constructor will set to current date/time
*
*/
public HercDate() {
Calendar cal = Calendar.getInstance();
date = cal.getTime();
}
/**
* Constructor sets to passed date/time
*
* @param d Date to set to
*/
public HercDate(Date d) {date = d;}
/**
* Constructor will set to date/time from RentalMan last activity date
*
* @param b Date from RentalMan table via the DAO
*/
public HercDate (BigDecimal b) {
date = null;
try {
if (b != null && b.intValue() != 0) {
date = new SimpleDateFormat("yyyyMMdd").parse(b.toString());
}
}
catch (Exception e) {
}
}
/**
* Clone the Object
*/
public Object clone() {
try {
HercDate cloned = (HercDate) super.clone();
cloned.date = (Date) date.clone();
return cloned;
}
catch (CloneNotSupportedException e) {
return null;
}
}
/**
* Check this Object for equality with another
*
* @param obj Object to check
* @return true if objects are equal
*/
public boolean equals (Object obj) {
if (this == obj) return true;
if (! (obj instanceof HercDate)) return false;
HercDate d = (HercDate) obj;
return date.equals(d.getDate());
}
/**
* Get the Date
*
* @return Date as a Date object
*/
public Date getDate() {return date;}
/**
* Set the date to Date
*
* @param date Date object
*/
public void setDate (Date date) {this.date = date;}
/**
* Get the date in MM/dd/yyyy format
*
* @return date in MM/dd/yyyy format
*/
public String getDateString() {
if (date == null) return null;
return new SimpleDateFormat("MM/dd/yyyy").format(date);
}
/**
* Get the date in yyyyMMddHHmmss format, used for LDAP
*
* @return date in yyyyMMddHHmmss format
*/
public String getDateStringForLdap() {
if (date == null) return "";
return new SimpleDateFormat("yyyyMMddHHmmss").format(date);
}
/**
* Get the date in yyyy-MM-dd HH:mm:ss format, used for DB2
*
* @return date in yyyy-MM-dd HH:mm:ss format
*/
public String getDateStringForDB2() {
if (date == null) return "";
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
}
/**
* Get the date in yyyy-MM-dd, used for DB2 Date columns
*
* @return date in yyyy-MM-dd format
*/
public String getSimpleDateStringForDB2() {
if (date == null) return "";
return new SimpleDateFormat("yyyy-MM-dd").format(date);
}
/**
* Get the time in h:mm a format, used for DB2
*
* @return time in h:mm a format
*/
public String getFormattedTimeString() {
return new SimpleDateFormat("h:mm a").format(date);
}
/**
* Get time in milliseconds - used to reverse sort the requests lists
*
* @return time in milliseconds
*/
public long getTime() {return date.getTime();}
/**
* Get the date in MM/dd/yyyy format, used for AdminTool History format
*
* @return date in yyyy-MM-dd HH:mm:ss format
*/
public String getHistoryDateString() {
return new SimpleDateFormat("MM/dd/yyyy").format(date);
}
/**
* Get the date in MMddyy format, used for RentalMan.
* Do not change this, or use for any other purpose
*
* @return date in MMddyy format
*/
public String getRentalManDateFormat() {
return new SimpleDateFormat("MMddyy").format(date);
}
/**
* Get the date in yyyyMMdd format, used for RentalMan.
* Do not change this, or use for any other purpose
*
* @return date in yyyyMMdd format
*/
public String getRentalManTodayDateFormat() {
return new SimpleDateFormat("yyyyMMdd").format(date);
}
/**
* Get a Date for the Date string, used only by LDAP. Note that if the Date is not set,
* the current Date will be returned.
* Example date string is 20070502174431.
*
* Do not change this, or use for any other purpose.
*
* @param dateString Date as a LDAP String
* @return String as a Date
*/
public static Date parseLDAPDate (String dateString) {
try {
if (dateString == null) return new Date();
return new SimpleDateFormat("yyyyMMddHHmmss").parse(dateString);
}
catch (ParseException e) {
return new Date();
}
}
/**
* Get a Date for the Date string. Note that if the Date is not set,
* the current Date will be returned.
* Note that the date string must be in the format MMMyyyydd, else current Date will be returned.
*
* Do not change this.
*
* @param dateString Date as a String
* @return String as a Date
*/
public static Date parseDate (String dateString) {
try {
if (dateString == null) return new Date();
return new SimpleDateFormat("MMMyyyydd").parse(dateString);
}
catch (ParseException e) {
return new Date();
}
}
/**
* Get a Date for the Date string that is formatted as format.
* Note that if the Date is not set, the current Date will be returned.
* Note that the date string must be in the format format, else current Date will be returned.
*
* Do not change this.
*
* @param dateString Date as a String
* @param format The format of DateString
* @return String as a Date
*/
public static Date parseDate (String dateString, String format) {
try {
if (dateString == null) return new Date();
return new SimpleDateFormat(format).parse(dateString);
}
catch (ParseException e) {
return new Date();
}
}
/**
* Get the date in yyyy-MM-dd HH:mm:ss format
*
* @return date in yyyy-MM-dd HH:mm:ss format
*/
public String toString() {
if (date == null) return "";
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
}
/**
* Determine whether the date is null
*
* @return true if the date is null
*/
public boolean isNull() {
return (date == null) ? true : false;
}
}
| [
"[email protected]"
] | |
ca64b7ecbc1bd9325330466d2a14ce77e14726d7 | 969854e3b88738b52eea02dab9a7d92b97797c97 | /src/main/java/gxt/visual/ui/client/interfaces/view/ITreeGridView.java | b6931e7d950271d50b69018470845905b4e5a152 | [] | no_license | bbai/gxt-interfaces | 1b130b301fc31444dae103c7d17a4bbace5ef9c3 | 4bb0fc716e4a45525fc31a39647669f30e69d2b8 | refs/heads/master | 2021-01-21T19:35:09.393173 | 2010-06-08T21:56:07 | 2010-06-08T21:56:07 | 42,747,579 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,959 | java | package gxt.visual.ui.client.interfaces.view;
import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.data.ModelIconProvider;
import com.extjs.gxt.ui.client.store.TreeStore;
import com.extjs.gxt.ui.client.widget.grid.GridView;
import com.extjs.gxt.ui.client.widget.treegrid.TreeGridView;
import com.extjs.gxt.ui.client.widget.treegrid.TreeGrid.TreeNode;
import com.extjs.gxt.ui.client.widget.treepanel.TreeStyle;
import com.google.gwt.user.client.Element;
/**
* @author eugenp
*/
public interface ITreeGridView< M extends ModelData > extends IGridView< M >{
/**
* Collapses all nodes.
*/
void collapseAll();
/**
* Expands all nodes.
*/
void expandAll();
/**
* Returns the tree node for the given target.
* @param target the target element
* @return the tree node or null if no match
*/
TreeNode findNode( Element target );
/**
* Returns the model icon provider.
* @return the icon provider
*/
ModelIconProvider< M > getIconProvider();
/**
* Returns the tree style.
* @return the tree style
*/
TreeStyle getStyle();
/**
* Returns the tree's tree store.
* @return the tree store
*/
TreeStore< M > getTreeStore();
/**
* Returns the tree's view.
* @return the view
*/
TreeGridView getTreeView();
/**
* Returns true if auto expand is enabled.
* @return the auto expand state
*/
boolean isAutoExpand();
/**
* Returns true if auto load is enabled.
* @return the auto load state
*/
boolean isAutoLoad();
/**
* Returns true when a loader is queried for it's children each time a node is expanded. Only applies when using a loader with the tree store.
* @return true if caching
*/
boolean isCaching();
/**
* Returns true if the model is expanded.
* @param model the model
* @return true if expanded
*/
boolean isExpanded( M model );
/**
* Returns true if the model is a leaf node. The leaf state allows a tree item to specify if it has children before the children have been realized.
* @param model the model
* @return the leaf state
*/
boolean isLeaf( M model );
/**
* If set to true, all non leaf nodes will be expanded automatically (defaults to false).
* @param autoExpand the auto expand state to set.
*/
void setAutoExpand( boolean autoExpand );
/**
* Sets whether all children should automatically be loaded recursively (defaults to false). Useful when the tree must be fully populated when initially rendered.
* @param autoLoad true to auto load
*/
void setAutoLoad( boolean autoLoad );
/**
* Sets whether the children should be cached after first being retrieved from the store (defaults to true). When <code>false</code>, a load request will be made each time a node is expanded.
* @param caching the caching state
*/
void setCaching( boolean caching );
/**
* Sets the item's expand state.
* @param model the model
* @param expand true to expand
*/
void setExpanded( M model, boolean expand );
/**
* Sets the item's expand state.
* @param model the model
* @param expand true to expand
* @param deep true to expand all children recursively
*/
@SuppressWarnings( "unchecked" )
void setExpanded( M model, boolean expand, boolean deep );
/**
* Sets the tree's model icon provider which provides the icon style for each model.
* @param iconProvider the icon provider
*/
void setIconProvider( ModelIconProvider< M > iconProvider );
/**
* Sets the item's leaf state. The leaf state allows control of the expand icon before the children have been realized.
* @param model the model
* @param leaf the leaf state
*/
void setLeaf( M model, boolean leaf );
void setView( GridView view );
/**
* Toggles the model's expand state.
* @param model the model
*/
void toggle( M model );
}
| [
"[email protected]"
] | |
95f3109b2e81527745bc2776482cfc787a41084b | bc038e89bc67e2f9c228c25a2ec13616f07c490a | /src/ReplitTry/R094_Loop_ShoppingList2.java | 867ac678e6ae74a3f92cc910bea2c3f3b51fc87d | [] | no_license | kamiltoprak/Summer2020_B20 | 43957bf7c73b3650e16b8e4b4a3704da826ad395 | 65dc3806c0d099ef275b5f84a4e167475fc2d07f | refs/heads/master | 2023-02-06T08:59:27.059443 | 2020-12-24T03:12:49 | 2020-12-24T03:12:49 | 284,479,607 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,377 | java | package ReplitTry;
/*Your program should ask use to enter items followed by its price. After adding item, ask user if he wants to add one more item. If so, repeat previous steps again. If no, print shopping list report and total price as show in examples. Your program should accept up to 10 items.
Hint: use do while loop.
Example:
output: Enter Item1 and its price:
input: Tomatoes
input: 5.5
output: Add one more item?
input: yes
output: Enter Item2 and its price:
input: Cheese
input: 3.5
output: Add one more item?
input: yes
output: Enter Item3 and its price:
input: Apples
input: 6.3
output: Add one more item?
input: no
output: Item1: Tomatoes Price: 5.5, Item2: Cheese Price: 3.5, Item3: Apples Price: 6.3
output: Total price: 15.3
Example:
output: Enter Item1 and its price:
input: Lemons
input: 2.3
output: Add one more item?
input: yes
output: Enter Item2 and its price:
input: Oranges
input: 6
output: Add one more item?
input: no
output: Item1: Lemons Price: 2.3, Item2: Oranges Price: 6.0
output: Total price: 8.3*/
import java.util.Scanner;
public class R094_Loop_ShoppingList2 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String shoppingListReport = "";
String item = "";
String countinue = "";
double price = 0;
int count = 1;
double totalProce = 0;
while(count>=0){
System.out.println("Enter Item"+count+" and its price:");
item=scan.next();
price=scan.nextDouble();
shoppingListReport+="Item"+count+": "+item+" Price: "+ price;
System.out.println("Add one more item?");
totalProce+=price;
countinue=scan.next();
if(countinue.equals("no")){
break;
}else{
shoppingListReport+=", ";
}
count++;
}
System.out.println(shoppingListReport);
System.out.println("Total price: "+totalProce);
}
}
| [
"[email protected]"
] | |
51ea2b9f14cc0cb8861f8d3e1787b52bd710f9d6 | d1eb6e875f89e3e751e5629b9c22c20da2bf42e2 | /mid_lab_solutions/AfterMid_PersonalExercises/src/streams/creation/ByStreamOfFromArguments.java | 6c79da26c3b35bbc855cdcbc078bcbf493492fea | [] | no_license | tsitotaw/CS_401_MPP | c8825403c9513dfb97b437c3f4506c6b0b879070 | 6be79542b4436ab33b6678fc01416fb15168df06 | refs/heads/main | 2023-09-05T19:45:55.104466 | 2021-10-22T12:52:18 | 2021-10-22T12:52:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 223 | java | package streams.creation;
import java.util.stream.Stream;
public class ByStreamOfFromArguments {
public static void main(String[] args) {
Stream.of("hello", "world", "is")
.forEach(System.out::println);
}
}
| [
"[email protected]"
] | |
cd33b7e794baf7230e9506f38d75db5c80cd813f | b8e3e449651bd64e5c126b5f91853428a595b5d8 | /portal-application/src/main/java/com/similan/portal/view/collabspace/CollabWorkspaceHistoryView.java | bcedd98e7dc719ac35c3bb86494d0b294824a498 | [] | no_license | suparna2702/ServiceFabric | ee5801a346fda63edf0bea75103e693e52037fc4 | d526376f9530f608726fa6ad1b7912b4ec384a82 | refs/heads/master | 2021-03-22T04:40:41.688184 | 2016-12-06T02:06:38 | 2016-12-06T02:06:38 | 75,250,704 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,474 | java | package com.similan.portal.view.collabspace;
import java.util.List;
import javax.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import com.similan.domain.entity.community.PhotoViewOption;
import com.similan.framework.dto.OrganizationDetailInfoDto;
import com.similan.framework.dto.member.MemberInfoDto;
import com.similan.portal.view.BaseView;
import com.similan.service.api.collaborationworkspace.dto.basic.CollaborationWorkspaceDto;
import com.similan.service.api.collaborationworkspace.dto.key.CollaborationWorkspaceKey;
import com.similan.service.api.wall.dto.basic.WallEntryDto;
import com.similan.service.api.wall.dto.key.WallKey;
@Scope("view")
@Component("workspaceHistoryView")
@Slf4j
public class CollabWorkspaceHistoryView extends BaseView {
private static final long serialVersionUID = 1L;
@Autowired
private MemberInfoDto member;
@Autowired
private OrganizationDetailInfoDto orgInfo;
private CollaborationWorkspaceDto workspace;
private List<WallEntryDto<CollaborationWorkspaceKey>> wallEntries = null;
@PostConstruct
public void init() {
log.info("Initializing workspace history view");
String workSpaceName = this.getContextParam("wsname");
String workSpaceOwnerName = this.getContextParam("owsname");
log.info("Workspace name " + workSpaceName + " owner name " + workSpaceOwnerName);
if (workSpaceName != null) {
CollaborationWorkspaceKey workspaceKey = new CollaborationWorkspaceKey(workSpaceOwnerName, workSpaceName);
this.workspace = this.getCollabWorkspaceService().getDetail(workspaceKey);
this.fetchLatestWallEntries();
}
}
private void fetchLatestWallEntries(){
/* get the wall */
WallKey<CollaborationWorkspaceKey> wallKey = new WallKey<CollaborationWorkspaceKey>(this.workspace.getKey());
wallEntries = this.getWallService().getLatest(wallKey);
}
public String getWorkspaceLogo(){
return PhotoViewOption.ShowPhoto.effectivePhoto("images/businessLogo.jpg",
workspace.getLogo());
}
public MemberInfoDto getMember() {
return member;
}
public OrganizationDetailInfoDto getOrgInfo() {
return orgInfo;
}
public CollaborationWorkspaceDto getWorkspace() {
return workspace;
}
public List<WallEntryDto<CollaborationWorkspaceKey>> getWallEntries() {
return wallEntries;
}
}
| [
"[email protected]"
] | |
49341359d4d0a80943a90d5148af6edebcc61cc8 | 274ede4a61b95d2a665de77ba811d4ddf3f0d712 | /discovery-server/src/main/java/app/metatron/discovery/domain/workbook/configurations/datasource/JoinMapping.java | d21eab61733f960d888ecdd449607bdd3721272c | [
"Apache-2.0",
"GPL-2.0-only",
"OFL-1.1",
"LGPL-2.1-or-later",
"MIT",
"LGPL-2.0-or-later",
"EPL-1.0",
"BSD-3-Clause"
] | permissive | metatron-app/metatron-discovery | 0c33c9272eddc25de3250685f4881ccd265271bc | 08c838b4c09fb2e2b83f560aeba71887711bd546 | refs/heads/master | 2023-08-12T19:05:35.272532 | 2023-05-19T04:00:28 | 2023-05-19T04:00:28 | 142,546,516 | 3,762 | 325 | Apache-2.0 | 2023-07-18T20:52:04 | 2018-07-27T07:54:46 | TypeScript | UTF-8 | Java | false | false | 3,214 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package app.metatron.discovery.domain.workbook.configurations.datasource;
import com.google.common.base.Preconditions;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang.StringUtils;
import java.io.Serializable;
import java.util.Map;
import javax.validation.constraints.NotNull;
import app.metatron.discovery.domain.datasource.DataSource;
public class JoinMapping implements Serializable {
/**
* Join Type
*/
@NotNull
JoinType type;
/**
* 데이터 소스 Name
*/
String name;
/**
* 데이터 소스 Name Alias, 하위 Join 수행시 namespace 로 활용
*/
String joinAlias;
/**
* Join 할 Mutliple KeyMap, key : Mater Key , value : Lookup Key
*/
Map<String, String> keyPair;
/**
* 하위에 조인할 join 정보
*/
JoinMapping join;
/**
* Biz. Logic 용 객체(스펙과 관련 없음)
*/
@JsonIgnore
app.metatron.discovery.domain.datasource.DataSource metaDataSource;
public JoinMapping(
@JsonProperty("name") String name,
@JsonProperty("joinAlias") String joinAlias,
@JsonProperty("type") String type,
@JsonProperty("keyPair") Map<String, String> keyPair,
@JsonProperty("join") JoinMapping join) {
if(StringUtils.isEmpty(name)) {
throw new IllegalArgumentException("'name' properties required ");
}
this.name = name;
this.joinAlias = StringUtils.isEmpty(joinAlias) ? name : joinAlias;
this.type = JoinType.valueOf(Preconditions.checkNotNull(type).toUpperCase());
this.keyPair = keyPair;
this.join = join;
}
public JoinType getType() {
return type;
}
public void setType(JoinType type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Map<String, String> getKeyPair() {
return keyPair;
}
public void setKeyPair(Map<String, String> keyPair) {
this.keyPair = keyPair;
}
public JoinMapping getJoin() {
return join;
}
public void setJoin(JoinMapping join) {
this.join = join;
}
public String getJoinAlias() {
return joinAlias;
}
public void setJoinAlias(String joinAlias) {
this.joinAlias = joinAlias;
}
public DataSource getMetaDataSource() {
return metaDataSource;
}
public void setMetaDataSource(DataSource metaDataSource) {
this.metaDataSource = metaDataSource;
}
/**
* 연결(Join) 타입
*/
public enum JoinType {
INNER,
LEFT_OUTER,
RIGHT_OUTER, // Not Supported
FULL // Not Supported
}
}
| [
"[email protected]"
] | |
1789281560f95b2da5d60f87677bcc99ee2761f5 | 5f706495d24cb3535bc09aec3158de8318f5dd0f | /gvr-performance/gvrperformance/src/main/java/org/gearvrf/performance/TestActivity.java | e641663958d381c209afd7606e573c5de72ba8cc | [] | no_license | Hankay/GearVRf-Demos | d4aa1a5d108e05e3d4c2220bccc334731705b6c5 | feb4fc247c36b519f716c963105815a4aa03d683 | refs/heads/master | 2021-01-22T05:33:25.539449 | 2016-05-06T18:29:10 | 2016-05-06T18:29:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 936 | java | /* Copyright 2015 Samsung Electronics Co., LTD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gearvrf.performance;
import org.gearvrf.GVRActivity;
import android.os.Bundle;
public class TestActivity extends GVRActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setScript(new TestScript(this), "gvr_note4.xml");
}
}
| [
"[email protected]"
] | |
9c7efb25919c78423f1c083ea2df551d3514c448 | 2ed7c4c05df3e2bdcb88caa0a993033e047fb29a | /common/com.raytheon.uf.common.util/src/com/raytheon/uf/common/util/Filter.java | 299b93813eef0431db72098182a81d73392c0578 | [] | no_license | Unidata/awips2-core | d378a50c78994f85a27b481e6f77c792d1fe0684 | ab00755b9e158ce66821b6fc05dee5d902421ab8 | refs/heads/unidata_18.2.1 | 2023-07-22T12:41:05.308429 | 2023-02-13T20:02:40 | 2023-02-13T20:02:40 | 34,124,839 | 3 | 7 | null | 2023-07-06T15:40:45 | 2015-04-17T15:39:56 | Java | UTF-8 | Java | false | false | 2,012 | java | /**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.common.util;
import java.io.File;
import java.io.FileFilter;
/**
* Extension of the {@link FileFilter} class for any file type
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 06/14/06 garmendariz Initial check-in
*
* </pre>
*
* @author garmendariz
* @version 1.0
*/
public class Filter implements FileFilter {
/** A file type (jar, tiff, xml) - any case */
private String fileType;
/**
* Implementation of the {@link FileFilter#accept(File)} method to retrieve only files with the
* set file type.
*/
public boolean accept(File pathname) {
if (pathname.isDirectory()
|| pathname.getName().toUpperCase().endsWith("." + fileType.toUpperCase())) {
return true;
} else {
return false;
}
}
/**
* Retrieve the file extension
* @return A file extension
*/
public String getFileType()
{
return fileType;
}
/**
* Set the file type
* @param fileType A file extension
*/
public void setFileType(String fileType)
{
this.fileType = fileType;
}
}
| [
"[email protected]"
] | |
edc35be9c8444f66261ffcd6f6048d6181027289 | e96172bcad99d9fddaa00c25d00a319716c9ca3a | /plugin/src/main/java/com/intellij/java/impl/ig/performance/JavaLangReflectInspection.java | 21304e888066e52ab49aea64220c126bbb95aa3a | [
"Apache-2.0"
] | permissive | consulo/consulo-java | 8c1633d485833651e2a9ecda43e27c3cbfa70a8a | a96757bc015eff692571285c0a10a140c8c721f8 | refs/heads/master | 2023-09-03T12:33:23.746878 | 2023-08-29T07:26:25 | 2023-08-29T07:26:25 | 13,799,330 | 5 | 4 | Apache-2.0 | 2023-01-03T08:32:23 | 2013-10-23T09:56:39 | Java | UTF-8 | Java | false | false | 2,360 | java | /*
* Copyright 2003-2007 Dave Griffith, Bas Leijdekkers
*
* 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.intellij.java.impl.ig.performance;
import javax.annotation.Nonnull;
import com.intellij.java.language.psi.PsiClassType;
import com.intellij.java.language.psi.PsiType;
import com.intellij.java.language.psi.PsiTypeElement;
import com.intellij.java.language.psi.PsiVariable;
import com.siyeh.InspectionGadgetsBundle;
import com.siyeh.ig.BaseInspection;
import com.siyeh.ig.BaseInspectionVisitor;
import consulo.annotation.component.ExtensionImpl;
import org.jetbrains.annotations.NonNls;
@ExtensionImpl
public class JavaLangReflectInspection extends BaseInspection {
@Nonnull
public String getDisplayName() {
return InspectionGadgetsBundle.message(
"java.lang.reflect.display.name");
}
@Nonnull
protected String buildErrorString(Object... infos) {
return InspectionGadgetsBundle.message(
"java.lang.reflect.problem.descriptor");
}
public BaseInspectionVisitor buildVisitor() {
return new JavaLangReflectVisitor();
}
private static class JavaLangReflectVisitor extends BaseInspectionVisitor {
@Override
public void visitVariable(@Nonnull PsiVariable variable) {
super.visitVariable(variable);
final PsiType type = variable.getType();
final PsiType componentType = type.getDeepComponentType();
if (!(componentType instanceof PsiClassType)) {
return;
}
final String className = ((PsiClassType)componentType).getClassName();
@NonNls final String javaLangReflect = "java.lang.reflect.";
if (!className.startsWith(javaLangReflect)) {
return;
}
final PsiTypeElement typeElement = variable.getTypeElement();
if (typeElement == null) {
return;
}
registerError(typeElement);
}
}
} | [
"[email protected]"
] | |
844f0a80e40094cc5114ea1531dff69e63e39822 | e37de6db1d0f1ca70f48ffc5eafc6e43744bc980 | /mondrian/mondrian-model/src/main/java/com/tonbeller/wcf/format/StringHandler.java | 5d63ff02557f1ecb12f4b479aab6c5d56f0a7456 | [] | no_license | cnopens/BA | 8490e6e83210343a35bb1e5a6769209a16557e3f | ba58acf949af1249cc637ccf50702bb28462d8ad | refs/heads/master | 2021-01-20T16:38:38.479034 | 2014-11-13T00:44:00 | 2014-11-13T00:44:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,550 | java | /*
* ====================================================================
* This software is subject to the terms of the Common Public License
* Agreement, available at the following URL:
* http://www.opensource.org/licenses/cpl.html .
* Copyright (C) 2003-2004 TONBELLER AG.
* All Rights Reserved.
* You must accept the terms of that agreement to use this software.
* ====================================================================
*
*
*/
package com.tonbeller.wcf.format;
import java.util.List;
/**
* @author av
*/
public class StringHandler extends FormatHandlerSupport {
public String format(Object o, String userPattern) {
// dont show "null"
if (o == null)
return "";
return String.valueOf(o);
}
public Object parse(String s, String userPattern) {
// microsoft sends \r\n sometimes?!
if (s.indexOf(13) >= 0) {
StringBuffer sb = new StringBuffer();
char[] ca = s.toCharArray();
for (int i = 0; i < ca.length; i++) {
if (ca[i] != 13)
sb.append(ca[i]);
}
s = sb.toString();
}
return s;
}
public boolean canHandle(Object value) {
return value instanceof String;
}
public Object toNativeArray(List list) {
String[] array = new String[list.size()];
for (int i = 0; i < array.length; i++)
array[i] = (String) list.get(i);
return array;
}
public Object[] toObjectArray(Object value) {
if (value instanceof String)
return new String[] {(String) value };
return (String[]) value;
}
} | [
"[email protected]"
] | |
39bf4111e80788c503a2d4e8c135e63b7512c182 | 0e02393f6d9c09f2453c3e7bc729052ff74f922f | /librarytao/src/main/java/com/yitao/widget/InsideViewPager.java | 0941b5afbbe3d3e58cd7d44547ef1e10e6d9a180 | [] | no_license | eaglelhq/HBPostal | fbcb6765d082940cb3511c2312ab9b1cbe8c3180 | 76df376aed3022506bbb1eacc598dbc1377242ba | refs/heads/master | 2021-05-05T19:55:44.299097 | 2018-11-12T02:49:23 | 2018-11-12T02:49:23 | 103,887,994 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,392 | java | package com.yitao.widget;
import android.content.Context;
import android.graphics.PointF;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.MotionEvent;
/**
* 此ViewPager解决与父容器ScrollView冲突的问题,无法完美解决.有卡顿 此自定义组件和下拉刷新scrollview配合暂时小完美,有待改善
*
* @author bavariama
*
*/
public class InsideViewPager extends ViewPager {
// float curX = 0f;
// float downX = 0f;
OnSingleTouchListener onSingleTouchListener;
/** 触摸时按下的点 **/
PointF downP = new PointF();
/** 触摸时当前的点 **/
PointF curP = new PointF();
/** 自定义手势**/
private GestureDetector mGestureDetector;
public InsideViewPager(Context context) {
// TODO Auto-generated constructor stub
super(context);
mGestureDetector = new GestureDetector(context, new XScrollDetector());
}
public InsideViewPager(Context context, AttributeSet attrs) {
// TODO Auto-generated constructor stub
super(context, attrs);
mGestureDetector = new GestureDetector(context, new XScrollDetector());
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
// TODO Auto-generated method stub
// return super.onInterceptTouchEvent(ev);
//接近水平滑动时子控件处理该事件,否则交给父控件处理
return !mGestureDetector.onTouchEvent(ev);
// return true;
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
// curX = ev.getX();
// // TODO Auto-generated method stub
// if (ev.getAction() == MotionEvent.ACTION_DOWN) {
// downX = curX;
// }
// int curIndex = getCurrentItem();
// if (curIndex == 0) {
// if (downX <= curX) {
// getParent().requestDisallowInterceptTouchEvent(false);
// } else {
// getParent().requestDisallowInterceptTouchEvent(true);
// }
// } else if (curIndex == getAdapter().getCount() - 1) {
// if (downX >= curX) {
// getParent().requestDisallowInterceptTouchEvent(false);
// } else {
// getParent().requestDisallowInterceptTouchEvent(true);
// }
// } else {
// getParent().requestDisallowInterceptTouchEvent(true);
// }
// getParent().requestDisallowInterceptTouchEvent(false);
//
// return super.onTouchEvent(ev);
//每次进行onTouch事件都记录当前的按下的坐标
curP.x = ev.getX();
curP.y = ev.getY();
if(ev.getAction() == MotionEvent.ACTION_DOWN){
//记录按下时候的坐标
//切记不可用 downP = curP ,这样在改变curP的时候,downP也会改变
downP.x = ev.getX();
downP.y = ev.getY();
//此句代码是为了通知他的父ViewPager现在进行的是本控件的操作,不要对我的操作进行干扰
getParent().requestDisallowInterceptTouchEvent(false);
}
if(ev.getAction() == MotionEvent.ACTION_MOVE){
float distanceX = curP.x - downP.x;
float distanceY = curP.y - downP.y;
//接近水平滑动,ViewPager控件捕获手势,水平滚动
if(Math.abs(distanceX) > Math.abs(distanceY)){
//此句代码是为了通知他的父ViewPager现在进行的是本控件的操作,不要对我的操作进行干扰
getParent().requestDisallowInterceptTouchEvent(false);
}else{
//接近垂直滑动,交给父控件处理
getParent().requestDisallowInterceptTouchEvent(true);
}
}
return super.onTouchEvent(ev);
}
private class XScrollDetector extends GestureDetector.SimpleOnGestureListener{
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
// return super.onScroll(e1, e2, distanceX, distanceY);
//接近水平滑动时子控件处理该事件,否则交给父控件处理
return (Math.abs(distanceX) > Math.abs(distanceY));
}
}
public void onSingleTouch() {
if (onSingleTouchListener != null) {
onSingleTouchListener.onSingleTouch();
}
}
public interface OnSingleTouchListener {
public void onSingleTouch();
}
public void setOnSingleTouchListner(
OnSingleTouchListener onSingleTouchListener) {
this.onSingleTouchListener = onSingleTouchListener;
}
}
| [
"[email protected]"
] | |
8b3acd626498461fc927017d2a97c147de4801c9 | ba09be3c156d47dbb0298ff2d49b693a4d0ad07f | /src/com/sgepit/pcmis/tzgl/hbm/VPcTzglDyreport3M.java | 2d7efd74875b0dacc9582cb01d5c0a870ee88d50 | [] | no_license | newlethe/myProject | 835d001abc86cd2e8be825da73d5421f8d31620f | ff2a30e9c58a751fa78ac7722e2936b3c9a02d20 | refs/heads/master | 2021-01-21T04:53:53.244374 | 2016-06-07T04:11:36 | 2016-06-07T04:19:11 | 47,071,697 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,421 | java | package com.sgepit.pcmis.tzgl.hbm;
import java.util.Date;
/**
* PcTzglDyreport1M entity.
*
* @author MyEclipse Persistence Tools
*/
public class VPcTzglDyreport3M implements java.io.Serializable {
// Fields
private String uids;
private String pid;
private String sjType;
private String unitId;
private String title;
private String userId;
private Date createDate;
private String state;
private String billState;
private String memo;
private Double memoNumber1;
private Double memoNumber2;
private Double memoNumber3;
private String memoVarchar1;
private String memoVarchar2;
private String memoVarchar3;
private Date memoDate1;
private Date memoDate2;
//在实体Java类中加入以下属性
private String unitTypeId;
private String unitname;
private String reason;
private String createperson;
private String unitUsername;
private String countUsername;
private String createpersonTel;
private Date reportDate;
private String flagNull;
// Constructors
public String getCreateperson() {
return createperson;
}
public void setCreateperson(String createperson) {
this.createperson = createperson;
}
public String getUnitUsername() {
return unitUsername;
}
public void setUnitUsername(String unitUsername) {
this.unitUsername = unitUsername;
}
public String getCountUsername() {
return countUsername;
}
public void setCountUsername(String countUsername) {
this.countUsername = countUsername;
}
public String getCreatepersonTel() {
return createpersonTel;
}
public void setCreatepersonTel(String createpersonTel) {
this.createpersonTel = createpersonTel;
}
public Date getReportDate() {
return reportDate;
}
public void setReportDate(Date reportDate) {
this.reportDate = reportDate;
}
/** default constructor */
public VPcTzglDyreport3M() {
}
/** full constructor */
public VPcTzglDyreport3M(String pid, String sjType, String unitId,
String title, String userId, Date createDate, String state,
String billState, String memo, Double memoNumber1,
Double memoNumber2, Double memoNumber3, String memoVarchar1,
String memoVarchar2, String memoVarchar3, Date memoDate1,
Date memoDate2,String unitTypeId, String unitname, String reason,
String createperson,String unitUsername,String countUsername,
String createpersonTel,Date reportDate, String flagNull) {
this.pid = pid;
this.sjType = sjType;
this.unitId = unitId;
this.title = title;
this.userId = userId;
this.createDate = createDate;
this.state = state;
this.billState = billState;
this.memo = memo;
this.memoNumber1 = memoNumber1;
this.memoNumber2 = memoNumber2;
this.memoNumber3 = memoNumber3;
this.memoVarchar1 = memoVarchar1;
this.memoVarchar2 = memoVarchar2;
this.memoVarchar3 = memoVarchar3;
this.memoDate1 = memoDate1;
this.memoDate2 = memoDate2;
this.unitTypeId = unitTypeId;
this.unitname = unitname;
this.reason =reason;
this.createperson=createperson;
this.countUsername=countUsername;
this.unitUsername=unitUsername;
this.createpersonTel=createpersonTel;
this.reportDate=reportDate;
this.flagNull = flagNull;
}
// Property accessors
public String getUids() {
return this.uids;
}
public void setUids(String uids) {
this.uids = uids;
}
public String getPid() {
return this.pid;
}
public void setPid(String pid) {
this.pid = pid;
}
public String getSjType() {
return this.sjType;
}
public void setSjType(String sjType) {
this.sjType = sjType;
}
public String getUnitId() {
return this.unitId;
}
public void setUnitId(String unitId) {
this.unitId = unitId;
}
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public Date getCreateDate() {
return this.createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public String getState() {
return this.state;
}
public void setState(String state) {
this.state = state;
}
public String getBillState() {
return this.billState;
}
public void setBillState(String billState) {
this.billState = billState;
}
public String getMemo() {
return this.memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public Double getMemoNumber1() {
return this.memoNumber1;
}
public void setMemoNumber1(Double memoNumber1) {
this.memoNumber1 = memoNumber1;
}
public Double getMemoNumber2() {
return this.memoNumber2;
}
public void setMemoNumber2(Double memoNumber2) {
this.memoNumber2 = memoNumber2;
}
public Double getMemoNumber3() {
return this.memoNumber3;
}
public void setMemoNumber3(Double memoNumber3) {
this.memoNumber3 = memoNumber3;
}
public String getMemoVarchar1() {
return this.memoVarchar1;
}
public void setMemoVarchar1(String memoVarchar1) {
this.memoVarchar1 = memoVarchar1;
}
public String getMemoVarchar2() {
return this.memoVarchar2;
}
public void setMemoVarchar2(String memoVarchar2) {
this.memoVarchar2 = memoVarchar2;
}
public String getMemoVarchar3() {
return this.memoVarchar3;
}
public void setMemoVarchar3(String memoVarchar3) {
this.memoVarchar3 = memoVarchar3;
}
public Date getMemoDate1() {
return this.memoDate1;
}
public void setMemoDate1(Date memoDate1) {
this.memoDate1 = memoDate1;
}
public Date getMemoDate2() {
return this.memoDate2;
}
public void setMemoDate2(Date memoDate2) {
this.memoDate2 = memoDate2;
}
public String getUnitTypeId() {
return unitTypeId;
}
public void setUnitTypeId(String unitTypeId) {
this.unitTypeId = unitTypeId;
}
public String getUnitname() {
return unitname;
}
public void setUnitname(String unitname) {
this.unitname = unitname;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public String getFlagNull() {
return flagNull;
}
public void setFlagNull(String flagNull) {
this.flagNull = flagNull;
}
} | [
"[email protected]"
] | |
ab55a5605dc87e0b3207e2f1fc00e726db172bc5 | 9310225eb939f9e4ac1e3112190e6564b890ac63 | /kernel/kernel-util/src/main/java/org/sakaiproject/util/FormattedText.java | 87c900adaa9dcc5aac6293f36a12f17495bb46f7 | [
"ECL-2.0"
] | permissive | deemsys/version-1.0 | 89754a8acafd62d37e0cdadf680ddc9970e6d707 | cd45d9b7c5633915a18bd75723c615037a4eb7a5 | refs/heads/master | 2020-06-04T10:47:01.608886 | 2013-06-15T11:01:28 | 2013-06-15T11:01:28 | 10,705,153 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,471 | java | /**********************************************************************************
* $URL: https://source.sakaiproject.org/svn/kernel/branches/kernel-1.3.x/kernel-util/src/main/java/org/sakaiproject/util/FormattedText.java $
* $Id: FormattedText.java 122360 2013-04-08 15:58:29Z [email protected] $
***********************************************************************************
*
* Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008 Sakai Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.osedu.org/licenses/ECL-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
**********************************************************************************/
package org.sakaiproject.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.sakaiproject.component.cover.ComponentManager;
import org.sakaiproject.util.api.FormattedText.Level;
import org.sakaiproject.util.api.MockFormattedText;
import org.w3c.dom.Element;
/**
* COVER
* FormattedText provides support for user entry of formatted text; the formatted text is HTML. This
* includes text formatting in user input such as bold, underline, and fonts.
*
* @deprecated use the {@link FormattedText} service instead of this cover
*/
@Deprecated
public class FormattedText {
private static final Log log = LogFactory.getLog(FormattedText.class);
private static Object LOCK = new Object();
private static org.sakaiproject.util.api.FormattedText formattedText;
protected static org.sakaiproject.util.api.FormattedText getFormattedText() {
if (formattedText == null) {
synchronized (LOCK) {
org.sakaiproject.util.api.FormattedText component = (org.sakaiproject.util.api.FormattedText) ComponentManager.get(org.sakaiproject.util.api.FormattedText.class);
if (component == null) {
log.warn("Unable to find the FormattedText using the ComponentManager (this is OK if this is a unit test)");
// we will just make a new mock one each time but we will also keep trying to find one in the CM
return new MockFormattedText();
} else {
formattedText = component;
}
}
}
return formattedText;
}
public static String processFormattedText(String strFromBrowser, StringBuffer errorMessages) {
return getFormattedText().processFormattedText(strFromBrowser, errorMessages);
}
public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages) {
return getFormattedText().processFormattedText(strFromBrowser, errorMessages);
}
/**
* @see org.sakaiproject.util.api.FormattedText#processFormattedText(String, StringBuilder, Level)
*/
public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages, Level level) {
return getFormattedText().processFormattedText(strFromBrowser, errorMessages, level);
}
public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages, boolean useLegacySakaiCleaner) {
return getFormattedText().processFormattedText(strFromBrowser, errorMessages, useLegacySakaiCleaner);
}
public static String processHtmlDocument(String strFromBrowser, StringBuilder errorMessages) {
return getFormattedText().processHtmlDocument(strFromBrowser, errorMessages);
}
public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages, boolean checkForEvilTags,
boolean replaceWhitespaceTags) {
return getFormattedText().processFormattedText(strFromBrowser, errorMessages, checkForEvilTags, replaceWhitespaceTags);
}
public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages, boolean checkForEvilTags,
boolean replaceWhitespaceTags, boolean useLegacySakaiCleaner) {
return getFormattedText().processFormattedText(strFromBrowser, errorMessages, null,
checkForEvilTags, replaceWhitespaceTags, useLegacySakaiCleaner);
}
/**
* @see org.sakaiproject.util.api.FormattedText#processFormattedText(String, StringBuilder, Level, boolean, boolean, boolean)
*/
public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages, Level level,
boolean checkForEvilTags, boolean replaceWhitespaceTags, boolean useLegacySakaiCleaner) {
return getFormattedText().processFormattedText(strFromBrowser, errorMessages, level,
checkForEvilTags, replaceWhitespaceTags, useLegacySakaiCleaner);
}
public static String escapeHtmlFormattedText(String value) {
return getFormattedText().escapeHtmlFormattedText(value);
}
public static String escapeHtmlFormattedTextSupressNewlines(String value) {
return getFormattedText().escapeHtmlFormattedTextSupressNewlines(value);
}
public static String escapeHtmlFormattedTextarea(String value) {
return getFormattedText().escapeHtmlFormattedTextarea(value);
}
public static String convertPlaintextToFormattedText(String value) {
return getFormattedText().convertPlaintextToFormattedText(value);
}
public static String escapeHtml(String value, boolean escapeNewlines) {
return getFormattedText().escapeHtml(value, escapeNewlines);
}
public static void encodeFormattedTextAttribute(Element element, String baseAttributeName, String value) {
getFormattedText().encodeFormattedTextAttribute(element, baseAttributeName, value);
}
public static String encodeUnicode(String value) {
return getFormattedText().encodeUnicode(value);
}
public static String unEscapeHtml(String value) {
return getFormattedText().unEscapeHtml(value);
}
public static String processAnchor(String anchor) {
return getFormattedText().processAnchor(anchor);
}
public static String processEscapedHtml(String source) {
return getFormattedText().processEscapedHtml(source);
}
public static String decodeFormattedTextAttribute(Element element, String baseAttributeName) {
return getFormattedText().decodeFormattedTextAttribute(element, baseAttributeName);
}
public static String convertFormattedTextToPlaintext(String value) {
return getFormattedText().convertFormattedTextToPlaintext(value);
}
public static String convertOldFormattedText(String value) {
return getFormattedText().convertOldFormattedText(value);
}
public static boolean trimFormattedText(String formattedText, int maxNumOfChars, StringBuilder strTrimmed) {
return getFormattedText().trimFormattedText(formattedText, maxNumOfChars, strTrimmed);
}
public static String decodeNumericCharacterReferences(String value) {
return getFormattedText().decodeNumericCharacterReferences(value);
}
} | [
"[email protected]"
] | |
08b587f9a8618746ea88f3fca0b71c260db7fb6e | 67a1248d981248ac9c00861ecc76d822fc637312 | /modules/FiltersAPI/src/main/java/org/gephi/filters/spi/Operator.java | 1a9aa72b9baa280946237e74fc11eaca8623d3d8 | [
"Apache-2.0",
"CDDL-1.0",
"GPL-3.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-free-unknown"
] | permissive | LiXiaoRan/Gephi_improved | 186d229e14dfa83caaa3b3c12a7caa832b8107ee | c9d7ca0c9ac00b2519d1b3837ccc732b1cfe33bb | refs/heads/master | 2022-09-21T19:12:39.263426 | 2019-07-01T08:49:13 | 2019-07-01T08:49:13 | 174,827,977 | 0 | 0 | Apache-2.0 | 2022-09-08T00:59:36 | 2019-03-10T13:33:43 | Java | UTF-8 | Java | false | false | 2,144 | java | /*
Copyright 2008-2010 Gephi
Authors : Mathieu Bastian <[email protected]>
Website : http://www.gephi.org
This file is part of Gephi.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 2011 Gephi Consortium. All rights reserved.
The contents of this file are subject to the terms of either the GNU
General Public License Version 3 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, the
"License"). You may not use this file except in compliance with the
License. You can obtain a copy of the License at
http://gephi.org/about/legal/license-notice/
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
specific language governing permissions and limitations under the
License. When distributing the software, include this License Header
Notice in each file and include the License files at
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
License Header, with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
If you wish your version of this file to be governed by only the CDDL
or only the GPL Version 3, indicate your decision by adding
"[Contributor] elects to include this software in this distribution
under the [CDDL or GPL Version 3] license." If you do not indicate a
single choice of license, a recipient has the option to distribute
your version of this file under either the CDDL, the GPL Version 3 or
to extend the choice of license to its licensees as provided above.
However, if you add GPL Version 3 code and therefore, elected the GPL
Version 3 license, then the option applies only if the new code is
made subject to such option by the copyright holder.
Contributor(s):
Portions Copyrighted 2011 Gephi Consortium.
*/
package org.gephi.filters.spi;
import org.gephi.graph.api.Graph;
import org.gephi.graph.api.Subgraph;
/**
*
* @author Mathieu Bastian
*/
public interface Operator extends Filter {
public Graph filter(Subgraph[] graphs);
public Graph filter(Graph graph, Filter[] filters);
public int getInputCount();
}
| [
"[email protected]"
] | |
643fcb9cb2ccbcce02dc0eb04ab8dab05a99a12e | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Chart/5/org/jfree/chart/renderer/category/CategoryItemRenderer_setSeriesFillPaint_510.java | 859443e01764183859d18929502e23f6fbc60b3c | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 2,593 | java |
org jfree chart render categori
plug object link categori plot categoryplot displai
individu data item link categori dataset categorydataset
defin method provid render
implement custom render extend
link abstract categori item render abstractcategoryitemrender
render attribut defin seri approach
base cover case seri
defin
categori item render categoryitemrender legend item sourc legenditemsourc
set fill paint seri request send
link render chang event rendererchangeev regist listen
param seri seri index base
param paint paint code code permit
param notifi notifi listen
seri fill paint getseriesfillpaint
set seri fill paint setseriesfillpaint seri paint paint notifi
| [
"[email protected]"
] | |
1358a12c6909d6785edf25a7f6aa9d06b62e433a | 01d4967b9f8605c2954a10ed7b0e1d7936022ab3 | /components/cronet/android/java/src/org/chromium/net/AsyncUrlRequestFactory.java | f1ce8295a46b553bb990b5e490b6239a1ab39696 | [
"BSD-3-Clause"
] | permissive | tmpsantos/chromium | 79c4277f98c3977c72104ecc7c5bda2f9b0295c2 | 802d4aeeb33af25c01ee5994037bbf14086d4ac0 | refs/heads/master | 2021-01-17T08:05:57.872006 | 2014-09-05T13:39:49 | 2014-09-05T13:41:43 | 16,474,214 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,025 | java | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.net;
import java.util.concurrent.Executor;
/**
* A factory for {@link AsyncUrlRequest}'s, which uses the best HTTP stack
* available on the current platform.
*/
public abstract class AsyncUrlRequestFactory {
/**
* Creates an AsyncUrlRequest object. All AsyncUrlRequest functions must
* be called on the Executor's thread, and all callbacks will be called
* on the Executor's thread as well.
* createAsyncRequest itself may be called on any thread.
* @param url URL for the request.
* @param listener Callback interface that gets called on different events.
* @param executor Executor on which all callbacks will be called.
* @return new request.
*/
public abstract AsyncUrlRequest createAsyncRequest(String url,
AsyncUrlRequestListener listener, Executor executor);
}
| [
"[email protected]"
] | |
1598c05e1e62d10073d582cbf58890a13a5522ae | 104b421e536d1667a70f234ec61864f9278137c4 | /code/com/google/android/gms/internal/af.java | f6f7550c726e72725b5d442712adb011d83c6264 | [] | no_license | AshwiniVijayaKumar/Chrome-Cars | f2e61347c7416d37dae228dfeaa58c3845c66090 | 6a5e824ad5889f0e29d1aa31f7a35b1f6894f089 | refs/heads/master | 2021-01-15T11:07:57.050989 | 2016-05-13T05:01:09 | 2016-05-13T05:01:09 | 58,521,050 | 1 | 0 | null | 2016-05-11T06:51:56 | 2016-05-11T06:51:56 | null | UTF-8 | Java | false | false | 5,895 | java | package com.google.android.gms.internal;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
public abstract interface af
extends IInterface
{
public abstract void onAdClosed()
throws RemoteException;
public abstract void onAdFailedToLoad(int paramInt)
throws RemoteException;
public abstract void onAdLeftApplication()
throws RemoteException;
public abstract void onAdLoaded()
throws RemoteException;
public abstract void onAdOpened()
throws RemoteException;
public static abstract class a
extends Binder
implements af
{
public a()
{
attachInterface(this, "com.google.android.gms.ads.internal.client.IAdListener");
}
public static af e(IBinder paramIBinder)
{
if (paramIBinder == null) {
return null;
}
IInterface localIInterface = paramIBinder.queryLocalInterface("com.google.android.gms.ads.internal.client.IAdListener");
if ((localIInterface != null) && ((localIInterface instanceof af))) {
return (af)localIInterface;
}
return new a(paramIBinder);
}
public IBinder asBinder()
{
return this;
}
public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2)
throws RemoteException
{
switch (paramInt1)
{
default:
return super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2);
case 1598968902:
paramParcel2.writeString("com.google.android.gms.ads.internal.client.IAdListener");
return true;
case 1:
paramParcel1.enforceInterface("com.google.android.gms.ads.internal.client.IAdListener");
onAdClosed();
paramParcel2.writeNoException();
return true;
case 2:
paramParcel1.enforceInterface("com.google.android.gms.ads.internal.client.IAdListener");
onAdFailedToLoad(paramParcel1.readInt());
paramParcel2.writeNoException();
return true;
case 3:
paramParcel1.enforceInterface("com.google.android.gms.ads.internal.client.IAdListener");
onAdLeftApplication();
paramParcel2.writeNoException();
return true;
case 4:
paramParcel1.enforceInterface("com.google.android.gms.ads.internal.client.IAdListener");
onAdLoaded();
paramParcel2.writeNoException();
return true;
}
paramParcel1.enforceInterface("com.google.android.gms.ads.internal.client.IAdListener");
onAdOpened();
paramParcel2.writeNoException();
return true;
}
private static class a
implements af
{
private IBinder ky;
a(IBinder paramIBinder)
{
this.ky = paramIBinder;
}
public IBinder asBinder()
{
return this.ky;
}
public void onAdClosed()
throws RemoteException
{
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
try
{
localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.client.IAdListener");
this.ky.transact(1, localParcel1, localParcel2, 0);
localParcel2.readException();
return;
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
public void onAdFailedToLoad(int paramInt)
throws RemoteException
{
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
try
{
localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.client.IAdListener");
localParcel1.writeInt(paramInt);
this.ky.transact(2, localParcel1, localParcel2, 0);
localParcel2.readException();
return;
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
public void onAdLeftApplication()
throws RemoteException
{
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
try
{
localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.client.IAdListener");
this.ky.transact(3, localParcel1, localParcel2, 0);
localParcel2.readException();
return;
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
public void onAdLoaded()
throws RemoteException
{
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
try
{
localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.client.IAdListener");
this.ky.transact(4, localParcel1, localParcel2, 0);
localParcel2.readException();
return;
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
public void onAdOpened()
throws RemoteException
{
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
try
{
localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.client.IAdListener");
this.ky.transact(5, localParcel1, localParcel2, 0);
localParcel2.readException();
return;
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
}
}
}
/* Location: C:\Users\ADMIN\Desktop\foss\dex2jar-2.0\classes-dex2jar.jar!\com\google\android\gms\internal\af.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"ASH ABHI"
] | ASH ABHI |
ef4f65c2560f72ba9800c97f01b8c13b0ab41824 | 63405be9a9047666a02583a839cf1ae258e66742 | /fest-swing/src/testBackUp/org/fest/swing/fixture/JTabbedPaneFixture_JPopupMenuInvoker_Test.java | f8a40c81362757d51681f3e49da56127e9165e45 | [
"Apache-2.0"
] | permissive | CyberReveal/fest-swing-1.x | 7884201dde080a6702435c0f753e32f004fea0f8 | 670fac718df72486b6177ce5d406421b3290a7f8 | refs/heads/master | 2020-12-24T16:35:44.180425 | 2017-02-17T15:15:43 | 2017-02-17T15:15:43 | 8,160,798 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,709 | java | /*
* Created on Nov 18, 2009
*
* 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.
*
* Copyright @2009-2013 the original author or authors.
*/
package org.fest.swing.fixture;
import static org.fest.swing.test.builder.JTabbedPanes.tabbedPane;
import javax.swing.JTabbedPane;
import org.fest.swing.driver.JTabbedPaneDriver;
import org.junit.BeforeClass;
/**
* Tests for methods in {@link JTabbedPaneFixture} that are inherited from {@link JPopupMenuInvokerFixture}.
*
* @author Yvonne Wang
* @author Alex Ruiz
*/
public class JTabbedPaneFixture_JPopupMenuInvoker_Test extends JPopupMenuInvokerFixture_TestCase<JTabbedPane> {
private static JTabbedPane target;
private JTabbedPaneDriver driver;
private JTabbedPaneFixture fixture;
@BeforeClass
public static void setUpTarget() {
target = tabbedPane().createNew();
}
@Override
void onSetUp() {
driver = createMock(JTabbedPaneDriver.class);
fixture = new JTabbedPaneFixture(robot(), target);
fixture.driver(driver);
}
@Override
JTabbedPaneDriver driver() {
return driver;
}
@Override
JTabbedPane target() {
return target;
}
@Override
JTabbedPaneFixture fixture() {
return fixture;
}
}
| [
"[email protected]"
] | |
40d0d130ef133c624b9c7a695ec4742d9b84693a | 21e092f59107e5cceaca12442bc2e90835473c8b | /eorder/src/main/java/com/basoft/eorder/interfaces/command/TranslateCommandHandler.java | b531b369476989bc79ada53e2174a28df6792d5a | [] | no_license | kim50012/smart-menu-endpoint | 55095ac22dd1af0851c04837190b7b6652d884a0 | d45246f341f315f8810429b3a4ec1d80cb894d7f | refs/heads/master | 2023-06-17T02:52:01.135480 | 2021-07-15T15:05:19 | 2021-07-15T15:05:19 | 381,788,497 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 780 | java | package com.basoft.eorder.interfaces.command;
import com.basoft.eorder.application.framework.CommandHandler;
import com.basoft.eorder.util.TranslateUtil;
/**
* @Author:DongXifu
* @Description:
* @Date Created in 2:40 下午 2019/11/19
**/
@CommandHandler.AutoCommandHandler("TranslateCommandHandler")
public class TranslateCommandHandler {
/**
* 翻译(汉译韩或者韩译汉)
*
* @param translate
* @return
*/
@CommandHandler.AutoCommandHandler(SaveTranslate.TRANS_CMT)
public SaveTranslate translate(SaveTranslate translate) {
try {
translate.setResult(TranslateUtil.translateTest(translate.getContent()));
} catch (Exception e) {
e.getMessage();
}
return translate;
}
}
| [
"[email protected]"
] | |
265b86c5cc25f6af49b7ff1e5c29b7bc2f89c217 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--intellij-community/a431dfe358478db74f1ac7ab5bc9c433882e8223/before/ArgumentsValuesValidationInfo.java | 78e172f52d9e107648aa92ad1f8cd71f408b44d7 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,497 | java | /*
* Copyright 2000-2015 JetBrains s.r.o.
*
* 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.jetbrains.python.commandInterface.commandsWithArgs;
import com.intellij.util.containers.hash.HashMap;
import org.jetbrains.annotations.NotNull;
import java.util.Collections;
import java.util.Map;
/**
* Information about {@link com.jetbrains.python.commandInterface.commandsWithArgs.Argument arguments} values validation
*
* @author Ilya.Kazakevich
*/
public final class ArgumentsValuesValidationInfo {
/**
* Validation with out of any error
*/
@NotNull
static final ArgumentsValuesValidationInfo
NO_ERROR = new ArgumentsValuesValidationInfo(Collections.<Integer, ArgumentValueError>emptyMap(), false);
private final Map<Integer, ArgumentValueError> myPositionOfErrorArguments = new HashMap<Integer, ArgumentValueError>();
private final boolean myNotEnoughArguments;
/**
* @param positionOfErrorArguments map of [argument_position, its_value_error]
* @param notEnoughArguments true if not enough arguments values provided (i.e. some required arg missed)
*/
ArgumentsValuesValidationInfo(@NotNull final Map<Integer, ArgumentValueError> positionOfErrorArguments,
final boolean notEnoughArguments) {
myPositionOfErrorArguments.putAll(positionOfErrorArguments);
myNotEnoughArguments = notEnoughArguments;
}
/**
* @return map of [argument_position, its_value_error]
*/
@NotNull
Map<Integer, ArgumentValueError> getPositionOfErrorArguments() {
return Collections.unmodifiableMap(myPositionOfErrorArguments);
}
/**
* @return if not enough argument values provided (i.e. some required arg missed)
*/
boolean isNotEnoughArguments() {
return myNotEnoughArguments;
}
/**
* Type of argument value error.
*/
enum ArgumentValueError {
/**
* This argument is redundant
*/
EXCESS,
/**
* Argument has bad value
*/
BAD_VALUE
}
} | [
"[email protected]"
] | |
4e7d44ed6a97c2ee5f853e1d6b4cbdda18cdc7bc | 323ca94c8945e8198275f1ef627328174ddd6b83 | /src/main/java/org/filmticketorderingsystem/generator/OrderVerifiCodeGenerator.java | 8d85f89fdefc321b6d0ccb31b9b997fe9bc39872 | [
"Apache-2.0"
] | permissive | vtfate/FilmTicketOrderingSystem | 8acf48283906ec4ca2d471e592bdca556fa99fa5 | 5d19c39917cb94173ca408a47075defd77bcc5c7 | refs/heads/master | 2022-12-20T16:49:22.721921 | 2020-09-15T08:59:25 | 2020-09-15T08:59:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,844 | java | package org.filmticketorderingsystem.generator;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* Created by ���� on 2016/5/12.
* 订单验证码生成器,=年月日+秒数(5位,一天够用)+3位流水号
*/
public class OrderVerifiCodeGenerator {
private static OrderVerifiCodeGenerator generator = new OrderVerifiCodeGenerator();
//自认为同一时刻不会超过1000张订单数
private static final int MAX_SERIAL_NUMBER = 1000;
private static final int MAX_SEC = 99999;
//大于1000的话,可以利用5位数的最大值99999-一天的最大秒数86400的空间
//记录当前在 最大值99999-一天的最大秒数86400的空间 借到的开始值
private int now_borrow = MAX_SEC_OF_DAY;
//一天总秒数
private static final int MAX_SEC_OF_DAY = 24 * 60 * 60;//86400
//记录每个时刻的流水号
private Map<Integer, Integer> sec2SerialNumber = new HashMap<Integer, Integer>();
private SimpleDateFormat dateFormator = new SimpleDateFormat("yyyyMMdd");
private DecimalFormat secFormator = new DecimalFormat("00000");
private DecimalFormat serialNumFormator = new DecimalFormat("000");
private OrderVerifiCodeGenerator() {
for(int i = 0; i < MAX_SEC; i++){
sec2SerialNumber.put(i, 0);
}
}
public static OrderVerifiCodeGenerator getGenerator(){
if(generator != null){
synchronized (generator){
if(generator != null){
return generator;
}
else{
generator = new OrderVerifiCodeGenerator();
}
}
}
return null;
}
public String generate(Date now){
String nowStr = dateFormator.format(now);
Calendar calendar = new GregorianCalendar();
calendar.setTime(now);//转换现在的时间
int sec = calendar.get(Calendar.SECOND);
int minute = calendar.get(Calendar.MINUTE);
int hour = calendar.get(Calendar.HOUR_OF_DAY);
//把当前时刻转换成一天中的秒数形式
int secOfDay = getSecondOfDay(hour, minute, sec);
String secOfDayStr = secFormator.format(secOfDay);
int serialNumber = -1;
synchronized (sec2SerialNumber){
if(sec2SerialNumber.get(secOfDay) >= MAX_SERIAL_NUMBER){
//大于1000的话,可以利用5位数的最大值99999-一天的最大秒数86400的空间
//取一天中秒数的最大值来开始尝试借空间
int borrow = this.now_borrow;
if(sec2SerialNumber.get(borrow) >= MAX_SERIAL_NUMBER){
borrow ++;
}
//记录该借的空间位置值,以便于不用老是重新开始
this.now_borrow = borrow;
serialNumber = sec2SerialNumber.get(borrow);
sec2SerialNumber.put(borrow, serialNumber + 1);
}
else{
serialNumber = sec2SerialNumber.get(secOfDay);
sec2SerialNumber.put(secOfDay, serialNumber + 1);
}
}
if(serialNumber != -1){
String serialNumberStr = serialNumFormator.format(serialNumber);
return nowStr + secOfDayStr + serialNumberStr;
}
return null;
}
public boolean clear(){
boolean flag = false;
this.now_borrow = MAX_SEC_OF_DAY;
synchronized (sec2SerialNumber){
for(int i = 0; i < MAX_SEC; i++){
sec2SerialNumber.put(i, 0);
}
flag = true;
}
return flag;
}
private Integer getSecondOfDay(int hour, int minute, int second){
return hour*60*60 + minute * 60 + second;
}
}
| [
"[email protected]"
] | |
33ce6811aa70402044159fade5604eb65f278363 | a454eb47350c0846c87546aacdd8a8db539d7ec7 | /ccs-batch/src/main/java/com/sunline/ccs/batch/cc6000/P6012PointsPosting.java | 0ba204e1601a45abecd4414783cfeee729042d3e | [] | no_license | soldiers1989/guomei-code | a4cf353501419a620c0ff2b9d1f7009168a9ae5c | ebb85e52012c58708d3b19ee967944afae10ad87 | refs/heads/master | 2020-03-27T19:34:29.293383 | 2016-06-18T06:52:16 | 2016-06-18T06:53:43 | 146,998,057 | 0 | 1 | null | 2018-09-01T12:52:12 | 2018-09-01T12:52:12 | null | UTF-8 | Java | false | false | 4,368 | java | package com.sunline.ccs.batch.cc6000;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.sunline.ppy.dictionary.enums.DbCrInd;
import com.sunline.ppy.dictionary.enums.Indicator;
import com.sunline.ppy.dictionary.enums.PostTxnType;
import com.sunline.ppy.dictionary.enums.PostingFlag;
import com.sunline.ppy.dictionary.report.ccs.TxnPointsRptItem;
import com.sunline.pcm.service.sdk.UnifiedParameterFacility;
import com.sunline.ccs.batch.cc6000.common.LogicalModuleExecutor;
import com.sunline.ccs.facility.BlockCodeUtils;
import com.sunline.ccs.infrastructure.shared.model.CcsPostingTmp;
import com.sunline.ccs.param.def.MccCtrl;
import com.sunline.ccs.param.def.TxnCd;
import com.sunline.ccs.param.def.enums.LogicMod;
/**
* @see 类名:P6012PointsPosting
* @see 描述: 交易积分入账
* 范围:需要累计积分的交易(TXN_CODE【交易码参数表】;MCC_CTL【MCC参数控制表】;BLOCK_CD【锁定码参数表】)
*
* @see 创建日期: 2015-6-24上午10:05:43
* @author ChengChun
*
* @see 修改记录:
* @see [编号:日期_设计来源],[修改人:***],[方法名:***]
*/
@Component
public class P6012PointsPosting implements ItemProcessor<S6000AcctInfo, S6000AcctInfo> {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private UnifiedParameterFacility parameterFacility;
@Autowired
private BlockCodeUtils blockCodeUtils;
@Autowired
private LogicalModuleExecutor logicalModuleExecutor;
@Override
public S6000AcctInfo process(S6000AcctInfo item) throws Exception {
if (logger.isDebugEnabled()) {
logger.debug("交易积分入账:Org["+item.getAccount().getOrg()
+"],AcctType["+item.getAccount().getAcctType()
+"],AcctNo["+item.getAccount().getAcctNbr()
+"],TxnPost.size["+item.getTxnPosts().size()
+"]");
}
// 有锁定码指示不做积分的帐户,则所有交易不去积分
if (!blockCodeUtils.getMergedPointEarnInd(item.getAccount().getBlockCode())) return item;
for (CcsPostingTmp txnPost : item.getTxnPosts()) {
// 交易码参数
TxnCd txnCd = parameterFacility.loadParameter(txnPost.getTxnCode(), TxnCd.class);
// 金融交易累计积分
if(txnPost.getPostTxnType()==PostTxnType.M
// 锁定码指示判断累计积分
&& blockCodeUtils.getMergedPointEarnInd(txnPost.getCardBlockCode())
// 成功入账交易累计积分
&& txnPost.getPostingFlag() == PostingFlag.F00
// 交易码参数设定判断累计积分
&& txnCd.bonusPntInd == Indicator.Y){
// MCC参数设定判断累计积分. 若MCC不存在, 默认累计积分
MccCtrl mcc = parameterFacility.retrieveParameterObject(txnPost.getMcc()+"|CUP", MccCtrl.class);
if (mcc != null && !mcc.bonusPntInd) continue;
// 积分入账(61:积分增加; 62:积分减少; 63:积分兑换)
if (DbCrInd.D == txnCd.logicMod.getDbCrInd()) {
// 积分交易入账:61:积分增加;62:积分减少;63:积分兑换
logicalModuleExecutor.executeLogicalModule(LogicMod.L61, item, txnPost, null);
}
else if (DbCrInd.C == txnCd.logicMod.getDbCrInd()) {
// 积分交易入账:61:积分增加;62:积分减少;63:积分兑换
logicalModuleExecutor.executeLogicalModule(LogicMod.L62, item, txnPost, null);
}
// 增加内部生成积分交易报表
this.generateTxnPoints(item, txnPost);
}
}
return item;
}
/**
* 内部生成积分交易报表
* @param item
* @param txnPost
* @param point 交易积分
*/
public void generateTxnPoints(S6000AcctInfo item, CcsPostingTmp txnPost) {
TxnPointsRptItem txnPoints = new TxnPointsRptItem();
txnPoints.org = item.getAccount().getOrg();
txnPoints.acctNo = item.getAccount().getAcctNbr();
txnPoints.acctType = item.getAccount().getAcctType();
txnPoints.cardNo = txnPost.getCardNbr();
txnPoints.txnDate = txnPost.getTxnDate();
txnPoints.txnTime = txnPost.getTxnTime();
txnPoints.txnCode = txnPost.getTxnCode();
txnPoints.glPostAmt = txnPost.getPostAmt();
txnPoints.refNbr = txnPost.getRefNbr();
txnPoints.point = txnPost.getPoints();
item.getTxnPointss().add(txnPoints);
}
}
| [
"yuemk@sunline"
] | yuemk@sunline |
ff934c16e2004d11d9ea81170c3d9b14f37ba7e2 | a38288304a324f8ff54ef1d33b41e207e9d73919 | /src/main/java/ru/vallball/school01/config/ApplicationConfiguration.java | 695d6f48044804c122ee264589670e94181319a3 | [] | no_license | vall-ball/school01 | e96dce5379eee066682b51ae10b7261f48309806 | 143c69e22eed077335688f15adea741dcd1a776d | refs/heads/master | 2023-08-18T12:16:22.750571 | 2023-08-01T01:33:33 | 2023-08-01T01:33:33 | 219,927,893 | 0 | 0 | null | 2023-08-01T01:33:34 | 2019-11-06T06:31:33 | Java | UTF-8 | Java | false | false | 510 | java | package ru.vallball.school01.config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
@Configuration
@EnableWebMvc
@ComponentScan(basePackages = "ru.vallball.school01")
public class ApplicationConfiguration {
private static final Logger logger = LoggerFactory.getLogger(ApplicationConfiguration.class);
}
| [
"[email protected]"
] | |
2079dde06ce4b13ec0f8e2c21db79b3775172e01 | b7480175d6936def0062fcd7dd8dfd60506796be | /com/clubobsidian/obsidianengine/event/EventPriority.java | 6998fcb7c7f4ebc7b7245665ec1d788339dc1551 | [
"MIT",
"Apache-2.0"
] | permissive | virustotalop/ObsidianEngine | d5fcafe7644f0f5d9377d12d560f167af0d1c59f | 97ee169f53a1df9e43bd7b4d718e26a1cc4261f9 | refs/heads/master | 2021-01-11T10:11:30.739911 | 2016-10-31T10:28:46 | 2016-10-31T10:28:46 | 72,425,407 | 0 | 0 | null | 2016-10-31T10:18:00 | 2016-10-31T10:18:00 | null | UTF-8 | Java | false | false | 293 | java | package com.clubobsidian.obsidianengine.event;
public enum EventPriority {
LOWEST(0), LOW(1), NORMAL(2), HIGH(3), HIGHEST(4), MONITOR(5);
private int priority = 0;
EventPriority(int priority)
{
this.priority = priority;
}
public int getPriority()
{
return this.priority;
}
}
| [
"[email protected]"
] | |
d7ffcfd93761a92ab36859b395571ea7c1c40ae1 | e251534ffee715c1b5e7dfde41f37afaadcad839 | /java/java-tests/testData/inspection/duplicateBranchesInSwitchFix/beforeContinue.java | a61416708468c103a3280108ff4e4c40ba06de0e | [
"Apache-2.0"
] | permissive | iamzken/intellij-community | 88e1719e881435dc2672082658eac13801b6ab63 | ddf5753f87bfe3b3ac29da63256031f90a4cbb56 | refs/heads/master | 2020-04-15T09:17:44.129885 | 2019-01-07T19:33:53 | 2019-01-07T19:33:53 | 164,543,829 | 0 | 1 | Apache-2.0 | 2019-01-08T02:49:28 | 2019-01-08T02:49:27 | null | UTF-8 | Java | false | false | 517 | java | // "Merge with 'case 1:'" "GENERIC_ERROR_OR_WARNING"
class C {
int foo(int n) {
int s = 0;
for (int i = 0; i < n; i++) {
switch (i % 4) {
case 1:
s += i;
continue;
case 2:
continue;
case 3:
<caret>s += i;
continue;
default:
s += i;
}
s /= 2;
}
return s;
}
} | [
"[email protected]"
] | |
a8246cc95ceb5fa730553c7e2dd03d0fd36d8f89 | 339061e3a250d14e709e21f6b814cebedf0ffd3f | /spring-mvn-admin/spring-mvn-core/spring-mvn-core-amain/src/main/java/cn/spring/mvn/core/amain/PageEntity.java | 03c2a6d803057fc59102a714c3586adc100a2d9f | [] | no_license | liutao1024/github-mvn | f277daeabfdd58835d0c466c01a5b39107cc21fe | 0b58abc929c0d7ad771a8eeccdfdddc75d999b3f | refs/heads/master | 2021-07-08T16:51:46.482698 | 2019-01-30T05:24:20 | 2019-01-30T05:24:20 | 139,798,131 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 965 | java | package cn.spring.mvn.core.amain;
import java.util.Map;
public class PageEntity {
private Integer page; //目前是第几页
private Integer size; //每页大小
private Map<String, Object> params; //传入的参数
private String orderColumn;
private String orderTurn = "ASC";
public String getOrderColumn() {
return orderColumn;
}
public void setOrderColumn(String orderColumn) {
this.orderColumn = orderColumn;
}
public String getOrderTurn() {
return orderTurn;
}
public void setOrderTurn(String orderTurn) {
this.orderTurn = orderTurn;
}
public Integer getPage() {
return page;
}
public void setPage(Integer page) {
this.page = page;
}
public Integer getSize() {
return size;
}
public void setSize(Integer size) {
this.size = size;
}
public Map<String, Object> getParams() {
return params;
}
public void setParams(Map<String, Object> params) {
this.params = params;
}
}
| [
"[email protected]"
] | |
8e524082d22ea7812beeeb0adb9128f43efcc52f | b2f0af50fee2e195b953a7295c688f55e6d14e81 | /core/src/main/java/com/sdu/spark/utils/colleciton/KVArraySortDataFormat.java | 92e6cbf458d3e9c13f9e9343501aa4b1374ac37c | [] | no_license | nishuihanqiu/spark-java | f756eb69b26ab65fd0f280e6c9957dd7a794722b | 8469746291064493e24e338f74487e44024d82fa | refs/heads/master | 2022-11-19T18:40:31.875758 | 2019-04-15T15:18:21 | 2019-04-15T15:18:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,874 | java | package com.sdu.spark.utils.colleciton;
import com.sdu.spark.utils.scala.Tuple2;
/**
* Supports sorting an array of key-value pairs where the elements of the array alternate between
* keys and values, as used in {@link AppendOnlyMap}.
*
* K Type of the sort key of each element
*
* T Type of the Array we're sorting. Typically this must extend AnyRef, to support cases
* when the keys and values are not the same type.
*
* @author hanhan.zhang
* */
@SuppressWarnings("unchecked")
public class KVArraySortDataFormat<K, T> extends SortDataFormat<K, T[]>{
@Override
public K getKey(T[] data, int pos) {
return (K) data[2 * pos];
}
@Override
public void swap(T[] data, int pos0, int pos1) {
T tmpKey = data[2 * pos0];
T tmpValue = data[2 * pos0 + 1];
data[2 * pos0] = data[2 * pos1];
data[2 * pos0 + 1] = data[2 * pos1 + 1];
data[2 * pos1] = tmpKey;
data[2 * pos1 + 1] = tmpValue;
}
@Override
public void copyElement(T[] src, int srcPos, T[] dst, int dstPos) {
dst[2 * dstPos] = src[2 * srcPos];
dst[2 * dstPos + 1] = src[2 * srcPos + 1];
}
@Override
public void copyRange(T[] src, int srcPos, T[] dst, int dstPos, int length) {
System.arraycopy(src, 2 * srcPos, dst, 2 * dstPos, 2 * length);
}
@Override
public T[] allocate(int length) {
return (T[]) new Object[length * 2];
}
public static void main(String[] args) {
Object[] buffer = new Object[]{new Tuple2<>(1, "A"), 63, new Tuple2<>(1, "B"), 56, new Tuple2<>(2, "C"), 58};
KVArraySortDataFormat<Tuple2<Integer, String>, Object> dataFormat = new KVArraySortDataFormat<>();
Tuple2<Integer, String> key = dataFormat.getKey(buffer, 0);
System.out.println("Partition: " + key._1() + ", Key: " + key._2());
}
}
| [
"[email protected]"
] | |
04ec366d93ec4f9cc85630df83688edf9b5ff76e | c94f888541c0c430331110818ed7f3d6b27b788a | /yunqing/java/src/main/java/com/antgroup/antchain/openapi/yunqing/models/QuerySolutioninstanceRequest.java | 3b9961d590cd5ec6d35f1c00738f754d9d929bb0 | [
"MIT",
"Apache-2.0"
] | permissive | alipay/antchain-openapi-prod-sdk | 48534eb78878bd708a0c05f2fe280ba9c41d09ad | 5269b1f55f1fc19cf0584dc3ceea821d3f8f8632 | refs/heads/master | 2023-09-03T07:12:04.166131 | 2023-09-01T08:56:15 | 2023-09-01T08:56:15 | 275,521,177 | 9 | 10 | MIT | 2021-03-25T02:35:20 | 2020-06-28T06:22:14 | PHP | UTF-8 | Java | false | false | 1,942 | java | // This file is auto-generated, don't edit it. Thanks.
package com.antgroup.antchain.openapi.yunqing.models;
import com.aliyun.tea.*;
public class QuerySolutioninstanceRequest extends TeaModel {
// OAuth模式下的授权token
@NameInMap("auth_token")
public String authToken;
@NameInMap("product_instance_id")
public String productInstanceId;
// 环境id
@NameInMap("env_id")
@Validation(required = true)
public String envId;
// 当前页码,默认为1。
@NameInMap("page_num")
public Long pageNum;
// 分页大小,默认10,最大100。
//
@NameInMap("page_size")
public Long pageSize;
public static QuerySolutioninstanceRequest build(java.util.Map<String, ?> map) throws Exception {
QuerySolutioninstanceRequest self = new QuerySolutioninstanceRequest();
return TeaModel.build(map, self);
}
public QuerySolutioninstanceRequest setAuthToken(String authToken) {
this.authToken = authToken;
return this;
}
public String getAuthToken() {
return this.authToken;
}
public QuerySolutioninstanceRequest setProductInstanceId(String productInstanceId) {
this.productInstanceId = productInstanceId;
return this;
}
public String getProductInstanceId() {
return this.productInstanceId;
}
public QuerySolutioninstanceRequest setEnvId(String envId) {
this.envId = envId;
return this;
}
public String getEnvId() {
return this.envId;
}
public QuerySolutioninstanceRequest setPageNum(Long pageNum) {
this.pageNum = pageNum;
return this;
}
public Long getPageNum() {
return this.pageNum;
}
public QuerySolutioninstanceRequest setPageSize(Long pageSize) {
this.pageSize = pageSize;
return this;
}
public Long getPageSize() {
return this.pageSize;
}
}
| [
"[email protected]"
] | |
6b3adaf54d0b01862728733c6f649ca1d93f7e03 | 84cad0afa643c446a51123831dbcfde6c9d926a9 | /mes-root/mes-auto-core/src/main/java/com/hengyi/japp/mes/auto/interfaces/jikon/event/JikonAdapterSilkCarInfoFetchEvent.java | bd6e219aedb02923e59eae6728e2ac708f60830d | [] | no_license | HengYi-JAPP/mes | 280e62a92703c926a9cb5002b25365af9e498fe8 | c34aa362df7972a5c5ed0c65a7eb1a8b24a9437b | refs/heads/master | 2023-03-10T07:41:43.617327 | 2022-11-15T03:11:17 | 2022-11-15T03:11:17 | 164,339,876 | 1 | 1 | null | 2023-03-02T19:48:58 | 2019-01-06T19:46:43 | Java | UTF-8 | Java | false | false | 2,917 | java | package com.hengyi.japp.mes.auto.interfaces.jikon.event;
import com.fasterxml.jackson.databind.JsonNode;
import com.github.ixtf.japp.vertx.Jvertx;
import com.hengyi.japp.mes.auto.application.event.EventSource;
import com.hengyi.japp.mes.auto.application.event.EventSourceType;
import com.hengyi.japp.mes.auto.domain.Operator;
import com.hengyi.japp.mes.auto.domain.SilkRuntime;
import com.hengyi.japp.mes.auto.repository.OperatorRepository;
import io.reactivex.Completable;
import io.reactivex.Single;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.security.Principal;
import java.util.Collection;
import static com.github.ixtf.japp.core.Constant.MAPPER;
/**
* @author jzb 2018-06-21
*/
@Data
@EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
public class JikonAdapterSilkCarInfoFetchEvent extends EventSource {
private JsonNode command;
private String result;
@Override
public Collection<SilkRuntime> _calcSilkRuntimes(Collection<SilkRuntime> data) {
return data;
}
@Override
protected Completable _undo(Operator operator) {
throw new IllegalAccessError();
}
@Override
public EventSourceType getType() {
return EventSourceType.JikonAdapterSilkCarInfoFetchEvent;
}
@Override
public JsonNode toJsonNode() {
final DTO dto = MAPPER.convertValue(this, DTO.class);
return MAPPER.convertValue(dto, JsonNode.class);
}
@Data
@ToString(onlyExplicitlyIncluded = true)
@EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
public static class DTO extends EventSource.DTO {
private JsonNode command;
private String result;
public static DTO from(JsonNode jsonNode) {
return MAPPER.convertValue(jsonNode, DTO.class);
}
public Single<JikonAdapterSilkCarInfoFetchEvent> toEvent() {
final JikonAdapterSilkCarInfoFetchEvent event = new JikonAdapterSilkCarInfoFetchEvent();
event.setCommand(command);
event.setResult(result);
return toEvent(event);
}
}
/**
* @author jzb 2018-11-07
*/
@Data
public static class Command implements Serializable {
@NotBlank
private String silkcarCode;
public Single<JikonAdapterSilkCarInfoFetchEvent> toEvent(Principal principal) {
final OperatorRepository operatorRepository = Jvertx.getProxy(OperatorRepository.class);
final JikonAdapterSilkCarInfoFetchEvent event = new JikonAdapterSilkCarInfoFetchEvent();
event.setCommand(MAPPER.convertValue(this, JsonNode.class));
return operatorRepository.find(principal).map(it -> {
event.fire(it);
return event;
});
}
}
}
| [
"[email protected]"
] | |
5ca346feb4c5698617251aeafc51ff3c50a12e68 | d4005a7e9ee5e8421bfa5e614c67c06350df0fa5 | /Programmierung/Transshipment/src/applications/transshipment/model/schedule/scheduleSchemes/priorityrules/operations/EarliestFinishTimeRule.java | c1d3ffd54210560a11f52b27eda6c1c115705496 | [] | no_license | matthiasbode/multiskalen | cccf4ea7473f5362fd4d015881304d03baf15b79 | fb555ce9aa49a0e8d80a5688e5106701c36e737f | refs/heads/master | 2021-01-18T23:26:29.775565 | 2016-07-08T20:11:19 | 2016-07-08T20:11:19 | 34,849,433 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,609 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package applications.transshipment.model.schedule.scheduleSchemes.priorityrules.operations;
import applications.mmrcsp.model.basics.ActivityOnNodeGraph;
import applications.mmrcsp.model.operations.Operation;
import applications.mmrcsp.model.restrictions.precedence.EarliestAndLatestStartsAndEnds;
import applications.mmrcsp.model.schedule.Schedule;
import java.util.Collection;
import java.util.Map;
import math.FieldElement;
/**
* Sortiert RoutingTransportOperations dahingehend, dass die Operationen mit der
* geringsten frühsten Endzeit vorne in der Liste zu finden sind.
*
* @author bode
*/
public class EarliestFinishTimeRule<E extends Operation> implements OperationRules<E> {
Map<E, EarliestAndLatestStartsAndEnds> ealosaes;
@Override
public int compare(E o1, E o2) {
FieldElement earliestOperationEnd1 = ealosaes.get(o1).getEarliestEnd();
FieldElement earliestOperationEnd2 = ealosaes.get(o2).getEarliestEnd();
if (earliestOperationEnd1.equals(earliestOperationEnd2)) {
return 0;
}
return earliestOperationEnd1.isLowerThan(earliestOperationEnd2) ? -1 : 1;
}
@Override
public void setAdditionalInformation(Schedule schedule, Collection<E> operationsToSchedule,Map<E, EarliestAndLatestStartsAndEnds> ealosaes, ActivityOnNodeGraph<E> graph) {
if (ealosaes != null) {
this.ealosaes = ealosaes;
}
}
}
| [
"[email protected]"
] | |
428c3d303f5f9b46595b76ec1b14913b3dfaa398 | 5d7b7c9c49c3808bb638b986a00a87dabb3f4361 | /boot/security-redis-jpa-restdoc-swagger-jwt-email-angular-thymeleaf-multi/cores/core/src/main/java/com/ceragem/iot/core/domain/base/UserBase.java | 1651ca733c4a76a72803207e4f5804107e70cbc5 | [] | no_license | kopro-ov/lib-spring | f4e67f8d9e81f9ec4cfbf190e30479013a2bcc1c | 89e7d4b9a6318138d24f81e4e0fc2646f2d6a3d5 | refs/heads/master | 2023-04-04T07:56:14.312704 | 2021-02-15T01:59:59 | 2021-02-15T01:59:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,603 | java | package com.ceragem.iot.core.domain.base;
import com.ceragem.iot.core.model.ModelBase;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.PrePersist;
import java.io.Serializable;
import java.time.ZonedDateTime;
@Getter
@Setter
@MappedSuperclass
@EqualsAndHashCode(callSuper = false)
public class UserBase extends ModelBase implements Serializable {
@Id
@Column(name = "no")
Long no;
@Column(name = "login_type")
String login_type;
@Column(name = "id")
String id;
@Column(name = "email")
String email;
@Column(name = "name")
String name;
@Column(name = "image")
String image;
@Column(name = "phone")
String phone;
@Column(name = "join_channel")
String joinChannel;
@Column(name = "birth")
ZonedDateTime birth;
@Column(name = "join_date")
ZonedDateTime joinDate;
@Column(name = "last_login_date")
ZonedDateTime lastLoginDate;
@Column(name = "is_push")
Long isPush;
@Column(name = "machine_add_count")
Long machineAddCount;
@Column(name = "machine_use_count")
Long machineUseCount;
@Column(name = "is_machine_add")
Long isMachineAdd;
@Column(name = "machine_req_reg_date")
ZonedDateTime machineReqRegDate;
@Column(name = "total_mileage_point")
Long totalMileagePoint;
@Column(name = "total_use_second")
Long totalUseSecond;
@PrePersist
protected void onCreate() {
}
}
| [
"[email protected]"
] | |
acf2fead3d64eb567db03d412405f6fe62f34705 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/31/31_5f93ea0b746c1f06e951b671d2771c8f1a63f7fa/CmsIndex/31_5f93ea0b746c1f06e951b671d2771c8f1a63f7fa_CmsIndex_t.java | c3d5c36da73178bfbebfaa0d1844f75333270295 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 6,993 | java | package org.alt60m.cms.servlet;
import org.alt60m.util.ObjectHashUtil;
import java.io.IOException;
import java.util.*;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.lucene.index.*;
import org.apache.lucene.analysis.*;
import org.apache.lucene.document.*;
import org.apache.lucene.queryParser.*;
import org.apache.lucene.search.*;
public class CmsIndex {
static String searchIndexPath;
static String fileSpecsPath;
private static Log log = LogFactory.getLog(CmsIndex.class);
public CmsIndex() {}
public static void SetIndexPath(String searchIndexPathIn) {
searchIndexPath = searchIndexPathIn;
}
public static void setFileSpecsPath(String fileSpecsPath) {
CmsIndex.fileSpecsPath = fileSpecsPath;
}
public void populate() {
try {
IndexWriter writer = new IndexWriter(searchIndexPath, new SimpleAnalyzer(), true);
Hashtable fileSpecs = CmsFileSpecsProcessor.parse(fileSpecsPath);
// get all the files in the cms
org.alt60m.cms.model.File a = new org.alt60m.cms.model.File();
Vector fileSet = (Vector)ObjectHashUtil.list(a.selectList("1=1 order by CmsFileID"));
for (int i=0;i<fileSet.size();i++) {
Hashtable f = (Hashtable)fileSet.get(i);
log.debug("Indexing file " + f.get("FileId"));
add(f,writer,fileSpecs);
}
log.debug("Optimizing");
writer.optimize();
writer.close();
} catch (Exception e) {
log.error(e, e);
}
}
public static void add(Hashtable d) {
try {
IndexWriter writer;
writer = new IndexWriter(searchIndexPath, new SimpleAnalyzer(), false);
Hashtable fileSpecs = CmsFileSpecsProcessor.parse(fileSpecsPath);
add(d,writer,fileSpecs);
writer.close();
} catch (IOException ioe) {
log.error("Error while adding to search index!", ioe);
}
}
public static void add(Hashtable d, Hashtable fileSpecs) {
try {
IndexWriter writer;
writer = new IndexWriter(searchIndexPath, new SimpleAnalyzer(), false);
add(d,writer,fileSpecs);
writer.close();
} catch (IOException ioe) {
log.error("Error while adding to search index!", ioe);
}
}
public static void add(Hashtable d, IndexWriter writer, Hashtable fileSpecs) {
try {
String id = (String)d.get("FileId");
Document doc = new Document();
doc.add(Field.Keyword("FileId",id));
doc.add(Field.Text("title",(String)d.get("Title")));
doc.add(Field.Text("author",(String)d.get("Author")));
doc.add(Field.Text("submitter",(String)d.get("Submitter")));
doc.add(Field.Text("contact",(String)d.get("Contact")));
doc.add(Field.Text("keywords",(String)d.get("Keywords")));
doc.add(Field.Text("summary",(String)d.get("Summary")));
doc.add(Field.Keyword("language",(String)d.get("Language")));
try {doc.add(Field.Keyword("dateAdded",DateField.dateToString((Date)d.get("DateAdded"))));}
catch (NullPointerException ne) {doc.add(Field.Keyword("dateAdded",""));}
doc.add(Field.Keyword("quality",(String)d.get("Quality")));
doc.add(Field.Keyword("mime",(String)d.get("Mime")));
doc.add(Field.Keyword("url",(String)d.get("Url")));
doc.add(Field.Text("all",""+d.get("Title")+" "+d.get("Author")+" "+d.get("Submitter")+" "+d.get("Contact")+" "+d.get("Keywords")+" "+d.get("Summary")));
// add type of doc based on filespec type
String url = (String)d.get("Url");
try {
String ext = url.toLowerCase().substring(url.lastIndexOf("."));
if ((d.get("submitType")!=null)&&(d.get("submitType").equals("web"))) { ext = ".html"; }
if (((String)d.get("Url")).startsWith("http://")) { ext = ".html"; }
Hashtable fileSpec = (Hashtable)fileSpecs.get(ext);
if (fileSpec != null) {
doc.add(Field.Keyword("type",(String)fileSpec.get("Group")));
} else {
log.warn("File '" + d.get("Title") + "' with extension '" + ext + "' has no group");
doc.add(Field.Keyword("type","none"));
}
}
catch (StringIndexOutOfBoundsException sioobe)
{
doc.add(Field.Keyword("type","none"));
}
writer.addDocument(doc);
} catch (IOException ioe) {
log.error("Error while adding to search index!", ioe);
}
}
public static void update(Hashtable d, Hashtable fileSpecs) {
String url = (String)d.get("Url");
CmsIndex.remove(url);
CmsIndex.add(d, fileSpecs);
}
public static void remove(String id) {
try {
IndexReader reader = IndexReader.open(searchIndexPath);
//this should work but there is a bug in Lucene with using an int as a value for the term
//Term term = new Term("cmsFileId", id);
Term term = new Term("url", id);
reader.delete(term);
reader.close();
} catch (IOException ioe) {
log.error("Error while deleting from search index", ioe);
}
}
public static Hashtable search(String queryString) {
Hashtable h = new Hashtable();
try {
Query query = QueryParser.parse(queryString, "all", new StopAnalyzer());
h = CmsIndex.search(query);
} catch (ParseException pe) {
log.error(pe);
}
return h;
}
public static Hashtable search(Query query) {
Hashtable results = new Hashtable();
try {
Searcher searcher = new IndexSearcher(searchIndexPath);
new StopAnalyzer(); //Is this being used?
//Query query1 = QueryParser.parse(queryString+" +quality:1", "all", analyzer);
log.info("Searching for: " + query.toString("all"));
Hits hits = searcher.search(query);
log.info(hits.length() + " total matching document(s)");
for (int i=0; i < hits.length(); i++) {
Hashtable hit = new Hashtable();
hit.put("FileId",hits.doc(i).get("FileId"));
hit.put("Title",hits.doc(i).get("title"));
hit.put("Author",hits.doc(i).get("author"));
hit.put("Submitter",hits.doc(i).get("submitter"));
hit.put("Contact",hits.doc(i).get("contact"));
hit.put("Summary",hits.doc(i).get("summary"));
hit.put("Language",hits.doc(i).get("language"));
hit.put("DateAdded",hits.doc(i).get("dateAdded"));
hit.put("Quality",hits.doc(i).get("quality"));
hit.put("Mime",hits.doc(i).get("mime"));
hit.put("Url",hits.doc(i).get("url"));
hit.put("Score",Float.toString(hits.score(i)*100));
results.put(Integer.toString(i),hit);
}
searcher.close();
} catch (Exception e) {
log.error(" caught a " + e.getClass() +
"\n with message: " + e.getMessage());
}
return results;
}
// javac -d G:\ade4\classes G:\ade4\controlled-src\services-src\source\org\alt60m\cms\servlet\CmsIndex.java
public static void main(String[] args) {
CmsIndex ci = new CmsIndex();
log.info("Index creation Started");
ci.populate();
/*
Hashtable results = ci.search(args[0]);
for (int i=0;i<results.size();i++) {
Hashtable result = (Hashtable)results.get(new Integer(i).toString());
log.info((i+1) + ". " + result.get("Title") + " (" + result.get("Score") + "%)");
}
*/
}
}
| [
"[email protected]"
] | |
212f675019d3312c49c9031acb23c3d01c989eb8 | dfbae0a74fcb2434f2f58d7ccaccc618f3d503ca | /core-api/src/main/java/org/lemarche/core/shop/loyalty/LoyaltyPoints.java | d91d5b2de1ad6217c8dc5b832b7b40f0694190aa | [
"Apache-2.0"
] | permissive | rocher50/lemarche | ec391909507f124039e5c5455c44caccd70c802b | 479c2b9fc0e8b342f33e68b3949977335bc4d370 | refs/heads/master | 2021-07-06T11:23:28.907382 | 2017-10-03T23:02:19 | 2017-10-03T23:02:19 | 105,398,357 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 834 | java | /*
* Copyright 2017 Oleksiy Lubyanskyy and other contributors as indicated by
* the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lemarche.core.shop.loyalty;
/**
* @author olubyans
*
*/
public class LoyaltyPoints {
private long amount;
private LoyaltyProgram loyaltyProgrram;
}
| [
"[email protected]"
] | |
19902aa402ca298169db00b7252ce8f20420c5aa | 8ae88d7958e058e1f5bb2b67d6a657ca89ba26d6 | /app/src/androidTest/java/com/example/xlo/walletforandroid/settingTest/SettingTest.java | 083c2097859bcb717ff7817f96ee020b837000f6 | [] | no_license | xloypaypa/WalletForAndroidOld | 1aaf6cf13afff41522f56995332c10f014ddb893 | 1a17bfbec4de5e51277118a36b191324b7d32151 | refs/heads/master | 2021-01-18T01:43:42.263298 | 2015-06-16T05:49:59 | 2015-06-16T05:49:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 873 | java | package com.example.xlo.walletforandroid.settingTest;
import com.example.xlo.walletforandroid.baseTool.MainPageTest;
import com.example.xlo.walletforandroid.baseTool.TestCase;
import com.example.xlo.walletforandroid.userTest.LoginTest;
/**
* Created by LT on 2015/3/24.
*
*/
public class SettingTest extends TestCase {
@Override
public void setUp() throws Exception {
super.setUp();
LoginTest.createUserAndLogin();
MainPageTest.changeToPage("setting");
}
public static void toAdd(){
solo.clickOnButton("add money type");
solo.waitForDialogToOpen();
}
public static void toRename(){
solo.clickOnButton("rename money type");
solo.waitForDialogToOpen();
}
public static void toRemove(){
solo.clickOnButton("remove money type");
solo.waitForDialogToOpen();
}
}
| [
"[email protected]"
] | |
12a7a5274a03287a7f810a1665637adcd011c980 | 2f88a4c3357ca697b3666e7758548a93984884a8 | /src/main/java/com/miaoshaproject/service/impl/CacheServiceImpl.java | eca48598f84cac6861563135b037f2be2c78c5c8 | [] | no_license | ben1247/miaosha | 30b44a0b0c09af41dad86b9a5b4c0fb4b14bd74c | 72186119eac26afa38b5b643ddab1f494b30eb0d | refs/heads/master | 2022-07-08T07:45:19.558091 | 2021-03-22T07:00:22 | 2021-03-22T07:00:22 | 250,992,841 | 0 | 0 | null | 2022-06-21T03:05:20 | 2020-03-29T09:10:46 | Java | UTF-8 | Java | false | false | 1,118 | java | package com.miaoshaproject.service.impl;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.miaoshaproject.service.CacheService;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import java.util.concurrent.TimeUnit;
@Service
public class CacheServiceImpl implements CacheService {
private Cache<String,Object> commonCache = null;
@PostConstruct
public void init(){
commonCache = CacheBuilder.newBuilder()
// 设置缓存容器的初始容量为10
.initialCapacity(10)
// 设置缓存中最大可以存储100个Key,超过100个之后会按照LRU的策略移除缓存项
.maximumSize(100)
// 设置写缓存后多少秒过期
.expireAfterWrite(30, TimeUnit.SECONDS).build();
}
@Override
public void setCommonCache(String key, Object value) {
commonCache.put(key,value);
}
@Override
public Object getFromCommonCache(String key) {
return commonCache.getIfPresent(key);
}
}
| [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.