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
a0ef20a17f56739b77e7039e95f31960af269a6c
6d60a8adbfdc498a28f3e3fef70366581aa0c5fd
/codebase/dataset/t1/1579_frag2.java
bb00bd4d19e2042fa105418007dfed042855bd59
[]
no_license
rayhan-ferdous/code2vec
14268adaf9022d140a47a88129634398cd23cf8f
c8ca68a7a1053d0d09087b14d4c79a189ac0cf00
refs/heads/master
2022-03-09T08:40:18.035781
2022-02-27T23:57:44
2022-02-27T23:57:44
140,347,552
0
1
null
null
null
null
UTF-8
Java
false
false
3,473
java
try { return new String(baos.toByteArray(), PREFERRED_ENCODING); } catch (java.io.UnsupportedEncodingException uue) { return new String(baos.toByteArray()); } } /** * Encodes a byte array into Base64 notation. * Does not GZip-compress data. * * @param source The data to convert * @since 1.4 */ public static String encodeBytes(byte[] source) { return encodeBytes(source, 0, source.length, NO_OPTIONS); } /** * Encodes a byte array into Base64 notation. * <p> * Valid options:<pre> * GZIP: gzip-compresses object before encoding it. * DONT_BREAK_LINES: don't break lines at 76 characters * <i>Note: Technically, this makes your encoding non-compliant.</i> * </pre> * <p> * Example: <code>encodeBytes( myData, Base64.GZIP )</code> or * <p> * Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DONT_BREAK_LINES )</code> * * * @param source The data to convert * @param options Specified options * @see Base64#GZIP * @see Base64#DONT_BREAK_LINES * @since 2.0 */ public static String encodeBytes(byte[] source, int options) { return encodeBytes(source, 0, source.length, options); } /** * Encodes a byte array into Base64 notation. * Does not GZip-compress data. * * @param source The data to convert * @param off Offset in array where conversion should begin * @param len Length of data to convert * @since 1.4 */ public static String encodeBytes(byte[] source, int off, int len) { return encodeBytes(source, off, len, NO_OPTIONS); } /** * Encodes a byte array into Base64 notation. * <p> * Valid options:<pre> * GZIP: gzip-compresses object before encoding it. * DONT_BREAK_LINES: don't break lines at 76 characters * <i>Note: Technically, this makes your encoding non-compliant.</i> * </pre> * <p> * Example: <code>encodeBytes( myData, Base64.GZIP )</code> or * <p> * Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DONT_BREAK_LINES )</code> * * * @param source The data to convert * @param off Offset in array where conversion should begin * @param len Length of data to convert * @param options Specified options * @param options alphabet type is pulled from this (standard, url-safe, ordered) * @see Base64#GZIP * @see Base64#DONT_BREAK_LINES * @since 2.0 */ public static String encodeBytes(byte[] source, int off, int len, int options) { int dontBreakLines = (options & DONT_BREAK_LINES); int gzip = (options & GZIP); if (gzip == GZIP) { java.io.ByteArrayOutputStream baos = null; java.util.zip.GZIPOutputStream gzos = null; Base64.OutputStream b64os = null; try { baos = new java.io.ByteArrayOutputStream(); b64os = new Base64.OutputStream(baos, ENCODE | options); gzos = new java.util.zip.GZIPOutputStream(b64os); gzos.write(source, off, len); gzos.close(); } catch (java.io.IOException e) { e.printStackTrace(); return null; } finally {
[ "aaponcseku@gmail.com" ]
aaponcseku@gmail.com
1fbf261ae98e8dae46d0468899871274b4ab6f45
6a6d2290d5e6454147908d864523e747fb94cd07
/src/com/company/var/Guideline5.java
a7ef889d8b8826b825d39f1606b79b03cb7b14c4
[]
no_license
mhussainshah1/Var-TypeInference
ed7fddbe61d8fc9201082f8c05e2a1629ccb69e2
85d0c3bd72e885b563de39fd599c0c53938e1a66
refs/heads/master
2022-12-30T09:27:42.917694
2020-10-13T02:25:47
2020-10-13T02:25:47
303,536,278
1
2
null
null
null
null
UTF-8
Java
false
false
489
java
package com.company.var; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; public class Guideline5 { public static void main(String[] args) { List<String> list = new ArrayList<>(); list = new CopyOnWriteArrayList<>(); list = new LinkedList<>(); var list1 = new ArrayList<>(); // list1 = new CopyOnWriteArrayList<>(); // list1 = new LinkedList<>(); } }
[ "muhammadshah.14@sunymaritime.edu" ]
muhammadshah.14@sunymaritime.edu
21b4c2a6016db514c12476ec4e7387ea027a45c7
6b97e3d7cedadb36fa66572d97a3ed97c5a7f1b2
/src/jd/plugins/hoster/DownloadGg.java
3c0e91d653504d6bdf7073be34ef495bfe94c7f6
[]
no_license
ironfox2151/jdownloader
4722eefbb82ea57c66bd9add8645838dfe35a2d1
29af20ad37060fb7d9d4f5d9598eeedc03f83869
refs/heads/master
2022-04-21T22:28:58.475332
2020-04-10T13:33:04
2020-04-10T13:33:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,147
java
//jDownloader - Downloadmanager //Copyright (C) 2009 JD-Team support@jdownloader.org // //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 3 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, see <http://www.gnu.org/licenses/>. package jd.plugins.hoster; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.appwork.utils.StringUtils; import org.appwork.utils.formatter.SizeFormatter; import jd.PluginWrapper; import jd.config.Property; import jd.http.Browser; import jd.http.URLConnectionAdapter; import jd.nutils.encoding.Encoding; import jd.parser.Regex; import jd.parser.html.Form; import jd.plugins.Account.AccountType; import jd.plugins.DownloadLink; import jd.plugins.DownloadLink.AvailableStatus; import jd.plugins.HostPlugin; import jd.plugins.LinkStatus; import jd.plugins.PluginException; import jd.plugins.PluginForHost; @HostPlugin(revision = "$Revision$", interfaceVersion = 3, names = {}, urls = {}) public class DownloadGg extends PluginForHost { public DownloadGg(PluginWrapper wrapper) { super(wrapper); } @Override public String getAGBLink() { return "https://download.gg/"; } private static List<String[]> getPluginDomains() { final List<String[]> ret = new ArrayList<String[]>(); // each entry in List<String[]> will result in one PluginForHost, Plugin.getHost() will return String[0]->main domain ret.add(new String[] { "download.gg" }); return ret; } public static String[] getAnnotationNames() { return buildAnnotationNames(getPluginDomains()); } @Override public String[] siteSupportedNames() { return buildSupportedNames(getPluginDomains()); } public static String[] getAnnotationUrls() { final List<String> ret = new ArrayList<String>(); for (final String[] domains : getPluginDomains()) { ret.add("https?://(?:www\\.)?" + buildHostsPatternPart(domains) + "/file-(\\d+_[a-f0-9]{16})"); } return ret.toArray(new String[0]); } /* Connection stuff */ private static final boolean FREE_RESUME = false; private static final int FREE_MAXCHUNKS = 1; private static final int FREE_MAXDOWNLOADS = 20; // private static final boolean ACCOUNT_FREE_RESUME = true; // private static final int ACCOUNT_FREE_MAXCHUNKS = 0; // private static final int ACCOUNT_FREE_MAXDOWNLOADS = 20; // private static final boolean ACCOUNT_PREMIUM_RESUME = true; // private static final int ACCOUNT_PREMIUM_MAXCHUNKS = 0; // private static final int ACCOUNT_PREMIUM_MAXDOWNLOADS = 20; // // /* don't touch the following! */ // private static AtomicInteger maxPrem = new AtomicInteger(1); @Override public String getLinkID(final DownloadLink link) { final String fid = getFID(link); if (fid != null) { return this.getHost() + "://" + fid; } else { return super.getLinkID(link); } } private String getFID(final DownloadLink link) { return new Regex(link.getPluginPatternMatcher(), this.getSupportedLinks()).getMatch(0); } @Override public AvailableStatus requestFileInformation(final DownloadLink link) throws IOException, PluginException { this.setBrowserExclusive(); br.setFollowRedirects(true); br.getPage(link.getPluginPatternMatcher()); if (br.getHttpConnection().getResponseCode() == 404) { throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND); } /* Skip ad page */ if (br.getURL().contains("/analyz-")) { br.getPage(link.getPluginPatternMatcher()); } String filename = br.getRegex("class=\"name\">([^<>\"]+)</div>").getMatch(0); if (StringUtils.isEmpty(filename)) { /* Fallback */ filename = this.getFID(link); } String filesize = br.getRegex("class=\"file-size\">([^<>\"]+)<").getMatch(0); if (StringUtils.isEmpty(filename)) { throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT); } filename = Encoding.htmlDecode(filename).trim(); link.setName(filename); if (filesize != null) { filesize = filesize.replace("Mo", "MB"); link.setDownloadSize(SizeFormatter.getSize(filesize)); } return AvailableStatus.TRUE; } @Override public void handleFree(final DownloadLink link) throws Exception, PluginException { requestFileInformation(link); doFree(link, FREE_RESUME, FREE_MAXCHUNKS, "free_directlink"); } private void doFree(final DownloadLink link, final boolean resumable, final int maxchunks, final String directlinkproperty) throws Exception, PluginException { final Form dlform = br.getFormbyActionRegex("download/.+"); if (dlform == null) { logger.warning("Failed to find dlform"); throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT); } dl = jd.plugins.BrowserAdapter.openDownload(br, link, dlform, resumable, maxchunks); if (dl.getConnection().getContentType().contains("html")) { if (dl.getConnection().getResponseCode() == 403) { throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Server error 403", 60 * 60 * 1000l); } else if (dl.getConnection().getResponseCode() == 404) { throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Server error 404", 60 * 60 * 1000l); } br.followConnection(); throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT); } // link.setProperty(directlinkproperty, dl.getConnection().getURL().toString()); dl.startDownload(); } private String checkDirectLink(final DownloadLink link, final String property) { String dllink = link.getStringProperty(property); if (dllink != null) { URLConnectionAdapter con = null; try { final Browser br2 = br.cloneBrowser(); br2.setFollowRedirects(true); con = br2.openHeadConnection(dllink); if (con.getContentType().contains("text") || !con.isOK() || con.getLongContentLength() == -1) { link.setProperty(property, Property.NULL); dllink = null; } } catch (final Exception e) { logger.log(e); link.setProperty(property, Property.NULL); dllink = null; } finally { if (con != null) { con.disconnect(); } } } return dllink; } @Override public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) { if (acc == null) { /* no account, yes we can expect captcha */ return true; } if (acc.getType() == AccountType.FREE) { /* Free accounts can have captchas */ return true; } /* Premium accounts do not have captchas */ return false; } @Override public int getMaxSimultanFreeDownloadNum() { return FREE_MAXDOWNLOADS; } @Override public void reset() { } @Override public void resetDownloadlink(DownloadLink link) { } }
[ "psp@ebf7c1c2-ba36-0410-9fe8-c592906822b4" ]
psp@ebf7c1c2-ba36-0410-9fe8-c592906822b4
7621778386b735ab3dfa7e7af950cd514463311c
d528fe4f3aa3a7eca7c5ba4e0aee43421e60857f
/src/xgxt/audit/spbz/SpbzDao.java
40961dd97cfc0df0cadbed81cac40f3aa4c8f913
[]
no_license
gxlioper/xajd
81bd19a7c4b9f2d1a41a23295497b6de0dae4169
b7d4237acf7d6ffeca1c4a5a6717594ca55f1673
refs/heads/master
2022-03-06T15:49:34.004924
2019-11-19T07:43:25
2019-11-19T07:43:25
null
0
0
null
null
null
null
GB18030
Java
false
false
2,537
java
package xgxt.audit.spbz; import java.util.HashMap; import java.util.List; import xgxt.DAO.DAO; import xgxt.audit.splc.SplcForm; import xgxt.comm.CommDAO; import xgxt.utils.CommonQueryDAO; /** * <p>Title: 学生工作管理系统</p> * <p>Description: 审批步骤</p> * <p>Copyright: Copyright (c) 2011</p> * <p>Company: zfsoft</p> * <p>Author: zhuang</p> * <p>Version: 1.0</p> * <p>Time: 2011-5-26</p> */ public class SpbzDao extends CommDAO { public List<String[]>getSpbzList(SpbzForm myForm) throws Exception{ String[]colList = new String[]{"id", "spgw", "xh", "spgwmc"}; String sql="select rownum r, a.id, a.splc, a.xh, a.spgw, b.mc as spgwmc from xg_xtwh_spbz a, xg_xtwh_spgw b " + "where a.spgw = b.id "; return CommonQueryDAO.commonQuery(sql, " and a.splc = '"+myForm.getSplc()+"'", new String[]{},colList, myForm); } public HashMap<String,String>getSpbz(SpbzForm myForm){ DAO dao=DAO.getInstance(); String sql="select rownum r, a.id, splc, xh, spgw, b.mc as spgwmc from xg_xtwh_spbz a, xg_xtwh_spgw b " + "where a.spgw = b.id and a.id = ?"; return dao.getMap(sql, new String[]{myForm.getId()}, new String[]{"id","splc","xh","spgw","spgwmc"}); } public boolean addSpbz(SpbzForm myForm) throws Exception{ DAO dao=DAO.getInstance(); String sql=" insert into xg_xtwh_spbz (splc, xh, spgw) values(?,?,?)"; return dao.insert(sql, new String[]{myForm.getSplc(), String.valueOf(myForm.getXh()), myForm.getSpgw()}); } public boolean modiSpbz(SpbzForm myForm) throws Exception{ DAO dao=DAO.getInstance(); String sql=" update xg_xtwh_spbz set splc = ?,xh = ?,spbz.spgw = ? where spbz.id = ? "; return dao.runUpdate(sql, new String[]{myForm.getId(),myForm.getSplc(), String.valueOf(myForm.getXh()), myForm.getSpgw(), myForm.getId()}); } public List<HashMap<String,String>>getSpgwList(){ String sql="select id, mc from xg_xtwh_spgw "; DAO dao=DAO.getInstance(); return dao.getList(sql, new String[]{}, new String[]{"id","mc"}); } public int[] delSpbz(SpbzForm myForm) throws Exception { DAO dao = DAO.getInstance(); //表名 String tableName = "xg_xtwh_spbz"; //条件 String query = " where id= "; //主键 String[]checkVal=myForm.getCheckVal(); String[]sqlArr=new String[checkVal.length]; for(int i=0;i<sqlArr.length;i++){ sqlArr[i] = " delete from " + tableName + query+"'"+checkVal[i]+"'"; } return dao.runBatch(sqlArr); } }
[ "1398796456@qq.com" ]
1398796456@qq.com
22e006eb6190e2d6fbc30ca0884399a13771d17e
f7fbc015359f7e2a7bae421918636b608ea4cef6
/base-one/tags/hsqldb_1_7_2_ALPHA_Q/src/org/hsqldb/util/TransferHelper.java
3fc75f7c4017ed3d227421731668a2644b6331a5
[]
no_license
svn2github/hsqldb
cdb363112cbdb9924c816811577586f0bf8aba90
52c703b4d54483899d834b1c23c1de7173558458
refs/heads/master
2023-09-03T10:33:34.963710
2019-01-18T23:07:40
2019-01-18T23:07:40
155,365,089
0
0
null
null
null
null
UTF-8
Java
false
false
4,680
java
/* Copyright (c) 2001-2002, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.util; import java.sql.*; import java.util.*; /** * Base class for conversion from a different databases * * @author sqlbob@users * @version 1.7.0 */ class TransferHelper { protected TransferDb db; protected Traceable tracer; protected String sSchema; protected JDBCTypes JDBCT; private String quote; TransferHelper() { db = null; tracer = null; quote = "\'"; JDBCT = new JDBCTypes(); } TransferHelper(TransferDb database, Traceable t, String q) { db = database; tracer = t; quote = q; JDBCT = new JDBCTypes(); } void set(TransferDb database, Traceable t, String q) { db = database; tracer = t; quote = q; } String formatIdentifier(String id) { if (id == null) { return id; } if (id.equals("")) { return id; } if (!Character.isLetter(id.charAt(0)) || (id.indexOf(' ') != -1)) { return (quote + id + quote); } return id; } void setSchema(String _Schema) { sSchema = _Schema; } String formatName(String t) { String Name = ""; if ((sSchema != null) && (sSchema.length() > 0)) { Name = sSchema + "."; } Name += formatIdentifier(t); return Name; } int convertFromType(int type) { return (type); } int convertToType(int type) { return (type); } Hashtable getSupportedTypes() { Hashtable hTypes = new Hashtable(); if (db != null) { try { ResultSet result = db.meta.getTypeInfo(); while (result.next()) { Integer intobj = new Integer(result.getShort(2)); if (hTypes.get(intobj) == null) { try { hTypes.put(intobj, JDBCT.toString(result.getShort(2))); } catch (Exception e) {} } } result.close(); } catch (SQLException e) {} } if (hTypes.isEmpty()) { hTypes = JDBCT.getHashtable(); } return hTypes; } String fixupColumnDefRead(TransferTable t, ResultSetMetaData meta, String columnType, ResultSet columnDesc, int columnIndex) throws SQLException { return (columnType); } String fixupColumnDefWrite(TransferTable t, ResultSetMetaData meta, String columnType, ResultSet columnDesc, int columnIndex) throws SQLException { return (columnType); } boolean needTransferTransaction() { return (false); } Object convertColumnValue(Object value, int column, int type) { return (value); } void beginDataTransfer() {} void endDataTransfer() {} }
[ "(no author)@7c7dc5f5-a22d-0410-a3af-b41755a11667" ]
(no author)@7c7dc5f5-a22d-0410-a3af-b41755a11667
b210be9de9e775dfc25f147009aa5f62f21b5e04
db97cfc9499c3974100967460b7ba3abb678aefe
/src/main/java/com/cosium/logging/annotation_processor/CurrentMessagerSupplier.java
6812abfa91dbae4c74a5fdfc58143523c51f3550
[ "MIT" ]
permissive
Cosium/annotation-processor-logger
b28136820414b98d3255c0819bd0363bb83f545d
1d9a12e89f7e2b70d30a18f9712defb6127a1d61
refs/heads/master
2020-03-25T21:34:46.583590
2018-08-10T08:00:42
2018-08-10T08:00:42
144,181,095
7
0
null
null
null
null
UTF-8
Java
false
false
415
java
package com.cosium.logging.annotation_processor; import javax.annotation.processing.Messager; import java.util.Optional; import java.util.function.Supplier; /** * Created on 09/08/18. * * @author Reda.Housni-Alaoui */ public class CurrentMessagerSupplier implements Supplier<Optional<Messager>> { @Override public Optional<Messager> get() { return AbstractLoggingProcessor.getCurrentMessager(); } }
[ "reda.housnialaoui@gmail.com" ]
reda.housnialaoui@gmail.com
746e5aa8219209c1d7e8853fa52a0dff0bcb4946
7767bee7b48be702527cfe8c69c0293691edadc0
/src/com/zstar/SMMS/BaseData/SmmsPendingEvent/action/CheckUrlAction.java
725e4d68621807f9254bab91baa50fb5a62fd759
[]
no_license
WayFareY/SMMS
bcec2ac9747b8180c787274dcf175968be801e8b
22438ae0dbfd99c5d10f3a385f2aee7b0930c76e
refs/heads/master
2021-05-13T15:58:46.938505
2018-05-28T01:48:59
2018-05-28T01:48:59
115,971,485
1
0
null
null
null
null
UTF-8
Java
false
false
2,641
java
package com.zstar.SMMS.BaseData.SmmsPendingEvent.action; import com.strutsframe.db.DBSqlSession; import com.zstar.fmp.core.frame.action.FrameAction; import com.zstar.fmp.utils.JsonUtil; import java.util.HashMap; import java.util.List; import java.util.Map; public class CheckUrlAction extends FrameAction { public String bizExecute() throws Exception { String url = (String)getWebData("URL"); Map urlMap = new HashMap(); urlMap.put("URL", url.toUpperCase()); List urlList = this.sqlSession.selectList("WebCase.checkUrl", urlMap); if ((urlList != null) && (urlList.size() > 0)) { Map webCaseMap = (Map)urlList.get(0); List roomInfoList = this.sqlSession.selectList("SmmsRoomInfo.selectRoomInfo", webCaseMap); if ((roomInfoList != null) && (roomInfoList.size() > 0)) { Map roomInfoMap = (Map)roomInfoList.get(0); webCaseMap.put("ssrRid", roomInfoMap.get("ssrRid")); webCaseMap.put("room_name", roomInfoMap.get("room_name")); webCaseMap.put("room_idx", roomInfoMap.get("room_idx")); webCaseMap.put("room_address", roomInfoMap.get("room_address")); setMsg(JsonUtil.dataMapToJson(webCaseMap)); } } else { Map ipMap = new HashMap(); ipMap.put("IP", getWebData("IP")); List listRoomIdc = this.sqlSession.selectList("SmmsRoomIprange.selectAccesIdByIp", ipMap); if ((listRoomIdc != null) && (listRoomIdc.size() > 0)) { Map roomIdcMap = (Map)listRoomIdc.get(0); List listRoomAndIdc = this.sqlSession.selectList("SmmsPendingEvent.checkAccessIdAndRoomIdx", roomIdcMap); if ((listRoomAndIdc != null) && (listRoomAndIdc.size() > 0)) { Map roomAndIdcMap = (Map)listRoomAndIdc.get(0); List listSwcIp = this.sqlSession.selectList("SmmsWebCaseIp.selectRidByIp", ipMap); if ((listSwcIp != null) && (listSwcIp.size() > 0)) { Map swcIpMap = (Map)listSwcIp.get(0); List listSwc = this.sqlSession.selectList("SmmsWebCaseIp.webCaseRid", swcIpMap); if ((listSwc != null) && (listSwc.size() > 0)) { Map swcMap = (Map)listSwc.get(0); roomAndIdcMap.put("swcRid", swcMap.get("swcRid")); roomAndIdcMap.put("website_name", swcMap.get("website_name")); roomAndIdcMap.put("sponser_case_num", swcMap.get("sponser_case_num")); roomAndIdcMap.put("website_url", swcMap.get("website_url")); setMsg(JsonUtil.dataMapToJson(roomAndIdcMap)); } } } } } return "empty"; } }
[ "WayFareY@github.com" ]
WayFareY@github.com
021ac3306921832d56fafcf6bad4ce159490d773
58d9df3b0a29aa3a3ca28bb8f0d020fbd0b22b7d
/first_java/src/java_0812/SortTest.java
f464d2f4b3fb7a88ed06ec0cfff36e11799729d6
[]
no_license
jihye-lake/liver
1531deebd5a8b68b56740c31c863c34af2ed2aad
d065a659d13016342134ae2278d288b9cab8efaa
refs/heads/master
2023-03-19T08:08:18.884957
2021-03-03T08:41:58
2021-03-03T08:41:58
343,663,455
0
0
null
null
null
null
UHC
Java
false
false
771
java
package java_0812; import java.util.Arrays; import java.util.Collections; import java.util.List; class Student1 implements Comparable<Student1> { int number; String name; public Student1(int number, String name) { this.number = number; this.name = name; } public String toString() { return name; } @Override public int compareTo(Student1 s) { return number - s.number; } } public class SortTest { public static void main(String[] args) { Student1 array[] = { new Student1(20090001, "김태리"), new Student1(20090002, "틸다스윈턴"), new Student1(20090003, "로라프리폰"), }; List<Student1> list = Arrays.asList(array); Collections.sort(list); System.out.println(list); } }
[ "최지혜@DESKTOP-EE034IU" ]
최지혜@DESKTOP-EE034IU
053f26fcdf96b5f2f4b775ceadf00d75d91b879e
4bb83687710716d91b5da55054c04f430474ee52
/dsrc/sku.0/sys.server/compiled/game/script/systems/crafting/chemistry/crafted_items/crafting_medpack_wound_action_chemistry.java
3c482bb8004b333ba652198992220c1897487333
[]
no_license
geralex/SWG-NGE
0846566a44f4460c32d38078e0a1eb115a9b08b0
fa8ae0017f996e400fccc5ba3763e5bb1c8cdd1c
refs/heads/master
2020-04-06T11:18:36.110302
2018-03-19T15:42:32
2018-03-19T15:42:32
157,411,938
1
0
null
2018-11-13T16:35:01
2018-11-13T16:35:01
null
UTF-8
Java
false
false
3,637
java
package script.systems.crafting.chemistry.crafted_items; import script.*; import script.base_class.*; import script.combat_engine.*; import java.util.Arrays; import java.util.Hashtable; import java.util.Vector; import script.base_script; import script.library.utils; import script.library.craftinglib; public class crafting_medpack_wound_action_chemistry extends script.systems.crafting.chemistry.crafting_wound_action_chemical { public crafting_medpack_wound_action_chemistry() { } public static final String VERSION = "v0.00.00"; public static final String[] REQUIRED_SKILLS = { "science_doctor_novice" }; public static final String[] ASSEMBLY_SKILL_MODS = { "medicine_assembly" }; public static final String[] EXPERIMENT_SKILL_MODS = { "medicine_experimentation", "medicine_complexity" }; public static final resource_weight[] OBJ_ASSEMBLY_ATTRIBUTE_RESOURCES = { new resource_weight("power", new resource_weight.weight[] { new resource_weight.weight(craftinglib.RESOURCE_POTENTIAL_ENERGY, 2), new resource_weight.weight(craftinglib.RESOURCE_QUALITY, 4) }), new resource_weight("charges", new resource_weight.weight[] { new resource_weight.weight(craftinglib.RESOURCE_TOUGHNESS, 2), new resource_weight.weight(craftinglib.RESOURCE_QUALITY, 4) }), new resource_weight("skillModMin", new resource_weight.weight[] { new resource_weight.weight(craftinglib.RESOURCE_POTENTIAL_ENERGY, 2), new resource_weight.weight(craftinglib.RESOURCE_QUALITY, 4) }), new resource_weight("hitPoints", new resource_weight.weight[] { new resource_weight.weight(craftinglib.RESOURCE_QUALITY, 1), new resource_weight.weight(craftinglib.RESOURCE_TOUGHNESS, 2) }) }; public static final resource_weight[] OBJ_MAX_ATTRIBUTE_RESOURCES = { new resource_weight("power", new resource_weight.weight[] { new resource_weight.weight(craftinglib.RESOURCE_POTENTIAL_ENERGY, 2), new resource_weight.weight(craftinglib.RESOURCE_QUALITY, 4) }), new resource_weight("charges", new resource_weight.weight[] { new resource_weight.weight(craftinglib.RESOURCE_TOUGHNESS, 2), new resource_weight.weight(craftinglib.RESOURCE_QUALITY, 4) }), new resource_weight("skillModMin", new resource_weight.weight[] { new resource_weight.weight(craftinglib.RESOURCE_POTENTIAL_ENERGY, 2), new resource_weight.weight(craftinglib.RESOURCE_QUALITY, 4) }), new resource_weight("hitPoints", new resource_weight.weight[] { new resource_weight.weight(craftinglib.RESOURCE_QUALITY, 1), new resource_weight.weight(craftinglib.RESOURCE_TOUGHNESS, 2) }) }; public String[] getRequiredSkills() throws InterruptedException { return REQUIRED_SKILLS; } public String[] getAssemblySkillMods() throws InterruptedException { return ASSEMBLY_SKILL_MODS; } public String[] getExperimentSkillMods() throws InterruptedException { return EXPERIMENT_SKILL_MODS; } public resource_weight[] getResourceMaxResourceWeights() throws InterruptedException { return OBJ_MAX_ATTRIBUTE_RESOURCES; } public resource_weight[] getAssemblyResourceWeights() throws InterruptedException { return OBJ_ASSEMBLY_ATTRIBUTE_RESOURCES; } }
[ "tmoflash@gmail.com" ]
tmoflash@gmail.com
0612ecbfd3000e791ef3eb4c2a352675a5847df3
a16d709fceb05a38bf26e38243b9d5f0453f9b43
/src/main/java/thaumicenergistics/common/tiles/TileEssentiaCellWorkbench.java
b7129fc9ca1ce9c6be39e23ebba930f279c4d372
[ "MIT" ]
permissive
WeAreShrubs/ThaumicEnergistics
29b3a93f0bc35ae0aa32b058005e7adc18300e4f
1f812132e0834a38696f0940467ba423a89bcb74
refs/heads/master
2020-05-21T10:15:00.729370
2016-03-30T16:13:47
2016-03-30T16:13:47
54,923,598
0
0
null
2016-03-28T21:05:17
2016-03-28T21:05:17
null
UTF-8
Java
false
false
7,997
java
package thaumicenergistics.common.tiles; import java.util.ArrayList; import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import thaumcraft.api.aspects.Aspect; import thaumicenergistics.common.ThaumicEnergistics; import thaumicenergistics.common.container.ContainerEssentiaCellWorkbench; import thaumicenergistics.common.inventory.HandlerItemEssentiaCell; import thaumicenergistics.common.items.ItemEssentiaCell; import thaumicenergistics.common.utils.EffectiveSide; import thaumicenergistics.common.utils.ThEUtils; import appeng.api.storage.IMEInventory; import appeng.api.storage.ISaveProvider; /** * Provides {@link ItemEssentiaCell} partitioning. * * @author Nividica * */ public class TileEssentiaCellWorkbench extends TileEntity implements IInventory, ISaveProvider { /** * NBT Keys */ private static String NBT_KEY_CELL = "EssentiaCell"; /** * The stored essentia cell. */ private ItemStack eCell = null; /** * Cell handler */ private HandlerItemEssentiaCell eCellHandler = null; /** * List of containers that are open. */ private final List<ContainerEssentiaCellWorkbench> listeners = new ArrayList<ContainerEssentiaCellWorkbench>(); public TileEssentiaCellWorkbench() { } /** * Notifies listeners that the partition list has changed. */ private void notifyListenersOfPartitionChange() { ArrayList<Aspect> partitionList = this.getPartitionList(); // Update each listener for( ContainerEssentiaCellWorkbench container : this.listeners ) { container.onPartitionChanged( partitionList ); } } /** * Attempts to add an aspect to the partition. * * @param aspect */ public boolean addAspectToPartition( final Aspect aspect ) { if( ( this.eCellHandler != null ) ) { if( this.eCellHandler.addAspectToPartitionList( aspect ) ) { // Update listeners this.notifyListenersOfPartitionChange(); return true; } } return false; } /** * Workbench does not need ticks. */ @Override public boolean canUpdate() { return false; } /** * Clears all partitioning. * * @param player */ public void clearAllPartitioning() { // Ensure there is a handler if( this.eCellHandler != null ) { // Clear the partitioning this.eCellHandler.clearPartitioning(); // Update listeners this.notifyListenersOfPartitionChange(); } } @Override public void closeInventory() { // Ignored } /** * Gets and removes the cell. */ @Override public ItemStack decrStackSize( final int slotIndex, final int amount ) { ItemStack rtn = null; if( this.hasEssentiaCell() ) { // Get the cell rtn = this.eCell; // Null the cell this.setInventorySlotContents( slotIndex, null ); } return rtn; } @Override public String getInventoryName() { return ThaumicEnergistics.MOD_ID + ".essentia.cell.workbench.inventory"; } @Override public int getInventoryStackLimit() { return 1; } /** * Gets the partition list. * * @return */ public ArrayList<Aspect> getPartitionList() { ArrayList<Aspect> partitionList; // Ensure there is a handler if( ( this.eCellHandler != null ) ) { // Get the partition list partitionList = this.eCellHandler.getPartitionAspects(); } else { // Create an empty list partitionList = new ArrayList<Aspect>(); } return partitionList; } @Override public int getSizeInventory() { return 1; } /** * Gets the cell. */ @Override public ItemStack getStackInSlot( final int slotIndex ) { return this.eCell; } /** * Gets the cell. */ @Override public ItemStack getStackInSlotOnClosing( final int slotIndex ) { return this.eCell; } @Override public boolean hasCustomInventoryName() { return true; } /** * Checks if the workbench has a cell. * * @return */ public boolean hasEssentiaCell() { return( this.eCell != null ); } /** * Ensures the stack is an essentia cell. */ @Override public boolean isItemValidForSlot( final int slotIndex, final ItemStack stack ) { return( ( stack == null ) || ( stack.getItem() instanceof ItemEssentiaCell ) ); } @Override public boolean isUseableByPlayer( final EntityPlayer player ) { return ThEUtils.canPlayerInteractWith( player, this ); } @Override public void openInventory() { // Ignored } /** * Partitions the cell be set to the contents of the cell. * * @param player */ public void partitionToCellContents() { // Ensure there is a handler if( this.eCellHandler != null ) { // Partition the cell this.eCellHandler.partitionToCellContents(); // Update listeners this.notifyListenersOfPartitionChange(); } } /** * Loads the workbench. */ @Override public void readFromNBT( final NBTTagCompound data ) { // Call super super.readFromNBT( data ); // Is there a cell to read? if( data.hasKey( TileEssentiaCellWorkbench.NBT_KEY_CELL ) ) { // Read the cell this.setInventorySlotContents( 0, ItemStack.loadItemStackFromNBT( data.getCompoundTag( TileEssentiaCellWorkbench.NBT_KEY_CELL ) ) ); } } /** * Registers a container. * The container will be notified when the cell changes. * * @param container */ public void registerListener( final ContainerEssentiaCellWorkbench container ) { if( !this.listeners.contains( container ) ) { this.listeners.add( container ); } } /** * Removes an aspect from the partition. * * @param aspect */ public void removeAspectFromPartition( final Aspect aspect ) { // Ensure there is a handler if( ( this.eCellHandler != null ) ) { // Remove from the partition list if( this.eCellHandler.removeAspectFromPartitionList( aspect ) ) { // Update listeners this.notifyListenersOfPartitionChange(); } } } /** * Removes a container. * It will no longer receive notifications when the cell changes. * * @param container */ public void removeListener( final ContainerEssentiaCellWorkbench container ) { this.listeners.remove( container ); } /** * Called when the cell changes */ @Override public void saveChanges( final IMEInventory cellInventory ) { // Mark the chunk as needing to be saved. // Much less invasive than markDirty(), which issues onNeighborChanged events to a 12 block radius... this.worldObj.markTileEntityChunkModified( this.xCoord, this.yCoord, this.zCoord, this ); } /** * Sets the stored cell * * @param cell */ @Override public void setInventorySlotContents( final int slotIndex, final ItemStack stack ) { if( this.isItemValidForSlot( slotIndex, stack ) ) { // Set the cell this.eCell = stack; if( EffectiveSide.isServerSide() ) { if( stack == null ) { // Null the handler this.eCellHandler = null; } else { // Get the handler this.eCellHandler = new HandlerItemEssentiaCell( stack, this ); } // Update containers this.notifyListenersOfPartitionChange(); } } } /** * Replaces one aspect with another. * * @param aspect */ public void swapPartitionedAspect( final Aspect fromAspect, final Aspect toAspect ) { // Ensure there is a handler if( this.eCellHandler != null ) { // Replace the aspect if( this.eCellHandler.replaceAspectInPartitionList( fromAspect, toAspect ) ) { // Update listeners this.notifyListenersOfPartitionChange(); } } } /** * Saves the workbench. */ @Override public void writeToNBT( final NBTTagCompound data ) { // Call super super.writeToNBT( data ); // Is there a cell? if( this.hasEssentiaCell() ) { // Write the cell data NBTTagCompound cellData = this.eCell.writeToNBT( new NBTTagCompound() ); // Add the cell data data.setTag( TileEssentiaCellWorkbench.NBT_KEY_CELL, cellData ); } } }
[ "Nividica@gmail.com" ]
Nividica@gmail.com
04ca3db609b3773acfc0b3e843af6ce7e98b945c
27f5457d47aaf3491f0d64032247adc08efba867
/vertx-gaia/vertx-ams/src/main/qas/io/horizon/specification/typed/TJson.java
46508718e94539fff138d2e4aceff0c0fa036500
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
silentbalanceyh/vertx-zero
e73d22f4213263933683e4ebe87982ba68803878
1ede4c3596f491d5251eefaaaedc56947ef784cd
refs/heads/master
2023-06-11T23:10:29.241769
2023-06-08T16:15:33
2023-06-08T16:15:33
108,104,586
348
71
Apache-2.0
2020-04-10T02:15:18
2017-10-24T09:21:56
HTML
UTF-8
Java
false
false
1,767
java
package io.horizon.specification.typed; import io.horizon.util.HUt; import io.vertx.core.json.JsonObject; /** * 「Json序列化规范」 * <hr/> * 针对 JsonObject 专用的接口,用于实现 JsonObject 和 T 类型的互相转换,转换分两个级别 * <pre><code> * 1. 内存级:toJson / fromJson,直接将内存中的字符串字面量和当前对象进行类型转换 * 2. 文件级:文件级只支持从文件系统读取和加载数据文件,直接将路径中的 json 文件读取 * 到内存中,并且实现到对象的转换。 * </code></pre> * 默认场景下,该接口中从文件加载数据会直接调用 {@link HUt#ioJObject} 静态方法,该静态 * 方法会检索文件路径,然后读取相关内容,最终加载到当前对象中。 * * @author lang */ public interface TJson { /** * 将当前对象、组件或实现转换成 {@link JsonObject} * * @return {@link JsonObject} */ JsonObject toJson(); /** * 将传入的 {@link JsonObject} 对象中的数据加载到环境中填充当前对象 * * @param json 输入的 {@link JsonObject} 类型对象 */ void fromJson(JsonObject json); /** * 「重载方法」直接从文件系统加载数据文件,然后填充到当前对象。 * 默认实现调用了 {@link HUt#ioJObject} 静态方法,该静态方法会检索文件路径,然后读取相关内容, * 转换流程如: * <pre><code> * File -> JsonObject -> T * </code></pre> * * @param jsonFile 输入的文件路径 */ default void fromFile(final String jsonFile) { final JsonObject data = HUt.ioJObject(jsonFile); this.fromJson(data); } }
[ "silentbalanceyh@126.com" ]
silentbalanceyh@126.com
60f4000799df80e3576af069eac11acd144b4a4b
879b4fcafa3d423c187d0a034d0def88e444131d
/dsf-fhir/dsf-fhir-server/src/main/java/org/highmed/dsf/fhir/authentication/AuthenticationFilter.java
6e4618e30c77047beddedcf85d549f7fe2956183
[ "Apache-2.0" ]
permissive
alhersh/highmed-dsf
64f7a32e2f207b8e90ff8c947849a5fa0f2294e9
fe19d75c79e33918c805a13698326934d271ead4
refs/heads/master
2023-07-18T15:06:21.526870
2021-01-26T15:25:25
2021-01-26T15:25:25
330,970,130
0
0
Apache-2.0
2021-03-05T13:10:36
2021-01-19T12:19:31
Java
UTF-8
Java
false
false
3,524
java
package org.highmed.dsf.fhir.authentication; import java.io.IOException; import java.security.cert.X509Certificate; import java.util.Objects; import java.util.Optional; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.core.Response.Status; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.context.support.WebApplicationContextUtils; public class AuthenticationFilter implements Filter { private static final Logger logger = LoggerFactory.getLogger(AuthenticationFilter.class); public static final String USER_PROPERTY = AuthenticationFilter.class.getName() + ".user"; private OrganizationProvider organizationProvider; private AuthenticationFilterConfig authenticationFilterConfig; @Override public void init(FilterConfig filterConfig) throws ServletException { logger.debug("Init {}", AuthenticationFilter.class.getName()); organizationProvider = WebApplicationContextUtils.getWebApplicationContext(filterConfig.getServletContext()) .getBean(OrganizationProvider.class); authenticationFilterConfig = WebApplicationContextUtils .getWebApplicationContext(filterConfig.getServletContext()).getBean(AuthenticationFilterConfig.class); Objects.requireNonNull(organizationProvider, "organizationProvider"); Objects.requireNonNull(authenticationFilterConfig, "authenticationFilterConfig"); } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpServletRequest = (HttpServletRequest) request; HttpServletResponse httpServletResponse = (HttpServletResponse) response; logger.debug("{} {}", httpServletRequest.getMethod(), httpServletRequest.getRequestURL() + (httpServletRequest.getQueryString() != null && !httpServletRequest.getQueryString().isEmpty() ? ("?" + httpServletRequest.getQueryString()) : "")); if (!authenticationFilterConfig.needsAuthentication(httpServletRequest)) { chain.doFilter(httpServletRequest, httpServletResponse); } else { Optional<User> user = getUser(httpServletRequest); if (user.isPresent()) { logger.debug("User '{}' with role '{}' authenticated", user.get().getName(), user.get().getRole()); setUserAttribute(httpServletRequest, user.get()); chain.doFilter(httpServletRequest, httpServletResponse); } else unauthoized(httpServletResponse); } } private Optional<User> getUser(HttpServletRequest httpServletRequest) { X509Certificate[] certificates = (X509Certificate[]) httpServletRequest .getAttribute("javax.servlet.request.X509Certificate"); if (certificates == null || certificates.length <= 0) { logger.warn("X509Certificate could not be retrieved"); return Optional.empty(); } else return organizationProvider.getOrganization(certificates[0]); } private void setUserAttribute(HttpServletRequest request, User user) { request.getSession().setAttribute(USER_PROPERTY, user); } private void unauthoized(HttpServletResponse response) throws IOException { logger.warn("User not found, sending unauthorized"); response.sendError(Status.UNAUTHORIZED.getStatusCode()); } @Override public void destroy() { } }
[ "hauke.hund@hs-heilbronn.de" ]
hauke.hund@hs-heilbronn.de
ed33684cb903ca005a46d84cc844f0fd8fbc3931
596c7846eabd6e8ebb83eab6b83d6cd0801f5124
/spring-demo-000-other/eg-007-thread/src/main/java/com/github/bjlhx15/common/threaddemo/ThreadDemo09UncaughtExceptionHandler.java
70d89ca21247721ea881c4988f226937de571094
[]
no_license
zzw0598/common
c219c53202cdb5e74a7c76d18f90e18eca983752
76abfb43c93da4090bbb8861d27bbcb990735b80
refs/heads/master
2023-03-10T02:30:44.310940
2021-02-19T07:59:16
2021-02-19T07:59:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
774
java
package com.github.bjlhx15.common.threaddemo; import java.util.HashMap; import java.util.concurrent.TimeUnit; /** * @author lihongxu6 * @version 1.0 * @className ThreadDemo01 * @description TODO * @date 2021-02-13 11:00 */ public class ThreadDemo09UncaughtExceptionHandler { public static void main(String[] args) { Thread.setDefaultUncaughtExceptionHandler((t, e) -> { System.out.println(t.getName() + " occur execption."); e.printStackTrace(); }); final Thread thread = new Thread(() -> { try { TimeUnit.SECONDS.sleep(2); } catch (InterruptedException e) { } System.out.println(1 / 0); }, "Test-Thread"); thread.start(); } }
[ "lihongxu6@jd.com" ]
lihongxu6@jd.com
19f79ebbf20bd72aa2f9b8d6213fee2ac8728c21
9d32980f5989cd4c55cea498af5d6a413e08b7a2
/A92s_10_0_0/src/main/java/com/color/antivirus/ColorAntiVirusBehaviorManager.java
13587b2670fcf25f50c590d0a84ee0b790f6413c
[]
no_license
liuhaosource/OppoFramework
e7cc3bcd16958f809eec624b9921043cde30c831
ebe39acabf5eae49f5f991c5ce677d62b683f1b6
refs/heads/master
2023-06-03T23:06:17.572407
2020-11-30T08:40:07
2020-11-30T08:40:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,930
java
package com.color.antivirus; import android.content.ComponentName; import android.content.Intent; import android.net.Uri; import android.os.Binder; import android.os.IBinder; import android.os.Process; import android.os.ServiceManager; import com.color.antivirus.IColorAntiViruStateChangeCallback; import com.color.antivirus.IColorAntiVirusManagerService; import com.color.antivirus.qihoo.BehaviorBidSender; import com.color.antivirus.qihoo.BinderStubClient; import com.color.antivirus.tencent.TRPEngManager; public class ColorAntiVirusBehaviorManager implements IColorAntiVirusBehaviorManager { private static final String TAG = "ColorAntiVirusBehaviorManager"; /* access modifiers changed from: private */ public static boolean isAIAntiVirusOn = false; private static boolean isTRPEngInitialized = false; private static final IColorAntiViruStateChangeCallback mSateChangeCallback = new IColorAntiViruStateChangeCallback.Stub() { /* class com.color.antivirus.ColorAntiVirusBehaviorManager.AnonymousClass1 */ public void onAntiVirusStateChange(boolean state) { boolean unused = ColorAntiVirusBehaviorManager.isAIAntiVirusOn = state; } }; private static volatile ColorAntiVirusBehaviorManager sInstance; private static void checkRegionAndFeature() { IColorAntiVirusManagerService antiVirusManager = IColorAntiVirusManagerService.Stub.asInterface(ServiceManager.getService("anti_virus_manager")); if (antiVirusManager != null) { try { antiVirusManager.registerStateChangeCallback(mSateChangeCallback); } catch (Exception e) { AntivirusLog.e(TAG, "registerStateChangeCallback failed!", e); } } else { AntivirusLog.e(TAG, "failed to get ColorAntiviruManagerService"); } } private static boolean uidNotInMonitorRange(int uid) { if (uid < 10000 || uid > 19999) { return true; } return false; } public static ColorAntiVirusBehaviorManager getInstance() { if (sInstance == null) { synchronized (ColorAntiVirusBehaviorManager.class) { if (sInstance == null) { sInstance = new ColorAntiVirusBehaviorManager(); } } } return sInstance; } public void checkAndSendReceiverInvocation(Intent intent, boolean dy) { if (isAIAntiVirusOn) { BinderStubClient.checkAndSendReceiverInvocation(intent, dy); } } public void senderInit() { if (!uidNotInMonitorRange(Process.myUid())) { checkRegionAndFeature(); if (isAIAntiVirusOn) { BehaviorBidSender.getInstance().init(); } } } public IBinder getOrCreateFakeBinder(IBinder origBinder, String svcName) { if (!isAIAntiVirusOn || uidNotInMonitorRange(Process.myUid())) { return origBinder; } return BinderStubClient.getOrCreateFakeBinder(origBinder, svcName); } public boolean isInstance(IBinder binder) { if (!isAIAntiVirusOn || uidNotInMonitorRange(Process.myUid())) { return false; } return BinderStubClient.class.isInstance(binder); } public boolean checkNeedReplace(String name) { if (!isAIAntiVirusOn || uidNotInMonitorRange(Process.myUid())) { return false; } return BinderStubClient.checkNeedReplace(name); } private void initTRPEngManager() { if (!isTRPEngInitialized) { isTRPEngInitialized = true; checkRegionAndFeature(); TRPEngManager.getInstance(); } } public void setAction(int actionId, int uid) { if (!uidNotInMonitorRange(uid)) { initTRPEngManager(); if (isAIAntiVirusOn) { TRPEngManager.setAction(actionId, uid); } } } public void broadcastIntent(Intent intent, int uid) { int trpid; if (!uidNotInMonitorRange(uid)) { initTRPEngManager(); if (isAIAntiVirusOn) { TRPEngManager.setAction(81, Binder.getCallingUid()); if (intent != null) { String action = intent.getAction(); if (action == null) { trpid = 1107; } else if (action.equals("android.intent.action.PACKAGE_CHANGED")) { trpid = 1100; } else if (action.equals("android.intent.action.PACKAGE_REMOVED")) { trpid = 1101; } else if (action.equals("android.intent.action.TIME_TICK")) { trpid = 1102; } else if (action.equals("android.intent.action.TIME_SET")) { trpid = 1103; } else if (action.equals("android.intent.action.BATTERY_CHANGED")) { trpid = 1104; } else if (action.equals("android.intent.action.PACKAGE_ADDED")) { trpid = 1105; } else if (action.equals("com.android.launcher.action.INSTALL_SHORTCUT")) { trpid = 1106; } else { trpid = 1107; } TRPEngManager.setAction(trpid, uid); } } } } public void setForegroundApp(String packageName) { initTRPEngManager(); if (isAIAntiVirusOn) { TRPEngManager.setForegroundApp(packageName); } } public void setAction_startActivityMayWait(int uid, String action, ComponentName comp, String pkg, Uri dat) { if (!uidNotInMonitorRange(uid)) { initTRPEngManager(); if (isAIAntiVirusOn) { TRPEngManager.setAction_startActivityMayWait(80, uid, action, comp, pkg, dat); } } } public void setAction_AMS_getContentProvider(int uid, String name) { if (!uidNotInMonitorRange(uid)) { initTRPEngManager(); if (isAIAntiVirusOn) { TRPEngManager.setAction_AMS_getContentProvider(uid, name); } } } public void setAction_SensorManager_registerListenerImp(int uid, int sensortype) { if (!uidNotInMonitorRange(uid)) { initTRPEngManager(); if (isAIAntiVirusOn) { TRPEngManager.setAction_SensorManager_registerListenerImp(uid, sensortype); } } } public void setAction_SetContentProviderAction(Uri uri, int action, int uid) { if (!uidNotInMonitorRange(uid)) { initTRPEngManager(); if (isAIAntiVirusOn) { TRPEngManager.setAction_SetContentProviderAction(uri, action, uid); } } } public void setComponentEnabledSetting(int newState, int uid) { if (!uidNotInMonitorRange(uid)) { initTRPEngManager(); if (isAIAntiVirusOn) { setAction(38, uid); int trpid = 0; if (newState == 0) { trpid = 1301; } else if (newState == 1) { trpid = 1302; } else if (newState == 2) { trpid = 1303; } else if (newState == 3) { trpid = 1304; } if (trpid != 0) { setAction(trpid, uid); } } } } public void setAction_addWindow(int actionId, int uid, int type) { if (!uidNotInMonitorRange(uid)) { initTRPEngManager(); if (isAIAntiVirusOn) { TRPEngManager.setAction_addWindow(actionId, uid, type); } } } }
[ "dstmath@163.com" ]
dstmath@163.com
c1dfe413c32f41f009b26ebe69657a0faa2acc99
226e7b8e0edb8b4deac2ef90752bcc51b7a02e8b
/src/main/java/nc/item/ItemMultitool.java
e6b2b510c072b26f7d4ea80e3f248dabff5537f1
[ "MIT" ]
permissive
serenibyss/NuclearCraft
b982a4a4528ebcf19b649a0531e19f44e9d61436
01186f7f3ea3a96a95d64b38f4e6d2d39b9fe21b
refs/heads/master
2023-07-24T19:16:58.103375
2021-07-20T18:41:45
2021-07-20T18:41:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,140
java
package nc.item; import static nc.config.NCConfig.quantum_angle_precision; import java.util.*; import nc.tile.IMultitoolLogic; import nc.util.*; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.util.text.TextComponentString; import net.minecraft.world.*; import net.minecraftforge.fml.relauncher.*; public class ItemMultitool extends NCItem { /** List of all multitool right-click logic. Earlier entries are prioritised! */ public static final List<MultitoolRightClickLogic> MULTITOOL_RIGHT_CLICK_LOGIC = new LinkedList<>(); public ItemMultitool(String... tooltip) { super(tooltip); maxStackSize = 1; } @Override @SideOnly(Side.CLIENT) public boolean isFull3D() { return true; } public static boolean isMultitool(ItemStack stack) { return stack.isEmpty() ? false : stack.getItem() instanceof ItemMultitool; } protected static void clearNBT(ItemStack stack) { stack.setTagCompound(new NBTTagCompound()); } @Override public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, EnumHand hand) { ItemStack stack = player.getHeldItem(hand); if (isMultitool(stack)) { TileEntity tile = world.getTileEntity(pos); if (tile instanceof IMultitoolLogic) { if (!world.isRemote) { if (stack.getTagCompound() == null) { clearNBT(stack); } NBTTagCompound nbt = stack.getTagCompound(); boolean multitoolUsed = ((IMultitoolLogic) tile).onUseMultitool(stack, player, world, facing, hitX, hitY, hitZ); nbt.setBoolean("multitoolUsed", multitoolUsed); tile.markDirty(); if (multitoolUsed) { return EnumActionResult.SUCCESS; } } } } return super.onItemUseFirst(player, world, pos, facing, hitX, hitY, hitZ, hand); } @Override public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) { ItemStack stack = player.getHeldItem(hand); if (isMultitool(stack)) { if (!world.isRemote) { if (stack.getTagCompound() == null) { clearNBT(stack); } for (MultitoolRightClickLogic logic : MULTITOOL_RIGHT_CLICK_LOGIC) { ActionResult<ItemStack> result = logic.onRightClick(this, world, player, hand, stack); if (result != null) { return result; } } } } return super.onItemRightClick(world, player, hand); } @Override public boolean doesSneakBypassUse(ItemStack stack, IBlockAccess world, BlockPos pos, EntityPlayer player) { // return world.getTileEntity(pos) instanceof IMultitoolLogic; return false; } public abstract static class MultitoolRightClickLogic { public abstract ActionResult<ItemStack> onRightClick(ItemMultitool itemMultitool, World world, EntityPlayer player, EnumHand hand, ItemStack heldItem); } public static void registerRightClickLogic() { MULTITOOL_RIGHT_CLICK_LOGIC.add(new MultitoolRightClickLogic() { @Override public ActionResult<ItemStack> onRightClick(ItemMultitool itemMultitool, World world, EntityPlayer player, EnumHand hand, ItemStack heldItem) { NBTTagCompound nbt = heldItem.getTagCompound(); if (!player.isSneaking() && nbt.getString("gateMode").equals("angle")) { double angle = NCMath.roundTo(player.rotationYaw + 360D, 360D / quantum_angle_precision) % 360D; nbt.setDouble("gateAngle", angle); player.sendMessage(new TextComponentString(Lang.localise("info.nuclearcraft.multitool.quantum_computer.tool_set_angle", NCMath.decimalPlaces(angle, 5)))); return itemMultitool.actionResult(true, heldItem); } return null; } }); MULTITOOL_RIGHT_CLICK_LOGIC.add(new MultitoolRightClickLogic() { @Override public ActionResult<ItemStack> onRightClick(ItemMultitool itemMultitool, World world, EntityPlayer player, EnumHand hand, ItemStack heldItem) { NBTTagCompound nbt = heldItem.getTagCompound(); if (player.isSneaking() && !nbt.isEmpty() && !nbt.getBoolean("multitoolUsed")) { RayTraceResult raytraceresult = itemMultitool.rayTrace(world, player, false); if (raytraceresult == null || raytraceresult.typeOfHit != RayTraceResult.Type.BLOCK) { return itemMultitool.actionResult(false, heldItem); } BlockPos pos = raytraceresult.getBlockPos(); TileEntity tile = world.getTileEntity(pos); if (!(tile instanceof IMultitoolLogic)) { clearNBT(heldItem); player.sendMessage(new TextComponentString(Lang.localise("info.nuclearcraft.multitool.clear_info"))); return itemMultitool.actionResult(true, heldItem); } } return null; } }); MULTITOOL_RIGHT_CLICK_LOGIC.add(new MultitoolRightClickLogic() { @Override public ActionResult<ItemStack> onRightClick(ItemMultitool itemMultitool, World world, EntityPlayer player, EnumHand hand, ItemStack heldItem) { heldItem.getTagCompound().removeTag("multitoolUsed"); return null; } }); } }
[ "joedodd35@gmail.com" ]
joedodd35@gmail.com
1ff3f9a4542651c32a756876c0046065b33b4901
e315c2bb2ea17cd8388a39aa0587e47cb417af0a
/src/tn/com/smartsoft/framework/dao/exception/CannotAcquireLockDbException.java
062fc301617a6c71ba2eb0de76d8f33181f9bc67
[]
no_license
wissem007/badges
000536a40e34e20592fe6e4cb2684d93604c44c9
2064bd07b52141cf3cff0892e628cc62b4f94fdc
refs/heads/master
2020-12-26T14:06:11.693609
2020-01-31T23:40:07
2020-01-31T23:40:07
237,530,008
0
0
null
null
null
null
UTF-8
Java
false
false
408
java
package tn.com.smartsoft.framework.dao.exception; import tn.com.smartsoft.commons.exceptions.DaoFunctionalException; public class CannotAcquireLockDbException extends DaoFunctionalException { /** * */ private static final long serialVersionUID = -4606621137119912510L; public CannotAcquireLockDbException(String appErrorCode, Throwable cause, String sql) { super(appErrorCode, cause, sql); } }
[ "alouiwiss@gmail.com" ]
alouiwiss@gmail.com
d63dbe87f6bed53a4e14505f48c046e2da51cd08
e414fa981c02f7ed6d95dfbb3e36191fdabaf0b2
/test-core/src/main/java/com/suixingpay/jooq/entity/tables/pojos/SysUser.java
edf601ae17c5485c71543d28108be66fb670ce37
[]
no_license
zhangxiao-sx/spring-boot-jooq-demo
cf30164009cead659617cbdad16c5f0b88541f9f
3c2e4fc746a348609aaf9876e345e2cea734806a
refs/heads/master
2022-02-11T21:31:45.742150
2019-06-19T14:53:44
2019-06-19T14:53:44
null
0
0
null
null
null
null
UTF-8
Java
false
true
3,738
java
/* * This file is generated by jOOQ. */ package com.suixingpay.jooq.entity.tables.pojos; import java.io.Serializable; import java.sql.Timestamp; import javax.annotation.Generated; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.11.11" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class SysUser implements Serializable { private static final long serialVersionUID = 578145360; private Integer id; private String userName; private String realName; private String email; private String phone; private String pswd; private Timestamp createTime; private Timestamp lastLoginTime; private Integer userStatus; public SysUser() {} public SysUser(SysUser value) { this.id = value.id; this.userName = value.userName; this.realName = value.realName; this.email = value.email; this.phone = value.phone; this.pswd = value.pswd; this.createTime = value.createTime; this.lastLoginTime = value.lastLoginTime; this.userStatus = value.userStatus; } public SysUser( Integer id, String userName, String realName, String email, String phone, String pswd, Timestamp createTime, Timestamp lastLoginTime, Integer userStatus ) { this.id = id; this.userName = userName; this.realName = realName; this.email = email; this.phone = phone; this.pswd = pswd; this.createTime = createTime; this.lastLoginTime = lastLoginTime; this.userStatus = userStatus; } public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } public String getUserName() { return this.userName; } public void setUserName(String userName) { this.userName = userName; } public String getRealName() { return this.realName; } public void setRealName(String realName) { this.realName = realName; } public String getEmail() { return this.email; } public void setEmail(String email) { this.email = email; } public String getPhone() { return this.phone; } public void setPhone(String phone) { this.phone = phone; } public String getPswd() { return this.pswd; } public void setPswd(String pswd) { this.pswd = pswd; } public Timestamp getCreateTime() { return this.createTime; } public void setCreateTime(Timestamp createTime) { this.createTime = createTime; } public Timestamp getLastLoginTime() { return this.lastLoginTime; } public void setLastLoginTime(Timestamp lastLoginTime) { this.lastLoginTime = lastLoginTime; } public Integer getUserStatus() { return this.userStatus; } public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } @Override public String toString() { StringBuilder sb = new StringBuilder("SysUser ("); sb.append(id); sb.append(", ").append(userName); sb.append(", ").append(realName); sb.append(", ").append(email); sb.append(", ").append(phone); sb.append(", ").append(pswd); sb.append(", ").append(createTime); sb.append(", ").append(lastLoginTime); sb.append(", ").append(userStatus); sb.append(")"); return sb.toString(); } }
[ "shileibrave@163.com" ]
shileibrave@163.com
7a0086b9d2e3002a6ab06f0c9add4f26b8401cd6
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1356_public/tests/unittests/src/java/module1356_public_tests_unittests/a/IFoo3.java
55c6839396958df02cb47642abfab397fec52509
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
876
java
package module1356_public_tests_unittests.a; import javax.rmi.ssl.*; import java.awt.datatransfer.*; import java.beans.beancontext.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see javax.net.ssl.ExtendedSSLSession * @see javax.rmi.ssl.SslRMIClientSocketFactory * @see java.awt.datatransfer.DataFlavor */ @SuppressWarnings("all") public interface IFoo3<R> extends module1356_public_tests_unittests.a.IFoo2<R> { java.beans.beancontext.BeanContext f0 = null; java.io.File f1 = null; java.rmi.Remote f2 = null; String getName(); void setName(String s); R get(); void set(R e); }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
dedd04c7058629963d355e33135fd1d60e10292e
72f8c201406c37a1a598a5b56e56c04a79669978
/weekly/html2csv/src/main/java/html2csv/Question.java
9f85625deb9654404040ef6ab4786e194ee041ad
[]
no_license
exylaci/senior-solutions
17794e1ae1e630f02213c7e60059d9ee3d82b609
009b3ab666d6e9aa7e907011950ee76ecd306e10
refs/heads/master
2023-07-31T00:06:13.517198
2021-09-24T08:59:10
2021-09-24T08:59:10
376,589,924
1
0
null
null
null
null
UTF-8
Java
false
false
2,345
java
package html2csv; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; public class Question { private String question; private int correct; private List<String> answers = new ArrayList<>(); private static final String SEPARATOR = ";"; private static final String ANY_PIECES_OF_QUOTES = "\"+"; private static final String TWO_QUOTES = "\"\""; private static final String ONE_QUOTES = "\""; private static final String LINE_FEED = "\r\n"; public Question(String question) { this.question = question; } protected Question() { } public void appendQuestion(String question) { if (!this.question.isBlank() && !question.isBlank()) { this.question += LINE_FEED; } this.question += question; } public void setCorrect() { correct = answers.size(); } public void addANewAnswer(String answer) { answers.add(answer); } public void appendToAnswer(String answer) { String lastAnswer; if (answers.isEmpty()) { lastAnswer = ""; } else { lastAnswer = answers.get(answers.size() - 1); } if (!lastAnswer.isBlank() && !answer.isBlank()) { lastAnswer += LINE_FEED; } lastAnswer += answer; answers.set(answers.size() - 1, lastAnswer); } public String getFullQuestion() { return setQuotes(question) + SEPARATOR + correct + SEPARATOR + answers.stream().map(this::setQuotes).collect(Collectors.joining(SEPARATOR)); } protected String setQuotes(String text) { if (text.contains(ONE_QUOTES) || text.contains("\n") || text.contains(";")) { return '"' + text.replaceAll(ANY_PIECES_OF_QUOTES, TWO_QUOTES) + '"'; } return text; } protected String getQuestion() { return question; } protected List<String> getAnswers() { return new ArrayList<>(answers); } protected int getCorrect() { return correct; } @Override public String toString() { return "question='" + question + "'\r\n correct answer=" + correct + answers.stream().map(answer -> "\r\n answers=" + answer).collect(Collectors.joining()) + "\r\n"; } }
[ "exy@freemail.hu" ]
exy@freemail.hu
eea0cc3ee24dcb00eac6eae5d398f4075292e037
8020e79b602427f22feafc1d7d40f7db7bc81332
/resteasy-netty-example/resteasy-sample-app/src/main/java/org/jboss/resteasy/sample/HelloService.java
908141d69e74f17c5260fcd060d8466a0d0c8420
[]
no_license
mposolda/misc
b409101f80802d4e279c085a76cce680a57397d8
821ad4252acdbe8e99ce993846bc3e464179c57d
refs/heads/master
2023-07-25T02:00:58.262842
2022-12-05T11:34:34
2022-12-05T11:34:34
10,410,754
4
2
null
2023-07-07T21:20:50
2013-05-31T18:33:41
JavaScript
UTF-8
Java
false
false
272
java
package org.jboss.resteasy.sample; import javax.ws.rs.ext.Provider; /** * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a> */ public class HelloService { public JsonObject hello(String name) { return new JsonObject("hello " + name); } }
[ "mposolda@gmail.com" ]
mposolda@gmail.com
9b87a851317f0dc44398c6dec88c3a85fce3028c
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/766299326735ae43331bdb427d8287185ca56760/before/GradleLibraryNamesMixer.java
8c267f88a3f69874e68b3237dfe92b16d9d37d3e
[]
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
7,838
java
package org.jetbrains.plugins.gradle.remote.impl; import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.containers.HashMap; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.plugins.gradle.model.GradleLibrary; import org.jetbrains.plugins.gradle.model.LibraryPathType; import java.io.File; import java.util.*; /** * Encapsulates logic of checking if particular collection of gradle libraries contains libraries with the same names and * tries to diversify them in the case of the positive answer. * <p/> * Thread-safe. * * @author Denis Zhdanov * @since 10/19/11 2:04 PM */ public class GradleLibraryNamesMixer { /** * Holds mappings like <code>('file name'; boolean)</code> where <code>'file name'</code> defines 'too common' file/dir * name that should not be used during library name generation. Boolean flag indicates if 'common file name' may be used * if 'non-common' files are the same. * <p/> * Example: consider the following file system tree: * <pre> * module * |_src * |_main * | |_resources * | * |_test * |_resources * </pre> * Let's say we have two libraries where one of them points to <code>'src/main/resources'</code> and another one * to <code>'src/test/resources'</code>. We want to generate names <code>'module-resources'</code> and * <code>'module-test-resources'</code> respectively because <code>'test'</code> entry at the current collection is * stored with <code>'true'</code> flag. */ private static final Map<String, Boolean> NON_UNIQUE_PATH_ENTRIES = new HashMap<String, Boolean>(); static { NON_UNIQUE_PATH_ENTRIES.put("src", false); NON_UNIQUE_PATH_ENTRIES.put("main", false); NON_UNIQUE_PATH_ENTRIES.put("test", true); NON_UNIQUE_PATH_ENTRIES.put("resources", false); NON_UNIQUE_PATH_ENTRIES.put("java", false); NON_UNIQUE_PATH_ENTRIES.put("groovy", false); } private static final char NAME_SEPARATOR = '-'; /** * Tries to ensure that given libraries have distinct names, i.e. traverses all of them and tries to generate * unique name for those with equal names. * * @param libraries libraries to process */ @SuppressWarnings("MethodMayBeStatic") public void mixNames(@NotNull Iterable<? extends GradleLibrary> libraries) { Map<String, Wrapped> names = new HashMap<String, Wrapped>(); List<Wrapped> data = new ArrayList<Wrapped>(); for (GradleLibrary library : libraries) { Wrapped wrapped = new Wrapped(library); data.add(wrapped); } boolean mixed = false; while (!mixed) { mixed = doMixNames(data, names); } } /** * Does the same as {@link #mixNames(Iterable)} but uses given <code>('library name; wrapped library'}</code> mappings cache. * * @param libraries libraries to process * @param cache cache to use * @return <code>true</code> if all of the given libraries have distinct names now; <code>false</code> otherwise */ private static boolean doMixNames(@NotNull Collection<Wrapped> libraries, @NotNull Map<String, Wrapped> cache) { cache.clear(); for (Wrapped current : libraries) { Wrapped previous = cache.remove(current.library.getName()); if (previous == null) { cache.put(current.library.getName(), current); } else { mixNames(current, previous); return current.library.getName().equals(previous.library.getName()); // Stop processing if it's not possible to generate } } return true; } /** * Tries to generate distinct names for the given wrapped libraries (assuming that they have equal names at the moment). * * @param wrapped1 one of the libraries with equal names * @param wrapped2 another library which name is equal to the name of the given one */ @SuppressWarnings("AssignmentToForLoopParameter") private static void mixNames(@NotNull Wrapped wrapped1, @NotNull Wrapped wrapped2) { if (!wrapped1.prepare() || !wrapped2.prepare()) { return; } String wrapped1AltText = null; String wrapped2AltText = null; for (File file1 = wrapped1.currentFile, file2 = wrapped2.currentFile; file1 != null && file2 != null; file1 = file1.getParentFile(), file2 = file2.getParentFile()) { while (file1 != null && !StringUtil.isEmpty(file1.getName()) && NON_UNIQUE_PATH_ENTRIES.containsKey(file1.getName())) { if (NON_UNIQUE_PATH_ENTRIES.get(file1.getName())) { if (StringUtil.isEmpty(wrapped1AltText)) { wrapped1AltText = file1.getName(); } else { wrapped1AltText += NAME_SEPARATOR + file1.getName(); } } file1 = file1.getParentFile(); } while (file2 != null && !StringUtil.isEmpty(file2.getName()) && NON_UNIQUE_PATH_ENTRIES.containsKey(file2.getName())) { if (NON_UNIQUE_PATH_ENTRIES.get(file2.getName())) { if (StringUtil.isEmpty(wrapped2AltText)) { wrapped2AltText = file2.getName(); } else { wrapped2AltText += NAME_SEPARATOR + file2.getName(); } } file2 = file2.getParentFile(); } if (file1 == null) { wrapped1.nextFile(); } else if (!wrapped1.library.getName().startsWith(file1.getName())) { wrapped1.library.setName(file1.getName() + NAME_SEPARATOR + wrapped1.library.getName()); } if (file2 == null) { wrapped2.nextFile(); } else if (!wrapped2.library.getName().startsWith(file2.getName())) { wrapped2.library.setName(file2.getName() + NAME_SEPARATOR + wrapped2.library.getName()); } if (wrapped1.library.getName().equals(wrapped2.library.getName())) { if (wrapped1AltText != null) { diversifyName(wrapped1AltText, wrapped1, file1); return; } else if (wrapped2AltText != null) { diversifyName(wrapped2AltText, wrapped2, file1); return; } } else { return; } if (file1 == null || file2 == null) { return; } } } @SuppressWarnings("ConstantConditions") private static void diversifyName(@NotNull String changeText, @NotNull Wrapped wrapped, @Nullable File file) { String name = wrapped.library.getName(); int i = file == null ? - 1 : name.indexOf(file.getName()); final String newName; if (i >= 0) { newName = name.substring(0, i + file.getName().length()) + NAME_SEPARATOR + changeText + name.substring(i + file.getName().length()); } else { newName = changeText + NAME_SEPARATOR + name; } wrapped.library.setName(newName); } /** * Wraps target library and hold auxiliary information required for the processing. */ private static class Wrapped { /** Holds list of files that may be used for name generation. */ public final Set<File> files = new HashSet<File>(); /** File that was used for the current name generation. */ public File currentFile; /** Target library. */ public GradleLibrary library; Wrapped(@NotNull GradleLibrary library) { this.library = library; for (LibraryPathType pathType : LibraryPathType.values()) { for (String path : library.getPaths(pathType)) { files.add(new File(path)); } } } public boolean prepare() { if (currentFile != null) { return true; } return nextFile(); } public boolean nextFile() { if (files.isEmpty()) { return false; } Iterator<File> iterator = files.iterator(); currentFile = iterator.next(); iterator.remove(); return true; } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
ec93721015d2f6ca70c1862bb410479d3967d42e
c02ff10ab87bdff1108814a525fa3b6cc3c42bb2
/org.eclipse.skalli.core/src/main/java/org/eclipse/skalli/core/extension/info/InfoConverter.java
7aa0274020ae8c6b4ed14ece2ccc2f63d185ef1a
[]
no_license
mochmann/skalli
44bd621281c0e19afcf98d9e3dd5d1c7821361bc
6f5e4b2c6aad7b0cc82c75464872c2572e9b00ed
refs/heads/master
2021-01-18T12:25:43.135025
2013-04-22T08:23:05
2013-04-22T08:24:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,938
java
/******************************************************************************* * Copyright (c) 2010, 2011 SAP AG and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * SAP AG - initial API and implementation *******************************************************************************/ package org.eclipse.skalli.core.extension.info; import org.eclipse.skalli.model.ext.commons.InfoExtension; import org.eclipse.skalli.services.extension.rest.RestConverterBase; import com.thoughtworks.xstream.converters.MarshallingContext; import com.thoughtworks.xstream.converters.UnmarshallingContext; import com.thoughtworks.xstream.io.HierarchicalStreamReader; import com.thoughtworks.xstream.io.HierarchicalStreamWriter; public class InfoConverter extends RestConverterBase<InfoExtension> { public static final String API_VERSION = "1.0"; //$NON-NLS-1$ public static final String NAMESPACE = "http://www.eclipse.org/skalli/2010/API/Extension-Info"; //$NON-NLS-1$ public InfoConverter(String host) { super(InfoExtension.class, "info", host); //$NON-NLS-1$ } @Override public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { InfoExtension info = (InfoExtension) source; writeNode(writer, "homepage", info.getPageUrl()); //$NON-NLS-1$ writeNode(writer, "mailingLists", "mailingList", info.getMailingLists()); //$NON-NLS-1$ //$NON-NLS-2$ } @Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { return iterateNodes(null, reader, context); } private InfoExtension iterateNodes(InfoExtension ext, HierarchicalStreamReader reader, UnmarshallingContext context) { if (ext == null) { ext = new InfoExtension(); } while (reader.hasMoreChildren()) { reader.moveDown(); String field = reader.getNodeName(); String value = reader.getValue(); if ("mailingLists".equals(field) && reader.hasMoreChildren()) { //$NON-NLS-1$ iterateNodes(ext, reader, context); } else if ("mailingList".equals(field)) { //$NON-NLS-1$ ext.addMailingList(value); } else if ("homepage".equals(field)) { //$NON-NLS-1$ ext.setPageUrl(value); } reader.moveUp(); } return ext; } @Override public String getApiVersion() { return API_VERSION; } @Override public String getNamespace() { return NAMESPACE; } @Override public String getXsdFileName() { return "extension-info.xsd"; //$NON-NLS-1$ } }
[ "michael.ochmann@sap.com" ]
michael.ochmann@sap.com
501915e3579af1022f3826a1e94fde0fd3f01d07
229c65805aa89d95c4ca3757e51bd4aec361fd7d
/src/main/java/cn/ms/neural/chain/support/EchoSoundChain.java
fc857bb19cd624552ccac8decce5cff4d1dbe470
[ "MIT" ]
permissive
hikoyan/neural
5fac5278d5b711f17bb6de6d2f25c13b4fa3e571
7cecce39c3d2adcb8d0ad6152daf460943955beb
refs/heads/master
2021-06-06T10:04:55.804950
2016-10-08T04:58:33
2016-10-08T04:58:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,950
java
package cn.ms.neural.chain.support; import java.util.Map; import cn.ms.neural.chain.AbstractNeuralChain; import cn.ms.neural.common.exception.AlarmException; import cn.ms.neural.common.exception.ProcessorException; import cn.ms.neural.common.exception.echosound.EchoSoundException; import cn.ms.neural.common.spi.SPI; import cn.ms.neural.moduler.ModulerType; import cn.ms.neural.moduler.extension.echosound.processor.IEchoSoundProcessor; import cn.ms.neural.moduler.extension.echosound.type.EchoSoundType; import cn.ms.neural.moduler.senior.alarm.IAlarmType; import cn.ms.neural.processor.INeuralProcessor; /** * 回声探测调用链 * * @author lry * * @param <REQ> * @param <RES> */ @SPI(order=7) public class EchoSoundChain<REQ, RES> extends AbstractNeuralChain<REQ, RES> { @Override public RES chain(REQ req, final String neuralId, final EchoSoundType echoSoundType, final Map<String, Object> blackWhiteIdKeyVals, final INeuralProcessor<REQ, RES> processor, Object... args) { // $NON-NLS-回声探测开始$ return moduler.getEchoSound().echosound(echoSoundType, req, new IEchoSoundProcessor<REQ, RES>() { @Override public RES processor(REQ req, Object... args) throws ProcessorException { return neuralChain.chain(req, neuralId, echoSoundType, blackWhiteIdKeyVals, processor, args); } /** * 回声探测请求 */ @Override public REQ $echo(REQ req, Object...args) throws EchoSoundException { return processor.$echo(req, args); } /** * 回声探测响应 */ @Override public RES $rebound(REQ req, Object...args) throws EchoSoundException { return processor.$rebound(req, args); } /** * 告警 */ @Override public void alarm(IAlarmType alarmType, REQ req, RES res, Throwable t, Object... args) throws AlarmException { processor.alarm(ModulerType.EchoSound, alarmType, req, res, t, args); } }); } }
[ "595208882@qq.com" ]
595208882@qq.com
cf48075dbfd9051f0a6478c19d6e0199f21edff0
86226c986ca5bcf92bd5cf91120a193c4e9957ba
/app/src/main/java/com/buybuyall/market/fragment/SearchResultFragment.java
1fdbd05fdeb0d4e8c93338d7e054b2125467aec6
[]
no_license
XlcK1ng/Market
9e1f7a04d19779c6cee12052cfbd4a0a12b24e2b
c18d1c696ae5376a3725a60a5188fb4829d58693
refs/heads/master
2020-04-14T06:07:28.470894
2016-02-29T11:23:26
2016-02-29T11:23:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,948
java
package com.buybuyall.market.fragment; import android.os.Message; import android.view.View; import com.buybuyall.market.adapter.GoodsSearchAdapter; import com.buybuyall.market.entity.GoodsInfo; import com.buybuyall.market.logic.UrlManager; import com.buybuyall.market.logic.http.HttpRequest; import com.buybuyall.market.logic.http.response.GoodsListResponse; import java.util.ArrayList; import cn.common.exception.AppException; import cn.common.ui.adapter.BaseListAdapter; import cn.common.utils.ViewUtil; /** * 描述:搜索结果列表 * * @author jakechen * @since 2016/1/20 10:39 */ public class SearchResultFragment extends BasePullListFragment<GoodsInfo> { private static final int MSG_UI_NO_RESULT = 0; private static final int MSG_UI_HAVA_RESULT = 1; private String keyWord; private View noResult; public void setNoResult(View noResult) { this.noResult = noResult; } public void setKeyWord(String keyWord) { this.keyWord = keyWord; reLoadData(); } @Override protected BaseListAdapter<GoodsInfo> createAdapter() { return new GoodsSearchAdapter(getActivity()); } @Override public void handleUiMessage(Message msg) { super.handleUiMessage(msg); switch (msg.what) { case MSG_UI_NO_RESULT: ViewUtil.setViewVisibility(noResult, View.VISIBLE); break; case MSG_UI_HAVA_RESULT: ViewUtil.setViewVisibility(noResult, View.GONE); break; } } @Override protected ArrayList<GoodsInfo> loadData(int pageIndex, int pageSize) { HttpRequest<GoodsListResponse> request = new HttpRequest<>(UrlManager.SEARCH, GoodsListResponse.class); request.setIsGet(true); request.addParam("keyword", keyWord); request.addParam("order", "1"); request.addParam("xianshi", "0"); request.addParam("groupbuy", "0"); request.addParam("page", "1"); request.addParam("curpage", "" + pageIndex); try { GoodsListResponse response = request.request(); if (response != null) { setHasMore(response.isHasMore()); if (pageIndex == PAGE_START) { if (response.getCount() < 1) { sendEmptyUiMessage(MSG_UI_NO_RESULT); } else { sendEmptyUiMessage(MSG_UI_HAVA_RESULT); } } if (response.isOk()) { if (response.getList() != null && response.getList().size() > 0) { return response.getList(); } else { return new ArrayList<GoodsInfo>(); } } } } catch (AppException e) { e.printStackTrace(); } return null; } }
[ "903475400@qq.com" ]
903475400@qq.com
9613e910e0a874289facbe39b46338cb3360d1d1
631afd8bb77a19ac0f0604c41176d11f63e90c7d
/kie-wb-common-stunner-core/kie-wb-common-stunner-api/kie-wb-common-stunner-client-api/src/main/java/org/kie/workbench/common/stunner/core/client/components/palette/factory/PaletteDefinitionFactory.java
4259893ccb19c26a0b2e426944eeb38258fca49d
[]
no_license
tsurdilo/wirez
86aaf88fcf412cfa1b03a9cfa8e81503b52439bc
fd8963cdd0dd6ec916b051dc5759f23bd6fe2074
refs/heads/master
2020-12-29T03:07:36.637532
2016-10-04T01:44:36
2016-10-04T02:29:18
68,604,988
0
0
null
2016-09-19T12:46:45
2016-09-19T12:46:45
null
UTF-8
Java
false
false
535
java
package org.kie.workbench.common.stunner.core.client.components.palette.factory; import org.kie.workbench.common.stunner.core.client.components.palette.model.PaletteDefinitionBuilder; public interface PaletteDefinitionFactory<B extends PaletteDefinitionBuilder> { /** * Returns if this provider accepts the given Definition Set identifier. */ boolean accepts( String defSetId ); /** * Builds the palette definition for the given Definition Set identifier. */ B newBuilder( String defSetId ); }
[ "roger600@gmail.com" ]
roger600@gmail.com
9062011ab1f08956fb858c694b3739c23ffec397
9d325779d668db4d887079f17e2bcf5e158c0955
/modules/activiti-engine/src/main/java/org/activiti/engine/impl/cmd/MessageEventReceivedCmd.java
4620f4226d4b92deea3e4a2688f2d694ca653a74
[ "Apache-2.0" ]
permissive
105032013072/Activiti-5.14
d5981cf982dd920622cd7ea710bf2711f18e3803
34afdbfd4142e23b3594dd65500d38c4d5ec9a9b
refs/heads/master
2022-12-23T01:21:35.472610
2019-06-06T12:52:46
2019-06-06T12:52:46
185,395,953
0
0
null
2022-12-16T00:39:08
2019-05-07T12:19:59
Java
UTF-8
Java
false
false
2,919
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.activiti.engine.impl.cmd; import java.io.Serializable; import java.util.HashMap; import java.util.List; import java.util.Map; import org.activiti.engine.ActivitiException; import org.activiti.engine.ActivitiIllegalArgumentException; import org.activiti.engine.impl.event.MessageEventHandler; import org.activiti.engine.impl.interceptor.CommandContext; import org.activiti.engine.impl.persistence.entity.EventSubscriptionEntity; import org.activiti.engine.impl.persistence.entity.ExecutionEntity; /** * @author Daniel Meyer * @author Joram Barrez */ public class MessageEventReceivedCmd extends NeedsActiveExecutionCmd<Void> { private static final long serialVersionUID = 1L; protected final Serializable payload; protected final String messageName; protected final boolean async; public MessageEventReceivedCmd(String messageName, String executionId, Map<String, Object> processVariables) { super(executionId); this.messageName = messageName; if (processVariables != null) { if (processVariables instanceof Serializable){ this.payload = (Serializable) processVariables; } else{ this.payload = new HashMap<String, Object>(processVariables); } } else{ this.payload = null; } this.async = false; } public MessageEventReceivedCmd(String messageName, String executionId, boolean async) { super(executionId); this.messageName = messageName; this.payload = null; this.async = async; } protected Void execute(CommandContext commandContext, ExecutionEntity execution) { if(messageName == null) { throw new ActivitiIllegalArgumentException("messageName cannot be null"); } List<EventSubscriptionEntity> eventSubscriptions = commandContext.getEventSubscriptionEntityManager() .findEventSubscriptionsByNameAndExecution(MessageEventHandler.EVENT_HANDLER_TYPE, messageName, executionId); if(eventSubscriptions.isEmpty()) { throw new ActivitiException("Execution with id '"+executionId+"' does not have a subscription to a message event with name '"+messageName+"'"); } // there can be only one: EventSubscriptionEntity eventSubscriptionEntity = eventSubscriptions.get(0); eventSubscriptionEntity.eventReceived(payload, async); return null; } }
[ "1337893145@qq.com" ]
1337893145@qq.com
e7a9567c8c933c5a547bc602376d7f223186b1b1
28438c921dffca1f583a78e7d75c6d1c22c1d25e
/src/test/java/org/tools4j/nobark/loop/IdleStrategyTest.java
9c6efba867a35c98e3cfc14a681e052eaabffc26
[ "MIT" ]
permissive
kimmking/nobark
f0bb3039551bec13f42e5ba0b378f827d1373ff1
1cdbfc5b6a3f058deeb8f2155e63a0c1afb8265d
refs/heads/master
2020-04-12T04:14:39.262829
2018-11-15T12:10:12
2018-11-15T12:10:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,383
java
/** * The MIT License (MIT) * * Copyright (c) 2018 nobark (tools4j), Marco Terzer, Anton Anufriev * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.tools4j.nobark.loop; import java.util.concurrent.atomic.AtomicBoolean; import org.junit.Test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; /** * Unit test for {@link IdleStrategy}. */ public class IdleStrategyTest { @Test public void idleInvokesIdleAndReset() { //given final AtomicBoolean idleInvoked = new AtomicBoolean(false); final AtomicBoolean resetInvoked = new AtomicBoolean(false); final IdleStrategy idleStrategy = new IdleStrategy() { @Override public void idle() { idleInvoked.set(true); } @Override public void reset() { resetInvoked.set(true); } }; //when idleStrategy.idle(true); //then assertTrue(resetInvoked.getAndSet(false)); assertFalse(idleInvoked.getAndSet(false)); //when idleStrategy.idle(false); //then assertFalse(resetInvoked.getAndSet(false)); assertTrue(idleInvoked.getAndSet(false)); //... and for the sake of 100% coverage IdleStrategy.NO_OP.idle(); } }
[ "terzerm@gmail.com" ]
terzerm@gmail.com
f6ce58bfb3107d7c993a874b4596dc7531442088
fc0887f1438c0d5f7f17d8fa39bb3be5c23b7353
/bootique-tapestry58/src/main/java/io/bootique/tapestry/v58/TapestryModule.java
e775ed5432fe20c7bfe2fc2de90fe1603dece922
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-generic-cla" ]
permissive
bootique/bootique-tapestry
7726c2afca554cc10064fe63a653f8333ae76257
33f187cbfa903e3264a56ff99003ef31f9241095
refs/heads/master
2023-04-02T08:29:14.704771
2023-03-24T12:26:09
2023-03-24T12:26:09
61,655,245
4
3
Apache-2.0
2018-06-18T07:17:29
2016-06-21T17:57:31
Java
UTF-8
Java
false
false
3,365
java
/* * Licensed to ObjectStyle LLC under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ObjectStyle LLC 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 io.bootique.tapestry.v58; import io.bootique.BQCoreModule; import io.bootique.ConfigModule; import io.bootique.config.ConfigurationFactory; import io.bootique.di.Binder; import io.bootique.di.Injector; import io.bootique.di.Provides; import io.bootique.di.TypeLiteral; import io.bootique.jetty.JettyModule; import io.bootique.jetty.MappedFilter; import io.bootique.jetty.servlet.ServletEnvironment; import io.bootique.tapestry.v58.annotation.Symbols; import io.bootique.tapestry.v58.annotation.TapestryModuleBinding; import io.bootique.tapestry.v58.di.BqTapestryModule; import io.bootique.tapestry.v58.env.TapestryEnvironment; import io.bootique.tapestry.v58.env.TapestryServletEnvironment; import io.bootique.tapestry.v58.filter.BQTapestryFilter; import io.bootique.tapestry.v58.filter.BQTapestryFilterFactory; import javax.inject.Singleton; import java.util.Map; import java.util.Set; import java.util.logging.Level; public class TapestryModule extends ConfigModule { /** * @param binder DI binder passed to the Module that invokes this method. * @return an instance of {@link TapestryModuleExtender} that can be used to load Tapestry custom extensions. */ public static TapestryModuleExtender extend(Binder binder) { return new TapestryModuleExtender(binder); } @Override public void configure(Binder binder) { TapestryModule.extend(binder).initAllExtensions().addTapestryModule(BqTapestryModule.class); TypeLiteral<MappedFilter<BQTapestryFilter>> tf = new TypeLiteral<MappedFilter<BQTapestryFilter>>() { }; JettyModule.extend(binder).addMappedFilter(tf); // decrease default verbosity... BQCoreModule.extend(binder) .setLogLevel("org.apache.tapestry5.modules.TapestryModule.ComponentClassResolver", Level.WARNING) .setLogLevel("io.bootique.tapestry.filter.BQTapestryFilter", Level.WARNING); } @Singleton @Provides TapestryEnvironment provideTapestryEnvironment(ServletEnvironment servletEnvironment) { return new TapestryServletEnvironment(servletEnvironment); } @Singleton @Provides MappedFilter<BQTapestryFilter> createTapestryFilter( ConfigurationFactory configFactory, Injector injector, @Symbols Map<String, String> diSymbols, @TapestryModuleBinding Set<Class<?>> moduleTypes) { return config(BQTapestryFilterFactory.class, configFactory) .createTapestryFilter(injector, diSymbols, moduleTypes); } }
[ "andrus@objectstyle.com" ]
andrus@objectstyle.com
fdaa33b4490c6d847379855a07b2b9cc4edaac55
4c8417a12e37c79e702c6b3ce599fa87a72dc94d
/developen-common-persistence/src/developen/common/persistence/query/Condition.java
0d42d0d770c0e04ceb79f134c261906f38cfad4a
[]
no_license
diogorosin/developen
5b4379aa5752cd6c3ee84795545ef68dc44d49a8
5312040a7169ab63beb207173321e18983a6fae9
refs/heads/master
2021-01-01T17:33:22.092681
2014-10-14T17:10:19
2014-10-14T17:10:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
146
java
package developen.common.persistence.query; public interface Condition { public Query getQuery(); public void setQuery(Query query); }
[ "diogorosin@gmail.com" ]
diogorosin@gmail.com
d6014e7ef7dd77e0edd2243db5c8d45f4ce2eb10
c6f145685b7d5de6b4d9b9460edc9e52d54b9f81
/test_cases/CWE259/CWE259_Hard_Coded_Password__keyStoreSpiEngineSetKeyEntry/CWE259_Hard_Coded_Password__keyStoreSpiEngineSetKeyEntry_16.java
8df01498b480fe95daebc4610e1469693608a4dc
[]
no_license
Johndoetheone/new-test-repair
531ca91dab608abd52eb474c740c0a211ba8eb9f
7fa0e221093a60c340049e80ce008e233482269c
refs/heads/master
2022-04-26T03:44:51.807603
2020-04-25T01:10:47
2020-04-25T01:10:47
258,659,310
0
0
null
null
null
null
UTF-8
Java
false
false
7,573
java
/* * TEMPLATE GENERATED TESTCASE FILE * @description * CWE: 259 Hard Coded Password * BadSource: hardcodedPassword Set data to a hardcoded string * Flow Variant: 16 Control flow: while(true) * */ package test_cases.CWE259.CWE259_Hard_Coded_Password__keyStoreSpiEngineSetKeyEntry; import testcasesupport.*; import java.util.Arrays; import java.util.Properties; import java.util.logging.Level; import java.io.*; import java.security.KeyStore; import java.lang.reflect.Field; import java.security.KeyStoreSpi; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.security.KeyPair; public class CWE259_Hard_Coded_Password__keyStoreSpiEngineSetKeyEntry_16 extends AbstractTestCase { /* uses badsource and badsink */ public void bad() throws Throwable { String data; while (true) { /* FLAW: Set data to a hardcoded string */ data = "7e5tc4s3"; break; } KeyPair kp = new KeyPair(null, null); X509Certificate[] cert = new X509Certificate[1]; if (data != null) { try { KeyStore keystore = KeyStore.getInstance("JKS"); Field spiField = KeyStore.class.getDeclaredField("keyStoreSpi"); spiField.setAccessible(true); KeyStoreSpi spi = (KeyStoreSpi) spiField.get(keystore); spi.engineSetKeyEntry("alias", kp.getPrivate(), data.toCharArray(), new Certificate[] {cert[0]}); } catch (Exception e) { IO.logger.log(Level.WARNING, "Unknown error", e); } } } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { String data; while (true) { data = ""; /* init data */ /* FIX */ try { InputStreamReader readerInputStream = new InputStreamReader(System.in, "UTF-8"); BufferedReader readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data from the console using readLine */ data = readerBuffered.readLine(); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } break; } KeyPair kp = new KeyPair(null, null); X509Certificate[] cert = new X509Certificate[1]; if (data != null) { try { KeyStore keystore = KeyStore.getInstance("JKS"); Field spiField = KeyStore.class.getDeclaredField("keyStoreSpi"); spiField.setAccessible(true); KeyStoreSpi spi = (KeyStoreSpi) spiField.get(keystore); spi.engineSetKeyEntry("alias", kp.getPrivate(), data.toCharArray(), new Certificate[] {cert[0]}); } catch (Exception e) { IO.logger.log(Level.WARNING, "Unknown error", e); } } } /* goodChar() - uses the expected Properties file and a char[] data variable*/ private void goodChar() throws Throwable { char[] data = null; Properties properties = new Properties(); FileInputStream streamFileInput = null; while (true) { try { streamFileInput = new FileInputStream("src/juliet_test/resources/config.properties"); properties.load(streamFileInput); /* FIX */ data = properties.getProperty("password").toCharArray(); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (streamFileInput != null) { streamFileInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } break; } KeyPair kp = new KeyPair(null, null); X509Certificate[] cert = new X509Certificate[1]; if (data != null) { try { KeyStore keystore = KeyStore.getInstance("JKS"); Field spiField = KeyStore.class.getDeclaredField("keyStoreSpi"); spiField.setAccessible(true); KeyStoreSpi spi = (KeyStoreSpi) spiField.get(keystore); spi.engineSetKeyEntry("alias", kp.getPrivate(), data, new Certificate[] {cert[0]}); } catch (Exception e) { IO.logger.log(Level.WARNING, "Unknown error", e); } /* Cleanup the password */ Arrays.fill(data, 'x'); } } /* goodExpected() - uses the expected Properties file and uses the password directly from it*/ private void goodExpected() throws Throwable { Properties properties = new Properties(); FileInputStream streamFileInput = null; while (true){ try { streamFileInput = new FileInputStream("src/juliet_test/resources/config.properties"); properties.load(streamFileInput); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (streamFileInput != null) { streamFileInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } break; } KeyPair kp = new KeyPair(null, null); X509Certificate[] cert = new X509Certificate[1]; if (properties != null) { try { KeyStore keystore = KeyStore.getInstance("JKS"); Field spiField = KeyStore.class.getDeclaredField("keyStoreSpi"); spiField.setAccessible(true); KeyStoreSpi spi = (KeyStoreSpi) spiField.get(keystore); spi.engineSetKeyEntry("alias", kp.getPrivate(), properties.getProperty("password").toCharArray(), new Certificate[] {cert[0]}); } catch (Exception e) { IO.logger.log(Level.WARNING, "Unknown error", e); } } } public void good() throws Throwable { goodG2B(); goodChar(); goodExpected(); } /* 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); } }
[ "root@Delta.localdomain" ]
root@Delta.localdomain
93fdcd0cfcdb4c5f07b4dec349f726482ea8df67
f108c31bf39bf5047dd8c0e80e164f3b24c54a77
/cmmn-xml/cmmn-xml-core/src/main/java/org/omg/spec/cmmn/_20151109/model/TCaseFileItemDefinition.java
3f1375328092211cacae2c54944c5a5510f87db7
[ "Apache-2.0" ]
permissive
sotty/cmmn-xml
d071feebe9e0685cb893ce25c5de436f90357a53
949eeebcd7f7f77e013d6aab5836b6e1188ba167
refs/heads/master
2021-07-09T08:43:29.153541
2018-05-18T23:01:59
2018-05-18T23:01:59
96,401,870
0
0
null
2017-07-06T07:32:28
2017-07-06T07:32:28
null
UTF-8
Java
false
false
7,191
java
package org.omg.spec.cmmn._20151109.model; import java.util.ArrayList; import java.util.Collection; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; import javax.xml.namespace.QName; /** * * tCaseFileItemDefinition defines the type of element "caseFileItemDefinition" * * * <p>Java class for tCaseFileItemDefinition complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="tCaseFileItemDefinition"&gt; * &lt;complexContent&gt; * &lt;extension base="{http://www.omg.org/spec/CMMN/20151109/MODEL}tCmmnElement"&gt; * &lt;sequence&gt; * &lt;element ref="{http://www.omg.org/spec/CMMN/20151109/MODEL}property" maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; * &lt;attribute name="definitionType" type="{http://www.omg.org/spec/CMMN/20151109/MODEL}DefinitionTypeEnum" default="http://www.omg.org/spec/CMMN/DefinitionType/Unspecified" /&gt; * &lt;attribute name="structureRef" type="{http://www.w3.org/2001/XMLSchema}QName" /&gt; * &lt;attribute name="importRef" type="{http://www.w3.org/2001/XMLSchema}QName" /&gt; * &lt;anyAttribute processContents='lax' namespace='##other'/&gt; * &lt;/extension&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "tCaseFileItemDefinition", propOrder = { "property" }) public class TCaseFileItemDefinition extends TCmmnElement { protected List<TProperty> property; @XmlAttribute(name = "name") protected String name; @XmlAttribute(name = "definitionType") protected String definitionType; @XmlAttribute(name = "structureRef") protected QName structureRef; @XmlAttribute(name = "importRef") protected QName importRef; /** * Gets the value of the property property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the property property. * * <p> * For example, to add a new item, do as follows: * <pre> * getProperty().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link TProperty } * * */ public List<TProperty> getProperty() { if (property == null) { property = new ArrayList<TProperty>(); } return this.property; } public boolean isSetProperty() { return ((this.property!= null)&&(!this.property.isEmpty())); } public void unsetProperty() { this.property = null; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } public boolean isSetName() { return (this.name!= null); } /** * Gets the value of the definitionType property. * * @return * possible object is * {@link String } * */ public String getDefinitionType() { if (definitionType == null) { return "http://www.omg.org/spec/CMMN/DefinitionType/Unspecified"; } else { return definitionType; } } /** * Sets the value of the definitionType property. * * @param value * allowed object is * {@link String } * */ public void setDefinitionType(String value) { this.definitionType = value; } public boolean isSetDefinitionType() { return (this.definitionType!= null); } /** * Gets the value of the structureRef property. * * @return * possible object is * {@link QName } * */ public QName getStructureRef() { return structureRef; } /** * Sets the value of the structureRef property. * * @param value * allowed object is * {@link QName } * */ public void setStructureRef(QName value) { this.structureRef = value; } public boolean isSetStructureRef() { return (this.structureRef!= null); } /** * Gets the value of the importRef property. * * @return * possible object is * {@link QName } * */ public QName getImportRef() { return importRef; } /** * Sets the value of the importRef property. * * @param value * allowed object is * {@link QName } * */ public void setImportRef(QName value) { this.importRef = value; } public boolean isSetImportRef() { return (this.importRef!= null); } public TCaseFileItemDefinition withProperty(TProperty... values) { if (values!= null) { for (TProperty value: values) { getProperty().add(value); } } return this; } public TCaseFileItemDefinition withProperty(Collection<TProperty> values) { if (values!= null) { getProperty().addAll(values); } return this; } public TCaseFileItemDefinition withName(String value) { setName(value); return this; } public TCaseFileItemDefinition withDefinitionType(String value) { setDefinitionType(value); return this; } public TCaseFileItemDefinition withStructureRef(QName value) { setStructureRef(value); return this; } public TCaseFileItemDefinition withImportRef(QName value) { setImportRef(value); return this; } @Override public TCaseFileItemDefinition withDocumentation(TDocumentation... values) { if (values!= null) { for (TDocumentation value: values) { getDocumentation().add(value); } } return this; } @Override public TCaseFileItemDefinition withDocumentation(Collection<TDocumentation> values) { if (values!= null) { getDocumentation().addAll(values); } return this; } @Override public TCaseFileItemDefinition withExtensionElements(TExtensionElements value) { setExtensionElements(value); return this; } @Override public TCaseFileItemDefinition withId(String value) { setId(value); return this; } }
[ "dsotty@gmail.com" ]
dsotty@gmail.com
9692e7738d2e48eb5c7c684e60ca0c994b528b49
86fc030462b34185e0b1e956b70ece610ad6c77a
/src/main/java/com/alipay/api/domain/BankCardInfo.java
2081b576a691b6a9d992d27a8b0fdc21b89ef41b
[]
no_license
xiang2shen/magic-box-alipay
53cba5c93eb1094f069777c402662330b458e868
58573e0f61334748cbb9e580c51bd15b4003f8c8
refs/heads/master
2021-05-08T21:50:15.993077
2018-11-12T07:49:35
2018-11-12T07:49:35
119,653,252
0
0
null
null
null
null
UTF-8
Java
false
false
789
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 银行卡信息 * * @author auto create * @since 1.0, 2017-11-24 18:10:16 */ public class BankCardInfo extends AlipayObject { private static final long serialVersionUID = 4447166139349761954L; /** * 银行卡持卡人姓名 */ @ApiField("card_name") private String cardName; /** * 银行卡号 */ @ApiField("card_no") private String cardNo; public String getCardName() { return this.cardName; } public void setCardName(String cardName) { this.cardName = cardName; } public String getCardNo() { return this.cardNo; } public void setCardNo(String cardNo) { this.cardNo = cardNo; } }
[ "xiangshuo@10.17.6.161" ]
xiangshuo@10.17.6.161
e01d7de86052b8abd3a333a8ec93aaad002a9e9d
e3162d976b3a665717b9a75c503281e501ec1b1a
/src/main/java/com/alipay/api/domain/SpiDetectionDetail.java
f0875a9c0923752e5beb0e264aa245c06820be4a
[ "Apache-2.0" ]
permissive
sunandy3/alipay-sdk-java-all
16b14f3729864d74846585796a28d858c40decf8
30e6af80cffc0d2392133457925dc5e9ee44cbac
refs/heads/master
2020-07-30T14:07:34.040692
2019-09-20T09:35:20
2019-09-20T09:35:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,714
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 检测结果 * * @author auto create * @since 1.0, 2019-09-03 21:26:13 */ public class SpiDetectionDetail extends AlipayObject { private static final long serialVersionUID = 1711566939185584827L; /** * 检测结果码 */ @ApiField("code") private String code; /** * 检测内容 */ @ApiField("content") private String content; /** * 检测外部任务编号 */ @ApiField("data_id") private String dataId; /** * 检测细节,检测内容可能涉及多个场景 */ @ApiListField("details") @ApiField("string") private List<String> details; /** * 检测结果分类 */ @ApiField("label") private String label; /** * 检测结果信息 */ @ApiField("msg") private String msg; /** * 检测准确率 */ @ApiField("rate") private String rate; /** * 检测场景 */ @ApiField("scene") private String scene; /** * 检测建议 pass-文本正常 review-需要人工审核 block-文本违规,可以直接删除或者做限制处理 */ @ApiField("suggestion") private String suggestion; /** * 检测内部任务编号 */ @ApiField("task_id") private String taskId; public String getCode() { return this.code; } public void setCode(String code) { this.code = code; } public String getContent() { return this.content; } public void setContent(String content) { this.content = content; } public String getDataId() { return this.dataId; } public void setDataId(String dataId) { this.dataId = dataId; } public List<String> getDetails() { return this.details; } public void setDetails(List<String> details) { this.details = details; } public String getLabel() { return this.label; } public void setLabel(String label) { this.label = label; } public String getMsg() { return this.msg; } public void setMsg(String msg) { this.msg = msg; } public String getRate() { return this.rate; } public void setRate(String rate) { this.rate = rate; } public String getScene() { return this.scene; } public void setScene(String scene) { this.scene = scene; } public String getSuggestion() { return this.suggestion; } public void setSuggestion(String suggestion) { this.suggestion = suggestion; } public String getTaskId() { return this.taskId; } public void setTaskId(String taskId) { this.taskId = taskId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
ada6d53cf9c75576a0d28bf3c73fd90b5416993c
883bbebd546b3f92be3f886e64f9e0e573e4a495
/src/com/nonfamous/tang/dao/home/usercenter/UserCenterDAO.java
8b0052e0fcd3823a092e5f13baef69a71d97ed47
[]
no_license
fred521/5iyaya
0c73c6e0c51014b7c64b91243adfa619c8fb1f33
bcce17f88dc1bbef763d902c239838fdf2c9826e
refs/heads/master
2021-01-17T08:28:27.631964
2014-12-14T21:09:28
2014-12-14T21:09:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
459
java
package com.nonfamous.tang.dao.home.usercenter; import java.util.List; import com.nonfamous.tang.domain.UserCenter; public interface UserCenterDAO { int deleteByPrimaryKey(String verifyCode); void insert(UserCenter record); UserCenter selectByPrimaryKey(String verifyCode); int deleteByMember(UserCenter record); List<UserCenter> selectByMember(UserCenter record); UserCenter selectLastRequest(UserCenter record); }
[ "fred.dai@perficient.com" ]
fred.dai@perficient.com
6b39a1998c16e522b25cd95cffc271af055c9be2
9985a513d4f5eda993dfef309270bbe50831fba0
/OutilIndice-ejb/src/java/sessions/TypeStructureSousRubriqueRecetteFacade.java
27e9145f5bea8bd2512b23991ca5540a3a8a90da
[]
no_license
kenne12/OutilIndice
f9fdf256375c394571c352c710608366c8e46316
c205efc0c9f5ef11dcee1735d01d03758400fd2c
refs/heads/main
2023-06-26T18:11:07.367667
2021-07-30T13:30:10
2021-07-30T13:30:10
327,368,929
0
0
null
null
null
null
UTF-8
Java
false
false
1,761
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package sessions; import entities.TypeStructureSousRubriqueRecette; import java.util.List; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; /** * * @author USER */ @Stateless public class TypeStructureSousRubriqueRecetteFacade extends AbstractFacade<TypeStructureSousRubriqueRecette> implements TypeStructureSousRubriqueRecetteFacadeLocal { @PersistenceContext(unitName = "OutilIndice-ejbPU") private EntityManager em; @Override protected EntityManager getEntityManager() { return em; } public TypeStructureSousRubriqueRecetteFacade() { super(TypeStructureSousRubriqueRecette.class); } @Override public Integer nextId() { try { Query query = em.createQuery("SELECT MAX(t.id) FROM TypeStructureSousRubriqueRecette t"); List listObj = query.getResultList(); if (!listObj.isEmpty()) { return ((Integer) listObj.get(0)) + 1; } else { return 1 + 1; } } catch (Exception e) { return 1; } } @Override public List<TypeStructureSousRubriqueRecette> findByIdTypestructure(long idTypeStructure) { Query query = em.createQuery("SELECT t FROM TypeStructureSousRubriqueRecette t WHERE t.typestructure.idtypestructure=:idTypeStructure ORDER BY t.sousrubriquerecette.code"); query.setParameter("idTypeStructure", idTypeStructure); return query.getResultList(); } }
[ "kenne_gervais@yahoo.fr" ]
kenne_gervais@yahoo.fr
819e457c990d386277c6a01ec992ed3f2d640a02
063f3b313356c366f7c12dd73eb988a73130f9c9
/erp_ejb/src_facturacion/com/bydan/erp/facturacion/business/dataaccess/TipoParamFactuListadoClienteDataAccessAdditional.java
cf900d52561f26715ae87b91b7aff3a8cb1ded37
[ "Apache-2.0" ]
permissive
bydan/pre
0c6cdfe987b964e6744ae546360785e44508045f
54674f4dcffcac5dbf458cdf57a4c69fde5c55ff
refs/heads/master
2020-12-25T14:58:12.316759
2016-09-01T03:29:06
2016-09-01T03:29:06
67,094,354
0
0
null
null
null
null
UTF-8
Java
false
false
1,740
java
/* * ============================================================================ * GNU Lesser General Public License * ============================================================================ * * BYDAN - Free Java BYDAN library. * Copyright (C) 2008 * * 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. * * BYDAN Corporation */ package com.bydan.erp.facturacion.business.dataaccess; import java.util.List; import java.util.ArrayList; import java.util.Set; import java.util.HashSet; import java.util.ArrayList; import java.io.Serializable; import java.util.Date; import com.bydan.framework.erp.business.entity.DatoGeneral; import com.bydan.framework.erp.business.dataaccess.*;//DataAccessHelperSinIdGenerated; import com.bydan.erp.facturacion.business.entity.*; @SuppressWarnings("unused") public class TipoParamFactuListadoClienteDataAccessAdditional extends DataAccessHelperSinIdGenerated<TipoParamFactuListadoCliente> { public TipoParamFactuListadoClienteDataAccessAdditional () { } }
[ "byrondanilo10@hotmail.com" ]
byrondanilo10@hotmail.com
2093b4fbef64f2dbdafbb7ecf49dd4e89d6c8d65
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/sdk/platformtools/bg.java
390cd7bd27b6280d99a26c186a7d61075ff027a2
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,594
java
package com.tencent.mm.sdk.platformtools; import com.tencent.matrix.trace.core.AppMethodBeat; public class bg<T> { public Object[] gH; public int gI; public bg(int i) { AppMethodBeat.i(52275); if (i <= 0) { ab.e("MicroMsg.SimpleObjectPool", "The max pool size must be > 0"); AppMethodBeat.o(52275); return; } this.gH = new Object[i]; AppMethodBeat.o(52275); } public T aA() { if (this.gH == null || this.gI <= 0) { return null; } int i = this.gI - 1; T t = this.gH[i]; this.gH[i] = null; this.gI--; return t; } public boolean release(T t) { AppMethodBeat.i(52276); if (this.gH == null) { AppMethodBeat.o(52276); return false; } int i; if (this.gH != null) { for (i = 0; i < this.gI; i++) { if (this.gH[i] == t) { i = 1; break; } } } boolean z = false; if (i != 0) { AppMethodBeat.o(52276); return false; } else if (this.gI >= this.gH.length || this.gI < 0) { ab.e("MicroMsg.SimpleObjectPool", "error index %d %d", Integer.valueOf(this.gI), Integer.valueOf(this.gH.length)); AppMethodBeat.o(52276); return false; } else { this.gH[this.gI] = t; this.gI++; AppMethodBeat.o(52276); return true; } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
47c9856c1155478a304acfaf676d33d4892e5742
32e2089119fa2632c048df13d63462be01296410
/app/src/main/java/com/yundian/wudou/adapter/IntegralMallAdapter.java
5080bdcce5f1590395da05d880cc72c2eb33828a
[]
no_license
yerxichen/ttxsbug
6776cca051fe65d066b8d5a0a9faf1e7d1f77383
4f432b3bbaa64c6debd60fdb6e92b65f508ca917
refs/heads/master
2020-03-15T10:14:22.074494
2018-05-12T08:47:39
2018-05-12T08:47:39
132,094,570
0
0
null
null
null
null
UTF-8
Java
false
false
2,929
java
package com.yundian.wudou.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.squareup.picasso.Picasso; import com.yundian.wudou.R; import com.yundian.wudou.data.AdapterIntegralMallData; import java.util.List; public class IntegralMallAdapter extends BaseAdapter { private List<AdapterIntegralMallData> mList; private Context context; private LayoutInflater mLayoutInflater; public IntegralMallAdapter(Context context, List<AdapterIntegralMallData> mList) { this.context = context; this.mList = mList; mLayoutInflater = LayoutInflater.from(context); } @Override public int getCount() { return mList.size(); } @Override public Object getItem(int position) { return mList.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder viewHolder = null; AdapterIntegralMallData data = mList.get(position); if (null == convertView) { convertView = mLayoutInflater.inflate(R.layout.adapter_integralmall, null); viewHolder = new ViewHolder(); viewHolder.mImageViewProduct = (ImageView) convertView.findViewById(R.id.iv_adapter_integralmall_productimage); viewHolder.mTextViewProductName = (TextView) convertView.findViewById(R.id.tv_adapter_integralmall_productname); viewHolder.mTextViewProductCount = (TextView) convertView.findViewById(R.id.tv_adapter_integralmall_productcount_content); viewHolder.mTextViewProductExchange = (TextView) convertView.findViewById(R.id.tv_adapter_integralmall_productexchange_content); viewHolder.mTextViewProductPrice = (TextView) convertView.findViewById(R.id.tv_adapter_integralmall_productprice_content); convertView.setTag(viewHolder); } else { viewHolder = (ViewHolder) convertView.getTag(); } Glide.with(context).load(data.getProductUrl()).into(viewHolder.mImageViewProduct); viewHolder.mTextViewProductName.setText(String.valueOf(data.getProductName())); viewHolder.mTextViewProductCount.setText(String.valueOf(data.getProductCount())); viewHolder.mTextViewProductExchange.setText(String.valueOf(data.getProductExchange())); viewHolder.mTextViewProductPrice.setText(String.valueOf(data.getProductPrice())); return convertView; } private final class ViewHolder { ImageView mImageViewProduct; TextView mTextViewProductName, mTextViewProductCount, mTextViewProductExchange, mTextViewProductPrice; } }
[ "879908188@qq.com" ]
879908188@qq.com
5451780503afa31435cf40e37e389b1c68b6ada7
e66dfd2f3250e0e271dcdac4883227873e914429
/zml-jce/src/main/java/com/jce/framework/web/system/listener/OnlineListener.java
672c33354d3f84fbf0c036398e809d800056eb94
[]
no_license
tianshency/zhuminle
d13b45a8a528f0da2142aab0fd999775fe476e0c
c864d0ab074dadf447504f54a82b2fc5b149b97e
refs/heads/master
2020-03-18T00:54:16.153820
2018-05-20T05:20:08
2018-05-20T05:20:08
134,118,245
0
1
null
null
null
null
UTF-8
Java
false
false
1,404
java
package com.jce.framework.web.system.listener; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; import com.jce.framework.core.util.LogUtil; import com.jce.framework.web.system.manager.ClientManager; import org.springframework.context.ApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; /** * 监听在线用户上线下线 */ public class OnlineListener implements ServletContextListener,HttpSessionListener { private static ApplicationContext ctx = null; public OnlineListener() { } public void sessionCreated(HttpSessionEvent httpSessionEvent) { } public void sessionDestroyed(HttpSessionEvent httpSessionEvent) { //scott 201602229 清理缓存报错 try { ClientManager.getInstance().removeClinet(httpSessionEvent.getSession().getId()); } catch (Exception e) { //LogUtil.error(e.toString()); } } /** * 服务器初始化 */ public void contextInitialized(ServletContextEvent evt) { ctx = WebApplicationContextUtils.getWebApplicationContext(evt.getServletContext()); } public static ApplicationContext getCtx() { return ctx; } public void contextDestroyed(ServletContextEvent paramServletContextEvent) { } }
[ "tianshencaoyin@163.com" ]
tianshencaoyin@163.com
7a29ab6f5417995c3ec3e5440855066d0fa0c850
e4e3dc49a1e92195d97f61c5c8f36178214e12c2
/src/net/wit/dao/RemittanceDao.java
60e2a52a08564b8d4f806b26d3289dc44edfcc30
[]
no_license
pologood/FMCG
1a393fcc4c7942ca932a2ee5c169c3bf630145e0
690cb06da198fb6a3dec98c1ed7b4886b716a40b
refs/heads/master
2021-01-09T20:08:09.461153
2017-02-06T09:27:48
2017-02-06T09:27:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
165
java
package net.wit.dao; import net.wit.entity.Remittance; /** * Created by hujun on 16/7/5. */ public interface RemittanceDao extends BaseDao<Remittance, Long> { }
[ "hujun519191086@163.com" ]
hujun519191086@163.com
f78d24903faa58e9183c4b54a659c370f9fff1bf
2f4a058ab684068be5af77fea0bf07665b675ac0
/app/com/facebook/orca/contacts/favorites/InstallMessengerLoaderFactory.java
d1db1864881e202b6fe067b81c889b3c6ff46ccc
[]
no_license
cengizgoren/facebook_apk_crack
ee812a57c746df3c28fb1f9263ae77190f08d8d2
a112d30542b9f0bfcf17de0b3a09c6e6cfe1273b
refs/heads/master
2021-05-26T14:44:04.092474
2013-01-16T08:39:00
2013-01-16T08:39:00
8,321,708
1
0
null
null
null
null
UTF-8
Java
false
false
609
java
package com.facebook.orca.contacts.favorites; import javax.inject.Provider; public class InstallMessengerLoaderFactory { private final Provider<InstallMessengerLoader> a; public InstallMessengerLoaderFactory(Provider<InstallMessengerLoader> paramProvider) { this.a = paramProvider; } public InstallMessengerLoader a() { return (InstallMessengerLoader)this.a.b(); } } /* Location: /data1/software/jd-gui/com.facebook.katana_2.0_liqucn.com-dex2jar.jar * Qualified Name: com.facebook.orca.contacts.favorites.InstallMessengerLoaderFactory * JD-Core Version: 0.6.0 */
[ "macluz@msn.com" ]
macluz@msn.com
bb987e1c354f99866c73a8841e262f88748f9141
353f9cc4ab2b307006fb1b7390e4dfdefe114881
/src/main/java/tqueue/obridge/objects/Metricname.java
c39571c424810155edb12c4117162e6e04dd9f12
[]
no_license
nickman/tq
2945e6bf030f3aea16d21c70dfa032c65689c523
284449f235a7cb27799df760103c3d750d6ba3d7
refs/heads/master
2021-01-20T02:17:07.125461
2016-12-21T22:25:11
2016-12-21T22:25:11
34,284,126
0
0
null
null
null
null
UTF-8
Java
false
false
845
java
package tqueue.obridge.objects; import java.sql.Timestamp; import java.sql.Date; import java.util.List; import java.math.BigDecimal; import javax.annotation.Generated; @Generated("org.obridge.generators.EntityObjectGenerator") public class Metricname { private Integer segmentcount; private String segments; private List<String> tags; public Integer getSegmentcount() { return this.segmentcount; } public void setSegmentcount(Integer segmentcount) { this.segmentcount = segmentcount; } public String getSegments() { return this.segments; } public void setSegments(String segments) { this.segments = segments; } public List<String> getTags() { return this.tags; } public void setTags(List<String> tags) { this.tags = tags; } }
[ "whitehead.nicholas@gmail.com" ]
whitehead.nicholas@gmail.com
f43ae5fccbb2cdf73793b7a40075705c009c0fd4
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes5/txi.java
cc2a957e090b6526377911598d73b966885b6e60
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,311
java
import android.os.Handler; import android.os.Message; import com.tencent.mobileqq.app.QQAppInterface; import com.tencent.mobileqq.data.QZoneCover; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tencent.mobileqq.persistence.EntityManager; import com.tencent.mobileqq.persistence.EntityManagerFactory; import com.tencent.mobileqq.profile.view.QzonePhotoView; import java.util.LinkedList; import java.util.List; public class txi implements Runnable { public txi(QzonePhotoView paramQzonePhotoView) { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; } public void run() { Object localObject = (QZoneCover)this.a.a.a().createEntityManager().a(QZoneCover.class, QzonePhotoView.a(this.a)); if (localObject != null) { new LinkedList(); localObject = QzonePhotoView.a(this.a, ((QZoneCover)localObject).type, ((QZoneCover)localObject).parseCoverInfo(), ((QZoneCover)localObject).parsePhotoInfo()); this.a.a((List)localObject); Message localMessage = Message.obtain(); localMessage.what = 200; localMessage.obj = localObject; QzonePhotoView.a(this.a).sendMessage(localMessage); } } } /* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\txi.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
86ebbfd9dbae5b551e2115963eac3fa314791ba9
62a1719c9c932db99334dc937e71365fb732b363
/net/dv8tion/jda/internal/entities/StoreChannelImpl.java
9c51d3119bbce35f9cb626cdd9f703b5a797de8f
[]
no_license
GamerHun1238/liambuddy
37fd77c6ff81752e87e693728e12a27c368b9f25
a1a9a319dc401c527414c850f11732b431e75208
refs/heads/main
2023-06-12T10:12:15.787917
2021-07-06T17:14:56
2021-07-06T17:14:56
383,539,574
0
0
null
null
null
null
UTF-8
Java
false
false
1,823
java
package net.dv8tion.jda.internal.entities; import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.annotation.Nonnull; import net.dv8tion.jda.api.entities.ChannelType; import net.dv8tion.jda.api.entities.Guild; import net.dv8tion.jda.api.entities.GuildChannel; import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.StoreChannel; import net.dv8tion.jda.api.requests.restaction.ChannelAction; import net.dv8tion.jda.internal.utils.cache.SortedSnowflakeCacheViewImpl; public class StoreChannelImpl extends AbstractChannelImpl<StoreChannel, StoreChannelImpl> implements StoreChannel { public StoreChannelImpl(long id, GuildImpl guild) { super(id, guild); } public StoreChannelImpl setPosition(int rawPosition) { getGuild().getStoreChannelView().clearCachedLists(); return (StoreChannelImpl)super.setPosition(rawPosition); } @Nonnull public ChannelType getType() { return ChannelType.STORE; } @Nonnull public List<Member> getMembers() { return Collections.emptyList(); } public int getPosition() { List<GuildChannel> channels = new ArrayList(getGuild().getTextChannels()); channels.addAll(getGuild().getStoreChannels()); Collections.sort(channels); for (int i = 0; i < channels.size(); i++) { if (equals(channels.get(i))) return i; } throw new IllegalStateException("Somehow when determining position we never found the StoreChannel in the Guild's channels? wtf?"); } @Nonnull public ChannelAction<StoreChannel> createCopy(@Nonnull Guild guild) { throw new UnsupportedOperationException("Bots cannot create store channels"); } public String toString() { return "SC:" + getName() + '(' + getId() + ')'; } }
[ "gamerhun1253@gmail.com" ]
gamerhun1253@gmail.com
8a57b151c92e1e16785f66e26e760e2657f8b27c
ab2678c3d33411507d639ff0b8fefb8c9a6c9316
/jgralab/testit/de/uni_koblenz/jgralabtest/schemas/vertextest/impl/std/ReversedJImpl.java
d971ea9d54303c0106d9b564a77cf85fb3db924c
[]
no_license
dmosen/wiki-analysis
b58c731fa2d66e78fe9b71699bcfb228f4ab889e
e9c8d1a1242acfcb683aa01bfacd8680e1331f4f
refs/heads/master
2021-01-13T01:15:10.625520
2013-10-28T13:27:16
2013-10-28T13:27:16
8,741,553
2
0
null
null
null
null
UTF-8
Java
false
false
3,141
java
/* * This code was generated automatically. * Do NOT edit this file, changes will be lost. * Instead, change and commit the underlying schema. */ package de.uni_koblenz.jgralabtest.schemas.vertextest.impl.std; import de.uni_koblenz.jgralab.impl.std.ReversedEdgeImpl; import de.uni_koblenz.jgralab.impl.std.EdgeImpl; import de.uni_koblenz.jgralab.EdgeDirection; import de.uni_koblenz.jgralab.Graph; import de.uni_koblenz.jgralab.GraphIO; import de.uni_koblenz.jgralab.GraphIOException; import de.uni_koblenz.jgralabtest.schemas.vertextest.C2; import de.uni_koblenz.jgralabtest.schemas.vertextest.D2; import java.io.IOException; public class ReversedJImpl extends ReversedEdgeImpl implements de.uni_koblenz.jgralabtest.schemas.vertextest.E, de.uni_koblenz.jgralabtest.schemas.vertextest.J { ReversedJImpl(EdgeImpl e, Graph g) { super(e, g); } @Override public final de.uni_koblenz.jgralab.schema.EdgeClass getAttributedElementClass() { return getNormalEdge().getAttributedElementClass(); } public void readAttributeValues(GraphIO io) throws GraphIOException { throw new GraphIOException("Can not call readAttributeValues for reversed Edges."); } public void readAttributeValueFromString(String attributeName, String value) throws GraphIOException { throw new GraphIOException("Can not call readAttributeValuesFromString for reversed Edges."); } public void writeAttributeValues(GraphIO io) throws GraphIOException, IOException { throw new GraphIOException("Can not call writeAttributeValues for reversed Edges."); } public String writeAttributeValueToString(String _attributeName) throws IOException, GraphIOException { throw new GraphIOException("Can not call writeAttributeValueToString for reversed Edges."); } public de.uni_koblenz.jgralabtest.schemas.vertextest.E getNextEInGraph() { return ((de.uni_koblenz.jgralabtest.schemas.vertextest.E)normalEdge).getNextEInGraph(); } public de.uni_koblenz.jgralabtest.schemas.vertextest.J getNextJInGraph() { return ((de.uni_koblenz.jgralabtest.schemas.vertextest.J)normalEdge).getNextJInGraph(); } public de.uni_koblenz.jgralabtest.schemas.vertextest.E getNextEIncidence() { return (de.uni_koblenz.jgralabtest.schemas.vertextest.E)getNextIncidence(de.uni_koblenz.jgralabtest.schemas.vertextest.E.class); } public de.uni_koblenz.jgralabtest.schemas.vertextest.E getNextEIncidence(EdgeDirection orientation) { return (de.uni_koblenz.jgralabtest.schemas.vertextest.E)getNextIncidence(de.uni_koblenz.jgralabtest.schemas.vertextest.E.class, orientation); } public de.uni_koblenz.jgralabtest.schemas.vertextest.J getNextJIncidence() { return (de.uni_koblenz.jgralabtest.schemas.vertextest.J)getNextIncidence(de.uni_koblenz.jgralabtest.schemas.vertextest.J.class); } public de.uni_koblenz.jgralabtest.schemas.vertextest.J getNextJIncidence(EdgeDirection orientation) { return (de.uni_koblenz.jgralabtest.schemas.vertextest.J)getNextIncidence(de.uni_koblenz.jgralabtest.schemas.vertextest.J.class, orientation); } public C2 getAlpha() { return (C2) super.getAlpha(); } public D2 getOmega() { return (D2) super.getOmega(); } }
[ "dmosen@uni-koblenz.de" ]
dmosen@uni-koblenz.de
f45de64513dcb8214cb55ed18829374e418ea046
2e06b0d514e1f26994f884b31929959132469782
/wayn-framework/src/main/java/com/wayn/framework/config/SwaggerConfig.java
27a85bbe811c9122f77dcba0687ec5574972e126
[ "Apache-2.0" ]
permissive
wayn111/waynboot-sso
4b67aa4473abeaaafb3c153b51e07a80437c23ae
5c13e7788ec34eea270b271a4c62fbf0aebe226c
refs/heads/master
2023-02-24T15:09:33.052173
2022-07-11T15:17:37
2022-07-11T15:17:37
244,842,832
42
18
Apache-2.0
2023-02-22T08:24:24
2020-03-04T08:10:11
Java
UTF-8
Java
false
false
2,314
java
package com.wayn.framework.config; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.Contact; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; @Configuration @EnableSwagger2 public class SwaggerConfig { @Value("${wayn.name}") private String name; @Value("${wayn.version}") private String version; @Value("${wayn.email}") private String email; /** * 创建API */ @Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息) .apiInfo(apiInfo()) // 设置哪些接口暴露给Swagger展示 .select() // 扫描所有有注解的api,用这种方式更灵活 .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) // 扫描指定包中的swagger注解 //.apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger")) // 扫描所有 .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()) .build(); } /** * 添加摘要信息 */ private ApiInfo apiInfo() { // 用ApiInfoBuilder进行定制 return new ApiInfoBuilder() // 设置标题 .title("标题:wayn_admin管理系统_接口文档") // 描述 .description("描述:用于查看后台管理系统api接口") // 作者信息 .contact(new Contact(name, null, email)) // 版本 .version("版本号:" + version) .build(); } }
[ "1669738430@qq.com" ]
1669738430@qq.com
faa8a14c0cd776be1ea4081c3373271179f5ff80
5e12a12323d3401578ea2a7e4e101503d700b397
/tags/jtester-1.0.7/src/test/java/org/jtester/reflector/model/TestObject.java
8f0ba329ab85827368f0dcb1842150bd6ff7d190
[]
no_license
xiangyong/jtester
369d4b689e4e66f25c7217242b835d1965da3ef8
5f4b3948cd8d43d3e8fea9bc34e5bd7667f4def9
refs/heads/master
2021-01-18T21:02:05.493497
2013-10-08T01:48:18
2013-10-08T01:48:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
865
java
package org.jtester.reflector.model; import org.testng.annotations.Test; @SuppressWarnings("unused") public class TestObject extends SuperTestObject { private boolean magic = true; private int wrong; private static int aStaticPrivate = 27022008; private int ANonStandardJavaBeanStyleField = -1; private void throwingMethod() throws TestException { throw new TestException("from throwingMethod"); } private void nonThrowingMethod() { // do nothing } private class InnerThrowsThrowable { private InnerThrowsThrowable() throws Throwable { throw new Throwable(); } } private class InnerThrowsRuntimeException { private InnerThrowsRuntimeException() { throw new RuntimeException(); } } private class InnerThrowsError { private InnerThrowsError() { throw new Error(); } } }
[ "darui.wu@9ac485da-fb45-aad8-5227-9c360d3c5fad" ]
darui.wu@9ac485da-fb45-aad8-5227-9c360d3c5fad
c1f5e105c49c57c2dc6835bec2d9b2269954d5f8
b7eab1bc2c0ffd9d6689df9d803db375326baf56
/common/src/com/mediatek/camera/common/setting/SettingDevice2RequesterProxy.java
e7e4bf07080a24d97b0d1d35e7b221eda9d64ef5
[ "ISC", "Apache-2.0" ]
permissive
cc-china/MTK_AS_Camera2
8e687aa319db7009faee103496a79bd60ffdadec
9b3b73174047f0ea8d2f7860813c0a72f37a2d7a
refs/heads/master
2022-03-09T08:21:11.948397
2019-11-14T09:37:30
2019-11-14T09:37:30
221,654,668
3
2
null
null
null
null
UTF-8
Java
false
false
5,315
java
/* * Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein is * confidential and proprietary to MediaTek Inc. and/or its licensors. Without * the prior written permission of MediaTek inc. and/or its licensors, any * reproduction, modification, use or disclosure of MediaTek Software, and * information contained herein, in whole or in part, shall be strictly * prohibited. * * MediaTek Inc. (C) 2016. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek * Software") have been modified by MediaTek Inc. All revisions are subject to * any receiver's applicable license agreements with MediaTek Inc. */ package com.mediatek.camera.common.setting; import android.hardware.camera2.CaptureRequest; import android.view.Surface; import com.mediatek.camera.common.debug.LogUtil; import com.mediatek.camera.common.device.v2.Camera2CaptureSessionProxy; import com.mediatek.camera.common.bgservice.CaptureSurface; import javax.annotation.Nonnull; /** * An implementation of SettingDevice2Requester used by setting notify mode. */ public class SettingDevice2RequesterProxy implements ISettingManager.SettingDevice2Requester { private static final LogUtil.Tag TAG = new LogUtil.Tag(SettingDevice2RequesterProxy.class.getSimpleName()); private ISettingManager.SettingDevice2Requester mModeDevice2RequesterImpl; @Override public void createAndChangeRepeatingRequest() { synchronized (this) { if (mModeDevice2RequesterImpl != null) { mModeDevice2RequesterImpl.createAndChangeRepeatingRequest(); } } } @Override public CaptureRequest.Builder createAndConfigRequest(int templateType) { synchronized (this) { if (mModeDevice2RequesterImpl != null) { return mModeDevice2RequesterImpl.createAndConfigRequest(templateType); } } return null; } @Override public Camera2CaptureSessionProxy getCurrentCaptureSession() { synchronized (this) { if (mModeDevice2RequesterImpl != null) { return mModeDevice2RequesterImpl.getCurrentCaptureSession(); } } return null; } @Override public void requestRestartSession() { synchronized (this) { if (mModeDevice2RequesterImpl != null) { mModeDevice2RequesterImpl.requestRestartSession(); } } } @Override public int getRepeatingTemplateType() { synchronized (this) { if (mModeDevice2RequesterImpl != null) { return mModeDevice2RequesterImpl.getRepeatingTemplateType(); } } return -1; } public void updateModeDevice2Requester( @Nonnull ISettingManager.SettingDevice2Requester settingDevice2Requester) { synchronized (this) { mModeDevice2RequesterImpl = settingDevice2Requester; } } @Override public CaptureSurface getModeSharedCaptureSurface() throws IllegalStateException { CaptureSurface captureSurface = mModeDevice2RequesterImpl.getModeSharedCaptureSurface(); return captureSurface; } @Override public Surface getModeSharedPreviewSurface() throws IllegalStateException { Surface previewSurface = mModeDevice2RequesterImpl.getModeSharedPreviewSurface(); return previewSurface; } @Override public Surface getModeSharedThumbnailSurface() throws IllegalStateException { Surface thumbnailSurface = mModeDevice2RequesterImpl.getModeSharedThumbnailSurface(); return thumbnailSurface; } }
[ "com_caoyun@163.com" ]
com_caoyun@163.com
77afac7ac9b7bea6205c355e7ca8e6ab24c1b25f
300f5694febfd379a389c8b716767e7052c18fb7
/src/main/java/com/bairock/iot/intelDev/order/DeviceOrder.java
e59a45038242f70707e6c7a4ce4c4d66626e5d4b
[]
no_license
lover2668/intelDev
a8179daa442dbec28fd3da42d58de9dda1c27ca6
dd1d71b46c1329da2821f13cc1dfabe982c4a0ed
refs/heads/master
2022-12-29T02:01:18.846911
2019-11-13T12:51:26
2019-11-13T12:51:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
980
java
package com.bairock.iot.intelDev.order; public class DeviceOrder extends OrderBase { private String devId; //编码, 设备就是设备长编码 private String longCoding; public DeviceOrder() {} public DeviceOrder(OrderType orderType, String devId, String longCoding, String data) { setOrderType(orderType); this.devId = devId; this.longCoding = longCoding; setData(data); } public DeviceOrder(String username, String devGroupName, OrderType orderType, String devId, String longCoding, String data) { setUsername(username); setDevGroupName(devGroupName); setOrderType(orderType); this.devId = devId; this.longCoding = longCoding; setData(data); } public String getDevId() { return devId; } public void setDevId(String devId) { this.devId = devId; } public String getLongCoding() { return longCoding; } public void setLongCoding(String longCoding) { this.longCoding = longCoding; } }
[ "444894216@qq.com" ]
444894216@qq.com
cc7c348d98c5f641dc18ca40bc96e100d333fc6f
98779c054da77b139a91357894ff1e9fa63ea802
/be/java/basic/code27/new/itcast_02/DirectionDemo.java
5879bc9d08ec5f19054c456a12233c913db5a8f5
[]
no_license
pengfen/learn17
0e384d700426bfedd732c01bcd0665fd897f0c97
744a82908c9921365a4f7c983d3f3d0651944224
refs/heads/master
2021-09-16T05:41:25.889434
2018-06-17T10:06:14
2018-06-17T10:06:14
112,165,893
2
2
null
null
null
null
GB18030
Java
false
false
958
java
package cn.itcast_02; public class DirectionDemo { public static void main(String[] args) { Direction d = Direction.FRONT; System.out.println(d); // FRONT // public String toString()返回枚举常量的名称,它包含在声明中。 System.out.println("-------------"); Direction2 d2 = Direction2.FRONT; System.out.println(d2); System.out.println(d2.getName()); System.out.println("-------------"); Direction3 d3 = Direction3.FRONT; System.out.println(d3); System.out.println(d3.getName()); d3.show(); System.out.println("--------------"); Direction3 dd = Direction3.FRONT; dd = Direction3.LEFT; switch (dd) { case FRONT: System.out.println("你选择了前"); break; case BEHIND: System.out.println("你选择了后"); break; case LEFT: System.out.println("你选择了左"); break; case RIGHT: System.out.println("你选择了右"); break; } } }
[ "caopeng8787@163.com" ]
caopeng8787@163.com
7266eb9757e8b4ea3fe335a27acc1d37b89991a5
447520f40e82a060368a0802a391697bc00be96f
/apks/banking_set2/GROUPE SOCIETE GENERALE SA/source/android/support/v4/app/BaseFragmentActivityDonut.java
ef9361d39c471363c8040367522747ef54fe3ce6
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
1,108
java
package android.support.v4.app; import android.app.Activity; import android.content.Context; import android.os.Build.VERSION; import android.os.Bundle; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; abstract class BaseFragmentActivityDonut extends Activity { BaseFragmentActivityDonut() {} abstract View dispatchFragmentsOnCreateView(View paramView, String paramString, Context paramContext, AttributeSet paramAttributeSet); protected void onCreate(Bundle paramBundle) { if ((Build.VERSION.SDK_INT < 11) && (getLayoutInflater().getFactory() == null)) { getLayoutInflater().setFactory(this); } super.onCreate(paramBundle); } public View onCreateView(String paramString, Context paramContext, AttributeSet paramAttributeSet) { View localView2 = dispatchFragmentsOnCreateView(null, paramString, paramContext, paramAttributeSet); View localView1 = localView2; if (localView2 == null) { localView1 = super.onCreateView(paramString, paramContext, paramAttributeSet); } return localView1; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
58013952c240262640b5c30db8eb41e6b2b9d0f7
f02f6593e40bfc8f8c07fcc1de6f7110e4a256b2
/deployer/src/main/java/com/heliosapm/jboss/deployer/common/package-info.java
93218488bcd055e4528775acae1875c5c5d07d75
[]
no_license
nickman/jbossConfigDeployer
f695f90da90eac5eebfaddd54367f382efffec96
9ce16c47dda53111f2019009cc38c28fbcc29ae5
refs/heads/master
2021-01-10T06:28:10.798486
2016-01-26T14:56:09
2016-01-26T14:56:09
49,985,983
0
0
null
null
null
null
UTF-8
Java
false
false
1,126
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. */ /** * <p>Title: package-info</p> * <p>Description: Command line processor and admin connection via ModelControllerClient management</p> * <p>Company: Helios Development Group LLC</p> * @author Whitehead (nwhitehead AT heliosdev DOT org) * <p><code>com.heliosapm.jboss.deployer.common.package-info</code></p> */ package com.heliosapm.jboss.deployer.common;
[ "whitehead.nicholas@gmail.com" ]
whitehead.nicholas@gmail.com
5a82e9779408cbb4dfd820e851127c794e8218c7
75c4712ae3f946db0c9196ee8307748231487e4b
/src/main/java/com/alipay/api/response/AlipayBossProdSubaccountBalanceQueryResponse.java
a8b1c26b83b5bd303e38e0971fcfd97e8d38c45a
[ "Apache-2.0" ]
permissive
yuanbaoMarvin/alipay-sdk-java-all
70a72a969f464d79c79d09af8b6b01fa177ac1be
25f3003d820dbd0b73739d8e32a6093468d9ed92
refs/heads/master
2023-06-03T16:54:25.138471
2021-06-25T14:48:21
2021-06-25T14:48:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
795
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.domain.SubAccountBalanceOpenApiDTO; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.boss.prod.subaccount.balance.query response. * * @author auto create * @since 1.0, 2020-08-31 19:45:13 */ public class AlipayBossProdSubaccountBalanceQueryResponse extends AlipayResponse { private static final long serialVersionUID = 3163429641672532895L; /** * 子户余额信息 */ @ApiField("result_set") private SubAccountBalanceOpenApiDTO resultSet; public void setResultSet(SubAccountBalanceOpenApiDTO resultSet) { this.resultSet = resultSet; } public SubAccountBalanceOpenApiDTO getResultSet( ) { return this.resultSet; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
d44e5c926b0c4f86350b23d224a3e8b55b90421a
fb3034ec95b7e6e0feccdf9adf208325249709d2
/src/eugene/behavioral/specification/creature/Troll.java
2a46b75e02160cf0e930ab0aaa838064790758b7
[ "MIT" ]
permissive
Ernestyj/JDesignPattern
131d7e950a0bbfcb838177bce44458322fd74ceb
4576ed6bac7f664a3c704dbee59428e611f6c007
refs/heads/master
2020-04-01T16:18:49.472542
2015-08-18T02:13:53
2015-08-18T02:13:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
401
java
package eugene.behavioral.specification.creature; import eugene.behavioral.specification.property.Color; import eugene.behavioral.specification.property.Movement; import eugene.behavioral.specification.property.Size; /** * Created by Jian on 2015/8/12. */ public class Troll extends AbstractCreature { public Troll() { super("Troll", Size.LARGE, Movement.WALKING, Color.DARK); } }
[ "ernestyj@outlook.com" ]
ernestyj@outlook.com
4f39de416d6b3e6f03f26a08796065264dff1056
333685a0f3395028588901a9b0cbf7654af7894a
/src/main/java/com/mon/medecin/repository/search/ServiceSearchRepository.java
057370fba17653b36924144b851b20d216b64bdb
[]
no_license
trsorsimo96/BetaMedecin
477ee9de9c06f342f5de994a2889cf8b4fea570d
bbf630320bf0baf9db545d8f37d247bf7cd561a4
refs/heads/master
2021-05-26T04:44:03.094351
2018-03-31T20:33:04
2018-03-31T20:33:04
127,440,160
0
1
null
2020-09-18T12:24:39
2018-03-30T14:57:21
Java
UTF-8
Java
false
false
330
java
package com.mon.medecin.repository.search; import com.mon.medecin.domain.Service; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; /** * Spring Data Elasticsearch repository for the Service entity. */ public interface ServiceSearchRepository extends ElasticsearchRepository<Service, Long> { }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
48dfd3ffe998d7623454e7385e66bd45845f7c39
c020d9623083b5d14459a5d1cf38eb7e3ba25207
/app/src/main/java/cn/com/stableloan/ui/fragment/dialogfragment/AdialogFragment.java
6b0e69144e36a5c74de9a4a0131d3e0d98ff6309
[]
no_license
Mexicande/anwenqianbao
b221d190825319b340bac45aa53d0857971ac654
c4dc2fa06e59642daa5b891ef3b3f22483c69d67
refs/heads/master
2021-01-21T04:13:41.885521
2018-05-07T02:49:19
2018-05-07T02:49:19
94,964,332
0
0
null
null
null
null
UTF-8
Java
false
false
3,533
java
package cn.com.stableloan.ui.fragment.dialogfragment; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.ImageView; import android.widget.RelativeLayout; import com.bumptech.glide.Glide; import butterknife.Bind; import butterknife.ButterKnife; import butterknife.OnClick; import cn.com.stableloan.R; import cn.com.stableloan.model.integarl.AdvertisingBean; import cn.com.stableloan.ui.activity.HtmlActivity; /** * A simple {@link Fragment} subclass. */ public class AdialogFragment extends DialogFragment { @Bind(R.id.fl_content_container) ImageView flContentContainer; @Bind(R.id.iv_close) ImageView ivClose; @Bind(R.id.anim_container) RelativeLayout animContainer; private static String popup=null; private AdvertisingBean popupBean; public static AdialogFragment newInstance(AdvertisingBean mPopupBean) { AdialogFragment instance = new AdialogFragment(); Bundle args = new Bundle(); args.putSerializable(popup,mPopupBean); instance.setArguments(args); return instance; } @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setStyle(DialogFragment.STYLE_NO_TITLE, R.style.Base_AlertDialog); } public AdialogFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_adialog, container, false); final Window window = getDialog().getWindow(); if(window!=null){ window.getDecorView().setPadding(0, 0, 0, 0); WindowManager.LayoutParams wlp = window.getAttributes(); wlp.gravity = Gravity.CENTER; wlp.width = WindowManager.LayoutParams.MATCH_PARENT; wlp.height = WindowManager.LayoutParams.WRAP_CONTENT; window.setAttributes(wlp); } ButterKnife.bind(this, view); initDialog(); return view; } private void initDialog() { popupBean = (AdvertisingBean) getArguments().getSerializable(popup); if(popupBean!=null&&popupBean.getData().getImg()!=null){ Glide.with(this) .load(popupBean.getData().getImg()) .into(flContentContainer); } } @Override public void onDestroyView() { super.onDestroyView(); ButterKnife.unbind(this); } @OnClick({R.id.fl_content_container, R.id.iv_close}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.fl_content_container: if (!"".equals(popupBean.getData().getUrl())) { startActivity(new Intent(getActivity(), HtmlActivity.class).putExtra("advertising", popupBean.getData().getUrl())); dismiss(); } break; case R.id.iv_close: dismiss(); break; default: break; } } }
[ "mexicande@hotmail.com" ]
mexicande@hotmail.com
ac6e987ec6cda711115a3dc06c4c686bcc7f266d
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/HandlerC48262Ln.java
eabc1670c9b8ef1ccfddfe5101849a47d0f38792
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
802
java
package X; import android.os.Handler; import android.os.Looper; import android.os.Message; import com.whatsapp.deeplink.DeepLinkActivity; /* renamed from: X.2Ln reason: invalid class name and case insensitive filesystem */ public final class HandlerC48262Ln extends Handler { public final /* synthetic */ DeepLinkActivity A00; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public HandlerC48262Ln(DeepLinkActivity deepLinkActivity, Looper looper) { super(looper); this.A00 = deepLinkActivity; if (looper != null) { return; } throw null; } public void handleMessage(Message message) { int i = message.arg1; if (i != 0) { this.A00.APv(0, i); } } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
f64f8c1f97d5262fe79bcd59902a429194ec9239
ffc01d954e19bffc84fce91f75d87227dead2906
/app/src/main/java/com/fubang/live/adapter/RoomProviteChatAdapter.java
a6c43d52ff141e470f9b6e00b94177c229843f3a
[ "Apache-2.0" ]
permissive
jackycaojiaqi/FuBang_Live
265eea80f91a7d600269b2c3d84587fa73c67837
5b3ecce021037d3bfdd6aaa33f35ee5e22a4d6a0
refs/heads/master
2021-01-23T01:41:55.852192
2017-08-04T09:01:11
2017-08-04T09:01:11
85,927,463
0
1
null
null
null
null
UTF-8
Java
false
false
2,432
java
package com.fubang.live.adapter; import android.widget.ImageView; import com.chad.library.adapter.base.BaseMultiItemQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.fubang.live.AppConstant; import com.fubang.live.R; import com.fubang.live.entities.RoomFollowEntity; import com.fubang.live.util.FBImage; import com.fubang.live.util.StringUtil; import com.xlg.android.protocol.RoomChatMsg; import java.util.List; /** *         ┏┓   ┏┓ *        ┏┛┻━━━┛┻┓ *        ┃       ┃ *        ┃   ━   ┃ *        ┃ >   < ┃ *        ┃       ┃ *        ┃... ⌒ ... ┃ *        ┃       ┃ *        ┗━┓   ┏━┛ *          ┃   ┃ Code is far away from bug with the animal protecting *          ┃   ┃ 神兽保佑,代码无bug *          ┃   ┃ *          ┃   ┃ *          ┃   ┃ *          ┃   ┃ *          ┃   ┗━━━┓ *          ┃       ┣┓ *          ┃       ┏┛ *          ┗┓┓┏━┳┓┏┛ *           ┃┫┫ ┃┫┫ *           ┗┻┛ ┗┻┛ * ━━━━━━神兽出没━━━━━━ * Created by jacky on 17/3/10. */ public class RoomProviteChatAdapter extends BaseMultiItemQuickAdapter<RoomChatMsg, BaseViewHolder> { private List<RoomChatMsg> list; public RoomProviteChatAdapter(List data) { super(data); addItemType(RoomChatMsg.CHAT_TYPE_OTHER, R.layout.item_room_privite_chat_other); addItemType(RoomChatMsg.CHAT_TYPE_SELF, R.layout.item_room_privite_chat_self); } @Override protected void convert(BaseViewHolder helper, RoomChatMsg item) { switch (helper.getItemViewType()) { case RoomChatMsg.CHAT_TYPE_OTHER: break; case RoomChatMsg.CHAT_TYPE_SELF: break; } } }
[ "353938360@qq.com" ]
353938360@qq.com
17f5a63e0e6344d4a7fb68f71f63b933c8e309c8
5a0000ed06b77a2ede45e1d323a4b744d7ce8777
/oci-common/src/main/java/io/micronaut/oci/core/TenancyIdProvider.java
62bf4fce2f55e4de45a65de29bb5e923b647a6a3
[ "Apache-2.0" ]
permissive
gradinac/micronaut-oracle-cloud
93306f50ece8f2ee263eedac55593726d1e30422
2d42c41653cd3570bf2e6d9c70dd4736b4709bf4
refs/heads/master
2022-12-03T16:59:51.614402
2020-08-05T07:04:09
2020-08-05T07:04:09
285,371,017
0
0
Apache-2.0
2020-08-05T18:21:42
2020-08-05T18:21:42
null
UTF-8
Java
false
false
944
java
/* * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.micronaut.oci.core; import edu.umd.cs.findbugs.annotations.Nullable; /** * Interface that supplies the Tenant ID. * * @author graemerocher * @since 1.0.0 */ @FunctionalInterface public interface TenancyIdProvider { /** * @return Returns the configured tenant id. */ @Nullable String getTenancyId(); }
[ "graeme.rocher@gmail.com" ]
graeme.rocher@gmail.com
1fb1769c1c5477bbd51708cd60eb4c3d8d2377db
75edf9c7d5d1e666135ab0d797a292f9781790b6
/app_sf_responsive/release/pagecompile/ish/cartridges/app_005fsf_005fresponsive/default_/modules/common/GarbleString_jsp.java
46ce2461d74cc33dc9fbcaa727999d2b2829a246
[]
no_license
arthurAddamsSiebert/cartridges
7808f484de6b06c98c59be49f816164dba21366e
cc1141019a601f76ad15727af442718f1f6bb6cb
refs/heads/master
2020-06-11T08:58:02.419907
2019-06-26T12:16:31
2019-06-26T12:16:31
193,898,014
0
1
null
2019-11-02T23:33:49
2019-06-26T12:15:29
Java
UTF-8
Java
false
false
5,059
java
/* * Generated by the Jasper component of Apache Tomcat * Version: JspCServletContext/1.0 * Generated at: 2019-02-16 22:40:05 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package ish.cartridges.app_005fsf_005fresponsive.default_.modules.common; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import java.util.*; import java.io.*; import com.intershop.beehive.core.internal.template.*; import com.intershop.beehive.core.internal.template.isml.*; import com.intershop.beehive.core.capi.log.*; import com.intershop.beehive.core.capi.resource.*; import com.intershop.beehive.core.capi.util.UUIDMgr; import com.intershop.beehive.core.capi.util.XMLHelper; import com.intershop.beehive.foundation.util.*; import com.intershop.beehive.core.internal.url.*; import com.intershop.beehive.core.internal.resource.*; import com.intershop.beehive.core.internal.wsrp.*; import com.intershop.beehive.core.capi.pipeline.PipelineDictionary; import com.intershop.beehive.core.capi.naming.NamingMgr; import com.intershop.beehive.core.capi.pagecache.PageCacheMgr; import com.intershop.beehive.core.capi.request.SessionMgr; import com.intershop.beehive.core.internal.request.SessionMgrImpl; import com.intershop.beehive.core.pipelet.PipelineConstants; import java.lang.Integer; import java.lang.String; import java.lang.StringBuffer; import com.intershop.beehive.core.capi.pipeline.PipelineDictionary; public final class GarbleString_jsp extends com.intershop.beehive.core.internal.template.AbstractTemplate implements org.apache.jasper.runtime.JspSourceDependent { private static final javax.servlet.jsp.JspFactory _jspxFactory = javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants; private javax.el.ExpressionFactory _el_expressionfactory; private org.apache.tomcat.InstanceManager _jsp_instancemanager; public java.util.Map<java.lang.String,java.lang.Long> getDependants() { return _jspx_dependants; } public void _jspInit() { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig()); } public void _jspDestroy() { } public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { final javax.servlet.jsp.PageContext pageContext; javax.servlet.http.HttpSession session = null; final javax.servlet.ServletContext application; final javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = null; final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = null; javax.servlet.jsp.PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=utf-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 0, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; boolean _boolean_result=false; TemplateExecutionConfig context = getTemplateExecutionConfig(); createTemplatePageConfig(context.getServletRequest()); printHeader(out); setEncodingType("text/html"); PipelineDictionary dict = getPipelineDictionary(); if ( null != dict.get("text") ) { StringBuffer text = new StringBuffer( (String)dict.get("text") ); String direction = (String) dict.get("direction"); int length = new Integer( (String) dict.get( "length" ) ).intValue(); char character = ((String) dict.get( "character" )).charAt(0); String output = (String) dict.get( "output" ); int currentLen = text.toString().length(); if (length < currentLen) { if ( direction.equals( "begin" ) ) { int pos = 0; while ( pos < currentLen - length) { text.setCharAt( pos, character ); pos++; } } else { int pos = length; while ( pos < currentLen ) { text.setCharAt( pos, character ); pos++; } } } dict.put(output, text.toString()); } printFooter(out); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { out.clearBuffer(); } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "root@Inteshoppa1v11.yyrtatjsacuefh5ihlz5gkzqpd.ax.internal.cloudapp.net" ]
root@Inteshoppa1v11.yyrtatjsacuefh5ihlz5gkzqpd.ax.internal.cloudapp.net
0396618f2e6d19992165f2e6b7c08885747e7788
a737fcf8b109e1b6cee754ccb44ef73d356a4e20
/yoko/spec-corba/src/main/java/org/omg/SecurityLevel2/EstablishTrustPolicyPOA.java
7b4bbb7e91ec179505247767f92ac05ca993a80c
[ "Apache-2.0" ]
permissive
napile/napile.classpath
42fc9e1eef7bc291960f98924b1dcfa94ca51379
1599cba24d751a75dceefdabda0cce384e672ed8
refs/heads/master
2020-06-06T05:32:28.210419
2012-10-06T10:39:45
2012-10-06T10:39:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,005
java
package org.omg.SecurityLevel2; /** * org/omg/SecurityLevel2/EstablishTrustPolicyPOA.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from F:/yoko-1.0/yoko-spec-corba/src/main/idl/SecurityLevel2.idl * 14 Август 2012 г. 21:55:46 EEST */ /* */ public abstract class EstablishTrustPolicyPOA extends org.omg.PortableServer.Servant implements org.omg.SecurityLevel2.EstablishTrustPolicyOperations, org.omg.CORBA.portable.InvokeHandler { // Constructors private static java.util.Hashtable _methods = new java.util.Hashtable (); static { _methods.put ("_get_trust", new java.lang.Integer (0)); _methods.put ("_get_policy_type", new java.lang.Integer (1)); _methods.put ("copy", new java.lang.Integer (2)); _methods.put ("destroy", new java.lang.Integer (3)); } public org.omg.CORBA.portable.OutputStream _invoke (String $method, org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler $rh) { org.omg.CORBA.portable.OutputStream out = null; java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); if (__method == null) throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); switch (__method.intValue ()) { case 0: // SecurityLevel2/EstablishTrustPolicy/_get_trust { org.omg.Security.EstablishTrust $result = null; $result = this.trust (); out = $rh.createReply(); org.omg.Security.EstablishTrustHelper.write (out, $result); break; } case 1: // org/omg/CORBA/Policy/_get_policy_type { int $result = (int)0; $result = this.policy_type (); out = $rh.createReply(); out.write_ulong ($result); break; } case 2: // org/omg/CORBA/Policy/copy { org.omg.CORBA.Policy $result = null; $result = this.copy (); out = $rh.createReply(); org.omg.CORBA.PolicyHelper.write (out, $result); break; } case 3: // org/omg/CORBA/Policy/destroy { this.destroy (); out = $rh.createReply(); break; } default: throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); } return out; } // _invoke // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:SecurityLevel2/EstablishTrustPolicy:1.0", "IDL:CORBA/Policy:1.0"}; public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId) { return (String[])__ids.clone (); } public EstablishTrustPolicy _this() { return EstablishTrustPolicyHelper.narrow( super._this_object()); } public EstablishTrustPolicy _this(org.omg.CORBA.ORB orb) { return EstablishTrustPolicyHelper.narrow( super._this_object(orb)); } } // class EstablishTrustPolicyPOA
[ "vistall@i.ua" ]
vistall@i.ua
1b78114c0029714f54dfc8f2ad6cdeaa27653347
a05e1a01a49a59129cdd71c1fe843c910a35ed8c
/aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/GetOpenIdTokenForDeveloperIdentityResult.java
59bc3d3cd0056ef9b75effe4a5fa9fc8ac62c130
[ "JSON", "Apache-2.0" ]
permissive
lenadkn/java-sdk-test-2
cd36997e44cd3926831218b2da7c71deda8c2b26
28375541f8a4ae27417419772190a8de2b68fc32
refs/heads/master
2021-01-20T20:36:53.719764
2014-12-19T00:38:57
2014-12-19T00:38:57
65,262,893
1
0
null
null
null
null
UTF-8
Java
false
false
4,924
java
/* * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT 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.amazonaws.services.cognitoidentity.model; import java.io.Serializable; /** * <p> * Returned in response to a successful * <code>GetOpenIdTokenForDeveloperIdentity</code> request. * </p> */ public class GetOpenIdTokenForDeveloperIdentityResult implements Serializable { /** * A unique identifier in the format REGION:GUID. * <p> * <b>Constraints:</b><br/> * <b>Length: </b>1 - 50<br/> * <b>Pattern: </b>[\w-]+:[0-9a-f-]+<br/> */ private String identityId; /** * An OpenID token. */ private String token; /** * A unique identifier in the format REGION:GUID. * <p> * <b>Constraints:</b><br/> * <b>Length: </b>1 - 50<br/> * <b>Pattern: </b>[\w-]+:[0-9a-f-]+<br/> * * @return A unique identifier in the format REGION:GUID. */ public String getIdentityId() { return identityId; } /** * A unique identifier in the format REGION:GUID. * <p> * <b>Constraints:</b><br/> * <b>Length: </b>1 - 50<br/> * <b>Pattern: </b>[\w-]+:[0-9a-f-]+<br/> * * @param identityId A unique identifier in the format REGION:GUID. */ public void setIdentityId(String identityId) { this.identityId = identityId; } /** * A unique identifier in the format REGION:GUID. * <p> * Returns a reference to this object so that method calls can be chained together. * <p> * <b>Constraints:</b><br/> * <b>Length: </b>1 - 50<br/> * <b>Pattern: </b>[\w-]+:[0-9a-f-]+<br/> * * @param identityId A unique identifier in the format REGION:GUID. * * @return A reference to this updated object so that method calls can be chained * together. */ public GetOpenIdTokenForDeveloperIdentityResult withIdentityId(String identityId) { this.identityId = identityId; return this; } /** * An OpenID token. * * @return An OpenID token. */ public String getToken() { return token; } /** * An OpenID token. * * @param token An OpenID token. */ public void setToken(String token) { this.token = token; } /** * An OpenID token. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param token An OpenID token. * * @return A reference to this updated object so that method calls can be chained * together. */ public GetOpenIdTokenForDeveloperIdentityResult withToken(String token) { this.token = token; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getIdentityId() != null) sb.append("IdentityId: " + getIdentityId() + ","); if (getToken() != null) sb.append("Token: " + getToken() ); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIdentityId() == null) ? 0 : getIdentityId().hashCode()); hashCode = prime * hashCode + ((getToken() == null) ? 0 : getToken().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetOpenIdTokenForDeveloperIdentityResult == false) return false; GetOpenIdTokenForDeveloperIdentityResult other = (GetOpenIdTokenForDeveloperIdentityResult)obj; if (other.getIdentityId() == null ^ this.getIdentityId() == null) return false; if (other.getIdentityId() != null && other.getIdentityId().equals(this.getIdentityId()) == false) return false; if (other.getToken() == null ^ this.getToken() == null) return false; if (other.getToken() != null && other.getToken().equals(this.getToken()) == false) return false; return true; } }
[ "aws@amazon.com" ]
aws@amazon.com
c12e5e4d10ecc00eeab2fc4a838e6b68fc47ae6d
c2f9d69a16986a2690e72718783472fc624ded18
/com/whatsapp/tb.java
4b47252aa42e7fab12036f9564b43ed6f61172b8
[]
no_license
mithileshongit/WhatsApp-Descompilado
bc973e1356eb043661a2efc30db22bcc1392d7f3
94a9d0b1c46bb78676ac401572aa11f60e12345e
refs/heads/master
2021-01-16T20:56:27.864244
2015-02-09T04:08:40
2015-02-09T04:08:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,213
java
package com.whatsapp; import android.content.Context; import android.widget.ArrayAdapter; import java.util.ArrayList; import org.spongycastle.jcajce.provider.symmetric.util.PBE; import org.whispersystems.libaxolotl.ay; class tb extends ArrayAdapter { private static final String z; private ArrayList a; final SetStatus b; static { char[] toCharArray = "?\n6,\u0015'4&-\u0006?\n;&\u0012".toCharArray(); int length = toCharArray.length; char[] cArr = toCharArray; for (int i = 0; length > i; i++) { int i2; char c = cArr[i]; switch (i % 5) { case PBE.MD5 /*0*/: i2 = 83; break; case ay.f /*1*/: i2 = 107; break; case ay.n /*2*/: i2 = 79; break; case ay.p /*3*/: i2 = 67; break; default: i2 = 96; break; } cArr[i] = (char) (i2 ^ c); } z = new String(cArr).intern(); } public tb(SetStatus setStatus, Context context, int i, ArrayList arrayList) { this.b = setStatus; super(context, i, arrayList); this.a = arrayList; } /* JADX WARNING: inconsistent code. */ /* Code decompiled incorrectly, please refer to instructions dump. */ public android.view.View getView(int r7, android.view.View r8, android.view.ViewGroup r9) { /* r6_this = this; if (r8 != 0) goto L_0x0014; L_0x0002: r0 = r6.b; r1 = z; r0 = r0.getSystemService(r1); r0 = (android.view.LayoutInflater) r0; r1 = 2130903201; // 0x7f0300a1 float:1.7413213E38 double:1.052806066E-314; r2 = 0; r8 = com.whatsapp.b7.a(r0, r1, r2); L_0x0014: r0 = r6.a; r0 = r0.get(r7); r0 = (java.lang.String) r0; if (r0 == 0) goto L_0x0056; L_0x001e: r1 = 2131427992; // 0x7f0b0298 float:1.8477616E38 double:1.0530653474E-314; r1 = r8.findViewById(r1); r1 = (android.widget.TextView) r1; if (r1 == 0) goto L_0x0056; L_0x0029: r2 = com.whatsapp.App.as; r2 = r0.equals(r2); if (r2 == 0) goto L_0x0044; L_0x0031: r2 = 255; // 0xff float:3.57E-43 double:1.26E-321; r3 = 51; r4 = 102; // 0x66 float:1.43E-43 double:5.04E-322; r5 = 153; // 0x99 float:2.14E-43 double:7.56E-322; r2 = android.graphics.Color.argb(r2, r3, r4, r5); r1.setTextColor(r2); r2 = com.whatsapp.App.az; if (r2 == 0) goto L_0x0049; L_0x0044: r2 = -16777216; // 0xffffffffff000000 float:-1.7014118E38 double:NaN; r1.setTextColor(r2); L_0x0049: r2 = r6.b; r2 = r2.getBaseContext(); r0 = com.whatsapp.util.a5.d(r0, r2); r1.setText(r0); L_0x0056: return r8; */ throw new UnsupportedOperationException("Method not decompiled: com.whatsapp.tb.getView(int, android.view.View, android.view.ViewGroup):android.view.View"); } }
[ "hjcf@cin.ufpe.br" ]
hjcf@cin.ufpe.br
aa1e9a03986a023970694f84ddb475e3d640485d
7016cec54fb7140fd93ed805514b74201f721ccd
/src/java/com/echothree/control/user/selector/server/command/GetSelectorKindCommand.java
f22580308e2f8ee3398033ffa7751a6a3f6847a8
[ "MIT", "Apache-1.1", "Apache-2.0" ]
permissive
echothreellc/echothree
62fa6e88ef6449406d3035de7642ed92ffb2831b
bfe6152b1a40075ec65af0880dda135350a50eaf
refs/heads/master
2023-09-01T08:58:01.429249
2023-08-21T11:44:08
2023-08-21T11:44:08
154,900,256
5
1
null
null
null
null
UTF-8
Java
false
false
4,345
java
// -------------------------------------------------------------------------------- // Copyright 2002-2023 Echo Three, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // -------------------------------------------------------------------------------- package com.echothree.control.user.selector.server.command; import com.echothree.control.user.selector.common.form.GetSelectorKindForm; import com.echothree.control.user.selector.common.result.SelectorResultFactory; import com.echothree.model.control.core.common.EventTypes; import com.echothree.model.control.party.common.PartyTypes; import com.echothree.model.control.security.common.SecurityRoleGroups; import com.echothree.model.control.security.common.SecurityRoles; import com.echothree.model.control.selector.server.control.SelectorControl; import com.echothree.model.control.selector.server.logic.SelectorKindLogic; import com.echothree.model.data.selector.server.entity.SelectorKind; import com.echothree.model.data.user.common.pk.UserVisitPK; import com.echothree.util.common.command.BaseResult; import com.echothree.util.common.validation.FieldDefinition; import com.echothree.util.common.validation.FieldType; import com.echothree.util.server.control.BaseSingleEntityCommand; import com.echothree.util.server.control.CommandSecurityDefinition; import com.echothree.util.server.control.PartyTypeDefinition; import com.echothree.util.server.control.SecurityRoleDefinition; import com.echothree.util.server.persistence.Session; import java.util.Arrays; import java.util.Collections; import java.util.List; public class GetSelectorKindCommand extends BaseSingleEntityCommand<SelectorKind, GetSelectorKindForm> { private final static CommandSecurityDefinition COMMAND_SECURITY_DEFINITION; private final static List<FieldDefinition> FORM_FIELD_DEFINITIONS; static { COMMAND_SECURITY_DEFINITION = new CommandSecurityDefinition(Collections.unmodifiableList(Arrays.asList( new PartyTypeDefinition(PartyTypes.UTILITY.name(), null), new PartyTypeDefinition(PartyTypes.EMPLOYEE.name(), Collections.unmodifiableList(Arrays.asList( new SecurityRoleDefinition(SecurityRoleGroups.SelectorKind.name(), SecurityRoles.Review.name()) ))) ))); FORM_FIELD_DEFINITIONS = Collections.unmodifiableList(Arrays.asList( new FieldDefinition("SelectorKindName", FieldType.ENTITY_NAME, false, null, null), new FieldDefinition("EntityRef", FieldType.ENTITY_REF, false, null, null), new FieldDefinition("Key", FieldType.KEY, false, null, null), new FieldDefinition("Guid", FieldType.GUID, false, null, null), new FieldDefinition("Ulid", FieldType.ULID, false, null, null) )); } /** Creates a new instance of GetSelectorKindCommand */ public GetSelectorKindCommand(UserVisitPK userVisitPK, GetSelectorKindForm form) { super(userVisitPK, form, COMMAND_SECURITY_DEFINITION, FORM_FIELD_DEFINITIONS, true); } @Override protected SelectorKind getEntity() { var selectorKind = SelectorKindLogic.getInstance().getSelectorKindByUniversalSpec(this, form, true); if(selectorKind != null) { sendEvent(selectorKind.getPrimaryKey(), EventTypes.READ, null, null, getPartyPK()); } return selectorKind; } @Override protected BaseResult getTransfer(SelectorKind selectorKind) { var selectorControl = Session.getModelController(SelectorControl.class); var result = SelectorResultFactory.getGetSelectorKindResult(); if(selectorKind != null) { result.setSelectorKind(selectorControl.getSelectorKindTransfer(getUserVisit(), selectorKind)); } return result; } }
[ "rich@echothree.com" ]
rich@echothree.com
efcc620b5af7b24691c043233905d64ad98c7720
7d0945868b491ec90a2018c05ed7f934d797b581
/gordianknot-conf/gordianknot-conf-web/src/main/java/org/gordianknot/conf/web/rest/ConfRestApi.java
b4e8fcf93a399552a002ced4d7eed9b31b93cfad
[]
no_license
agilego99/spring-cloud-aaron
761dc937f5e6504d41b9b5e1e530b0954e6a375a
ba42d96bd40fedaf9bfca80a3777741b4cea0463
refs/heads/master
2022-12-20T11:22:58.250243
2021-02-01T06:05:14
2021-02-01T06:05:14
214,135,914
1
0
null
2022-12-10T03:56:24
2019-10-10T09:02:54
Java
UTF-8
Java
false
false
6,356
java
package org.gordianknot.conf.web.rest; import java.util.Date; import org.apache.commons.lang.StringUtils; import org.gordianknot.conf.web.common.GlobalException; import org.gordianknot.conf.web.common.ParamException; import org.gordianknot.conf.web.common.ResponseData; import org.gordianknot.conf.web.common.ServerException; import org.gordianknot.conf.web.domain.Conf; import org.gordianknot.conf.web.service.ConfService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; /** * 配置信息rest接口 * @author aaron * @date 2019-06-28 */ @RestController public class ConfRestApi { @Autowired private ConfService confService; @GetMapping("/rest/conf/list/{env}") public ResponseData list(@PathVariable("env") String env) throws GlobalException { try { if (StringUtils.isBlank(env)) { throw new ParamException("env not null"); } return ResponseData.ok(confService.list(env)); } catch (Exception e) { throw new ServerException(e.getMessage()); } } @GetMapping("/rest/conf/list/{env}/{systemName}") public ResponseData list(@PathVariable("env") String env, @PathVariable("systemName") String systemName) throws GlobalException { try { if (StringUtils.isBlank(env)) { throw new ParamException("env not null"); } if (StringUtils.isBlank(systemName)) { throw new ParamException("systemName not null"); } return ResponseData.ok(confService.list(env, systemName)); } catch (Exception e) { throw new ServerException(e.getMessage()); } } @GetMapping("/rest/conf/list/{env}/{systemName}/{confFileName}") public ResponseData list(@PathVariable("env") String env, @PathVariable("systemName") String systemName, @PathVariable("confFileName") String confFileName) throws GlobalException { try { if (StringUtils.isBlank(env)) { throw new ParamException("env not null"); } if (StringUtils.isBlank(systemName)) { throw new ParamException("systemName not null"); } if (StringUtils.isBlank(confFileName)) { throw new ParamException("confFileName not null"); } return ResponseData.ok(confService.list(env, systemName, confFileName)); } catch (Exception e) { throw new ServerException(e.getMessage()); } } @GetMapping("/rest/conf/list/{env}/{systemName}/{confFileName}/{key}") public ResponseData list(@PathVariable("env") String env, @PathVariable("systemName") String systemName, @PathVariable("confFileName") String confFileName, @PathVariable("key") String key) throws GlobalException { try { if (StringUtils.isBlank(env)) { throw new ParamException("env not null"); } if (StringUtils.isBlank(systemName)) { throw new ParamException("systemName not null"); } if (StringUtils.isBlank(confFileName)) { throw new ParamException("confFileName not null"); } if (StringUtils.isBlank(key)) { throw new ParamException("key not null"); } return ResponseData.ok(confService.get(env, systemName, confFileName, key)); } catch (Exception e) { throw new ServerException(e.getMessage()); } } @GetMapping("/rest/conf/{id}") public ResponseData get(@PathVariable("id") String id) throws GlobalException { try { if (StringUtils.isBlank(id)) { throw new ParamException("id not null"); } return ResponseData.ok(confService.get(id)); } catch (Exception e) { throw new ServerException(e.getMessage()); } } @PostMapping("/rest/conf") public ResponseData save(@RequestBody Conf conf) throws GlobalException { if (StringUtils.isBlank(conf.getEnv())) { throw new ParamException("env not null"); } if (StringUtils.isBlank(conf.getSystemName())) { throw new ParamException("systemName not null"); } if (StringUtils.isBlank(conf.getConfFileName())) { throw new ParamException("confFileName not null"); } if (StringUtils.isBlank(conf.getKey())) { throw new ParamException("key not null"); } if (conf.getValue() == null) { throw new ParamException("value not null"); } if (StringUtils.isBlank(conf.getDesc())) { throw new ParamException("desc not null"); } conf.setCreateDate(new Date()); conf.setModifyDate(new Date()); confService.save(conf); return ResponseData.ok(); } @PostMapping("/rest/conf/update") public ResponseData redesc(@RequestBody Conf conf) throws GlobalException { if (StringUtils.isBlank(conf.getId())) { throw new ParamException("id not null"); } if (StringUtils.isBlank(conf.getEnv())) { throw new ParamException("env not null"); } if (StringUtils.isBlank(conf.getSystemName())) { throw new ParamException("systemName not null"); } if (StringUtils.isBlank(conf.getConfFileName())) { throw new ParamException("confFileName not null"); } if (StringUtils.isBlank(conf.getKey())) { throw new ParamException("key not null"); } if (conf.getValue() == null) { throw new ParamException("value not null"); } if (StringUtils.isBlank(conf.getDesc())) { throw new ParamException("desc not null"); } conf.setModifyDate(new Date()); confService.save(conf); return ResponseData.ok(); } }
[ "agilego99@gmail.com" ]
agilego99@gmail.com
288e5a864a9877b2ca9f7f769e277d42310105e4
1d4ddeba3ddad4a36063e69d20ec655399497b72
/JavaAyo/src-nutz/org/nutz/dao/DB.java
c13642cb7be45fa0718185e890a6e642de72c2c2
[ "Apache-2.0" ]
permissive
cowthan/JavaWeb
9d09b27de3518f7229a5a2c14c9d6634ce6eff0b
6431f9c11608a99b16e46f0fd112872ef825656b
refs/heads/master
2022-12-25T02:37:54.841615
2019-06-27T14:12:15
2019-06-27T14:12:15
112,908,445
0
0
Apache-2.0
2022-12-16T00:44:25
2017-12-03T07:22:09
Java
UTF-8
Java
false
false
630
java
package org.nutz.dao; /** * 列出了 Nutz.Dao 支持的数据库类型 * * @author zozoh(zozohtnt@gmail.com) */ public enum DB { /** * IBM DB2 */ DB2, /** * Postgresql */ PSQL, /** * Oracle */ ORACLE, /** * MS-SqlServer */ SQLSERVER, /** * MySql */ MYSQL, /** * H2Database */ H2, /** * SQLITE */ SQLITE, /** * */ HSQL, /** * */ DERBY, /** * */ GBASE, /** * */ SYBASE, /** * 其他数据库 */ OTHER }
[ "cowthan@163.com" ]
cowthan@163.com
e969c1f11d732353bbb35bbfd7d2a3e0cebdfa56
4a7dccf38e0c106fd4da00e96ac972c2a76ae1ed
/gerrit-server/src/main/java/com/google/gerrit/server/git/strategy/CherryPick.java
c0d96c94369e1355af659185485a2fc257a595e8
[ "Apache-2.0" ]
permissive
power9li/gerrit-mirro
22fb54b4b42fb633e356513209f7c10c8bb4eab5
d33d4104ea38cb27e66b72a3aac1f37bc785582e
refs/heads/master
2022-12-22T13:52:18.433071
2016-10-14T06:57:59
2016-10-14T06:57:59
70,809,607
0
2
Apache-2.0
2022-12-10T22:01:23
2016-10-13T13:31:42
Java
UTF-8
Java
false
false
8,022
java
// Copyright (C) 2012 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.gerrit.server.git.strategy; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.gerrit.server.git.strategy.CommitMergeStatus.SKIPPED_IDENTICAL_TREE; import com.google.common.collect.ImmutableList; import com.google.gerrit.extensions.restapi.MergeConflictException; import com.google.gerrit.reviewdb.client.PatchSet; import com.google.gerrit.reviewdb.client.PatchSetInfo; import com.google.gerrit.server.ChangeUtil; import com.google.gerrit.server.git.BatchUpdate.ChangeContext; import com.google.gerrit.server.git.BatchUpdate.RepoContext; import com.google.gerrit.server.git.CodeReviewCommit; import com.google.gerrit.server.git.IntegrationException; import com.google.gerrit.server.git.MergeIdenticalTreeException; import com.google.gerrit.server.git.MergeTip; import com.google.gerrit.server.project.NoSuchChangeException; import com.google.gwtorm.server.OrmException; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.transport.ReceiveCommand; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; public class CherryPick extends SubmitStrategy { CherryPick(SubmitStrategy.Arguments args) { super(args); } @Override public List<SubmitStrategyOp> buildOps( Collection<CodeReviewCommit> toMerge) throws IntegrationException { List<CodeReviewCommit> sorted = CodeReviewCommit.ORDER.sortedCopy(toMerge); List<SubmitStrategyOp> ops = new ArrayList<>(sorted.size()); boolean first = true; while (!sorted.isEmpty()) { CodeReviewCommit n = sorted.remove(0); if (first && args.mergeTip.getInitialTip() == null) { ops.add(new FastForwardOp(args, n)); } else if (n.getParentCount() == 0) { ops.add(new CherryPickRootOp(n)); } else if (n.getParentCount() == 1) { ops.add(new CherryPickOneOp(n)); } else { ops.add(new CherryPickMultipleParentsOp(n)); } first = false; } return ops; } private class CherryPickRootOp extends SubmitStrategyOp { private CherryPickRootOp(CodeReviewCommit toMerge) { super(CherryPick.this.args, toMerge); } @Override public void updateRepoImpl(RepoContext ctx) { // Refuse to merge a root commit into an existing branch, we cannot obtain // a delta for the cherry-pick to apply. toMerge.setStatusCode(CommitMergeStatus.CANNOT_CHERRY_PICK_ROOT); } } private class CherryPickOneOp extends SubmitStrategyOp { private PatchSet.Id psId; private CodeReviewCommit newCommit; private PatchSetInfo patchSetInfo; private CherryPickOneOp(CodeReviewCommit toMerge) { super(CherryPick.this.args, toMerge); } @Override protected void updateRepoImpl(RepoContext ctx) throws IntegrationException, IOException { // If there is only one parent, a cherry-pick can be done by taking the // delta relative to that one parent and redoing that on the current merge // tip. args.rw.parseBody(toMerge); psId = ChangeUtil.nextPatchSetId( args.repo, toMerge.change().currentPatchSetId()); String cherryPickCmtMsg = args.mergeUtil.createCherryPickCommitMessage(toMerge); PersonIdent committer = args.caller.newCommitterIdent( ctx.getWhen(), args.serverIdent.getTimeZone()); try { newCommit = args.mergeUtil.createCherryPickFromCommit( args.repo, args.inserter, args.mergeTip.getCurrentTip(), toMerge, committer, cherryPickCmtMsg, args.rw, 0); } catch (MergeConflictException mce) { // Keep going in the case of a single merge failure; the goal is to // cherry-pick as many commits as possible. toMerge.setStatusCode(CommitMergeStatus.PATH_CONFLICT); return; } catch (MergeIdenticalTreeException mie) { toMerge.setStatusCode(SKIPPED_IDENTICAL_TREE); return; } // Initial copy doesn't have new patch set ID since change hasn't been // updated yet. newCommit = amendGitlink(newCommit); newCommit.copyFrom(toMerge); newCommit.setPatchsetId(psId); newCommit.setStatusCode(CommitMergeStatus.CLEAN_PICK); args.mergeTip.moveTipTo(newCommit, newCommit); args.commits.put(newCommit); ctx.addRefUpdate( new ReceiveCommand(ObjectId.zeroId(), newCommit, psId.toRefName())); patchSetInfo = args.patchSetInfoFactory.get(ctx.getRevWalk(), newCommit, psId); } @Override public PatchSet updateChangeImpl(ChangeContext ctx) throws OrmException, NoSuchChangeException, IOException { if (newCommit == null && toMerge.getStatusCode() == SKIPPED_IDENTICAL_TREE) { return null; } checkNotNull(newCommit, "no new commit produced by CherryPick of %s, expected to fail fast", toMerge.change().getId()); PatchSet prevPs = args.psUtil.current(ctx.getDb(), ctx.getNotes()); PatchSet newPs = args.psUtil.insert(ctx.getDb(), ctx.getRevWalk(), ctx.getUpdate(psId), psId, newCommit, false, prevPs != null ? prevPs.getGroups() : ImmutableList.<String> of(), null); ctx.getChange().setCurrentPatchSet(patchSetInfo); // Don't copy approvals, as this is already taken care of by // SubmitStrategyOp. newCommit.setControl(ctx.getControl()); return newPs; } } private class CherryPickMultipleParentsOp extends SubmitStrategyOp { private CherryPickMultipleParentsOp(CodeReviewCommit toMerge) { super(CherryPick.this.args, toMerge); } @Override public void updateRepoImpl(RepoContext ctx) throws IntegrationException, IOException { if (args.mergeUtil.hasMissingDependencies(args.mergeSorter, toMerge)) { // One or more dependencies were not met. The status was already marked // on the commit so we have nothing further to perform at this time. return; } // There are multiple parents, so this is a merge commit. We don't want // to cherry-pick the merge as clients can't easily rebase their history // with that merge present and replaced by an equivalent merge with a // different first parent. So instead behave as though MERGE_IF_NECESSARY // was configured. MergeTip mergeTip = args.mergeTip; if (args.rw.isMergedInto(mergeTip.getCurrentTip(), toMerge) && !args.submoduleOp.hasSubscription(args.destBranch)) { mergeTip.moveTipTo(toMerge, toMerge); } else { PersonIdent myIdent = new PersonIdent(args.serverIdent, ctx.getWhen()); CodeReviewCommit result = args.mergeUtil.mergeOneCommit(myIdent, myIdent, args.repo, args.rw, args.inserter, args.destBranch, mergeTip.getCurrentTip(), toMerge); result = amendGitlink(result); mergeTip.moveTipTo(result, toMerge); args.mergeUtil.markCleanMerges(args.rw, args.canMergeFlag, mergeTip.getCurrentTip(), args.alreadyAccepted); } } } static boolean dryRun(SubmitDryRun.Arguments args, CodeReviewCommit mergeTip, CodeReviewCommit toMerge) throws IntegrationException { return args.mergeUtil.canCherryPick(args.mergeSorter, args.repo, mergeTip, args.rw, toMerge); } }
[ "power9li@github.com" ]
power9li@github.com
0f4b16429986d4ae48400acbc897844a027abf6f
6811fd178ae01659b5d207b59edbe32acfed45cc
/jira-project/jira-components/jira-api/src/main/java/com/atlassian/jira/project/version/Version.java
4db074db370420291abaf72c62ab9244fc20cb1b
[]
no_license
xiezhifeng/mysource
540b09a1e3c62614fca819610841ddb73b12326e
44f29e397a6a2da9340a79b8a3f61b3d51e331d1
refs/heads/master
2023-04-14T00:55:23.536578
2018-04-19T11:08:38
2018-04-19T11:08:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,118
java
/* * Created by IntelliJ IDEA. * User: Mike * Date: Aug 10, 2004 * Time: 12:29:39 PM */ package com.atlassian.jira.project.version; import com.atlassian.annotations.PublicApi; import com.atlassian.jira.ofbiz.OfBizValueWrapper; import com.atlassian.jira.project.Project; import com.atlassian.jira.project.ProjectConstant; import com.atlassian.jira.util.NamedWithDescription; import org.ofbiz.core.entity.GenericValue; import javax.annotation.Nullable; import java.util.Date; @PublicApi public interface Version extends OfBizValueWrapper, ProjectConstant, NamedWithDescription { /** * Returns Project as a GenericValue. * @return Project as a GenericValue. * * @deprecated Please use {@link #getProjectObject()}. Since v4.0 */ GenericValue getProject(); /** * Returns the ID of the project that this version belongs to. * * @return the ID of the project that this version belongs to. * @since v5.2 */ Long getProjectId(); /** * Returns project this version relates to. * * @return project domain object * @since v3.10 */ Project getProjectObject(); Long getId(); String getName(); void setName(String name); @Nullable String getDescription(); void setDescription(@Nullable String description); Long getSequence(); void setSequence(Long sequence); boolean isArchived(); void setArchived(boolean archived); boolean isReleased(); void setReleased(boolean released); @Nullable Date getReleaseDate(); void setReleaseDate(@Nullable Date releasedate); /** * Returns the start date of the version * * @return The start date of the version * * @since v6.0 */ @Nullable Date getStartDate(); /** * Sets the start date of the version * * @param startDate The start date of the version * * @since v6.0 */ void setStartDate(@Nullable Date startDate); /** * @return a clone of this version including a cloned generic value * @since v7.0 */ Version clone(); }
[ "moink635@gmail.com" ]
moink635@gmail.com
383999b1e93e119ab6a0ffd96e6a363786402c2f
cca87c4ade972a682c9bf0663ffdf21232c9b857
/com/tencent/mm/ipcinvoker/wx_extension/d.java
b55a24d9bdb1c50b372bc72c634bf429130bfc2f
[]
no_license
ZoranLi/wechat_reversing
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
refs/heads/master
2021-07-05T01:17:20.533427
2017-09-25T09:07:33
2017-09-25T09:07:33
104,726,592
12
1
null
null
null
null
UTF-8
Java
false
false
1,950
java
package com.tencent.mm.ipcinvoker.wx_extension; import android.content.Context; import com.tencent.mm.ipcinvoker.a.c; import com.tencent.mm.ipcinvoker.f.1; import com.tencent.mm.ipcinvoker.wx_extension.service.MainProcessIPCService; import com.tencent.mm.ipcinvoker.wx_extension.service.SupportProcessIPCService; import com.tencent.mm.ipcinvoker.wx_extension.service.ToolsProcessIPCService; import com.tencent.mm.kernel.b.b; import com.tencent.mm.kernel.b.f; import com.tencent.mm.kernel.h; import com.tencent.mm.sdk.platformtools.ab; import com.tencent.mm.sdk.platformtools.w; import junit.framework.Assert; public final class d implements b { private static final class a { public static final d gWz = new d(); } public d() { Context context = ((f) h.vF().vj()).gZz; com.tencent.mm.ipcinvoker.a.b anonymousClass1 = new com.tencent.mm.ipcinvoker.a.a(this) { final /* synthetic */ d gWy; { this.gWy = r1; } public final void a(com.tencent.mm.ipcinvoker.a.d dVar) { super.a(dVar); dVar.a(new c()); dVar.a(new a()); } public final void a(c cVar) { cVar.a("com.tencent.mm", MainProcessIPCService.class); cVar.a("com.tencent.mm:tools", ToolsProcessIPCService.class); cVar.a("com.tencent.mm:support", SupportProcessIPCService.class); } }; Assert.assertNotNull(context); com.tencent.mm.ipcinvoker.d.gVO = context; anonymousClass1.a(new 1()); anonymousClass1.a(com.tencent.mm.ipcinvoker.b.un()); w.i("IPC.IPCInvokerBoot", "setup IPCInvoker(process : %s, application : %s)", new Object[]{com.tencent.mm.ipcinvoker.d.up(), Integer.valueOf(context.hashCode())}); if (ab.bJd()) { com.tencent.mm.ipcinvoker.f.dT("com.tencent.mm:tools"); } } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
bf0bc4c69a4a8be03ee497ce022ed37a72cc6a1e
be535c3eae2da830c3d4cbe7374ec9c057e99840
/soru1-strategy-pattern/src/com/mimaraslan/connection/Letter.java
c9e580a26a450096b66bc421058585c9dcd1242a
[]
no_license
mimaraslan/java-design-patterns
6a3ec450deafa3ad300375bde86ee514ef32ab25
2612204eb159c91c3eebc14e01d67b9e06bd2079
refs/heads/master
2022-10-06T11:19:49.080076
2020-06-05T11:08:44
2020-06-05T11:08:44
255,294,278
1
0
null
null
null
null
UTF-8
Java
false
false
200
java
package com.mimaraslan.connection; import com.mimaraslan.Communicate; public class Letter implements Communicate { @Override public void connect() { System.out.println("Letter"); } }
[ "mimaraslan@gmail.com" ]
mimaraslan@gmail.com
0117cb87cfcb1a77bebe05d0ef71d7b45efb5671
7cee584d730d6acc88ef57eb75de9461830dbaf1
/techtribes-web/src/je/techtribes/component/social/AutomaticConnectionSignUp.java
e99af598bb58be3e51a926aab8cd1efe39292d8a
[ "Apache-2.0" ]
permissive
ajambor/techtribesje
9298c56746bb8f7113d58caa72e3c04e8ebba59d
82ff86834a06f728be35759e6aa7612ed59699c2
refs/heads/master
2020-09-15T09:21:47.415708
2013-07-04T20:56:40
2013-07-04T20:56:40
11,199,943
1
1
null
null
null
null
UTF-8
Java
false
false
1,180
java
package je.techtribes.component.social; import je.techtribes.component.AbstractComponent; import je.techtribes.component.contentsource.ContentSourceComponent; import org.springframework.social.connect.Connection; import org.springframework.social.connect.ConnectionSignUp; import org.springframework.social.connect.UserProfile; public class AutomaticConnectionSignUp extends AbstractComponent implements ConnectionSignUp { private ContentSourceComponent contentSourceComponent; public void setContentSourceComponent(ContentSourceComponent contentSourceComponent) { this.contentSourceComponent = contentSourceComponent; } @Override public String execute(Connection<?> connection) { UserProfile profile = connection.fetchUserProfile(); if (contentSourceComponent.findByTwitterId(profile.getUsername()) != null) { logInfo("Automatically signing up twitter ID " + profile.getUsername()); return profile.getUsername(); } else { logWarn("Somebody tried to sign-in with a Twitter ID of " + profile.getUsername() + " but we're not following them"); return null; } } }
[ "simon.brown@codingthearchitecture.com" ]
simon.brown@codingthearchitecture.com
1145005a2affa22874de94893fbaab385d665d8b
99c15f827bbd9d49e76eb3c3d26a718d9d8977b5
/src/main/java/io/github/jhipster/application/config/AsyncConfiguration.java
3702028fed45d0249c2158bb7562b79e9a1047d4
[]
no_license
jk9941/project
3f8ed40b7515ae01e45026ef529098b875e1dd87
1aa5796e72a25a6a9d54e0b90a37108ec7f47e6e
refs/heads/master
2020-03-27T23:30:47.805540
2018-09-04T09:44:52
2018-09-04T09:44:52
147,323,580
0
0
null
null
null
null
UTF-8
Java
false
false
1,789
java
package io.github.jhipster.application.config; import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor; import io.github.jhipster.config.JHipsterProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.*; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import java.util.concurrent.Executor; @Configuration @EnableAsync @EnableScheduling public class AsyncConfiguration implements AsyncConfigurer { private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); private final JHipsterProperties jHipsterProperties; public AsyncConfiguration(JHipsterProperties jHipsterProperties) { this.jHipsterProperties = jHipsterProperties; } @Override @Bean(name = "taskExecutor") public Executor getAsyncExecutor() { log.debug("Creating Async Task Executor"); ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize()); executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize()); executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity()); executor.setThreadNamePrefix("project-Executor-"); return new ExceptionHandlingAsyncTaskExecutor(executor); } @Override public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { return new SimpleAsyncUncaughtExceptionHandler(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
5a972e4454518d6dc391e9b0ef8e07da7c35ce46
a7cbcd1b7d8334f104d93d09c352b494c8db3433
/Client/src/pixelmon/Pokemon/EntityCharmeleon.java
e4d60eee5d2071fb12da3aa50cb150932399dd7b
[]
no_license
dretax/PixelmonOld
7472119a6af8e8552d46b887eda8d9d141b085fc
e200bcf070168f981da74c557c1d35660a6aa6f5
refs/heads/master
2021-01-15T22:04:33.031068
2012-07-15T22:29:43
2012-07-15T22:29:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
621
java
package pixelmon.Pokemon; import pixelmon.entities.BaseEntityPixelmon; import pixelmon.entities.EntityGroundPixelmon; import net.minecraft.src.*; public class EntityCharmeleon extends EntityGroundPixelmon { public EntityCharmeleon(World world) { super(world); texture = "/pixelmon/image/charmeleon.png"; init(); } public void init() { name = "Charmeleon"; isImmuneToFire = true; super.init(); this.litUp = true; this.litLevel = 45; } public void evolve() { BaseEntityPixelmon entity = new EntityCharizard(worldObj); helper.evolve(entity.helper); } }
[ "malc.geddes@gmail.com" ]
malc.geddes@gmail.com
f48f19589dc9d058a9fb1f6753c36a873c927a1f
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/mapstruct/learning/2784/Services.java
0133dc3ca13a6e62f4ec26950c9d1f620e4e9413
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
952
java
/* * Copyright MapStruct Authors. * * Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ package org.mapstruct.ap.internal.util; import java.util.Iterator; import java.util.ServiceLoader; /** * A simple locator for SPI implementations. * * @author Christian Schuster */ public class Services { private Services() { } public static <T> T get(Class<T> serviceType, T defaultValue) { Iterator<T> services = ServiceLoader.load( serviceType, Services.class.getClassLoader() ).iterator(); T result; if ( services.hasNext() ) { result = services.next(); } else { result = defaultValue; } if ( services.hasNext() ) { throw new IllegalStateException( "Multiple implementations have been found for the service provider interface" ); } return result; } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
dbb57d113a47ef01b2e5157899574614c9cb65aa
9358108f386b8c718f10c0150043f3af60e64712
/integrella-microservices-producer-fpml/src/main/java/com/integrella/fpML/schema/BusinessEventIdentifier.java
ccdb8b2dcba85892b105ef4dea6e26347b4c3ff7
[]
no_license
kashim-git/integrella-microservices
6148b7b1683ff6b787ff5d9dba7ef0b15557caa4
f92d6a2ea818267364f90f2f1b2d373fbab37cfc
refs/heads/master
2021-01-20T02:53:03.118896
2017-04-28T13:31:55
2017-04-28T13:31:55
89,459,083
0
0
null
null
null
null
UTF-8
Java
false
false
4,312
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.04.26 at 04:37:38 PM BST // package com.integrella.fpML.schema; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlID; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * A type defining an event identifier issued by the indicated party. * * <p>Java class for BusinessEventIdentifier complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="BusinessEventIdentifier"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;group ref="{http://www.fpml.org/FpML-5/master}PartyAndAccountReferences.model"/> * &lt;element name="eventId" type="{http://www.fpml.org/FpML-5/master}EventId" minOccurs="0"/> * &lt;/sequence> * &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BusinessEventIdentifier", propOrder = { "partyReference", "accountReference", "eventId" }) @XmlSeeAlso({ BusinessEventGroupIdentifier.class }) public class BusinessEventIdentifier { protected PartyReference partyReference; protected AccountReference accountReference; protected EventId eventId; @XmlAttribute(name = "id") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID @XmlSchemaType(name = "ID") protected String id; /** * Gets the value of the partyReference property. * * @return * possible object is * {@link PartyReference } * */ public PartyReference getPartyReference() { return partyReference; } /** * Sets the value of the partyReference property. * * @param value * allowed object is * {@link PartyReference } * */ public void setPartyReference(PartyReference value) { this.partyReference = value; } /** * Gets the value of the accountReference property. * * @return * possible object is * {@link AccountReference } * */ public AccountReference getAccountReference() { return accountReference; } /** * Sets the value of the accountReference property. * * @param value * allowed object is * {@link AccountReference } * */ public void setAccountReference(AccountReference value) { this.accountReference = value; } /** * Gets the value of the eventId property. * * @return * possible object is * {@link EventId } * */ public EventId getEventId() { return eventId; } /** * Sets the value of the eventId property. * * @param value * allowed object is * {@link EventId } * */ public void setEventId(EventId value) { this.eventId = value; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } }
[ "Kashim@192.168.47.69" ]
Kashim@192.168.47.69
de9fbab6d564b29263ee5ab08c714e3b2b475271
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_5d2f052c99f82f45abc6aecd6e04c27b363194a8/RouteNode/6_5d2f052c99f82f45abc6aecd6e04c27b363194a8_RouteNode_t.java
4733631fb156d4b25ea5a917d646652f1bfd0f0f
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,333
java
/* * Copyright (C) 2008 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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. * * Create date: 07-Jul-2008 */ package uk.me.parabola.imgfmt.app.net; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import uk.me.parabola.imgfmt.app.Coord; import uk.me.parabola.imgfmt.app.CoordNode; import uk.me.parabola.imgfmt.app.ImgFileWriter; import uk.me.parabola.log.Logger; /** * A routing node with its connections to other nodes via roads. * * @author Steve Ratcliffe */ public class RouteNode { private static final Logger log = Logger.getLogger(RouteNode.class); /* * 1. instantiate * 2. setCoord, addArc * arcs, coords set * 3. write * node offsets set in all nodes * 4. writeSecond */ // Values for the first flag byte at offset 1 private static final int F_BOUNDARY = 0x08; private static final int F_RESTRICTIONS = 0x10; private static final int F_LARGE_OFFSETS = 0x20; private static final int F_UNK_NEEDED = 0x44; // XXX private int offsetNod1 = -1; @Deprecated private final int nodeId; // XXX not needed at this point? // arcs from this node private final List<RouteArc> arcs = new ArrayList<RouteArc>(); // restrictions at (via) this node private final List<RouteRestriction> restrictions = new ArrayList<RouteRestriction>(); private int flags = F_UNK_NEEDED; private final CoordNode coord; private char latOff; private char lonOff; // this is for setting destination class on arcs // we're taking the maximum of roads this node is // on for now -- unsure of precise mechanic private int nodeClass; @Deprecated private static int nodeCount; @Deprecated public RouteNode(Coord coord) { this.coord = (CoordNode) coord; nodeId = nodeCount++; // XXX: take coord.getId() instead? setBoundary(this.coord.isBoundary()); } private boolean haveLargeOffsets() { return (flags & F_LARGE_OFFSETS) != 0; } private boolean haveRestrictions() { return !restrictions.isEmpty(); } protected void setBoundary(boolean b) { if (b) flags |= F_BOUNDARY; else flags &= (~F_BOUNDARY) & 0xff; } public boolean isBoundary() { return (flags & F_BOUNDARY) != 0; } public void addArc(RouteArc arc) { if (!arcs.isEmpty()) arc.setNewDir(); arcs.add(arc); int cl = arc.getRoadDef().getRoadClass(); log.debug("adding arc", arc.getRoadDef(), cl); if (cl > nodeClass) nodeClass = cl; } public void addRestriction(RouteRestriction restr) { restrictions.add(restr); flags |= F_RESTRICTIONS; } /** * Provide an upper bound to the size (in bytes) that * writing this node will take. * * Should be called only after arcs and restrictions * have been set. The size of arcs depends on whether * or not they are internal to the RoutingCenter. */ public int boundSize() { return 1 + 1 + (haveLargeOffsets() ? 4 : 3) + arcsSize() + restrSize(); } private int arcsSize() { int s = 0; for (RouteArc arc : arcs) { s += arc.boundSize(); } return s; } private int restrSize() { return 2*restrictions.size(); } /** * Writes a nod1 entry. */ public void write(ImgFileWriter writer) { log.debug("writing node, first pass, nod1", nodeId); offsetNod1 = writer.position(); assert offsetNod1 < 0x1000000 : "node offset doesn't fit in 3 bytes"; writer.put((byte) 0); // will be overwritten later writer.put((byte) flags); if (haveLargeOffsets()) { writer.putInt((latOff << 16) | (lonOff & 0xffff)); } else { writer.put3((latOff << 12) | (lonOff & 0xfff)); } if (!arcs.isEmpty()) { arcs.get(arcs.size() - 1).setLast(); for (RouteArc arc : arcs) arc.write(writer); } if (!restrictions.isEmpty()) { restrictions.get(restrictions.size() - 1).setLast(); for (RouteRestriction restr : restrictions) restr.writeOffset(writer); } } /** * Writes a nod3 entry. */ public void writeNod3(ImgFileWriter writer) { assert isBoundary() : "trying to write nod3 for non-boundary node"; writer.put3(coord.getLongitude()); writer.put3(coord.getLatitude()); writer.put3(offsetNod1); } public int getOffsetNod1() { assert offsetNod1 != -1: "failed for node " + nodeId; return offsetNod1; } public void setOffsets(Coord centralPoint) { log.debug("center", centralPoint, ", coord", coord.toDegreeString()); setLatOff(coord.getLatitude() - centralPoint.getLatitude()); setLonOff(coord.getLongitude() - centralPoint.getLongitude()); } public Coord getCoord() { return coord; } private void checkOffSize(int off) { if (off > 0x7ff || off < -0x800) // does off fit in signed 12 bit quantity? flags |= F_LARGE_OFFSETS; // does off fit in signed 16 bit quantity? assert (off <= 0x7fff && off >= -0x8000); } private void setLatOff(int latOff) { log.debug("lat off", Integer.toHexString(latOff)); this.latOff = (char) latOff; checkOffSize(latOff); } private void setLonOff(int lonOff) { log.debug("long off", Integer.toHexString(lonOff)); this.lonOff = (char) lonOff; checkOffSize(lonOff); } /** * Second pass over the nodes. Fill in pointers and Table A indices. */ public void writeSecond(ImgFileWriter writer) { for (RouteArc arc : arcs) arc.writeSecond(writer); } /** * Return the node's class, which is the maximum of * classes of the roads it's on. */ public int getNodeClass() { return nodeClass; } public Iterable<? extends RouteArc> arcsIteration() { return new Iterable<RouteArc>() { public Iterator<RouteArc> iterator() { return arcs.iterator(); } }; } public List<RouteRestriction> getRestrictions() { return restrictions; } public String toString() { return nodeId + ""; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e69e336fbe4cf739d90c965b7d954ee16d6267cc
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/4/org/jfree/chart/renderer/xy/XYBarRenderer_findRangeBounds_1196.java
7b4530bf5cc5ee7725f7ce037e0b544889de5895
[]
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,976
java
org jfree chart render render draw bar link plot xyplot requir link interv dataset intervalxydataset shown gener code bar chart demo1 xybarchartdemo1 java code program includ free chart jfreechart demo collect img src imag bar render sampl xybarrenderersampl png alt bar render sampl xybarrenderersampl png bar render xybarrender abstract item render abstractxyitemrender return lower upper bound rang valu dataset render plot interv dataset account rang param dataset dataset code code permit rang code code dataset code code empti rang find rang bound findrangebound dataset xydataset dataset dataset dataset util datasetutil find rang bound findrangebound dataset interv useyinterv
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
77ec80033ef9a2c5146424a2d642ee910efa8171
f378ddd47c8b7de6e9cf1d4228c84f73e9dc59f1
/projetos/Powerbot-Web/pathfinding/web/components/actions/WebAction.java
36d034a652732603096e202774e67fe5da0f295e
[]
no_license
charles-marques/dataset-375
29e2f99ac1ba323f8cb78bf80107963fc180487c
51583daaf58d5669c69d8208b8c4ed4e009001a5
refs/heads/master
2023-01-20T07:23:09.445693
2020-11-27T22:35:49
2020-11-27T22:35:49
283,315,149
0
1
null
null
null
null
UTF-8
Java
false
false
2,729
java
package pathfinding.web.components.actions; import org.powerbot.game.api.ActiveScript; import org.powerbot.game.api.methods.Calculations; import org.powerbot.game.api.methods.Walking; import org.powerbot.game.api.methods.interactive.Players; import org.powerbot.game.api.util.Time; import org.powerbot.game.api.util.Timer; import org.powerbot.game.api.wrappers.Tile; import org.powerbot.game.api.wrappers.map.Path; import org.powerbot.game.api.wrappers.node.SceneObject; import org.powerbot.game.bot.Context; /** * Author: Tom * Date: 11/06/12 * Time: 23:25 */ public abstract class WebAction { protected WebAction(final String name, final Tile source, final Tile target) { this.name = name; this.source = source; this.target = target; } protected final Tile source; protected final Tile target; protected final String name; public abstract boolean canDoAction(); public abstract boolean doAction(); public abstract double getCost(); public Tile getSource() { return source; } public Tile getTarget() { return target; } public boolean clickSceneEntity(SceneObject io, String action, String name) { Timer failSafe = new Timer(10000); ActiveScript script = Context.get().getActiveScript(); if (script == null) { return false; } while (script.isRunning() && failSafe.isRunning()) { if (io.isOnScreen()) { if (io.interact(action, name)) { for (int i = 0; i < 10; i++) { if (Players.getLocal().getAnimation() == -1) { break; } Time.sleep(100, 300); } return true; } } else { if (Players.getLocal().isMoving()) { Time.sleep(100, 300); } else { Walking.walk(io); for (int i = 0; i < 10; i++) { if (Players.getLocal().isMoving()) { break; } Time.sleep(100, 300); } } } } return false; } public boolean walkToTile(Tile target) { Timer failSafe = new Timer(30000); ActiveScript script = Context.get().getActiveScript(); if (script == null) { return false; } Path p = Walking.findPath(target); while (script.isRunning() && failSafe.isRunning()) { if (!Players.getLocal().isMoving() || (Calculations.distanceTo(Walking.getDestination()) < 8 && Calculations.distance(Walking.getDestination(), target) > 5)) { if (p == null || !p.validate()) { Walking.walk(target); p = Walking.findPath(target); } else { p.traverse(); } } Time.sleep(200, 500); if (Calculations.distanceTo(target) < 5) { return true; } } return false; } @Override public String toString() { return name; } }
[ "suporte@localhost.localdomain" ]
suporte@localhost.localdomain
c8a50fd55f826f930272bcc1709d9f7a6fe94454
7396a56d1f6c61b81355fc6cb034491b97feb785
/lang_interface/java/com/intel/daal/algorithms/multi_class_classifier/Parameter.java
8e43a77a90d9dd3edd943fe9f3691cf325fe8e6e
[ "Apache-2.0", "Intel" ]
permissive
francktcheng/daal
0ad1703be1e628a5e761ae41d2d9f8c0dde7c0bc
875ddcc8e055d1dd7e5ea51e7c1b39886f9c7b79
refs/heads/master
2018-10-01T06:08:39.904147
2017-09-20T22:37:02
2017-09-20T22:37:02
119,408,979
0
0
null
2018-01-29T16:29:51
2018-01-29T16:29:51
null
UTF-8
Java
false
false
4,896
java
/* file: Parameter.java */ /******************************************************************************* * Copyright 2014-2017 Intel Corporation * All Rights Reserved. * * If this software was obtained under the Intel Simplified Software License, * the following terms apply: * * The source code, information and material ("Material") contained herein is * owned by Intel Corporation or its suppliers or licensors, and title to such * Material remains with Intel Corporation or its suppliers or licensors. The * Material contains proprietary information of Intel or its suppliers and * licensors. The Material is protected by worldwide copyright laws and treaty * provisions. No part of the Material may be used, copied, reproduced, * modified, published, uploaded, posted, transmitted, distributed or disclosed * in any way without Intel's prior express written permission. No license under * any patent, copyright or other intellectual property rights in the Material * is granted to or conferred upon you, either expressly, by implication, * inducement, estoppel or otherwise. Any license under such intellectual * property rights must be express and approved by Intel in writing. * * Unless otherwise agreed by Intel in writing, you may not remove or alter this * notice or any other notice embedded in Materials by Intel or Intel's * suppliers or licensors in any way. * * * If this software was obtained under the Apache License, Version 2.0 (the * "License"), the following terms apply: * * You may not use this file except in compliance with the License. You may * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * limitations under the License. *******************************************************************************/ /** * @ingroup multi_class_classifier * @{ */ /** * @brief Contains classes for computing the results of the multi-class classifier */ package com.intel.daal.algorithms.multi_class_classifier; import com.intel.daal.services.DaalContext; /** * <a name="DAAL-CLASS-ALGORITHMS__MULTI_CLASS_CLASSIFIER__PARAMETER"></a> * @brief Parameters of the multi-class classifier algorithm */ public class Parameter extends com.intel.daal.algorithms.classifier.Parameter { public Parameter(DaalContext context, long cObject) { super(context); this.cObject = cObject; } /** * Sets maximum number of iterations of the multi-class classifier training algorithm * @param nIter Maximum number of iterations of the multi-class classifier training algorithm */ public void setNIter(long nIter) { cSetNIter(this.cObject, nIter); } /** * Retrieves maximum number of iterations of the multi-class classifier training algorithm * @return Maximum number of iterations of the multi-class classifier training algorithm */ public long getNIter() { return cGetNIter(this.cObject); } /** * Sets convergence threshold of the multi-class classifier training algorithm * @param eps Convergence threshold of the multi-class classifier training algorithm */ public void setEps(double eps) { cSetEps(this.cObject, eps); } /** * Retrieves convergence threshold of the multi-class classifier training algorithm * @return Convergence threshold of the multi-class classifier training algorithm */ public double getEps() { return cGetEps(this.cObject); } /** * Sets algorithm for two class classifier model training * @param training Algorithm for two class classifier model training */ public void setTraining(com.intel.daal.algorithms.classifier.training.TrainingBatch training) { cSetTraining(this.cObject, training.cObject); } /** * Sets algorithm for prediction based on two class classifier model * @param prediction Algorithm for prediction based on two class classifier model */ public void setPrediction(com.intel.daal.algorithms.classifier.prediction.PredictionBatch prediction) { cSetPrediction(this.cObject, prediction.cObject); } private native void cSetNIter(long parAddr, long nIter); private native long cGetNIter(long parAddr); private native void cSetEps(long parAddr, double eps); private native double cGetEps(long parAddr); private native void cSetTraining(long parAddr, long trainingAddr); private native void cSetPrediction(long parAddr, long predictionAddr); } /** @} */
[ "vasily.rubtsov@intel.com" ]
vasily.rubtsov@intel.com
908677d68896467cab7f677b34cd37a362dc2194
62a5c8d3ea75a624064e78fc484a9230c342e294
/src/main/java/nom/tam/util/TruncationException.java
bc51403756ff6446bb1b9a102a2221d55272381b
[]
no_license
stargaser/nom-tam-fits
c96499e1913be89edc1ee5cb9c5c1a370d362428
7885275caf7af42d6c2af44548ea51268a8b9f2d
refs/heads/master
2021-01-17T21:37:19.605427
2015-02-21T07:05:52
2015-02-21T07:05:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,601
java
package nom.tam.util; /* * #%L * nom.tam FITS library * %% * Copyright (C) 2004 - 2015 nom-tam-fits * %% * This is free and unencumbered software released into the public domain. * * Anyone is free to copy, modify, publish, use, compile, sell, or * distribute this software, either in source code form or as a compiled * binary, for any purpose, commercial or non-commercial, and by any * means. * * In jurisdictions that recognize copyright laws, the author or authors * of this software dedicate any and all copyright interest in the * software to the public domain. We make this dedication for the benefit * of the public at large and to the detriment of our heirs and * successors. We intend this dedication to be an overt act of * relinquishment in perpetuity of all present and future rights to this * software under copyright law. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * #L% */ public class TruncationException extends Exception { /** * */ private static final long serialVersionUID = 1L; public TruncationException() { super(); } public TruncationException(String msg) { super(msg); } }
[ "ritchie@gmx.at" ]
ritchie@gmx.at
bb8a4aa23369127baed3195700b7c8082a2226ac
2f715412efec02b819e6beb344d8104cbf7e55f2
/mall-admin-pms/pms-server/src/main/java/com/mtcarpenter/mall/dao/PmsProductVertifyRecordDao.java
030d2f1d18935c0a08eaff947ff78a5a924d9a9b
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
dream0708/mall-cloud-alibaba
d3b42a10e05069e90d3057a84b04e5c8d5826895
a62ce395c7cb20234770fa7f988b3f249865534e
refs/heads/master
2023-07-09T07:50:15.373660
2021-08-11T00:37:17
2021-08-11T00:37:17
286,628,573
0
0
Apache-2.0
2020-08-11T02:43:05
2020-08-11T02:43:04
null
UTF-8
Java
false
false
400
java
package com.mtcarpenter.mall.dao; import com.mtcarpenter.mall.model.PmsProductVertifyRecord; import org.apache.ibatis.annotations.Param; import java.util.List; /** * 自定义商品审核日志管理Dao * Created by macro on 2018/4/27. */ public interface PmsProductVertifyRecordDao { /** * 批量创建 */ int insertList(@Param("list") List<PmsProductVertifyRecord> list); }
[ "dreamlixc@163.com" ]
dreamlixc@163.com
95baf3398be6dd4c987ce0ab2caf3a890d57a2d0
5312ec3caf7aa02968a7b0899f0ad4c8bc155674
/kripton-processor/src/test/java/bind/feature/namespace/case1/TestCompileCase1.java
e287b9defbd896b78f7c79c7e4198a4fa6b4a2dd
[ "Apache-2.0" ]
permissive
xcesco/kripton
90657215d5e4a37f694c82fbd25a4691091e2c65
1995bf462677d7de993c50de31f01c9e5f13603f
refs/heads/master
2023-01-21T20:28:29.373376
2023-01-04T14:57:00
2023-01-04T14:57:00
31,342,939
134
19
Apache-2.0
2023-01-04T14:57:01
2015-02-26T00:24:15
Java
UTF-8
Java
false
false
1,410
java
/******************************************************************************* * Copyright 2015, 2017 Francesco Benincasa (info@abubusoft.com). * * 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 bind.feature.namespace.case1; import java.io.IOException; import org.junit.Test; import bind.AbstractBindTypeProcessorTest; /** * The Class TestCompileTest3. */ public class TestCompileCase1 extends AbstractBindTypeProcessorTest { /** * Test compile. * * @throws IOException Signals that an I/O exception has occurred. * @throws InstantiationException the instantiation exception * @throws IllegalAccessException the illegal access exception */ @Test public void testCompile() throws IOException, InstantiationException, IllegalAccessException { buildBindProcessorTest(Person.class); } }
[ "abubusoft@gmail.com" ]
abubusoft@gmail.com
313f3da5d0f41a39c50e3c1bd635e4c0cacf2f4c
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project83/src/main/java/org/gradle/test/performance83_5/Production83_415.java
f19e5a36c6a975bebecb18924bef3f979d56ce15
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance83_5; public class Production83_415 extends org.gradle.test.performance16_5.Production16_415 { private final String property; public Production83_415() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
f35bcdb58f341b08e4f28156bbdd7298b483fb4c
340258e25649dbca09753e4f8e88016412a28638
/twitter-emulation-spring-boot-common-server/src/test/java/acme/twitter/util/TestUtils.java
9765c02129425012c845af21e15e43cb9e0e8a92
[]
no_license
dbelob/twitter-emulation
26529a240c2ef120f790734ba28123943baa09fe
1eda4e9059f1dad6740fcbabd0f2b5d84cec00d6
refs/heads/master
2023-09-01T11:29:14.216033
2023-08-31T09:42:01
2023-08-31T09:42:01
128,667,609
41
13
null
2023-09-14T10:13:24
2018-04-08T17:57:48
Java
UTF-8
Java
false
false
1,598
java
package acme.twitter.util; import org.springframework.core.io.InputStreamResource; import org.springframework.core.io.support.EncodedResource; import org.springframework.jdbc.datasource.init.ScriptUtils; import java.sql.Connection; import java.util.Objects; /** * Methods for testing. */ public class TestUtils { /** * Executes script. * * @param connection connection * @param fileName file name * @param separator statement separator */ public static void executeSqlScript(Connection connection, String fileName, String separator) { System.out.println("fileName: " + fileName); System.out.println("TestUtils.class.getResourceAsStream(fileName): " + TestUtils.class.getResourceAsStream(fileName)); System.out.println("TestUtils.class.getResourceAsStream(/clean-h2.sql): " + TestUtils.class.getResourceAsStream("/clean-h2.sql")); ScriptUtils.executeSqlScript( connection, new EncodedResource(new InputStreamResource(Objects.requireNonNull(TestUtils.class.getResourceAsStream(fileName)))), false, false, ScriptUtils.DEFAULT_COMMENT_PREFIX, separator, ScriptUtils.DEFAULT_BLOCK_COMMENT_START_DELIMITER, ScriptUtils.DEFAULT_BLOCK_COMMENT_END_DELIMITER); } /** * Executes script. * * @param connection connection * @param fileName file name */ public static void executeSqlScript(Connection connection, String fileName) { executeSqlScript(connection, fileName, ScriptUtils.DEFAULT_STATEMENT_SEPARATOR); } }
[ "dbelob@users.noreply.github.com" ]
dbelob@users.noreply.github.com
7c2e869491453b1d28821cecab13ae0ab008126a
340d15b9cc53a605ebeca04398e23d745484219e
/spring/SpringCommon/src/main/java/edu/iot/common/model/Tour.java
8d5fbb0a306a2c8423cb7505ab928f6e91a3e946
[]
no_license
akdlzlr/Java-class
97397ad404f334bfd2913799ebbf819dc2aa0ee6
eb22233a71f653f5d9878732bf8266d6f710f3c8
refs/heads/master
2020-04-09T10:27:34.765604
2018-12-04T02:18:08
2018-12-04T02:18:08
160,271,840
0
0
null
null
null
null
UTF-8
Java
false
false
352
java
package edu.iot.common.model; import java.util.List; import lombok.Data; @Data //@AllArgsConstructor public class Tour { private long tourId; private String name; private String lgType; private String mdType; private String smType; private String region; private String location; private String address; List<String> imageList; }
[ "akdlzlr@naver.com" ]
akdlzlr@naver.com
19b5a27da0890da24d419bf468a94a8b8cf7faa2
6b9588d36a20f37323724d39cf196feb31dc3103
/skycloset_malware/src/com/facebook/common/d/b.java
8d84ac94f187594d650a4a43c030da05f3679c66
[]
no_license
won21kr/Malware_Project_Skycloset
f7728bef47c0b231528fdf002e3da4fea797e466
1ad90be1a68a4e9782a81ef1490f107489429c32
refs/heads/master
2022-12-07T11:27:48.119778
2019-12-16T21:39:19
2019-12-16T21:39:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
892
java
package com.facebook.common.d; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.util.logging.Level; import java.util.logging.Logger; public final class b { static final Logger a = Logger.getLogger(b.class.getName()); public static void a(Closeable paramCloseable, boolean paramBoolean) { if (paramCloseable == null) return; try { paramCloseable.close(); return; } catch (IOException paramCloseable) { if (paramBoolean) { a.log(Level.WARNING, "IOException thrown while closing Closeable.", paramCloseable); return; } throw paramCloseable; } } public static void a(InputStream paramInputStream) { try { a(paramInputStream, true); return; } catch (IOException paramInputStream) { throw new AssertionError(paramInputStream); } } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
4bf3d0f9a6ff3d868797caf44e491e48cb6d984b
62510fa67d0ca78082109a861b6948206252c885
/hihope_neptune-oh_hid/00_src/v0.1/developtools/packing_tool/com/huawei/ohos/Shortcut.java
78f3d484d486b1c88130138805de7468ea4e4364
[ "Apache-2.0" ]
permissive
dawmlight/vendor_oh_fun
a869e7efb761e54a62f509b25921e019e237219b
bc9fb50920f06cd4c27399f60076f5793043c77d
refs/heads/master
2023-08-05T09:25:33.485332
2021-09-10T10:57:48
2021-09-10T10:57:48
406,236,565
1
0
null
null
null
null
UTF-8
Java
false
false
1,243
java
/* * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.huawei.ohos; import java.util.ArrayList; import java.util.List; /** * App Shortcut info. * * @author dingyao * @since 2020-05-19 */ public class Shortcut { /** * Indicates the shortcutId of app Shortcut. */ public String shortcutId = ""; /** * Indicates the label of app Shortcut. */ public String label = ""; /** * Indicates the icon of app Shortcut. */ public String icon = ""; /** * Indicates the intents of app Shortcut. */ public List<IntentInfo> intents = new ArrayList<IntentInfo>(); }
[ "liu_xiyao@hoperun.com" ]
liu_xiyao@hoperun.com
56f77cf9be9b2318b39d2d75d1bed54f0d3f8e28
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/b70bde1b5c63ece4a3300dd02d38b49a844f53e1/after/AndroidRefactoringErrorException.java
94ac3f2f8379144d71b22ffa4e3d60e56e8a89f1
[]
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
283
java
package org.jetbrains.android.refactoring; /** * @author Eugene.Kudelevsky */ public class AndroidRefactoringErrorException extends Exception { public AndroidRefactoringErrorException() { } public AndroidRefactoringErrorException(String message) { super(message); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
626eba88cea5ed0b377e27fd68a76b3ff6fad5a9
9fc6f1d415c8cb341e848863af535dae5b22a48b
/Eclipse_Workspace_Core Java/Threads/Section_3 Synch/Synchronosation/src/com/lara/Manager5_Thread_Deadlock_Names.java
2655214eaf9bce4b7c4dafa99ce0becf36d23802
[]
no_license
MahanteshAmbali/eclipse_workspaces
f7a063f7dd8c247d610f78f0105f9f632348b187
1f6d3a7eb0264b500877a718011bf6b842161fa1
refs/heads/master
2020-04-17T04:50:33.167337
2019-01-17T15:53:13
2019-01-17T15:53:13
166,226,211
0
0
null
null
null
null
UTF-8
Java
false
false
1,978
java
package com.lara; import java.lang.management.ManagementFactory; import java.lang.management.ThreadInfo; import java.lang.management.ThreadMXBean; class Util_Sleep extends Thread{ public static void putSleep(long milSec){ try { sleep(milSec); } catch (InterruptedException e) { // TODO: handle exception e.printStackTrace(); } } } class Source{ synchronized void test1(Source s){ System.out.println("Test1 Begin"); Util_Sleep.putSleep(1000); s.test2(this); System.out.println("Test1 End"); } synchronized void test2(Source s){ System.out.println("Test2 Begin"); Util_Sleep.putSleep(1000); s.test1(this); System.out.println("Test2 End"); } } class Thread11 extends Thread{ Source s1, s2; public Thread11(Source s1, Source s2) { // TODO Auto-generated constructor stub this.s1 = s1; this.s2 = s2; } @Override public void run() { // TODO Auto-generated method stub s1.test1(s2); } } class Thread12 extends Thread{ Source s1, s2; public Thread12(Source s1 , Source s2) { // TODO Auto-generated constructor stub this.s1 = s1; this.s2 = s2; } @Override public void run() { // TODO Auto-generated method stub s2.test1(s1); } } public class Manager5_Thread_Deadlock_Names { public static void main(String[] args) { // TODO Auto-generated method stub Source s1 = new Source(); Source s2 = new Source(); Thread11 t1 = new Thread11(s1, s2); Thread12 t2 = new Thread12(s1, s2); t1.start(); t2.start(); Util_Sleep.putSleep(2000); ThreadMXBean txBean = ManagementFactory.getThreadMXBean(); long ids[] = txBean.findDeadlockedThreads(); ThreadInfo thInfo = null; if (ids != null) { System.out.println("Threads Under Deadlock are: "); ThreadInfo ti[] = txBean.getThreadInfo(ids); for (int i = 0; i < ti.length; i++) { thInfo = ti[i]; System.out.println(thInfo.getThreadName()); } } else { System.out.println("No threads under Deadlock"); } } }
[ "mahantesh378@gmail.com" ]
mahantesh378@gmail.com
eaeffe0a07d554fe2fc4b81687d6ff56c882c463
ed0b28681aba3ec7f9dbe4317fd80a6c381d3d28
/JavaWeb/src/design/bridge/source/SourceSub2.java
03b06a074ae756776e8db35f6f0dc0437cef8872
[]
no_license
jspfei/javademo
a5fc1a7fcf7888aa70e8ea5dbb4390b40356a0c9
950a1321feadd811cf1ce8baedcc9f110a18bc85
refs/heads/master
2021-01-19T14:04:44.076529
2017-05-03T09:22:53
2017-05-03T09:22:53
88,124,218
0
0
null
null
null
null
UTF-8
Java
false
false
224
java
package design.bridge.source; /** * Created by admin on 2017/5/3. */ public class SourceSub2 implements Sourceable { @Override public void method() { System.out.println("this is the second sub!"); } }
[ "jiangfeifan8@163.com" ]
jiangfeifan8@163.com
d4cd3dd7cc27b439f54904f5070fb449f2bcaa02
ecbb90f42d319195d6517f639c991ae88fa74e08
/OpenSaml/src/org/opensaml/saml2/core/impl/NameIDMappingRequestUnmarshaller.java
06ab93b5a286d966e1bbbac6645af9cd9b3a68a5
[ "MIT" ]
permissive
Safewhere/kombit-service-java
5d6577984ed0f4341bbf65cbbace9a1eced515a4
7df271d86804ad3229155c4f7afd3f121548e39e
refs/heads/master
2020-12-24T05:20:59.477842
2018-08-23T03:50:16
2018-08-23T03:50:16
36,713,383
0
1
MIT
2018-08-23T03:51:25
2015-06-02T06:39:09
Java
UTF-8
Java
false
false
2,195
java
/* * Licensed to the University Corporation for Advanced Internet Development, * Inc. (UCAID) under one or more contributor license agreements. See the * NOTICE file distributed with this work for additional information regarding * copyright ownership. The UCAID 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.opensaml.saml2.core.impl; import org.opensaml.saml2.core.BaseID; import org.opensaml.saml2.core.EncryptedID; import org.opensaml.saml2.core.NameID; import org.opensaml.saml2.core.NameIDMappingRequest; import org.opensaml.saml2.core.NameIDPolicy; import org.opensaml.xml.XMLObject; import org.opensaml.xml.io.UnmarshallingException; /** * A thread-safe Unmarshaller for {@link org.opensaml.saml2.core.NameIDMappingRequest} objects. */ public class NameIDMappingRequestUnmarshaller extends RequestAbstractTypeUnmarshaller { /** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { NameIDMappingRequest req = (NameIDMappingRequest) parentSAMLObject; if (childSAMLObject instanceof BaseID) { req.setBaseID((BaseID) childSAMLObject); } else if (childSAMLObject instanceof NameID) { req.setNameID((NameID) childSAMLObject); } else if (childSAMLObject instanceof EncryptedID) { req.setEncryptedID((EncryptedID) childSAMLObject); } else if (childSAMLObject instanceof NameIDPolicy) { req.setNameIDPolicy((NameIDPolicy) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } } }
[ "lxp@globeteam.com" ]
lxp@globeteam.com
c817ed8c0379549dae465fdde34e4c7a86d5ba92
7b921d35566f056dc5ceee90bfb54487cfe136c2
/Commons/src/main/org.l2j.commons/org/l2j/commons/database/handler/TypeHandler.java
70de920a831e159a086d565765514c673023223f
[]
no_license
format686/L2jOrg
2013155b7902d3e17626c5232f758c62a81661f9
fbfd1096ea0adfea9f990a13cfa03d042b79a345
refs/heads/master
2021-08-27T21:48:46.792052
2021-08-20T01:13:53
2021-08-20T01:13:53
183,562,706
0
0
null
2019-04-26T05:27:11
2019-04-26T05:27:11
null
UTF-8
Java
false
false
694
java
package org.l2j.commons.database.handler; import org.l2j.commons.database.helpers.QueryDescriptor; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashMap; import java.util.Map; public interface TypeHandler<T> { Map<String, TypeHandler> MAP = new HashMap<>(); T defaultValue(); T handleResult(QueryDescriptor queryDescriptor) throws SQLException; T handleType(ResultSet resultSet, Class<?> type) throws SQLException; T handleColumn(ResultSet resultSet, int column) throws SQLException; void setParameter(PreparedStatement statement, int parameterIndex, T arg) throws SQLException; String type(); }
[ "joe.alisson@gmail.com" ]
joe.alisson@gmail.com
94d2740bda0599cbc80fd0222a7f53e0e75bbc83
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE190_Integer_Overflow/s03/CWE190_Integer_Overflow__int_PropertiesFile_add_54b.java
5b4d95cfe1ce0a298ec20dc81cd7fa89be18caf9
[]
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
1,519
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__int_PropertiesFile_add_54b.java Label Definition File: CWE190_Integer_Overflow__int.label.xml Template File: sources-sinks-54b.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: PropertiesFile Read data from a .properties file (in property named data) * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: add * GoodSink: Ensure there will not be an overflow before adding 1 to data * BadSink : Add 1 to data, which can cause an overflow * Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package * * */ package testcases.CWE190_Integer_Overflow.s03; import testcasesupport.*; import javax.servlet.http.*; public class CWE190_Integer_Overflow__int_PropertiesFile_add_54b { public void badSink(int data ) throws Throwable { (new CWE190_Integer_Overflow__int_PropertiesFile_add_54c()).badSink(data ); } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(int data ) throws Throwable { (new CWE190_Integer_Overflow__int_PropertiesFile_add_54c()).goodG2BSink(data ); } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink(int data ) throws Throwable { (new CWE190_Integer_Overflow__int_PropertiesFile_add_54c()).goodB2GSink(data ); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
76d2d2b007d8e547b40b21391b1612b236c159e7
4ded0a82b3fa0cc1d1989f56d6db3f98ef09f091
/services/hrdb/src/com/auto_jtathnlwlx/hrdb/service/HrdbQueryExecutorServiceImpl.java
eeaf8fad2152b2ff1379112192439662a81f6eeb
[]
no_license
wavemakerapps/Auto_JtATHNlWLX
aa58d8801bc6d8251edb0b9bca6cb0feca4d068a
59e7de7fec03c7d51955ea6cba1bb02c6f8de98a
refs/heads/master
2021-09-05T16:46:40.108080
2018-01-29T18:31:53
2018-01-29T18:31:53
119,422,123
0
0
null
null
null
null
UTF-8
Java
false
false
1,053
java
/*Copyright (c) 2015-2016 wavemaker.com All Rights Reserved. This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the source code license agreement you entered into with wavemaker.com*/ package com.auto_jtathnlwlx.hrdb.service; /*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import com.wavemaker.runtime.data.dao.query.WMQueryExecutor; @Service public class HrdbQueryExecutorServiceImpl implements HrdbQueryExecutorService { private static final Logger LOGGER = LoggerFactory.getLogger(HrdbQueryExecutorServiceImpl.class); @Autowired @Qualifier("hrdbWMQueryExecutor") private WMQueryExecutor queryExecutor; }
[ "automate1@wavemaker.com" ]
automate1@wavemaker.com
27f5678f195245c6ce4069c5f9708bb381aa434f
e89dc01c95b8b45404f971517c2789fd21657749
/src/main/java/com/alipay/api/domain/CardFrontTextDTO.java
b4ab0e1e05a7420da2e9e80c9df069b2c20dce45
[ "Apache-2.0" ]
permissive
guoweiecust/alipay-sdk-java-all
3370466eec70c5422c8916c62a99b1e8f37a3f46
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
refs/heads/master
2023-05-05T07:06:47.823723
2021-05-25T15:26:21
2021-05-25T15:26:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
819
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 卡面文案信息模型,展示在卡面上,形如: 学校 武汉理工大学 * * @author auto create * @since 1.0, 2019-08-08 20:03:34 */ public class CardFrontTextDTO extends AlipayObject { private static final long serialVersionUID = 8146197593616275544L; /** * 文案标签 */ @ApiField("label") private String label; /** * 展示文案 */ @ApiField("value") private String value; public String getLabel() { return this.label; } public void setLabel(String label) { this.label = label; } public String getValue() { return this.value; } public void setValue(String value) { this.value = value; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
d7178c42b2207645ff3cb78c457f086c707ec0af
af8c0ffa4f2181708532f2b852ca4b718f84eb19
/diorite-api/src/main/java/org/diorite/material/blocks/WoodenFenceMat.java
4d071318a5c1ab0fe51f2b1647ed8bbbbbee7bc5
[ "MIT" ]
permissive
Diorite/Diorite-old
1a5e91483fe6e46e305f866f10cff22846b19816
bfe35f695876f633ae970442f673188e4ff99c9b
refs/heads/master
2021-01-22T15:21:39.404346
2016-08-09T18:10:57
2016-08-09T18:10:57
65,502,014
3
6
null
null
null
null
UTF-8
Java
false
false
3,739
java
/* * The MIT License (MIT) * * Copyright (c) 2016. Diorite (by Bartłomiej Mazur (aka GotoFinal)) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.diorite.material.blocks; import org.diorite.material.FenceMat; import org.diorite.material.FuelMat; import org.diorite.material.WoodType; import org.diorite.utils.collections.maps.SimpleEnumMap; /** * Abstract class for all WoodenFence-based blocks */ public abstract class WoodenFenceMat extends WoodMat implements FenceMat, FuelMat { public WoodenFenceMat(final String enumName, final int id, final String minecraftId, final String typeName, final WoodType woodType, final float hardness, final float blastResistance) { super(enumName, id, minecraftId, typeName, (byte) 0, woodType, hardness, blastResistance); } public WoodenFenceMat(final String enumName, final int id, final String minecraftId, final int maxStack, final String typeName, final byte type, final WoodType woodType, final float hardness, final float blastResistance) { super(enumName, id, minecraftId, maxStack, typeName, type, woodType, hardness, blastResistance); } private static final SimpleEnumMap<WoodType, WoodenFenceMat> types = new SimpleEnumMap<>(6, SMALL_LOAD_FACTOR); @SuppressWarnings("MagicNumber") @Override public int getFuelPower() { return 1500; } @Override public WoodenFenceMat getWoodType(final WoodType woodType) { return types.get(woodType); } @Override public abstract WoodenFenceMat getType(final int type); @Override public abstract WoodenFenceMat getType(final String type); @Override public abstract WoodenFenceMat[] types(); /** * Returns sub-type of {@link WoodenFenceMat}, based on {@link WoodType}. * * @param woodType {@link WoodType} of WoodenFence * * @return sub-type of {@link WoodenFenceMat}. */ public static WoodenFenceMat getWoodenFence(final WoodType woodType) { return types.get(woodType); } /** * Register new wood type to one of fences, like OAK to OAK_FENCE. * * @param type type of wood. * @param mat fence material. */ public static void registerWoodType(final WoodType type, final WoodenFenceMat mat) { types.put(type, mat); } static { registerWoodType(WoodType.OAK, OAK_FENCE); registerWoodType(WoodType.SPRUCE, SPRUCE_FENCE); registerWoodType(WoodType.BIRCH, BIRCH_FENCE); registerWoodType(WoodType.JUNGLE, JUNGLE_FENCE); registerWoodType(WoodType.ACACIA, ACACIA_FENCE); registerWoodType(WoodType.DARK_OAK, DARK_OAK_FENCE); } }
[ "bartlomiejkmazur@gmail.com" ]
bartlomiejkmazur@gmail.com
f36206df3f07fbaa2d5a706f72a64d6c7133fced
f5f0d558e556b2c174dc88c1bbcf640d4d27651e
/app/src/main/java/com/ipd/tankking/presenter/DiamondStorePresenter.java
d45a19a5526c298fd9c627d2bf0d2ca8f98cad8e
[]
no_license
RenVeCf/TankKing
2f526f26af6002f76e4041d17806eddd38f56672
dd99e025500fe6f74ebe1ce416d7b3072b8d4f2c
refs/heads/master
2020-07-07T08:15:33.418193
2019-08-20T04:27:34
2019-08-20T04:27:34
203,300,907
0
1
null
null
null
null
UTF-8
Java
false
false
3,371
java
package com.ipd.tankking.presenter; import android.content.Context; import com.ipd.tankking.bean.AliPayBean; import com.ipd.tankking.bean.DiamondStoreBean; import com.ipd.tankking.bean.WeChatPayBean; import com.ipd.tankking.contract.DiamondStoreContract; import com.ipd.tankking.model.DiamondStoreModel; import com.ipd.tankking.progress.ObserverResponseListener; import com.ipd.tankking.utils.ExceptionHandle; import com.ipd.tankking.utils.T; import java.util.TreeMap; /** * Description : * Author : MengYang * Email : 942685687@qq.com * Time : 2018/8/26. */ public class DiamondStorePresenter extends DiamondStoreContract.Presenter { private DiamondStoreModel model; private Context context; public DiamondStorePresenter(Context context) { this.model = new DiamondStoreModel(); this.context = context; } @Override public void getDiamondStore(TreeMap<String, String> map, boolean isDialog, boolean cancelable) { model.getDiamondStore(context, map, isDialog, cancelable, getView().bindLifecycle(), new ObserverResponseListener() { @Override public void onNext(Object o) { //这一步是必须的,判断view是否已经被销毁 if (getView() != null) { getView().resultDiamondStore((DiamondStoreBean) o); } } @Override public void onError(ExceptionHandle.ResponeThrowable e) { if (getView() != null) { //// TODO: 2017/12/28 自定义处理异常 T.Short(ExceptionHandle.handleException(e).message, 2); } } }); } @Override public void getAliPay(TreeMap<String, String> map, boolean isDialog, boolean cancelable) { model.getAliPay(context, map, isDialog, cancelable, getView().bindLifecycle(), new ObserverResponseListener() { @Override public void onNext(Object o) { //这一步是必须的,判断view是否已经被销毁 if (getView() != null) { getView().resultAliPay((AliPayBean) o); } } @Override public void onError(ExceptionHandle.ResponeThrowable e) { if (getView() != null) { //// TODO: 2017/12/28 自定义处理异常 T.Short(ExceptionHandle.handleException(e).message, 2); } } }); } @Override public void getWeChatPay(TreeMap<String, String> map, boolean isDialog, boolean cancelable) { model.getWeChatPay(context, map, isDialog, cancelable, getView().bindLifecycle(), new ObserverResponseListener() { @Override public void onNext(Object o) { //这一步是必须的,判断view是否已经被销毁 if (getView() != null) { getView().resultWeChatPay((WeChatPayBean) o); } } @Override public void onError(ExceptionHandle.ResponeThrowable e) { if (getView() != null) { //// TODO: 2017/12/28 自定义处理异常 T.Short(ExceptionHandle.handleException(e).message, 2); } } }); } }
[ "942685687@qq.com" ]
942685687@qq.com
5776e406bef12b83ed01aba87388745d5ea5218b
7df62a93d307a01b1a42bb858d6b06d65b92b33b
/src/com/afunms/polling/snmp/solaris/SolarisUserByLogFile.java
a8ca4d3a79e3f2c42ccbf608922275bf097ffd9d
[]
no_license
wu6660563/afunms_fd
79ebef9e8bca4399be338d1504faf9630c42a6e1
3fae79abad4f3eb107f1558199eab04e5e38569a
refs/heads/master
2021-01-10T01:54:38.934469
2016-01-05T09:16:38
2016-01-05T09:16:38
48,276,889
0
1
null
null
null
null
GB18030
Java
false
false
3,462
java
package com.afunms.polling.snmp.solaris; import java.util.Calendar; import java.util.Hashtable; import java.util.Vector; import com.afunms.common.util.SysLogger; import com.afunms.polling.base.ErrorCode; import com.afunms.polling.base.ObjectValue; import com.afunms.polling.om.Usercollectdata; /** * Solaris User 日志解析类 * * @author 聂林 */ public class SolarisUserByLogFile extends SolarisByLogFile { /** * 日志 */ private static SysLogger logger = SysLogger .getLogger(SolarisUserByLogFile.class.getName()); private static final String SOLARIS_USERGROUP_BEGIN_KEYWORD = SolarisLogFileKeywordConstant.SOLARIS_USERGROUP_BEGIN_KEYWORD; private static final String SOLARIS_USERGROUP_END_KEYWORD = SolarisLogFileKeywordConstant.SOLARIS_USERGROUP_END_KEYWORD; private static final String SOLARIS_USER_BEGIN_KEYWORD = SolarisLogFileKeywordConstant.SOLARIS_USER_BEGIN_KEYWORD; private static final String SOLARIS_USER_END_KEYWORD = SolarisLogFileKeywordConstant.SOLARIS_USER_END_KEYWORD; @Override public ObjectValue getObjectValue() { String beginStr = SOLARIS_USERGROUP_BEGIN_KEYWORD; String endStr = SOLARIS_USERGROUP_END_KEYWORD; String usergroupContent = getLogFileContent(beginStr, endStr); String[] usergroupLineArr = usergroupContent.split("\n"); Hashtable<String, String> usergroupHashtable = new Hashtable<String, String>(); for (int i = 0; i < usergroupLineArr.length; i++) { String[] usergroup_tmpData = usergroupLineArr[i].split(":"); if (usergroup_tmpData.length >= 3) { usergroupHashtable.put((String) usergroup_tmpData[2], usergroup_tmpData[0]); } } String ipaddress = getNodeDTO().getIpaddress(); Calendar date = getCalendarInstance(); beginStr = SOLARIS_USER_BEGIN_KEYWORD; endStr = SOLARIS_USER_END_KEYWORD; String userContent = getLogFileContent(beginStr, endStr); String[] userLineArr = userContent.split("\n"); Vector<Usercollectdata> userVector = new Vector<Usercollectdata>(); for (int i = 0; i < userLineArr.length; i++) { String[] tmpData = userLineArr[i].trim().split(":x:"); if (tmpData.length>=2) { String userName = tmpData[0]; String usergroupid = tmpData[1]; String groupname = ""; if (usergroupHashtable.containsKey(usergroupid)) { groupname = (String) usergroupHashtable.get(usergroupid); } if (groupname == null || "".equals(groupname)) { groupname = usergroupid; } Usercollectdata userdata = new Usercollectdata(); userdata.setIpaddress(ipaddress); userdata.setCollecttime(date); userdata.setCategory("User"); userdata.setEntity("Sysuser"); userdata.setSubentity(groupname); userdata.setRestype("static"); userdata.setUnit(" "); userdata.setThevalue(userName); userVector.addElement(userdata); } } ObjectValue objectValue = new ObjectValue(); objectValue.setObjectValue(userVector); objectValue.setErrorCode(ErrorCode.CODE_SUCESS); return objectValue; } }
[ "nick@comprame.com" ]
nick@comprame.com
89d23190f8a5207c14ed66431b7261d47ef05ea8
547f667fc96ff43cad7d6b4372d7cd095ad8cc38
/src/main/java/edu/cmu/cs/stage3/alice/scenegraph/renderer/joglrenderer/AmbientLightProxy.java
0c668a0d58d81985d831599c55178eb4f8ff8fe9
[ "BSD-2-Clause" ]
permissive
ericpauley/Alice
ca01da9cd90ebe743d392522e1e283d63bdaa184
a0b732c548f051f5c99dd90ec9410866ba902479
refs/heads/master
2020-06-05T03:15:51.421453
2012-03-20T13:50:16
2012-03-20T13:50:16
2,081,310
3
1
null
null
null
null
UTF-8
Java
false
false
1,143
java
/* * Copyright (c) 1999-2003, Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Products derived from the software may not be called "Alice", * nor may "Alice" appear in their name, without prior written * permission of Carnegie Mellon University. * * 4. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes software developed by Carnegie Mellon University" */ package edu.cmu.cs.stage3.alice.scenegraph.renderer.joglrenderer; class AmbientLightProxy extends LightProxy { }
[ "zonedabone@gmail.com" ]
zonedabone@gmail.com
1a03a52c22f31a2ae4fcd64ae1261e7366f74824
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/318c76b772b9719d7b27a6e9ec7331c5633c82bf/after/RW.java
095eb1fedc86ef57b2e33b78cae5e8bf13862842
[]
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
5,807
java
package org.jetbrains.ether; import com.intellij.util.xmlb.XmlSerializationException; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.util.Collection; import java.util.Map; /** * Created by IntelliJ IDEA. * User: db * Date: 29.01.11 * Time: 21:10 * To change this template use File | Settings | File Templates. */ public class RW { public interface Writable { public void write(BufferedWriter w); } public static <T extends Comparable> void writeln(final BufferedWriter w, final Collection<T> c, final ToWritable<T> t) { if (c == null) { writeln(w, "0"); return; } writeln(w, Integer.toString(c.size())); for (T e : c) { t.convert(e).write(w); } } public static void writeEncodedString(final BufferedWriter w, final String val) { final int size = val == null ? 0 : val.length(); writeln(w, Integer.toString(size)); for (int i = 0; i < size; i++) { writeln(w, Integer.toString((int)val.charAt(i))); } } public static void writeln(final BufferedWriter w, final Collection<? extends Writable> c) { if (c == null) { writeln(w, "0"); return; } writeln(w, Integer.toString(c.size())); for (Writable e : c) { e.write(w); } } public interface ToWritable<T> { Writable convert(T x); } public static <T> void writeln(final BufferedWriter w, final T[] c, final ToWritable<T> t) { if (c == null) { writeln(w, "0"); return; } writeln(w, Integer.toString(c.length)); for (int i = 0; i < c.length; i++) { t.convert(c[i]).write(w); } } public static <T extends Writable> void writeln(final BufferedWriter w, final T[] c) { if (c == null) { writeln(w, "0"); return; } writeln(w, Integer.toString(c.length)); for (int i = 0; i < c.length; i++) { c[i].write(w); } } public static void writeln(final BufferedWriter w, final String s) { try { if (s == null) { w.write(""); } else { w.write(s); } w.newLine(); } catch (IOException e) { e.printStackTrace(); } } public static <X extends Writable, Y extends Writable> void writeMap (final BufferedWriter w, final Map<X, Y> m) { final int size = m.size(); writeln(w, Integer.toString(size)); for (Map.Entry<X, Y> e : m.entrySet()) { e.getKey().write(w); e.getValue().write(w); } } public interface Reader<T> { public T read(BufferedReader r); } public static ToWritable<String> fromString = new ToWritable<String>() { public Writable convert(final String s) { return new Writable() { public void write(BufferedWriter w) { writeln(w, s); } }; } }; public static ToWritable<Writable> fromWritable = new ToWritable<Writable>() { public Writable convert(final Writable w) { return w; } }; public static Reader<String> myStringReader = new Reader<String>() { public String read(final BufferedReader r) { try { return r.readLine(); } catch (IOException e) { e.printStackTrace(); return null; } } }; public static <T> Collection<T> readMany(final BufferedReader r, final Reader<T> c, final Collection<T> acc) { final int size = readInt(r); for (int i = 0; i < size; i++) { acc.add(c.read(r)); } return acc; } public static String lookString(final BufferedReader r) { try { r.mark(256); final String s = r.readLine(); r.reset(); return s; } catch (IOException e) { e.printStackTrace(); return null; } } public static void readTag(final BufferedReader r, final String tag) { try { final String s = r.readLine(); if (!s.equals(tag)) System.err.println("Parsing error: expected \"" + tag + "\", but found \"" + s + "\""); } catch (IOException e) { e.printStackTrace(); } } public static String readString(final BufferedReader r) { try { return r.readLine(); } catch (IOException e) { e.printStackTrace(); return null; } } public static String readEncodedString(final BufferedReader r) { final StringBuilder b = new StringBuilder(); final int size = readInt(r); for (int i = 0; i < size; i++) { final int c = readInt(r); b.append((char)c); } return b.toString(); } public static long readLong(final BufferedReader r) { final String s = readString(r); try { return Long.parseLong(s); } catch (Exception n) { System.err.println("Parsing error: expected long, but found \"" + s + "\""); return 0; } } public static int readInt(final BufferedReader r) { final String s = readString(r); try { return Integer.parseInt(s); } catch (Exception n) { System.err.println("Parsing error: expected integer, but found \"" + s + "\""); return 0; } } public static String readStringAttribute(final BufferedReader r, final String tag) { try { final String s = r.readLine(); if (s.startsWith(tag)) return s.substring(tag.length()); System.err.println("Parsing error: expected \"" + tag + "\", but found \"" + s + "\""); return null; } catch (IOException e) { e.printStackTrace(); return null; } } public static <X, Y> Map<X, Y> readMap (final BufferedReader r, final Reader<X> xr, final Reader<Y> yr, final Map<X, Y> acc) { final int size = RW.readInt(r); for (int i = 0; i<size; i++) { final X key = xr.read(r); final Y value = yr.read(r); acc.put(key, value); } return acc; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com