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
46ee94e14e3a3cf0352a250cd2fad366f533bad2
a4a51084cfb715c7076c810520542af38a854868
/src/main/java/com/litesuits/orm/db/annotation/Temporary.java
b5717fb839865809c388c0a7fec61fc932d37682
[]
no_license
BharathPalanivelu/repotest
ddaf56a94eb52867408e0e769f35bef2d815da72
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
refs/heads/master
2020-09-30T18:55:04.802341
2019-12-02T10:52:08
2019-12-02T10:52:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
300
java
package com.litesuits.orm.db.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface Temporary { }
[ "noiz354@gmail.com" ]
noiz354@gmail.com
695654fe5d0ab31f2892cd0a4853372b9dba82c0
e89285c055e2349e99f040eb5b420ebb792d27f9
/src/sword/IsSymmetric.java
87e407c43a4dd3b3faa059d3447f6057925e09de
[]
no_license
xjwhhh/LeetCode2019
afc3a34ee61cfefd464c57cb079d2e185f6b78ac
9ce005377f17faabd8adb16d8f3e093780b5b3e2
refs/heads/master
2022-04-25T06:13:23.356868
2020-04-23T07:47:38
2020-04-23T07:47:38
197,923,854
1
0
null
null
null
null
UTF-8
Java
false
false
668
java
package sword; /** * @Author JiaWei Xu * @Date 2020-02-28 14:41 * @Email xjwhhh233@outlook.com */ public class IsSymmetric { public boolean isSymmetric(TreeNode root) { if(root==null){ return true; } return helper(root.left,root.right); } private boolean helper(TreeNode left,TreeNode right){ if(left==null&&right==null){ return true; } if(left==null||right==null){ return false; } if(left.val==right.val){ return helper(left.left,right.right)&&helper(left.right,right.left); }else{ return false; } } }
[ "xjwhhh233@outlook.com" ]
xjwhhh233@outlook.com
950f63e8a9ad892a15a898aa2c4448fa20a93174
d1d0e40adcb6d764623aaf0be2f4a7f9729315c8
/src/main/java/com/lordjoe/voter/State.java
0650d9ffe8db98a9c5592f36fa95b835cbf1a2ad
[ "Apache-2.0" ]
permissive
lordjoe/VoterGuide
25458e46eb1b8719a56b85952e618a8e876e16ed
7a142649f69cb0ed82660cd2e88beebbbeb70a01
refs/heads/master
2021-01-17T11:14:39.190535
2016-07-24T04:56:08
2016-07-24T04:56:08
62,515,121
0
0
null
null
null
null
UTF-8
Java
false
false
4,595
java
package com.lordjoe.voter; import java.util.HashMap; import java.util.Map; public enum State { ALABAMA("Alabama", "AL"), ALASKA("Alaska", "AK"), // AMERICAN_SAMOA("American Samoa", "AS"), ARIZONA("Arizona", "AZ"), ARKANSAS("Arkansas", "AR"), CALIFORNIA("California", "CA"), COLORADO("Colorado", "CO"), CONNECTICUT("Connecticut", "CT"), DELAWARE("Delaware", "DE"), DISTRICT_OF_COLUMBIA("District of Columbia", "DC", false), // no senators // FEDERATED_STATES_OF_MICRONESIA("Federated States of Micronesia", "FM"), FLORIDA("Florida", "FL"), GEORGIA("Georgia", "GA"), // GUAM("Guam", "GU"), HAWAII("Hawaii", "HI"), IDAHO("Idaho", "ID"), ILLINOIS("Illinois", "IL"), INDIANA("Indiana", "IN"), IOWA("Iowa", "IA"), KANSAS("Kansas", "KS"), KENTUCKY("Kentucky", "KY"), LOUISIANA("Louisiana", "LA"), MAINE("Maine", "ME"), MARYLAND("Maryland", "MD"), // MARSHALL_ISLANDS("Marshall Islands", "MH"), MASSACHUSETTS("Massachusetts", "MA"), MICHIGAN("Michigan", "MI"), MINNESOTA("Minnesota", "MN"), MISSISSIPPI("Mississippi", "MS"), MISSOURI("Missouri", "MO"), MONTANA("Montana", "MT"), NEBRASKA("Nebraska", "NE"), NEVADA("Nevada", "NV"), NEW_HAMPSHIRE("New Hampshire", "NH"), NEW_JERSEY("New Jersey", "NJ"), NEW_MEXICO("New Mexico", "NM"), NEW_YORK("New York", "NY"), NORTH_CAROLINA("North Carolina", "NC"), NORTH_DAKOTA("North Dakota", "ND"), // NORTHERN_MARIANA_ISLANDS("Northern Mariana Islands", "MP"), OHIO("Ohio", "OH"), OKLAHOMA("Oklahoma", "OK"), OREGON("Oregon", "OR"), //PALAU("Palau", "PW"), PENNSYLVANIA("Pennsylvania", "PA"), // PUERTO_RICO("Puerto Rico", "PR"), RHODE_ISLAND("Rhode Island", "RI"), SOUTH_CAROLINA("South Carolina", "SC"), SOUTH_DAKOTA("South Dakota", "SD"), TENNESSEE("Tennessee", "TN"), TEXAS("Texas", "TX"), UTAH("Utah", "UT"), VERMONT("Vermont", "VT"), // VIRGIN_ISLANDS("Virgin Islands", "VI"), VIRGINIA("Virginia", "VA"), WASHINGTON("Washington", "WA"), WEST_VIRGINIA("West Virginia", "WV"), WISCONSIN("Wisconsin", "WI"), WYOMING("Wyoming", "WY"); /** * The state's name. */ private final String name; /** * The state's abbreviation. */ private final String abbreviation; private final boolean senators; /** * The set of states addressed by abbreviations. */ private static final Map<String, State> STATES_BY_ABBR = new HashMap<String, State>(); /* static initializer */ static { for (State state : values()) { STATES_BY_ABBR.put(state.getAbbreviation(), state); } } /** * Constructs a new state. * * @param name the state's name. * @param abbreviation the state's abbreviation. */ State(String name, String abbreviation) { this(name, abbreviation, true); } /** * Constructs a new state. * * @param name the state's name. * @param abbreviation the state's abbreviation. */ State(String name, String abbreviation, boolean hasSenator) { this.name = name; this.abbreviation = abbreviation; senators = hasSenator; } public boolean isSenators() { return senators; } /** * Returns the state's abbreviation. * * @return the state's abbreviation. */ public String getAbbreviation() { return abbreviation; } /** * Gets the enum constant with the specified abbreviation. * * @param abbr the state's abbreviation. * @return the enum constant with the specified abbreviation. * @throws SunlightException if the abbreviation is invalid. */ private static State valueOfAbbreviation(final String abbr) { final State state = STATES_BY_ABBR.get(abbr.toString()); if (state != null) { return state; } else { return null; } } public static State fromString(String test) { if (test.length() == 2) return valueOfAbbreviation(test.toUpperCase()); return valueOfName(test); } private static State valueOfName(final String name) { final String enumName = name.toUpperCase().replaceAll(" ", "_"); try { return valueOf(enumName); } catch (final IllegalArgumentException e) { return null; } } @Override public String toString() { return name; } }
[ "smlewis@lordjoe.com" ]
smlewis@lordjoe.com
ac1946a11e8c37e221ac44e3def2cbec55fe0cde
1a8cbeab80d9d685339a3658f0067f137e364b10
/src/test/java/com/github/signed/matcher/file/IsEmptyDirectory_OnARegularFileTest.java
48f6e1de9d4900c428e05b04da6f7d18d1acd33e
[]
no_license
signed/matchers
bf254d1ff5c905917cd4611e3fc6109ee361871b
fbd9307d228ee9aaec3ef8b9dfb7f50edfddc5e3
refs/heads/master
2020-06-02T16:51:18.015129
2014-09-06T20:16:32
2014-09-06T20:16:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,788
java
package com.github.signed.matcher.file; import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.StringDescription; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.mockito.Mockito; import java.io.File; import static com.github.signed.matcher.file.FileMatcherMother.mismatch; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; import static org.mockito.Mockito.doAnswer; public class IsEmptyDirectory_OnARegularFileTest { @Rule public TemporaryFolder folder = new TemporaryFolder(); private File aFile; @Before public void createARegularFile() throws Exception { aFile = folder.newFile("filename.txt"); } @Test public void doesNotMatchAFile() throws Exception { assertThat(matcherAppliedToAFile(), is(false)); } @Test public void writeFileName() throws Exception { assertThat(mismatchDescription(), is("mismatch description from IsADirectory")); } private String mismatchDescription() { Matcher<File> isADirectory = mismatch(); doAnswer(new MismatchDescription<File>("mismatch description from IsADirectory")).when(isADirectory).describeMismatch(Mockito.any(), Mockito.isA(Description.class)); Description description = new StringDescription(); createMatcherUnderTest(isADirectory).describeMismatch(aFile, description); return description.toString(); } private boolean matcherAppliedToAFile() { return createMatcherUnderTest(mismatch()).matches(aFile); } private IsEmptyDirectory createMatcherUnderTest(Matcher<File> isADirectory) { return new IsEmptyDirectory(isADirectory); } }
[ "thomas.heilbronner@gmail.com" ]
thomas.heilbronner@gmail.com
6a35ae74a5540a88c718f9ca71ac2bf4d9359aa6
483d588e1d73b9d1aee68c1ca7a7aa4255121d16
/plugins/org.integratedmodelling.thinklab.corescience/src/org/integratedmodelling/corescience/literals/MappedDoubleInterval.java
66ba8963b00474e0e3e2a3fa2633bcd28e0a3169
[]
no_license
fvilla/thinklab
cc4d10a9e9472512bdb7650970aa1ebc51dc9b53
d6881a1c142a9f71a7cdf6715fd6ef73304768f0
refs/heads/master
2020-05-17T07:05:12.729595
2011-04-20T09:18:54
2011-04-20T09:18:54
1,614,458
1
0
null
null
null
null
UTF-8
Java
false
false
1,476
java
package org.integratedmodelling.corescience.literals; import org.integratedmodelling.thinklab.exception.ThinklabValidationException; import org.integratedmodelling.thinklab.interfaces.knowledge.IConcept; import org.integratedmodelling.thinklab.literals.IntervalValue; import org.integratedmodelling.thinklab.literals.ParsedLiteralValue; /** * Maps numbers to other numbers * @author Ferdinando * */ public class MappedDoubleInterval extends ParsedLiteralValue { IntervalValue interval = null; String sform = null; Double mapped = null; public MappedDoubleInterval(String s) throws ThinklabValidationException { parseLiteral(s); } public MappedDoubleInterval(IConcept concept, IntervalValue val) { setConceptWithoutValidation(concept); interval = val; } @Override public void parseLiteral(String s) throws ThinklabValidationException { sform = s; int idx = s.indexOf(":"); if (idx < 0) throw new ThinklabValidationException("invalid mapped interval syntax: " + s); String cname = s.substring(0, idx).trim(); String intvs = s.substring(idx+1).trim(); interval = new IntervalValue(intvs); mapped = Double.parseDouble(cname); } public IntervalValue getInterval() { return interval; } public boolean contains(double d) { return interval.contains(d); } public double getValue() { return mapped; } public String toString() { return sform; } }
[ "fvilla@ca20354d-2f28-0410-8711-9259e250f5a2" ]
fvilla@ca20354d-2f28-0410-8711-9259e250f5a2
cf92a1470cd6b7fa64409684a5e75494979c498c
a12962dda3ab01d5bb40472c74a6f132b96cdc41
/smarthome_wl_simplify--/src/main/java/com/fbee/smarthome_wl/request/videolockreq/UserAuthRequest.java
4139353ce1775b1297744451c09301d3fe1859a2
[]
no_license
sengeiou/smarthome_wl_master1
bfc6c0447e252074f52eec71f09711f1258e8d5f
f69359df5e38d9283741621f82f5f17ae0b58c86
refs/heads/master
2021-10-10T02:13:34.351874
2019-01-06T12:51:56
2019-01-06T12:51:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package com.fbee.smarthome_wl.request.videolockreq; public class UserAuthRequest extends MnsBaseRequest { /** * username : 18888888888 */ private String username; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } }
[ "418265421@qq.com" ]
418265421@qq.com
75aa7dc3276898c620e621b435a4a140e386ed4e
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/138/445/CWE400_Resource_Exhaustion__getQueryString_Servlet_for_loop_81a.java
52969ad73eb6cedff9de5cf3ccf3eb1f78d1d3b2
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
4,972
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE400_Resource_Exhaustion__getQueryString_Servlet_for_loop_81a.java Label Definition File: CWE400_Resource_Exhaustion.label.xml Template File: sources-sinks-81a.tmpl.java */ /* * @description * CWE: 400 Resource Exhaustion * BadSource: getQueryString_Servlet Parse id param out of the URL query string (without using getParameter()) * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: for_loop * GoodSink: Validate count before using it as the loop variant in a for loop * BadSink : Use count as the loop variant in a for loop * Flow Variant: 81 Data flow: data passed in a parameter to an abstract method * * */ import javax.servlet.http.*; import java.util.StringTokenizer; import java.util.logging.Level; public class CWE400_Resource_Exhaustion__getQueryString_Servlet_for_loop_81a extends AbstractTestCaseServlet { public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { int count; count = Integer.MIN_VALUE; /* initialize count in case id is not in query string */ /* POTENTIAL FLAW: Parse id param out of the URL querystring (without using getParam) */ { StringTokenizer tokenizer = new StringTokenizer(request.getQueryString(), "&"); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); /* a token will be like "id=33" */ if(token.startsWith("id=")) /* check if we have the "id" parameter" */ { try { count = Integer.parseInt(token.substring(3)); /* set count to the int 33 */ } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception reading id from query string", exceptNumberFormat); } break; /* exit while loop */ } } } CWE400_Resource_Exhaustion__getQueryString_Servlet_for_loop_81_base baseObject = new CWE400_Resource_Exhaustion__getQueryString_Servlet_for_loop_81_bad(); baseObject.action(count , request, response); } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B(request, response); goodB2G(request, response); } /* goodG2B() - use GoodSource and BadSink */ private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable { int count; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ count = 2; CWE400_Resource_Exhaustion__getQueryString_Servlet_for_loop_81_base baseObject = new CWE400_Resource_Exhaustion__getQueryString_Servlet_for_loop_81_goodG2B(); baseObject.action(count , request, response); } /* goodB2G() - use BadSource and GoodSink */ private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable { int count; count = Integer.MIN_VALUE; /* initialize count in case id is not in query string */ /* POTENTIAL FLAW: Parse id param out of the URL querystring (without using getParam) */ { StringTokenizer tokenizer = new StringTokenizer(request.getQueryString(), "&"); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); /* a token will be like "id=33" */ if(token.startsWith("id=")) /* check if we have the "id" parameter" */ { try { count = Integer.parseInt(token.substring(3)); /* set count to the int 33 */ } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception reading id from query string", exceptNumberFormat); } break; /* exit while loop */ } } } CWE400_Resource_Exhaustion__getQueryString_Servlet_for_loop_81_base baseObject = new CWE400_Resource_Exhaustion__getQueryString_Servlet_for_loop_81_goodB2G(); baseObject.action(count , request, response); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
acf31ccf9d22451f71d0bba034a72494179e94fc
bb02cc49f82570dfd7c821aaf76eaefc27c8048f
/src/main/java/chapter02/Client.java
8c3ef3da70df5d02d752031880f2396216225fb6
[]
no_license
thedarkclouds/Design-Patterns
8b64649a07615d401d69d061231e0084e442f689
0d0aac48e4c6ced914e40bd843cff113715a397e
refs/heads/master
2020-09-21T09:42:48.910187
2019-11-09T11:43:37
2019-11-09T11:43:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
361
java
package chapter02; import java.util.HashMap; /** * @author xiangdotzhaoAtwoqutechcommacom * @date 2019/10/5 10:40 下午 */ public class Client { public static void main(String[] args) { invoker(); } private static void invoker() { Son f = new Son(); HashMap map = new HashMap(); f.doSomething(map); } }
[ "xiangflight@foxmail.com" ]
xiangflight@foxmail.com
3b44105f7b192495a8e8ce2eff612984e7794332
00d0086829b1017a440f1e5001994c9bb031ca26
/app/src/main/java/com/datalife/datalife/interf/OnDataListener.java
1dedb16ae26b34690b8db42a1e5a8a9d1da9876a
[]
no_license
lilinkun/DataLife
ac9a33ec9ee60029539b1f02071a584b15f17281
6ddf4c0303921f1efc47e9b82d219dd3e043ab33
refs/heads/master
2022-09-17T01:25:35.183761
2020-05-29T06:58:23
2020-05-29T06:58:23
267,791,912
0
0
null
null
null
null
UTF-8
Java
false
false
588
java
package com.datalife.datalife.interf; import com.datalife.datalife.dao.MachineBean; import com.datalife.datalife.dao.MachineBindMemberBean; import java.util.ArrayList; /** * Created by LG on 2018/2/1. */ public interface OnDataListener { public void onBack(); public void onPage(int page); public void onMember(ArrayList<MachineBindMemberBean> machineBindMemberBean,String machinebindid); public void onMachine(MachineBean machineBean); public void onChageMember(MachineBindMemberBean machineBindMemberBean); public void onBattery(int batteryValue); }
[ "294561531@qq.com" ]
294561531@qq.com
ab0aff9aaafc8d22c8b8f1531a175c849988b540
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE526_Info_Exposure_Environment_Variables/CWE526_Info_Exposure_Environment_Variables__Servlet_12.java
9b486cdcba6d5d186e368ded1cb1e52b8879d013
[]
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
2,338
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE526_Info_Exposure_Environment_Variables__Servlet_12.java Label Definition File: CWE526_Info_Exposure_Environment_Variables.label.xml Template File: point-flaw-12.tmpl.java */ /* * @description * CWE: 526 Information Exposure Through Environment Variables * Sinks: Servlet * GoodSink: no exposing * BadSink : expose the path variable to the user * Flow Variant: 12 Control flow: if(IO.staticReturnsTrueOrFalse()) * * */ package testcases.CWE526_Info_Exposure_Environment_Variables; import testcasesupport.*; import javax.servlet.http.*; public class CWE526_Info_Exposure_Environment_Variables__Servlet_12 extends AbstractTestCaseServlet { public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { if (IO.staticReturnsTrueOrFalse()) { /* FLAW: environment variable exposed */ response.getWriter().println("Not in path: " + System.getenv("PATH")); } else { /* FIX: error message is general */ response.getWriter().println("Not in path"); } } /* good1() changes the "if" so that both branches use the GoodSink */ private void good1(HttpServletRequest request, HttpServletResponse response) throws Throwable { if (IO.staticReturnsTrueOrFalse()) { /* FIX: error message is general */ response.getWriter().println("Not in path"); } else { /* FIX: error message is general */ response.getWriter().println("Not in path"); } } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { good1(request, response); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
98f2bdd848cd3502a9bffcb69a5b8dfed87c880c
1c488d7eda3a7e25477ef84e830f42efba538692
/src/tests/gov/nasa/jpf/symbc/symexectree/visualizer/concurrent/TestConcGetfield.java
39d26a316d58b7ef66ed7b5883060ddee5dc35c4
[]
no_license
imace/jpf-symbc
d7a8e005ef332ebf902ec7e67fdeda9cfed3e6eb
5921486bf6fc8b7ff708b7ed2b9c03e798da8cb6
refs/heads/master
2020-12-11T03:53:04.324316
2015-04-06T23:09:23
2015-04-06T23:09:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,896
java
/* * Copyright (C) 2014, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * All rights reserved. * * Symbolic Pathfinder (jpf-symbc) is 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 gov.nasa.jpf.symbc.symexectree.visualizer.concurrent; import gov.nasa.jpf.symbc.InvokeTest; import org.junit.Test; /** * @author Kasper S. Luckow <luckow@cs.aau.dk> * */ public class TestConcGetfield extends InvokeTest { private static final String SYM_METHOD = "+symbolic.method=gov.nasa.jpf.symbc.symexectree.visualizer.concurrent.TestConcGetfield$ConcCompute.run()"; private static final String CLASSPATH_UPDATED = "+classpath=${jpf-symbc}/build/tests;${jpf-symbc}/../SARTSBenchmarks/bin;${jpf-symbc}/../scjNoRelativeTime/bin;${jpf-symbc}/../JOP/bin"; private static final String LISTENER = "+listener = gov.nasa.jpf.symbc.symexectree.visualizer.SymExecTreeVisualizerListener"; //private static final String LISTENER = "+listener = gov.nasa.jpf.symbc.singlethreadanalysis.SingleThreadListener"; private static final String OUTPUTPATH = "+symbolic.visualizer.basepath = ${jpf-symbc}/prettyprint"; private static final String FORMAT = "+symbolic.visualizer.outputformat = pdf"; //private static final String DEBUG = "+symbolic.debug = false"; private static final String[] JPF_ARGS = {INSN_FACTORY, LISTENER, CLASSPATH_UPDATED, SYM_METHOD, OUTPUTPATH, FORMAT, // DEBUG }; public static void main(String[] args) { ConcCompute conc = new ConcCompute(); Thread t1 = new Thread(conc); Thread t2 = new Thread(new Racer(conc)); t1.start(); t2.start(); } @Test public void mainTest() { if (verifyNoPropertyViolation(JPF_ARGS)) { TestConcGetfield.main(null); } } static class ConcCompute implements Runnable { public boolean cond = false; @Override public void run() { if(cond) { //System.out.println("Cond is true"); int ta = 3 + 2; }else { //System.out.println("Cond is false"); int b = 4 + 2; b = 4 + 2; } } } static class Racer implements Runnable { private ConcCompute conc; public Racer(ConcCompute conc) { this.conc = conc; } @Override public void run() { this.conc.cond = true; } } }
[ "none@none" ]
none@none
3ac317fef372193e3e7266f4603c1ea371805024
4ad17f7216a2838f6cfecf77e216a8a882ad7093
/clbs/src/main/java/com/zw/platform/repository/oilsubsidy/CrudDao.java
b6f8ec6137c299d48d67a6f21c7b24ee593f74ee
[ "MIT" ]
permissive
djingwu/hybrid-development
b3c5eed36331fe1f404042b1e1900a3c6a6948e5
784c5227a73d1e6609b701a42ef4cdfd6400d2b7
refs/heads/main
2023-08-06T22:34:07.359495
2021-09-29T02:10:11
2021-09-29T02:10:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
921
java
package com.zw.platform.repository.oilsubsidy; import java.util.Collection; import java.util.List; import org.apache.ibatis.annotations.Param; import com.zw.platform.domain.oilsubsidy.line.LineDO; /** * @author wanxing * @Title: crud增删改类 * @date 2020/10/915:46 */ public interface CrudDao<D> { /** * 添加 * @param d * @return */ boolean add(D d); /** * 添加 * @param list * @return */ boolean addBatch(@Param("list") List<D> list); /** * 修改 * @param d * @return */ boolean update(D d); /** * 删除 * @param id * @return */ boolean delete(String id); /** * 删除 * @param id * @return */ boolean deleteBatch(@Param("list") Collection<String> id); /** * 获取 * @param id * @return */ LineDO getAllFieldById(String id); }
[ "wuxuetao@zwlbs.com" ]
wuxuetao@zwlbs.com
0df297aea782372c6f9101a70d80278cca26a1a6
800b992074dcc5451ce10caf8a30efdec54e884d
/src/Ch_05/Video05_03/End/CarRecordUtil.java
22ead19afb65f0d09e2239649673127380432940
[]
no_license
gauthierwakay/data-science-using-java
37fe2e9b139f8fc3c35cd1404246992da5c616d0
284b279b0ccdd58bbc0f4cf30c0d0b8a8749302b
refs/heads/master
2023-07-18T01:20:45.707587
2021-09-03T19:15:28
2021-09-03T19:15:28
402,875,471
0
0
null
null
null
null
UTF-8
Java
false
false
1,153
java
package Ch_05.Video05_03.End; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class CarRecordUtil { public static CarRecord parseCar(String dataString) { List<String> fields = new ArrayList<>(Arrays.asList(dataString.split("\\s+"))); try { Float mpg = Float.parseFloat(fields.get(0).trim()); Integer numberOfCylinders = Integer.parseInt(fields.get(1).trim()); Float displacement = Float.parseFloat(fields.get(2).trim()); Float weight = Float.parseFloat(fields.get(4).trim()); Integer year = Integer.parseInt(fields.get(6).trim()); Integer origin = Integer.parseInt(fields.get(7).trim()); return new CarRecord(mpg, numberOfCylinders, displacement, weight, year, origin); } catch (Exception e) { System.out.println("Exception: " + e.getMessage()); return null; } } public static Float getAverageMpg(List<CarRecord> cars) { Float sum = 0f; for (CarRecord car : cars) { sum += car.mpg; } return sum / cars.size(); } }
[ "jet9seven@gmail.com" ]
jet9seven@gmail.com
caee0ead6873480cde921be53f1e8f49e541d27e
655dca3d5b9535e1f70ca0788310fe68c867f46e
/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/ResponseFactory.java
992e37c885312fb6f4eaf09e7ee189bab5aa4ab1
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
DimitriosMaimaris/egeria
d610e9859366a4d94ef343d56f9bc83627834c9c
f26ced6dcdafd06d19404a66f85c306621612b7a
refs/heads/master
2020-07-21T08:42:14.028077
2020-05-13T11:26:37
2020-05-13T11:26:37
205,804,691
0
0
Apache-2.0
2019-09-02T07:52:28
2019-09-02T07:52:27
null
UTF-8
Java
false
false
4,100
java
/* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.subjectarea.server.mappers; import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Line; import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; import org.odpi.openmetadata.accessservices.subjectarea.responses.*; /** * This is a factory that is passed in the classname of a Line and the Line itself. It returns the appropriate * SubjectAreaOMASAPIResponse for use as a rest call response. The Line is embedded in these responses. */ public class ResponseFactory { /** * Get a response from the factory. * @param bundleName classname * @param line line object * @return SubjectAreaOMASAPIResponse rest response */ public SubjectAreaOMASAPIResponse getInstance(String bundleName, Line line) { SubjectAreaOMASAPIResponse response = null; if (bundleName.equals(Synonym.class.getName())){ response = new SynonymRelationshipResponse((Synonym)line); } else if (bundleName.equals(Antonym.class.getName())){ response = new AntonymRelationshipResponse((Antonym) line); } else if (bundleName.equals(TermCategorizationRelationship.class.getName())){ response = new TermCategorizationRelationshipResponse((TermCategorizationRelationship) line); } else if (bundleName.equals(ISARelationship.class.getName())){ response = new TermISARelationshipResponse((ISARelationship) line); } else if (bundleName.equals(PreferredTerm.class.getName())){ response = new PreferredTermRelationshipResponse((PreferredTerm) line); } else if (bundleName.equals(RelatedTerm.class.getName())){ response = new RelatedTermResponse((RelatedTerm) line); } else if (bundleName.equals(ReplacementTerm.class.getName())){ response = new ReplacementRelationshipResponse((ReplacementTerm) line); } else if (bundleName.equals(TermTYPEDBYRelationship.class.getName())){ response = new TermTYPEDBYRelationshipResponse((TermTYPEDBYRelationship) line); } else if (bundleName.equals(SemanticAssignment.class.getName())){ response = new SemanticAssignementRelationshipResponse((SemanticAssignment) line); } else if (bundleName.equals(TermCategorizationRelationship.class.getName())){ response = new TermCategorizationRelationshipResponse((TermCategorizationRelationship) line); } else if (bundleName.equals(TermHASARelationship.class.getName())){ response = new TermHASARelationshipResponse((TermHASARelationship) line); } else if (bundleName.equals(ISARelationship.class.getName())){ response = new TermISARelationshipResponse((ISARelationship) line); } else if (bundleName.equals(TermISATypeOFRelationship.class.getName())){ response = new TermISATYPEOFRelationshipResponse((TermISATypeOFRelationship) line); } else if (bundleName.equals(Translation.class.getName())) { response = new TranslationRelationshipResponse((Translation) line); } else if (bundleName.equals(UsedInContext.class.getName())) { response = new UsedInContextRelationshipResponse((UsedInContext) line); } else if (bundleName.equals(ValidValue.class.getName())) { response = new ValidValueRelationshipResponse((ValidValue) line); } else if (bundleName.equals(TermAnchorRelationship.class.getName())) { response = new TermAnchorRelationshipResponse((TermAnchorRelationship) line); } else if (bundleName.equals(CategoryAnchorRelationship.class.getName())) { response = new CategoryAnchorRelationshipResponse((CategoryAnchorRelationship) line); } else if (bundleName.equals(ProjectScopeRelationship.class.getName())) { response = new ProjectScopeRelationshipResponse((ProjectScopeRelationship) line); } return response; } }
[ "david_radley@uk.ibm.com" ]
david_radley@uk.ibm.com
da23e6b87cd59f728a89476ef79c2ebbf8771047
176e6d0562489a13487c55a1153a384487b6c6a6
/sources/com/reactnativecommunity/webview/RNCWebViewFileProvider.java
db41fc6325bfe99e54ff4c97643be3375742a529
[]
no_license
Robust-Binaries/PlantNetPlantIdentification_v3.0.2-Extracted
068be5bc2c8b7c0a7c1e37bf46d7dd5638803cb6
bb7b435367232b864aa3b2e96740a4900c91d6ff
refs/heads/master
2020-12-23T22:55:00.284246
2020-01-30T20:34:16
2020-01-30T20:34:16
237,298,297
1
0
null
null
null
null
UTF-8
Java
false
false
157
java
package com.reactnativecommunity.webview; import android.support.p000v4.content.FileProvider; public class RNCWebViewFileProvider extends FileProvider { }
[ "ingale2273@gmail.com" ]
ingale2273@gmail.com
39df9446b627a24a37a14a48b6ff5128f053784a
f33d56ac7fa70d716007087ac41c2bfc403f34a5
/itstack-demo-jvm-05/src/main/java/org/itstack/demo/jvm/instructions/loads/aload/ALOAD_0.java
fbd3a8a2709cd47f3b37195a0650269a8b3bb9d2
[]
no_license
fuzhengwei/itstack-demo-jvm
489259363e1596e72988fc4bcc0fbb1b766cd286
d26c3bbd9c92362ff54c7c25d812411569043761
refs/heads/master
2022-07-24T03:57:51.913090
2022-07-01T13:04:20
2022-07-01T13:04:20
184,681,281
310
112
null
2022-07-01T13:04:21
2019-05-03T01:13:22
Java
UTF-8
Java
false
false
379
java
package org.itstack.demo.jvm.instructions.loads.aload; import org.itstack.demo.jvm.instructions.base.InstructionNoOperands; import org.itstack.demo.jvm.rtda.Frame; public class ALOAD_0 extends InstructionNoOperands { @Override public void execute(Frame frame) { Object ref = frame.localVars().getRef(0); frame.operandStack().pushRef(ref); } }
[ "184172133@qq.com" ]
184172133@qq.com
dbb6bf8a247f306461efc871715e0ddd9803c8f6
c04851f97803e247a07f1dee2b4637c8ff66b941
/distributed-transaction-core/src/main/java/com/cym/distributed/transaction/core/netty/client/NettyClientChannelInitializer.java
1a8b5066bb872043ddaf5f9cca3ed36d00ecf0f7
[]
no_license
ming9562/distributed-transaction
f2be0c81e4e52cbefee880be31f8883ea06148fc
69dddb081fd48ae397379ef1dd0b373070b29562
refs/heads/master
2022-06-23T00:43:19.656858
2020-04-08T08:44:22
2020-04-08T08:44:22
202,698,074
0
0
null
2022-06-17T03:04:25
2019-08-16T09:20:21
Java
UTF-8
Java
false
false
490
java
package com.cym.distributed.transaction.core.netty.client; import io.netty.channel.ChannelInitializer; import io.netty.channel.socket.SocketChannel; /** * @author: YanmingChen * @date: 2019-08-06 * @time: 17:39 * @description: */ public class NettyClientChannelInitializer extends ChannelInitializer<SocketChannel> { @Override protected void initChannel(SocketChannel ch) throws Exception { ch.pipeline().addLast(new NettyClientInHandler());//注册handler } }
[ "l" ]
l
39fce996751bf016f28dbea1bc77050f7a438e67
cec1602d23034a8f6372c019e5770773f893a5f0
/sources/com/iwown/sport_module/gps/activity/SwipeBackActivity.java
0fec10f84548698a135845fe992439bde3516b1a
[]
no_license
sengeiou/zeroner_app
77fc7daa04c652a5cacaa0cb161edd338bfe2b52
e95ae1d7cfbab5ca1606ec9913416dadf7d29250
refs/heads/master
2022-03-31T06:55:26.896963
2020-01-24T09:20:37
2020-01-24T09:20:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,318
java
package com.iwown.sport_module.gps.activity; import android.app.Activity; import android.app.WallpaperManager; import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.view.LayoutInflater; import com.iwown.sport_module.R; import com.iwown.sport_module.gps.view.SwipeBackLayout; import com.iwown.sport_module.gps.view.WallpaperDrawable; public class SwipeBackActivity extends Activity { protected SwipeBackLayout layout; /* access modifiers changed from: protected */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.layout = (SwipeBackLayout) LayoutInflater.from(this).inflate(R.layout.sport_module_swipe_base, null); this.layout.attachToActivity(this); Drawable d = WallpaperManager.getInstance(this).getDrawable(); if (d != null) { new WallpaperDrawable().setBitmap(d); this.layout.setBackground(d); } } public void startActivity(Intent intent) { super.startActivity(intent); overridePendingTransition(R.anim.base_slide_right_in, R.anim.base_slide_remain); } public void onBackPressed() { super.onBackPressed(); overridePendingTransition(0, R.anim.base_slide_right_out); } }
[ "johan@sellstrom.me" ]
johan@sellstrom.me
7cbadb01e0633813efe50d7e6cd793708ff113e5
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/66/org/apache/commons/math/linear/SparseFieldVector_outerProduct_424.java
70786be2cb2f3eff83c51380c3131810b1922591
[]
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
1,390
java
org apach common math linear link field vector fieldvector link open int field hash map openinttofieldhashmap back store param type field element version revis date spars field vector sparsefieldvector field element fieldel field vector fieldvector serializ inherit doc inheritdoc field matrix fieldmatrix outer product outerproduct illeg argument except illegalargumentexcept check vector dimens checkvectordimens length field matrix fieldmatrix re spars field matrix sparsefieldmatrix field virtual size virtuals virtual size virtuals open int field hash map openinttofieldhashmap iter iter entri iter iter hasnext iter advanc row iter kei field element fieldel iter col col virtual size virtuals col re set entri setentri row col multipli col re
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
ab4c9b4fc99fd3d9500ecc00b4552fcfd98c5dda
a7966a303cf72fed1984fd495f74a9a83c96c9b7
/src/main/java/it/beije/gsl/rest/controller/DipendentiController.java
31d2ab2ffe3a1429fd35142d3c325c05d6b1d171
[]
no_license
beije-srl/gsl
a0ef68e3c74922bd7f6b20dd2e8e2c4596215023
c5c90e626cf4572a0c4a1494059ac18ef262c4b2
refs/heads/master
2020-04-24T10:09:52.204977
2019-02-21T14:15:26
2019-02-21T14:15:26
171,884,229
0
0
null
null
null
null
UTF-8
Java
false
false
3,017
java
package it.beije.gsl.rest.controller; import java.io.IOException; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.fasterxml.jackson.databind.ObjectMapper; import it.beije.gsl.dao.model.Dipendente; import it.beije.gsl.dao.model.FiltroDipendenti; import it.beije.gsl.rest.model.GetDipendenteByIdResponse; import it.beije.gsl.rest.model.GetListaDipendentiRestResponse; import it.beije.gsl.service.DipendenteService; /** * REST Services for handling employees. * * @author Donato Rimenti * */ @Controller @RequestMapping("/dipendenti") public class DipendentiController { /** * Logger. */ private final static Logger LOG = LoggerFactory.getLogger(DipendentiController.class); /** * Service for this class. */ @Autowired private DipendenteService service; /** * Returns a generic list of employees. * * @return a list of employees * @throws InterruptedException */ @RequestMapping(value = "/getListaDipendenti", method = RequestMethod.POST) public @ResponseBody GetListaDipendentiRestResponse getListaDipendenti(@RequestBody String filtroJson) { LOG.info("DipendentiController.getListaDipendenti()"); ObjectMapper mapper = new ObjectMapper(); FiltroDipendenti filtro=null; try { filtro = mapper.readValue(filtroJson, FiltroDipendenti.class); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } List<Dipendente> listaDipendenti = service.getListaDipendenti(filtro, 1, null); GetListaDipendentiRestResponse response = new GetListaDipendentiRestResponse(); response.setDipendenti(listaDipendenti); return response; } @RequestMapping(value = "/getDipendenteById", method = RequestMethod.GET) public @ResponseBody GetDipendenteByIdResponse getDipendenteById(@RequestParam int id){ GetDipendenteByIdResponse response = new GetDipendenteByIdResponse(); Dipendente dipendente = service.getDipendenteById(id); response.setDipendente(dipendente); return response; } /** * Deletes one employee. * * @return a boolean to confirm the operation */ // @RequestMapping(value = "/eliminaDipendente", method = RequestMethod.GET) // public @ResponseBody GetListaDipendentiRestResponse getListaDipendenti() { // LOG.info("DipendentiController.getListaDipendenti()"); // // List<Dipendente> listaDipendenti = service.getListaDipendenti(0, null); // // GetListaDipendentiRestResponse response = new GetListaDipendentiRestResponse(); // response.setDipendenti(listaDipendenti); // // return response; // } }
[ "donatohan.rimenti@gmail.com" ]
donatohan.rimenti@gmail.com
3adc7166e532bdb79be159b8af51ecea32ca026f
20eb62855cb3962c2d36fda4377dfd47d82eb777
/newEvaluatedBugs/Jsoup_38_buggy/mutated/921/Token.java
040f38ac1ec2811b3cfcac8091c6a70640c4aeab
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,521
java
package org.jsoup.parser; import org.jsoup.helper.Validate; import org.jsoup.nodes.Attribute; import org.jsoup.nodes.Attributes; /** * Parse tokens for the Tokeniser. */ abstract class Token { TokenType type; private Token() { } String tokenType() { return this.getClass().getSimpleName(); } static class Doctype extends Token { final StringBuilder name = new StringBuilder(); final StringBuilder publicIdentifier = new StringBuilder(); final StringBuilder systemIdentifier = new StringBuilder(); boolean forceQuirks = false; Doctype() { type = TokenType.Doctype; } String getName() { return name.toString(); } String getPublicIdentifier() { return publicIdentifier.toString(); } public String getSystemIdentifier() { return systemIdentifier.toString(); } public boolean isForceQuirks() { return forceQuirks; } } static abstract class Tag extends Token { protected String tagName; private String pendingAttributeName; // attribute names are generally caught in one hop, not accumulated private StringBuilder pendingAttributeValue; // but values are accumulated, from e.g. & in hrefs boolean selfClosing = false; Attributes attributes; // start tags get attributes on construction. End tags get attributes on first new attribute (but only for parser convenience, not used). void newAttribute() { if (attributes == null) attributes = new Attributes(); if (pendingAttributeName != null) { Attribute attribute; if (pendingAttributeValue == null) attribute = new Attribute(pendingAttributeName, ""); else attribute = new Attribute(pendingAttributeName, pendingAttributeValue.toString()); attributes.put(attribute); } pendingAttributeName = null; if (pendingAttributeValue != null) pendingAttributeValue.delete(0, pendingAttributeValue.length()); } void finaliseTag() { // finalises for emit if (pendingAttributeName != null) { // todo: check if attribute name exists; if so, drop and error newAttribute(); } } String name() { Validate.isFalse(tagName.length() == 0); return tagName; } Tag name(String name) { tagName = name; return this; } boolean isSelfClosing() { return selfClosing; } @SuppressWarnings({"TypeMayBeWeakened"}) Attributes getAttributes() { return attributes; } // these appenders are rarely hit in not null state-- caused by null chars. void appendTagName(String append) { tagName = tagName == null ? append : tagName.concat(append); } void appendTagName(char append) { appendTagName(String.valueOf(append)); } void appendAttributeName(String append) { pendingAttributeName = pendingAttributeName == null ? append : pendingAttributeName.concat(append); } void appendAttributeName(char append) { appendAttributeName(String.valueOf(append)); } void appendAttributeValue(String append) { pendingAttributeValue = pendingAttributeValue == null ? new StringBuilder(append) : pendingAttributeValue.append(append); } void appendAttributeValue(char append) { } } static class StartTag extends Tag { StartTag() { super(); attributes = new Attributes(); type = TokenType.StartTag; } StartTag(String name) { this(); this.tagName = name; } StartTag(String name, Attributes attributes) { this(); this.tagName = name; this.attributes = attributes; } @Override public String toString() { if (attributes != null && attributes.size() > 0) return "<" + name() + " " + attributes.toString() + ">"; else return "<" + name() + ">"; } } static class EndTag extends Tag{ EndTag() { super(); type = TokenType.EndTag; } EndTag(String name) { this(); this.tagName = name; } @Override public String toString() { return "</" + name() + ">"; } } static class Comment extends Token { final StringBuilder data = new StringBuilder(); Comment() { type = TokenType.Comment; } String getData() { return data.toString(); } @Override public String toString() { return "<!--" + getData() + "-->"; } } static class Character extends Token { private final String data; Character(String data) { type = TokenType.Character; this.data = data; } String getData() { return data; } @Override public String toString() { return getData(); } } static class EOF extends Token { EOF() { type = Token.TokenType.EOF; } } boolean isDoctype() { return type == TokenType.Doctype; } Doctype asDoctype() { return (Doctype) this; } boolean isStartTag() { return type == TokenType.StartTag; } StartTag asStartTag() { return (StartTag) this; } boolean isEndTag() { return type == TokenType.EndTag; } EndTag asEndTag() { return (EndTag) this; } boolean isComment() { return type == TokenType.Comment; } Comment asComment() { return (Comment) this; } boolean isCharacter() { return type == TokenType.Character; } Character asCharacter() { return (Character) this; } boolean isEOF() { return type == TokenType.EOF; } enum TokenType { Doctype, StartTag, EndTag, Comment, Character, EOF } }
[ "justinwm@163.com" ]
justinwm@163.com
eabb7979e8dc5940c4beef7b34e1cd7e8cd12630
8c5ba55e8c7913997e8994ecc191c5452d45c006
/mhosclient/.svn/pristine/eb/ebacf56b414873294f504633fe541252fc6b6355.svn-base
c0fc3157a28f9dfc5be21574d239e2ddd5243535
[]
no_license
QuellanAn/gitLearning
733315277428f403b47b884e708b47cf2d7cc429
3f50448dda1c57fc998aeba15aac0900e7ac2dfb
refs/heads/master
2021-01-15T18:35:47.930813
2017-08-09T10:14:13
2017-08-09T10:14:13
99,792,594
0
0
null
null
null
null
UTF-8
Java
false
false
236
package com.catic.mobilehos.pay.biz; import java.util.List; import com.catic.mobilehos.pay.entity.PayDictionary; public interface IPayDictionaryBiz { public List<PayDictionary> findAll(String dictionaryCode) throws Exception ; }
[ "1186154608@qq.com" ]
1186154608@qq.com
68c7301f5bae519fbbb9c3a4b921b383bb6704b3
ddce1fbc658e4bf9d124dc4acfc3914817a580a5
/sources/com/google/android/gms/internal/zzsz.java
ed90f6b7c0be3fc3efa9397578f2f92cf9c21811
[]
no_license
ShahedSabab/eExpense
1011f833a614c64cbb52a203821e38f18fce8a4f
b85c7ad6ee5ce6ae433a6220df182e14c0ea2d6d
refs/heads/master
2020-12-21T07:39:45.956655
2020-07-13T21:52:04
2020-07-13T21:52:04
235,963,863
0
0
null
null
null
null
UTF-8
Java
false
false
631
java
package com.google.android.gms.internal; import android.content.Context; public class zzsz { /* renamed from: GQ */ private static zzsz f807GQ = new zzsz(); /* renamed from: GP */ private zzsy f808GP = null; public static zzsy zzco(Context context) { return f807GQ.zzcn(context); } public synchronized zzsy zzcn(Context context) { if (this.f808GP == null) { if (context.getApplicationContext() != null) { context = context.getApplicationContext(); } this.f808GP = new zzsy(context); } return this.f808GP; } }
[ "59721350+ShahedSabab@users.noreply.github.com" ]
59721350+ShahedSabab@users.noreply.github.com
31d0c99b44d4f7ea1851c96618fcad9d0517a1fd
f9f664fade2b9936e3a450d9d0bba19fe50fbeb2
/cxf-mtom-java-first-soapHandler-example/cxf-mtom-soaphandler-client/src/main/java/com/example/attachment/GetAttachmentImplService.java
a31f3c94074dcf48767381432d06e1c382918ccd
[]
no_license
1984shekhar/fuse-my-examples
78c2898c2366649504bbe22480b894d29952d2a7
761db030c603b8398ea78a18a4cb2ade1a55b34f
refs/heads/master
2022-12-07T05:03:06.826126
2019-10-13T16:21:28
2019-10-13T16:21:28
30,963,768
0
4
null
2022-11-24T03:57:27
2015-02-18T11:58:40
Java
UTF-8
Java
false
false
3,564
java
package com.example.attachment; import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceFeature; import javax.xml.ws.Service; /** * This class was generated by Apache CXF 3.0.4 * 2015-03-17T14:23:35.647+05:30 * Generated source version: 3.0.4 * */ @WebServiceClient(name = "GetAttachmentImplService", wsdlLocation = "http://localhost:8181/cxf/receivemessage/attachment?wsdl", targetNamespace = "http://attachment.example.com/") public class GetAttachmentImplService extends Service { public final static URL WSDL_LOCATION; public final static QName SERVICE = new QName("http://attachment.example.com/", "GetAttachmentImplService"); public final static QName GetAttachmentImplPort = new QName("http://attachment.example.com/", "GetAttachmentImplPort"); static { URL url = null; try { url = new URL("http://localhost:8181/cxf/receivemessage/attachment?wsdl"); } catch (MalformedURLException e) { java.util.logging.Logger.getLogger(GetAttachmentImplService.class.getName()) .log(java.util.logging.Level.INFO, "Can not initialize the default wsdl from {0}", "http://localhost:8181/cxf/receivemessage/attachment?wsdl"); } WSDL_LOCATION = url; } public GetAttachmentImplService(URL wsdlLocation) { super(wsdlLocation, SERVICE); } public GetAttachmentImplService(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName); } public GetAttachmentImplService() { super(WSDL_LOCATION, SERVICE); } //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 //compliant code instead. public GetAttachmentImplService(WebServiceFeature ... features) { super(WSDL_LOCATION, SERVICE, features); } //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 //compliant code instead. public GetAttachmentImplService(URL wsdlLocation, WebServiceFeature ... features) { super(wsdlLocation, SERVICE, features); } //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 //compliant code instead. public GetAttachmentImplService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) { super(wsdlLocation, serviceName, features); } /** * * @return * returns GetAttachmentImpl */ @WebEndpoint(name = "GetAttachmentImplPort") public GetAttachmentImpl getGetAttachmentImplPort() { return super.getPort(GetAttachmentImplPort, GetAttachmentImpl.class); } /** * * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. * @return * returns GetAttachmentImpl */ @WebEndpoint(name = "GetAttachmentImplPort") public GetAttachmentImpl getGetAttachmentImplPort(WebServiceFeature... features) { return super.getPort(GetAttachmentImplPort, GetAttachmentImpl.class, features); } }
[ "shekhar.csp84@yahoo.co.in" ]
shekhar.csp84@yahoo.co.in
f21a17fd013443858b07953a1e8a84c7ff94d93c
39bef83f3a903f49344b907870feb10a3302e6e4
/Android Studio Projects/bf.io.openshop/src/com/facebook/internal/Utility$PermissionsPair.java
fd8778164bdc4b4bf8d46eadf28c0259b02baf96
[]
no_license
Killaker/Android
456acf38bc79030aff7610f5b7f5c1334a49f334
52a1a709a80778ec11b42dfe9dc1a4e755593812
refs/heads/master
2021-08-19T06:20:26.551947
2017-11-24T22:27:19
2017-11-24T22:27:19
111,960,738
0
0
null
null
null
null
UTF-8
Java
false
false
601
java
package com.facebook.internal; import java.util.*; public static class PermissionsPair { List<String> declinedPermissions; List<String> grantedPermissions; public PermissionsPair(final List<String> grantedPermissions, final List<String> declinedPermissions) { this.grantedPermissions = grantedPermissions; this.declinedPermissions = declinedPermissions; } public List<String> getDeclinedPermissions() { return this.declinedPermissions; } public List<String> getGrantedPermissions() { return this.grantedPermissions; } }
[ "ema1986ct@gmail.com" ]
ema1986ct@gmail.com
3e7a35bd8cc6b08ca3173bd9778f376fb9d0544c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/31/31_b452e65a50b0bd6c1d8d38215563fa1efb9fd99e/NetworkCatalogActivity/31_b452e65a50b0bd6c1d8d38215563fa1efb9fd99e_NetworkCatalogActivity_s.java
c78331d95cccddaefbc5005df9b6178f2b268e1e
[]
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
7,990
java
/* * Copyright (C) 2010 Geometer Plus <contact@geometerplus.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. */ package org.geometerplus.android.fbreader.network; import java.util.ArrayList; import android.os.Bundle; import android.view.*; import android.widget.BaseAdapter; import android.content.Intent; import org.geometerplus.zlibrary.core.network.ZLNetworkException; import org.geometerplus.fbreader.network.NetworkTree; import org.geometerplus.fbreader.network.NetworkCatalogItem; import org.geometerplus.fbreader.network.tree.*; public class NetworkCatalogActivity extends NetworkBaseActivity implements UserRegistrationConstants { public static final String CATALOG_LEVEL_KEY = "org.geometerplus.android.fbreader.network.CatalogLevel"; public static final String CATALOG_KEY_KEY = "org.geometerplus.android.fbreader.network.CatalogKey"; private NetworkCatalogTree myTree; private String myCatalogKey; private boolean myInProgress; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); final NetworkView networkView = NetworkView.Instance(); if (!networkView.isInitialized()) { finish(); return; } final Intent intent = getIntent(); final int level = intent.getIntExtra(CATALOG_LEVEL_KEY, -1); if (level == -1) { throw new RuntimeException("Catalog's Level was not specified!!!"); } myCatalogKey = intent.getStringExtra(CATALOG_KEY_KEY); if (myCatalogKey == null) { throw new RuntimeException("Catalog's Key was not specified!!!"); } final NetworkTree tree = networkView.getOpenedTree(level); if (!(tree instanceof NetworkCatalogTree)) { finish(); return; } myTree = (NetworkCatalogTree)tree; networkView.setOpenedActivity(myCatalogKey, this); setListAdapter(new CatalogAdapter()); getListView().invalidateViews(); setupTitle(); if (Util.isAccountRefillingSupported(this, myTree.Item.Link)) { setDefaultTree(new RefillAccountTree(myTree)); } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { switch (requestCode) { case USER_REGISTRATION_REQUEST_CODE: if (resultCode == RESULT_OK && data != null) { try { Util.runAfterRegistration( myTree.Item.Link.authenticationManager(), data ); } catch (ZLNetworkException e) { // TODO: show an error message } } break; } } private final void setupTitle() { String title = null; final NetworkView networkView = NetworkView.Instance(); if (networkView.isInitialized()) { final NetworkTreeActions actions = networkView.getActions(myTree); if (actions != null) { title = actions.getTreeTitle(myTree); } } if (title == null) { title = myTree.getName(); } setTitle(title); setProgressBarIndeterminateVisibility(myInProgress); } private static String getNetworkTreeKey(NetworkTree tree, boolean recursive) { if (tree instanceof NetworkCatalogTree) { return ((NetworkCatalogTree) tree).Item.URLByType.get(NetworkCatalogItem.URL_CATALOG); } else if (tree instanceof SearchItemTree) { return NetworkSearchActivity.SEARCH_RUNNABLE_KEY; } else if (recursive && tree.Parent instanceof NetworkTree) { if (tree instanceof NetworkAuthorTree || tree instanceof NetworkSeriesTree) { return getNetworkTreeKey((NetworkTree) tree.Parent, true); } } return null; } @Override public void onDestroy() { if (myTree != null && myCatalogKey != null && NetworkView.Instance().isInitialized()) { NetworkView.Instance().setOpenedActivity(myCatalogKey, null); } super.onDestroy(); } @Override public void onResume() { super.onResume(); } private final class CatalogAdapter extends BaseAdapter { private ArrayList<NetworkTree> mySpecialItems; public CatalogAdapter() { if (myTree instanceof NetworkCatalogRootTree) { mySpecialItems = new ArrayList<NetworkTree>(); if (Util.isAccountRefillingSupported(NetworkCatalogActivity.this, myTree.Item.Link)) { mySpecialItems.add(new RefillAccountTree(myTree)); } if (mySpecialItems.size() > 0) { mySpecialItems.trimToSize(); } else { mySpecialItems = null; } } } public final int getCount() { return myTree.subTrees().size() + ((mySpecialItems != null && !myInProgress) ? mySpecialItems.size() : 0); } public final NetworkTree getItem(int position) { if (position < 0) { return null; } if (position < myTree.subTrees().size()) { return (NetworkTree) myTree.subTrees().get(position); } if (myInProgress) { return null; } position -= myTree.subTrees().size(); if (mySpecialItems != null && position < mySpecialItems.size()) { return mySpecialItems.get(position); } return null; } public final long getItemId(int position) { return position; } public View getView(int position, View convertView, final ViewGroup parent) { final NetworkTree tree = getItem(position); return setupNetworkTreeItemView(convertView, parent, tree); } void onModelChanged() { notifyDataSetChanged(); if (mySpecialItems != null) { for (NetworkTree tree: mySpecialItems) { tree.invalidateChildren(); // call to update secondString } } } } @Override public void onModelChanged() { final NetworkView networkView = NetworkView.Instance(); final String key = getNetworkTreeKey(myTree, true); myInProgress = key != null && networkView.isInitialized() && networkView.containsItemsLoadingRunnable(key); getListView().invalidateViews(); /* * getListAdapter() always returns CatalogAdapter because onModelChanged() * can be called only after Activity's onStart() method (where NetworkView's * addEventListener() is called). Therefore CatalogAdapter will be set as * adapter in onCreate() method before any calls to onModelChanged(). */ ((CatalogAdapter) getListAdapter()).onModelChanged(); setupTitle(); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) { doStopLoading(); } return super.onKeyDown(keyCode, event); } private void doStopLoading() { final String key = getNetworkTreeKey(myTree, false); if (key != null && NetworkView.Instance().isInitialized()) { final ItemsLoadingRunnable runnable = NetworkView.Instance().getItemsLoadingRunnable(key); if (runnable != null) { runnable.interruptLoading(); } } } @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); return NetworkView.Instance().createOptionsMenu(menu, myTree); } @Override public boolean onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); return NetworkView.Instance().prepareOptionsMenu(this, menu, myTree); } @Override public boolean onOptionsItemSelected(MenuItem item) { if (NetworkView.Instance().runOptionsMenu(this, item, myTree)) { return true; } return super.onOptionsItemSelected(item); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
bb383a6d399eb978df4067bf5ee6967e72d7bd8e
8510169054c24a64a73013663a9aefa41c7f3047
/app/src/main/java/com/abcew/model/chain_of_responsibility/section1/Women.java
95fc2fcc8caafdadd10b6c4e7a6e36c88223ce0c
[]
no_license
joyoyao/Model
f06fb1006784072ff5fc3ad2b69f701d90b1586e
16b153bdd8013b487384058c4ed6f5a94ecef108
refs/heads/master
2020-03-22T10:10:03.469309
2016-12-04T08:30:31
2016-12-04T08:30:31
74,377,041
0
0
null
null
null
null
UTF-8
Java
false
false
697
java
package com.abcew.model.chain_of_responsibility.section1; /** * @author cbf4Life cbf4life@126.com * I'm glad to share my knowledge with you all. * 古代女性的总称 */ public class Women implements IWomen{ /* * 通过一个int类型的参数来描述妇女的个人状况 * 1---未出嫁 * 2---出嫁 * 3---夫死 */ private int type=0; //妇女的请示 private String request = ""; //构造函数传递过来请求 public Women(int _type,String _request){ this.type = _type; this.request = _request; } //获得自己的状况 public int getType(){ return this.type; } //获得妇女的请求 public String getRequest(){ return this.request; } }
[ "zaiyongs@gmail.com" ]
zaiyongs@gmail.com
a6dc26ba0aa7050267c877c62b7a19eea83c6501
3fe383525b2dcd3f9a405c5105a4562983c7f7fa
/jenabean/jenabean/src/test/java/test/id/TestUriEncoding.java
e53b5e21bc51ab6448f475dc9a408f13568357c9
[ "Apache-2.0", "MIT" ]
permissive
william-vw/mlod
7e013d999878a1fcd16e4add94e62626a16875a5
20d67f8790ef24527d2e0baff4b5dd053b5ab621
refs/heads/master
2023-07-25T12:35:00.658936
2022-03-02T16:03:55
2022-03-02T16:03:55
253,907,808
0
0
Apache-2.0
2023-07-23T11:15:08
2020-04-07T20:44:36
HTML
UTF-8
Java
false
false
667
java
package test.id; import org.junit.Test; import thewebsemantic.Bean2RDF; import thewebsemantic.RDF2Bean; import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; import static org.junit.Assert.*; public class TestUriEncoding { @Test public void basic() { String id = "please & encode me ?"; Model m = ModelFactory.createDefaultModel(); Bean2RDF writer = new Bean2RDF(m); Place bean = new Place(); bean.name = id; writer.save(bean); m.write(System.out, "N3"); RDF2Bean reader = new RDF2Bean(m); Place p = reader.load(Place.class, "please & encode me ?"); assertNotNull(p); assertEquals(id, p.name); } }
[ "william.van.woensel@gmail.com" ]
william.van.woensel@gmail.com
d73395628e83d000b00f008934c81b18db4de643
2a4d67bd20dfbe16717377c97dd388fa2c6c5c5f
/src/gui/DetailFrame.java
37f0253a97de1f7cd05d077aa7057c91f24a08c6
[]
no_license
otk2625/javaDBConnection
d395ea8d8dd6414ffbf97b5a0e9d5be6d3f72640
b3f37044971283bb313cfec1ccd9f7ad21f46293
refs/heads/master
2023-01-31T06:01:43.268988
2020-12-18T07:57:32
2020-12-18T07:57:32
322,530,203
0
0
null
null
null
null
UTF-8
Java
false
false
3,299
java
package gui; import java.awt.Container; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; import dao.UserDAO; import model.User; public class DetailFrame extends JFrame{ MainFrame mainFrame; DetailFrame detailFrame = this; int userId; UserDAO userDAO; JLabel nameLabel, phoneLabel, addressLabel, groupLabel; JTextField nameTF, phoneTF, addressTF, groupTF; JButton updateButton, deleteButton; Container backgroundPanel; // 원래 있는 JFrame이 가지고 있는 패널 public DetailFrame(MainFrame mainFrame, int id) { this.mainFrame = mainFrame; this.userId = id; setTitle("주소록 상세보기"); setSize(300, 300); setLocationRelativeTo(null); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); userDAO = new UserDAO(); initObject(); initData(); initDesign(); initListener(); setVisible(true); } void initData() { User user = userDAO.찾기(userId); nameTF.setText(user.getName()); phoneTF.setText(user.getPhone()); addressTF.setText(user.getAddress()); groupTF.setText(user.getRelation()); } void initDesign() { backgroundPanel.setLayout(new GridLayout(5,2)); backgroundPanel.add(nameLabel); backgroundPanel.add(nameTF); backgroundPanel.add(phoneLabel); backgroundPanel.add(phoneTF); backgroundPanel.add(addressLabel); backgroundPanel.add(addressTF); backgroundPanel.add(groupLabel); backgroundPanel.add(groupTF); backgroundPanel.add(updateButton); backgroundPanel.add(deleteButton); } void initObject() { backgroundPanel = getContentPane(); nameLabel = new JLabel("이름"); phoneLabel = new JLabel("전화번호"); addressLabel = new JLabel("주소"); groupLabel = new JLabel("그룹"); nameTF = new JTextField(); phoneTF = new JTextField(); addressTF = new JTextField(); groupTF = new JTextField(); updateButton = new JButton("수정하기"); deleteButton = new JButton("삭제하기"); } void initListener() { // 리스너 deleteButton.addActionListener(new ActionListener() { // 콜백함수 @Override public void actionPerformed(ActionEvent e) { // id값을 찾아야 됨. int id = userId; // UserDao의 삭제함수를 호출 userDAO.삭제하기(id); // detailFrame 을 닫고 detailFrame.dispose(); // 데이터 갱신 mainFrame.initData(); // mainFrame 을 보이게 하기 mainFrame.setVisible(true); } }); updateButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { int id = userId; String name= nameTF.getText(); String phone = phoneTF.getText(); String address = addressTF.getText(); String relation = groupTF.getText(); userDAO.수정하기(id, name, phone, address, relation); detailFrame.dispose(); mainFrame.initData(); mainFrame.setVisible(true); } }); this.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { mainFrame.setVisible(true); } }); } }
[ "xorud8531@gmail.com" ]
xorud8531@gmail.com
c21c5cf47ab72b6983b393d2794ff212c1afe6b5
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE80_XSS/CWE80_XSS__CWE182_getCookies_Servlet_52a.java
6d2d5e5d23af19af7bfaf44670130dd377fc4b4a
[]
no_license
glopezGitHub/Android23
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
refs/heads/master
2023-03-07T15:14:59.447795
2023-02-06T13:59:49
2023-02-06T13:59:49
6,856,387
0
3
null
2023-02-06T18:38:17
2012-11-25T22:04:23
Java
UTF-8
Java
false
false
2,476
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE80_XSS__CWE182_getCookies_Servlet_52a.java Label Definition File: CWE80_XSS__CWE182.label.xml Template File: sources-sink-52a.tmpl.java */ /* * @description * CWE: 80 Cross Site Scripting (XSS) * BadSource: getCookies_Servlet Read data from the first cookie using getCookies() * GoodSource: A hardcoded string * Sinks: * BadSink : Display of data in web page after using replaceAll() to remove script tags, which will still allow XSS (CWE 182: Collapse of Data into Unsafe Value) * Flow Variant: 52 Data flow: data passed as an argument from one method to another to another in three different classes in the same package * * */ package testcases.CWE80_XSS; import testcasesupport.*; import javax.servlet.http.*; import javax.servlet.http.*; public class CWE80_XSS__CWE182_getCookies_Servlet_52a extends AbstractTestCaseServlet { public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; data = ""; /* initialize data in case there are no cookies */ /* Read data from cookies */ { Cookie cookieSources[] = request.getCookies(); if (cookieSources != null) { /* POTENTIAL FLAW: Read data from the first cookie value */ data = cookieSources[0].getValue(); } } (new CWE80_XSS__CWE182_getCookies_Servlet_52b()).bad_sink(data , request, response); } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B(request, response); } /* goodG2B() - use goodsource and badsink */ private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; /* FIX: Use a hardcoded string */ data = "foo"; (new CWE80_XSS__CWE182_getCookies_Servlet_52b()).goodG2B_sink(data , request, response); } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "guillermo.pando@gmail.com" ]
guillermo.pando@gmail.com
c5fc50eebc4ccd56229b31ea89032bb77304c807
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/apache--storm/829ea117c8b382ef72d3c5df841534b89f06dffa/after/ClusterStateData.java
0fffe939273b56f2cae82a9486cd39b0155a134f
[]
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
3,300
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.storm.scheduler.resource; import org.apache.storm.scheduler.Cluster; import org.apache.storm.scheduler.ExecutorDetails; import org.apache.storm.scheduler.Topologies; import org.apache.storm.scheduler.TopologyDetails; import org.apache.storm.scheduler.WorkerSlot; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; /** * A class to specify which data and API to expose to a scheduling strategy */ public class ClusterStateData { private final Cluster cluster; public final Topologies topologies; // Information regarding all nodes in the cluster public Map<String, NodeDetails> nodes = new HashMap<String, NodeDetails>(); public static final class NodeDetails { private final RAS_Node node; public NodeDetails(RAS_Node node) { this.node = node; } public String getId() { return this.node.getId(); } public String getHostname() { return this.node.getHostname(); } public Collection<WorkerSlot> getFreeSlots() { return this.node.getFreeSlots(); } public void consumeResourcesforTask(ExecutorDetails exec, TopologyDetails topo) { this.node.consumeResourcesforTask(exec, topo); } public Double getAvailableMemoryResources() { return this.node.getAvailableMemoryResources(); } public Double getAvailableCpuResources() { return this.node.getAvailableCpuResources(); } public Double getTotalMemoryResources() { return this.node.getTotalMemoryResources(); } public Double getTotalCpuResources() { return this.node.getTotalCpuResources(); } } public ClusterStateData(Cluster cluster, Topologies topologies) { this.cluster = cluster; this.topologies = topologies; Map<String, RAS_Node> nodes = RAS_Nodes.getAllNodesFrom(cluster, topologies); for(Map.Entry<String, RAS_Node> entry : nodes.entrySet()) { this.nodes.put(entry.getKey(), new NodeDetails(entry.getValue())); } } public Collection<ExecutorDetails> getUnassignedExecutors(String topoId) { return this.cluster.getUnassignedExecutors(this.topologies.getById(topoId)); } public Map<String, List<String>> getNetworkTopography() { return this.cluster.getNetworkTopography(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
5a890e6b5b14b5d90111f25b728e95871d245aed
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/assets/MidasPay_zip/MidasPay_1.7.9a_179010_92809280434fe4a46110cc442b537591.jar/classes.jar/midas/x/l5.java
501184990ad515e5ce204f1e8c73345e7fdc2691
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,755
java
package midas.x; import android.text.TextUtils; public class l5 { public m5 a; public String b; public String c; public String d; public String e; public String f; public String g; public l5(m5 paramm5, String paramString1, String paramString2, String paramString3, String paramString4, String paramString5) { this.a = paramm5; this.b = paramString2; this.c = paramString3; this.d = paramString4; this.e = paramString5; } public boolean a() { Object localObject2 = this.a; if (!((m5)localObject2).d) { return true; } Object localObject1 = ((m5)localObject2).b; localObject2 = ((m5)localObject2).c; String str = this.c; if (!TextUtils.isEmpty((CharSequence)localObject1)) { if (TextUtils.isEmpty(str)) { return false; } StringBuilder localStringBuilder = new StringBuilder(); localStringBuilder.append((String)localObject2); localStringBuilder.append("."); localStringBuilder.append(str); localStringBuilder.append("."); localStringBuilder.append(this.e); localObject2 = localStringBuilder.toString(); try { localObject1 = u5.a(a.r().d, (String)localObject1, (String)localObject2); if (localObject1 != null) { return true; } } catch (Exception localException) { localException.printStackTrace(); } } return false; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\assets\MidasPay_zip\MidasPay_1.7.9a_179010_92809280434fe4a46110cc442b537591.jar\classes.jar * Qualified Name: midas.x.l5 * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
f4dd083ca600d8d516339ee5e325d5e045cde5ed
ca0e9689023cc9998c7f24b9e0532261fd976e0e
/src/android/support/v7/widget/SearchView$1.java
90121a8b86c5581a7f35f40f96d7a4f3c246abd4
[]
no_license
honeyflyfish/com.tencent.mm
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
ce6e605ff98164359a7073ab9a62a3f3101b8c34
refs/heads/master
2020-03-28T15:42:52.284117
2016-07-19T16:33:30
2016-07-19T16:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
995
java
package android.support.v7.widget; import android.content.Context; import android.view.inputmethod.InputMethodManager; import java.lang.reflect.Method; final class SearchView$1 implements Runnable { SearchView$1(SearchView paramSearchView) {} public final void run() { InputMethodManager localInputMethodManager = (InputMethodManager)rW.getContext().getSystemService("input_method"); SearchView.a locala; SearchView localSearchView; if (localInputMethodManager != null) { locala = SearchView.rK; localSearchView = rW; if (sa == null) {} } else { try { sa.invoke(localInputMethodManager, new Object[] { Integer.valueOf(0), null }); return; } catch (Exception localException) {} } localInputMethodManager.showSoftInput(localSearchView, 0); } } /* Location: * Qualified Name: android.support.v7.widget.SearchView.1 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
b7a125e186dac3cc2553883f73ef9775c9e91bbe
26183990a4c6b9f6104e6404ee212239da2d9f62
/components/job_processor/src/java/main/com/topcoder/util/scheduler/processor/JobProcessorException.java
d0784bc2683a3152d2897318e3fadf117449bc52
[]
no_license
topcoder-platform/tc-java-components
34c5798ece342a9f1804daeb5acc3ea4b0e0765b
51b204566eb0df3902624c15f4fb69b5f99dc61b
refs/heads/dev
2023-08-08T22:09:32.765506
2022-02-25T06:23:56
2022-02-25T06:23:56
138,811,944
0
8
null
2022-02-23T21:06:12
2018-06-27T01:10:36
Rich Text Format
UTF-8
Java
false
false
998
java
/* * Copyright (C) 2007 TopCoder Inc., All Rights Reserved. */ package com.topcoder.util.scheduler.processor; import com.topcoder.util.errorhandling.BaseException; /** * <p>This exception indicates a failure start or shutdown of the processor, but not used currently in this * component.</p> * <p>Thread safety: This class is thread-safe.</p> * * @author argolite, TCSDEVELOPER * @version 1.0 */ public class JobProcessorException extends BaseException { /** * <p> * Constructor with the error message. * </p> * @param message the error message */ public JobProcessorException(String message) { super(message); } /** * <p> * Constructor with the error message and cause exception. * </p> * @param message the error message * @param cause the cause exception */ public JobProcessorException(String message, Throwable cause) { super(message, cause); } }
[ "pvmagacho@gmail.com" ]
pvmagacho@gmail.com
e1ce0c24551c77c8565e4a3215ed11af869f5513
6c8e077c219a94497faef3678df5c25764e8f9c9
/bll2/src/main/java/com/maoding/system/service/impl/DataDictionaryServiceImpl.java
3c9b4fb726dad08d7f0fdfb13d07601757d177c9
[]
no_license
chengliangzhang/maoding-web
af30195f42de58191fb704bd9bb71a88ebd6e53c
acc39723ffe897f7ec5baa2c009642386acbbeaa
refs/heads/master
2021-05-02T12:48:12.210561
2018-09-26T06:49:14
2018-09-26T06:49:14
120,746,771
1
4
null
null
null
null
UTF-8
Java
false
false
1,814
java
package com.maoding.system.service.impl; import java.util.HashMap; import java.util.List; import java.util.Map; import com.maoding.core.base.dto.BaseDTO; import com.maoding.system.dto.DataDictionaryDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.maoding.core.base.service.GenericService; import com.maoding.system.dao.DataDictionaryDao; import com.maoding.system.entity.DataDictionaryEntity; import com.maoding.system.service.DataDictionaryService; /**深圳市设计同道技术有限公司 * 类 名:DataDictionaryServiceImpl * 类描述: * 作 者:Chenxj * 日 期:2015年12月31日-上午11:10:52 */ @Service("dataDictionaryService") public class DataDictionaryServiceImpl extends GenericService<DataDictionaryEntity> implements DataDictionaryService{ @Autowired private DataDictionaryDao dataDictionaryDao; @Override public List<DataDictionaryEntity> selectParentAndSubByCode(Map<String, Object> map) { return dataDictionaryDao.selectParentAndSubByCode(map); } @Override public List<DataDictionaryEntity> getSubDataByCode(String code) { return dataDictionaryDao.getSubDataByCode(code); } /** * 方法描述:根据code查出所有子集 * 作 者:wangrb * 日 期:2015年11月26日-下午2:44:44 * * @param code * @return */ @Override public List<DataDictionaryDTO> getSubDataByCodeToDTO(String code) throws Exception{ List<DataDictionaryEntity> list = this.getSubDataByCode(code); return BaseDTO.copyFields(list,DataDictionaryDTO.class); } @Override public List<DataDictionaryEntity> getDataByParemeter(Map<String, Object> map) { return dataDictionaryDao.getDataByParemeter(map); } }
[ "zhangchengliang@imaoding.com" ]
zhangchengliang@imaoding.com
cdcae8aec255d57c4839b98cac61858525bc2db2
1f080543b9783e4a03b99927e03a2eadace572a7
/VorobieiYevhen/src/main/java/week2/concole/Console.java
d84e07ce2555c8cb5f26fc9e2b05988467956fde
[]
no_license
shamanovskyi/ACP7-1
aeef483a217c80d62cb890f7c260e263843c8529
6daee39566edff91856bb8749f36a1b487c2c769
refs/heads/master
2021-05-31T11:05:57.553981
2015-10-23T19:47:38
2015-10-23T19:47:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,633
java
package week2.concole; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; public class Console { private static String PATH = "C:\\Users\\Джек\\GIT_SIMPLE\\ACP7\\VorobieiYevhen\\"; private String currentPath = PATH; private BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public Console() { } public void window() { while (true) { MyFileHelper fileHelper = new MyFileHelper(new File(currentPath)); System.out.println("\nEnter menu (\"help\") operation (Press \"Enter\" to exit)."); System.out.print(currentPath + " > "); String select = null; try { select = br.readLine(); } catch (IOException e) { e.printStackTrace(); } if (select.isEmpty()) { break; } switch (select.toLowerCase()) { case "cd": String newPath = fileHelper.cd(); currentPath = newPath != null ? newPath : PATH; break; case "help": fileHelper.help(); break; case "dir": fileHelper.dir(); break; case "tree": fileHelper.tree(); break; case "mkdir": fileHelper.mkdir(); break; case "mkfile": fileHelper.mkfile(); break; case "del": fileHelper.del(); break; case "rd": fileHelper.rd(); break; case "find": fileHelper.find(); break; case "type": fileHelper.type(); break; case "copy": fileHelper.copy(); break; case "fc": if (fileHelper.fc()) { System.out.println("Files have the same content"); } else { System.out.println("Files have different content"); } break; default: System.out.println("No such command. View \"Help menu\" - \"help\""); break; } } } }
[ "yevhenijvorobiei@gmail.com" ]
yevhenijvorobiei@gmail.com
aeb7ea6f2f878d62cd8ef81c404e30070eb51494
08107d0bfeaee362498b9f1a3c4537a8a2730bc4
/src/minecraft/mekanism/common/ItemElectricBow.java
8de5e27d92ab2ad6bb65cbbbf8f2438707f8de2a
[]
no_license
pinksheepdev/Mekanism
b2963110c42b83224f352d9e10e2d058f8c76801
d58222b028b642cc7841fc91689c508961bee7c4
refs/heads/master
2020-04-05T23:39:00.542780
2013-02-14T18:26:13
2013-02-14T18:26:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,561
java
package mekanism.common; import java.util.List; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.item.EnumAction; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public class ItemElectricBow extends ItemEnergized { public ItemElectricBow(int id) { super(id, 120000, 120); } @Override public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) { super.addInformation(itemstack, entityplayer, list, flag); list.add("Fire Mode: " + (getFireState(itemstack) ? "ON" : "OFF")); } @Override public void onPlayerStoppedUsing(ItemStack itemstack, World world, EntityPlayer player, int itemUseCount) { if(!player.isSneaking() && getJoules(itemstack) > 0) { boolean flag = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, itemstack) > 0; if (flag || player.inventory.hasItem(Item.arrow.itemID)) { int maxItemUse = getMaxItemUseDuration(itemstack) - itemUseCount; float f = (float)maxItemUse / 20F; f = (f * f + f * 2.0F) / 3F; if ((double)f < 0.1D) { return; } if (f > 1.0F) { f = 1.0F; } EntityArrow entityarrow = new EntityArrow(world, player, f * 2.0F); if (f == 1.0F) { entityarrow.setIsCritical(true); } if(!player.capabilities.isCreativeMode) { onUse((getFireState(itemstack) ? 1200 : 120), itemstack); } world.playSoundAtEntity(player, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F); if (flag) { entityarrow.canBePickedUp = 2; } else { player.inventory.consumeInventoryItem(Item.arrow.itemID); } if (!world.isRemote) { world.spawnEntityInWorld(entityarrow); entityarrow.setFire(getFireState(itemstack) ? 60 : 0); } } } } @Override public ItemStack onFoodEaten(ItemStack itemstack, World world, EntityPlayer entityplayer) { return itemstack; } @Override public int getMaxItemUseDuration(ItemStack itemstack) { return 0x11940; } @Override public EnumAction getItemUseAction(ItemStack itemstack) { return EnumAction.bow; } @Override public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer) { if(!entityplayer.isSneaking()) { if (entityplayer.capabilities.isCreativeMode || entityplayer.inventory.hasItem(Item.arrow.itemID)) { entityplayer.setItemInUse(itemstack, getMaxItemUseDuration(itemstack)); } } else { if(!world.isRemote) { setFireState(itemstack, !getFireState(itemstack)); entityplayer.addChatMessage(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + "Fire Mode: " + (getFireState(itemstack) ? (EnumColor.DARK_GREEN + "ON") : (EnumColor.DARK_RED + "OFF"))); } } return itemstack; } /** * Sets the bow's fire state in NBT. * @param itemstack - the bow's itemstack * @param state - state to change to */ public void setFireState(ItemStack itemstack, boolean state) { if(itemstack.stackTagCompound == null) { itemstack.setTagCompound(new NBTTagCompound()); } itemstack.stackTagCompound.setBoolean("fireState", state); } /** * Gets the bow's fire state from NBT. * @param itemstack - the bow's itemstack * @return fire state */ public boolean getFireState(ItemStack itemstack) { if(itemstack.stackTagCompound == null) { return false; } boolean state = false; if(itemstack.stackTagCompound.getTag("fireState") != null) { state = itemstack.stackTagCompound.getBoolean("fireState"); } return state; } @Override public boolean canProduceElectricity() { return false; } }
[ "aidancbrady@aol.com" ]
aidancbrady@aol.com
3f98485e5fc5cb9484384290613da3ad276c170c
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Time/8/org/joda/time/chrono/BasicMonthOfYearDateTimeField_getLeapDurationField_333.java
7ac5057412f3dec4298dead297e6de8243a55e23
[]
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
745
java
org joda time chrono time calcul month year compon time author gui allard author stephen colebourn author brian neill o'neil refactor month year date time field gjmonthofyeardatetimefield basic month year date time field basicmonthofyeardatetimefield imprecis date time field imprecisedatetimefield durat field durationfield leap durat field getleapdurationfield chronolog ichronolog dai
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
a4d805119bf99483d06448c99fabba6774405a73
4ca7f4e12a738f255d8757d2c2349cf4e9a70206
/uaa/src/main/java/com/fa/uaa/web/rest/errors/CustomParameterizedException.java
0095a9927e391e55c0316322beef9d6e9228d2e5
[]
no_license
chanduforstudy/appetency
59cf50d2e2e9c814d83169cbdf3d87282f91549c
884e70dd4c94b7c971796279403a0bb34e221325
refs/heads/master
2021-01-21T20:46:27.437530
2017-05-24T09:43:23
2017-05-24T09:43:23
92,275,956
0
0
null
null
null
null
UTF-8
Java
false
false
1,345
java
package com.fa.uaa.web.rest.errors; import java.util.HashMap; import java.util.Map; /** * Custom, parameterized exception, which can be translated on the client side. * For example: * * <pre> * throw new CustomParameterizedException(&quot;myCustomError&quot;, &quot;hello&quot;, &quot;world&quot;); * </pre> * * Can be translated with: * * <pre> * "error.myCustomError" : "The server says {{param0}} to {{param1}}" * </pre> */ public class CustomParameterizedException extends RuntimeException { private static final long serialVersionUID = 1L; private static final String PARAM = "param"; private final String message; private final Map<String, String> paramMap = new HashMap<>(); public CustomParameterizedException(String message, String... params) { super(message); this.message = message; if (params != null && params.length > 0) { for (int i = 0; i < params.length; i++) { paramMap.put(PARAM + i, params[i]); } } } public CustomParameterizedException(String message, Map<String, String> paramMap) { super(message); this.message = message; this.paramMap.putAll(paramMap); } public ParameterizedErrorVM getErrorVM() { return new ParameterizedErrorVM(message, paramMap); } }
[ "vagrant@vagrant.vm" ]
vagrant@vagrant.vm
05a6d31d624c148832dc63d0d142ea177702d722
beb2fbdd8e5343fe76c998824c7228a546884c5e
/com.kabam.marvelbattle/src/com/google/android/gms/internal/ee.java
b34fe82c4e59476946a585bf4e2beb3bd43ba10f
[]
no_license
alamom/mcoc_11.2.1_store_apk
4a988ab22d6c7ad0ca5740866045083ec396841b
b43c41d3e8a43f63863d710dad812774cd14ace0
refs/heads/master
2021-01-11T17:13:02.358134
2017-01-22T19:51:35
2017-01-22T19:51:35
79,740,812
0
0
null
null
null
null
UTF-8
Java
false
false
1,367
java
package com.google.android.gms.internal; import android.content.Intent; @ez public class ee { private final String oA; public ee(String paramString) { this.oA = paramString; } public boolean a(String paramString, int paramInt, Intent paramIntent) { boolean bool2 = false; boolean bool1 = bool2; if (paramString != null) { if (paramIntent != null) { break label22; } bool1 = bool2; } for (;;) { return bool1; label22: String str = ed.e(paramIntent); paramIntent = ed.f(paramIntent); bool1 = bool2; if (str != null) { bool1 = bool2; if (paramIntent != null) { if (!paramString.equals(ed.D(str))) { gs.W("Developer payload not match."); bool1 = bool2; } else if ((this.oA != null) && (!ef.b(this.oA, str, paramIntent))) { gs.W("Fail to verify signature."); bool1 = bool2; } else { bool1 = true; } } } } } public String ct() { return gj.jdMethod_do(); } } /* Location: C:\tools\androidhack\com.kabam.marvelbattle\classes.jar!\com\google\android\gms\internal\ee.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "eduard.martini@gmail.com" ]
eduard.martini@gmail.com
defb40ee6497700e3b8857bbd0e4deb85056776f
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_54689.java
9bdbac5101b914d4c688a19036bb118bbb57b5df
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
249
java
/** * Unsafe version of {@link #m_numSolverIterations(int) m_numSolverIterations}. */ public static void nm_numSolverIterations(long struct,int value){ UNSAFE.putInt(null,struct + B3PhysicsSimulationParameters.M_NUMSOLVERITERATIONS,value); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
fe148b36856d0d1228fcd2fe5949e7e9a0fd2cae
cbd81ef4aa9cc7d5d85ad7c18488e6757da5f80e
/shell/core/src/test/java/org/crsh/shell/TestInvocationContext.java
c16b84c82dcdbec25be94d74f392bf79853cd254
[]
no_license
itzg/crash
0d811a9f9d0d6178dd0eee9dcd482ea62b4c0970
dd6630d7431847fcb356b00236af801f4b594466
refs/heads/master
2020-12-25T05:03:19.832190
2013-02-11T20:36:53
2013-02-11T20:36:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,656
java
/* * Copyright (C) 2012 eXo Platform SAS. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.crsh.shell; import org.crsh.io.Pipe; import org.crsh.command.CommandInvoker; import org.crsh.command.ScriptException; import org.crsh.command.ShellCommand; import org.crsh.command.BaseCommandContext; import org.crsh.io.ProducerContext; import org.crsh.text.Chunk; import org.crsh.text.RenderPrintWriter; import org.crsh.text.ChunkBuffer; import java.io.IOException; import java.util.*; public class TestInvocationContext<C> extends BaseCommandContext implements ProducerContext<Object> { /** . */ protected List<Object> producedItems; /** . */ protected ChunkBuffer reader; /** . */ protected RenderPrintWriter writer; /** . */ private final Pipe<Object> producer = new Pipe<Object>() { public void provide(Object element) throws IOException { if (producedItems.isEmpty()) { producedItems = new LinkedList<Object>(); } producedItems.add(element); } public void flush() throws IOException { } }; public TestInvocationContext() { super(new HashMap<String, Object>(), new HashMap<String, Object>()); // this.reader = null; this.writer = null; this.producedItems = Collections.emptyList(); } public boolean takeAlternateBuffer() { return false; } public boolean releaseAlternateBuffer() { return false; } public Class<Object> getConsumedType() { return Object.class; } public int getWidth() { return 32; } public int getHeight() { return 40; } public String getProperty(String propertyName) { return null; } public String readLine(String msg, boolean echo) { throw new UnsupportedOperationException(); } public void provide(Object element) throws IOException { if (element instanceof Chunk) { if (reader == null) { reader = new ChunkBuffer(); } reader.provide((Chunk)element); } else { producer.provide(element); } } public void flush() throws IOException { producer.flush(); } public CommandInvoker<?, ?> resolve(String s) throws ScriptException, IOException { throw new UnsupportedOperationException(); } public List<Object> getProducedItems() { return producedItems; } public ChunkBuffer getReader() { return reader; } public String execute(ShellCommand command, String... args) throws Exception { if (reader != null) { reader.clear(); } StringBuilder sb = new StringBuilder(); for (String arg : args) { if (sb.length() > 0) { sb.append(" "); } sb.append(arg); } CommandInvoker<C, Object> invoker = (CommandInvoker<C, Object>)command.resolveInvoker(sb.toString()); invoker.setSession(this); invoker.open(this); invoker.flush(); invoker.close(); return reader != null ? reader.toString() : null; } }
[ "julien@julienviet.com" ]
julien@julienviet.com
90919f807747191e9a4190236964b241e2d691fa
6826e00925044a43e6175c7e5e0fe755e02b2e69
/Email_crypt/app/src/androidTest/java/com/android/emailcommon/DeviceTests.java
2d7a02ce4eb0a52e3fb34728551b93969a1a4611
[]
no_license
nazarcybulskij/DefaultEmail-OpenKeyChain
6e7fa5125221c218e3b08c2c918554da68dd265d
415ee83155a73725ba7bb768554e7813a8c6114c
refs/heads/master
2016-09-11T02:53:17.425139
2015-03-08T20:54:20
2015-03-08T20:54:20
31,715,869
0
0
null
null
null
null
UTF-8
Java
false
false
1,537
java
/* /* * Copyright (C) 2011 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.indeema.emailcommon; import android.content.Context; import android.telephony.TelephonyManager; import android.test.AndroidTestCase; import com.indeema.emailcommon.Device; import com.indeema.emailcommon.Logging; public class DeviceTests extends AndroidTestCase { public void testGetConsistentDeviceId() { TelephonyManager tm = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE); if (tm == null) { LogUtils.w(Logging.LOG_TAG, "TelephonyManager not supported. Skipping."); return; } // Note null is a valid return value. But still it should be consistent. final String deviceId = Device.getConsistentDeviceId(getContext()); final String deviceId2 = Device.getConsistentDeviceId(getContext()); // Should be consistent. assertEquals(deviceId, deviceId2); } }
[ "nazar.cybulskij@optigra-soft.com" ]
nazar.cybulskij@optigra-soft.com
8805fa841eab351d402df820afe3f3e9993548b3
14a04ee9201a198259f18b5fe0dcc12e3f99d60e
/app/src/main/java/com/szfp/ss/retrofit/converter/StringConverterFactory.java
5c2c0b14fa5a2aab35298149cfd1e9c842e63d4d
[]
no_license
CNHTT/ShutdownSystem
89d2c8e6e7a2f218c80960396ac984c6cd67ef51
33db7d9792ba0adc529f2dab98d697eaa6914ece
refs/heads/master
2021-01-20T04:55:21.124969
2017-11-14T11:00:43
2017-11-14T11:00:43
101,394,309
0
0
null
null
null
null
UTF-8
Java
false
false
1,020
java
package com.szfp.ss.retrofit.converter; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import okhttp3.RequestBody; import okhttp3.ResponseBody; import retrofit2.Converter; import retrofit2.Retrofit; /** * Created by 戴尔 on 2017/11/9. */ public class StringConverterFactory extends Converter.Factory { public static StringConverterFactory create() { return new StringConverterFactory(); } private StringConverterFactory() { } @Override public Converter<ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit) { return new StringResponseBodyConverter(); } @Override public Converter<?, RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) { return new StringRequestBodyConverter(); } }
[ "cnhttt@163.com" ]
cnhttt@163.com
fe03065491f9ccb312c3c12331918df0560ea3c2
958b13739d7da564749737cb848200da5bd476eb
/src/main/java/com/alipay/api/response/AlipayOpenPublicGisQueryResponse.java
bb079b83326b85d589c94bdd78d0493f4d78e2d3
[ "Apache-2.0" ]
permissive
anywhere/alipay-sdk-java-all
0a181c934ca84654d6d2f25f199bf4215c167bd2
649e6ff0633ebfca93a071ff575bacad4311cdd4
refs/heads/master
2023-02-13T02:09:28.859092
2021-01-14T03:17:27
2021-01-14T03:17:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,543
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.open.public.gis.query response. * * @author auto create * @since 1.0, 2020-08-25 11:05:59 */ public class AlipayOpenPublicGisQueryResponse extends AlipayResponse { private static final long serialVersionUID = 8833462195846378312L; /** * 精确度 */ @ApiField("accuracy") private String accuracy; /** * 经纬度所在位置 */ @ApiField("city") private String city; /** * 纬度信息 */ @ApiField("latitude") private String latitude; /** * 经度信息 */ @ApiField("longitude") private String longitude; /** * 经纬度对应位置所在的省份 */ @ApiField("province") private String province; public void setAccuracy(String accuracy) { this.accuracy = accuracy; } public String getAccuracy( ) { return this.accuracy; } public void setCity(String city) { this.city = city; } public String getCity( ) { return this.city; } public void setLatitude(String latitude) { this.latitude = latitude; } public String getLatitude( ) { return this.latitude; } public void setLongitude(String longitude) { this.longitude = longitude; } public String getLongitude( ) { return this.longitude; } public void setProvince(String province) { this.province = province; } public String getProvince( ) { return this.province; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
9558f4198ebad77c86258e70cfde85c650ad4e8f
8934eb9db1839465d0c86fe36b864ec08cba029f
/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/JndiRedissonSessionManager.java
3fcd00531665da108371e9eba06da7df3624edab
[ "Apache-2.0", "LicenseRef-scancode-dco-1.1" ]
permissive
deerRule/redisson
650fb310817e231da6ab9455fedca5b6cbf3b07d
75b37cdd63d881150de4a6b60f07c92ed1473b7e
refs/heads/master
2023-08-30T14:00:01.654180
2021-11-02T10:56:15
2021-11-02T10:56:15
423,310,213
2
0
Apache-2.0
2021-11-02T09:43:44
2021-11-01T02:10:58
Java
UTF-8
Java
false
false
2,209
java
/** * Copyright (c) 2013-2021 Nikita Koksharov * * 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.redisson.tomcat; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.apache.catalina.LifecycleException; import org.redisson.api.RedissonClient; /** * Redisson Session Manager for Apache Tomcat. * Uses Redisson instance located in JNDI. * * @author Nikita Koksharov * */ public class JndiRedissonSessionManager extends RedissonSessionManager { private String jndiName; @Override public void setConfigPath(String configPath) { throw new IllegalArgumentException("configPath is unavaialble for JNDI based manager"); } @Override protected RedissonClient buildClient() throws LifecycleException { InitialContext context = null; try { context = new InitialContext(); Context envCtx = (Context) context.lookup("java:comp/env"); return (RedissonClient) envCtx.lookup(jndiName); } catch (NamingException e) { throw new LifecycleException("Unable to locate Redisson instance by name: " + jndiName, e); } finally { if (context != null) { try { context.close(); } catch (NamingException e) { throw new LifecycleException("Unable to close JNDI context", e); } } } } public String getJndiName() { return jndiName; } public void setJndiName(String jndiName) { this.jndiName = jndiName; } @Override protected void shutdownRedisson() { } }
[ "nkoksharov@redisson.pro" ]
nkoksharov@redisson.pro
d2b49df69905ec6dc3f93d4fedfe0c1a6205d586
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/checkstyle_cluster/8845/tar_1.java
80ec15e4a0e9551f3ff3f2368085dc7f3719fccb
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,026
java
//////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code for adherence to a set of rules. // Copyright (C) 2001-2008 Oliver Burn // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// package com.puppycrawl.tools.checkstyle.checks.whitespace; import com.puppycrawl.tools.checkstyle.api.Check; import com.puppycrawl.tools.checkstyle.api.TokenTypes; import com.puppycrawl.tools.checkstyle.api.DetailAST; /** * <p> * Checks that a token is followed by whitespace, with the exception that it * does not check for whitespace after the semicolon of an empty for iterator. * Use Check {@link EmptyForIteratorPadCheck EmptyForIteratorPad} to validate * empty for iterators. * </p> * <p> By default the check will check the following tokens: * {@link TokenTypes#COMMA COMMA}, * {@link TokenTypes#SEMI SEMI}, * {@link TokenTypes#TYPECAST TYPECAST}. * </p> * <p> * An example of how to configure the check is: * </p> * <pre> * &lt;module name="WhitespaceAfter"/&gt; * </pre> * <p> An example of how to configure the check for whitespace only after * {@link TokenTypes#COMMA COMMA} and {@link TokenTypes#SEMI SEMI} tokens is: * </p> * <pre> * &lt;module name="WhitespaceAfter"&gt; * &lt;property name="tokens" value="COMMA, SEMI"/&gt; * &lt;/module&gt; * </pre> * @author Oliver Burn * @author Rick Giles * @version 1.0 */ public class WhitespaceAfterCheck extends Check { @Override public int[] getDefaultTokens() { return new int[] { TokenTypes.COMMA, TokenTypes.SEMI, TokenTypes.TYPECAST, }; } @Override public void visitToken(DetailAST aAST) { final Object[] message; final DetailAST targetAST; if (aAST.getType() == TokenTypes.TYPECAST) { targetAST = aAST.findFirstToken(TokenTypes.RPAREN); // TODO: i18n message = new Object[]{"cast"}; } else { targetAST = aAST; message = new Object[]{aAST.getText()}; } final String line = getLines()[targetAST.getLineNo() - 1]; final int after = targetAST.getColumnNo() + targetAST.getText().length(); if (after < line.length()) { final char charAfter = line.charAt(after); if ((targetAST.getType() == TokenTypes.SEMI) && ((charAfter == ';') || (charAfter == ')'))) { return; } if (!Character.isWhitespace(charAfter)) { //empty FOR_ITERATOR? if (targetAST.getType() == TokenTypes.SEMI) { final DetailAST sibling = targetAST.getNextSibling(); if ((sibling != null) && (sibling.getType() == TokenTypes.FOR_ITERATOR) && (sibling.getChildCount() == 0)) { return; } } log(targetAST.getLineNo(), targetAST.getColumnNo() + targetAST.getText().length(), "ws.notFollowed", message); } } } }
[ "375833274@qq.com" ]
375833274@qq.com
5462268590b7e10a4c0ccc3d93535a0c223a1bea
7f4e9d68fc8189bdca296cb3d146c00fa6157762
/src/test/java/io/github/jhipster/application/security/DomainUserDetailsServiceIntTest.java
5f4b18a6dabc8f28b8e87f5f1d8d6925d6cfc4f8
[]
no_license
shazgui/store
f5ac0d524dce52a808f1fdb86077a8e3c7f19694
bbc61654db6f6929f95b80bb604520769c7122e5
refs/heads/master
2021-06-28T13:47:11.548185
2018-10-31T11:33:57
2018-10-31T11:33:57
155,545,105
0
1
null
2020-09-18T12:15:45
2018-10-31T11:19:10
TypeScript
UTF-8
Java
false
false
4,644
java
package io.github.jhipster.application.security; import io.github.jhipster.application.GatewayApp; import io.github.jhipster.application.domain.User; import io.github.jhipster.application.repository.UserRepository; import org.apache.commons.lang3.RandomStringUtils; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; import java.util.Locale; import static org.assertj.core.api.Assertions.assertThat; /** * Test class for DomainUserDetailsService. * * @see DomainUserDetailsService */ @RunWith(SpringRunner.class) @SpringBootTest(classes = GatewayApp.class) @Transactional public class DomainUserDetailsServiceIntTest { private static final String USER_ONE_LOGIN = "test-user-one"; private static final String USER_ONE_EMAIL = "test-user-one@localhost"; private static final String USER_TWO_LOGIN = "test-user-two"; private static final String USER_TWO_EMAIL = "test-user-two@localhost"; private static final String USER_THREE_LOGIN = "test-user-three"; private static final String USER_THREE_EMAIL = "test-user-three@localhost"; @Autowired private UserRepository userRepository; @Autowired private UserDetailsService domainUserDetailsService; private User userOne; private User userTwo; private User userThree; @Before public void init() { userOne = new User(); userOne.setLogin(USER_ONE_LOGIN); userOne.setPassword(RandomStringUtils.random(60)); userOne.setActivated(true); userOne.setEmail(USER_ONE_EMAIL); userOne.setFirstName("userOne"); userOne.setLastName("doe"); userOne.setLangKey("en"); userRepository.save(userOne); userTwo = new User(); userTwo.setLogin(USER_TWO_LOGIN); userTwo.setPassword(RandomStringUtils.random(60)); userTwo.setActivated(true); userTwo.setEmail(USER_TWO_EMAIL); userTwo.setFirstName("userTwo"); userTwo.setLastName("doe"); userTwo.setLangKey("en"); userRepository.save(userTwo); userThree = new User(); userThree.setLogin(USER_THREE_LOGIN); userThree.setPassword(RandomStringUtils.random(60)); userThree.setActivated(false); userThree.setEmail(USER_THREE_EMAIL); userThree.setFirstName("userThree"); userThree.setLastName("doe"); userThree.setLangKey("en"); userRepository.save(userThree); } @Test @Transactional public void assertThatUserCanBeFoundByLogin() { UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_LOGIN); assertThat(userDetails).isNotNull(); assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); } @Test @Transactional public void assertThatUserCanBeFoundByLoginIgnoreCase() { UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_LOGIN.toUpperCase(Locale.ENGLISH)); assertThat(userDetails).isNotNull(); assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); } @Test @Transactional public void assertThatUserCanBeFoundByEmail() { UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_TWO_EMAIL); assertThat(userDetails).isNotNull(); assertThat(userDetails.getUsername()).isEqualTo(USER_TWO_LOGIN); } @Test(expected = UsernameNotFoundException.class) @Transactional public void assertThatUserCanNotBeFoundByEmailIgnoreCase() { domainUserDetailsService.loadUserByUsername(USER_TWO_EMAIL.toUpperCase(Locale.ENGLISH)); } @Test @Transactional public void assertThatEmailIsPrioritizedOverLogin() { UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_EMAIL); assertThat(userDetails).isNotNull(); assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); } @Test(expected = UserNotActivatedException.class) @Transactional public void assertThatUserNotActivatedExceptionIsThrownForNotActivatedUsers() { domainUserDetailsService.loadUserByUsername(USER_THREE_LOGIN); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
78464e5b038f2351f7e9b052fed88e76f2d26218
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13708-7-3-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/observation/internal/DefaultObservationManager_ESTest_scaffolding.java
663ab41d298c7c8ec45c67eed80651c9bcb1a4be
[]
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
460
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Apr 07 23:26:17 UTC 2020 */ package org.xwiki.observation.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultObservationManager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
d68adf23caa2fed1dbe4c129da2b3d4854585430
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_c2599bb37a612cfd0080b3e11b37056c2c9b9a67/ResourceDecoratorTracker/5_c2599bb37a612cfd0080b3e11b37056c2c9b9a67_ResourceDecoratorTracker_s.java
5ca640f558f6536b02a75e8cc6fd683ca422f722
[]
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,283
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.sling.jcr.resource.internal; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ResourceDecorator; import org.apache.sling.commons.osgi.OsgiUtil; /** * Helper class to track the resource decorators and keep * them sorted by their service ranking. */ public class ResourceDecoratorTracker { private static final ResourceDecorator[] EMPTY_ARRAY = new ResourceDecorator[0]; /** * The (optional) resource decorators, working copy. */ protected final List<ResourceDecoratorEntry> resourceDecorators = new ArrayList<ResourceDecoratorEntry>(); /** * An array of the above, updates when changes are created. */ private volatile ResourceDecorator[] resourceDecoratorsArray = EMPTY_ARRAY; public void close() { synchronized (this.resourceDecorators) { this.resourceDecorators.clear(); this.resourceDecoratorsArray = EMPTY_ARRAY; } } /** Decorate a resource. */ public Resource decorate(final Resource resource, String workspaceName, final HttpServletRequest request) { Resource result = resource; final ResourceDecorator[] decorators = this.resourceDecoratorsArray; for(final ResourceDecorator decorator : decorators) { final Resource original = result; if ( request == null ) { result = decorator.decorate(original); } else { result = decorator.decorate(original, request); } if ( result == null ) { result = original; } } if (workspaceName != null) { result = new WorkspaceDecoratedResource(result, workspaceName); } return result; } public ResourceDecorator[] getResourceDecorators() { return this.resourceDecoratorsArray; } protected void bindResourceDecorator(final ResourceDecorator decorator, final Map<String, Object> props) { synchronized (this.resourceDecorators) { this.resourceDecorators.add(new ResourceDecoratorEntry(decorator, OsgiUtil.getComparableForServiceRanking(props))); Collections.sort(this.resourceDecorators); updateResourceDecoratorsArray(); } } protected void unbindResourceDecorator(final ResourceDecorator decorator, final Map<String, Object> props) { synchronized (this.resourceDecorators) { final Iterator<ResourceDecoratorEntry> i = this.resourceDecorators.iterator(); while (i.hasNext()) { final ResourceDecoratorEntry current = i.next(); if (current.decorator == decorator) { i.remove(); break; } } updateResourceDecoratorsArray(); } } /** * Updates the ResourceDecorators array, this method is not thread safe and should only be * called from a synchronized block. */ protected void updateResourceDecoratorsArray() { ResourceDecorator[] decorators = null; if (this.resourceDecorators.size() > 0) { decorators = new ResourceDecorator[this.resourceDecorators.size()]; int index = 0; final Iterator<ResourceDecoratorEntry> i = this.resourceDecorators.iterator(); while (i.hasNext()) { decorators[index] = i.next().decorator; index++; } } this.resourceDecoratorsArray = decorators; } /** * Internal class to keep track of the resource decorators. */ private static final class ResourceDecoratorEntry implements Comparable<ResourceDecoratorEntry> { final Comparable<Object> comparable; final ResourceDecorator decorator; public ResourceDecoratorEntry(final ResourceDecorator d, final Comparable<Object> comparable) { this.comparable = comparable; this.decorator = d; } public int compareTo(ResourceDecoratorEntry o) { return comparable.compareTo(o.comparable); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
14c76678914b3b902b941617617bbec42575d6b5
b17df9aec923a994daee44732aa2e33a6ad2143c
/104_oraclechain_pocketeos-android/src1/com/oraclechain/pocketeos/modules/resourcemanager/changememory/ChangeMemoryView.java
2f3041a7c919b0384b7ffb1da1105390f2e67c9c
[]
no_license
duytient31/ExtractionFiles
f1a4a7f48c1acd5987267d22c47ba60dc55e8fc4
18eafb494421b0f225b4b6017e9e17da65843517
refs/heads/master
2022-01-17T10:37:31.544309
2019-06-10T05:16:37
2019-06-10T05:16:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
516
java
package com.oraclechain.pocketeos.modules.resourcemanager.changememory; import com.oraclechain.pocketeos.base.BaseView; import com.oraclechain.pocketeos.bean.AccountDetailsBean; import com.oraclechain.pocketeos.bean.TableResultBean; /** * Created by pocketEos on 2017/12/26. */ public interface ChangeMemoryView extends BaseView { void getAccountDetailsDataHttp(AccountDetailsBean accountDetailsBean); void getTableDataHttp(TableResultBean.DataBean dataBean); void getDataHttpFail(String msg); }
[ "mx.alruzaiqi@gmail.com" ]
mx.alruzaiqi@gmail.com
8c1e8170c75ae14cdaa7e98d7d76ca676f901dcf
a91c1012c7b0057e81a4bd0c701f760d7f9f48ce
/src/polyglot/ast/ClassLit_c.java
52f1b434e7f3151f51557d6c07e84b578def5811
[]
no_license
pl-eco/CSNewDesign
20dfaa37157ee5e36c6dda35beafda048d6dc5c9
e92e7ed4a3d157d73c79de24b1520af28609f3d5
refs/heads/master
2021-01-18T14:22:40.497953
2014-08-26T04:58:08
2014-08-26T04:58:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,742
java
/******************************************************************************* * This file is part of the Polyglot extensible compiler framework. * * Copyright (c) 2000-2008 Polyglot project group, Cornell University * Copyright (c) 2006-2008 IBM Corporation * 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 * * This program and the accompanying materials are made available under * the terms of the Lesser GNU Public License v2.0 which accompanies this * distribution. * * The development of the Polyglot project has been supported by a * number of funding sources, including DARPA Contract F30602-99-1-0533, * monitored by USAF Rome Laboratory, ONR Grant N00014-01-1-0968, NSF * Grants CNS-0208642, CNS-0430161, and CCF-0133302, an Alfred P. Sloan * Research Fellowship, and an Intel Research Ph.D. Fellowship. * * See README for contributors. ******************************************************************************/ package polyglot.ast; import java.util.List; import polyglot.types.SemanticException; import polyglot.util.CodeWriter; import polyglot.util.Position; import polyglot.visit.CFGBuilder; import polyglot.visit.NodeVisitor; import polyglot.visit.PrettyPrinter; import polyglot.visit.TypeChecker; /** * A <code>ClassLit</code> represents a class literal expression. * A class literal expressions is an expression consisting of the * name of a class, interface, array, or primitive type followed by a period (.) * and the token class. */ public class ClassLit_c extends Lit_c implements ClassLit { protected TypeNode typeNode; public ClassLit_c(Position pos, TypeNode typeNode) { super(pos); assert (typeNode != null); this.typeNode = typeNode; } @Override public TypeNode typeNode() { return this.typeNode; } public ClassLit typeNode(TypeNode typeNode) { if (this.typeNode == typeNode) { return this; } ClassLit_c n = (ClassLit_c) copy(); n.typeNode = typeNode; return n; } /** * Cannot return the correct object (except for maybe * some of the primitive arrays), so we just return null here. */ public Object objValue() { return null; } @Override public Term firstChild() { return typeNode; } @Override public <T> List<T> acceptCFG(CFGBuilder<?> v, List<T> succs) { v.visitCFG(typeNode, this, EXIT); return succs; } @Override public Node visitChildren(NodeVisitor v) { TypeNode tn = (TypeNode) visitChild(this.typeNode, v); return this.typeNode(tn); } /** Type check the expression. */ @Override public Node typeCheck(TypeChecker tc) throws SemanticException { return type(tc.typeSystem().Class()); } @Override public String toString() { return typeNode.toString() + ".class"; } /** Write the expression to an output file. */ @Override public void prettyPrint(CodeWriter w, PrettyPrinter tr) { w.begin(0); print(typeNode, w, tr); w.write(".class"); w.end(); } /** * According to the JLS 2nd Ed, sec 15.28, a class literal * is not a compile time constant. */ @Override public boolean isConstant() { return false; } @Override public Object constantValue() { return null; } @Override public Node copy(NodeFactory nf) { return nf.ClassLit(this.position, this.typeNode); } }
[ "Zhuht.dm@gmail.com" ]
Zhuht.dm@gmail.com
f985d61a55ff57744c9c35c30675100b72e036c7
9c66f726a3f346fe383c5656046a2dbeea1caa82
/myrobotlab/src/org/myrobotlab/service/interfaces/VoltageSensorControl.java
3d773082ba4e6f616822759e5d27ac47e8df5424
[ "Apache-2.0" ]
permissive
Navi-nk/Bernard-InMoov
c6c9e9ba22a13aa5cbe812b4c1bf5f9f9b03dd21
686fa377141589a38d4c9bed54de8ddd128e2bca
refs/heads/master
2021-01-21T10:29:28.949744
2017-05-23T05:39:28
2017-05-23T05:39:28
91,690,887
0
5
null
null
null
null
UTF-8
Java
false
false
1,208
java
/** * * @author greg (at) myrobotlab.org * * This file is part of MyRobotLab (http://myrobotlab.org). * * MyRobotLab is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version (subject to the "Classpath" exception * as provided in the LICENSE.txt file that accompanied this code). * * MyRobotLab is distributed in the hope that it will be useful or fun, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * All libraries in thirdParty bundle are subject to their own license * requirements - please refer to http://myrobotlab.org/libraries for * details. * * Enjoy ! * * */ package org.myrobotlab.service.interfaces; public interface VoltageSensorControl extends DeviceControl { double getPower(); double getCurrent(); double getShuntVoltage(); double getBusVoltage(); double getShuntResistance(); void setShuntResistance(double shuntResistance); }
[ "naval.kumar99@gmail.com" ]
naval.kumar99@gmail.com
b9285f8e345587de09f87be25e8600bf0f3678f5
3b74fbedd3001512dfe49bc0f5a18090c2e34564
/hvip-product-api/src/main/java/com/huazhu/hvip/product/service/BrandService.java
b0480e552884bf4bf41293ebc613f56fb82e95a1
[]
no_license
xuelu520/cjiaclean-core
b148a78da67b45a0c0e5d5cf07c67b5cfc6d47dc
a96f574a8ec2b4ab7884130461671f095762995a
refs/heads/master
2020-03-27T10:19:57.138235
2017-11-16T01:41:23
2017-11-16T01:41:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,721
java
/* * Copyright (C),2016-2016. 华住酒店管理有限公司 * FileName: BrandService.java * Author: lijing * Date: 2016-03-23 19:58:12 * Description: //模块目的、功能描述 * History: //修改记录 修改人姓名 修改时间 版本号 描述 * <lijing> <2016-03-23 19:58:12> <version> <desc> * */ package com.huazhu.hvip.product.service; import com.huazhu.hvip.base.model.ParamObject; import com.huazhu.hvip.base.model.ReturnObject; import com.huazhu.hvip.product.vo.BrandVO; /** * <一句话功能简述> * <功能详细描述> * * @author lijing * @see [相关类/方法](可选) * @since [产品/模块版本] (可选) */ public interface BrandService { /** * 获取品牌列表 * @return ReturnObject */ public ReturnObject<BrandVO> getAll(); /** * 保存品牌 * @param brandVO * @return ReturnObject */ public ReturnObject<BrandVO> saveBrand(BrandVO brandVO); /** * 移除品牌 * @param brandVO * @return ReturnObject */ public ReturnObject removeBrand(BrandVO brandVO); /** * 根据id删除品牌 * @param ids 品牌ID * @return ret 通用返回参数 */ public ReturnObject deleteBrand(Long[] ids); /** * * @param brandId 品牌id * @return ret 通用返回参数 */ public ReturnObject getBrandById(Long brandId); /** * 查询品牌列表 * @param para * @return */ public ReturnObject<BrandVO> searchBrandList(ParamObject para); /** * 根据类型ID查询关联的品牌 * @param typeId * @return */ public ReturnObject<BrandVO> searchBrandByTypeId(Long typeId); }
[ "zxc,./123" ]
zxc,./123
d88043d395ebb51bc6bca6bad4d47d0e65f0b24a
a4157887f09e780e9b006513e713a01543a20f11
/src/com/facebook/buck/core/rules/resolver/impl/BuildRuleResolverMetadataCache.java
eb260a33087a70a655d6ceb23a04f59e0adf4284
[ "Apache-2.0" ]
permissive
ereli/buck
8b6df315251ac69ad9269f77a4e560808c760cd4
b9e298a1b188fa53fbd80c40078ef62b5d732b33
refs/heads/master
2020-03-18T04:25:53.828658
2018-05-21T15:27:06
2018-05-21T15:27:06
134,286,674
0
0
Apache-2.0
2018-05-21T15:22:24
2018-05-21T15:18:28
Java
UTF-8
Java
false
false
3,440
java
/* * Copyright 2012-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.core.rules.resolver.impl; import com.facebook.buck.core.description.MetadataProvidingDescription; import com.facebook.buck.core.model.BuildTarget; import com.facebook.buck.core.model.targetgraph.DescriptionWithTargetGraph; import com.facebook.buck.core.model.targetgraph.TargetGraph; import com.facebook.buck.core.model.targetgraph.TargetNode; import com.facebook.buck.core.rules.BuildRuleResolver; import com.facebook.buck.util.types.Pair; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import java.util.Optional; import java.util.concurrent.ExecutionException; /** Implementation of the metadata system for BuildRuleResolvers. */ final class BuildRuleResolverMetadataCache { private final BuildRuleResolver buildRuleResolver; private final TargetGraph targetGraph; private final LoadingCache<Pair<BuildTarget, Class<?>>, Optional<?>> metadataCache; BuildRuleResolverMetadataCache( BuildRuleResolver buildRuleResolver, TargetGraph targetGraph, int initialCapacity) { // Precondition (not checked): buildRuleResolver has the same targetGraph as the one passed in this.buildRuleResolver = buildRuleResolver; this.targetGraph = targetGraph; this.metadataCache = CacheBuilder.newBuilder().initialCapacity(initialCapacity).build(new MetadataCacheLoader()); } @SuppressWarnings("unchecked") <T> Optional<T> requireMetadata(BuildTarget target, Class<T> metadataClass) { try { return (Optional<T>) metadataCache.get(new Pair<>(target, metadataClass)); } catch (ExecutionException e) { throw new RuntimeException(e); } } private final class MetadataCacheLoader extends CacheLoader<Pair<BuildTarget, Class<?>>, Optional<?>> { @Override public Optional<?> load(Pair<BuildTarget, Class<?>> key) { TargetNode<?, ?> node = targetGraph.get(key.getFirst()); return load(node, key.getSecond()); } @SuppressWarnings("unchecked") private <T, U> Optional<U> load(TargetNode<T, ?> node, Class<U> metadataClass) { T arg = node.getConstructorArg(); if (metadataClass.isAssignableFrom(arg.getClass())) { return Optional.of(metadataClass.cast(arg)); } DescriptionWithTargetGraph<?> description = node.getDescription(); if (!(description instanceof MetadataProvidingDescription)) { return Optional.empty(); } MetadataProvidingDescription<T> metadataProvidingDescription = (MetadataProvidingDescription<T>) description; return metadataProvidingDescription.createMetadata( node.getBuildTarget(), buildRuleResolver, node.getCellNames(), arg, node.getSelectedVersions(), metadataClass); } } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
fec61f661abfa9360e87287148417eaa6068f249
1289fe3c6e709b411d878fcd8b01e4246052423e
/src/main/java/com/hhly/cms/lotterymgr/service/impl/LotteryLimitServiceImpl.java
9b437e9d30547b8dfd948d85a1e7cac0230fe6ad
[]
no_license
a12791602/lotto-cms-wl
78294c0bd03593742d824eb6547106b35fa1c716
99006c76dacfa89e628fcae93e3c97dee6aa343e
refs/heads/master
2021-09-22T15:26:14.755248
2018-09-11T09:20:28
2018-09-11T09:20:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,129
java
package com.hhly.cms.lotterymgr.service.impl; import java.util.List; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import com.hhly.cms.base.rabbitmq.SendMessage; import com.hhly.cms.lotterymgr.service.LotteryLimitService; import com.hhly.cmscore.cms.remote.service.ILotteryMgrService; import com.hhly.skeleton.base.bo.PagingBO; import com.hhly.skeleton.cms.lotterymgr.bo.LotteryLimitBO; import com.hhly.skeleton.cms.lotterymgr.bo.LotteryLimitInfoBO; import com.hhly.skeleton.cms.lotterymgr.vo.LotteryLimitInfoVO; import com.hhly.skeleton.cms.lotterymgr.vo.LotteryLimitVO; import com.hhly.skeleton.msg.MsgEnum; /** * @desc 限号管理的服务接口 * @author huangb * @date 2017年2月15日 * @company 益彩网络 * @version v1.0 */ @Service public class LotteryLimitServiceImpl implements LotteryLimitService { /** * 远程服务 */ @Autowired private ILotteryMgrService iLotteryMgrService; @Autowired private SendMessage sendMessage; private static Logger logger = Logger.getLogger(LotteryLimitServiceImpl.class); @Override public LotteryLimitBO findSingleLimit(LotteryLimitVO lotteryLimitVO) { return iLotteryMgrService.findSingleLimit(lotteryLimitVO); } @Override public PagingBO<LotteryLimitBO> findPagingLimit(LotteryLimitVO lotteryLimitVO) { return iLotteryMgrService.findPagingLimit(lotteryLimitVO); } @Override public int addLimit(LotteryLimitVO lotteryLimitVO) { return iLotteryMgrService.addLimit(lotteryLimitVO); } @Override public int updLimit(LotteryLimitVO lotteryLimitVO) { int affected = iLotteryMgrService.updLimit(lotteryLimitVO); logger.info(String.format("**********限号信息额修改,推送到mq,彩种:%d*******************", lotteryLimitVO.getLotteryCode())); sendMessage.sendUpdateNotice(lotteryLimitVO.getLotteryCode(), MsgEnum.EventType.LimitChanged.getIntValue()); return affected; } @Override public LotteryLimitInfoBO findSingleLimitInfo(LotteryLimitInfoVO lotteryLimitInfoVO) { return iLotteryMgrService.findSingleLimitInfo(lotteryLimitInfoVO); } @Override public PagingBO<LotteryLimitInfoBO> findPagingLimitInfo(LotteryLimitInfoVO lotteryLimitInfoVO) { return iLotteryMgrService.findPagingLimitInfo(lotteryLimitInfoVO); } @Override public int addLimitInfo(LotteryLimitInfoVO lotteryLimitInfoVO) { return iLotteryMgrService.addLimitInfo(lotteryLimitInfoVO); } @Override public int updLimitInfo(LotteryLimitInfoVO lotteryLimitInfoVO) { return iLotteryMgrService.updLimitInfo(lotteryLimitInfoVO); } @Override public int saveLimitInfo(List<LotteryLimitInfoVO> list) { int affect = iLotteryMgrService.saveLimitInfo(list); if(!CollectionUtils.isEmpty(list)) { int lotteryCode = list.get(0).getLotteryChildCode()/100; logger.info(String.format("**********限号信息额修改,推送到mq,彩种:%d*******************", lotteryCode)); sendMessage.sendUpdateNotice(lotteryCode, MsgEnum.EventType.LimitChanged.getIntValue()); } return affect; } }
[ "wulong0207@sina.com" ]
wulong0207@sina.com
ce578cb1b036325553c79eadefa08312e14b9e08
3b481b302b02edf57b816acac9e5ff3b7ec602e2
/src/flow/Flow$Direction.java
4d0d6f3a7b64ce1e9efa9ffcac48dd10c3a68c1f
[]
no_license
reverseengineeringer/com.twitter.android
53338ae009b2b6aa79551a8273875ec3728eda99
f834eee04284d773ccfcd05487021200de30bd1e
refs/heads/master
2021-04-15T04:35:06.232782
2016-07-21T03:51:19
2016-07-21T03:51:19
63,835,046
1
1
null
null
null
null
UTF-8
Java
false
false
197
java
package flow; public enum Flow$Direction { private Flow$Direction() {} } /* Location: * Qualified Name: flow.Flow.Direction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
291a11fd07e67832b3225d7f26f54d00b222e199
5fb074b2e8c2851075c063f0493993f190210b61
/src/org/argouml/uml/diagram/state/ui/FigFinalState.java
fb07f27502fc69fc52bb91ff2919f56e4891346a
[ "LicenseRef-scancode-other-permissive", "BSD-3-Clause" ]
permissive
rcaa/argouml-app-layaspects
b0b1c5a0bb3d45154341ce2e90f86f7339fb8f46
552d1dd2078f57bb6bebdb0f14a7f9c8afb1bbca
refs/heads/master
2020-03-30T08:03:40.454587
2013-11-07T15:44:16
2013-11-07T15:44:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,810
java
// $Id: FigFinalState.java 17045 2009-04-05 16:52:52Z mvw $ // Copyright (c) 1996-2009 The Regents of the University of California. All // Rights Reserved. Permission to use, copy, modify, and distribute this // software and its documentation without fee, and without a written // agreement is hereby granted, provided that the above copyright notice // and this paragraph appear in all copies. This software program and // documentation are copyrighted by The Regents of the University of // California. The software program and documentation are supplied "AS // IS", without any accompanying services from The Regents. The Regents // does not warrant that the operation of the program will be // uninterrupted or error-free. The end-user understands that the program // was developed for research purposes and is advised not to rely // exclusively on the program for any reason. IN NO EVENT SHALL THE // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. package org.argouml.uml.diagram.state.ui; import java.awt.Color; import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.util.Iterator; import java.util.List; import org.argouml.model.Model; import org.argouml.uml.diagram.DiagramSettings; import org.argouml.uml.diagram.activity.ui.SelectionActionState; import org.tigris.gef.base.Globals; import org.tigris.gef.base.Selection; import org.tigris.gef.presentation.FigCircle; /** * Class to display graphics for a UML FinalState in a diagram. * * @author ics125b spring 98 */ public class FigFinalState extends FigStateVertex { private static final int WIDTH = 24; private static final int HEIGHT = 24; private FigCircle inCircle; private FigCircle outCircle; /** * Construct a new FigFinalState. * * @param owner owning UML element * @param bounds position and size * @param settings rendering settings */ public FigFinalState(Object owner, Rectangle bounds, DiagramSettings settings) { super(owner, bounds, settings); initFigs(); } private void initFigs() { setEditable(false); Color handleColor = Globals.getPrefs().getHandleColor(); FigCircle bigPort = new FigCircle(X0, Y0, WIDTH, HEIGHT, LINE_COLOR, FILL_COLOR); outCircle = new FigCircle(X0, Y0, WIDTH, HEIGHT, LINE_COLOR, FILL_COLOR); inCircle = new FigCircle( X0 + 5, Y0 + 5, WIDTH - 10, HEIGHT - 10, handleColor, LINE_COLOR); outCircle.setLineWidth(LINE_WIDTH); outCircle.setLineColor(LINE_COLOR); inCircle.setLineWidth(0); addFig(bigPort); addFig(outCircle); addFig(inCircle); setBigPort(bigPort); setBlinkPorts(false); //make port invisible unless mouse enters } @Override public Object clone() { FigFinalState figClone = (FigFinalState) super.clone(); Iterator it = figClone.getFigs().iterator(); figClone.setBigPort((FigCircle) it.next()); figClone.outCircle = (FigCircle) it.next(); figClone.inCircle = (FigCircle) it.next(); return figClone; } /* * @see org.tigris.gef.presentation.Fig#makeSelection() */ @Override public Selection makeSelection() { Object pstate = getOwner(); Selection sel = null; if ( pstate != null) { if (Model.getFacade().isAActivityGraph( Model.getFacade().getStateMachine( Model.getFacade().getContainer(pstate)))) { sel = new SelectionActionState(this); ((SelectionActionState) sel).setOutgoingButtonEnabled(false); } else { sel = new SelectionState(this); ((SelectionState) sel).setOutgoingButtonEnabled(false); } } return sel; } /** * Final states are fixed size. * @return false * @see org.tigris.gef.presentation.Fig#isResizable() */ @Override public boolean isResizable() { return false; } /* * @see org.tigris.gef.presentation.Fig#setLineColor(java.awt.Color) */ @Override public void setLineColor(Color col) { outCircle.setLineColor(col); inCircle.setFillColor(col); } /* * @see org.tigris.gef.presentation.Fig#getLineColor() */ @Override public Color getLineColor() { return outCircle.getLineColor(); } /* * @see org.tigris.gef.presentation.Fig#setFillColor(java.awt.Color) */ @Override public void setFillColor(Color col) { if (Color.black.equals(col)) { /* See issue 5721. * Projects before 0.28 have their fill color set to black. * We refuse that color and replace by white. * All other fill colors are accepted: */ col = Color.white; } outCircle.setFillColor(col); } /* * @see org.tigris.gef.presentation.Fig#getFillColor() */ @Override public Color getFillColor() { return outCircle.getFillColor(); } /* * @see org.tigris.gef.presentation.Fig#setFilled(boolean) */ @Override public void setFilled(boolean f) { // ignored - rendering is fixed } @Override public boolean isFilled() { return true; } /* * @see org.tigris.gef.presentation.Fig#setLineWidth(int) */ @Override public void setLineWidth(int w) { outCircle.setLineWidth(w); } /* * @see org.tigris.gef.presentation.Fig#getLineWidth() */ @Override public int getLineWidth() { return outCircle.getLineWidth(); } /* * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent) */ @Override public void mouseClicked(MouseEvent me) { // ignore mouse clicks } /** * The UID. */ static final long serialVersionUID = -3506578343969467480L; /** * Return a list of gravity points around the outer circle. Used in place of * the default bounding box. * * {@inheritDoc} */ @Override public List getGravityPoints() { return getCircleGravityPoints(); } /** * Override setBounds to keep shapes looking right. * {@inheritDoc} */ @Override protected void setStandardBounds(int x, int y, int w, int h) { if (getNameFig() == null) { return; } Rectangle oldBounds = getBounds(); getBigPort().setBounds(x, y, w, h); outCircle.setBounds(x, y, w, h); inCircle.setBounds(x + 5, y + 5, w - 10, h - 10); calcBounds(); //_x = x; _y = y; _w = w; _h = h; updateEdges(); firePropChange("bounds", oldBounds, getBounds()); } }
[ "rcaa2@cin.ufpe.br" ]
rcaa2@cin.ufpe.br
337dc9687e36c06c058a0ebf9ebba74aa807e18f
13af2a86f496d73446f444a2407e683ccd699286
/core/src/main/java/org/jledit/command/undo/RedoCommand.java
0a1959557c106ea2627ec4bca22673169057d0b9
[ "Apache-2.0" ]
permissive
jledit/jledit
f2f1b2477887a3992e3803a13ad909b1238c7924
ced2c4b44330664adb65f8be4c8fff780ccaa6fd
refs/heads/master
2023-03-16T03:48:04.663651
2018-03-27T06:56:33
2018-03-27T06:56:33
7,564,674
3
4
Apache-2.0
2018-03-27T06:56:34
2013-01-11T18:25:13
Java
UTF-8
Java
false
false
1,264
java
/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jledit.command.undo; import org.jledit.ConsoleEditor; import org.jledit.command.Command; public class RedoCommand implements UndoContextAware, Command { private UndoContext context; public RedoCommand() { this.context = new UndoContext(); } public RedoCommand(UndoContext context) { this.context = context; } public void setUndoContext(UndoContext context) { this.context = context; } @Override public void execute() { UndoableCommand undoableCommand = context.redoPop(); if (undoableCommand != null) { undoableCommand.redo(); context.undoPush(undoableCommand); } } }
[ "iocanel@apache.org" ]
iocanel@apache.org
006acd67acfc5ef92e0d9a34299d6f46b1e22f33
408b111e6bf82de1c6d354d619ebdbcc4f04683f
/src/main/java/com/kodilla/ecommercee/controller/GroupController.java
94bcdfa0146dbd386d8978ceff4dc44ad267c283
[]
no_license
Luke1024/Group-Test-Repository
e69af08b916d5791957259b58f5937afb6cf196d
cac5ce5ff65e64af27576ff13a874b31ff974766
refs/heads/master
2020-05-30T13:07:04.829327
2019-06-10T09:01:35
2019-06-10T09:01:35
189,752,032
0
0
null
null
null
null
UTF-8
Java
false
false
1,306
java
package com.kodilla.ecommercee.controller; import com.kodilla.ecommercee.GroupNotFoundException; import com.kodilla.ecommercee.domain.GroupDto; import org.springframework.web.bind.annotation.*; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; @RestController @RequestMapping("/superShop") public class GroupController { private static final GroupDto food = new GroupDto(1L, "Food"); private static final GroupDto clothes = new GroupDto(2L, "Clothes"); @RequestMapping(method = RequestMethod.GET, value = "getGroups") public List<GroupDto> getGroups(){ return new ArrayList<>(Arrays.asList(food, clothes)); } @RequestMapping(method = RequestMethod.POST, value = "createGroup", consumes = APPLICATION_JSON_VALUE) public void createGroup(@RequestBody GroupDto groupDto){ } @RequestMapping(method = RequestMethod.GET, value = "getGroup") public GroupDto getGroup(@RequestParam Long groupId) throws GroupNotFoundException { return food; } @RequestMapping(method = RequestMethod.PUT, value = "updateGroup", consumes = APPLICATION_JSON_VALUE) public GroupDto updateGroup(@RequestBody GroupDto groupDto){ return clothes; } }
[ "chajdas.lukasz@gmail.com" ]
chajdas.lukasz@gmail.com
239cf88a1c2be255504a316ee3ae2209c06c96fe
db3043ea4728125fd1d7a6a127daf0cc2caad626
/OCPay_admin/src/main/java/com/stormfives/ocpay/member/controller/req/SaveUserReq.java
51355371b435841cfd9bd7eef38d5b6067749164
[]
no_license
OdysseyOCN/OCPay
74f0b2ee9b2c847599118861ffa43b8c869b2e71
5f6c03c8eea53ea107ac6917f3d97a3c7fc86209
refs/heads/master
2022-07-25T07:49:12.120351
2019-03-29T03:14:46
2019-03-29T03:14:46
135,281,926
9
5
null
2022-07-15T21:06:38
2018-05-29T10:48:50
Java
UTF-8
Java
false
false
1,073
java
package com.stormfives.ocpay.member.controller.req; /** * Created by liuhuan on 2018/7/13. */ public class SaveUserReq { private String phone; private String smscode; private Integer countryCode; private String password; private String walletAddress; public String getSmscode() { return smscode; } public void setSmscode(String smscode) { this.smscode = smscode; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public Integer getCountryCode() { return countryCode; } public void setCountryCode(Integer countryCode) { this.countryCode = countryCode; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getWalletAddress() { return walletAddress; } public void setWalletAddress(String walletAddress) { this.walletAddress = walletAddress; } }
[ "cyp206@qq.com" ]
cyp206@qq.com
de41623155a39708c45de0eb1b8966007de34006
aaabffe8bf55973bfb1390cf7635fd00ca8ca945
/src/main/java/com/microsoft/graph/requests/extensions/IIosCompliancePolicyRequestBuilder.java
63ee57790ae6c1c3a444a30cea34aa10de4503d6
[ "MIT" ]
permissive
rgrebski/msgraph-sdk-java
e595e17db01c44b9c39d74d26cd925b0b0dfe863
759d5a81eb5eeda12d3ed1223deeafd108d7b818
refs/heads/master
2020-03-20T19:41:06.630857
2018-03-16T17:31:43
2018-03-16T17:31:43
137,648,798
0
0
null
2018-06-17T11:07:06
2018-06-17T11:07:05
null
UTF-8
Java
false
false
1,065
java
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ package com.microsoft.graph.requests.extensions; import com.microsoft.graph.concurrency.*; import com.microsoft.graph.core.*; import com.microsoft.graph.models.extensions.*; import com.microsoft.graph.models.generated.*; import com.microsoft.graph.http.*; import com.microsoft.graph.requests.extensions.*; import com.microsoft.graph.requests.generated.*; import com.microsoft.graph.options.*; import com.microsoft.graph.serializer.*; import java.util.Arrays; import java.util.EnumSet; // This file is available for extending, afterwards please submit a pull request. /** * The interface for the Ios Compliance Policy Request Builder. */ public interface IIosCompliancePolicyRequestBuilder extends IBaseIosCompliancePolicyRequestBuilder { }
[ "caitbal@microsoft.com" ]
caitbal@microsoft.com
47adb6091101a6e543c1fab0078354540f0c6857
159f75d12bb51bff89497499c2dbc2971ad8dc3e
/edelta.parent/edelta.examples/edelta-gen/edelta/introducingdep/example/IntroducingDepOpExample.java
1e71898f40829461157fc4b2f1452235ab47fdef
[]
no_license
LorenzoBettini/edelta
f406a305b99bdf30e373cb26d097df8ae256da6c
b011c66859f7751bd8434e91d87ace681978f1c1
refs/heads/master
2023-07-02T10:07:46.624753
2023-06-08T11:36:36
2023-06-08T11:36:36
97,230,480
8
7
null
2023-06-08T10:02:02
2017-07-14T12:13:27
Java
UTF-8
Java
false
false
643
java
package edelta.introducingdep.example; import edelta.lib.EdeltaDefaultRuntime; import edelta.lib.EdeltaRuntime; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; @SuppressWarnings("all") public class IntroducingDepOpExample extends EdeltaDefaultRuntime { public IntroducingDepOpExample(final EdeltaRuntime other) { super(other); } public void setBaseClass(final EClass c) { EList<EClass> _eSuperTypes = c.getESuperTypes(); _eSuperTypes.add(getEClass("simple", "SimpleClass")); } @Override public void performSanityChecks() throws Exception { ensureEPackageIsLoaded("simple"); } }
[ "lorenzo.bettini@gmail.com" ]
lorenzo.bettini@gmail.com
4c84316ef498c139f43b2c137884c3bc957e01ec
dec7ab826f26e7f7f54aef6e974776dde800c048
/redis/redis-core/src/main/java/com/ctrip/xpipe/redis/core/proxy/DefaultProxyProtocol.java
8ef6450100a55c8ceb43f47dc62ff0b106270407
[ "Apache-2.0" ]
permissive
LonggangBai/x-pipe
84d8b5ed94a4901b4e1430d927cd04206925fdc7
c1e7881ac51c714115c81e3b44b51ecbb52d9294
refs/heads/master
2020-04-05T00:16:57.557499
2018-11-06T02:16:12
2018-11-06T02:16:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,471
java
package com.ctrip.xpipe.redis.core.proxy; import com.ctrip.xpipe.api.proxy.CompressAlgorithm; import com.ctrip.xpipe.api.proxy.ProxyProtocol; import com.ctrip.xpipe.proxy.ProxyEndpoint; import com.ctrip.xpipe.redis.core.proxy.parser.path.ProxyForwardForParser; import com.ctrip.xpipe.redis.core.proxy.parser.route.ProxyRouteParser; import io.netty.buffer.ByteBuf; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.net.InetSocketAddress; import java.util.List; /** * @author chen.zhu * <p> * May 09, 2018 */ public class DefaultProxyProtocol implements ProxyProtocol { private static final Logger logger = LoggerFactory.getLogger(DefaultProxyProtocol.class); private ProxyProtocolParser parser; private String content; public DefaultProxyProtocol() { } public DefaultProxyProtocol(ProxyProtocolParser parser) { this.parser = parser; } @Override public List<ProxyEndpoint> nextEndpoints() { ProxyRouteParser routeOptionParser = (ProxyRouteParser) parser.getProxyOptionParser(PROXY_OPTION.ROUTE); return routeOptionParser.getNextEndpoints(); } @Override public void recordForwardFor(InetSocketAddress address) { ProxyForwardForParser forwardForParser = (ProxyForwardForParser) parser.getProxyOptionParser(PROXY_OPTION.FORWARD_FOR); forwardForParser.append(address); } @Override public String getForwardFor() { return parser.getProxyOptionParser(PROXY_OPTION.FORWARD_FOR).getPayload(); } @Override public ByteBuf output() { return parser.format(); } @Override public void setContent(String content) { this.content = content; } @Override public String getContent() { return this.content; } @Override public String getRouteInfo() { ProxyRouteParser proxyRouteParser = (ProxyRouteParser) parser.getProxyOptionParser(PROXY_OPTION.ROUTE); return proxyRouteParser.getContent(); } @Override public String getFinalStation() { ProxyRouteParser routeParser = (ProxyRouteParser) parser.getProxyOptionParser(PROXY_OPTION.ROUTE); return routeParser.getFinalStation(); } @Override public boolean isCompressed() { return false; } @Override public CompressAlgorithm compressAlgorithm() { return null; } @Override public String toString() { return content; } }
[ "cz739@nyu.edu" ]
cz739@nyu.edu
d61981b7fe8861f2fe3545ca34d0393ba844a42f
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.4.2/sources/com/google/android/gms/internal/firebase_auth/zzdp.java
aa19134d925724000395435896ffd250ee6065c3
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
3,834
java
package com.google.android.gms.internal.firebase_auth; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.RandomAccess; public final class zzdp extends zzbq<String> implements zzdq, RandomAccess { private static final zzdp zzsq; private static final zzdq zzsr = zzsq; private final List<Object> zzss; static { zzbq zzdp = new zzdp(); zzsq = zzdp; zzdp.zzbs(); } public zzdp() { this(10); } public zzdp(int i) { this(new ArrayList(i)); } private zzdp(ArrayList<Object> arrayList) { this.zzss = arrayList; } private static String zzg(Object obj) { return obj instanceof String ? (String) obj : obj instanceof zzbu ? ((zzbu) obj).zzbw() : zzdd.zze((byte[]) obj); } public final /* synthetic */ void add(int i, Object obj) { String str = (String) obj; zzbt(); this.zzss.add(i, str); this.modCount++; } public final boolean addAll(int i, Collection<? extends String> collection) { Collection zzeo; zzbt(); if (collection instanceof zzdq) { zzeo = ((zzdq) collection).zzeo(); } boolean addAll = this.zzss.addAll(i, zzeo); this.modCount++; return addAll; } public final boolean addAll(Collection<? extends String> collection) { return addAll(size(), collection); } public final void clear() { zzbt(); this.zzss.clear(); this.modCount++; } public final /* bridge */ /* synthetic */ boolean equals(Object obj) { return super.equals(obj); } public final /* synthetic */ Object get(int i) { Object obj = this.zzss.get(i); if (obj instanceof String) { return (String) obj; } String zzbw; if (obj instanceof zzbu) { zzbu zzbu = (zzbu) obj; zzbw = zzbu.zzbw(); if (zzbu.zzbx()) { this.zzss.set(i, zzbw); } return zzbw; } byte[] bArr = (byte[]) obj; zzbw = zzdd.zze(bArr); if (zzdd.zzd(bArr)) { this.zzss.set(i, zzbw); } return zzbw; } public final Object getRaw(int i) { return this.zzss.get(i); } public final /* bridge */ /* synthetic */ int hashCode() { return super.hashCode(); } public final /* synthetic */ Object remove(int i) { zzbt(); Object remove = this.zzss.remove(i); this.modCount++; return zzg(remove); } public final /* bridge */ /* synthetic */ boolean removeAll(Collection collection) { return super.removeAll(collection); } public final /* bridge */ /* synthetic */ boolean retainAll(Collection collection) { return super.retainAll(collection); } public final /* synthetic */ Object set(int i, Object obj) { String str = (String) obj; zzbt(); return zzg(this.zzss.set(i, str)); } public final int size() { return this.zzss.size(); } public final /* bridge */ /* synthetic */ boolean zzbr() { return super.zzbr(); } public final void zzc(zzbu zzbu) { zzbt(); this.zzss.add(zzbu); this.modCount++; } public final List<?> zzeo() { return Collections.unmodifiableList(this.zzss); } public final zzdq zzep() { return zzbr() ? new zzfs(this) : this; } public final /* synthetic */ zzdg zzj(int i) { if (i < size()) { throw new IllegalArgumentException(); } ArrayList arrayList = new ArrayList(i); arrayList.addAll(this.zzss); return new zzdp(arrayList); } }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
24f10646b1163835acc6e8b8d15d910e55282408
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/plugin/order/model/h.java
87eb9ad728527e1912da0b0024194132bf0675a1
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
7,127
java
package com.tencent.mm.plugin.order.model; import android.text.TextUtils; import com.tencent.mm.plugin.order.model.MallOrderDetailObject.a; import com.tencent.mm.plugin.order.model.MallOrderDetailObject.b; import com.tencent.mm.sdk.platformtools.bh; import com.tencent.mm.sdk.platformtools.x; import com.tencent.mm.wallet_core.tenpay.model.i; import com.tencent.tmassistantsdk.storage.table.DownloadSettingTable$Columns; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.json.JSONArray; import org.json.JSONObject; public final class h extends i { public MallOrderDetailObject pbg; private int pbh; public h(String str) { this(str, null, -1); } public h(String str, String str2) { this(str, str2, -1); } public h(String str, String str2, int i) { this.pbg = null; this.pbh = -1; Map hashMap = new HashMap(); hashMap.put("trans_id", str); if (!bh.ov(str2)) { hashMap.put("bill_id", str2); } if (this.pbh >= 0) { this.pbh = i; } D(hashMap); } public final int ayQ() { return 108; } public final void a(int i, String str, JSONObject jSONObject) { if (jSONObject != null) { this.pbg = new MallOrderDetailObject(); MallOrderDetailObject mallOrderDetailObject = this.pbg; if (jSONObject != null) { try { mallOrderDetailObject.oZV = MallTransactionObject.P(jSONObject); } catch (Throwable e) { x.printErrStackTrace("MicroMsg.MallOrderDetailObject", e, "", new Object[0]); } catch (Throwable e2) { x.printErrStackTrace("MicroMsg.MallOrderDetailObject", e2, "", new Object[0]); } try { b bVar; JSONObject jSONObject2 = jSONObject.getJSONObject("status_section"); if (jSONObject2 != null) { bVar = new b(); bVar.pae = jSONObject2.optString("last_status_name"); bVar.time = jSONObject2.optInt("time"); bVar.thumbUrl = jSONObject2.optString("thumb_url"); bVar.nfg = jSONObject2.optString("jump_url"); bVar.paf = jSONObject2.optString("last_status_desc"); } else { bVar = null; } mallOrderDetailObject.oZW = bVar; } catch (Throwable e22) { x.printErrStackTrace("MicroMsg.MallOrderDetailObject", e22, "", new Object[0]); } catch (Throwable e222) { x.printErrStackTrace("MicroMsg.MallOrderDetailObject", e222, "", new Object[0]); } try { mallOrderDetailObject.oZX = MallOrderDetailObject.N(jSONObject); } catch (Throwable e2222) { x.printErrStackTrace("MicroMsg.MallOrderDetailObject", e2222, "", new Object[0]); } catch (Throwable e22222) { x.printErrStackTrace("MicroMsg.MallOrderDetailObject", e22222, "", new Object[0]); } try { List list; int i2; JSONArray jSONArray = jSONObject.getJSONArray("normal_sections"); if (jSONArray == null || jSONArray.length() == 0) { list = null; } else { List arrayList = new ArrayList(); i2 = 0; boolean z = false; while (i2 < jSONArray.length()) { boolean z2; JSONObject jSONObject3 = jSONArray.getJSONObject(i2); a aVar = new a(); aVar.kKb = jSONObject3.optInt("is_bar") != 0; aVar.name = jSONObject3.optString("name"); if (TextUtils.isEmpty(aVar.name)) { z2 = aVar.kKb; } else { if (z) { aVar.kKb = z; } z2 = aVar.kKb; aVar.value = jSONObject3.optString(DownloadSettingTable$Columns.VALUE); aVar.jumpUrl = jSONObject3.optString("jump_url"); aVar.jumpType = jSONObject3.optInt("jump_type"); arrayList.add(aVar); } i2++; z = z2; } list = arrayList; } mallOrderDetailObject.oZY = list; list = mallOrderDetailObject.oZY; JSONObject optJSONObject = jSONObject.optJSONObject("evaluate_section"); if (optJSONObject != null) { if (list == null) { list = new ArrayList(); } a aVar2 = new a(); if (optJSONObject.has(DownloadSettingTable$Columns.VALUE)) { aVar2.value = optJSONObject.optString(DownloadSettingTable$Columns.VALUE); aVar2.type = 2; } else { aVar2.type = 1; } i2 = optJSONObject.optInt("order", 0); if (i2 >= 0 && i2 <= optJSONObject.length() + 1) { list.add(i2, aVar2); } } } catch (Throwable e222222) { x.printErrStackTrace("MicroMsg.MallOrderDetailObject", e222222, "", new Object[0]); } catch (Throwable e2222222) { x.printErrStackTrace("MicroMsg.MallOrderDetailObject", e2222222, "", new Object[0]); } mallOrderDetailObject.pab = jSONObject.optString("safeguard_url"); mallOrderDetailObject.lVH = jSONObject.optString("share_url"); mallOrderDetailObject.pad = jSONObject.optInt("modifyTimeStamp"); if (mallOrderDetailObject.oZW != null && mallOrderDetailObject.pad <= 0) { mallOrderDetailObject.pad = mallOrderDetailObject.oZW.time; } if (mallOrderDetailObject.oZV != null) { mallOrderDetailObject.pac = mallOrderDetailObject.oZV.pac; mallOrderDetailObject.fvL = mallOrderDetailObject.oZV.paA; mallOrderDetailObject.paa = mallOrderDetailObject.oZV.paa; mallOrderDetailObject.oZZ = mallOrderDetailObject.oZV.oZZ; } } } } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
6ea9d31fa59a9b2a5e9845303782cace3c98c96c
6d8c06d1dcb2af678197a8eaa90d84ee51f34c8b
/UU/src/com/huiyoumall/uu/common/GetCityJsonToDb.java
dd562e89f7c8451d953766402f902ce35623d676
[]
no_license
heshicaihao/UU
0a37abdba8aba1eb2afdf451d77f1ae9adb4a5e6
91840eada68bfe0f8529ab1ec206509c45652e19
refs/heads/master
2021-05-14T03:20:09.562782
2018-01-08T02:48:50
2018-01-08T02:48:50
116,616,515
0
0
null
null
null
null
GB18030
Java
false
false
1,419
java
package com.huiyoumall.uu.common; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.List; import android.content.Context; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.huiyoumall.uu.entity.CityItem; /** * 获取本项目中的json,解析成List 工具类 * * @author ASUS * */ public class GetCityJsonToDb { private final static String fileName = "city4.json"; /** * 读取本地文件中JSON字符串 * * @param fileName * @return */ public static String getJson(Context context, String fileName) { StringBuilder stringBuilder = new StringBuilder(); try { BufferedReader bf = new BufferedReader(new InputStreamReader( context.getAssets().open(fileName), "UTF-8")); String line; while ((line = bf.readLine()) != null) { stringBuilder.append(line); } } catch (IOException e) { e.printStackTrace(); } return stringBuilder.toString(); } public static List<CityItem> getDatas(Context context) { String jsonString = getJson(context, fileName); Gson gson = new Gson(); return gson.fromJson(jsonString, new TypeToken<List<CityItem>>() { }.getType()); } public static String getDatas(Context context, String fileName) { String jsonString = getJson(context, fileName); return jsonString; } }
[ "heshicaihao@163.com" ]
heshicaihao@163.com
18b43bd23d65b616e27c955d22cebc0cae0a5652
f40ba0be10e056339daf3be94b80363ed46bc416
/src/main/java/programmers/level2/최솟값만들기_20201027/Solution.java
39897ec1d553d1e40a7bc56e56dc8aed4d624411
[]
no_license
JinHoooooou/codeWarsChallenge
e94a3d078389bc35eb25928ddc6c963f5878eb3e
4f6cbc7351e6f027f2451b5237db05aa1dc5f857
refs/heads/master
2022-05-21T03:04:36.139987
2021-10-25T06:29:05
2021-10-25T06:29:05
253,538,045
1
1
null
null
null
null
UTF-8
Java
false
false
319
java
package programmers.level2.최솟값만들기_20201027; import java.util.Arrays; public class Solution { public int solution(int[] A, int[] B) { Arrays.sort(A); Arrays.sort(B); int sum = 0; for (int i = 0; i < A.length; i++) { sum += (A[i] * B[B.length - 1 - i]); } return sum; } }
[ "jinho4744@naver.com" ]
jinho4744@naver.com
71a0d6688c1ebf4f4e3d276142295ff5f1a0532d
81a6dca5c8f3dec7f0495b2c3ef8007c8a060612
/hybris/bin/platform/bootstrap/gensrc/de/hybris/platform/ruleengine/model/AbstractRuleEngineContextModel.java
aa9d7c14ae39550df123c5310701ede6072fca7d
[]
no_license
BaggaShivanshu/hybris-hy400
d8dbf4aba43b3dccfef7582b687480dafaa69b0b
6914d3fc7947dcfb2bbe87f59d636525187c72ad
refs/heads/master
2020-04-22T09:41:49.504834
2018-12-04T18:44:28
2018-12-04T18:44:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,416
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at May 8, 2018 2:42:44 PM --- * ---------------------------------------------------------------- * * [y] hybris Platform * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.ruleengine.model; import de.hybris.bootstrap.annotations.Accessor; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.servicelayer.model.ItemModelContext; /** * Generated model class for type AbstractRuleEngineContext first defined at extension ruleengine. */ @SuppressWarnings("all") public class AbstractRuleEngineContextModel extends ItemModel { /**<i>Generated model type code constant.</i>*/ public static final String _TYPECODE = "AbstractRuleEngineContext"; /** <i>Generated constant</i> - Attribute key of <code>AbstractRuleEngineContext.name</code> attribute defined at extension <code>ruleengine</code>. */ public static final String NAME = "name"; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public AbstractRuleEngineContextModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public AbstractRuleEngineContextModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - Constructor with all mandatory attributes. * @deprecated since 4.1.1 Please use the default constructor without parameters * @param _name initial attribute declared by type <code>AbstractRuleEngineContext</code> at extension <code>ruleengine</code> */ @Deprecated public AbstractRuleEngineContextModel(final String _name) { super(); setName(_name); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated since 4.1.1 Please use the default constructor without parameters * @param _name initial attribute declared by type <code>AbstractRuleEngineContext</code> at extension <code>ruleengine</code> * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> */ @Deprecated public AbstractRuleEngineContextModel(final String _name, final ItemModel _owner) { super(); setName(_name); setOwner(_owner); } /** * <i>Generated method</i> - Getter of the <code>AbstractRuleEngineContext.name</code> attribute defined at extension <code>ruleengine</code>. * @return the name */ @Accessor(qualifier = "name", type = Accessor.Type.GETTER) public String getName() { return getPersistenceContext().getPropertyValue(NAME); } /** * <i>Generated method</i> - Setter of <code>AbstractRuleEngineContext.name</code> attribute defined at extension <code>ruleengine</code>. * * @param value the name */ @Accessor(qualifier = "name", type = Accessor.Type.SETTER) public void setName(final String value) { getPersistenceContext().setPropertyValue(NAME, value); } }
[ "richard.leiva@digitaslbi.com" ]
richard.leiva@digitaslbi.com
fff162856cf727dc60b9720d57aa803ddcac7a68
9d16981b2a98dde75b6c8051942bd9b93e520741
/app/src/main/java/com/simpletool/datasaving/SwitchPreference.java
95f4aad675abc53a5cce6f13518864fd3774aff9
[]
no_license
phuongbkaaa/Sample-Data-Acc
ec648c41f4148777f10440a8a8321bc7c7693dfb
6ab36f5e50d936dec0f04c6a42b4f63135d192ea
refs/heads/master
2020-04-09T04:03:54.692544
2019-01-07T15:51:45
2019-01-07T15:51:45
160,008,876
0
0
null
null
null
null
UTF-8
Java
false
false
1,389
java
package com.simpletool.datasaving; /* This file is part of Mobile Internet Manager. Mobile Internet Manager is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Mobile Internet Manager is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Mobile Internet Manager. If not, see <http://www.gnu.org/licenses/>. Copyright 2015-2018 by Marcel Bokhorst (M66B) */ import android.content.Context; import android.util.AttributeSet; // https://code.google.com/p/android/issues/detail?id=26194 public class SwitchPreference extends android.preference.SwitchPreference { public SwitchPreference(Context context) { this(context, null); } public SwitchPreference(Context context, AttributeSet attrs) { this(context, attrs, android.R.attr.switchPreferenceStyle); } public SwitchPreference(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } }
[ "32545917+phuongbkatp@users.noreply.github.com" ]
32545917+phuongbkatp@users.noreply.github.com
be34d7539366324025d4234a947dc729d65feabe
0d1d37e25aae8ffeba3516d00e34cd046bfafcda
/core-service/src/main/java/cn/lmjia/market/core/util/AbstractAgentLevelRepository.java
6ac628351642008fa1161b7a8fd8da5640b571af
[]
no_license
JoleneOL/market-manage
c14897904b206e90b7435cde5c38e739fe094ca7
0f3baa4ffaf5d87cf61d288ff1a8cdde5e939617
refs/heads/production
2022-07-09T15:31:06.980876
2019-12-17T20:46:53
2019-12-17T20:46:53
89,607,184
88
40
null
2022-06-20T23:38:47
2017-04-27T14:34:09
Java
UTF-8
Java
false
false
1,239
java
package cn.lmjia.market.core.util; import cn.lmjia.market.core.entity.Login; import cn.lmjia.market.core.entity.deal.AgentLevel; import cn.lmjia.market.core.entity.deal.AgentSystem; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import java.util.Collection; import java.util.List; /** * @author CJ */ public interface AbstractAgentLevelRepository<T extends AgentLevel> extends JpaRepository<T, Long>, JpaSpecificationExecutor<T> { /** * 根据身份获取代理信息 * * @param login 登录者 * @return 代理信息 */ List<T> findByLogin(Login login); /** * @param login 登录者 * @return 代理信息数量 */ long countByLogin(Login login); AgentLevel findByLevelAndLoginAndSystem(int level, Login login, AgentSystem system); List<T> findBySuperior(AgentLevel agentLevel); List<T> findBySuperiorAndSystem(AgentLevel agentLevel, AgentSystem system); List<T> findBySystemAndSuperiorIn(AgentSystem system, Collection<AgentLevel> levels); AgentLevel findTopByLevelOrderById(int level); AgentLevel findTopByLevelAndLogin(int level, Login login); }
[ "luffy.ja@gmail.com" ]
luffy.ja@gmail.com
f5190865c32b8ae3ab4b59e3cfd56f7279354b71
e0c4ff78565b6db4e59869a5b4317473b6197372
/web02t/step07/src/main/java/study/C.java
8209db3475e842a29b2086a20752b2a279df36d9
[]
no_license
eomjinyoung/Java72
5ca8bac37974085b07d23559788ef3430f2416ca
b584aee7a673aaa9a6eac5749682993c25715055
refs/heads/master
2016-08-07T09:45:41.243648
2015-12-01T14:31:39
2015-12-01T14:31:39
38,226,378
8
6
null
null
null
null
UTF-8
Java
false
false
219
java
package study; public class C { public static void m() { D.m(); } public static void m2() throws Exception { D.m2(); } public static void m3() { D.m3(); } }
[ "bit@bit-PC" ]
bit@bit-PC
8562e44566b495a7a2245f03c16ee95f0f3f62e3
eb84b0ce1957e11d9e9c911f5b3d01ebdd3be745
/src/main/java/ai/hual/labrador/dm/hsm/Param.java
e6a62c612fad259c1fbc32c40e56302a4381b9f0
[]
no_license
zhengyul9/Dialog-Robot
75b58fbf86cb3b2dc5e52082765854b067c3323b
414593674521896427a099d17139efb67e1b1516
refs/heads/master
2022-11-21T15:24:40.030048
2020-08-23T19:45:57
2020-08-23T19:45:57
204,849,324
0
1
null
2022-11-16T08:34:10
2019-08-28T04:40:50
Java
UTF-8
Java
false
false
731
java
package ai.hual.labrador.dm.hsm; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import static ai.hual.labrador.dm.hsm.ComponentRenderUtils.PLAIN_FORM; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Param { /** * key of the param * empty string for the field name */ String key() default ""; boolean required() default true; String defaultValue() default ""; String[] range() default {}; // tip message to explain this param String tip() default ""; // component to use in front end String component() default PLAIN_FORM; }
[ "zhengyuli@ufl.edu" ]
zhengyuli@ufl.edu
b61c9e1f898612c3ecac768ad40e56e6a527b445
ab88a78e5c6ef811f580f482e4f55d40e6a16045
/cctools/src/main/java/face/com/zdl/cctools/CleanUtils.java
74b88dbad829822c439622b541b4f4829a20d4bb
[]
no_license
liang979zhang/Utils
065469f41cdbe8c645a0ff56b033a8448e9cefb6
c25aad2297ed244305d28c4c216e940a2ef9b65c
refs/heads/master
2020-03-13T10:22:32.701559
2019-04-18T00:57:40
2019-04-18T00:57:40
131,082,328
0
0
null
null
null
null
UTF-8
Java
false
false
3,446
java
package face.com.zdl.cctools; /** * Created by 89667 on 2018/3/5. */ import android.content.Context; import java.io.File; // cleanInternalCache : 清除内部缓存 // cleanInternalFiles : 清除内部文件 // cleanInternalDbs : 清除内部数据库 // cleanInternalDbByName : 根据名称清除数据库 // cleanInternalSP : 清除内部SP // cleanExternalCache : 清除外部缓存 // cleanCustomCache : 清除自定义目录下的文件 public class CleanUtils { private CleanUtils() { throw new UnsupportedOperationException("u can't instantiate me..."); } /** * 清除内部缓存 * <p>/data/data/com.xxx.xxx/cache</p> * * @param context 上下文 * @return {@code true}: 清除成功<br>{@code false}: 清除失败 */ public static boolean cleanInternalCache(Context context) { return FileUtils.deleteFilesInDir(context.getCacheDir()); } /** * 清除内部文件 * <p>/data/data/com.xxx.xxx/files</p> * * @param context 上下文 * @return {@code true}: 清除成功<br>{@code false}: 清除失败 */ public static boolean cleanInternalFiles(Context context) { return FileUtils.deleteFilesInDir(context.getFilesDir()); } /** * 清除内部数据库 * <p>/data/data/com.xxx.xxx/databases</p> * * @param context 上下文 * @return {@code true}: 清除成功<br>{@code false}: 清除失败 */ public static boolean cleanInternalDbs(Context context) { return FileUtils.deleteFilesInDir(context.getFilesDir().getParent() + File.separator + "databases"); } /** * 根据名称清除数据库 * <p>/data/data/com.xxx.xxx/databases/dbName</p> * * @param context 上下文 * @param dbName 数据库名称 * @return {@code true}: 清除成功<br>{@code false}: 清除失败 */ public static boolean cleanInternalDbByName(Context context, String dbName) { return context.deleteDatabase(dbName); } /** * 清除内部SP * <p>/data/data/com.xxx.xxx/shared_prefs</p> * * @param context 上下文 * @return {@code true}: 清除成功<br>{@code false}: 清除失败 */ public static boolean cleanInternalSP(Context context) { return FileUtils.deleteFilesInDir(context.getFilesDir().getParent() + File.separator + "shared_prefs"); } /** * 清除外部缓存 * <p>/storage/emulated/0/android/data/com.xxx.xxx/cache</p> * * @param context 上下文 * @return {@code true}: 清除成功<br>{@code false}: 清除失败 */ public static boolean cleanExternalCache(Context context) { return SDCardUtils.isSDCardEnable() && FileUtils.deleteFilesInDir(context.getExternalCacheDir()); } /** * 清除自定义目录下的文件 * * @param dirPath 目录路径 * @return {@code true}: 清除成功<br>{@code false}: 清除失败 */ public static boolean cleanCustomCache(String dirPath) { return FileUtils.deleteFilesInDir(dirPath); } /** * 清除自定义目录下的文件 * * @param dir 目录 * @return {@code true}: 清除成功<br>{@code false}: 清除失败 */ public static boolean cleanCustomCache(File dir) { return FileUtils.deleteFilesInDir(dir); } }
[ "896672661@qq.com" ]
896672661@qq.com
8774791d9272d1770d5e8106d3baa7bdd40f5427
dd70bacf12f2b3fd81e4dac135b9a4e491f73cb8
/net/minecraft/data/server/recipe/ShapelessRecipeJsonFactory.java
391b7f9129899db558d08155afe0168a6dec55da
[]
no_license
dennisvoliver/minecraft
bd9d8e256778ac3d00c1ab61a2b6c4702ed56827
fbf6271791785db06a3f8fe4a86c6a92f6a8d951
refs/heads/main
2023-04-23T12:38:25.848640
2021-05-19T07:15:38
2021-05-19T07:15:38
368,775,994
2
0
null
null
null
null
UTF-8
Java
false
false
6,158
java
package net.minecraft.data.server.recipe; import com.google.common.collect.Lists; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import java.util.Iterator; import java.util.List; import java.util.function.Consumer; import net.minecraft.advancement.Advancement; import net.minecraft.advancement.AdvancementRewards; import net.minecraft.advancement.CriterionMerger; import net.minecraft.advancement.criterion.CriterionConditions; import net.minecraft.advancement.criterion.RecipeUnlockedCriterion; import net.minecraft.item.Item; import net.minecraft.item.ItemConvertible; import net.minecraft.recipe.Ingredient; import net.minecraft.recipe.RecipeSerializer; import net.minecraft.tag.Tag; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.Nullable; public class ShapelessRecipeJsonFactory { private static final Logger LOGGER = LogManager.getLogger(); private final Item output; private final int outputCount; private final List<Ingredient> inputs = Lists.newArrayList(); private final Advancement.Task builder = Advancement.Task.create(); private String group; public ShapelessRecipeJsonFactory(ItemConvertible itemProvider, int outputCount) { this.output = itemProvider.asItem(); this.outputCount = outputCount; } public static ShapelessRecipeJsonFactory create(ItemConvertible output) { return new ShapelessRecipeJsonFactory(output, 1); } public static ShapelessRecipeJsonFactory create(ItemConvertible output, int outputCount) { return new ShapelessRecipeJsonFactory(output, outputCount); } public ShapelessRecipeJsonFactory input(Tag<Item> tag) { return this.input(Ingredient.fromTag(tag)); } public ShapelessRecipeJsonFactory input(ItemConvertible itemProvider) { return this.input((ItemConvertible)itemProvider, 1); } public ShapelessRecipeJsonFactory input(ItemConvertible itemProvider, int size) { for(int i = 0; i < size; ++i) { this.input(Ingredient.ofItems(itemProvider)); } return this; } public ShapelessRecipeJsonFactory input(Ingredient ingredient) { return this.input((Ingredient)ingredient, 1); } public ShapelessRecipeJsonFactory input(Ingredient ingredient, int size) { for(int i = 0; i < size; ++i) { this.inputs.add(ingredient); } return this; } public ShapelessRecipeJsonFactory criterion(String criterionName, CriterionConditions conditions) { this.builder.criterion(criterionName, conditions); return this; } public ShapelessRecipeJsonFactory group(String group) { this.group = group; return this; } public void offerTo(Consumer<RecipeJsonProvider> exporter) { this.offerTo(exporter, Registry.ITEM.getId(this.output)); } public void offerTo(Consumer<RecipeJsonProvider> exporter, String recipeIdStr) { Identifier identifier = Registry.ITEM.getId(this.output); if ((new Identifier(recipeIdStr)).equals(identifier)) { throw new IllegalStateException("Shapeless Recipe " + recipeIdStr + " should remove its 'save' argument"); } else { this.offerTo(exporter, new Identifier(recipeIdStr)); } } public void offerTo(Consumer<RecipeJsonProvider> exporter, Identifier recipeId) { this.validate(recipeId); this.builder.parent(new Identifier("recipes/root")).criterion("has_the_recipe", (CriterionConditions)RecipeUnlockedCriterion.create(recipeId)).rewards(AdvancementRewards.Builder.recipe(recipeId)).criteriaMerger(CriterionMerger.OR); exporter.accept(new ShapelessRecipeJsonFactory.ShapelessRecipeJsonProvider(recipeId, this.output, this.outputCount, this.group == null ? "" : this.group, this.inputs, this.builder, new Identifier(recipeId.getNamespace(), "recipes/" + this.output.getGroup().getName() + "/" + recipeId.getPath()))); } private void validate(Identifier recipeId) { if (this.builder.getCriteria().isEmpty()) { throw new IllegalStateException("No way of obtaining recipe " + recipeId); } } public static class ShapelessRecipeJsonProvider implements RecipeJsonProvider { private final Identifier recipeId; private final Item output; private final int count; private final String group; private final List<Ingredient> inputs; private final Advancement.Task builder; private final Identifier advancementId; public ShapelessRecipeJsonProvider(Identifier recipeId, Item output, int outputCount, String group, List<Ingredient> inputs, Advancement.Task builder, Identifier advancementId) { this.recipeId = recipeId; this.output = output; this.count = outputCount; this.group = group; this.inputs = inputs; this.builder = builder; this.advancementId = advancementId; } public void serialize(JsonObject json) { if (!this.group.isEmpty()) { json.addProperty("group", this.group); } JsonArray jsonArray = new JsonArray(); Iterator var3 = this.inputs.iterator(); while(var3.hasNext()) { Ingredient ingredient = (Ingredient)var3.next(); jsonArray.add(ingredient.toJson()); } json.add("ingredients", jsonArray); JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("item", Registry.ITEM.getId(this.output).toString()); if (this.count > 1) { jsonObject.addProperty("count", (Number)this.count); } json.add("result", jsonObject); } public RecipeSerializer<?> getSerializer() { return RecipeSerializer.SHAPELESS; } public Identifier getRecipeId() { return this.recipeId; } @Nullable public JsonObject toAdvancementJson() { return this.builder.toJson(); } @Nullable public Identifier getAdvancementId() { return this.advancementId; } } }
[ "user@email.com" ]
user@email.com
70406641b018b52e2ebd494552ecb49e90c30822
13200e547eec0d67ff9da9204c72ab26a93f393d
/src/com/android/launcher3/model/nano/LauncherDumpProto$LauncherImpression.java
a4045d77505c3e282a4d10f73881d911aa378fd5
[]
no_license
emtee40/DecompiledPixelLauncher
d72d107eaafb42896aa903b9f0f34f5f09f5a15c
fb954b108a7bf3377da5c28fd9a2f22e1b6990ea
refs/heads/master
2020-04-03T03:18:06.239632
2018-01-19T08:49:36
2018-01-19T08:49:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,058
java
// // Decompiled by Procyon v0.5.30 // package com.android.launcher3.model.nano; import com.google.protobuf.nano.f; import com.google.protobuf.nano.c; import com.google.protobuf.nano.b; import com.google.protobuf.nano.a; public final class LauncherDumpProto$LauncherImpression extends a { public LauncherDumpProto$DumpTarget[] targets; public LauncherDumpProto$LauncherImpression() { this.clear(); } public LauncherDumpProto$LauncherImpression clear() { this.targets = LauncherDumpProto$DumpTarget.emptyArray(); this.cachedSize = -1; return this; } protected int computeSerializedSize() { int i = 0; int computeSerializedSize = super.computeSerializedSize(); if (this.targets != null && this.targets.length > 0) { while (i < this.targets.length) { final LauncherDumpProto$DumpTarget launcherDumpProto$DumpTarget = this.targets[i]; if (launcherDumpProto$DumpTarget != null) { computeSerializedSize += b.Vo(1, launcherDumpProto$DumpTarget); } ++i; } } return computeSerializedSize; } public LauncherDumpProto$LauncherImpression mergeFrom(final c c) { while (true) { final int ws = c.Ws(); switch (ws) { default: { if (!f.WR(c, ws)) { return this; } continue; } case 0: { return this; } case 10: { final int wn = f.WN(c, 10); int i; if (this.targets == null) { i = 0; } else { i = this.targets.length; } final LauncherDumpProto$DumpTarget[] targets = new LauncherDumpProto$DumpTarget[wn + i]; if (i != 0) { System.arraycopy(this.targets, 0, targets, 0, i); } while (i < targets.length - 1) { c.Ww(targets[i] = new LauncherDumpProto$DumpTarget()); c.Ws(); ++i; } c.Ww(targets[i] = new LauncherDumpProto$DumpTarget()); this.targets = targets; continue; } } } } public void writeTo(final b b) { int i = 0; if (this.targets != null && this.targets.length > 0) { while (i < this.targets.length) { final LauncherDumpProto$DumpTarget launcherDumpProto$DumpTarget = this.targets[i]; if (launcherDumpProto$DumpTarget != null) { b.VK(1, launcherDumpProto$DumpTarget); } ++i; } } super.writeTo(b); } }
[ "azaidi@live.nl" ]
azaidi@live.nl
1bd242ab27d5d920d5371ca477339f7fda01c54b
c6c123f7c0ac0a9689ea34721f64d8e340a08c7d
/src/test/java/com/codeborne/selenide/impl/DownloadFileToFolderTest.java
02f16f8c546b3821636babfd3070fae4b4dc8376
[ "MIT", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-free-unknown" ]
permissive
Antonppavlov/selenide
582ee5cebe6aca72e3ee1ea8bd629f8db4a47132
92f15e253a54569cebdb919fcb08275d17256bd4
refs/heads/master
2023-02-22T14:36:01.182984
2021-01-21T11:00:44
2021-01-21T11:00:44
302,486,829
0
0
MIT
2020-10-08T23:47:06
2020-10-08T23:47:05
null
UTF-8
Java
false
false
3,489
java
package com.codeborne.selenide.impl; import com.codeborne.selenide.Browser; import com.codeborne.selenide.DriverStub; import com.codeborne.selenide.SelenideConfig; import com.codeborne.selenide.files.FileFilters; import org.apache.commons.io.FileUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.stubbing.Answer; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import java.io.File; import java.io.IOException; import static com.codeborne.selenide.impl.DownloadFileToFolder.isFileModifiedLaterThan; import static java.io.File.createTempFile; import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.commons.io.FileUtils.readFileToString; import static org.apache.commons.io.FileUtils.writeStringToFile; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; final class DownloadFileToFolderTest { private final Downloader downloader = new Downloader(); private final Waiter waiter = new DummyWaiter(); private final WindowsCloser windowsCloser = spy(new DummyWindowsCloser()); private final DownloadFileToFolder command = new DownloadFileToFolder(downloader, waiter, windowsCloser); private final SelenideConfig config = new SelenideConfig(); private final WebDriver webdriver = mock(WebDriver.class); private final WebElementSource linkWithHref = mock(WebElementSource.class); private final WebElement link = mock(WebElement.class); private final DriverStub driver = new DriverStub(config, new Browser("opera", false), webdriver, null); @BeforeEach void setUp() { when(linkWithHref.driver()).thenReturn(driver); when(linkWithHref.findAndAssertElementIsInteractable()).thenReturn(link); when(linkWithHref.toString()).thenReturn("<a href='report.pdf'>report</a>"); } @Test void tracksForNewFilesInDownloadsFolder() throws IOException { String newFileName = "bingo-bongo.txt"; doAnswer((Answer<Void>) i -> { writeStringToFile(driver.browserDownloadsFolder().file(newFileName), "Hello Bingo-Bongo", UTF_8); return null; }).when(link).click(); File downloadedFile = command.download(linkWithHref, link, 3000, FileFilters.none()); assertThat(downloadedFile.getName()).isEqualTo(newFileName); assertThat(downloadedFile.getParentFile()).isNotEqualTo(driver.browserDownloadsFolder().toFile()); assertThat(readFileToString(downloadedFile, UTF_8)).isEqualTo("Hello Bingo-Bongo"); } @Test void fileModificationCheck() throws IOException { assertThat(isFileModifiedLaterThan(file(1597333000L), 1597333000L)).isTrue(); assertThat(isFileModifiedLaterThan(file(1597333000L), 1597332999L)).isTrue(); assertThat(isFileModifiedLaterThan(file(1597333000L), 1597334000L)).isFalse(); } @Test void fileModificationCheck_workWithSecondsPrecision() throws IOException { assertThat(isFileModifiedLaterThan(file(1111111000L), 1111111000L)).isTrue(); assertThat(isFileModifiedLaterThan(file(1111111000L), 1111111999L)).isTrue(); assertThat(isFileModifiedLaterThan(file(1111111000L), 1111112000L)).isFalse(); } private File file(long modifiedAt) throws IOException { File file = createTempFile("selenide-tests", "new-file"); FileUtils.touch(file); file.setLastModified(modifiedAt); return file; } }
[ "andrei.solntsev@gmail.com" ]
andrei.solntsev@gmail.com
933cc424702e761a01bc29857d24a3a01b314b1b
256f4bed8d8f42560a168364056acf47893ddc2c
/bin/ext-integration/c4c/customerticketingc4cintegration/src/de/hybris/platform/customerticketingc4cintegration/facade/C4CTicketFacadeMock.java
05df88e80125a4fc0fcdf75e662a55e2c674b062
[]
no_license
marty-friedman/e-commerce
87d5b4226c9a06ca6020bf87c738e6590c071e3f
5c56f40d240f848e234f430ce904d4483ffe8117
refs/heads/master
2021-09-20T13:55:37.744933
2018-08-10T03:51:06
2018-08-10T03:51:06
142,566,237
0
0
null
null
null
null
UTF-8
Java
false
false
6,998
java
/* * [y] hybris Platform * * Copyright (c) 2017 SAP SE or an SAP affiliate company. * All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.customerticketingc4cintegration.facade; import de.hybris.platform.commerceservices.search.pagedata.PageableData; import de.hybris.platform.commerceservices.search.pagedata.SearchPageData; import de.hybris.platform.customerticketingc4cintegration.data.ODataListResponseData; import de.hybris.platform.customerticketingc4cintegration.data.ODataSingleResponseData; import de.hybris.platform.customerticketingc4cintegration.data.ServiceRequestData; import de.hybris.platform.customerticketingfacades.TicketFacade; import de.hybris.platform.customerticketingfacades.data.TicketAssociatedData; import de.hybris.platform.customerticketingfacades.data.TicketCategory; import de.hybris.platform.customerticketingfacades.data.TicketData; import de.hybris.platform.servicelayer.dto.converter.Converter; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Required; import org.springframework.core.io.Resource; import org.springframework.util.Assert; import com.fasterxml.jackson.databind.ObjectMapper; /** * * MOckTicketFacade, uses \resources\customerticketingc4cintegration\c4cjson\response\*.json as a response. */ public class C4CTicketFacadeMock implements TicketFacade { private static final Logger LOGGER = Logger.getLogger(C4CTicketFacadeMock.class); private Resource createResource; // return created ticket private Resource updateResource; // return note private Resource listTicketsResource; // list of tickets private Resource getResource; // get Ticket private ObjectMapper jacksonObjectMapper; private Converter<ServiceRequestData, TicketData> ticketConverter; private Converter<TicketData, ServiceRequestData> defaultC4CTicketConverter; private C4CBaseFacade c4cBaseFacade; @Override public TicketData createTicket(final TicketData o) { Assert.isTrue(StringUtils.isNotBlank(o.getSubject()), "Subject can't be empty"); Assert.isTrue(o.getSubject().length() <= 255, "Subject can't be longer than 255 chars"); Assert.isTrue(StringUtils.isNotBlank(o.getMessage()), "Message can't be empty"); final String json = loadResource(getCreateResource()); TicketData data = null; try { data = getTicketConverter() .convert(getJacksonObjectMapper().readValue(json, ODataSingleResponseData.class).getD().getResults()); LOGGER.info(data); } catch (final IOException e) { LOGGER.warn(e); } return data; } @Override public TicketData updateTicket(final TicketData o) { Assert.isTrue(StringUtils.isNotBlank(o.getMessage()), "Message can't be empty"); final String json = loadResource(getGetResource()); // update resource contains Note, not Ticket TicketData data = null; try { data = getJacksonObjectMapper().readValue(json, ODataListResponseData.class).getD().getResults().stream() .map(getTicketConverter()::convert).collect(Collectors.toList()).get(0); LOGGER.info(data); } catch (final IOException e) { LOGGER.warn(e); } return data; } @Override public TicketData getTicket(final String ticketId) { final String json = loadResource(getGetResource()); List<TicketData> data = null; try { data = getJacksonObjectMapper().readValue(json, ODataListResponseData.class).getD().getResults().stream() .map(getTicketConverter()::convert).collect(Collectors.toList()); LOGGER.info(data); } catch (final IOException e) { LOGGER.warn(e); } return (data == null || data.isEmpty()) ? null : data.get(0); } @Override public SearchPageData<TicketData> getTickets(final PageableData pageableData) { final String json = loadResource(getListTicketsResource()); try { final List<ServiceRequestData> results = getJacksonObjectMapper().readValue(json, ODataListResponseData.class).getD() .getResults(); return getC4cBaseFacade().convertPageData(results, getTicketConverter(), pageableData, results.size()); } catch (final IOException e) { LOGGER.warn(e); } return getC4cBaseFacade().convertPageData(Collections.emptyList(), getTicketConverter(), pageableData, 0); } protected String loadResource(final Resource r) { String json = ""; try (InputStream is = r.getInputStream()) { json = IOUtils.toString(is, Charset.forName("utf-8")); // IOUtils don't close stream } catch (final IOException e) { LOGGER.warn(e); } return json; } public Resource getCreateResource() { return createResource; } public void setCreateResource(final Resource createResource) { this.createResource = createResource; } public Resource getUpdateResource() { return updateResource; } public void setUpdateResource(final Resource updateResource) { this.updateResource = updateResource; } public Resource getListTicketsResource() { return listTicketsResource; } public void setListTicketsResource(final Resource listTicketsResource) { this.listTicketsResource = listTicketsResource; } public Resource getGetResource() { return getResource; } public void setGetResource(final Resource getResource) { this.getResource = getResource; } public Converter<ServiceRequestData, TicketData> getTicketConverter() { return ticketConverter; } public void setTicketConverter(final Converter<ServiceRequestData, TicketData> ticketConverter) { this.ticketConverter = ticketConverter; } public ObjectMapper getJacksonObjectMapper() { return jacksonObjectMapper; } public void setJacksonObjectMapper(final ObjectMapper jacksonObjectMapper) { this.jacksonObjectMapper = jacksonObjectMapper; } public Converter<TicketData, ServiceRequestData> getDefaultC4CTicketConverter() { return defaultC4CTicketConverter; } public void setDefaultC4CTicketConverter(final Converter<TicketData, ServiceRequestData> defaultC4CTicketConverter) { this.defaultC4CTicketConverter = defaultC4CTicketConverter; } @Override public Map<String, List<TicketAssociatedData>> getAssociatedToObjects() { return Collections.emptyMap(); // It has not been implemented for C4C yet. } @Override public List<TicketCategory> getTicketCategories() { return Collections.emptyList(); } protected C4CBaseFacade getC4cBaseFacade() { return c4cBaseFacade; } @Required public void setC4cBaseFacade(final C4CBaseFacade c4cBaseFacade) { this.c4cBaseFacade = c4cBaseFacade; } }
[ "egor.pgg@gmail.com" ]
egor.pgg@gmail.com
fc2d94b4c67831f4908ec4ef38419821e1976b0f
9fa6550362eb6ebb821a785c9d46267a3eaa5bd8
/sell-rise-dao/src/main/java/com/rise/shop/dao/art/impl/ArtistDaoImpl.java
462aae6c1bb0a335698bf81366ab65b1351138ce
[]
no_license
psiitoy/baseShop
5bd49f9ddd67a239389523a255ab3435f3116ca3
9e708394b917dd372d5469aa55e101de6911ba28
refs/heads/master
2021-01-21T04:26:01.463464
2016-08-16T06:56:45
2016-08-16T06:56:45
52,050,191
0
0
null
null
null
null
UTF-8
Java
false
false
386
java
package com.rise.shop.dao.art.impl; import com.rise.shop.dao.art.ArtistDao; import com.rise.shop.domain.art.mongo.Artist; import com.rise.shop.persistence.dao.mongo.BaseMongoDaoImpl; import org.springframework.stereotype.Repository; /** * Created by wangdi on 15-1-8. */ @Repository("artistDao") public class ArtistDaoImpl extends BaseMongoDaoImpl<Artist> implements ArtistDao { }
[ "psiitoy@126.com" ]
psiitoy@126.com
02a46c6d22781fbf5b78702a61ee935309cfc542
4cdc04aad16506fdbf1d997609f9f60647974782
/com/google/android/gms/maps/model/PolylineOptions.java
1c079bb9480cd960a42e40e8bcbe0b4f6e6d4a34
[]
no_license
lcastro12/TelegramAnalysis1
db9ccb2889758500c5cb9b58db2c55b692e68b74
f8c7579db27eeb70d1a2105d1dca59239389b60f
refs/heads/master
2020-03-15T19:14:56.203309
2018-05-07T00:09:46
2018-05-07T00:09:46
132,303,828
0
0
null
null
null
null
UTF-8
Java
false
false
2,998
java
package com.google.android.gms.maps.model; import android.os.Parcel; import android.support.v4.view.ViewCompat; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; import com.google.android.gms.maps.internal.C0215q; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public final class PolylineOptions implements SafeParcelable { public static final PolylineOptionsCreator CREATOR = new PolylineOptionsCreator(); private int f121P; private final int ab; private final List<LatLng> hB; private boolean hD; private float hb; private boolean hc; private float hg; public PolylineOptions() { this.hg = 10.0f; this.f121P = ViewCompat.MEASURED_STATE_MASK; this.hb = 0.0f; this.hc = true; this.hD = false; this.ab = 1; this.hB = new ArrayList(); } PolylineOptions(int versionCode, List points, float width, int color, float zIndex, boolean visible, boolean geodesic) { this.hg = 10.0f; this.f121P = ViewCompat.MEASURED_STATE_MASK; this.hb = 0.0f; this.hc = true; this.hD = false; this.ab = versionCode; this.hB = points; this.hg = width; this.f121P = color; this.hb = zIndex; this.hc = visible; this.hD = geodesic; } public PolylineOptions add(LatLng point) { this.hB.add(point); return this; } public PolylineOptions add(LatLng... points) { this.hB.addAll(Arrays.asList(points)); return this; } public PolylineOptions addAll(Iterable<LatLng> points) { for (LatLng add : points) { this.hB.add(add); } return this; } public PolylineOptions color(int color) { this.f121P = color; return this; } public int describeContents() { return 0; } public PolylineOptions geodesic(boolean geodesic) { this.hD = geodesic; return this; } public int getColor() { return this.f121P; } public List<LatLng> getPoints() { return this.hB; } public float getWidth() { return this.hg; } public float getZIndex() { return this.hb; } int m1098i() { return this.ab; } public boolean isGeodesic() { return this.hD; } public boolean isVisible() { return this.hc; } public PolylineOptions visible(boolean visible) { this.hc = visible; return this; } public PolylineOptions width(float width) { this.hg = width; return this; } public void writeToParcel(Parcel out, int flags) { if (C0215q.bn()) { C0223h.m581a(this, out, flags); } else { PolylineOptionsCreator.m570a(this, out, flags); } } public PolylineOptions zIndex(float zIndex) { this.hb = zIndex; return this; } }
[ "l.castro12@uniandes.edu.co" ]
l.castro12@uniandes.edu.co
c37acc6065dcab7be3fdb49d2d613ce2438288ba
c402da48877004ff576340ca83b50e3bfc85beb4
/app/src/main/java/com/example/qipintongzhongguozongbu/myqipintong/bean/FriendDateMode.java
5cb6eb26723655abff7f0496da9ff5dc7f7763dd
[]
no_license
ydc0128/QiPinTong
527e73daa34ac7411794d7c0f4ba030c8f1994e5
736085abebcab437c17904d6aebca0dcd2ef2e34
refs/heads/master
2020-06-17T11:17:18.171463
2018-07-03T07:10:20
2018-07-03T07:10:20
94,155,884
0
0
null
null
null
null
UTF-8
Java
false
false
438
java
package com.example.qipintongzhongguozongbu.myqipintong.bean; import java.util.ArrayList; import java.util.List; /** * Description: 朋友圈的数据模型 * Copyright : Copyright (c) 2016 * Author : 感觉自己懵懵哒 * E-mail :anber1229423614@163.com * Date : 2017/4/23 下午4:21 */ public class FriendDateMode { public List<String> urlList = new ArrayList<>(); public boolean isShowAll = false; }
[ "568903753@qq.com" ]
568903753@qq.com
c04a87d0b858745f02ddc6251a5bdd618b2c0ebf
b641e97d985535e4f1d52c7891aa907f3eb0a254
/src/Model/TesterConfig.java
28c8f52dad589a61777ecc8eaada25c2943a61f6
[]
no_license
mmaciag1991/HarnessDesignSystemInterfaceDiagram
7e6f5dc078205475700dc2f63abc3f1e88e62728
4569676541a80dff1ffb5df6080799367e835065
refs/heads/main
2023-05-19T00:43:10.113472
2021-06-11T21:54:03
2021-06-11T21:54:03
375,101,913
0
0
null
null
null
null
UTF-8
Java
false
false
4,701
java
package Model; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; /** * Model class for a RFQ. * * @author Marco Jakob */ public class TesterConfig { private final StringProperty TesterID; private final StringProperty Tester; private final StringProperty TestingSystem; private final StringProperty Place; private final StringProperty TesterRows; private final StringProperty TesterColumns; private final StringProperty TesterPins; private final StringProperty TesterCards; private final StringProperty ModuleGroupName; private final StringProperty SelectedModuleGroupName; public TesterConfig() { this(null, null, null,null, null,null,null,null,null,null); } /** * Constructor with some initial data. */ public TesterConfig(String TesterID, String Tester, String TestingSystem, String Place, String TesterRows, String TesterColumns, String TesterPins, String TesterCards, String ModuleGroupName, String SelectedModuleGroupName) { this.TesterID = new SimpleStringProperty(TesterID); this.Tester = new SimpleStringProperty(Tester); this.TestingSystem = new SimpleStringProperty(TestingSystem); this.Place = new SimpleStringProperty(Place); this.TesterRows = new SimpleStringProperty(TesterRows); this.TesterColumns = new SimpleStringProperty(TesterColumns); this.TesterPins = new SimpleStringProperty(TesterPins); this.TesterCards = new SimpleStringProperty(TesterCards); this.ModuleGroupName = new SimpleStringProperty(ModuleGroupName); this.SelectedModuleGroupName = new SimpleStringProperty(SelectedModuleGroupName); } ///////////////////////////////////////////////////////// public String getTesterID() { return TesterID.get(); } public void setTesterID(String TesterID) { this.TesterID.set(TesterID); } public StringProperty TesterIDProperty() { return TesterID; } /////////////////////////////////////////////////////// public String getTester() { return Tester.get(); } public void setTester(String tester) { this.Tester.set(tester); } public StringProperty testerProperty() { return Tester; } ////////////////////////////////////////////// public String getTestingSystem() { return TestingSystem.get(); } public void setTestingSystem(String testingSystem) { this.TestingSystem.set(testingSystem); } public StringProperty testingSystemProperty() { return TestingSystem; } ////////////////////////////////////////////// public String getPlace() { return Place.get(); } public void setPlace(String Place) { this.Place.set(Place); } public StringProperty placeProperty() { return Place; } //////////////////////////////////////////////// public String getTesterRows() { return TesterRows.get(); } public void setTesterRows(String TesterRows) { this.TesterRows.set(TesterRows); } public StringProperty getTesterRowsProperty() { return TesterRows; } public String getTesterColumns() { return TesterColumns.get(); } public void setTesterColumns(String testerColumns) { this.TesterColumns.set(testerColumns); } public StringProperty getTesterColumnsProperty() { return TesterColumns; } public String getTesterPins() { return TesterPins.get(); } public void setTesterPins(String TesterPins) { this.TesterPins.set(TesterPins); } public StringProperty TesterPinsProperty() { return TesterPins; } public String getTesterCards() { return TesterCards.get(); } public void setTesterCards(String testerCards) { this.TesterCards.set(testerCards); } public StringProperty testerCardsProperty() { return TesterCards; } public String getModuleGroupName() { return ModuleGroupName.get(); } public void setModuleGroupName(String ModuleGroupName) { this.ModuleGroupName.set(ModuleGroupName); } public StringProperty ModuleGroupNameProperty() { return ModuleGroupName; } public String getSelectedModuleGroupName() { return SelectedModuleGroupName.get(); } public void setSelectedModuleGroupName(String SelectedModuleGroupName) { this.SelectedModuleGroupName.set(SelectedModuleGroupName); } public StringProperty SelectedModuleGroupNameProperty() { return SelectedModuleGroupName; } }
[ "mateo.m@wp.pl" ]
mateo.m@wp.pl
6ccef1261ee55b3b08ee8727749e699d32419669
d0750532a32fb3b9c7b7f4d97231e6f32d1ecf72
/src/main/java/com/jeesite/modules/iim/web/MailController.java
dd39ba95f570764d6367f2b5d17b71bed86e7800
[ "Apache-2.0" ]
permissive
zhangfan822/jeegit
13f50a3385882d3ec97d0fc37dbe1941aff488b3
929f22079a7a7c10356c1d99ef9dfda1ee3d34b8
refs/heads/master
2021-01-20T18:30:27.042785
2017-03-20T12:06:06
2017-03-20T12:06:06
90,921,537
1
0
null
2017-05-11T00:55:22
2017-05-11T00:55:22
null
UTF-8
Java
false
false
2,873
java
package com.jeesite.modules.iim.web; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.jeesite.common.config.Global; import com.jeesite.common.persistence.Page; import com.jeesite.common.utils.StringUtils; import com.jeesite.common.web.BaseController; import com.jeesite.modules.iim.entity.Mail; import com.jeesite.modules.iim.service.MailService; /** * 发件箱Controller * @author jeesite * @version 2015-11-15 */ @Controller @RequestMapping(value = "${adminPath}/iim/mail") public class MailController extends BaseController { @Autowired private MailService mailService; @ModelAttribute public Mail get(@RequestParam(required=false) String id) { Mail entity = null; if (StringUtils.isNotBlank(id)){ entity = mailService.get(id); } if (entity == null){ entity = new Mail(); } return entity; } @RequiresPermissions("iim:mail:view") @RequestMapping(value = {"list", ""}) public String list(Mail mail, HttpServletRequest request, HttpServletResponse response, Model model) { Page<Mail> page = mailService.findPage(new Page<Mail>(request, response), mail); model.addAttribute("page", page); return "modules/iim/mailList"; } @RequiresPermissions("iim:mail:view") @RequestMapping(value = "form") public String form(Mail mail, Model model) { model.addAttribute("mail", mail); return "modules/iim/mailForm"; } @RequestMapping(value = "save") public String save(Mail mail, Model model, RedirectAttributes redirectAttributes) { if (!beanValidator(model, mail)){ return form(mail, model); } mailService.save(mail); addMessage(redirectAttributes, "删除站内信成功"); return "redirect:"+Global.getAdminPath()+"/iim/mail/?repage"; } @RequestMapping(value = "delete") public String delete(Mail mail, RedirectAttributes redirectAttributes) { mailService.delete(mail); addMessage(redirectAttributes, "删除站内信成功"); return "redirect:"+Global.getAdminPath()+"/iim/mail/?repage"; } /** * 批量删除 */ @RequestMapping(value = "deleteAll") public String deleteAll(String ids, RedirectAttributes redirectAttributes) { String idArray[] =ids.split(","); for(String id : idArray){ mailService.delete(mailService.get(id)); } addMessage(redirectAttributes, "删除站内信成功"); return "redirect:"+Global.getAdminPath()+"/iim/mail/?repage"; } }
[ "3311247533@qq.com" ]
3311247533@qq.com
77296fba941a4748760a1de8e2e14b96cd802704
297d40621d6a5cf1de09c20e8adf965b8af744c3
/SubPrograma/upeu/edu/pe/ejercicios/EjerciciosJava.java
116930049ee61a733c3797c300bc5b9ddb047f7b
[]
no_license
davidmp/FundamentosProgG1
747db025463a4dce49fc5bdd82bbf44f657dafea
43885c9a780cd1c310928b8e3682e23dbc51903e
refs/heads/master
2022-12-28T04:00:29.566300
2020-07-23T16:19:29
2020-07-23T16:19:29
259,640,755
0
1
null
2020-10-13T23:04:51
2020-04-28T13:12:00
Java
UTF-8
Java
false
false
1,602
java
package upeu.edu.pe.ejercicios; import java.math.BigInteger; public class EjerciciosJava { public long retornarFactorialNumero(long factorial, int numero){ factorial=1; while(numero!= 0) { factorial=(Long)factorial*numero; numero--;//numero=numero-3; numero-= 2 } return factorial; } public BigInteger retornarFactorialNumero(BigInteger factorial,int numero){ factorial=new BigInteger("1"); while(numero!= 0) { factorial=factorial.multiply(BigInteger.valueOf(numero)); numero--;//numero=numero-3; numero-= 2 } return factorial; } public BigInteger retornarFactorialNumeroRecur(int numero){ BigInteger factorial=new BigInteger("1"); if(numero>0) { return (BigInteger.valueOf(numero)).multiply(retornarFactorialNumeroRecur(numero-1)); //numero--;//numero=numero-3; numero-= 2 } return factorial; } public long fibonaciRecur(int numero){ if(numero<2){ return numero; }else{ System.out.println("f(n-1):"+(numero-1)+" f(n-2):"+(numero-2)); return fibonaciRecur(numero-1)+fibonaciRecur(numero-2); } } //6.2 public void factorialEntreRangoNumeros(int numInit, int numFinal){ for(int numero=numInit; numero<numFinal;numero++){ BigInteger resultado=retornarFactorialNumero(BigInteger.valueOf(0), numero); System.out.println("El Factorial de "+numero+" es:"+resultado); } } }
[ "mamanipari@gmail.com" ]
mamanipari@gmail.com
17e7a3732e149d9567cd2170a45c6b817b25775a
40665051fadf3fb75e5a8f655362126c1a2a3af6
/eclipse-milo/31e3ce5215f8c29a8b7976b79ecf96772318dee1/860/OpcUaServerConfigLimits.java
806796790a4bee657d175aef20d6a22e4f688a12
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
4,025
java
/* * Copyright (c) 2019 the Eclipse Milo Authors * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 */ package org.eclipse.milo.opcua.sdk.server.api.config; import java.util.concurrent.TimeUnit; import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger; import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort; import static org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned.uint; import static org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned.ushort; public interface OpcUaServerConfigLimits { default UInteger getMaxSessionCount() { return uint(550); } /** * Get the minimum allowed publishing interval. * * @return the minimum allowed publishing interval. */ default Double getMinPublishingInterval() { return 10.0; } /** * Get the maximum allowed publishing interval. * * @return the maximum allowed publishing interval. */ default Double getMaxPublishingInterval() { return (double) TimeUnit.MILLISECONDS.convert(8, TimeUnit.HOURS); } /** * Get the default publishing interval, used when the requested interval is either invalid or below the minimum. * * @return the default publishing interval. */ default Double getDefaultPublishingInterval() { return 250.0; } /** * Get the minimum subscription lifetime, in milliseconds. * <p> * This value should be larger than the configured minimum publishing interval. * * @return the minimum subscription lifetime, in milliseconds. */ default Double getMinSubscriptionLifetime() { return 10_000.0; } /** * Get the maximum subscription lifetime, in milliseconds. * <p> * This value should be larger than the configured maximum publishing interval. * * @return the maximum subscription lifetime, in milliseconds. */ default Double getMaxSubscriptionLifetime() { return (double) TimeUnit.MILLISECONDS.convert(24, TimeUnit.HOURS); } default Double getMinSupportedSampleRate() { return 0.0; } default Double getMaxSupportedSampleRate() { return (double) TimeUnit.MILLISECONDS.convert(24, TimeUnit.HOURS); } default UShort getMaxBrowseContinuationPoints() { return ushort(UShort.MAX_VALUE); } default UShort getMaxQueryContinuationPoints() { return ushort(UShort.MAX_VALUE); } default UShort getMaxHistoryContinuationPoints() { return ushort(UShort.MAX_VALUE); } default UInteger getMaxArrayLength() { return uint(0x1FFFF); } default UInteger getMaxStringLength() { return uint(0x1FFFF); } default UInteger getMaxNodesPerRead() { return uint(0x1FFFF); } default UInteger getMaxNodesPerHistoryReadData() { return uint(0x1FFFF); } default UInteger getMaxNodesPerHistoryReadEvents() { return uint(0x1FFFF); } default UInteger getMaxNodesPerWrite() { return uint(0x1FFFF); } default UInteger getMaxNodesPerHistoryUpdateData() { return uint(0x1FFFF); } default UInteger getMaxNodesPerHistoryUpdateEvents() { return uint(0x1FFFF); } default UInteger getMaxNodesPerMethodCall() { return uint(0x1FFFF); } default UInteger getMaxNodesPerBrowse() { return uint(0x1FFFF); } default UInteger getMaxNodesPerRegisterNodes() { return uint(0x1FFFF); } default UInteger getMaxNodesPerTranslateBrowsePathsToNodeIds() { return uint(0x1FFFF); } default UInteger getMaxNodesPerNodeManagement() { return uint(0x1FFFF); } default UInteger getMaxMonitoredItemsPerCall() { return uint(0x1FFFF); } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
cec0a681cf9b9d6a3f5356597222b4b42bca1e8f
0e06e096a9f95ab094b8078ea2cd310759af008b
/sources/com/facebook/ads/internal/p025w/p068a/C2564b.java
5ad835c7a49ea4c5ed21d7d55afcd14247ad4e4f
[]
no_license
Manifold0/adcom_decompile
4bc2907a057c73703cf141dc0749ed4c014ebe55
fce3d59b59480abe91f90ba05b0df4eaadd849f7
refs/heads/master
2020-05-21T02:01:59.787840
2019-05-10T00:36:27
2019-05-10T00:36:27
185,856,424
1
2
null
2019-05-10T00:36:28
2019-05-09T19:04:28
Java
UTF-8
Java
false
false
2,525
java
package com.facebook.ads.internal.p025w.p068a; import android.app.Activity; import android.app.Application; import android.app.Application.ActivityLifecycleCallbacks; import android.content.Context; import android.os.Build.VERSION; import android.os.Bundle; import android.support.annotation.Nullable; import com.facebook.ads.internal.p025w.p044h.C2625a; import com.facebook.ads.internal.p025w.p044h.C2626b; import java.lang.ref.WeakReference; /* renamed from: com.facebook.ads.internal.w.a.b */ public class C2564b implements ActivityLifecycleCallbacks { /* renamed from: a */ private static Context f6300a; /* renamed from: b */ private static WeakReference<Activity> f6301b = new WeakReference(null); @Nullable /* renamed from: a */ public static synchronized Activity m6613a() { Activity activity; synchronized (C2564b.class) { activity = (Activity) f6301b.get(); Activity activity2 = null; Object obj = (activity == null || VERSION.SDK_INT < 28) ? 1 : null; if (obj != null) { activity2 = C2563a.m6612a(); } if (!(f6300a == null || obj == null || activity == activity2)) { C2625a.m6741b(f6300a, "act_util", C2626b.f6535Z, new Exception("Activity discrepancies res: " + activity + ", ref: " + activity2)); } if (activity == null) { activity = activity2; } } return activity; } /* renamed from: a */ public static synchronized void m6614a(Context context) { synchronized (C2564b.class) { f6300a = context; if (f6300a instanceof Application) { ((Application) f6300a).registerActivityLifecycleCallbacks(new C2564b()); } else { C2625a.m6741b(f6300a, "api", C2626b.f6550o, new Exception("AppContext is not Application.")); } } } public void onActivityCreated(Activity activity, Bundle bundle) { } public void onActivityDestroyed(Activity activity) { } public void onActivityPaused(Activity activity) { f6301b = new WeakReference(null); } public void onActivityResumed(Activity activity) { f6301b = new WeakReference(activity); } public void onActivitySaveInstanceState(Activity activity, Bundle bundle) { } public void onActivityStarted(Activity activity) { } public void onActivityStopped(Activity activity) { } }
[ "querky1231@gmail.com" ]
querky1231@gmail.com
da87691b9ec3b7c91df0ac5a1103283a71fac589
fbad4c11441a3475ebee5a6b6d05e86b4f56121c
/magic-api/src/main/java/org/ssssssss/magicapi/config/MagicFunctionManager.java
da23a4ab4d04d425bff1662a193943df099c21a5
[ "MIT" ]
permissive
ocean-wll/magic-api
18a143ee5cf3e963a0b5e2004290d8d9e2e13ceb
2425e320492269d464ff22198538fd6773b521f0
refs/heads/master
2023-05-07T22:06:07.866249
2021-05-30T11:56:18
2021-05-30T11:56:18
376,455,394
3
0
MIT
2021-06-13T06:07:05
2021-06-13T06:07:05
null
UTF-8
Java
false
false
7,141
java
package org.ssssssss.magicapi.config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.ssssssss.magicapi.model.FunctionInfo; import org.ssssssss.magicapi.model.Group; import org.ssssssss.magicapi.model.Parameter; import org.ssssssss.magicapi.model.TreeNode; import org.ssssssss.magicapi.provider.FunctionServiceProvider; import org.ssssssss.magicapi.provider.GroupServiceProvider; import org.ssssssss.magicapi.script.ScriptManager; import org.ssssssss.magicapi.utils.PathUtils; import org.ssssssss.script.MagicResourceLoader; import org.ssssssss.script.MagicScriptContext; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; import java.util.stream.Collectors; public class MagicFunctionManager { private static final Logger logger = LoggerFactory.getLogger(MagicFunctionManager.class); private static final Map<String, FunctionInfo> mappings = new ConcurrentHashMap<>(); private final GroupServiceProvider groupServiceProvider; private final FunctionServiceProvider functionServiceProvider; private TreeNode<Group> groups; public MagicFunctionManager(GroupServiceProvider groupServiceProvider, FunctionServiceProvider functionServiceProvider) { this.groupServiceProvider = groupServiceProvider; this.functionServiceProvider = functionServiceProvider; } public void registerFunctionLoader() { MagicResourceLoader.addFunctionLoader((path) -> { FunctionInfo info = mappings.get(path); if (info != null) { List<Parameter> parameters = info.getParameters(); return (Function<Object[], Object>) objects -> { MagicScriptContext context = MagicScriptContext.get(); try { MagicScriptContext functionContext = new MagicScriptContext(context.getRootVariables()); MagicScriptContext.set(functionContext); if (objects != null) { for (int i = 0, len = objects.length, size = parameters.size(); i < len && i < size; i++) { functionContext.set(parameters.get(i).getName(), objects[i]); } } return ScriptManager.executeScript(info.getScript(), functionContext); } finally { MagicScriptContext.set(context); } }; } return null; }); } /** * 加载所有分组 */ public synchronized void loadGroup() { groups = groupServiceProvider.functionGroupTree(); } public void registerAllFunction() { loadGroup(); functionServiceProvider.listWithScript().stream() .filter(it -> groupServiceProvider.getFullPath(it.getGroupId()) != null) .forEach(this::register); } public boolean hasRegister(FunctionInfo info) { String path = PathUtils.replaceSlash(Objects.toString(groupServiceProvider.getFullPath(info.getGroupId()), "") + "/" + info.getPath()); FunctionInfo functionInfo = mappings.get(path); return functionInfo != null && !Objects.equals(info.getId(), functionInfo.getId()); } public boolean hasRegister(Set<String> paths) { return paths.stream().anyMatch(mappings::containsKey); } /** * 函数移动 */ public boolean move(String id, String groupId) { FunctionInfo info = mappings.get(id); if (info == null) { return false; } String path = Objects.toString(groupServiceProvider.getFullPath(groupId), ""); FunctionInfo functionInfo = mappings.get(PathUtils.replaceSlash(path + "/" + info.getPath())); if (functionInfo != null && !Objects.equals(functionInfo.getId(), id)) { return false; } unregister(id); info.setGroupId(groupId); register(info); return true; } public void register(FunctionInfo functionInfo) { if (functionInfo == null) { return; } FunctionInfo oldFunctionInfo = mappings.get(functionInfo.getId()); if (oldFunctionInfo != null) { // 完全一致时不用注册 if (functionInfo.equals(oldFunctionInfo)) { return; } // 如果路径不一致,则需要取消注册 if (!Objects.equals(functionInfo.getPath(), oldFunctionInfo.getPath())) { unregister(functionInfo.getId()); } } String path = Objects.toString(groupServiceProvider.getFullPath(functionInfo.getGroupId()), ""); mappings.put(functionInfo.getId(), functionInfo); path = PathUtils.replaceSlash(path + "/" + functionInfo.getPath()); functionInfo.setMappingPath(path); mappings.put(path, functionInfo); logger.info("注册函数:[{}:{}]", functionInfo.getName(), path); } public Collection<FunctionInfo> getFunctionInfos() { return mappings.values(); } private boolean hasConflict(TreeNode<Group> group, String newPath) { // 获取要移动的接口 List<FunctionInfo> infos = mappings.values().stream() .filter(info -> Objects.equals(info.getGroupId(), group.getNode().getId())) .distinct() .collect(Collectors.toList()); // 判断是否有冲突 for (FunctionInfo info : infos) { if (mappings.containsKey(PathUtils.replaceSlash(newPath + "/" + info.getPath()))) { return true; } } for (TreeNode<Group> child : group.getChildren()) { if (hasConflict(child, newPath + "/" + Objects.toString(child.getNode().getPath(), ""))) { return true; } } return false; } public TreeNode<Group> findGroupTree(String groupId){ return groups.findTreeNode(it -> it.getId().equals(groupId)); } public boolean checkGroup(Group group) { TreeNode<Group> oldTree = groups.findTreeNode((item) -> item.getId().equals(group.getId())); // 如果只改了名字,则不做任何操作 if (Objects.equals(oldTree.getNode().getParentId(), group.getParentId()) && Objects.equals(oldTree.getNode().getPath(), group.getPath())) { return true; } // 新的接口分组路径 String newPath = Objects.toString(groupServiceProvider.getFullPath(group.getParentId()), ""); // 检测冲突 return !hasConflict(oldTree, newPath + "/" + Objects.toString(group.getPath(), "")); } private void recurseUpdateGroup(TreeNode<Group> node, boolean updateGroupId) { mappings.values().stream() .filter(info -> Objects.equals(info.getGroupId(), node.getNode().getId())) .distinct() .collect(Collectors.toList()) .forEach(info -> { unregister(info.getId()); if (updateGroupId) { info.setGroupId(node.getNode().getId()); } register(info); }); for (TreeNode<Group> child : node.getChildren()) { recurseUpdateGroup(child, false); } } public boolean updateGroup(String groupId) { loadGroup(); // 重新加载分组 TreeNode<Group> groupTreeNode = groups.findTreeNode((item) -> item.getId().equals(groupId)); recurseUpdateGroup(groupTreeNode, true); return functionServiceProvider.reload(groupId); } public void deleteGroup(List<String> groupIds) { mappings.values().stream() .filter(info -> groupIds.contains(info.getGroupId())) .distinct() .collect(Collectors.toList()) .forEach(info -> unregister(info.getId())); // 刷新分组缓存 loadGroup(); } public void unregister(String id) { FunctionInfo functionInfo = mappings.remove(id); if (functionInfo != null) { mappings.remove(functionInfo.getMappingPath()); logger.info("取消注册函数:[{},{}]", functionInfo.getName(), functionInfo.getMappingPath()); } } }
[ "838425805@qq.com" ]
838425805@qq.com
a831e164fb8a9053b06ecb16fb580ff629cdcc38
0cfcdcb266aed21d735ae7b0e3a52bfc03d93cda
/goldray/src/main/java/com/goldray/frontend/controller/BannerController.java
a1a4a143732697eed9448639bcaf88f927cd670f
[]
no_license
zowbman/jessedong
a03e5ff22eb281c63eff5a85897192698d755019
4b024d164ee7091d41d05e5c48d36cd6aeed7285
refs/heads/master
2021-01-20T11:46:54.417871
2017-04-21T12:41:34
2017-04-21T12:41:34
82,633,097
0
0
null
null
null
null
UTF-8
Java
false
false
1,041
java
package com.goldray.frontend.controller; import com.goldray.frontend.model.po.BannerPo; import com.goldray.frontend.model.po.OrderStyleEnum; import com.goldray.frontend.model.po.PubReturnMsg; import com.goldray.helper.CodeHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; /** * Created by zwb on 2017/4/20. */ @Controller @RequestMapping("/banner/json") public class BannerController extends BaseController{ private Logger log = LoggerFactory.getLogger(getClass()); /** * * @return */ @GetMapping("/v1/list") @ResponseBody public PubReturnMsg list() { List<BannerPo> bannerPos = iBannerService.findByIsShowAndOderByAddTime(1, OrderStyleEnum.DESC); return new PubReturnMsg(CodeHelper.SUCCESS, bannerPos); } }
[ "zhangweibao@kugou.net" ]
zhangweibao@kugou.net
3e1fc496c234d8e00934b7e6ee50181d8434fe99
71975999c9d702a0883ec9038ce3e76325928549
/src2.4.0/src/main/java/com/baidu/mapsdkvi/c.java
a1c717cbb34a0c0b7d4f4dd84e4c11130a96d2cd
[]
no_license
XposedRunner/PhysicalFitnessRunner
dc64179551ccd219979a6f8b9fe0614c29cd61de
cb037e59416d6c290debbed5ed84c956e705e738
refs/heads/master
2020-07-15T18:18:23.001280
2019-09-02T04:21:34
2019-09-02T04:21:34
205,620,387
3
2
null
null
null
null
UTF-8
Java
false
false
2,309
java
package com.baidu.mapsdkvi; public class c { public String a; public int b; public int c; /* JADX ERROR: JadxRuntimeException in pass: BlockProcessor jadx.core.utils.exceptions.JadxRuntimeException: Can't find immediate dominator for block B:7:0x0026 in {2, 4, 5, 6} preds:[] at jadx.core.dex.visitors.blocksmaker.BlockProcessor.computeDominators(BlockProcessor.java:242) at jadx.core.dex.visitors.blocksmaker.BlockProcessor.processBlocksTree(BlockProcessor.java:52) at jadx.core.dex.visitors.blocksmaker.BlockProcessor.visit(BlockProcessor.java:42) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:27) at jadx.core.dex.visitors.DepthTraversal.lambda$visit$1(DepthTraversal.java:14) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14) at jadx.core.ProcessClass.process(ProcessClass.java:32) at jadx.core.ProcessClass.lambda$processDependencies$0(ProcessClass.java:51) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:51) at jadx.core.ProcessClass.process(ProcessClass.java:37) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200) */ public c(android.net.NetworkInfo r2) { /* r1 = this; r1.<init>(); r0 = r2.getTypeName(); r1.a = r0; r0 = r2.getType(); r1.b = r0; r0 = com.baidu.mapsdkvi.d.a; r2 = r2.getState(); r2 = r2.ordinal(); r2 = r0[r2]; switch(r2) { case 1: goto L_0x0024; case 2: goto L_0x0022; default: goto L_0x001e; }; r2 = 0; r1.c = r2; return; r2 = 1; goto L_0x001f; r2 = 2; goto L_0x001f; return; */ throw new UnsupportedOperationException("Method not decompiled: com.baidu.mapsdkvi.c.<init>(android.net.NetworkInfo):void"); } }
[ "xr_master@mail.com" ]
xr_master@mail.com
22afcae21bb1ff6f4eace9728e3eb892cb9cf70b
ba0657f835fe4a2fb0b0524ad2a38012be172bc8
/src/main/java/designpatterns/hf/combining/factory/pattern/GooseAdapter.java
7a767c999eb6ff0da01c7d64d7d48ee58dccda46
[]
no_license
jsdumas/java-dev-practice
bc2e29670dd6f1784b3a84f52e526a56a66bbba2
db85b830e7927fea863d95f5ea8baf8d3bdc448b
refs/heads/master
2020-12-02T16:28:41.081765
2017-12-08T23:10:53
2017-12-08T23:10:53
96,547,922
0
0
null
null
null
null
UTF-8
Java
false
false
435
java
package designpatterns.hf.combining.factory.pattern; import designpatterns.hf.combining.factory.bird.Goose; import designpatterns.hf.combining.factory.bird.Quackable; public class GooseAdapter implements Quackable { Goose goose; public GooseAdapter(Goose goose) { this.goose = goose; } @Override public void quack() { goose.honk(); } @Override public String toString() { return "Goose pretending to be a Duck"; } }
[ "jsdumas@free.fr" ]
jsdumas@free.fr
c9f033b1409eacd28d38a823462a8e4ce75ad821
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/card/ui/v2/CardTicketListUI$i.java
066d66f03f227f176b665f7db5036a81b1bf8167
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
892
java
package com.tencent.mm.plugin.card.ui.v2; import a.l; import android.view.MenuItem; import android.view.MenuItem.OnMenuItemClickListener; import com.tencent.matrix.trace.core.AppMethodBeat; @l(dWo={1, 1, 13}, dWp={""}, dWq={"<anonymous>", "", "it", "Landroid/view/MenuItem;", "kotlin.jvm.PlatformType", "onMenuItemClick"}) final class CardTicketListUI$i implements MenuItem.OnMenuItemClickListener { CardTicketListUI$i(CardTicketListUI paramCardTicketListUI) { } public final boolean onMenuItemClick(MenuItem paramMenuItem) { AppMethodBeat.i(89309); this.kqh.finish(); AppMethodBeat.o(89309); return false; } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.card.ui.v2.CardTicketListUI.i * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
058e773dc0517ada912a0501d9976b74f28f0789
71b6f25a08a2325a65445f2dedb40075f8562a02
/TLRPC$TL_channels_editAdmin.java
2c5d58462ab2b9f78fcd6ee5cdde49c73dd3774e
[]
no_license
CustomIcon/tgnet
7bb8a81700e66a2255a94ff3bb07beb211996a1d
10567a64d33f846c552a4ea98d576925484f875b
refs/heads/main
2023-09-01T02:42:07.693180
2021-09-09T07:52:29
2021-09-09T07:52:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
964
java
package org.telegram.tgnet; public class TLRPC$TL_channels_editAdmin extends TLObject { public static int constructor = -751007486; public TLRPC$TL_chatAdminRights admin_rights; public TLRPC$InputChannel channel; public String rank; public TLRPC$InputUser user_id; @Override // org.telegram.tgnet.TLObject public TLObject deserializeResponse(AbstractSerializedData abstractSerializedData, int i, boolean z) { return TLRPC$Updates.TLdeserialize(abstractSerializedData, i, z); } @Override // org.telegram.tgnet.TLObject public void serializeToStream(AbstractSerializedData abstractSerializedData) { abstractSerializedData.writeInt32(constructor); this.channel.serializeToStream(abstractSerializedData); this.user_id.serializeToStream(abstractSerializedData); this.admin_rights.serializeToStream(abstractSerializedData); abstractSerializedData.writeString(this.rank); } }
[ "aman_a@aol.com" ]
aman_a@aol.com
7321e4bb44124a8b5636b2a9862c2ec9a44613c0
92dd6bc0a9435c359593a1f9b309bb58d3e3f103
/src/April2021PrepLeetcode/_0013RomanToInteger.java
99fe10ff15735dc5dc136024fb602bcad2063a20
[ "MIT" ]
permissive
darshanhs90/Java-Coding
bfb2eb84153a8a8a9429efc2833c47f6680f03f4
da76ccd7851f102712f7d8dfa4659901c5de7a76
refs/heads/master
2023-05-27T03:17:45.055811
2021-06-16T06:18:08
2021-06-16T06:18:08
36,981,580
3
3
null
null
null
null
UTF-8
Java
false
false
1,213
java
package April2021PrepLeetcode; public class _0013RomanToInteger { public static void main(String[] args) { System.out.println(romanToInt("III")); System.out.println(romanToInt("IV")); System.out.println(romanToInt("IX")); System.out.println(romanToInt("LVIII")); System.out.println(romanToInt("MCMXCIV")); } public static int romanToInt(String s) { int sum = 0; for (int i = 0; i < s.length(); i++) { if (i + 1 < s.length()) { String str = s.charAt(i) + "" + s.charAt(i + 1); switch (str) { case "IV": sum += 4; i++; continue; case "IX": sum += 9; i++; continue; case "XL": sum += 40; i++; continue; case "XC": sum += 90; i++; continue; case "CD": sum += 400; i++; continue; case "CM": sum += 900; i++; continue; } } char c = s.charAt(i); switch (c) { case 'I': sum += 1; break; case 'V': sum += 5; break; case 'X': sum += 10; break; case 'L': sum += 50; break; case 'C': sum += 100; break; case 'D': sum += 500; break; case 'M': sum += 1000; break; } } return sum; } }
[ "hsdars@gmail.com" ]
hsdars@gmail.com
b1b3c006fb5c4c68ef4a9289bcf6c423e8b0f681
a88b849dbeca79386a57e5cef6af08a3020f11e5
/src/main/java/com/teco/market/member/web/MemberCreateRequest.java
fcdc9f912d395cc6b60103f755f82aa9c5efea7f
[]
no_license
teco-market/teco-market
31adcd465bdb27b8513687e60c840a07158bb640
22599edae46f9601d29cba60e4f5b324d788c1da
refs/heads/master
2022-12-24T18:10:30.893233
2020-10-02T14:07:21
2020-10-02T14:07:21
261,744,877
5
2
null
null
null
null
UTF-8
Java
false
false
757
java
package com.teco.market.member.web; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import com.teco.market.member.domain.Member; import com.teco.market.member.domain.Role; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; @Getter @NoArgsConstructor public class MemberCreateRequest { @NotNull private Long kakaoId; @NotBlank private String name; @NotBlank private String email; @Builder public MemberCreateRequest(Long kakaoId, String name, String email) { this.kakaoId = kakaoId; this.name = name; this.email = email; } public Member toMember() { return new Member(kakaoId, name, email, Role.GUEST); } }
[ "tldud2404@gmail.com" ]
tldud2404@gmail.com
ec3f162016731067d610f5d9dfd72292d1d60431
49b57339d939ea3f498249d3aacca1dec543163b
/jadx-snap-new/sources/com/google/android/gms/common/api/internal/zzj.java
dfb28aa617db6647037e5fad676d48c0b14b77cf
[]
no_license
8secz-johndpope/snapchat-re
1655036c41518c3a2aaa0c2543dc49f4acb93eaf
04f5c5bb627d21f620088525fffcf5c99abd7ce5
refs/heads/master
2020-08-24T09:14:38.209745
2019-06-14T05:13:44
2019-06-14T05:13:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,609
java
package com.google.android.gms.common.api.internal; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.AvailabilityException; import com.google.android.gms.common.api.GoogleApi; import com.google.android.gms.tasks.Task; import com.google.android.gms.tasks.TaskCompletionSource; import defpackage.iv; import java.util.Map; import java.util.Set; public final class zzj { private final iv<zzh<?>, ConnectionResult> zzfse = new iv(); private final iv<zzh<?>, String> zzfuk = new iv(); private final TaskCompletionSource<Map<zzh<?>, String>> zzful = new TaskCompletionSource(); private int zzfum; private boolean zzfun = false; public zzj(Iterable<? extends GoogleApi<?>> iterable) { for (GoogleApi zzahv : iterable) { this.zzfse.put(zzahv.zzahv(), null); } this.zzfum = this.zzfse.keySet().size(); } public final Task<Map<zzh<?>, String>> getTask() { return this.zzful.getTask(); } public final void zza(zzh<?> zzh, ConnectionResult connectionResult, String str) { this.zzfse.put(zzh, connectionResult); this.zzfuk.put(zzh, str); this.zzfum--; if (!connectionResult.isSuccess()) { this.zzfun = true; } if (this.zzfum == 0) { if (this.zzfun) { this.zzful.setException(new AvailabilityException(this.zzfse)); return; } this.zzful.setResult(this.zzfuk); } } public final Set<zzh<?>> zzaii() { return this.zzfse.keySet(); } }
[ "blevy@protonmail.com" ]
blevy@protonmail.com
4a71d579e70fb86d57b12a7d4e70d33da75cde29
98faf4361afaef498c45b3a23576fc961f2a503d
/FireBaseInClassDemo/app/src/main/java/com/example/huntertsai/firebaseinclassdemo/ArtistArrayAdapter.java
6158d3ac6e9ff1c915488e56f26f719c7b0fbaba
[]
no_license
as5823934/Android-Studio-InClass-Example
0a2e1c6229ca367c7cb4f4458cb35919a506a839
51fa68631529c40f0428ee6a58455360f6fa4023
refs/heads/master
2020-03-21T04:24:54.262832
2018-06-21T02:12:10
2018-06-21T02:12:10
138,106,938
0
0
null
null
null
null
UTF-8
Java
false
false
5,107
java
package com.example.huntertsai.firebaseinclassdemo; import android.app.Activity; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v7.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.Spinner; import android.widget.TextView; import com.google.firebase.database.FirebaseDatabase; import java.util.Arrays; import java.util.List; /** * Created by huntertsai on 2018-02-26. */ public class ArtistArrayAdapter extends ArrayAdapter<Artist> { private Context context; private List<Artist> martists; public ArtistArrayAdapter(@NonNull Context context, @NonNull List<Artist> objects) { super(context, R.layout.artist_list_layout, objects); this.context = context; this.martists = objects; } @NonNull @Override public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { final Artist artist = martists.get(position); String artist_name = artist.getName(); String artist_genre = artist.getGenre(); LayoutInflater layoutInflater = ((Activity) this.context).getLayoutInflater(); View listView = layoutInflater.inflate(R.layout.artist_list_layout, null); TextView tv_name = listView.findViewById(R.id.artist_name_list); TextView tv_genre = listView.findViewById(R.id.artist_genre_list); tv_name.setText(artist_name); tv_genre.setText(artist_genre); listView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(getContext(), Track_activity.class); String id = artist.getId(); String name = artist.getName(); intent.putExtra("id", id); intent.putExtra("name", name); getContext().startActivity(intent); } }); listView.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View view) { AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); builder.setTitle("Edit information"); final EditText editText = new EditText(getContext()); final Spinner spinner = new Spinner(getContext()); List<String> list = Arrays.asList(getContext().getResources().getStringArray(R.array.genres)); ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<String>(getContext(), android.R.layout.simple_spinner_item, list); spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(spinnerAdapter); // LinearLayout linearLayout = new LinearLayout(getContext()); linearLayout.setLayoutParams(new LinearLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT )); linearLayout.setOrientation(LinearLayout.VERTICAL); linearLayout.addView(editText); linearLayout.addView(spinner); builder.setPositiveButton("Update", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { String modfied_input = editText.getText().toString().trim(); String spinner_input = spinner.getSelectedItem().toString(); FirebaseDatabase.getInstance().getReference("artists").child(artist.getId()).child("name").setValue(modfied_input); FirebaseDatabase.getInstance().getReference("artists").child(artist.getId()).child("genre").setValue(spinner_input); } }); builder.setNeutralButton("Delete", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { FirebaseDatabase.getInstance().getReference("artists").child(artist.getId()).setValue(null); } }); builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { } }); builder.setView(linearLayout); builder.show(); return true; } }); return listView; } }
[ "as5823934@gmail.com" ]
as5823934@gmail.com
42458ef4fe5925381a73ff09fa0b207ca4b7d45f
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/iotcc-20210513/src/main/java/com/aliyun/iotcc20210513/models/ListConnectionPoolAllIpsResponse.java
41d417cf9256b21f9534d9b44008f6a6fa76f98a
[ "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
1,459
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.iotcc20210513.models; import com.aliyun.tea.*; public class ListConnectionPoolAllIpsResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public ListConnectionPoolAllIpsResponseBody body; public static ListConnectionPoolAllIpsResponse build(java.util.Map<String, ?> map) throws Exception { ListConnectionPoolAllIpsResponse self = new ListConnectionPoolAllIpsResponse(); return TeaModel.build(map, self); } public ListConnectionPoolAllIpsResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public ListConnectionPoolAllIpsResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public ListConnectionPoolAllIpsResponse setBody(ListConnectionPoolAllIpsResponseBody body) { this.body = body; return this; } public ListConnectionPoolAllIpsResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
0d393414600d69dbb2a73a31fb254e07edc2baf8
e112ee9fba8cfcf368217277dfc25b976026a232
/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
1ff58a29b0a9721f9d84eaad3cfbe752232db0e1
[ "Apache-2.0", "W3C-19980720", "BSD-3-Clause", "W3C", "LicenseRef-scancode-proprietary-license", "MIT" ]
permissive
apache/tuscany-sca-2.x
3ea2dc984b980d925ac835b6ac0dfcd4541f94b6
89f2d366d4b0869a4e42ff265ccf4503dda4dc8b
refs/heads/trunk
2023-09-01T06:21:08.318064
2013-09-10T16:50:53
2013-09-10T16:50:53
390,004
19
22
Apache-2.0
2023-08-29T21:33:50
2009-11-30T09:00:10
Java
UTF-8
Java
false
false
3,704
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tuscany.sca.binding.ws; import javax.jws.WebService; import org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.Foo; import org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.HelloWorldService; import org.oasisopen.sca.ServiceRuntimeException; import org.oasisopen.sca.annotation.Reference; @WebService public class HelloWorldImpl implements HelloWorld, HelloWorldCallback { @Reference public HelloWorldService helloWorldExternal; @Reference public HelloWorldCallbackService helloWorldCallbackService; // HelloWorld operations public String getGreetings(String s) { System.out.println("Entering SCA HelloWorld.getGreetings: " + s); String response = helloWorldCallbackService.getGreetings(s); System.out.println("Leaving SCA HelloWorld.getGreetings: " + response); return response; } public String getGreetingsException(String s) throws ServiceRuntimeException { System.out.println("Entering SCA HelloWorld.getGreetingsException: " + s); String response = helloWorldCallbackService.getGreetings(s); System.out.println("Leaving SCA HelloWorld.getGreetings: " + response); throw new ServiceRuntimeException(response); } public Foo getGreetingsComplex(Foo foo){ System.out.println("Entering SCA HelloWorld.getGreetingsComplex: " + foo.getBars().get(0).getS()); Foo response = helloWorldCallbackService.getGreetingsComplex(foo); System.out.println("Leaving SCA HelloWorld.getGreetingsComplex: " + foo.getBars().get(0).getS()); return response; } // HelloWorldCallback operations public String getGreetingsCallback(String s) { System.out.println("Entering SCA HelloWorld.getGreetingsCallback: " + s); String response = helloWorldExternal.getGreetings(s); System.out.println("Leaving SCA HelloWorld.getGreetingsCallback: " + response); return response; } public String getGreetingsExceptionCallback(String s) throws ServiceRuntimeException { System.out.println("Entering SCA HelloWorld.getGreetingsExceptionCallback: " + s); String response = helloWorldExternal.getGreetings(s); System.out.println("Leaving SCA HelloWorld.getGreetingsCallback: " + response); throw new ServiceRuntimeException(response); } public Foo getGreetingsComplexCallback(Foo foo){ System.out.println("Entering SCA HelloWorld.getGreetingsComplexCallback: " + foo.getBars().get(0).getS()); Foo response = helloWorldExternal.getGreetingsComplex(foo); System.out.println("Leaving SCA HelloWorld.getGreetingsComplexCallback: " + foo.getBars().get(0).getS()); return response; } }
[ "antelder@apache.org" ]
antelder@apache.org
79c1910c412a7ea7324974698635f68cb0d52de3
c3cfb1bf91e25335629f281b0025fb75c97da79e
/src/main/java/com/dc/app/config/ApplicationProperties.java
51e5aa969b8ac3558f08f3ad9969ebe23fbeb5e8
[]
no_license
faizankarim2/DataCollection
e4ce19d25822bb3c9f4c13083ff3b616bd67f701
3db5561a70656db2780a9d980182ebe26f6f066d
refs/heads/master
2020-03-23T20:27:17.216994
2018-07-23T16:47:23
2018-07-23T16:47:23
142,042,472
0
0
null
null
null
null
UTF-8
Java
false
false
418
java
package com.dc.app.config; import org.springframework.boot.context.properties.ConfigurationProperties; /** * Properties specific to Datacollection. * <p> * Properties are configured in the application.yml file. * See {@link io.github.jhipster.config.JHipsterProperties} for a good example. */ @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) public class ApplicationProperties { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
c35ce3c364a9d4048a6d847bad831cba9d039ad7
416d2845de8d1a082c5b35aab5d4f91d70079391
/zhihuijiayuan/app/src/main/java/tendency/hz/zhihuijiayuan/fragment/UserRightsFragment.java
9c818e674af648355dd8f6544cee77b816b07ff1
[]
no_license
justtory521/zhihuijiayuan
e66b36c594570945a2406388e1d3045a9a96e105
e8cd3b00a9293f2989f9af3cc1712b4a236466bb
refs/heads/master
2022-04-14T09:42:53.685575
2019-11-29T03:43:18
2019-11-29T03:43:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,097
java
package tendency.hz.zhihuijiayuan.fragment; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.facebook.drawee.view.SimpleDraweeView; import java.io.Serializable; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; import tendency.hz.zhihuijiayuan.R; import tendency.hz.zhihuijiayuan.bean.UserRightsBean; import tendency.hz.zhihuijiayuan.units.ViewUnits; import tendency.hz.zhihuijiayuan.view.BaseFragment; import tendency.hz.zhihuijiayuan.widget.GridItemDecoration; /** * Author:Libin on 2019/5/15 20:43 * Email:1993911441@qq.com * Describe: */ public class UserRightsFragment extends BaseFragment { @BindView(R.id.rv_user_rights) RecyclerView rvUserRights; Unbinder unbinder; private List<UserRightsBean.DataBean.ListBean> dataList; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_user_rights, container, false); unbinder = ButterKnife.bind(this, view); getData(); initView(); return view; } private void getData() { dataList = (List<UserRightsBean.DataBean.ListBean>) getArguments().getSerializable("type"); } private void initView() { rvUserRights.setLayoutManager(new GridLayoutManager(getActivity(), 2)); rvUserRights.addItemDecoration(new GridItemDecoration(ViewUnits.getInstance().dp2px(getActivity(), 12))); BaseQuickAdapter<UserRightsBean.DataBean.ListBean, BaseViewHolder> adapter = new BaseQuickAdapter<UserRightsBean.DataBean.ListBean, BaseViewHolder>(R.layout.rv_user_rights_item, dataList) { @Override protected void convert(BaseViewHolder helper, UserRightsBean.DataBean.ListBean item) { SimpleDraweeView simpleDraweeView = helper.getView(R.id.sdv_rights); simpleDraweeView.setImageURI(item.getHeadImage()); helper.setText(R.id.tv_rights_name, item.getServiceName()); helper.setText(R.id.tv_rights_content, item.getDescribe()); } }; rvUserRights.setAdapter(adapter); } public static UserRightsFragment newInstance(List<UserRightsBean.DataBean.ListBean> dataList) { Bundle args = new Bundle(); args.putSerializable("type", (Serializable) dataList); UserRightsFragment fragment = new UserRightsFragment(); fragment.setArguments(args); return fragment; } @Override public void onDestroyView() { super.onDestroyView(); unbinder.unbind(); } }
[ "1993911441@qq.com" ]
1993911441@qq.com