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
f3464ddd2ec7078efeb41c8ccc9778582955848b
d171ac583cabfc6eb2b8d5e65448c42b6a50fa32
/src/scripting/portal/PortalPlayerInteraction.java
fe897308468edb018b6c379215bc47d389299423
[ "MIT" ]
permissive
marcosppastor/MSV83
0d1d5b979f1591d12181ab4de160361881878145
f7df1ad6878b4b03f660beabd4b82575b143ba3a
refs/heads/main
2023-07-18T12:16:21.304766
2023-06-25T13:28:23
2023-06-25T13:28:23
385,090,216
5
0
null
null
null
null
UTF-8
Java
false
false
2,720
java
/* This file is part of the OdinMS Maple Story Server Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc> Matthias Butz <matze@odinms.de> Jan Christian Meyer <vimes@odinms.de> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation version 3 as published by the Free Software Foundation. You may not use, modify or distribute this program under any other version of the GNU Affero General Public License. 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ package scripting.portal; import client.MapleClient; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import scripting.AbstractPlayerInteraction; import server.MaplePortal; import tools.DatabaseConnection; import tools.MaplePacketCreator; public class PortalPlayerInteraction extends AbstractPlayerInteraction { private MaplePortal portal; public PortalPlayerInteraction(MapleClient c, MaplePortal portal) { super(c); this.portal = portal; } public MaplePortal getPortal() { return portal; } public boolean hasLevel30Character() { PreparedStatement ps = null; ResultSet rs = null; try { ps = DatabaseConnection.getConnection().prepareStatement("SELECT `level` FROM `characters` WHERE accountid = ?"); ps.setInt(1, getPlayer().getAccountID()); rs = ps.executeQuery(); while (rs.next()) { if (rs.getInt("level") >= 30) { return true; } } } catch (SQLException sqle) { sqle.printStackTrace(); } finally { try { if (ps != null && !ps.isClosed()) { ps.close(); } if (rs != null && !rs.isClosed()) { rs.close(); } } catch (SQLException ex) { } } return false; } public void blockPortal() { c.getPlayer().blockPortal(getPortal().getScriptName()); } public void unblockPortal() { c.getPlayer().unblockPortal(getPortal().getScriptName()); } public void playPortalSound() { c.announce(MaplePacketCreator.playPortalSound()); } }
[ "marcosppastor@gmail.com" ]
marcosppastor@gmail.com
786c5d5e39b362a926c49755beb72e3c09649f6b
165cbcca1746b2c3b8c3732f6ffe78a51b279f99
/modules/crce-test-plugin/src/main/java/cz/zcu/kiv/crce/test/plugin2/search/impl/central/AdditionalQueryParam.java
419f92c7800f295d13a53f7fc5b35d89736b7809
[]
no_license
Cajova-Houba/crce
e87dbc96e33660199a704dc24e105e8de0a67765
17210a17daca0ad06be1dd9c5bbc914ce93d521e
refs/heads/master
2021-01-11T09:56:53.515203
2017-03-20T22:57:59
2017-03-20T22:57:59
77,959,511
0
0
null
2017-01-03T22:40:22
2017-01-03T22:40:22
null
UTF-8
Java
false
false
928
java
package cz.zcu.kiv.crce.test.plugin2.search.impl.central; /** * Additional query parameters. Sucha as number of returned rows and service specification. * * @author Zdenek Vales */ public enum AdditionalQueryParam { /** * Basically only working value is 'gav' */ CORE("core"), /** * Number of returned rows. If the specified value is not a number, server will return error 500. * If this param is specified, but empty, only few artifacts are returned. */ ROWS("rows"), /** * Starting index of the returned artifact array. * If the row parameter is specified, this can be used for pagination. */ START("start"), /** * Service specification. * Use 'json' for JSON and 'xml' for XML format. */ SERVICE("wt"); public final String paramName; AdditionalQueryParam(String paramName) { this.paramName = paramName; } }
[ "tkmushroomer@gmail.com" ]
tkmushroomer@gmail.com
5884379586dbd7b3132e294055797112319b6e68
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE190_Integer_Overflow/s06/CWE190_Integer_Overflow__short_console_readLine_postinc_61b.java
6deb3fd43bd745d37ec0198d828a1b439bcefc7f
[]
no_license
rubengomez97/juliet
f9566de7be198921113658f904b521b6bca4d262
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
refs/heads/master
2023-06-02T00:37:24.532638
2021-06-23T17:22:22
2021-06-23T17:22:22
379,676,259
1
0
null
null
null
null
UTF-8
Java
false
false
4,974
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__short_console_readLine_postinc_61b.java Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-61b.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: console_readLine Read data from the console using readLine * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: increment * GoodSink: Ensure there will not be an overflow before incrementing data * BadSink : Increment data, which can cause an overflow * Flow Variant: 61 Data flow: data returned from one method to another in different classes in the same package * * */ package testcases.CWE190_Integer_Overflow.s06; import testcasesupport.*; import javax.servlet.http.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.logging.Level; public class CWE190_Integer_Overflow__short_console_readLine_postinc_61b { public short badSource() throws Throwable { short data; /* init data */ data = -1; /* POTENTIAL FLAW: Read data from console with readLine*/ BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { readerInputStream = new InputStreamReader(System.in, "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); String stringNumber = readerBuffered.readLine(); if (stringNumber != null) { data = Short.parseShort(stringNumber.trim()); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } catch (NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Error with number parsing", exceptNumberFormat); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } finally { try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } } } return data; } /* goodG2B() - use goodsource and badsink */ public short goodG2BSource() throws Throwable { short data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; return data; } /* goodB2G() - use badsource and goodsink */ public short goodB2GSource() throws Throwable { short data; /* init data */ data = -1; /* POTENTIAL FLAW: Read data from console with readLine*/ BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { readerInputStream = new InputStreamReader(System.in, "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); String stringNumber = readerBuffered.readLine(); if (stringNumber != null) { data = Short.parseShort(stringNumber.trim()); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } catch (NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Error with number parsing", exceptNumberFormat); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } finally { try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } } } return data; } }
[ "you@example.com" ]
you@example.com
95f29ccf368a34e3e8de26959192b028c5b68f97
74acea1b7f2a3a509b9ead48f186c9349bf55cc8
/framework/src/main/java/com/enjoyf/platform/db/event/PageViewEventAccessorMySql.java
92077a8a1b4737f52c838736839f302b0aa9e841
[]
no_license
liu67224657/besl-platform
6cd2bfcc7320a4039e61b114173d5f350345f799
68c126bea36c289526e0cc62b9d5ce6284353d11
refs/heads/master
2022-04-16T02:23:40.178907
2020-04-17T09:00:01
2020-04-17T09:00:01
109,520,110
1
1
null
null
null
null
UTF-8
Java
false
false
231
java
/** * (C) 2010 Fivewh platform enjoyf.com */ package com.enjoyf.platform.db.event; /** * @author <a href=mailto:yinpengyi@enjoyf.com>Yin Pengyi</a> */ class PageViewEventAccessorMySql extends AbstractPageViewEventAccessor { }
[ "ericliu@staff.joyme.com" ]
ericliu@staff.joyme.com
6b4e2c889876896ec9f9e5a3e758f4d7c237247d
392e624ea2d6886bf8e37167ebbda0387e7e4a9a
/uxcrm-ofbiz/generated-entity/src/main/java/org/apache/ofbiz/common/user/UserPreference.java
d8df1617204c7298725fe5a4052c6e1faa22f0c8
[ "Apache-2.0" ]
permissive
yuri0x7c1/uxcrm
11eee75f3a9cffaea4e97dedc8bc46d8d92bee58
1a0bf4649bee0a3a62e486a9d6de26f1d25d540f
refs/heads/master
2018-10-30T07:29:54.123270
2018-08-26T18:25:35
2018-08-26T18:25:35
104,251,350
0
0
null
null
null
null
UTF-8
Java
false
false
2,279
java
package org.apache.ofbiz.common.user; import lombok.experimental.FieldNameConstants; import java.io.Serializable; import lombok.Getter; import lombok.Setter; import java.sql.Timestamp; import org.apache.ofbiz.entity.GenericValue; import java.util.List; import java.util.ArrayList; /** * User Preference */ @FieldNameConstants public class UserPreference implements Serializable { public static final long serialVersionUID = 3601787332740810752L; public static final String NAME = "UserPreference"; /** * User Login Id */ @Getter @Setter private String userLoginId; /** * User Pref Type Id */ @Getter @Setter private String userPrefTypeId; /** * User Pref Group Type Id */ @Getter @Setter private String userPrefGroupTypeId; /** * User Pref Value */ @Getter @Setter private String userPrefValue; /** * User Pref Data Type */ @Getter @Setter private String userPrefDataType; /** * Last Updated Stamp */ @Getter @Setter private Timestamp lastUpdatedStamp; /** * Last Updated Tx Stamp */ @Getter @Setter private Timestamp lastUpdatedTxStamp; /** * Created Stamp */ @Getter @Setter private Timestamp createdStamp; /** * Created Tx Stamp */ @Getter @Setter private Timestamp createdTxStamp; public UserPreference(GenericValue value) { userLoginId = (String) value.get(FIELD_USER_LOGIN_ID); userPrefTypeId = (String) value.get(FIELD_USER_PREF_TYPE_ID); userPrefGroupTypeId = (String) value.get(FIELD_USER_PREF_GROUP_TYPE_ID); userPrefValue = (String) value.get(FIELD_USER_PREF_VALUE); userPrefDataType = (String) value.get(FIELD_USER_PREF_DATA_TYPE); lastUpdatedStamp = (Timestamp) value.get(FIELD_LAST_UPDATED_STAMP); lastUpdatedTxStamp = (Timestamp) value.get(FIELD_LAST_UPDATED_TX_STAMP); createdStamp = (Timestamp) value.get(FIELD_CREATED_STAMP); createdTxStamp = (Timestamp) value.get(FIELD_CREATED_TX_STAMP); } public static UserPreference fromValue( org.apache.ofbiz.entity.GenericValue value) { return new UserPreference(value); } public static List<UserPreference> fromValues(List<GenericValue> values) { List<UserPreference> entities = new ArrayList<>(); for (GenericValue value : values) { entities.add(new UserPreference(value)); } return entities; } }
[ "yuri0x7c1@gmail.com" ]
yuri0x7c1@gmail.com
06155923b6f6e484963a37d693d8777d86b59f3f
c20ffe4363cc4262ab64675aae71579c69418ee3
/Java/0721/LocalVariableDemo.java
2dbe76bde20b115a737e2ff42979bac60c09bbb0
[]
no_license
ojin0611/JavaSE
971b774c2bf2128b8dd7df390c35bfac1a723a17
1e4cff52a9a32f649ed98d4a7b943a3cb4f765ca
refs/heads/master
2022-12-24T14:32:57.136414
2020-09-24T07:17:09
2020-09-24T07:17:09
279,794,361
0
0
null
null
null
null
UHC
Java
false
false
1,000
java
/* 작성자 : 양영진 작성목적 : 작성일시 : 작성환경 : Windows 10, OpenJDK 14, EditPlus */ /* 지역변수 : locabl variable, stack variable, automatic variable, temporary viarable - 특정 메소드 혹은 특정 block에서 선언된 변수 - 특정 메소드나 특정블록을 벗어나면 자동소멸되고, 이 영역 안으로 들어오면 자동생성 - 반드시 사용하기전에 초기화해야한다. */ import java.util.Scanner; public class LocalVariableDemo { public static void main(String[] args) { /* { int age=24; } System.out.println(age); // 지역변수는 {} 안에서만 활동 */ double height; //지역변수 Scanner scan; //지역변수, 선언 scan = new Scanner(System.in); // 생성 System.out.print("키몇?"); height = scan.nextDouble(); //초기화 double inch = height / 2.54; //지역변수 double feet = inch / 12; System.out.printf("%.1fcm는 %.1f피트, %.2f인치입니다.\n", height, feet, inch); } }
[ "ojin0611@gmail.com" ]
ojin0611@gmail.com
b03bd11f033cc34d4b88c66f5c5149f93434b3b3
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/java-inflector/generated/src/gen/java/org/openapitools/model/ComDayCqWcmNotificationEmailImplEmailChannelProperties.java
14258596c136cd5a8552a67f7432858e997d547e
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
2,166
java
package org.openapitools.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.ConfigNodePropertyString; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", date = "2019-08-05T00:53:46.291Z[GMT]") public class ComDayCqWcmNotificationEmailImplEmailChannelProperties { @JsonProperty("email.from") private ConfigNodePropertyString emailFrom = null; /** **/ public ComDayCqWcmNotificationEmailImplEmailChannelProperties emailFrom(ConfigNodePropertyString emailFrom) { this.emailFrom = emailFrom; return this; } @ApiModelProperty(value = "") @JsonProperty("email.from") public ConfigNodePropertyString getEmailFrom() { return emailFrom; } public void setEmailFrom(ConfigNodePropertyString emailFrom) { this.emailFrom = emailFrom; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ComDayCqWcmNotificationEmailImplEmailChannelProperties comDayCqWcmNotificationEmailImplEmailChannelProperties = (ComDayCqWcmNotificationEmailImplEmailChannelProperties) o; return Objects.equals(emailFrom, comDayCqWcmNotificationEmailImplEmailChannelProperties.emailFrom); } @Override public int hashCode() { return Objects.hash(emailFrom); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComDayCqWcmNotificationEmailImplEmailChannelProperties {\n"); sb.append(" emailFrom: ").append(toIndentedString(emailFrom)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
59b41707c8c4062540e458ee7bb2c1bca52e8a2b
4c8c657d4a2246f14c3e8e7979f4abafb01c976c
/src/Edition1/Edition1_9/Edition1_9_2/Bullet.java
c3743980cb82d9f7d7676cba738d545358cea2bf
[]
no_license
Wmt-Monica/AircraftWar
0fe7f13a22cf24d9d2a75b8aa7e20854ecb75242
bb1322b5bf17461f2aa2dcd1bb5e1dc97c89f4d0
refs/heads/master
2023-01-19T17:24:40.026543
2020-11-26T15:03:32
2020-11-26T15:03:32
313,652,532
0
0
null
null
null
null
UTF-8
Java
false
false
3,667
java
package Edition1.Edition1_9.Edition1_9_2; import javax.swing.*; import java.awt.*; import java.awt.event.KeyAdapter; /** * 版本1.9.2 * 功能: * 让敌方坦克自由动起来 * 让坦克可以相隔一定时间内发射炮弹 * 步骤: * 随机产生方向数组中的方向对应的方向常量 */ public class Bullet extends JFrame { private int x, y; // 子弹发射的初始位置 private int BULLET_SIZE = 15; // 设置实心圆子弹的直径大小 private int MOVE_LENGTH = 10; // 炮弹的最小移动距离 private boolean bLive = true; // 炮弹默认状态下是存活状态 private boolean good; // 判断是是主战还是敌方坦克发射的子弹 private Tank.DirectionENUM bulletDirection; // 获得坦克的运动方向 public Bullet(int x, int y, Tank.DirectionENUM bulletDirection,boolean good) { this.x = x; this.y = y; this.bulletDirection = bulletDirection; this.good = good; } public Bullet(int x, int y) { this.x = x; this.y = y; } public Bullet() { } public int getX(){ return x; } public int getY(){ return y; } public int getBULLET_SIZE() { return this.BULLET_SIZE; } public boolean getGood() { return good; } public void death() { bLive = false; } public void draw(Graphics g) { Color startColor = g.getColor(); if (good){ g.setColor(Color.CYAN); }else { g.setColor(Color.GREEN); } g.fillOval(x, y, BULLET_SIZE, BULLET_SIZE); g.setColor(startColor); new KeyListener().bulletMove(); } // 创建一个子弹类的自己移动类 class KeyListener extends KeyAdapter { public void bulletMove() { switch (bulletDirection) { case U: y -= MOVE_LENGTH; break; case UR: x += MOVE_LENGTH; y -= MOVE_LENGTH; break; case R: x += MOVE_LENGTH; break; case RD: x += MOVE_LENGTH; y += MOVE_LENGTH; break; case D: y += MOVE_LENGTH; break; case LD: x -= MOVE_LENGTH; y += MOVE_LENGTH; break; case L: x -= MOVE_LENGTH; break; case LU: x -= MOVE_LENGTH; y -= MOVE_LENGTH; break; } } } //创建一个方法判断炮弹是否死亡 public boolean bulletLive() { if (x < 0 || x > new TankClient().getScreenWidth() || y < 0 || y > new TankClient().getScreenHeight()) { bLive = false; //当炮弹已经出界,则炮弹被定义为已经死亡 } return bLive; } //创建一个是否打中敌方坦克的方法 public boolean hitTank(EnemyTank enemyTank) { for (Tank enemyTanks : enemyTank.tankList) { if (x >= enemyTanks.getX() - enemyTanks.getTANK_SIZE() && x <= enemyTanks.getX() + enemyTanks.getTANK_SIZE() && y >= enemyTanks.getY() - enemyTanks.getTANK_SIZE() && y <= enemyTanks.getY() + enemyTanks.getTANK_SIZE()) { death(); enemyTanks.death(); return true; } } return false; } }
[ "3040988158@qq.com" ]
3040988158@qq.com
7d1540a7459f5b39c7c223d572980641cf6f65c4
bb85a06d3fff8631f5dca31a55831cd48f747f1f
/src/main/core/com/goisan/survey/controller/SurveyAnswerController.java
7f79c2eff0767a4c844f700aeedac8d93668aba6
[]
no_license
lqj12267488/Gemini
01e2328600d0dfcb25d1880e82c30f6c36d72bc9
e1677dc1006a146e60929f02dba0213f21c97485
refs/heads/master
2022-12-23T10:55:38.115096
2019-12-05T01:51:26
2019-12-05T01:51:26
229,698,706
0
0
null
2022-12-16T11:36:09
2019-12-23T07:20:16
Java
UTF-8
Java
false
false
4,759
java
package com.goisan.survey.controller; import com.goisan.studentwork.studentprove.service.StudentProveService; import com.goisan.survey.bean.*; import com.goisan.survey.service.SurveyAnswerService; import com.goisan.survey.service.SurveyPersonService; import com.goisan.survey.service.SurveyQuestionService; import com.goisan.survey.service.SurveyService; import com.goisan.system.bean.Student; import com.goisan.system.tools.CommonUtil; import com.goisan.system.tools.Message; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; import java.util.List; import java.util.Map; @Controller public class SurveyAnswerController { @Resource private SurveyAnswerService surveyAnswerService; @Resource private SurveyPersonService surveyPersonService; @Resource private SurveyService surveyService; @Resource private SurveyQuestionService surveyQuestionService; @Resource private StudentProveService studentProveService; @RequestMapping("/survey/answer/toSurveyAnswerList") public ModelAndView toList() { ModelAndView mv = new ModelAndView("/core/survey/answer/surveyAnswerList"); return mv; } @ResponseBody @RequestMapping("/survey/answer/getSurveyAnswerList") public Map getList(Survey surveyAnswer) { Student student = studentProveService.getStudentByStudentId(CommonUtil.getPersonId()); if (null == student) { CommonUtil.save(surveyAnswer); } else { surveyAnswer.setCreator(student.getStudentId()); surveyAnswer.setCreateDept(student.getClassId()); } return CommonUtil.tableMap(surveyAnswerService.getSurveyAnswerListByUserId(surveyAnswer)); } @RequestMapping("/survey/answer/toSurveyAnswerAdd") public ModelAndView toAdd(Model model) { ModelAndView mv = new ModelAndView("/core/survey/answer/surveyAnswerEdit"); mv.addObject("head", "新增"); return mv; } @RequestMapping("/survey/answer/toAnswer") public ModelAndView toAnswer(String id) { ModelAndView mv = new ModelAndView("/core/survey/answer/surveyAnswer"); mv.addObject("data", surveyService.getSurveyById(id)); SurveyQuestion surveyQuestion = new SurveyQuestion(); surveyQuestion.setSurveyId(id); List<SurveyQuestion> questionList = surveyQuestionService.getSurveyQuestionList(surveyQuestion); mv.addObject("questionList", questionList); SurveyOption surveyOption = new SurveyOption(); surveyOption.setSurveyId(id); // List optionList = surveyOptionService.getSurveyOptionList(surveyOption); // mv.addObject("optionList",optionList); mv.addObject("surveyId",id); mv.addObject("qList", CommonUtil.jsonUtil(questionList)); return mv; } @ResponseBody @RequestMapping("/survey/answer/insertSurveyAnswer") public Message insertSurveyAnswer(String returnValue , String surveyId) { surveyAnswerService.insertSurveyAnswer(returnValue , surveyId); return new Message(0, "添加成功!", null); } @ResponseBody @RequestMapping("/survey/answer/saveSurveyAnswer") public Message save(SurveyAnswer surveyAnswer) { if (null == surveyAnswer.getAnswerId() || "".equals(surveyAnswer.getAnswerId())) { surveyAnswer.setAnswerId(CommonUtil.getUUID()); CommonUtil.save(surveyAnswer); surveyAnswerService.saveSurveyAnswer(surveyAnswer); SurveyPerson survey = new SurveyPerson(); survey.setSurveyId(surveyAnswer.getSurveyId()); CommonUtil.update(survey); surveyPersonService.updateSurveyPersonFlag(survey); return new Message(0, "添加成功!", null); } else { CommonUtil.update(surveyAnswer); surveyAnswerService.updateSurveyAnswer(surveyAnswer); return new Message(0, "修改成功!", null); } } @RequestMapping("/survey/answer/toSurveyAnswerEdit") public ModelAndView toEdit(String id) { ModelAndView mv = new ModelAndView("/core/survey/answer/surveyAnswerEdit"); mv.addObject("data", surveyAnswerService.getSurveyAnswerById(id)); mv.addObject("head", "修改"); return mv; } @ResponseBody @RequestMapping("/survey/answer/delSurveyAnswer") public Message del(String id) { surveyAnswerService.delSurveyAnswer(id); return new Message(0, "删除成功!", null); } }
[ "1240414272" ]
1240414272
ec3910adf6c3f20f1d0d76927d338b4d80ae2849
f0c8c8d0454a1881ff9a1a7445137eda9d129d59
/src/main/java/Day1/lab3/MyClass.java
dbc19726bb451e439da99870d6fdc2d4af042239
[]
no_license
Mostafayehya/ITI-Java-IO
decc9f212602b5d610ea56e72688dba842bab48c
0148db1813bb2e86e6380dd25b03bdba20793103
refs/heads/master
2023-03-06T19:18:58.046487
2021-02-07T09:44:42
2021-02-07T09:44:42
335,735,089
1
0
null
null
null
null
UTF-8
Java
false
false
421
java
package Day1.lab3; import java.io.Serializable; public class MyClass implements Serializable { String s; int i; double d; transient String demo = "Non Transient Attribute"; public MyClass(String s, int i, double d) { this.s = s; this.i = i; this.d = d; } public String toString() { return "s= " + s + "; i= " + i + "; d= " + d + "; demo= " + demo; } }
[ "mostafayehyax23@gmail.com" ]
mostafayehyax23@gmail.com
04d5c44ae30e651564a5f204d7c3dc67bac46c48
9b2d81b79f5b85e3d5fe708abd4624782eb00535
/src/main/java/scan/effect/ReturnValueEffect.java
fe832df9a6715027f0dfaa24ff549a7ca61e8fb1
[]
no_license
Martoon-00/bytecodes
d80f2182ae4b93a674545429919e1384699a4fad
52e7afd729bc8e40dc5fada370deb86aa0fe9c90
refs/heads/master
2021-01-24T23:52:13.391007
2016-06-03T20:45:42
2016-06-03T20:45:42
56,929,199
0
0
null
null
null
null
UTF-8
Java
false
false
207
java
package scan.effect; import scan.ref.Ref; public class ReturnValueEffect implements Effect { private final Ref result; public ReturnValueEffect(Ref result) { this.result = result; } }
[ "Martoon_00@mail.ru" ]
Martoon_00@mail.ru
b8810c0b223dee988d793989d9c4141c473c24e0
12871c9669510be3e57e48c4883bb3ad24e0afd7
/inflearn/src/main/java/codingtest/navfi/n02/P1.java
292fcce40bc483b251f656bc41fd0c1152ad9468
[]
no_license
yjs2952/algorithmStudy
e609406622e00935b74d5ce780a78ba467e2d147
207f9d4d331f9254cb3fd43b1e8d91c4d822ef95
refs/heads/master
2021-11-17T15:57:09.922189
2021-11-06T03:20:47
2021-11-06T03:20:47
246,577,497
0
0
null
null
null
null
UTF-8
Java
false
false
690
java
package codingtest.navfi.n02; public class P1 { public static void main(String[] args) { solution(123500900); } private static void solution(int N) { int enable_print = N % 10; while (N > 0) { // System.out.println("enable_print = " + enable_print); // System.out.println("N =" + N); if (enable_print == 0 && N % 10 != 0) { enable_print = 1; System.out.print(N % 10); } else if (enable_print == 1){ System.out.print(N % 10); // 1 } // System.out.println(); N = N / 10; } System.out.println(); // 2 } }
[ "yjs2952@naver.com" ]
yjs2952@naver.com
8a2e4eafeb5ba194db57c1ea17374b019a925f9b
5f11cd3f0d7c85d2676d8ca4bf97940abd6d9849
/src/tag/com/coco/tag/ui/TreeTag.java
12e7aeddcd6f00c873c5be2c9dfbe9ae27116d8d
[]
no_license
112067416/Sino
e479c945914875243f8b7de10c8826a3f2cff7bf
167b85c81911ea6954b5d2698832f6ad1f412d8d
refs/heads/master
2020-04-22T02:21:40.768749
2015-05-06T06:41:45
2015-05-06T06:41:45
35,143,663
1
0
null
null
null
null
UTF-8
Java
false
false
3,138
java
package com.coco.tag.ui; import java.io.IOException; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyTagSupport; public class TreeTag extends BodyTagSupport { /** * <p> * </p> */ private static final long serialVersionUID = 1L; protected String id; protected String tree; protected String uri; protected String cssClass; protected String cssStyle; protected String iconPath; @Override public int doEndTag() throws JspException { try { pageContext.getOut().write("//-->\r\n</script>"); } catch (IOException e) { throw new JspException(e); } return EVAL_PAGE; } @Override public int doStartTag() throws JspException { String $id = id != null ? id.replaceAll("[^_A-Za-z]", "") : ""; String $tree = tree != null ? tree.replaceAll("[^_A-Za-z]", "") : ""; String $uri = uri; if ($uri == null) $uri = ""; else $uri = $uri.trim(); if ($id.isEmpty() || $tree.isEmpty() || $uri.isEmpty()) { return SKIP_BODY; } StringBuilder content = new StringBuilder(); content.append("<div id=\""); content.append($id); content.append("\""); if (cssClass != null) { content.append(" class=\""); content.append(cssClass); content.append("\""); } if (cssStyle != null) { content.append(" style=\""); content.append(cssStyle); content.append("\""); } content.append("></div>"); content.append("<script type=\"text/javascript\" language=\"javascript\" >\r\n<!--\r\n"); content.append("var "); content.append($tree); content.append(" = new Cocotree(\""); content.append($tree); content.append("\");\r\n"); content.append($tree); content.append(".iconPath=\""); content.append(pageContext.getServletContext().getContextPath()); if (iconPath == null || (iconPath = iconPath.trim()).isEmpty()) { content.append("/images/tree/\";\r\n"); } else { content.append(iconPath).append("/\";\r\n"); } content.append($tree).append(".onload(\"").append($id).append("\",\""); if ($uri.startsWith("/")) { content.append(pageContext.getServletContext().getContextPath()); } content.append($uri); content.append("\");\r\n"); try { pageContext.getOut().write(content.toString()); } catch (IOException e) { throw new JspException(e); } return EVAL_BODY_INCLUDE; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUri() { return uri; } public void setUri(String uri) { this.uri = uri; } public String getCssClass() { return cssClass; } public void setCssClass(String cssClass) { this.cssClass = cssClass; } public String getCssStyle() { return cssStyle; } public void setCssStyle(String cssStyle) { this.cssStyle = cssStyle; } public String getTree() { return tree; } public void setTree(String tree) { this.tree = tree; } public String getIconPath() { return iconPath; } public void setIconPath(String iconPath) { this.iconPath = iconPath; } }
[ "112067416@qq.com" ]
112067416@qq.com
dc46f4b8475fbf6083a6ed9af297be850317ec44
85bf61170c4dd7068b5e67bc36197cc452a9cc94
/bbb-screenshare/app/src/main/java/org/bigbluebutton/app/screenshare/server/servlet/JnlpConfigurator.java
755ba59cdc99638fb14fae5bcdf771dc190ccd9f
[]
no_license
ykren/bigbluebutton
88981c34841b31e7c46e7b3bba7c151e36f65d0e
02c977c7256aa2162a823af31a2df78d64d022f5
refs/heads/master
2020-04-01T14:20:55.763821
2016-07-12T19:10:11
2016-07-12T19:10:11
63,211,176
2
0
null
2016-07-13T03:27:41
2016-07-13T03:27:40
null
UTF-8
Java
false
false
1,324
java
package org.bigbluebutton.app.screenshare.server.servlet; import org.bigbluebutton.app.screenshare.IScreenShareApplication; import org.bigbluebutton.app.screenshare.ScreenShareInfo; import org.bigbluebutton.app.screenshare.ScreenShareInfoResponse; public class JnlpConfigurator { private String jnlpUrl; private IScreenShareApplication screenShareApplication; private String streamBaseUrl; private String codecOptions; public String getJnlpUrl() { return jnlpUrl; } public void setJnlpUrl(String url) { this.jnlpUrl = url; } public void setStreamBaseUrl(String baseUrl) { streamBaseUrl = baseUrl; } public String getStreamBaseUrl() { return streamBaseUrl; } public void setCodecOptions(String codeOptions) { this.codecOptions = codeOptions; } public String getCodecOptions() { return codecOptions; } public ScreenShareInfo getScreenShareInfo(String meetingId, String token) { ScreenShareInfoResponse resp = screenShareApplication.getScreenShareInfo(meetingId, token); if (resp.error != null) return null; else return resp.info; } public void setApplication(IScreenShareApplication screenShareApplication) { this.screenShareApplication = screenShareApplication; } }
[ "ritzalam@gmail.com" ]
ritzalam@gmail.com
629a65c34c281f633e77c6232ad7709a42c1e636
13ef5b7aab8afc11f6939c2dd8d68f3ac1fef308
/src/main/java/cn/com/zhihetech/online/service/ILoginJournalService.java
43fbf275affde862effbe0bbfe9863e2b53fc431
[]
no_license
lydja520/zhihe-online
5a3873ae368587e2d2ddf94afe9e04c69934b294
515ecefed95332e1559faa4d820d0895f24a1b28
refs/heads/master
2020-06-29T06:55:40.414598
2016-11-22T07:05:24
2016-11-22T07:05:24
74,444,464
0
1
null
null
null
null
UTF-8
Java
false
false
614
java
package cn.com.zhihetech.online.service; import cn.com.zhihetech.online.bean.LoginJournal; import cn.com.zhihetech.util.hibernate.IQueryParams; import cn.com.zhihetech.util.hibernate.commons.Pager; import java.util.List; /** * Created by ShenYunjie on 2016/4/19. */ public interface ILoginJournalService extends UpgradedService<LoginJournal> { /** * 不管是否登录成功都要保存登录日志 * * @param journal * @return */ LoginJournal saveJournalAlways(LoginJournal journal); List<Object> getProperty(String selector, Pager pager, IQueryParams queryParams); }
[ "lydja@qq.com" ]
lydja@qq.com
d5b2e42dab05fb643938753faea6fc195d361c45
44e18ca299a845b1df0135552d20fc14ba023e76
/ph-matrix/src/main/java/com/helger/matrix/CholeskyDecomposition.java
bf4d53d2e2147c2b7b26015edf74cb26ebdcd506
[ "Apache-2.0" ]
permissive
dliang2000/ph-commons
fb25f68f840e1ee0c5a6086498f681209738009d
397300ee7fb81bfa7dd4f8665d13ce7e0e6fe09a
refs/heads/master
2022-07-03T03:39:21.618644
2020-05-04T00:28:55
2020-05-08T04:03:28
260,987,902
1
0
null
2020-05-03T17:51:16
2020-05-03T17:51:16
null
UTF-8
Java
false
false
6,614
java
/** * Copyright (C) 2014-2020 Philip Helger (www.helger.com) * philip[at]helger[dot]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 com.helger.matrix; import java.io.Serializable; import javax.annotation.Nonnull; import com.helger.commons.annotation.ReturnsMutableCopy; import com.helger.commons.equals.EqualsHelper; /** * Cholesky Decomposition. * <P> * For a symmetric, positive definite matrix A, the Cholesky decomposition is an * lower triangular matrix L so that A = L*L'. * <P> * If the matrix is not symmetric or positive definite, the constructor returns * a partial decomposition and sets an internal flag that may be queried by the * isSPD() method. */ public class CholeskyDecomposition implements Serializable { /** * Array for internal storage of decomposition. * * @serial internal array storage. */ private final double [] [] m_aData; /** * Row and column dimension (square matrix). * * @serial matrix dimension. */ private final int m_nDim; /** * Symmetric and positive definite flag. * * @serial is symmetric and positive definite flag. */ private final boolean m_bIsSPD; /** * Cholesky algorithm for symmetric and positive definite matrix. Structure to * access L and isspd flag. * * @param aMatrix * Square, symmetric matrix. */ public CholeskyDecomposition (@Nonnull final Matrix aMatrix) { // Initialize. final double [] [] aArray = aMatrix.internalGetArray (); m_nDim = aMatrix.getRowDimension (); m_aData = new double [m_nDim] [m_nDim]; boolean bIsSPD = (aMatrix.getColumnDimension () == m_nDim); // Main loop. for (int nRow = 0; nRow < m_nDim; nRow++) { final double [] aArrayJ = aArray[nRow]; final double [] aRowJ = m_aData[nRow]; double d = 0.0; for (int nCol = 0; nCol < nRow; nCol++) { final double [] aRowK = m_aData[nCol]; double s = 0.0; for (int i = 0; i < nCol; i++) s += aRowK[i] * aRowJ[i]; aRowJ[nCol] = s = (aArrayJ[nCol] - s) / aRowK[nCol]; d += s * s; bIsSPD = bIsSPD && EqualsHelper.equals (aArray[nCol][nRow], aArrayJ[nCol]); } d = aArrayJ[nRow] - d; bIsSPD = bIsSPD && (d > 0.0); aRowJ[nRow] = Math.sqrt (Math.max (d, 0.0)); for (int k = nRow + 1; k < m_nDim; k++) aRowJ[k] = 0.0; } m_bIsSPD = bIsSPD; } /* * ------------------------ Temporary, experimental code. * ------------------------ *\ \** Right Triangular Cholesky Decomposition. * <P> For a symmetric, positive definite matrix A, the Right Cholesky * decomposition is an upper triangular matrix R so that A = R'*R. This * constructor computes R with the Fortran inspired column oriented algorithm * used in LINPACK and MATLAB. In Java, we suspect a row oriented, lower * triangular decomposition is faster. We have temporarily included this * constructor here until timing experiments confirm this suspicion.\ \** * Array for internal storage of right triangular decomposition. **\ private * transient double[][] R; \** Cholesky algorithm for symmetric and positive * definite matrix. * @param A Square, symmetric matrix. * @param rightflag Actual value ignored. * @return Structure to access R and isspd flag.\ public CholeskyDecomposition * (Matrix Arg, int rightflag) { // Initialize. double[][] A = Arg.getArray(); * n = Arg.getColumnDimension(); R = new double[n][n]; isspd = * (Arg.getColumnDimension() == n); // Main loop. for (int j = 0; j < n; j++) * { double d = 0.0; for (int k = 0; k < j; k++) { double s = A[k][j]; for * (int i = 0; i < k; i++) { s = s - R[i][k]*R[i][j]; } R[k][j] = s = * s/R[k][k]; d = d + s*s; isspd = isspd & (A[k][j] == A[j][k]); } d = A[j][j] * - d; isspd = isspd & (d > 0.0); R[j][j] = Math.sqrt(Math.max(d,0.0)); for * (int k = j+1; k < n; k++) { R[k][j] = 0.0; } } } \** Return upper * triangular factor. * @return R\ public Matrix getR () { return new Matrix(R,n,n); } \* * ------------------------ End of temporary code. ------------------------ */ /** * Is the matrix symmetric and positive definite? * * @return true if A is symmetric and positive definite. */ public boolean isSPD () { return m_bIsSPD; } /** * Return triangular factor. * * @return L */ @Nonnull @ReturnsMutableCopy public Matrix getL () { return new Matrix (m_aData, m_nDim, m_nDim); } /** * Solve A*X = B * * @param aMatrix * A Matrix with as many rows as A and any number of columns. * @return X so that L*L'*X = B * @exception IllegalArgumentException * Matrix row dimensions must agree. * @exception RuntimeException * Matrix is not symmetric positive definite. */ @Nonnull @ReturnsMutableCopy public Matrix solve (@Nonnull final Matrix aMatrix) { if (aMatrix.getRowDimension () != m_nDim) throw new IllegalArgumentException ("Matrix row dimensions must agree."); if (!m_bIsSPD) throw new IllegalStateException ("Matrix is not symmetric positive definite."); // Copy right hand side. final double [] [] aArray = aMatrix.getArrayCopy (); final int nCols = aMatrix.getColumnDimension (); // Solve L*Y = B; for (int k = 0; k < m_nDim; k++) { final double [] aDataK = m_aData[k]; final double [] aArrayK = aArray[k]; for (int j = 0; j < nCols; j++) { for (int i = 0; i < k; i++) { aArrayK[j] -= aArray[i][j] * aDataK[i]; } aArrayK[j] /= aDataK[k]; } } // Solve L'*X = Y; for (int k = m_nDim - 1; k >= 0; k--) { final double [] aDataK = m_aData[k]; final double [] aArrayK = aArray[k]; for (int j = 0; j < nCols; j++) { for (int i = k + 1; i < m_nDim; i++) { aArrayK[j] -= aArray[i][j] * m_aData[i][k]; } aArrayK[j] /= aDataK[k]; } } return new Matrix (aArray, m_nDim, nCols); } }
[ "philip@helger.com" ]
philip@helger.com
eb6360f80a000c62202c45d377748bf6679a3520
cab6209752a821afdaa09f7ffe6918bdd7545db2
/JavaLabMessageQueuePack/JavaLabMessageQueue/src/main/java/server/configs/ApplicationConfig.java
8cbf459102137ab0782057b6fb21b1e7d2ba6197
[]
no_license
Nail-Salimov/JavaLabHomeWork
e3d48f1c558eb21624a8ea43d4ebebf46c077e18
6f2d5912144c536733d8d5b75cc49a0547361a11
refs/heads/master
2022-12-21T20:25:14.839937
2020-06-01T20:20:16
2020-06-01T20:20:16
250,048,993
0
0
null
2022-12-16T16:11:47
2020-03-25T17:42:58
Java
UTF-8
Java
false
false
1,234
java
package server.configs; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer; import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver; @Configuration @ComponentScan("server") public class ApplicationConfig { @Bean public ObjectMapper objectMapper() { return new ObjectMapper(); } @Bean public FreeMarkerConfigurer freemarkerConfig() { FreeMarkerConfigurer freeMarkerConfigurer = new FreeMarkerConfigurer(); freeMarkerConfigurer.setTemplateLoaderPath("/templates/"); return freeMarkerConfigurer; } @Bean public ViewResolver freeMarkerViewResolver() { FreeMarkerViewResolver viewResolver = new FreeMarkerViewResolver(); viewResolver.setCache(true); viewResolver.setPrefix(""); viewResolver.setSuffix(".ftl"); viewResolver.setContentType("text/html; charset=UTF-8"); return viewResolver; } }
[ "nail0205@mail.ru" ]
nail0205@mail.ru
74454a2eb7723226852dd860ed8e168a2e6ac6a1
608cf243607bfa7a2f4c91298463f2f199ae0ec1
/android/versioned-abis/expoview-abi40_0_0/src/main/java/abi40_0_0/expo/modules/contacts/models/EmailModel.java
61db76818b66fc590c9b7fee2d977c6d6e6dbdce
[ "MIT", "BSD-3-Clause", "Apache-2.0" ]
permissive
kodeco835/symmetrical-happiness
ca79bd6c7cdd3f7258dec06ac306aae89692f62a
4f91cb07abef56118c35f893d9f5cc637b9310ef
refs/heads/master
2023-04-30T04:02:09.478971
2021-03-23T03:19:05
2021-03-23T03:19:05
350,565,410
0
1
MIT
2023-04-12T19:49:48
2021-03-23T03:18:02
Objective-C
UTF-8
Java
false
false
1,030
java
package abi40_0_0.expo.modules.contacts.models; import android.database.Cursor; import android.provider.ContactsContract; import abi40_0_0.expo.modules.contacts.EXColumns; public class EmailModel extends BaseModel { @Override public String getContentType() { return ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE; } @Override public String getDataAlias() { return "email"; } @Override protected String getLabelFromCursor(Cursor cursor) { String label = super.getLabelFromCursor(cursor); if (label != null) return label; switch (cursor.getInt(cursor.getColumnIndex(EXColumns.TYPE))) { case ContactsContract.CommonDataKinds.Email.TYPE_HOME: return "home"; case ContactsContract.CommonDataKinds.Email.TYPE_WORK: return "work"; case ContactsContract.CommonDataKinds.Email.TYPE_MOBILE: return "mobile"; case ContactsContract.CommonDataKinds.Email.TYPE_OTHER: return "other"; default: return "unknown"; } } }
[ "81201147+kodeco835@users.noreply.github.com" ]
81201147+kodeco835@users.noreply.github.com
623812081d7d6e01ef30350472b35c85cd9f0645
4be3b9760d71232899496b96011895235d24a18f
/src/main/java/el/selenium/model/ElementDescription.java
fdd3c645b86ca1c79b0d65031f78840ebda149ed
[]
no_license
davithbul/el-selenium
caf516769aa38f4d85867e427225d018bba8237a
d2c5c98d7f81e0eb39d2106d36cba28269058ab2
refs/heads/master
2020-03-10T03:16:44.648272
2018-04-15T12:35:28
2018-04-15T12:35:28
129,160,333
0
0
null
null
null
null
UTF-8
Java
false
false
406
java
package el.selenium.model; import org.apache.http.annotation.Immutable; import org.openqa.selenium.By; /** * Describes single element, might or might not be nested element. */ @Immutable public class ElementDescription { private final By selector; public ElementDescription(By selector) { this.selector = selector; } public By getSelector() { return selector; } }
[ "davithbul@gmail.com" ]
davithbul@gmail.com
9f06da7557d7362eeb2e5b890040a357a87b01a2
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_42/Testnull_4171.java
fa5d3ca735425cd3b94b7292b817b9d9d1cbb34d
[]
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
304
java
package org.gradle.test.performancenull_42; import static org.junit.Assert.*; public class Testnull_4171 { private final Productionnull_4171 production = new Productionnull_4171("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
7f4b156cb15d00ef05931d3292a37f93bfa60e7b
de7b67d4f8aa124f09fc133be5295a0c18d80171
/workspace_java-src/java-src-test/src/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java
d765f5bd64d4e9ebce6f140cf78e53604ac001d9
[]
no_license
lin-lee/eclipse_workspace_test
adce936e4ae8df97f7f28965a6728540d63224c7
37507f78bc942afb11490c49942cdfc6ef3dfef8
refs/heads/master
2021-05-09T10:02:55.854906
2018-01-31T07:19:02
2018-01-31T07:19:02
119,460,523
0
1
null
null
null
null
UTF-8
Java
false
false
3,520
java
/* * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ /** * * @author SAAJ RI Development Team */ package com.sun.xml.internal.messaging.saaj.soap.ver1_1; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.namespace.QName; import javax.xml.soap.Name; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPElement; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderElementImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; public class HeaderElement1_1Impl extends HeaderElementImpl { protected static final Logger log = Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN, "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings"); public HeaderElement1_1Impl(SOAPDocumentImpl ownerDoc, Name qname) { super(ownerDoc, qname); } public HeaderElement1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) { super(ownerDoc, qname); } public SOAPElement setElementQName(QName newName) throws SOAPException { HeaderElementImpl copy = new HeaderElement1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName); return replaceElementWithSOAPElement(this,copy); } protected NameImpl getActorAttributeName() { return NameImpl.create("actor", null, NameImpl.SOAP11_NAMESPACE); } // role not supported by SOAP 1.1 protected NameImpl getRoleAttributeName() { log.log( Level.SEVERE, "SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1", new String[] { "Role" }); throw new UnsupportedOperationException("Role not supported by SOAP 1.1"); } protected NameImpl getMustunderstandAttributeName() { return NameImpl.create("mustUnderstand", null, NameImpl.SOAP11_NAMESPACE); } // mustUnderstand attribute has literal value "1" or "0" protected String getMustunderstandLiteralValue(boolean mustUnderstand) { return (mustUnderstand == true ? "1" : "0"); } protected boolean getMustunderstandAttributeValue(String mu) { if ("1".equals(mu) || "true".equalsIgnoreCase(mu)) return true; return false; } // relay not supported by SOAP 1.1 protected NameImpl getRelayAttributeName() { log.log( Level.SEVERE, "SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1", new String[] { "Relay" }); throw new UnsupportedOperationException("Relay not supported by SOAP 1.1"); } protected String getRelayLiteralValue(boolean relayAttr) { log.log( Level.SEVERE, "SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1", new String[] { "Relay" }); throw new UnsupportedOperationException("Relay not supported by SOAP 1.1"); } protected boolean getRelayAttributeValue(String mu) { log.log( Level.SEVERE, "SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1", new String[] { "Relay" }); throw new UnsupportedOperationException("Relay not supported by SOAP 1.1"); } protected String getActorOrRole() { return getActor(); } }
[ "lilin@lvmama.com" ]
lilin@lvmama.com
e4ad0f2c56253db8cd17d6bc955b4f2f5d912dc8
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12798-19-5-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/velocity/internal/DefaultVelocityEngine_ESTest_scaffolding.java
1565e300691203168cba88f32a0bd719d5e3e05f
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Apr 03 19:41:39 UTC 2020 */ package org.xwiki.velocity.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultVelocityEngine_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
bc14cfda891d242f617581ee76383b514036281f
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.3.5/sources/com/google/android/gms/maps/model/TileProvider.java
c671009b3314658c5ed36a9d2cbf7ac4594e6d01
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
183
java
package com.google.android.gms.maps.model; public interface TileProvider { public static final Tile NO_TILE = new Tile(-1, -1, null); Tile getTile(int i, int i2, int i3); }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
c58d17e1094fd5da5e4069caa6c85e875d5c22db
d801bcd283e8702bff5898dd09d17a03fb1f4d56
/src/main/java/org/mvbus/encode/ContractMessagingEngine.java
020a681dd02ced937696ca89aca8d395eeee8c79
[]
no_license
mikebrock/mvbus
361d51a9782152c7884d18e95113f6b235e69c28
6b33d3a9d13c360d072a6ed7c2d1c4e575857f48
refs/heads/master
2016-09-06T13:33:43.633256
2011-01-17T19:20:06
2011-01-17T19:20:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
260
java
package org.mvbus.encode; import java.io.IOException; import java.io.OutputStream; public interface ContractMessagingEngine { public <T extends OutputStream> ContractMessagingEngine encode(T stream, Object toEncode, boolean parity) throws IOException; }
[ "brockm@gmail.com" ]
brockm@gmail.com
22703482732b0fe759056355464c1749bbd6698b
9410ef0fbb317ace552b6f0a91e0b847a9a841da
/src/main/java/com/tencentcloudapi/tcaplusdb/v20190823/models/SetTableDataFlowResponse.java
fb621979854ce87f62aa96b1b5a7f0308eb6dfca
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java-intl-en
274de822748bdb9b4077e3b796413834b05f1713
6ca868a8de6803a6c9f51af7293d5e6dad575db6
refs/heads/master
2023-09-04T05:18:35.048202
2023-09-01T04:04:14
2023-09-01T04:04:14
230,567,388
7
4
Apache-2.0
2022-05-25T06:54:45
2019-12-28T06:13:51
Java
UTF-8
Java
false
false
4,532
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.tcaplusdb.v20190823.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class SetTableDataFlowResponse extends AbstractModel{ /** * The number of tables for which data subscription has been enabled */ @SerializedName("TotalCount") @Expose private Long TotalCount; /** * The result list of tables for which data subscription has been enabled */ @SerializedName("TableResults") @Expose private TableResultNew [] TableResults; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get The number of tables for which data subscription has been enabled * @return TotalCount The number of tables for which data subscription has been enabled */ public Long getTotalCount() { return this.TotalCount; } /** * Set The number of tables for which data subscription has been enabled * @param TotalCount The number of tables for which data subscription has been enabled */ public void setTotalCount(Long TotalCount) { this.TotalCount = TotalCount; } /** * Get The result list of tables for which data subscription has been enabled * @return TableResults The result list of tables for which data subscription has been enabled */ public TableResultNew [] getTableResults() { return this.TableResults; } /** * Set The result list of tables for which data subscription has been enabled * @param TableResults The result list of tables for which data subscription has been enabled */ public void setTableResults(TableResultNew [] TableResults) { this.TableResults = TableResults; } /** * Get The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @return RequestId The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ public String getRequestId() { return this.RequestId; } /** * Set The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @param RequestId The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } public SetTableDataFlowResponse() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public SetTableDataFlowResponse(SetTableDataFlowResponse source) { if (source.TotalCount != null) { this.TotalCount = new Long(source.TotalCount); } if (source.TableResults != null) { this.TableResults = new TableResultNew[source.TableResults.length]; for (int i = 0; i < source.TableResults.length; i++) { this.TableResults[i] = new TableResultNew(source.TableResults[i]); } } if (source.RequestId != null) { this.RequestId = new String(source.RequestId); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "TotalCount", this.TotalCount); this.setParamArrayObj(map, prefix + "TableResults.", this.TableResults); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
d5b44dcdee8294392a785cfbea741f69917eed0c
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/privacy-friendly-netmonitor-2.0/DecompiledCode/Fernflower/src/main/java/android/support/v4/media/session/PlaybackStateCompatApi22.java
888d6d8b4fede38c4b9cdcd67ce7614017bbbbc7
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,069
java
package android.support.v4.media.session; import android.media.session.PlaybackState; import android.media.session.PlaybackState.Builder; import android.media.session.PlaybackState.CustomAction; import android.os.Bundle; import android.support.annotation.RequiresApi; import java.util.Iterator; import java.util.List; @RequiresApi(22) class PlaybackStateCompatApi22 { public static Bundle getExtras(Object var0) { return ((PlaybackState)var0).getExtras(); } public static Object newInstance(int var0, long var1, long var3, float var5, long var6, CharSequence var8, long var9, List var11, long var12, Bundle var14) { Builder var15 = new Builder(); var15.setState(var0, var1, var5, var9); var15.setBufferedPosition(var3); var15.setActions(var6); var15.setErrorMessage(var8); Iterator var16 = var11.iterator(); while(var16.hasNext()) { var15.addCustomAction((CustomAction)var16.next()); } var15.setActiveQueueItemId(var12); var15.setExtras(var14); return var15.build(); } }
[ "crash@home.home.hr" ]
crash@home.home.hr
3a0695100f9660ff27fdc01546252e8a1cc6db4d
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/cccxspace-20191128/src/main/java/com/aliyun/cccxspace20191128/models/InitPlayAlimeSopShrinkRequest.java
749454b7420083cb172cc4301749b7120bc29656
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
4,308
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.cccxspace20191128.models; import com.aliyun.tea.*; public class InitPlayAlimeSopShrinkRequest extends TeaModel { @NameInMap("App") public InitPlayAlimeSopShrinkRequestApp app; @NameInMap("ExtParams") public String extParamsShrink; @NameInMap("InstanceId") public String instanceId; @NameInMap("Member") public InitPlayAlimeSopShrinkRequestMember member; @NameInMap("SopFlowId") public String sopFlowId; public static InitPlayAlimeSopShrinkRequest build(java.util.Map<String, ?> map) throws Exception { InitPlayAlimeSopShrinkRequest self = new InitPlayAlimeSopShrinkRequest(); return TeaModel.build(map, self); } public InitPlayAlimeSopShrinkRequest setApp(InitPlayAlimeSopShrinkRequestApp app) { this.app = app; return this; } public InitPlayAlimeSopShrinkRequestApp getApp() { return this.app; } public InitPlayAlimeSopShrinkRequest setExtParamsShrink(String extParamsShrink) { this.extParamsShrink = extParamsShrink; return this; } public String getExtParamsShrink() { return this.extParamsShrink; } public InitPlayAlimeSopShrinkRequest setInstanceId(String instanceId) { this.instanceId = instanceId; return this; } public String getInstanceId() { return this.instanceId; } public InitPlayAlimeSopShrinkRequest setMember(InitPlayAlimeSopShrinkRequestMember member) { this.member = member; return this; } public InitPlayAlimeSopShrinkRequestMember getMember() { return this.member; } public InitPlayAlimeSopShrinkRequest setSopFlowId(String sopFlowId) { this.sopFlowId = sopFlowId; return this; } public String getSopFlowId() { return this.sopFlowId; } public static class InitPlayAlimeSopShrinkRequestApp extends TeaModel { @NameInMap("Locale") public String locale; @NameInMap("Name") public String name; @NameInMap("Platform") public String platform; @NameInMap("TerminalType") public String terminalType; public static InitPlayAlimeSopShrinkRequestApp build(java.util.Map<String, ?> map) throws Exception { InitPlayAlimeSopShrinkRequestApp self = new InitPlayAlimeSopShrinkRequestApp(); return TeaModel.build(map, self); } public InitPlayAlimeSopShrinkRequestApp setLocale(String locale) { this.locale = locale; return this; } public String getLocale() { return this.locale; } public InitPlayAlimeSopShrinkRequestApp setName(String name) { this.name = name; return this; } public String getName() { return this.name; } public InitPlayAlimeSopShrinkRequestApp setPlatform(String platform) { this.platform = platform; return this; } public String getPlatform() { return this.platform; } public InitPlayAlimeSopShrinkRequestApp setTerminalType(String terminalType) { this.terminalType = terminalType; return this; } public String getTerminalType() { return this.terminalType; } } public static class InitPlayAlimeSopShrinkRequestMember extends TeaModel { @NameInMap("Id") public String id; @NameInMap("Nick") public String nick; public static InitPlayAlimeSopShrinkRequestMember build(java.util.Map<String, ?> map) throws Exception { InitPlayAlimeSopShrinkRequestMember self = new InitPlayAlimeSopShrinkRequestMember(); return TeaModel.build(map, self); } public InitPlayAlimeSopShrinkRequestMember setId(String id) { this.id = id; return this; } public String getId() { return this.id; } public InitPlayAlimeSopShrinkRequestMember setNick(String nick) { this.nick = nick; return this; } public String getNick() { return this.nick; } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
d3ac679270e5123c066e281d001bbdc7b16ed5fa
641bef5ff6933a35a573e30edef68adaad056844
/gmall-api/src/main/java/com/atguigu/gmall/sms/service/FlashPromotionService.java
b24c12dfe1623ab54ae8db4c0e02167701519de3
[]
no_license
MangoXL/gmall
ed853251628a2b10bb82edff4c64b28070b263dc
757903d2bdf3bcf16a8099ea74ae1eff3f6e023c
refs/heads/master
2020-05-07T08:33:10.490968
2019-04-09T09:42:43
2019-04-09T09:43:49
180,334,749
0
0
null
null
null
null
UTF-8
Java
false
false
321
java
package com.atguigu.gmall.sms.service; import com.atguigu.gmall.sms.entity.FlashPromotion; import com.baomidou.mybatisplus.extension.service.IService; /** * <p> * 限时购表 服务类 * </p> * * @author XiaoLe * @since 2019-03-19 */ public interface FlashPromotionService extends IService<FlashPromotion> { }
[ "740017278@qq.com" ]
740017278@qq.com
c02728a29e3df5a536d050ed58034610ab66c506
6635387159b685ab34f9c927b878734bd6040e7e
/src/com/google/android/gms/internal/zzwt.java
23c750fd7ea8fafbd03780b096262fa5a0b20547
[]
no_license
RepoForks/com.snapchat.android
987dd3d4a72c2f43bc52f5dea9d55bfb190966e2
6e28a32ad495cf14f87e512dd0be700f5186b4c6
refs/heads/master
2021-05-05T10:36:16.396377
2015-07-16T16:46:26
2015-07-16T16:46:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,954
java
package com.google.android.gms.internal; import java.io.IOException; import java.lang.reflect.Array; import java.util.ArrayList; import java.util.List; public class zzwt<M extends zzws<M>, T> { public final int tag; protected final int type; protected final Class<T> zzaHC; protected final boolean zzaHD; private zzwt(int paramInt1, Class<T> paramClass, int paramInt2, boolean paramBoolean) { type = paramInt1; zzaHC = paramClass; tag = paramInt2; zzaHD = paramBoolean; } @Deprecated public static <M extends zzws<M>, T extends zzwy> zzwt<M, T> zza(int paramInt1, Class<T> paramClass, int paramInt2) { return new zzwt(paramInt1, paramClass, paramInt2, false); } private T zzy(List<zzxa> paramList) { int j = 0; ArrayList localArrayList = new ArrayList(); int i = 0; while (i < paramList.size()) { localObject = (zzxa)paramList.get(i); if (zzaHN.length != 0) { zza((zzxa)localObject, localArrayList); } i += 1; } int k = localArrayList.size(); if (k == 0) { paramList = null; return paramList; } Object localObject = zzaHC.cast(Array.newInstance(zzaHC.getComponentType(), k)); i = j; for (;;) { paramList = (List<zzxa>)localObject; if (i >= k) { break; } Array.set(localObject, i, localArrayList.get(i)); i += 1; } } private T zzz(List<zzxa> paramList) { if (paramList.isEmpty()) { return null; } paramList = (zzxa)paramList.get(paramList.size() - 1); return (T)zzaHC.cast(zzz(zzwq.zzt(zzaHN))); } int zzF(Object paramObject) { if (zzaHD) { return zzG(paramObject); } return zzH(paramObject); } protected int zzG(Object paramObject) { int j = 0; int m = Array.getLength(paramObject); int i = 0; while (i < m) { int k = j; if (Array.get(paramObject, i) != null) { k = j + zzH(Array.get(paramObject, i)); } i += 1; j = k; } return j; } protected int zzH(Object paramObject) { int i = zzxb.zziI(tag); switch (type) { default: throw new IllegalArgumentException("Unknown type " + type); case 10: return zzwr.zzb(i, (zzwy)paramObject); } return zzwr.zzc(i, (zzwy)paramObject); } protected void zza(zzxa paramzzxa, List<Object> paramList) { paramList.add(zzz(zzwq.zzt(zzaHN))); } void zza(Object paramObject, zzwr paramzzwr) { if (zzaHD) { zzc(paramObject, paramzzwr); return; } zzb(paramObject, paramzzwr); } protected void zzb(Object paramObject, zzwr paramzzwr) { for (;;) { try { paramzzwr.zziA(tag); switch (type) { case 10: throw new IllegalArgumentException("Unknown type " + type); } } catch (IOException paramObject) { throw new IllegalStateException((Throwable)paramObject); } paramObject = (zzwy)paramObject; int i = zzxb.zziI(tag); paramzzwr.zzb((zzwy)paramObject); paramzzwr.zzC(i, 4); return; paramzzwr.zzc((zzwy)paramObject); return; } } protected void zzc(Object paramObject, zzwr paramzzwr) { int j = Array.getLength(paramObject); int i = 0; while (i < j) { Object localObject = Array.get(paramObject, i); if (localObject != null) { zzb(localObject, paramzzwr); } i += 1; } } final T zzx(List<zzxa> paramList) { if (paramList == null) { return null; } if (zzaHD) { return (T)zzy(paramList); } return (T)zzz(paramList); } protected Object zzz(zzwq paramzzwq) { Class localClass; if (zzaHD) { localClass = zzaHC.getComponentType(); } for (;;) { try { switch (type) { case 10: throw new IllegalArgumentException("Unknown type " + type); } } catch (InstantiationException paramzzwq) { throw new IllegalArgumentException("Error creating instance of class " + localClass, paramzzwq); localClass = zzaHC; continue; zzwy localzzwy = (zzwy)localClass.newInstance(); paramzzwq.zza(localzzwy, zzxb.zziI(tag)); return localzzwy; localzzwy = (zzwy)localClass.newInstance(); paramzzwq.zza(localzzwy); return localzzwy; } catch (IllegalAccessException paramzzwq) { throw new IllegalArgumentException("Error creating instance of class " + localClass, paramzzwq); } catch (IOException paramzzwq) { throw new IllegalArgumentException("Error reading extension field", paramzzwq); } } } } /* Location: * Qualified Name: com.google.android.gms.internal.zzwt * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
c95c32f538ff217cd1054b9f65a45b8e54023c02
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_6d456f5afe29a868bb8d9c782ff131a770b6b16d/EditableEpisodeListWidget/11_6d456f5afe29a868bb8d9c782ff131a770b6b16d_EditableEpisodeListWidget_s.java
79ae6652e56b3704cd65ee973a27dfe9eab58c38
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,576
java
/** * Copyright 2011 Colin Alworth * * 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.acme.gwt.client.widget; import com.acme.gwt.shared.TvEpisodeProxy; import com.colinalworth.celltable.columns.client.Columns; import com.colinalworth.celltable.columns.client.converters.IntegerConverter; import com.google.gwt.cell.client.EditTextCell; import com.google.gwt.core.client.GWT; import com.google.gwt.editor.client.Editor.Path; import com.google.gwt.editor.client.IsEditor; import com.google.gwt.editor.client.adapters.HasDataEditor; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.cellview.client.CellTable; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.Widget; /** * Facilitates editing episode info inline, not requiring any list, focus, edit, save, list cycle. * Also shows off the CellTable-Tools, for better or worse. * * * @author colin */ public class EditableEpisodeListWidget extends Composite implements IsEditor<HasDataEditor<TvEpisodeProxy>> { private static Binder uiBinder = GWT.create(Binder.class); interface Binder extends UiBinder<Widget, EditableEpisodeListWidget> { } interface EpisodeColumns extends Columns<TvEpisodeProxy> { @Editable @ConvertedWith(IntegerConverter.class) EditTextCell season();//erp int != String @Editable @ConvertedWith(IntegerConverter.class) EditTextCell episodeNumber();// int != String @Editable EditTextCell name(); } private EpisodeColumns columns = GWT.create(EpisodeColumns.class); @Path("") HasDataEditor<TvEpisodeProxy> listEd; @UiField(provided = true) CellTable<TvEpisodeProxy> list = new CellTable<TvEpisodeProxy>(); public EditableEpisodeListWidget() { listEd = HasDataEditor.of(list); columns.configure(list); initWidget(uiBinder.createAndBindUi(this)); } @Override public HasDataEditor<TvEpisodeProxy> asEditor() { return listEd; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1cc54b82d670f1c7696b91d2718c3362eb3649e7
e737a537195a431fe255fa3839a1e337d806a372
/java/src/concurrencies/frameworks/enable_async_hystrix_spring/com/enableasync/async/sampleservice/model/EmployeePhone.java
59dec91c8d106b91429edb0eeef3ca71f7322ba2
[]
no_license
iceleeyo/concurrency
132e9444fe20e5c80efd5c13d477af7e5c3a5d13
fa8a1d1ccad92330c17ae4b7e34d17c65076a7a4
refs/heads/master
2023-05-09T09:11:36.706861
2020-09-10T10:52:15
2020-09-10T10:52:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
551
java
package com.enableasync.async.sampleservice.model; import java.io.Serializable; import java.util.List; public class EmployeePhone implements Serializable{ /** * */ private static final long serialVersionUID = 3705958972000701963L; public List<String> phoneNumbers; public List<String> getPhoneNumbers() { return phoneNumbers; } public void setPhoneNumbers(List<String> phoneNumbers) { this.phoneNumbers = phoneNumbers; } @Override public String toString() { return "EmployeeAddress [phoneNumbers=" + phoneNumbers + "]"; } }
[ "tinvuquang@admicro.vn" ]
tinvuquang@admicro.vn
f9a41638408ee35000d088296d077cd329696a71
175d61ce108f0e029260ea91145328e377f6dc80
/common/src/main/java/org/red5/server/api/so/ISharedObjectBase.java
97cb918c8772317523ef980f1ee22acf4f2609b6
[ "Apache-2.0" ]
permissive
Red5/red5-server
e4e126046cdb3757ae2d3a9a7761e3a3a8610e10
3ff4e67da6bc2445dd4e372131f9cd3d20a225a1
refs/heads/master
2023-08-28T00:36:30.077773
2023-07-07T20:20:42
2023-07-07T20:20:42
14,514,767
3,445
1,105
Apache-2.0
2023-09-06T03:04:11
2013-11-19T05:04:10
Java
UTF-8
Java
false
false
4,044
java
/* * RED5 Open Source Media Server - https://github.com/Red5/ Copyright 2006-2016 by respective authors (see below). All rights reserved. Licensed under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless * required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.red5.server.api.so; import java.util.List; import java.util.Map; import org.red5.server.api.ICastingAttributeStore; import org.red5.server.api.event.IEventListener; /** * Base interface for shared objects. Changes to the shared objects are propagated to all subscribed clients. * * If you want to modify multiple attributes and notify the clients about all changes at once, you can use code like this: * * <pre> * SharedObject.beginUpdate(); * SharedObject.setAttribute(&quot;One&quot;, '1'); * SharedObject.setAttribute(&quot;Two&quot;, '2'); * SharedObject.removeAttribute(&quot;Three&quot;); * SharedObject.endUpdate(); * </pre> * * All changes between "beginUpdate" and "endUpdate" will be sent to the clients using one notification event. * * @author The Red5 Project * @author Joachim Bauch (jojo@struktur.de) */ public interface ISharedObjectBase extends ISharedObjectHandlerProvider, ICastingAttributeStore { /** * Returns the version of the shared object. The version is incremented automatically on each modification. * * @return the version of the shared object */ public int getVersion(); /** * Check if the object has been created as persistent shared object by the client. * * @return true if the shared object is persistent, false otherwise */ public boolean isPersistent(); /** * Return a map containing all attributes of the shared object. <br> * NOTE: The returned map will be read-only. * * @return a map containing all attributes of the shared object */ public Map<String, Object> getData(); /** * Send a message to a handler of the shared object. * * @param handler * the name of the handler to call * @param arguments * a list of objects that should be passed as arguments to the handler */ public void sendMessage(String handler, List<?> arguments); /** * Start performing multiple updates to the shared object from serverside code. */ public void beginUpdate(); /** * Start performing multiple updates to the shared object from a connected client. * * @param source * Update events listener */ public void beginUpdate(IEventListener source); /** * The multiple updates are complete, notify clients about all changes at once. */ public void endUpdate(); /** * Register object that will be notified about update events. * * @param listener * the object to notify */ public void addSharedObjectListener(ISharedObjectListener listener); /** * Unregister object to not longer receive update events. * * @param listener * the object to unregister */ public void removeSharedObjectListener(ISharedObjectListener listener); /** * Deletes all the attributes and sends a clear event to all listeners. The persistent data object is also removed from a persistent shared object. * * @return true if successful; false otherwise */ public boolean clear(); /** * Detaches a reference from this shared object, this will destroy the reference immediately. This is useful when you don't want to proxy a shared object any longer. */ public void close(); }
[ "mondain@gmail.com" ]
mondain@gmail.com
20df02b5078aae5fc2585f5d3787eeb0fc700588
01b23223426a1eb84d4f875e1a6f76857d5e8cd9
/icefaces3/tags/icefaces-3.2.0/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/chart/ChartLineBean.java
89cb20f8c6e5ba8d9cd90535f1f13e7b8bb4b514
[ "Apache-2.0" ]
permissive
numbnet/icesoft
8416ac7e5501d45791a8cd7806c2ae17305cdbb9
2f7106b27a2b3109d73faf85d873ad922774aeae
refs/heads/master
2021-01-11T04:56:52.145182
2016-11-04T16:43:45
2016-11-04T16:43:45
72,894,498
0
0
null
null
null
null
UTF-8
Java
false
false
3,946
java
package org.icefaces.samples.showcase.example.ace.chart; import org.icefaces.ace.component.chart.Axis; import org.icefaces.ace.component.chart.AxisType; import org.icefaces.ace.model.chart.CartesianSeries; import org.icefaces.ace.model.chart.DragConstraintAxis; import org.icefaces.samples.showcase.metadata.annotation.ComponentExample; import org.icefaces.samples.showcase.metadata.annotation.ExampleResource; import org.icefaces.samples.showcase.metadata.annotation.ExampleResources; import org.icefaces.samples.showcase.metadata.annotation.ResourceType; import org.icefaces.samples.showcase.metadata.context.ComponentExampleImpl; import javax.annotation.PostConstruct; import javax.faces.bean.CustomScoped; import javax.faces.bean.ManagedBean; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * Copyright 2010-2012 ICEsoft Technologies Canada Corp. * <p/> * 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 * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * <p/> * See the License for the specific language governing permissions and * limitations under the License. * <p/> * User: Nils * Date: 2012-10-24 * Time: 2:04 PM */ @ComponentExample( parent = ChartBean.BEAN_NAME, title = "example.ace.chart.line.title", description = "example.ace.chart.line.description", example = "/resources/examples/ace/chart/chartLine.xhtml" ) @ExampleResources( resources ={ // xhtml @ExampleResource(type = ResourceType.xhtml, title="ChartLine.xhtml", resource = "/resources/examples/ace/chart/chartLine.xhtml"), // Java Source @ExampleResource(type = ResourceType.java, title="ChartLineBean.java", resource = "/WEB-INF/classes/org/icefaces/samples/showcase/example/ace/chart/ChartLineBean.java") } ) @ManagedBean(name= ChartLineBean.BEAN_NAME) @CustomScoped(value = "#{window}") public class ChartLineBean extends ComponentExampleImpl<ChartLineBean> implements Serializable { public static final String BEAN_NAME = "chartLineBean"; public ChartLineBean() { super(ChartLineBean.class); } @PostConstruct public void initMetaData() { super.initMetaData(); } private List<CartesianSeries> lineData = new ArrayList<CartesianSeries>() {{ add(new CartesianSeries() {{ add("Nickle", 28); add("Aluminum", 13); add("Xenon", 54); add("Silver", 47); add("Sulfur", 16); add("Silicon", 14); add("Vanadium", 23); setLabel("Resources / Demand"); }}); }}; private Axis[] yAxes = new Axis[] { new Axis() {{ setAutoscale(true); setTickInterval("5"); setLabel("Tonnes"); }} }; private Axis xAxis = new Axis() {{ setTicks(new String[] {"Nickle", "Aluminum", "Xenon", "Silver", "Sulfur", "Silicon", "Vanadium"}); setType(AxisType.CATEGORY); }}; public List<CartesianSeries> getLineData() { return lineData; } public void setLineData(List<CartesianSeries> lineData) { this.lineData = lineData; } public Axis[] getyAxes() { return yAxes; } public void setyAxes(Axis[] yAxes) { this.yAxes = yAxes; } public Axis getxAxis() { return xAxis; } public void setxAxis(Axis xAxis) { this.xAxis = xAxis; } }
[ "ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74" ]
ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74
72d99885269cc6aeade21842100e8f3b5ca97c29
cb4a8a35cd9480abd7d0ec1958eb72829fda8f79
/07_DatabaseLocal/01_NoteRoomDatabase/app/src/main/java/com/miguelcr/a03_fragmentlist/NoteViewModel.java
fc79fa34aebeb63fd53462da40a396c28de8f7e9
[]
no_license
miguelcamposdev/hrvatska2019
32b380a0b69ea33dc91a097ca57fb6f4b237e14a
1706ab7bafb00b86a57f097d5875bcead8d03618
refs/heads/master
2022-01-19T01:46:00.103004
2019-06-12T11:13:26
2019-06-12T11:13:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
package com.miguelcr.a03_fragmentlist; import android.app.Application; import android.arch.lifecycle.AndroidViewModel; import android.arch.lifecycle.LiveData; import android.support.annotation.NonNull; import java.util.List; public class NoteViewModel extends AndroidViewModel { private NoteRepository noteRepository; private LiveData<List<Note>> listAllNotes; public NoteViewModel(@NonNull Application application) { super(application); noteRepository = new NoteRepository(application); listAllNotes = noteRepository.getListAllNotes(); } public LiveData<List<Note>> getListAllNotes() { return listAllNotes; } public void insert(Note note) { noteRepository.insert(note); } }
[ "camposmiguel@gmail.com" ]
camposmiguel@gmail.com
99ec27462c294892e7f7f094c6c4b5370eced1ef
c7ff844a2ac95501e38a65d2a5b1c674d20f650c
/asakusa-test-driver/src/main/java/com/asakusafw/testdriver/TestExecutionPlan.java
f83bf52f44695860fe07fec95975be1081b47100
[ "Apache-2.0" ]
permissive
tottokomakotaro/asakusafw
3a16cf125302169fecb9aec5df2c8a387663415c
fd237fc270165eeda831d33f984451b684d5356f
refs/heads/master
2021-01-18T05:34:48.764909
2011-07-28T05:48:55
2011-07-28T05:49:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,743
java
/** * Copyright 2011 Asakusa Framework Team. * * 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.asakusafw.testdriver; import java.io.Serializable; import java.util.Iterator; import java.util.List; import java.util.Map; import com.asakusafw.compiler.common.Precondition; /** * ジョブフローを直接実行する際に利用する計画。 */ public class TestExecutionPlan implements Serializable { private static final long serialVersionUID = -8962301043507876930L; private final String definitionId; private final String executionId; private final List<Command> initializers; private final List<Command> importers; private final List<Job> jobs; private final List<Command> exporters; private final List<Command> finalizers; /** * インスタンスを生成する。 * @param definitionId このトランザクションの定義識別子 * @param executionId このトランザクションの実行識別子 * @param initializers 初期化フェーズに実行するべきコマンド * @param importers インポートフェーズに実行するべきコマンド * @param jobs 本体フェーズに実行するべきジョブ * @param exporters エクスポートフェーズに実行するべきコマンド * @param finalizers 終了フェーズに実行するべきコマンド * @throws IllegalArgumentException 引数に{@code null}が指定された場合 */ public TestExecutionPlan( String definitionId, String executionId, List<Command> initializers, List<Command> importers, List<Job> jobs, List<Command> exporters, List<Command> finalizers) { Precondition.checkMustNotBeNull(definitionId, "definitionId"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(executionId, "executionId"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(initializers, "initializers"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(importers, "importers"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(jobs, "jobs"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(exporters, "exporters"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(finalizers, "finalizers"); //$NON-NLS-1$ this.definitionId = definitionId; this.executionId = executionId; this.initializers = initializers; this.importers = importers; this.jobs = jobs; this.exporters = exporters; this.finalizers = finalizers; } /** * このトランザクション単位の定義識別子を返す。 * @return このトランザクション単位の定義識別子 */ public String getDefinitionId() { return definitionId; } /** * このトランザクション単位の実行識別子を返す。 * @return このトランザクション単位の実行識別子 */ public String getExecutionId() { return executionId; } /** * フェーズの一覧を返す。 * @return フェーズの一覧 */ public List<Command> getInitializers() { return initializers; } /** * フェーズの一覧を返す。 * @return フェーズの一覧 */ public List<Command> getImporters() { return importers; } /** * フェーズの一覧を返す。 * @return フェーズの一覧 */ public List<Job> getJobs() { return jobs; } /** * フェーズの一覧を返す。 * @return フェーズの一覧 */ public List<Command> getExporters() { return exporters; } /** * フェーズの一覧を返す。 * @return フェーズの一覧 */ public List<Command> getFinalizers() { return finalizers; } /** * 起動すべきジョブを表す。 */ public static class Job implements Serializable { private static final long serialVersionUID = -1707317463227716296L; private final String className; private final String executionId; private final Map<String, String> properties; /** * インスタンスを生成する。 * @param className ジョブを起動するためのクライアントクラスの完全限定名 * @param executionId このジョブの実行識別子 * @param properties ジョブ起動時のプロパティ一覧 * @throws IllegalArgumentException 引数に{@code null}が指定された場合 */ public Job(String className, String executionId, Map<String, String> properties) { Precondition.checkMustNotBeNull(className, "className"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(executionId, "executionId"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(properties, "properties"); //$NON-NLS-1$ this.className = className; this.executionId = executionId; this.properties = properties; } /** * ジョブを起動するためのクライアントクラス名を返す。 * @return ジョブを起動するためのクライアントクラス名 */ public String getClassName() { return className; } /** * このジョブの実行識別子を返す。 * @return このジョブの実行識別子 */ public String getExecutionId() { return executionId; } /** * ジョブ起動時のプロパティ一覧を返す。 * @return ジョブ起動時のプロパティ一覧 */ public Map<String, String> getProperties() { return properties; } } /** * 起動すべきコマンドを表す。 */ public static class Command implements Serializable { private static final long serialVersionUID = -6594560296027009816L; private final List<String> commandLine; private final String moduleName; private final String profileName; private final Map<String, String> environment; /** * インスタンスを生成する。 * @param commandLine コマンドラインを構成するセグメント一覧 * @param moduleName この機能を提供するモジュールのID * @param profileName この機能を利用するロールプロファイルのID、規定の場合は{@code null} * @param environment 環境変数の一覧 * @throws IllegalArgumentException 引数に{@code null}が指定された場合 */ public Command( List<String> commandLine, String moduleName, String profileName, Map<String, String> environment) { Precondition.checkMustNotBeNull(commandLine, "commandLine"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(moduleName, "moduleName"); //$NON-NLS-1$ this.commandLine = commandLine; this.moduleName = moduleName; this.profileName = profileName; this.environment = environment; } /** * このコマンドのコマンドライントークンの一覧を返す。 * @return このコマンドのコマンドライントークン */ public List<String> getCommandTokens() { return commandLine; } /** * このコマンドのコマンドライン文字列を返す。 * @return このコマンドのコマンドライン文字列 */ public String getCommandLineString() { StringBuilder buf = new StringBuilder(); for (Map.Entry<String, String> entry : environment.entrySet()) { buf.append("'" + entry.getKey() + "'"); buf.append("="); buf.append("'" + entry.getValue() + "'"); buf.append(" "); } Iterator<String> iter = commandLine.iterator(); if (iter.hasNext()) { buf.append(iter.next()); while (iter.hasNext()) { buf.append(" "); buf.append(iter.next()); } } return buf.toString(); } /** * この機能を提供するモジュールのIDを返す。 * @return この機能を提供するモジュールのID */ public String getModuleName() { return moduleName; } /** * この機能を利用する際のロールプロファイルのIDを返す。 * @return この機能を利用する際のロールプロファイルのID、デフォルトの場合は{@code null} */ public String getProfileName() { return profileName; } /** * 環境変数の一覧を返す。 * @return 環境変数の一覧 */ public Map<String, String> getEnvironment() { return environment; } } }
[ "akirakw@gmail.com" ]
akirakw@gmail.com
fa7fc05e22ccfdaccd5509c31d0efc9bd1f58b23
dc32fa411caf833907559ffa251bd5a985c5e25c
/src/main/java/br/com/systemsgs/mercadolivre/exception/GenerationExceptionClass.java
eb99cdd376042b95068f32e25130400b40035155
[]
no_license
GuilhermeJWT/Desafio-MercadoLivre-2-AWS-Docker-Kubernetes
6d396a57eabb70d44e6144b4131b472f4ae5ff5b
c645d1a27550a54da997b5f612fccd2d1af6bdc7
refs/heads/main
2023-06-10T19:00:28.222526
2021-07-06T21:53:21
2021-07-06T21:53:21
377,977,799
1
0
null
null
null
null
UTF-8
Java
false
false
244
java
package br.com.systemsgs.mercadolivre.exception; public class GenerationExceptionClass extends RuntimeException { private static final long serialVersionUID = 1L; public GenerationExceptionClass(String mensagem) { super(mensagem); } }
[ "guiromanno@gmail.com" ]
guiromanno@gmail.com
5d99279fc0b98e04216faa86c2ed6631573f6c25
cad7bc29389fbf5d5b722ee5327ba8154e7cc952
/submissions/available/CPC/CPC-what-property/data/source/apacheDB-trunk/tck/src/main/java/org/apache/jdo/tck/pc/companyAnnotatedPI/PIDSPartTimeEmployee.java
57824e7dd95236592246a8bae0faf6839d8b9f4d
[ "Apache-2.0", "Unlicense" ]
permissive
XZ-X/CPC-artifact-release
f9f9f0cde79b111f47622faba02f08b85a8a5ee9
5710dc0e39509f79e42535e0b5ca5e41cbd90fc2
refs/heads/master
2022-12-20T12:30:22.787707
2020-01-27T21:45:33
2020-01-27T21:45:33
236,601,424
1
0
Unlicense
2022-12-16T04:24:27
2020-01-27T21:41:38
Java
UTF-8
Java
false
false
1,370
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jdo.tck.pc.companyAnnotatedPI; import javax.jdo.annotations.*; import org.apache.jdo.tck.pc.company.IPartTimeEmployee; /** * This interface represents the persistent state of PartTimeEmployee. * Javadoc was deliberately omitted because it would distract from * the purpose of the interface. */ @PersistenceCapable @Inheritance(strategy=InheritanceStrategy.SUPERCLASS_TABLE) public interface PIDSPartTimeEmployee extends IPartTimeEmployee, PIDSEmployee { @Column(name="WAGE") double getWage(); void setWage(double wage); }
[ "161250170@smail.nju.edu.cn" ]
161250170@smail.nju.edu.cn
1271d31553c17a91ff66dab1969c3cb02e254930
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/9/661.java
e2733e783d402b3d723074004a422ffdd6b168b3
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,007
java
public class patient { public String id = new String(new char[10]); public int age; } package <missing>; public class GlobalMembers { public static int Main() { int j; int max; int t = 1; int n; int i; patient[] p = tangible.Arrays.initializeWithDefaultpatientInstances(101); String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } for (i = 1;i <= n;i++) { String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { p[i].id = tempVar2.charAt(0); } String tempVar3 = ConsoleInput.scanfRead(); if (tempVar3 != null) { p[i].age = Integer.parseInt(tempVar3); } } for (;t != 0;) { max = 59; t = 0; for (i = 1;i <= n;i++) { if (p[i].age > max) { max = p[i].age; t = i; } } if (t != 0) { System.out.printf("%s\n",p[t].id); } p[t].age = 0; } for (i = 1;i <= n;i++) { if (p[i].age != 0) { System.out.printf("%s\n",p[i].id); } } } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
6267991164e1dbc9aed315311fde28315c010a56
57336f2d455a7700a9e04a17aa63ed7bf6ff1e9e
/src/main/java/com/javaaround/sms/application/repository/PersistenceAuditEventRepository.java
8da50914434b6a80e1f51ccf65218036789902b0
[]
no_license
BulkSecurityGeneratorProject/SchoolManagement
0b018e0f7230b11a4d37815cbdb00c392ba32703
2ae51cffde36ff93f98065052afa7b29ee652e86
refs/heads/master
2022-12-17T10:31:17.146840
2018-07-06T02:20:38
2018-07-06T02:20:38
296,610,771
0
0
null
2020-09-18T12:10:21
2020-09-18T12:10:20
null
UTF-8
Java
false
false
1,000
java
package com.javaaround.sms.application.repository; import com.javaaround.sms.application.domain.PersistentAuditEvent; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import java.time.Instant; import java.util.List; /** * Spring Data JPA repository for the PersistentAuditEvent entity. */ public interface PersistenceAuditEventRepository extends JpaRepository<PersistentAuditEvent, Long> { List<PersistentAuditEvent> findByPrincipal(String principal); List<PersistentAuditEvent> findByAuditEventDateAfter(Instant after); List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfter(String principal, Instant after); List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principle, Instant after, String type); Page<PersistentAuditEvent> findAllByAuditEventDateBetween(Instant fromDate, Instant toDate, Pageable pageable); }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
393133e7a4e9138d47494555e46fd07929a43dc7
2dce1d353d064b9f4c6765a4b6460c38b8d20264
/src/fractalzoomer/core/domain_coloring/BlackGridDomainColoring.java
fc45ff54b05ad1c021b1089409f4fc601527379f
[]
no_license
hrkalona/Fractal-Zoomer
1fa30c531c46e4b25f8bfb33f70888f3b366771c
bcc3e1298b13e84b0730c67ffd6332e4e6575353
refs/heads/master
2023-08-30T08:54:46.594168
2023-08-15T11:41:26
2023-08-15T11:41:26
2,676,588
17
3
null
2023-08-15T11:41:27
2011-10-30T19:18:07
Java
UTF-8
Java
false
false
1,874
java
/* * Fractal Zoomer, Copyright (C) 2020 hrkalona2 * * 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 fractalzoomer.core.domain_coloring; import fractalzoomer.core.Complex; import fractalzoomer.core.blending.Blending; import fractalzoomer.main.app_settings.GeneratedPaletteSettings; import fractalzoomer.palettes.PaletteColor; import fractalzoomer.palettes.transfer_functions.TransferFunction; /** * * @author hrkalona2 */ public class BlackGridDomainColoring extends DomainColoring { public BlackGridDomainColoring(int domain_coloring_mode, PaletteColor palette, TransferFunction color_transfer, int color_cycling_location, GeneratedPaletteSettings gps, Blending blending, int interpolation, double countourFactor) { super(domain_coloring_mode, palette, color_transfer, color_cycling_location, gps, interpolation, blending, countourFactor); gridColorRed = 0; gridColorGreen = 0; gridColorBlue = 0; gridFactor = 2 * Math.PI; gridBlending = 1; } @Override public int getDomainColor(Complex res) { res = round(res); int color = applyArgColor(res.arg()); return applyGrid(color, res.getRe(), res.getIm()); } }
[ "hrkalona@gmail.com" ]
hrkalona@gmail.com
80c1291e0ed635a06414de4c3e251e8e4b4dbf66
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/BoilerActuator4074.java
8410ff15df7a6379e0d084390d6a6334b2729279
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
267
java
package syncregions; public class BoilerActuator4074 { public int execute(int temperatureDifference4074, boolean boilerStatus4074) { //sync _bfpnGUbFEeqXnfGWlV4074, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
7a16592c95d05a938f1270361cee73fce67b0209
c9cf73543d7c81f8e87a58e051380e98e92f978a
/baseline/happy_trader/platform/client/clientHT/clientUI2/src/main/java/com/fin/httrader/utils/SingleReaderQueueExceedLimit.java
c0cfcbc74756a12dc02e5a50e478c017e3a307e6
[]
no_license
vit2000005/happy_trader
0802d38b49d5313c09f79ee88407806778cb4623
471e9ca4a89db1b094e477d383c12edfff91d9d8
refs/heads/master
2021-01-01T19:46:10.038753
2015-08-23T10:29:57
2015-08-23T10:29:57
41,203,190
0
1
null
null
null
null
UTF-8
Java
false
false
541
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.fin.httrader.utils; /** * * @author DanilinS */ public class SingleReaderQueueExceedLimit extends Exception { public SingleReaderQueueExceedLimit(String message) { super(message); } private SingleReaderQueueExceedLimit() { super(); } private SingleReaderQueueExceedLimit(String message, Throwable cause) { super(message, cause); } private SingleReaderQueueExceedLimit(Throwable cause) { super(cause); } }
[ "victorofff@gmail.com" ]
victorofff@gmail.com
482343e417acfc16285d94f32039f527b2440b96
bc639d15bcc35b6e58f97ca02bee2dc66eba894b
/src/com/vmware/vim25/VirtualDiskFlatVer1BackingInfo.java
b7c2c9735faa78b253c0503aa8bac579af96afc5
[ "BSD-3-Clause" ]
permissive
benn-cs/vijava
db473c46f1a4f449e52611055781f9cfa921c647
14fd6b5d2f1407bc981b3c56433c30a33e8d74ab
refs/heads/master
2021-01-19T08:15:17.194988
2013-07-11T05:17:08
2013-07-11T05:17:08
7,495,841
1
0
null
null
null
null
UTF-8
Java
false
false
2,763
java
/*================================================================================ Copyright (c) 2012 Steve Jin. 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 VMware, Inc. 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 VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================================================*/ package com.vmware.vim25; /** * @author Steve Jin (http://www.doublecloud.org) * @version 5.1 */ @SuppressWarnings("all") public class VirtualDiskFlatVer1BackingInfo extends VirtualDeviceFileBackingInfo { public String diskMode; public Boolean split; public Boolean writeThrough; public String contentId; public VirtualDiskFlatVer1BackingInfo parent; public String getDiskMode() { return this.diskMode; } public Boolean getSplit() { return this.split; } public Boolean getWriteThrough() { return this.writeThrough; } public String getContentId() { return this.contentId; } public VirtualDiskFlatVer1BackingInfo getParent() { return this.parent; } public void setDiskMode(String diskMode) { this.diskMode=diskMode; } public void setSplit(Boolean split) { this.split=split; } public void setWriteThrough(Boolean writeThrough) { this.writeThrough=writeThrough; } public void setContentId(String contentId) { this.contentId=contentId; } public void setParent(VirtualDiskFlatVer1BackingInfo parent) { this.parent=parent; } }
[ "sjin2008@3374d856-466b-4dc9-8cc5-e1e8506a9ea1" ]
sjin2008@3374d856-466b-4dc9-8cc5-e1e8506a9ea1
995ec14269e821e8da88e7150ff17ea46e2bfdbc
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/wallet_core/ui/WalletCardImportUI$9.java
1b71d4fff15782529aa4ff3d3550a06b4af47e2c
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,428
java
package com.tencent.mm.plugin.wallet_core.ui; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.CheckedTextView; import com.tencent.mm.plugin.wallet_core.model.o; import com.tencent.mm.plugin.wxpay.a.e; import com.tencent.mm.plugin.wxpay.a.g; class WalletCardImportUI$9 extends BaseAdapter { final /* synthetic */ WalletCardImportUI puv; WalletCardImportUI$9(WalletCardImportUI walletCardImportUI) { this.puv = walletCardImportUI; } public final int getCount() { return WalletCardImportUI.c(this.puv).bOF() != null ? WalletCardImportUI.c(this.puv).bOF().size() : 0; } private Integer zq(int i) { return (Integer) WalletCardImportUI.c(this.puv).bOF().get(i); } public final long getItemId(int i) { return (long) i; } public final View getView(int i, View view, ViewGroup viewGroup) { CheckedTextView checkedTextView = (CheckedTextView) View.inflate(this.puv, g.wallet_list_dialog_item_singlechoice, null); checkedTextView.setText(o.bPe().Q(this.puv, zq(i).intValue())); if (WalletCardImportUI.f(this.puv) == zq(i).intValue()) { checkedTextView.setChecked(true); } else { checkedTextView.setChecked(false); } checkedTextView.setBackgroundResource(e.comm_list_item_selector); return checkedTextView; } }
[ "707194831@qq.com" ]
707194831@qq.com
6757c44416f93bae6a1b072ab3ccc053e22b1734
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/31/31_5e1b2d2d179e591a8680468cb41681d8cda9b92e/RunSampleCsv/31_5e1b2d2d179e591a8680468cb41681d8cda9b92e_RunSampleCsv_t.java
b3e016827d0edf92c647ed945b066b029c9b542e
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,519
java
package edu.mit.cci.teva.example; import com.sun.xml.internal.messaging.saaj.util.TeeInputStream; import edu.mit.cci.adapters.csv.CsvBasedConversation; import edu.mit.cci.teva.DefaultTevaFactory; import edu.mit.cci.teva.MemoryBasedRunner; import edu.mit.cci.teva.engine.CommunityFinderException; import edu.mit.cci.teva.engine.TevaParameters; import edu.mit.cci.teva.model.Conversation; import javax.xml.bind.JAXBException; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.text.ParseException; import java.util.HashMap; import java.util.Map; /** * User: jintrone * Date: 12/12/12 * Time: 11:17 PM */ public class RunSampleCsv { public static void main(String args[]) throws IOException, ParseException, JAXBException, CommunityFinderException { System.err.println(new File(".").getAbsoluteFile()); Map<String,String> params = getParams(args); InputStream props = null; InputStream datafile = null; if (params.containsKey("p")) { props = new FileInputStream(params.get("p")); } else { } String corpus = "Demo"; if (params.containsKey("f")) { datafile = new FileInputStream(params.get("f")); corpus = params.get("f"); } else { datafile = ClassLoader.getSystemClassLoader().getResourceAsStream("/sampledata/MM15.csv"); } Conversation c = new CsvBasedConversation(corpus,datafile); TevaParameters tevaParams = new TevaParameters(props); new MemoryBasedRunner(c,tevaParams,new DefaultTevaFactory(tevaParams,c)); } public static void usage() { String usage = "USAGE: RunSampleCsv [-p<properties_file>] [-f<input_csv>]"; System.err.println(usage); } public static Map<String,String> getParams(String[] args) { Map<String,String> result = new HashMap<String,String>(); for (String s:args) { if (s.startsWith("-p")) { result.put("p",s.substring(2)); } else if (s.startsWith("-f")) { result.put("f",s.substring(2)); } else if (s.startsWith("-help") || "-?".equals(s)) { usage(); System.exit(1); } else if (s.startsWith("-")) { System.out.println("Unknown option: "+s); } } return result; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
210ab62acc95fa58402e5cc56eb4d6d4d895fa06
6ad0aa0d3ab94c719c884f6964605e72f5754ec1
/src/main/java/abused_master/abusedlib/utils/events/DropItemCallback.java
d39ef8c3666fa1dc1a47bbee9b846655c00e3d7f
[ "MIT" ]
permissive
abused/AbusedLib
551eea1df877ceff1c1253970736594caff136cf
4a21a5e46fb8dfbdacb0cde53d8b593f50eb095c
refs/heads/1.14-Fabric
2022-02-13T13:31:25.721703
2019-08-05T22:37:42
2019-08-05T22:37:42
105,929,879
2
5
null
2019-08-02T15:41:33
2017-10-05T19:11:41
Java
UTF-8
Java
false
false
653
java
package abused_master.abusedlib.utils.events; import net.fabricmc.fabric.api.event.Event; import net.fabricmc.fabric.api.event.EventFactory; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; public interface DropItemCallback { Event<DropItemCallback> EVENT = EventFactory.createArrayBacked(DropItemCallback.class, (listeners) -> (player, stack, moveEntity, isPlayer) -> { for (DropItemCallback callback : listeners) { callback.dropItem(player, stack, moveEntity, isPlayer); } }); void dropItem(PlayerEntity player, ItemStack stack, boolean moveEntity, boolean isPlayer); }
[ "techperson71@gmail.com" ]
techperson71@gmail.com
a36dabf53fb32ad85d4511e104a99d8c1403aa87
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/herrlado_GeorgianFonts/src/org/apache/commons/io/IOUtils.java
61f240a33c20e141ac08211c04df9271b4695601
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,820
java
// isComment package org.apache.commons.io; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.io.StringWriter; /** * isComment */ public class isClassOrIsInterface { // isComment // isComment // isComment /** * isComment */ public static final char isVariable = 'isStringConstant'; /** * isComment */ public static final char isVariable = 'isStringConstant'; /** * isComment */ public static final char isVariable = isNameExpr.isFieldAccessExpr; /** * isComment */ public static final String isVariable = "isStringConstant"; /** * isComment */ public static final String isVariable = "isStringConstant"; /** * isComment */ public static final String isVariable; static { // isComment StringWriter isVariable = new StringWriter(isIntegerConstant); PrintWriter isVariable = new PrintWriter(isNameExpr); isNameExpr.isMethod(); isNameExpr = isNameExpr.isMethod(); } /** * isComment */ private static final int isVariable = isIntegerConstant * isIntegerConstant; /** * isComment */ public isConstructor() { super(); } // isComment // isComment /** * isComment */ public static int isMethod(final InputStream isParameter, final OutputStream isParameter) throws IOException { long isVariable = isMethod(isNameExpr, isNameExpr); if (isNameExpr > isNameExpr.isFieldAccessExpr) { return -isIntegerConstant; } return (int) isNameExpr; } /** * isComment */ public static long isMethod(final InputStream isParameter, final OutputStream isParameter) throws IOException { byte[] isVariable = new byte[isNameExpr]; long isVariable = isIntegerConstant; int isVariable = isIntegerConstant; while (-isIntegerConstant != (isNameExpr = isNameExpr.isMethod(isNameExpr))) { isNameExpr.isMethod(isNameExpr, isIntegerConstant, isNameExpr); isNameExpr += isNameExpr; } return isNameExpr; } /** * isComment */ public static void isMethod(InputStream isParameter) { try { if (isNameExpr != null) { isNameExpr.isMethod(); } } catch (IOException isParameter) { // isComment } } /** * isComment */ public static void isMethod(OutputStream isParameter) { try { if (isNameExpr != null) { isNameExpr.isMethod(); } } catch (IOException isParameter) { // isComment } } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
4b0ed71727b9c4d48cdad197b240101b0362f7a2
1394967151c05be173f604b9fb0ae39c436d2c49
/src/main/java/com/fraunhofer/fkie/aop/logging/LoggingAspect.java
1b8719df7fb2105ecff8b57a26698fceab85c16e
[]
no_license
BananaGo/jhipster-sample-application
974f17cc17ce92115674c4916b3ac8477545169f
8656dbe14b699e46c649925b4834a593f62b39fe
refs/heads/master
2022-12-25T22:59:09.922436
2022-02-10T17:21:31
2022-02-10T17:21:31
220,334,479
0
0
null
2022-12-16T04:40:57
2019-11-07T21:44:17
Java
UTF-8
Java
false
false
3,898
java
package com.fraunhofer.fkie.aop.logging; import io.github.jhipster.config.JHipsterConstants; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; import java.util.Arrays; /** * Aspect for logging execution of service and repository Spring components. * * By default, it only runs with the "dev" profile. */ @Aspect public class LoggingAspect { private final Logger log = LoggerFactory.getLogger(this.getClass()); private final Environment env; public LoggingAspect(Environment env) { this.env = env; } /** * Pointcut that matches all repositories, services and Web REST endpoints. */ @Pointcut("within(@org.springframework.stereotype.Repository *)" + " || within(@org.springframework.stereotype.Service *)" + " || within(@org.springframework.web.bind.annotation.RestController *)") public void springBeanPointcut() { // Method is empty as this is just a Pointcut, the implementations are in the advices. } /** * Pointcut that matches all Spring beans in the application's main packages. */ @Pointcut("within(com.fraunhofer.fkie.repository..*)"+ " || within(com.fraunhofer.fkie.service..*)"+ " || within(com.fraunhofer.fkie.web.rest..*)") public void applicationPackagePointcut() { // Method is empty as this is just a Pointcut, the implementations are in the advices. } /** * Advice that logs methods throwing exceptions. * * @param joinPoint join point for advice. * @param e exception. */ @AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e") public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))) { log.error("Exception in {}.{}() with cause = \'{}\' and exception = \'{}\'", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL", e.getMessage(), e); } else { log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL"); } } /** * Advice that logs when a method is entered and exited. * * @param joinPoint join point for advice. * @return result. * @throws Throwable throws {@link IllegalArgumentException}. */ @Around("applicationPackagePointcut() && springBeanPointcut()") public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { if (log.isDebugEnabled()) { log.debug("Enter: {}.{}() with argument[s] = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs())); } try { Object result = joinPoint.proceed(); if (log.isDebugEnabled()) { log.debug("Exit: {}.{}() with result = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), result); } return result; } catch (IllegalArgumentException e) { log.error("Illegal argument: {} in {}.{}()", Arrays.toString(joinPoint.getArgs()), joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName()); throw e; } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
3fb04a5f7d1c6df61a983464fad26211f4ef0ab9
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/com/alibaba/json/bvt/serializer/filters/PropertyPathTest3.java
79ca58ebc36647591314b007b0e78b61ce907fe8
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
3,883
java
package com.alibaba.json.bvt.serializer.filters; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.serializer.JSONSerializer; import com.alibaba.fastjson.serializer.PropertyPreFilter; import com.alibaba.fastjson.serializer.SerialContext; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import junit.framework.TestCase; import org.junit.Assert; public class PropertyPathTest3 extends TestCase { /** * ?????????????? */ public void test_path() throws Exception { PropertyPathTest3.Person p1 = new PropertyPathTest3.Person(); p1.setId(100); PropertyPathTest3.Person c1 = new PropertyPathTest3.Person(); c1.setId(1000); PropertyPathTest3.Person c2 = new PropertyPathTest3.Person(); c2.setId(2000); p1.getChildren().add(c1); p1.getChildren().add(c2); // ???children.id?????id String s = JSON.toJSONString(p1, new PropertyPathTest3.MyPropertyPreFilter(new String[]{ "children.id", "id" })); Assert.assertEquals("{\"children\":[{\"id\":1000},{\"id\":2000}],\"id\":100}", s); } /** * ????????map?????? */ public void test_path2() throws Exception { PropertyPathTest3.Person2 p1 = new PropertyPathTest3.Person2(); p1.setId(1); Map<String, String> infoMap = new HashMap<String, String>(); infoMap.put("name", "??"); infoMap.put("height", "168"); p1.setInfoMap(infoMap); // ???infoMap.name String s = JSON.toJSONString(p1, new PropertyPathTest3.MyPropertyPreFilter(new String[]{ "infoMap.name" })); Assert.assertEquals("{\"infoMap\":{\"name\":\"\u674e\u4e09\"}}", s); } public static class MyPropertyPreFilter implements PropertyPreFilter { String[] onlyProperties; public MyPropertyPreFilter(String[] onlyProperties) { this.onlyProperties = onlyProperties; } private static boolean containInclude(String[] ss, String s) { if (((ss == null) || ((ss.length) == 0)) || (s == null)) return false; for (String st : ss) if (st.startsWith(s)) return true; return false; } public boolean apply(JSONSerializer serializer, Object source, String name) { SerialContext nowContext = new SerialContext(serializer.getContext(), source, name, 0, 0); String nowPath = PropertyPathTest3.getLinkedPath(nowContext); System.out.println(("path->" + nowPath)); // ???children.id return PropertyPathTest3.MyPropertyPreFilter.containInclude(onlyProperties, nowPath); } } public static class Person { private int id; private int id2; private List<PropertyPathTest3.Person> children = new ArrayList<PropertyPathTest3.Person>(); public int getId2() { return id2; } public void setId2(int id2) { this.id2 = id2; } public int getId() { return id; } public void setId(int id) { this.id = id; } public List<PropertyPathTest3.Person> getChildren() { return children; } public void setChildren(List<PropertyPathTest3.Person> children) { this.children = children; } } public static class Person2 { private int id; private Map<String, String> infoMap; public int getId() { return id; } public void setId(int id) { this.id = id; } public Map<String, String> getInfoMap() { return infoMap; } public void setInfoMap(Map<String, String> infoMap) { this.infoMap = infoMap; } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
80adb1f43185976c5d51de622b10a9a3f068e0fb
61115d6d2f31e640d86d228969bdf51353a36fdf
/src/main/java/Problem271.java
e6a79d7c8094e9bd66b5ad5bb126aad15be45cf6
[]
no_license
thrap/project-euler
c88a79e0f1d47ce7e3fdebb24ca033b128474c74
c9086008857889a05f2ab9ac9cb33f9806f9c579
refs/heads/master
2020-12-24T08:00:36.791678
2020-11-07T18:35:16
2020-11-07T18:38:13
13,181,781
4
5
null
2016-06-10T11:09:10
2013-09-28T22:13:50
Java
UTF-8
Java
false
false
858
java
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.Arrays; import java.util.regex.Pattern; public class Problem271 { /** * jaevla mathematica :p * * n = 13082761331670030; * Reduce[Mod[x^3 , n] == 1 && 1 < x < n, x, Integers] */ public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new FileReader("/Users/thrap/Dropbox/Project Euler/problem271.txt")); String line; long sum = 0; while((line = br.readLine()) != null) { String[] split = line.split("x == "); for (int i = 1; i < split.length; i++) { long n = Long.parseLong(split[i].split(Pattern.quote(" ||"))[0]); System.out.println(n); sum += n; System.out.println(Arrays.toString(split[i].split(Pattern.quote(" ||")))); } } System.out.println(sum); } }
[ "magnus.solheim@gmail.com" ]
magnus.solheim@gmail.com
6d8343d01aa0ca018a7bdc7728769d47b613db5d
c74be57df734a02862c5509d708ebf42dfec0f6b
/src/main/java/io/renren/modules/set/service/impl/WpShortcutServiceImpl.java
1aae5666c261804d63db3ff57b118dbff109b718
[ "Apache-2.0" ]
permissive
ygg404/springboothtys
ecae79109f08d4dc1f6bb066d3cff740e70689dc
2fb0a103ac79b58bc4df07b03e87327c6eccb82b
refs/heads/master
2022-11-17T21:49:15.792705
2019-11-01T01:33:30
2019-11-01T01:33:30
195,659,902
0
0
Apache-2.0
2022-11-03T22:52:06
2019-07-07T14:19:09
JavaScript
UTF-8
Java
false
false
1,745
java
package io.renren.modules.set.service.impl; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.plugins.Page; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import io.renren.modules.set.dao.WpShortcutDao; import io.renren.modules.set.entity.WpShortcutEntity; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Service; import java.util.Arrays; import java.util.Map; import io.renren.common.utils.PageUtils; import io.renren.common.utils.Query; import io.renren.modules.set.service.WpShortcutService; import org.springframework.transaction.annotation.Transactional; @Service("wpShortcutService") public class WpShortcutServiceImpl extends ServiceImpl<WpShortcutDao, WpShortcutEntity> implements WpShortcutService { @Override public PageUtils queryPage(Map<String, Object> params) { String key = (String)params.get("key"); Page<WpShortcutEntity> page = this.selectPage( new Query<WpShortcutEntity>(params).getPage(), new EntityWrapper<WpShortcutEntity>().like(StringUtils.isNotBlank(key),"shortcut_note", key) ); return new PageUtils(page); } @Override @Transactional(rollbackFor = Exception.class) public void save(WpShortcutEntity wpShortcutEntity) { this.insert(wpShortcutEntity); } @Override @Transactional(rollbackFor = Exception.class) public void update(WpShortcutEntity wpShortcutEntity) { this.updateById(wpShortcutEntity); } @Override @Transactional(rollbackFor = Exception.class) public void deleteBatch(Long[] roleIds) { //删除快捷短语 this.deleteBatchIds(Arrays.asList(roleIds)); } }
[ "2279834998@qq.com" ]
2279834998@qq.com
6f7e1ae73bd0ff58a240ec96109c2680a16457d0
3e13b89f27c6cb107ee3e0f065d6ff4a14baf4e6
/jbpm-cmmn-flow/src/main/java/org/jbpm/cmmn/instance/subscription/SubscriptionManager.java
5201f34394043b7088ae2c3de6279c16bf33256a
[]
no_license
ifu-lobuntu/jbpm-cmmn
1b00b08d594b285457f5de2f03d14252abe4c1f0
c88b547842bfa699049a176321d6dd41c46284ea
refs/heads/master
2021-01-21T04:35:51.778941
2016-08-06T16:05:49
2016-08-06T16:05:49
23,986,383
0
2
null
null
null
null
UTF-8
Java
false
false
737
java
package org.jbpm.cmmn.instance.subscription; import org.jbpm.cmmn.flow.core.CaseFileItem; import org.jbpm.cmmn.instance.CaseInstance; import java.util.Collection; import java.util.Map; import java.util.Set; /** * An */ public interface SubscriptionManager<X extends DurableCaseFileItemSubscription> { String ENV_NAME = SubscriptionManager.class.getName(); X createSubscription(Object object); void setSubscriptions(CaseInstance caseInstance, Set<X> subscriptions); //For testing purposes really Collection<? extends DurableCaseFileItemSubscription> getCaseSubscriptionInfoFor(Object object); Collection<? extends DurableCaseFileItemSubscription> getCaseSubscriptionInfoFor(CaseInstance caseInstance); }
[ "ampieb@gmail.com" ]
ampieb@gmail.com
beb5aa2f670d383acba700654e2f136e09ef7539
7222c03a7a34add822f51511269c7061780ee5a6
/plugins/org.minig.imap/src/org/minig/imap/idle/IdleLine.java
65604cef865b7f31baa7e108019119d3f7c63f0f
[]
no_license
YYChildren/minig
17103eb1170d29930404230f3ce22609cd66c869
9a413a70b9aed485bdc42068bf701db8425963c9
refs/heads/master
2016-09-14T00:28:53.387344
2016-04-13T01:28:08
2016-04-13T01:28:08
56,111,120
0
0
null
null
null
null
UTF-8
Java
false
false
892
java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Initial Developer of the Original Code is * MiniG.org project members * * ***** END LICENSE BLOCK ***** */ package org.minig.imap.idle; public class IdleLine { private String payload; private IdleTag tag; public IdleLine() { } public String getPayload() { return payload; } public void setPayload(String payload) { this.payload = payload; } public IdleTag getTag() { return tag; } public void setTag(IdleTag tag) { this.tag = tag; } }
[ "tcataldo@gmail.com" ]
tcataldo@gmail.com
40de0d5345bf1aafe0d1ccaf136f2e1f02e81ff3
b62bfc3eee769412b3b55dfebf96c7b4b46bc03a
/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/agenda/operation/ActivateAsyncPlanItemInstanceOperation.java
79acfa19b6d5c476b8f8de00b7468345479175b4
[ "Apache-2.0" ]
permissive
bhaskarmelkani/flowable-engine
8207d8b39f29e2141853479af3e9b61af2aaed4a
f545624215b8e2cfeb7c9a08d7cda6cb1b080704
refs/heads/master
2020-03-12T00:08:47.068796
2018-04-20T07:09:19
2018-04-20T07:09:19
130,342,375
2
0
null
2018-04-20T09:42:02
2018-04-20T09:42:02
null
UTF-8
Java
false
false
2,798
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.flowable.cmmn.engine.impl.agenda.operation; import org.flowable.cmmn.api.runtime.PlanItemInstanceState; import org.flowable.cmmn.engine.impl.job.AsyncActivatePlanItemInstanceJobHandler; import org.flowable.cmmn.engine.impl.persistence.entity.PlanItemInstanceEntity; import org.flowable.cmmn.engine.impl.util.CommandContextUtil; import org.flowable.cmmn.model.PlanItemTransition; import org.flowable.cmmn.model.Task; import org.flowable.common.engine.api.scope.ScopeTypes; import org.flowable.common.engine.impl.interceptor.CommandContext; import org.flowable.job.service.JobService; import org.flowable.job.service.impl.persistence.entity.JobEntity; /** * @author Dennis Federico */ public class ActivateAsyncPlanItemInstanceOperation extends AbstractChangePlanItemInstanceStateOperation { public ActivateAsyncPlanItemInstanceOperation(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity) { super(commandContext, planItemInstanceEntity); } @Override protected String getLifeCycleTransition() { return PlanItemTransition.ASYNC_ACTIVATE; } @Override protected String getNewState() { return PlanItemInstanceState.ASYNC_ACTIVE; } @Override protected void internalExecute() { CommandContextUtil.getCmmnHistoryManager(commandContext).recordPlanItemInstanceActivated(planItemInstanceEntity); createAsyncJob((Task) planItemInstanceEntity.getPlanItem().getPlanItemDefinition()); } protected void createAsyncJob(Task task) { JobService jobService = CommandContextUtil.getCmmnEngineConfiguration(commandContext).getJobServiceConfiguration().getJobService(); JobEntity job = jobService.createJob(); job.setScopeId(planItemInstanceEntity.getCaseInstanceId()); job.setSubScopeId(planItemInstanceEntity.getId()); job.setScopeDefinitionId(planItemInstanceEntity.getCaseDefinitionId()); job.setScopeType(ScopeTypes.CMMN); job.setTenantId(planItemInstanceEntity.getTenantId()); job.setJobHandlerType(AsyncActivatePlanItemInstanceJobHandler.TYPE); jobService.createAsyncJob(job, task.isExclusive()); jobService.scheduleAsyncJob(job); } }
[ "tijs.rademakers@gmail.com" ]
tijs.rademakers@gmail.com
7c0da3340b0585f7a94ff71bddbe2a94db630c1f
58d9997a806407a09c14aa0b567e57d486b282d4
/com/planet_ink/coffee_mud/Commands/UnLink.java
b7fbd74e28cd91d11fcd5a7cc29fd28abe79ed55
[ "Apache-2.0" ]
permissive
kudos72/DBZCoffeeMud
553bc8619a3542fce710ba43bac01144148fe2ed
19a3a7439fcb0e06e25490e19e795394da1df490
refs/heads/master
2021-01-10T07:57:01.862867
2016-03-17T23:04:25
2016-03-17T23:04:25
39,215,834
0
0
null
null
null
null
UTF-8
Java
false
false
2,161
java
package com.planet_ink.coffee_mud.Commands; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2004-2014 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ @SuppressWarnings({"unchecked","rawtypes"}) public class UnLink extends StdCommand { public UnLink(){} private final String[] access=I(new String[]{"UNLINK"}); @Override public String[] getAccessWords(){return access;} @Override public boolean execute(MOB mob, Vector commands, int metaFlags) throws java.io.IOException { commands.setElementAt("DESTROY",0); commands.insertElementAt("ROOM",1); final Command C=CMClass.getCommand("Destroy"); C.execute(mob,commands,metaFlags); return false; } @Override public boolean canBeOrdered(){return true;} @Override public boolean securityCheck(MOB mob){return CMSecurity.isAllowed(mob,mob.location(),CMSecurity.SecFlag.CMDEXITS);} }
[ "kirk.narey@gmail.com" ]
kirk.narey@gmail.com
af1503a87a18f3ebe6af596ccfe1c3392d5dc41d
d7fbf9c81c86abc50824599f124c4ba0735114db
/src/main/java/com/sharksharding/core/shard/RuleImpl.java
cf710a4f4dec775fec81cc952e4d51a34bd73bbf
[ "Apache-2.0" ]
permissive
erhua-puppet/shark
000e2ab25ef512f41a5e7f1de1350247d8ff33db
77f8a96ede48d05081edb992e3708e7766c7dbc8
refs/heads/master
2022-02-25T20:22:33.779191
2016-03-20T04:31:18
2016-03-20T04:31:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,426
java
/* * Copyright 2015-2101 gaoxianglong * * 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.sharksharding.core.shard; import java.util.List; import com.sharksharding.util.ResolveRule; /** * 路由规则接口实现 * * @author gaoxianglong * * @version 1.3.5 */ public abstract class RuleImpl implements Rule { @Override public int getIndex(long route, String ruleArray) { return -1; } /** * 根据库内分片模式下的分库规则计算出数据源索引 * * @author gaoxianglong * * @param routeValue * 路由条件 * * @param dbRuleArray * 分库规则 * * @return int 数据源索引 */ public static int getDbIndex(long routeValue, String dbRuleArray) { List<Integer> list = ResolveRule.resolveDbRule(dbRuleArray); final int TAB_SIZE = list.get(0); final int DB_SIZE = list.get(1); return (int) (routeValue % TAB_SIZE / DB_SIZE); } /** * 根据库内分片模式下的分片规则计算出片索引 * * @author gaoxianglong * * @param routeValue * 路由条件 * * @param tbRuleArray * 分表规则 * * @return int 片索引 */ public static int getTabIndex(long routeValue, String tbRuleArray) { List<Integer> list = ResolveRule.resolveTabRule(tbRuleArray); final int TAB_SIZE = list.get(0); final int DB_SIZE = list.get(1); return (int) (routeValue % TAB_SIZE % DB_SIZE); } /** * 根据一库一片模式下的分库规则计算出数据源索引 * * @author gaoxianglong * * @param routeValue * 路由条件 * * @param dbRuleArray * 分库规则 * * @return int 数据源索引 */ public static int getDbIndexbyOne(long routeValue, String dbRuleArray) { List<Integer> list = ResolveRule.resolveDbRulebyOne(dbRuleArray); final int DB_SIZE = list.get(0); return (int) (routeValue % DB_SIZE); } }
[ "gao_xianglong@sina.com" ]
gao_xianglong@sina.com
cdfec1d47a47a71dbb5abab6e01fbec731b81815
d9a78f88784633b8901cd1bb059e6862cfd9b58e
/src/main/java/com/setupmyproject/controllers/forms/MaybeEmptyCommand.java
3926fb3b390e16beaa9a234f8e446bd659a9c052
[]
no_license
marcosbuganeme/setupmyproject
77e5bdfe2241eba91afa2afeaafde4010f4f93ac
a757cf37fba7fd7a5cb9f5367c69427e595c2b69
refs/heads/master
2020-07-09T15:00:38.830001
2016-04-07T10:46:01
2016-04-07T10:46:01
55,777,877
1
0
null
2016-04-08T12:37:50
2016-04-08T12:37:50
null
UTF-8
Java
false
false
1,072
java
package com.setupmyproject.controllers.forms; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import com.google.common.collect.Lists; import com.setupmyproject.commands.EmptyCommand; import com.setupmyproject.commands.ProjectCommand; class MaybeEmptyCommand { /** * * @param objectToBeVerified * objeto que deve ser verificado para saber se há necessidade de * chamar a função * @return o comando gerado pela função ou um {@link EmptyCommand}, caso não * exista nada. */ public static List<ProjectCommand> generate( List<? extends ProjectCommand> objectToBeVerified) { if (objectToBeVerified == null || objectToBeVerified.isEmpty()) { return Lists.newArrayList((new EmptyCommand())); } return new ArrayList<ProjectCommand>(objectToBeVerified); } public static List<? extends ProjectCommand> generate(ProjectCommand projectCommand) { if(projectCommand == null){ return new ArrayList<ProjectCommand>(); } return generate(Arrays.asList(projectCommand)); } }
[ "alots.ssa@gmail.com" ]
alots.ssa@gmail.com
560fe4b7aa989ee2e4a7d5fb80793f1ccc151d1d
99de3430565ec81e350b9a229ccb2fae99e5882c
/sg-zhixiu-app/src/main/java/com/zhixiu/app/http/ParamsKeyValueUtil.java
d5c71c04ed0d365d29263f6c74b85021bc41bda1
[]
no_license
yelantingfengyu/sg-zhixiu-backend
306310a98ec7815955d8cab48535968c7de5d0f4
f389f0720024b865f13bed5f3e7c74762cfc91a9
refs/heads/master
2022-11-08T02:57:15.581622
2020-06-12T06:46:57
2020-06-12T06:46:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
902
java
/** * @author : 孙留平 * @since : 2020年3月18日 下午5:32:50 * @see: */ package com.zhixiu.app.http; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; /** * @author : Administrator * @since : 2020年3月18日 下午5:32:50 * @see : */ public class ParamsKeyValueUtil { /** * 把map转换成resttemplate支持的参数类型 * * @see : * @param : * @return : MultiValueMap * @param map * @return */ public static <T, V> MultiValueMap<T, V> changeMapToMultiValueMap( Map<T, V> map) { Set<Entry<T, V>> entrySets = map.entrySet(); MultiValueMap<T, V> multiValueMap = new LinkedMultiValueMap<>(); for (Entry<T, V> entry : entrySets) { multiValueMap.add((T) entry.getKey(), (V) entry.getValue()); } return multiValueMap; } }
[ "sunlpmail@126.com" ]
sunlpmail@126.com
468c840eb779612987f067e71acd2df90794a843
ee1df4f152a55dfd256b490a146a24ea41345745
/1.1/BNCompiler/src/org/bn/compiler/parser/model/AsnReal.java
2384832c18311264f26a7a54bb9041b54a2ce8c7
[]
no_license
ishisystems/BinaryNotes
a50d58f42facca077f9edb045bd5f2265c2e4710
1b3dfaa274fbb919ce74da332bf4ad0226bd68d1
refs/heads/master
2020-04-05T23:59:39.166498
2011-09-19T22:21:55
2011-09-19T22:21:55
60,371,143
1
0
null
null
null
null
UTF-8
Java
false
false
615
java
package org.bn.compiler.parser.model; public class AsnReal { public final String BUILTINTYPE = "REAL"; public String name; //~--- constructors ------------------------------------------------------- // Default Constructor public AsnReal() { name = ""; } //~--- methods ------------------------------------------------------------ // toString Definition public String toString() { String ts = ""; ts += name + "\t::=\t" + BUILTINTYPE; return ts; } } //~ Formatted by Jindent --- http://www.jindent.com
[ "akira_ag@6e58b0a2-a920-0410-943a-aae568831f16" ]
akira_ag@6e58b0a2-a920-0410-943a-aae568831f16
f8812d5ff2ecaae019232c2bcf5d4d9206a32263
647eef4da03aaaac9872c8b210e4fc24485e49dc
/TestMemory/wandoujia/src/main/java/com/unionpay/pboctransaction/simapdu/a.java
4e8d18662bb30068a9ca6ca5c2689179e02968cc
[]
no_license
AlbertSnow/git_workspace
f2d3c68a7b6e62f41c1edcd7744f110e2bf7f021
a0b2cd83cfa6576182f440a44d957a9b9a6bda2e
refs/heads/master
2021-01-22T17:57:16.169136
2016-12-05T15:59:46
2016-12-05T15:59:46
28,154,580
1
1
null
null
null
null
UTF-8
Java
false
false
6,152
java
package com.unionpay.pboctransaction.simapdu; import android.content.Context; import android.os.Handler; import android.os.Handler.Callback; import android.support.v4.app.i; import android.text.TextUtils; import com.unionpay.pboctransaction.AppIdentification; import com.unionpay.pboctransaction.e; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.Locale; import org.simalliance.openmobileapi.Channel; import org.simalliance.openmobileapi.Reader; import org.simalliance.openmobileapi.SEService; import org.simalliance.openmobileapi.SEService.CallBack; import org.simalliance.openmobileapi.Session; public final class a implements com.unionpay.pboctransaction.c, SEService.CallBack { private static a d = new a(); private SEService a = null; private Channel[] b = new Channel[3]; private com.unionpay.pboctransaction.b c; private Handler.Callback e = new b(this); private Handler f = new Handler(this.e); private String a(String paramString, int paramInt) { monitorenter; Object localObject1 = null; if (paramString == null) { monitorexit; return localObject1; } while (true) { while (true) { String str1; try { str1 = paramString.toUpperCase(Locale.CHINA); if (paramInt <= this.b.length) continue; paramInt = 0; if ((str1.startsWith("00A40400")) || (str1.startsWith("01A40400"))) break label210; boolean bool = str1.startsWith("02A40400"); i = 0; if (bool) break label210; if (i != 0) { a(paramInt); localObject1 = b(i.b(str1.substring(10, 10 + 2 * (16 * Integer.parseInt(str1.substring(8, 9), 16) + Integer.parseInt(str1.substring(9, 10), 16)))), paramInt); if (!TextUtils.isEmpty((CharSequence)localObject1)) break; throw new a.a(); } } finally { monitorexit; } try { byte[] arrayOfByte = i.b(str1); localObject1 = null; if (arrayOfByte == null) break; String str2 = i.a(this.b[paramInt].transmit(arrayOfByte)); localObject1 = str2; } catch (IOException localIOException) { throw new a.a(); } catch (Exception localException) { localObject1 = null; } } break; label210: int i = 1; } } private void a(int paramInt) { if ((this.b[paramInt] != null) && (paramInt <= this.b.length)); try { this.b[paramInt].close(); label27: this.b[paramInt] = null; return; } catch (Exception localException) { break label27; } } private String b(byte[] paramArrayOfByte, int paramInt) { try { Reader[] arrayOfReader = this.a.getReaders(); if (arrayOfReader.length > 0) { Channel localChannel = arrayOfReader[0].openSession().openLogicalChannel(paramArrayOfByte); if (localChannel != null) { this.b[paramInt] = localChannel; byte[] arrayOfByte = localChannel.getSelectResponse(); String str = i.a(arrayOfByte, arrayOfByte.length); return str; } } } catch (Exception localException) { } return ""; } public static a d() { monitorenter; try { a locala = d; monitorexit; return locala; } finally { localObject = finally; monitorexit; } throw localObject; } public final ArrayList<com.unionpay.pboctransaction.model.b> a(e parame) { ArrayList localArrayList1 = new ArrayList(1); String str1 = parame.a("A0000003330101"); if ((str1 == null) || (str1.length() < 16)); do { return null; localArrayList1.add(new AppIdentification(str1, null)); } while (localArrayList1.size() <= 0); ArrayList localArrayList2 = new ArrayList(); Iterator localIterator = localArrayList1.iterator(); while (localIterator.hasNext()) { AppIdentification localAppIdentification = (AppIdentification)localIterator.next(); if ("06".equalsIgnoreCase(localAppIdentification.b())) continue; String str2 = i.d(parame.a(localAppIdentification)); if ((str2 == null) || (str2.length() <= 0)) continue; localArrayList2.add(new com.unionpay.pboctransaction.model.a(16, localAppIdentification.a(), "", str2, 1)); } return localArrayList2; } public final void a() { } public final void a(com.unionpay.pboctransaction.b paramb, Context paramContext) { this.c = paramb; try { this.a = new SEService(paramContext, this); new c(this).start(); return; } catch (Exception localException) { this.f.sendEmptyMessage(2); } } public final byte[] a(byte[] paramArrayOfByte, int paramInt) { try { byte[] arrayOfByte = i.b(a(i.a(paramArrayOfByte, paramArrayOfByte.length), paramInt)); return arrayOfByte; } catch (a.a locala) { } return null; } public final void b() { c(); } public final void c() { for (int i = 0; i < this.b.length; i++) a(i); } public final boolean e() { new StringBuilder("isConnected:").append(this.a); new StringBuilder("isConnected:").append(this.a.isConnected()); return (this.a != null) && (this.a.isConnected()); } public final void f() { new StringBuilder(" mSEService = ").append(this.a); c(); if ((this.a != null) && (this.a.isConnected())) this.a.shutdown(); } public final void serviceConnected(SEService paramSEService) { new StringBuilder("mSEService:").append(this.a); new StringBuilder("mSEService.isConnected:").append(this.a.isConnected()); this.f.sendEmptyMessage(1); } } /* Location: C:\WorkSpace\WandDouJiaNotificationBar\WanDou1.jar * Qualified Name: com.unionpay.pboctransaction.simapdu.a * JD-Core Version: 0.6.0 */
[ "zhaojialiang@conew.com" ]
zhaojialiang@conew.com
20e128513d586f6cc84e72cdb77f1c2d18b3f4ca
38b1b57079893444a4271f9aecf842ae576dea11
/client/src/main/java/org/ontosoft/client/components/form/events/HasSoftwareHandlers.java
dbbe272b481bb7bd4e866b25c8c053107a4856a5
[ "Apache-2.0" ]
permissive
KnowledgeCaptureAndDiscovery/ontosoft
fa1824ec79d340d20dcc24e06935a3e8539dbefe
2f16fe4013ff0b45bc71e7712685a4a99c5cc269
refs/heads/master
2022-07-14T03:33:00.937638
2022-02-25T17:11:22
2022-02-25T17:11:22
36,427,974
3
0
Apache-2.0
2022-07-06T20:44:48
2015-05-28T09:24:57
Java
UTF-8
Java
false
false
373
java
package org.ontosoft.client.components.form.events; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.event.shared.HasHandlers; public interface HasSoftwareHandlers extends HasHandlers { HandlerRegistration addSoftwareSaveHandler(SoftwareSaveHandler handler); HandlerRegistration addSoftwareChangeHandler(SoftwareChangeHandler handler); }
[ "varunratnakar@gmail.com" ]
varunratnakar@gmail.com
36822f0ce4ebe5068a5d955ad4efba7ae500b6a8
7f53ff59587c1feea58fb71f7eff5608a5846798
/temp/ffout/client/net/minecraft/src/ComponentStrongholdStairsStraight.java
53a0286fccdc0237b2596263e937f10f3a11f42e
[]
no_license
Orazur66/Minecraft-Client
45c918d488f2f9fca7d2df3b1a27733813d957a5
70a0b63a6a347fd87a7dbe28c7de588f87df97d3
refs/heads/master
2021-01-15T17:08:18.072298
2012-02-14T21:29:14
2012-02-14T21:29:14
3,423,624
3
0
null
null
null
null
UTF-8
Java
false
false
2,983
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode fieldsfirst package net.minecraft.src; import java.util.List; import java.util.Random; // Referenced classes of package net.minecraft.src: // ComponentStronghold, ComponentStrongholdStairs2, StructureBoundingBox, StructureComponent, // StructureStrongholdPieces, EnumDoor, Block, World public class ComponentStrongholdStairsStraight extends ComponentStronghold { private final EnumDoor field_35054_a; public ComponentStrongholdStairsStraight(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); field_35025_h = j; field_35054_a = func_35031_a(random); field_35024_g = structureboundingbox; } public void func_35004_a(StructureComponent structurecomponent, List list, Random random) { func_35028_a((ComponentStrongholdStairs2)structurecomponent, list, random, 1, 1); } public static ComponentStrongholdStairsStraight func_35053_a(List list, Random random, int i, int j, int k, int l, int i1) { StructureBoundingBox structureboundingbox = StructureBoundingBox.func_35747_a(i, j, k, -1, -7, 0, 5, 11, 8, l); if(!func_35030_a(structureboundingbox) || StructureComponent.func_35020_a(list, structureboundingbox) != null) { return null; } else { return new ComponentStrongholdStairsStraight(i1, random, structureboundingbox, l); } } public boolean func_35023_a(World world, Random random, StructureBoundingBox structureboundingbox) { if(func_35013_a(world, structureboundingbox)) { return false; } func_35022_a(world, structureboundingbox, 0, 0, 0, 4, 10, 7, true, random, StructureStrongholdPieces.func_35852_b()); func_35033_a(world, random, structureboundingbox, field_35054_a, 1, 7, 0); func_35033_a(world, random, structureboundingbox, EnumDoor.OPENING, 1, 1, 7); int i = func_35009_c(Block.field_4069_aI.field_376_bc, 2); for(int j = 0; j < 6; j++) { func_35018_a(world, Block.field_4069_aI.field_376_bc, i, 1, 6 - j, 1 + j, structureboundingbox); func_35018_a(world, Block.field_4069_aI.field_376_bc, i, 2, 6 - j, 1 + j, structureboundingbox); func_35018_a(world, Block.field_4069_aI.field_376_bc, i, 3, 6 - j, 1 + j, structureboundingbox); if(j < 5) { func_35018_a(world, Block.field_35285_bn.field_376_bc, 0, 1, 5 - j, 1 + j, structureboundingbox); func_35018_a(world, Block.field_35285_bn.field_376_bc, 0, 2, 5 - j, 1 + j, structureboundingbox); func_35018_a(world, Block.field_35285_bn.field_376_bc, 0, 3, 5 - j, 1 + j, structureboundingbox); } } return true; } }
[ "Ninja_Buta@hotmail.fr" ]
Ninja_Buta@hotmail.fr
cd0151f344c8e5a100007a8691c5a8dc7e2363fa
3bcb4aab1bee767034260ebf04b479314aba0df4
/JAICore/jaicore-planning/src/main/java/jaicore/planning/hierarchical/problems/ceocstn/CEOCSTNPlanningDomain.java
b10fad277a3dc8cfd54022b6f7ff54dba2de01ac
[]
no_license
AILibs-DyRaCo/AILibs
003de0c568530f2d079bc6199ef9328b5367763a
7d8384bf4fb86c7ccbabca39ef00817dd08c6d5e
refs/heads/dev
2020-04-09T12:42:36.426188
2019-04-02T22:15:17
2019-04-02T22:15:17
160,361,282
2
0
null
2019-04-01T23:02:58
2018-12-04T13:25:10
Java
UTF-8
Java
false
false
1,124
java
package jaicore.planning.hierarchical.problems.ceocstn; import java.util.Collection; import jaicore.planning.classical.problems.ceoc.CEOCOperation; import jaicore.planning.hierarchical.problems.stn.STNPlanningDomain; @SuppressWarnings("serial") public class CEOCSTNPlanningDomain extends STNPlanningDomain { public CEOCSTNPlanningDomain(Collection<? extends CEOCOperation> operations, Collection<? extends OCMethod> methods) { super(operations, methods); } public boolean isValid() { for (CEOCOperation op : getOperations()) { boolean isValid = !(op.getAddLists().isEmpty() && op.getDeleteLists().isEmpty()); assert isValid : "Degenerated planning problem. Operation \"" + op.getName() + "\" has empty add list and empty delete list!"; if (!isValid) return false; } return true; } @SuppressWarnings("unchecked") public Collection<? extends CEOCOperation> getOperations() { return (Collection<CEOCOperation>)super.getOperations(); } @SuppressWarnings("unchecked") public Collection<? extends OCMethod> getMethods() { return (Collection<? extends OCMethod>)super.getMethods(); } }
[ "fmohr@mail.upb.de" ]
fmohr@mail.upb.de
08caa6abbfe08c0b29f9ee041f0af1ba82db0ef6
55efec1c96c8d1eaf8bbd70ab84621017c535c72
/src/test/java/kz/gelleson/findep/domain/TaskTest.java
b26acfda8269afb728962981743b34b2471d7171
[]
no_license
ghistory/finance
388fa4a27ea0c7d9d274f72367e9e95c3e7a0636
c652c5dd4b760f67ee1b86065d8fa7bf0a27cbda
refs/heads/main
2023-01-14T20:19:01.274980
2020-11-23T19:05:09
2020-11-23T19:05:09
315,405,542
0
0
null
2022-04-13T07:44:25
2020-11-23T18:29:40
Java
UTF-8
Java
false
false
632
java
package kz.gelleson.findep.domain; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import kz.gelleson.findep.web.rest.TestUtil; public class TaskTest { @Test public void equalsVerifier() throws Exception { TestUtil.equalsVerifier(Task.class); Task task1 = new Task(); task1.setId(1L); Task task2 = new Task(); task2.setId(task1.getId()); assertThat(task1).isEqualTo(task2); task2.setId(2L); assertThat(task1).isNotEqualTo(task2); task1.setId(null); assertThat(task1).isNotEqualTo(task2); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
3b56a1b8d7dbb8a4745bb8ff6d550abfac2158ab
73b5d880fa06943c20ff0a9aee9d0c1d1eeebe10
/broken/experimental/demmer/java/net/tinyos/sim/event/SimObjectDraggedEvent.java
97d7da98d21bfabaff038f5f69803a4a554fcfbe
[]
no_license
x3ro/tinyos-legacy
101d19f9e639f5a9d59d3edd4ed04b1f53221e63
cdc0e7ba1cac505fcace33b974b2e0aca1ccc56a
refs/heads/master
2021-01-16T19:20:21.744228
2015-06-30T20:23:05
2015-06-30T20:23:05
38,358,728
0
1
null
null
null
null
UTF-8
Java
false
false
1,489
java
// $Id: SimObjectDraggedEvent.java,v 1.1 2003/10/17 01:53:36 mikedemmer Exp $ /* tab:2 * * * "Copyright (c) 2000 and The Regents of the University * of California. All rights reserved. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose, without fee, and without written * agreement is hereby granted, provided that the above copyright * notice and the following two paragraphs appear in all copies of * this software. * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE * PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF * CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * * Authors: Nelson Lee * Date: February 4, 2003 * Desc: * */ /** * @author Nelson Lee */ package net.tinyos.sim.event; import net.tinyos.sim.*; public class SimObjectDraggedEvent implements SimEvent { public String toString() { return "SimObjectDraggedEvent"; } }
[ "lucas@x3ro.de" ]
lucas@x3ro.de
91fdf4dae6e64c605491584ce327d2d9d6a9d609
b26d0ac0846fc13080dbe3c65380cc7247945754
/src/main/java/imports/aws/Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments.java
b22e05edf6d5d6602704e69533c3a21f60598937
[]
no_license
nvkk-devops/cdktf-java-aws
1431404f53df8de517f814508fedbc5810b7bce5
429019d87fc45ab198af816d8289dfe1290cd251
refs/heads/main
2023-03-23T22:43:36.539365
2021-03-11T05:17:09
2021-03-11T05:17:09
346,586,402
0
0
null
null
null
null
UTF-8
Java
false
false
4,109
java
package imports.aws; @javax.annotation.Generated(value = "jsii-pacmak/1.24.0 (build b722f66)", date = "2021-03-10T09:47:03.155Z") @software.amazon.jsii.Jsii(module = imports.aws.$Module.class, fqn = "aws.Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments") @software.amazon.jsii.Jsii.Proxy(Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments.Jsii$Proxy.class) public interface Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments extends software.amazon.jsii.JsiiSerializable { /** * @return a {@link Builder} of {@link Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments} */ static Builder builder() { return new Builder(); } /** * A builder for {@link Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments} */ public static final class Builder implements software.amazon.jsii.Builder<Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments> { /** * Builds the configured instance. * @return a new instance of {@link Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments} * @throws NullPointerException if any required attribute was not provided */ @Override public Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments build() { return new Jsii$Proxy(); } } /** * An implementation for {@link Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments} */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments { /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy() { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("aws.Wafv2WebAclRuleStatementOrStatementStatementNotStatementStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchAllQueryArguments")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } } }
[ "venkata.nidumukkala@emirates.com" ]
venkata.nidumukkala@emirates.com
263e506db865aa2898766696c33b2b4f41712f8a
fdd4cc6f8b5a473c0081af5302cb19c34433a0cf
/src/modules/agrega/DRI/src/test.broken/java/es/pode/dri/negocio/servicios/Sesion/SrvSesionesServiceImplBase.java
f401a7ff752c7009c0c50cc98731647bfcc08348
[]
no_license
nwlg/Colony
0170b0990c1f592500d4869ec8583a1c6eccb786
07c908706991fc0979e4b6c41d30812d861776fb
refs/heads/master
2021-01-22T05:24:40.082349
2010-12-23T14:49:00
2010-12-23T14:49:00
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
3,718
java
/* Agrega es una federación de repositorios de objetos digitales educativos formada por todas las Comunidades Autónomas propiedad de Red.es. Este código ha sido desarrollado por la Entidad Pública Empresarial red.es adscrita al Ministerio de Industria,Turismo y Comercio a través de la Secretaría de Estado de Telecomunicaciones y para la Sociedad de la Información, dentro del Programa Internet en el Aula, que se encuadra dentro de las actuaciones previstas en el Plan Avanza (Plan 2006-2010 para el desarrollo de la Sociedad de la Información y de Convergencia con Europa y entre Comunidades Autónomas y Ciudades Autónomas) y ha sido cofinanciado con fondos FEDER del Programa Operativo FEDER 2000-2006 “Sociedad de la Información” This program is free software: you can redistribute it and/or modify it under the terms of the European Union Public Licence (EUPL v.1.0). 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 European Union Public Licence (EUPL v.1.0). You should have received a copy of the EUPL licence along with this program. If not, see http://ec.europa.eu/idabc/en/document/7330. */ // license-header java merge-point /** * This is only generated once! It will never be overwritten. * You can (and have to!) safely modify it by hand. */ package es.pode.dri.negocio.servicios.Sesion; import org.apache.log4j.Logger; import org.dbunit.database.DatabaseConnection; import org.dbunit.database.IDatabaseConnection; import org.dbunit.dataset.IDataSet; import org.dbunit.dataset.excel.XlsDataSet; import org.dbunit.operation.DatabaseOperation; import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests; /** * Clase base para los test del los servicios. * * @see AbstractTransactionalDataSourceSpringContextTests * * @see es.pode.dri.negocio.servicios.Sesion.SrvSesionesService */ public class SrvSesionesServiceImplBase extends AbstractTransactionalDataSourceSpringContextTests { protected static Logger logger = Logger.getLogger(SrvSesionesServiceImplBase.class); /** Aqui se deben de inyectar los beans a utilizar dentro del test * Inyeccion del bean del Servicio es.pode.dri.negocio.servicios.Sesion.SrvSesionesService */ protected es.pode.dri.negocio.servicios.Sesion.SrvSesionesService servicio; public void setServicio(es.pode.dri.negocio.servicios.Sesion.SrvSesionesService servicio) { this.servicio = servicio; } /** * Nombre de archivo que contiene el dataset de pruebas */ private String datasetFile = "SrvDataEmptyDataSet.xls"; IDatabaseConnection connection = null; protected void onSetUpInTransaction() throws Exception { // Inicializamos la conexion a base de datos connection = new DatabaseConnection(this.jdbcTemplate.getDataSource().getConnection()); // Inicializamos el dataset IDataSet dataSet = new XlsDataSet(this.applicationContext.getResource(datasetFile).getFile()); DatabaseOperation.INSERT.execute(connection, dataSet); } protected void onTearDownInTransaction() { try { // Inicializamos la conexion a base de datos connection = new DatabaseConnection(this.jdbcTemplate.getDataSource().getConnection()); // Inicializamos el dataset IDataSet dataSet = new XlsDataSet(this.applicationContext.getResource(datasetFile).getFile()); DatabaseOperation.DELETE.execute(connection, dataSet); } catch (Throwable th) { th.printStackTrace(); } } protected String[] getConfigLocations() { return new String[] { "testContext.xml" }; } }
[ "build@zeno.siriusit.co.uk" ]
build@zeno.siriusit.co.uk
8e67d8f8efe79b7ff3ce020f24ae9e471bde6b1c
414ebc48c256fccbefd35a3705be64879f4bd62c
/src/main/java/cn/mauth/account/controller/api/AccountSetController.java
9c845f1fd35c1ed34ec38026b6f56fb751193425
[]
no_license
hzw123/account
46837f5125b3e470c26360867f5caf21ce996083
82126dde8e8e9f79364b92528958fe1274a5f889
refs/heads/master
2020-04-16T09:32:27.579322
2019-02-12T08:33:49
2019-02-12T08:33:49
165,467,854
0
0
null
null
null
null
UTF-8
Java
false
false
2,430
java
package cn.mauth.account.controller.api; import cn.mauth.account.common.base.BaseApi; import cn.mauth.account.common.domain.settings.AccountSet; import cn.mauth.account.common.util.PageUtil; import cn.mauth.account.common.util.Result; import cn.mauth.account.server.AccountSetServer; import cn.mauth.account.server.RedisUtil; import cn.mauth.account.server.SysUserInfoService; import io.swagger.annotations.ApiOperation; import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/api/accounting/accountSet") public class AccountSetController extends BaseApi{ @Autowired private AccountSetServer server; @Autowired private SysUserInfoService sysUserInfoService; @GetMapping("/page") @ApiOperation(value = "分页获取账套信息") public Result loadAccountSet(Pageable pageable){ return Result.success(this.server.page(PageUtil.getPageable(pageable))); } @GetMapping @ApiOperation(value = "获取账套信息") public Result load(String name,Long accountId){ AccountSet accountSet=new AccountSet(); accountSet.setId(accountId); accountSet.setName(name); return Result.success(this.server.findAll(accountSet)); } @PostMapping @ApiOperation(value = "创建账套") public Result save(AccountSet accountSet,String access_token){ if(!SecurityUtils.getSubject().isAuthenticated()){ String sign= RedisUtil.getSign(access_token); Long id=sysUserInfoService.getId(sign); accountSet.setCreateBy(id); } this.server.save(accountSet); return Result.success("账套创建成功"); } @PutMapping @ApiOperation(value = "修改账套信息") public Result update(AccountSet accountSet){ this.server.update(accountSet); String message="账套Id:"+accountSet.getId()+"更新成功"; logger.info(message); return Result.success(message); } @DeleteMapping @ApiOperation(value = "删除账套") public Result delete(Long accountId){ this.server.deleteById(accountId); String message="账套ID:"+accountId+"删除成功"; logger.info(message); return Result.success(message); } }
[ "1127835288@qq.com" ]
1127835288@qq.com
a2a7a109bfe86c7d6cffc6b3e16cbc1a18aaf1a4
7ec9419e1b6f5f1261bc8b564733ecf8e9fea3b8
/map-render-service/src/main/java/io/vertx/workshop/map/source/Member.java
ac28ff891bb701a8f8994f0c1cd000d963168d4a
[]
no_license
erwindeg/sogeti-gurunight-2015
d66ee4c92733786d6e54f452b1bac48400426b36
9a90c0ce24762e1dde1db1fbc66cc6e4b0cec194
refs/heads/master
2021-05-29T22:07:38.900171
2015-11-17T12:38:29
2015-11-17T12:38:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
323
java
/** * Copyright 2015 the original author or authors. */ package io.vertx.workshop.map.source; import java.io.Serializable; /** * OSM Member * * @author Paulo Lopes */ class Member implements Serializable { private static final long serialVersionUID = 1L; Node node; Way way; String role; Member next; }
[ "paulo@mlopes.net" ]
paulo@mlopes.net
a9978abd5227f587dd175c28f8e56dbf2ed4a18f
d349955f8cfee790907a1bf844a55322ed1e3bd4
/JarsLink/SpringBoot/src/main/java/com/zkn/springboot/Application.java
30bd0186381a2075806c69c2576f91adc3bd8a0e
[]
no_license
zhangconan/SourceCodeApplication
e468d5ff6cf9d641c49d8ae9ec3c61d4e6f4de93
d7c22ff10dba51eeb899363ca6430f4cb734e5c9
refs/heads/master
2020-03-07T06:11:47.278640
2018-04-12T16:05:50
2018-04-12T16:05:50
127,315,332
0
0
null
null
null
null
UTF-8
Java
false
false
449
java
package com.zkn.springboot; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ImportResource; /** * @author zkn */ @ImportResource(locations = "spring/spring-bean.xml") @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } }
[ "zhangconancomputer@126.com" ]
zhangconancomputer@126.com
b177f502b564d9c22068c5bd7dec53fc9ca7329b
28c40b1cb95b171a78f7f702eb6fb76ea91821de
/aws-java-sdk-cognitosync/src/main/java/com/amazonaws/services/cognitosync/model/transform/ListDatasetsRequestMarshaller.java
b4737e437ac35d9b8d7b3835e0342c382d9e7329
[ "Apache-2.0", "JSON" ]
permissive
picantegamer/aws-sdk-java
e9249bc9fad712f475c15df74068b306d773df10
206557596ee15a8aa470ad2f33a06d248042d5d0
refs/heads/master
2021-01-14T13:44:03.807035
2016-01-08T22:23:36
2016-01-08T22:23:36
49,227,858
0
0
null
2016-01-07T20:07:24
2016-01-07T20:07:23
null
UTF-8
Java
false
false
3,663
java
/* * Copyright 2010-2015 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.cognitosync.model.transform; import static com.amazonaws.util.StringUtils.UTF8; import static com.amazonaws.util.StringUtils.COMMA_SEPARATOR; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.OutputStreamWriter; import java.io.StringWriter; import java.io.Writer; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.List; import java.util.regex.Pattern; import com.amazonaws.AmazonClientException; import com.amazonaws.Request; import com.amazonaws.DefaultRequest; import com.amazonaws.http.HttpMethodName; import com.amazonaws.services.cognitosync.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.util.BinaryUtils; import com.amazonaws.util.StringUtils; import com.amazonaws.util.StringInputStream; import com.amazonaws.util.json.*; /** * ListDatasetsRequest Marshaller */ public class ListDatasetsRequestMarshaller implements Marshaller<Request<ListDatasetsRequest>, ListDatasetsRequest> { private static final String DEFAULT_CONTENT_TYPE = "application/x-amz-json-1.1"; public Request<ListDatasetsRequest> marshall( ListDatasetsRequest listDatasetsRequest) { if (listDatasetsRequest == null) { throw new AmazonClientException( "Invalid argument passed to marshall(...)"); } Request<ListDatasetsRequest> request = new DefaultRequest<ListDatasetsRequest>( listDatasetsRequest, "AmazonCognitoSync"); request.setHttpMethod(HttpMethodName.GET); String uriResourcePath = "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets"; uriResourcePath = uriResourcePath.replace( "{IdentityPoolId}", (listDatasetsRequest.getIdentityPoolId() == null) ? "" : StringUtils.fromString(listDatasetsRequest .getIdentityPoolId())); uriResourcePath = uriResourcePath.replace( "{IdentityId}", (listDatasetsRequest.getIdentityId() == null) ? "" : StringUtils.fromString(listDatasetsRequest .getIdentityId())); request.setResourcePath(uriResourcePath); String nextToken = (listDatasetsRequest.getNextToken() == null) ? null : StringUtils.fromString(listDatasetsRequest.getNextToken()); if (nextToken != null) { request.addParameter("nextToken", nextToken); } String maxResults = (listDatasetsRequest.getMaxResults() == null) ? null : StringUtils.fromInteger(listDatasetsRequest.getMaxResults()); if (maxResults != null) { request.addParameter("maxResults", maxResults); } request.setContent(new ByteArrayInputStream(new byte[0])); if (!request.getHeaders().containsKey("Content-Type")) { request.addHeader("Content-Type", DEFAULT_CONTENT_TYPE); } return request; } }
[ "aws@amazon.com" ]
aws@amazon.com
498889ecef2e4a2de3e802e2c37bc39b85a3d2ac
77b2dfeec8e504da2039bf11edfc4d9f3484348c
/src/org/sgpro/db/EntHuaqin2016ProviderConfrenceCompanyHome.java
36c72ea5aa5b9fef1130ce314c894f789ae81e9f
[]
no_license
lujx1024/robotServer
a653775e62dae56477c9466ac6244fb6dd4baae1
34e231250861c1c7f74aae82b8560ff981e9d6ab
refs/heads/master
2020-03-22T23:40:28.256321
2018-07-13T08:59:18
2018-07-13T08:59:18
140,822,860
0
0
null
null
null
null
UTF-8
Java
false
false
4,261
java
package org.sgpro.db; // Generated 2017-6-21 11:12:48 by Hibernate Tools 4.0.0 import java.util.List; import javax.naming.InitialContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.LockMode; import org.hibernate.SessionFactory; import org.hibernate.criterion.Example; /** * Home object for domain model class EntHuaqin2016ProviderConfrenceCompany. * @see org.sgpro.db.EntHuaqin2016ProviderConfrenceCompany * @author Hibernate Tools */ public class EntHuaqin2016ProviderConfrenceCompanyHome { private static final Log log = LogFactory .getLog(EntHuaqin2016ProviderConfrenceCompanyHome.class); private final SessionFactory sessionFactory = getSessionFactory(); protected SessionFactory getSessionFactory() { try { return (SessionFactory) new InitialContext() .lookup("SessionFactory"); } catch (Exception e) { log.error("Could not locate SessionFactory in JNDI", e); throw new IllegalStateException( "Could not locate SessionFactory in JNDI"); } } public void persist(EntHuaqin2016ProviderConfrenceCompany transientInstance) { log.debug("persisting EntHuaqin2016ProviderConfrenceCompany instance"); try { sessionFactory.getCurrentSession().persist(transientInstance); log.debug("persist successful"); } catch (RuntimeException re) { log.error("persist failed", re); throw re; } } public void attachDirty(EntHuaqin2016ProviderConfrenceCompany instance) { log.debug("attaching dirty EntHuaqin2016ProviderConfrenceCompany instance"); try { sessionFactory.getCurrentSession().saveOrUpdate(instance); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public void attachClean(EntHuaqin2016ProviderConfrenceCompany instance) { log.debug("attaching clean EntHuaqin2016ProviderConfrenceCompany instance"); try { sessionFactory.getCurrentSession().lock(instance, LockMode.NONE); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public void delete(EntHuaqin2016ProviderConfrenceCompany persistentInstance) { log.debug("deleting EntHuaqin2016ProviderConfrenceCompany instance"); try { sessionFactory.getCurrentSession().delete(persistentInstance); log.debug("delete successful"); } catch (RuntimeException re) { log.error("delete failed", re); throw re; } } public EntHuaqin2016ProviderConfrenceCompany merge( EntHuaqin2016ProviderConfrenceCompany detachedInstance) { log.debug("merging EntHuaqin2016ProviderConfrenceCompany instance"); try { EntHuaqin2016ProviderConfrenceCompany result = (EntHuaqin2016ProviderConfrenceCompany) sessionFactory .getCurrentSession().merge(detachedInstance); log.debug("merge successful"); return result; } catch (RuntimeException re) { log.error("merge failed", re); throw re; } } public EntHuaqin2016ProviderConfrenceCompany findById(long id) { log.debug("getting EntHuaqin2016ProviderConfrenceCompany instance with id: " + id); try { EntHuaqin2016ProviderConfrenceCompany instance = (EntHuaqin2016ProviderConfrenceCompany) sessionFactory .getCurrentSession() .get("org.sgpro.db.EntHuaqin2016ProviderConfrenceCompany", id); if (instance == null) { log.debug("get successful, no instance found"); } else { log.debug("get successful, instance found"); } return instance; } catch (RuntimeException re) { log.error("get failed", re); throw re; } } public List findByExample(EntHuaqin2016ProviderConfrenceCompany instance) { log.debug("finding EntHuaqin2016ProviderConfrenceCompany instance by example"); try { List results = sessionFactory .getCurrentSession() .createCriteria( "org.sgpro.db.EntHuaqin2016ProviderConfrenceCompany") .add(Example.create(instance)).list(); log.debug("find by example successful, result size: " + results.size()); return results; } catch (RuntimeException re) { log.error("find by example failed", re); throw re; } } }
[ "lujx_1024@163.com" ]
lujx_1024@163.com
9654dd07f62726919a2823b7aa1f40876429c151
bb9140f335d6dc44be5b7b848c4fe808b9189ba4
/Extra-DS/Corpus/class/zxing/361.java
4f65cf2fe83cdd8991d89896b277a23f66a4c3c0
[]
no_license
masud-technope/EMSE-2019-Replication-Package
4fc04b7cf1068093f1ccf064f9547634e6357893
202188873a350be51c4cdf3f43511caaeb778b1e
refs/heads/master
2023-01-12T21:32:46.279915
2022-12-30T03:22:15
2022-12-30T03:22:15
186,221,579
5
3
null
null
null
null
UTF-8
Java
false
false
3,500
java
/* * Copyright (C) 2010 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.client.android; import com.google.zxing.BinaryBitmap; import com.google.zxing.DecodeHintType; import com.google.zxing.MultiFormatReader; import com.google.zxing.ReaderException; import com.google.zxing.Result; import com.google.zxing.client.android.camera.CameraManager; import com.google.zxing.common.HybridBinarizer; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.util.Log; import java.util.Hashtable; final class DecodeHandler extends Handler { private static final String TAG = DecodeHandler.class.getSimpleName(); private final CaptureActivity activity; private final MultiFormatReader multiFormatReader; DecodeHandler(CaptureActivity activity, Hashtable<DecodeHintType, Object> hints) { multiFormatReader = new MultiFormatReader(); multiFormatReader.setHints(hints); this.activity = activity; } @Override public void handleMessage(Message message) { switch(message.what) { case R.id.decode: //Log.d(TAG, "Got decode message"); decode((byte[]) message.obj, message.arg1, message.arg2); break; case R.id.quit: Looper.myLooper().quit(); break; } } /** * Decode the data within the viewfinder rectangle, and time how long it took. For efficiency, * reuse the same reader objects from one decode to the next. * * @param data The YUV preview frame. * @param width The width of the preview frame. * @param height The height of the preview frame. */ private void decode(byte[] data, int width, int height) { long start = System.currentTimeMillis(); Result rawResult = null; PlanarYUVLuminanceSource source = CameraManager.get().buildLuminanceSource(data, width, height); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); try { rawResult = multiFormatReader.decodeWithState(bitmap); } catch (ReaderException re) { } finally { multiFormatReader.reset(); } if (rawResult != null) { long end = System.currentTimeMillis(); Log.d(TAG, "Found barcode (" + (end - start) + " ms):\n" + rawResult.toString()); Message message = Message.obtain(activity.getHandler(), R.id.decode_succeeded, rawResult); Bundle bundle = new Bundle(); bundle.putParcelable(DecodeThread.BARCODE_BITMAP, source.renderCroppedGreyscaleBitmap()); message.setData(bundle); //Log.d(TAG, "Sending decode succeeded message..."); message.sendToTarget(); } else { Message message = Message.obtain(activity.getHandler(), R.id.decode_failed); message.sendToTarget(); } } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
c97ed0710ce4ca05b52d4b7f64235dc710580bef
8bf0b120be7ddb0cf55269b3f2413b26ab590309
/src/test/java/io/argoproj/workflow/models/DownwardAPIVolumeFileTest.java
4652ccfbf5c3552efa02bf320dba9455d64489d1
[]
no_license
animeshpal-invimatic/argo-client-java
704d32e355adfb4823ad0fd2dc39e5081128d917
69dbd29f8a5a95a1514fecb4fbd6bd89b044c7c5
refs/heads/master
2022-12-15T05:09:41.766322
2020-09-14T17:52:09
2020-09-14T17:52:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,677
java
/* * Argo * Argo * * The version of the OpenAPI document: v2.10.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package io.argoproj.workflow.models; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.argoproj.workflow.models.ObjectFieldSelector; import io.argoproj.workflow.models.ResourceFieldSelector; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for DownwardAPIVolumeFile */ public class DownwardAPIVolumeFileTest { private final DownwardAPIVolumeFile model = new DownwardAPIVolumeFile(); /** * Model tests for DownwardAPIVolumeFile */ @Test public void testDownwardAPIVolumeFile() { // TODO: test DownwardAPIVolumeFile } /** * Test the property 'fieldRef' */ @Test public void fieldRefTest() { // TODO: test fieldRef } /** * Test the property 'mode' */ @Test public void modeTest() { // TODO: test mode } /** * Test the property 'path' */ @Test public void pathTest() { // TODO: test path } /** * Test the property 'resourceFieldRef' */ @Test public void resourceFieldRefTest() { // TODO: test resourceFieldRef } }
[ "alex_collins@intuit.com" ]
alex_collins@intuit.com
f54f8c396371576635e9c91fc41e2fe386a1830f
5312913a0d885768a91504eeb1c75b1dce3e46b7
/mapo-opt4j/src/org/opt4j/viewer/QTable.java
b871758392686d157e253a67e13bba8ad5406056
[]
no_license
vicmns/mapo-opt4j
f5318f9fc5ef5888848324dd579746b5384ae780
96956681e42a4f9c72a4c3171c570e4837d55bf8
refs/heads/master
2021-01-15T23:35:29.326100
2015-04-16T17:27:52
2015-04-16T17:27:52
34,061,850
3
0
null
null
null
null
UTF-8
Java
false
false
2,885
java
/** * Opt4J 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 3 of the License, or (at your * option) any later version. * * Opt4J 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 Opt4J. If not, see http://www.gnu.org/licenses/. */ package org.opt4j.viewer; import java.awt.Component; import javax.swing.JComponent; import javax.swing.JTable; import javax.swing.JToolTip; import javax.swing.table.TableCellRenderer; import javax.swing.table.TableModel; /** * The {@link QTable} extends the {@link JTable} by automatically adding * tooltips. * * @author lukasiewycz * */ class QTable extends JTable { private static final long serialVersionUID = 1L; /** * Constructs a {@link QTable}. * * @param dm * the model */ public QTable(TableModel dm) { super(dm); } /* * (non-Javadoc) * * @see * javax.swing.JTable#prepareRenderer(javax.swing.table.TableCellRenderer, * int, int) */ @Override public Component prepareRenderer(TableCellRenderer renderer, int row, int column) { final Component c = super.prepareRenderer(renderer, row, column); if (c instanceof JComponent) { final JComponent jc = (JComponent) c; Object value = getValueAt(row, column); if (value != null) { final String text = value.toString(); final int length = jc.getFontMetrics(jc.getFont()).stringWidth(text); if (getColumnModel().getColumn(column).getWidth() < length) { jc.setToolTipText(text); } else { jc.setToolTipText(null); } } } return c; } /** * The {@link WrapToolTip} auto-wraps long tooltips. * * @author lukasiewycz * */ class WrapToolTip extends JToolTip { private static final long serialVersionUID = 1L; /* * (non-Javadoc) * * @see javax.swing.JToolTip#setTipText(java.lang.String) */ @Override public void setTipText(String tipText) { if (tipText != null && tipText.length() > 0) { String s = "<html>"; for (int i = 0; i < tipText.length(); i += 150) { s += tipText.substring(i, Math.min(i + 150, tipText.length())); s += "<br>"; } s += "</html>"; super.setTipText(s); } else { super.setTipText(null); } } } /* * (non-Javadoc) * * @see javax.swing.JComponent#createToolTip() */ @Override public JToolTip createToolTip() { return new WrapToolTip(); } }
[ "vicmns@Zephie" ]
vicmns@Zephie
a53a525cf06a9e1384a7db1fd84b2ee712ce9b7e
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/33/org/apache/commons/lang3/builder/ToStringStyle_append_428.java
991cbe06b1e5ee3fa4b109ed15072564e036ca46
[]
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
3,820
java
org apach common lang3 builder control code string code format link string builder tostringbuild main code string builder tostringbuild code class intend code singleton code instanti style time program gener predefin constant altern link standard string style standardtostringstyl set individu set style achiev subclass requir subclass overrid method requir object type code code code code code object code code code method output version detail summari detail version arrai base method output arrai summari method output arrai length format output object date creat subclass overrid method pre style mystyl string style tostringstyl append detail appenddetail string buffer stringbuff buffer string field fieldnam object date simpl date format simpledateformat yyyi format buffer append pre author apach softwar foundat author gari gregori author pete gieser author masato tezuka version string style tostringstyl serializ append code string tostr code code object code print full code string tostr code code object code pass param buffer code string buffer stringbuff code popul param field fieldnam field param add code string tostr code param full detail fulldetail code code detail code code summari info code code style decid append string buffer stringbuff buffer string field fieldnam object boolean full detail fulldetail append field start appendfieldstart buffer field fieldnam append null text appendnulltext buffer field fieldnam append intern appendintern buffer field fieldnam full detail isfulldetail full detail fulldetail append field end appendfieldend buffer field fieldnam
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
097e596b32a4d8d06faa5986291ff2f68a197b72
fac5d6126ab147e3197448d283f9a675733f3c34
/src/main/java/dji/midware/data/model/P3/DataEyeSendDrawTrajectory.java
078e2c633e94127c7e4c7782dc0b1661164b0fbd
[]
no_license
KnzHz/fpv_live
412e1dc8ab511b1a5889c8714352e3a373cdae2f
7902f1a4834d581ee6afd0d17d87dc90424d3097
refs/heads/master
2022-12-18T18:15:39.101486
2020-09-24T19:42:03
2020-09-24T19:42:03
294,176,898
0
0
null
2020-09-09T17:03:58
2020-09-09T17:03:57
null
UTF-8
Java
false
false
3,436
java
package dji.midware.data.model.P3; import android.support.annotation.Keep; import com.drew.metadata.exif.makernotes.LeicaMakernoteDirectory; import dji.fieldAnnotation.EXClassNullAway; import dji.midware.data.config.P3.CmdIdEYE; import dji.midware.data.config.P3.CmdSet; import dji.midware.data.config.P3.DataConfig; import dji.midware.data.config.P3.DeviceType; import dji.midware.data.manager.P3.DataBase; import dji.midware.data.packages.P3.SendPack; import dji.midware.interfaces.DJIDataCallBack; import dji.midware.interfaces.DJIDataSyncListener; import dji.midware.util.BytesUtil; @Keep @EXClassNullAway public class DataEyeSendDrawTrajectory extends DataBase implements DJIDataSyncListener { private static DataEyeSendDrawTrajectory instance = null; private byte mCount = 0; private byte mFragment = 0; private byte mSequence = 0; private short[] mTrajectoryLocation = null; private boolean mbLastFragment = false; public static synchronized DataEyeSendDrawTrajectory getInstance() { DataEyeSendDrawTrajectory dataEyeSendDrawTrajectory; synchronized (DataEyeSendDrawTrajectory.class) { if (instance == null) { instance = new DataEyeSendDrawTrajectory(); } dataEyeSendDrawTrajectory = instance; } return dataEyeSendDrawTrajectory; } public DataEyeSendDrawTrajectory setSequence(byte sequence) { this.mSequence = sequence; return this; } public DataEyeSendDrawTrajectory setFragment(byte fragment) { this.mFragment = fragment; return this; } public DataEyeSendDrawTrajectory setIsLastFragment(boolean last) { this.mbLastFragment = last; return this; } public DataEyeSendDrawTrajectory setCount(byte count) { this.mCount = count; return this; } public DataEyeSendDrawTrajectory setTrajectory(short[] trajectory) { this.mTrajectoryLocation = trajectory; return this; } /* access modifiers changed from: protected */ public void doPack() { byte b = 1; this._sendData = new byte[((this.mCount * 2 * 2) + 4)]; this._sendData[0] = this.mSequence; this._sendData[1] = this.mFragment; byte[] bArr = this._sendData; byte b2 = bArr[2]; if (!this.mbLastFragment) { b = 0; } bArr[2] = (byte) (b | b2); this._sendData[3] = this.mCount; for (int i = 0; i < this.mCount; i++) { System.arraycopy(BytesUtil.getBytes(this.mTrajectoryLocation[i * 2]), 0, this._sendData, (i * 4) + 4, 2); System.arraycopy(BytesUtil.getBytes(this.mTrajectoryLocation[(i * 2) + 1]), 0, this._sendData, (i * 4) + 4 + 2, 2); } } public void start(DJIDataCallBack callBack) { SendPack pack = new SendPack(); pack.senderType = DeviceType.APP.value(); pack.receiverType = DeviceType.SINGLE.value(); pack.receiverId = 7; pack.cmdType = DataConfig.CMDTYPE.REQUEST.value(); pack.isNeedAck = DataConfig.NEEDACK.YES.value(); pack.encryptType = DataConfig.EncryptType.NO.value(); pack.cmdSet = CmdSet.EYE.value(); pack.cmdId = CmdIdEYE.CmdIdType.SendDrawTrajectory.value(); pack.timeOut = LeicaMakernoteDirectory.TAG_CAMERA_TEMPERATURE; pack.repeatTimes = 4; start(pack, callBack); } }
[ "michael@districtrace.com" ]
michael@districtrace.com
05a7294a3ce5d17ad93031a68d506bbd64b8826d
cf7c928d6066da1ce15d2793dcf04315dda9b9ed
/Jungol/Lv1_LanguageCoder/10 배열2/Main_JO_565_자가진단2.java
2d9d9a31408e29762437a47e282e21163eb46aaf
[]
no_license
refresh6724/APS
a261b3da8f53de7ff5ed687f21bb1392046c98e5
945e0af114033d05d571011e9dbf18f2e9375166
refs/heads/master
2022-02-01T23:31:42.679631
2021-12-31T14:16:04
2021-12-31T14:16:04
251,617,280
0
0
null
null
null
null
UTF-8
Java
false
false
846
java
import java.util.Scanner; public class Main_JO_565_자가진단2 { // 제출일 2021-01-18 23:25 public static void main(String[] args) { // 100 미만의 양의 정수들이 주어진다. // 입력받다가 0 이 입력되면 마지막에 입력된 0 을 제외하고 // 그 때까지 입력된 정수의 십의 자리 숫자가 각각 몇 개인지 // 작은 수부터 출력하는 프로그램을 작성하시오. (0개인 숫자는 출력하지 않는다.) Scanner sc = new Scanner(System.in); int[] ten = new int[10]; int input = sc.nextInt(); while (input != 0) { ten[input / 10]++; input = sc.nextInt(); } StringBuilder sb = new StringBuilder(); for (int i = 0; i < 10; i++) { if (ten[i] > 0) { sb.append(String.format("%d : %d\n", i, ten[i])); } } System.out.println(sb.toString()); } }
[ "refresh6724@gmail.com" ]
refresh6724@gmail.com
fef7dbcd71e1dbbba89bca8bcc8d4485c6d3d6ff
2ca93846ab8f638a7d8cd80f91566ee3632cf186
/Variant Programs/1/1-33/promoter/OperatorPolice.java
7431b4c0b362d2ec479159dcddab590923b5c0d3
[ "MIT" ]
permissive
hjc851/SourceCodePlagiarismDetectionDataset
729483c3b823c455ffa947fc18d6177b8a78a21f
f67bc79576a8df85e8a7b4f5d012346e3a76db37
refs/heads/master
2020-07-05T10:48:29.980984
2019-08-15T23:51:55
2019-08-15T23:51:55
202,626,196
0
0
null
null
null
null
UTF-8
Java
false
false
776
java
package promoter; import inventory.*; public class OperatorPolice extends Director { protected synchronized void garnerForthcomingItems() throws DepotUnfilledCaveat { try { this.ongoingAim = this.recordRepository.adjacentArtifact(); } catch (DepotUnfilledCaveat e) { throw e; } } public OperatorPolice(double mingy, double run, Cache now, Cache elapsed) { intercommunicate(mingy, run, now, elapsed); this.republic = ExporterNation.underfed; } protected synchronized void affectAfootElementGiglioWarehousing() throws ArchivingBrimfulDistinction { try { this.incomingEntrepot.bringParticular(this.ongoingAim); this.ongoingAim = null; } catch (ArchivingBrimfulDistinction e) { throw e; } } }
[ "hayden.cheers@me.com" ]
hayden.cheers@me.com
21359163f41c7e0cf8a822986159802d5c49773a
33fc75e370bfb6cde2c656ebbe8c4fa45868e2e1
/Lesson04-advanced-class-features/src/a/person/Test3.java
00fc498f55da80f38d5688f31facc96c07c78204
[]
no_license
eldarba/822-130
d6a9f001dff1789a67e680396dee450e9bc73c7a
43d3c83f5d73b0e0d8bbc21ffb5ef18ca5736e3a
refs/heads/master
2023-04-28T00:06:00.613703
2021-05-10T12:04:36
2021-05-10T12:04:36
313,205,642
2
3
null
null
null
null
UTF-8
Java
false
false
160
java
package a.person; public class Test3 { public static void main(String[] args) { System.out.println(Math.PI); System.out.println(Person.MAX_AGE); } }
[ "eldarba@gmail.com" ]
eldarba@gmail.com
93a958f71d8aa3bb888bbc76684e7bda9cee44d2
4147b05f6fa7f2a11b3aba02915e1abbe64ea3c9
/app/src/main/java/appewtc/masterung/mystoreapp/StoreActivity.java
68eb3a15cb4b2b0d5102c8f98c3fa8cde01ba2fc
[]
no_license
masterUNG/My-Store-App
e3c3cd9c6c5b981cc0b986e7bbe3f87d8bcb92e8
040b1d3712f57958ce40a3c1b302a5a4ffc2fbbf
refs/heads/master
2021-01-20T17:19:46.443167
2016-05-29T09:13:06
2016-05-29T09:13:06
59,883,327
0
0
null
null
null
null
UTF-8
Java
false
false
7,404
java
package appewtc.masterung.mystoreapp; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.os.Environment; import android.os.StrictMode; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import android.widget.Toast; import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; import org.json.JSONArray; import org.json.JSONObject; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; public class StoreActivity extends AppCompatActivity { private ListView listView; private String[] nameStrings, descripStrings, image1Strings, image2Strings, image3Strings, image4Strings, image5Strings, apkStrings; private String urlJSON = "http://swiftcodingthai.com/Moo/get_store_master.php"; private String urlAPK; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_store); listView = (ListView) findViewById(R.id.listView); synMySQLStore(); } // Main Method class InstallTask extends AsyncTask<Void, Void, String> { ProgressDialog mProgressDialog; Context context; String url; public InstallTask(Context context, String url) { this.context = context; this.url = url; } protected void onPreExecute() { mProgressDialog = ProgressDialog.show(context, "Download", " Downloading in progress.."); } private String downloadapk() { String result = ""; try { URL url = new URL(this.url); HttpURLConnection urlConnection = (HttpURLConnection) url .openConnection(); urlConnection.setRequestMethod("GET"); urlConnection.setDoOutput(true); urlConnection.connect(); File sdcard = Environment.getExternalStorageDirectory(); File file = new File(sdcard, "filename.apk"); FileOutputStream fileOutput = new FileOutputStream(file); InputStream inputStream = urlConnection.getInputStream(); byte[] buffer = new byte[1024]; int bufferLength = 0; while ((bufferLength = inputStream.read(buffer)) > 0) { fileOutput.write(buffer, 0, bufferLength); } fileOutput.close(); result = "done"; } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return result; } protected String doInBackground(Void... params) { String result = downloadapk(); return result; } protected void onPostExecute(String result) { if (result.equals("done")) { mProgressDialog.dismiss(); installApk(); } else { Toast.makeText(context, "Error while downloading", Toast.LENGTH_LONG).show(); } } private void installApk() { Intent intent = new Intent(Intent.ACTION_VIEW); Uri uri = Uri.fromFile(new File("/sdcard/filename.apk")); intent.setDataAndType(uri, "application/vnd.android.package-archive"); context.startActivity(intent); } } // Install Task public class ConnectedStore extends AsyncTask<Void, Void, String> { @Override protected String doInBackground(Void... voids) { try { OkHttpClient okHttpClient = new OkHttpClient(); Request.Builder builder = new Request.Builder(); Request request = builder.url(urlJSON).build(); Response response = okHttpClient.newCall(request).execute(); return response.body().string(); } catch (Exception e) { return null; } } // doInBack @Override protected void onPostExecute(String s) { super.onPostExecute(s); try { Log.d("StoreV2", "s ==> " + s); JSONArray jsonArray = new JSONArray(s); nameStrings = new String[jsonArray.length()]; descripStrings = new String[jsonArray.length()]; image1Strings = new String[jsonArray.length()]; image2Strings = new String[jsonArray.length()]; image3Strings = new String[jsonArray.length()]; image4Strings = new String[jsonArray.length()]; image5Strings = new String[jsonArray.length()]; apkStrings = new String[jsonArray.length()]; for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); nameStrings[i] = jsonObject.getString("NameApp"); descripStrings[i] = jsonObject.getString("Description"); image1Strings[i] = jsonObject.getString("Image1"); image2Strings[i] = jsonObject.getString("Image2"); image3Strings[i] = jsonObject.getString("Image3"); image4Strings[i] = jsonObject.getString("Image4"); image5Strings[i] = jsonObject.getString("Image5"); apkStrings[i] = jsonObject.getString("apk"); } //for MyAdapter myAdapter = new MyAdapter(StoreActivity.this, nameStrings, descripStrings, image1Strings); listView.setAdapter(myAdapter); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { myInstallApp(nameStrings[i], apkStrings[i]); } }); } catch (Exception e) { e.printStackTrace(); } } // onPost } // Connected Class private void myInstallApp(String nameString, String apkString) { urlAPK = apkString; Log.d("StoreV3", "urlAPK ==> " + urlAPK); StrictMode.ThreadPolicy threadPolicy = new StrictMode.ThreadPolicy .Builder().permitAll().build(); StrictMode.setThreadPolicy(threadPolicy); InstallTask installTask = new InstallTask(StoreActivity.this, urlAPK); installTask.execute(); Toast.makeText(this, "Install " + nameString + " Successful", Toast.LENGTH_SHORT).show(); } // myInstall private void synMySQLStore() { ConnectedStore connectedStore = new ConnectedStore(); connectedStore.execute(); } } // Main Class
[ "phrombutr@gmail.com" ]
phrombutr@gmail.com
f8eaffe0366dc6178238d0486dc23cacfb6d4fdc
eed7b1dc4f96c61e935e6e94128d433933bba1f7
/src/com/base/action/CommonService.java
02d8a7450a16b9ced86e511b10113905848bf805
[]
no_license
liuyang726/bus
0e8a9c17830b49ffae072594b150255dc4afe62b
1383255fb651e28ead05c8a3f902ad33320a547f
refs/heads/master
2021-06-25T02:07:53.487450
2017-09-08T08:41:02
2017-09-08T08:41:02
102,680,228
0
0
null
null
null
null
UTF-8
Java
false
false
2,713
java
package com.base.action; import java.util.ArrayList; import java.util.HashMap; import com.base.baseDao.BaseDao; import com.base.dbconn.DBConnection; import com.base.util.ActionUtil; public class CommonService extends BaseAction { private static final long serialVersionUID = 2768212069001501333L; @SuppressWarnings({ "static-access", "rawtypes", "unchecked"}) public String action(HashMap requestMap) { StringBuffer sb = new StringBuffer(); BaseDao bd = new BaseDao(); ActionUtil au = new ActionUtil(); HashMap userinfo = (HashMap) requestMap.get("user_session"); String actionType = (String) requestMap.get("actionType"); if (actionType != null && actionType.equals("query")) { if(userinfo != null ){ requestMap.put("areaId", userinfo.get("areaId")); } HashMap list = bd.queryPage(getDBConn(), requestMap); sb.append(au.hashMapToJson(list)); } else if (actionType != null && actionType.equals("add")) { if("success".equals(valid(getDBConn(), requestMap))){ boolean result = bd.insert(getDBConn(), requestMap); sb.append("{\"result\":\""+result+"\"}"); }else{ sb.append("{\"result\":\""+valid(getDBConn(), requestMap)+"\"}"); } } else if (actionType != null && actionType.equals("edit")) { if("success".equals(valid(getDBConn(), requestMap))){ boolean result = bd.update(getDBConn(), requestMap); sb.append("{\"result\":\""+result+"\"}"); }else{ sb.append("{\"result\":\""+valid(getDBConn(), requestMap)+"\"}"); } } else if (actionType != null && actionType.equals("del")) { boolean result = bd.delete(getDBConn(), requestMap); sb.append("{\"result\":\""+result+"\"}"); }else if (actionType != null && actionType.equals("queryAll")) { if(userinfo != null ){ requestMap.put("areaId", userinfo.get("areaId")); } ArrayList<HashMap> list = bd.queryALL(getDBConn(), requestMap); sb.append(au.listToJson(list)); } System.out.println("---" + sb.toString() + "---"); return sb.toString(); } @SuppressWarnings("rawtypes") public String valid(DBConnection dbconn, HashMap requestMap){ String actionType = (String) requestMap.get("actionType"); if("add".equals(actionType)){//|| "edit".equals(actionType) String tableName = (String) requestMap.get("tableName"); String noRepeat = (String) requestMap.get("noRepeat"); String columnValue = (String) requestMap.get(noRepeat); String sql = "select count(*) from "+tableName+" where "+noRepeat+" = '"+columnValue+"'"; int count = dbconn.doQueryCount(sql); if(count > 0) return "您添加的记录已存在,请重新添加!"; } return "success"; } }
[ "MY_NAME@example.com" ]
MY_NAME@example.com
eb93241e96268b4a0d9c1d104b22838ebb552904
f321db1ace514d08219cc9ba5089ebcfff13c87a
/generated-tests/adynamosa/tests/s1017/2_jxpath/evosuite-tests/org/apache/commons/jxpath/util/MethodLookupUtils_ESTest_scaffolding.java
f49b67414d361ff14916ea4df6c72b6fd0ee5b26
[]
no_license
sealuzh/dynamic-performance-replication
01bd512bde9d591ea9afa326968b35123aec6d78
f89b4dd1143de282cd590311f0315f59c9c7143a
refs/heads/master
2021-07-12T06:09:46.990436
2020-06-05T09:44:56
2020-06-05T09:44:56
146,285,168
2
2
null
null
null
null
UTF-8
Java
false
false
6,673
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Jul 23 02:24:04 GMT 2019 */ package org.apache.commons.jxpath.util; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class MethodLookupUtils_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.jxpath.util.MethodLookupUtils"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.dir", "/home/apaniche/performance/Dataset/gordon_scripts/projects/2_jxpath"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MethodLookupUtils_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.jxpath.JXPathException", "org.apache.commons.jxpath.Variables", "org.apache.commons.beanutils.BeanUtilsBean$1", "org.apache.commons.jxpath.PackageFunctions", "org.apache.commons.beanutils.ContextClassLoaderLocal", "org.apache.commons.jxpath.JXPathInvalidAccessException", "org.apache.commons.beanutils.ConvertUtilsBean", "org.apache.commons.beanutils.IntrospectionContext", "org.apache.commons.jxpath.util.TypeConverter", "org.apache.commons.jxpath.KeyManager", "org.apache.commons.jxpath.JXPathContextFactoryConfigurationError", "org.apache.commons.jxpath.util.TypeUtils", "org.apache.commons.jxpath.util.BasicTypeConverter", "org.apache.commons.jxpath.JXPathTypeConversionException", "org.apache.commons.jxpath.util.MethodLookupUtils", "org.apache.commons.jxpath.Functions", "org.apache.commons.beanutils.expression.Resolver", "org.apache.commons.jxpath.JXPathContextFactory", "org.apache.commons.jxpath.ExpressionContext", "org.apache.commons.beanutils.DynaProperty", "org.apache.commons.beanutils.NestedNullException", "org.apache.commons.beanutils.BeanUtilsBean", "org.apache.commons.beanutils.WeakFastHashMap", "org.apache.commons.beanutils.BeanAccessLanguageException", "org.apache.commons.beanutils.MappedPropertyDescriptor", "org.apache.commons.beanutils.Converter", "org.apache.commons.jxpath.CompiledExpression", "org.apache.commons.jxpath.util.TypeUtils$1", "org.apache.commons.jxpath.NodeSet", "org.apache.commons.jxpath.Pointer", "org.apache.commons.beanutils.ConvertUtils", "org.apache.commons.jxpath.IdentityManager", "org.apache.commons.beanutils.PropertyUtilsBean", "org.apache.commons.jxpath.AbstractFactory", "org.apache.commons.jxpath.JXPathContext", "org.apache.commons.jxpath.Function" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("org.apache.commons.jxpath.util.TypeConverter", false, MethodLookupUtils_ESTest_scaffolding.class.getClassLoader())); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MethodLookupUtils_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.jxpath.util.MethodLookupUtils", "org.apache.commons.jxpath.util.BasicTypeConverter", "org.apache.commons.jxpath.util.TypeUtils$1", "org.apache.commons.jxpath.util.TypeUtils", "org.apache.commons.beanutils.ConvertUtils", "org.apache.commons.beanutils.ConvertUtilsBean", "org.apache.commons.beanutils.ContextClassLoaderLocal", "org.apache.commons.beanutils.BeanUtilsBean$1", "org.apache.commons.beanutils.BeanUtilsBean", "org.apache.commons.beanutils.WeakFastHashMap", "org.apache.commons.jxpath.JXPathException" ); } }
[ "granogiovanni90@gmail.com" ]
granogiovanni90@gmail.com
1c56637a2b049971029ad825a33351276f0cf870
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Jsoup-92/org.jsoup.parser.ParseSettings/default/9/org/jsoup/parser/ParseSettings_ESTest.java
4b632bc49cf3548c3e7cecc712421b19821f5b16
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
4,513
java
/* * This file was automatically generated by EvoSuite * Fri Jul 30 07:54:56 GMT 2021 */ package org.jsoup.parser; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.jsoup.nodes.Attributes; import org.jsoup.parser.ParseSettings; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class ParseSettings_ESTest extends ParseSettings_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(true, true); boolean boolean0 = parseSettings0.preserveTagCase(); assertTrue(boolean0); } @Test(timeout = 4000) public void test01() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(true, true); parseSettings0.normalizeTag(""); assertTrue(parseSettings0.preserveTagCase()); } @Test(timeout = 4000) public void test02() throws Throwable { ParseSettings parseSettings0 = ParseSettings.htmlDefault; Attributes attributes0 = new Attributes(); Attributes attributes1 = parseSettings0.normalizeAttributes(attributes0); assertSame(attributes1, attributes0); } @Test(timeout = 4000) public void test03() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(true, true); Attributes attributes0 = new Attributes(); attributes0.put("<J)~>CJj.}", "<J)~>CJj.}"); parseSettings0.normalizeAttributes(attributes0); } @Test(timeout = 4000) public void test04() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(true, false); parseSettings0.preserveCase.normalizeAttribute(""); assertTrue(parseSettings0.preserveTagCase()); } @Test(timeout = 4000) public void test05() throws Throwable { ParseSettings parseSettings0 = ParseSettings.htmlDefault; // Undeclared exception! // try { parseSettings0.normalizeTag((String) null); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("org.jsoup.parser.ParseSettings", e); // } } @Test(timeout = 4000) public void test06() throws Throwable { ParseSettings parseSettings0 = ParseSettings.htmlDefault; // Undeclared exception! // try { parseSettings0.normalizeAttribute((String) null); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("org.jsoup.parser.ParseSettings", e); // } } @Test(timeout = 4000) public void test07() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(true, true); Attributes attributes0 = parseSettings0.normalizeAttributes((Attributes) null); // Undeclared exception! // try { parseSettings0.htmlDefault.normalizeAttributes(attributes0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("org.jsoup.parser.ParseSettings", e); // } } @Test(timeout = 4000) public void test08() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(true, true); String string0 = parseSettings0.htmlDefault.normalizeAttribute("org.jsoup.parser.ParseSettings"); assertEquals("org.jsoup.parser.parsesettings", string0); assertTrue(parseSettings0.preserveTagCase()); } @Test(timeout = 4000) public void test09() throws Throwable { ParseSettings parseSettings0 = ParseSettings.htmlDefault; String string0 = parseSettings0.normalizeTag("org.jsoup.parser.ParseSettings"); assertEquals("org.jsoup.parser.parsesettings", string0); } @Test(timeout = 4000) public void test10() throws Throwable { ParseSettings parseSettings0 = ParseSettings.htmlDefault; boolean boolean0 = parseSettings0.preserveTagCase(); assertFalse(boolean0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
729980e67e1debf2b52c1a292a198828dd52cd17
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/21_geo-google-oasis.names.tc.ciq.xsdschema.xal._2.PremiseNumber-1.0-1/oasis/names/tc/ciq/xsdschema/xal/_2/PremiseNumber_ESTest_scaffolding.java
150230999eda4870dfa838bf1fef5fd10bdd9f81
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
555
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Oct 28 13:12:50 GMT 2019 */ package oasis.names.tc.ciq.xsdschema.xal._2; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class PremiseNumber_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
3f45e6d822aec7058cb848e60a3d04a2d9a6d397
96196a9b6c8d03fed9c5b4470cdcf9171624319f
/decompiled/com/google/android/gms/wearable/internal/ar.java
ab8adce8c89e6b4022c92a924535058be897c5a4
[]
no_license
manciuszz/KTU-Asmens-Sveikatos-Ugdymas
8ef146712919b0fb9ad211f6cb7cbe550bca10f9
41e333937e8e62e1523b783cdb5aeedfa1c7fcc2
refs/heads/master
2020-04-27T03:40:24.436539
2019-03-05T22:39:08
2019-03-05T22:39:08
174,031,152
0
0
null
null
null
null
UTF-8
Java
false
false
1,529
java
package com.google.android.gms.wearable.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.a; import com.google.android.gms.common.internal.safeparcel.b; public class ar implements Creator<aq> { static void a(aq aqVar, Parcel parcel, int i) { int C = b.C(parcel); b.c(parcel, 1, aqVar.versionCode); b.c(parcel, 2, aqVar.statusCode); b.c(parcel, 3, aqVar.amc); b.G(parcel, C); } public aq cJ(Parcel parcel) { int i = 0; int B = a.B(parcel); int i2 = 0; int i3 = 0; while (parcel.dataPosition() < B) { int A = a.A(parcel); switch (a.ar(A)) { case 1: i3 = a.g(parcel, A); break; case 2: i2 = a.g(parcel, A); break; case 3: i = a.g(parcel, A); break; default: a.b(parcel, A); break; } } if (parcel.dataPosition() == B) { return new aq(i3, i2, i); } throw new a.a("Overread allowed size end=" + B, parcel); } public /* synthetic */ Object createFromParcel(Parcel x0) { return cJ(x0); } public aq[] es(int i) { return new aq[i]; } public /* synthetic */ Object[] newArray(int x0) { return es(x0); } }
[ "evilquaint@gmail.com" ]
evilquaint@gmail.com
e441488706f45352ef85b60ae0167d5b5216fc6c
42bb692d9140736c468e7ae328564c12b830b4be
/bitcamp-javaproject/src21/main/java/bitcamp/java106/pms/controller/MemberController.java
218c7909e1cfaecd4bf55875e8c0632d4f987199
[]
no_license
kimkwanhee/bitcamp
b047f4cc391d2c43bad858f2ffb4f3a6a3779aa2
0245693f83b06d773365b9b5b6b3d4747877d070
refs/heads/master
2021-01-24T10:28:06.247239
2018-08-20T03:13:18
2018-08-20T03:13:18
123,054,178
0
0
null
null
null
null
UTF-8
Java
false
false
4,680
java
// Controller 규칙에 따라 메서드 작성 package bitcamp.java106.pms.controller; import java.util.Scanner; import bitcamp.java106.pms.dao.MemberDao; import bitcamp.java106.pms.domain.Member; import bitcamp.java106.pms.util.Console; //MemberController는 Controller 규칙을 이행한다. //=> Controller 규칙에 따라 메서드를 만든다. public class MemberController implements Controller { Scanner keyScan; MemberDao memberDao; public MemberController(Scanner scanner, MemberDao memberDao) { this.keyScan = scanner; this.memberDao = memberDao; } public void service(String menu, String option) { if (menu.equals("member/add")) { this.onMemberAdd(); } else if (menu.equals("member/list")) { this.onMemberList(); } else if (menu.equals("member/view")) { this.onMemberView(option); } else if (menu.equals("member/update")) { this.onMemberUpdate(option); } else if (menu.equals("member/delete")) { this.onMemberDelete(option); } else { System.out.println("명령어가 올바르지 않습니다."); } } void onMemberAdd() { System.out.println("[회원 정보 입력]"); Member member = new Member(); System.out.print("아이디? "); member.setId(this.keyScan.nextLine()); System.out.print("이메일? "); member.setEmail(this.keyScan.nextLine()); System.out.print("암호? "); member.setPassword(this.keyScan.nextLine()); memberDao.insert(member); } void onMemberList() { System.out.println("[회원 목록]"); Member[] list = memberDao.list(); for (int i = 0; i < list.length; i++) { System.out.printf("%s, %s, %s\n", list[i].getId(), list[i].getEmail(), list[i].getPassword()); } } void onMemberView(String id) { System.out.println("[회원 정보 조회]"); if (id == null) { System.out.println("아이디를 입력하시기 바랍니다."); return; } Member member = memberDao.get(id); if (member == null) { System.out.println("해당 아이디의 회원이 없습니다."); } else { System.out.printf("아이디: %s\n", member.getId()); System.out.printf("이메일: %s\n", member.getEmail()); System.out.printf("암호: %s\n", member.getPassword()); } } void onMemberUpdate(String id) { System.out.println("[회원 정보 변경]"); if (id == null) { System.out.println("아이디를 입력하시기 바랍니다."); return; } Member member = memberDao.get(id); if (member == null) { System.out.println("해당 아이디의 회원이 없습니다."); } else { Member updateMember = new Member(); System.out.printf("아이디: %s\n", member.getId()); updateMember.setId(member.getId()); System.out.printf("이메일(%s)? ", member.getEmail()); updateMember.setEmail(this.keyScan.nextLine()); System.out.printf("암호? "); updateMember.setPassword(this.keyScan.nextLine()); memberDao.update(updateMember); System.out.println("변경하였습니다."); } } void onMemberDelete(String id) { System.out.println("[회원 정보 삭제]"); if (id == null) { System.out.println("아이디를 입력하시기 바랍니다."); return; } Member member = memberDao.get(id); if (member == null) { System.out.println("해당 아이디의 회원이 없습니다."); } else { if (Console.confirm("정말 삭제하시겠습니까?")) { memberDao.delete(id); System.out.println("삭제하였습니다."); } } } } //ver 18 - ArrayList가 적용된 MemberDao를 사용한다. // onMemberList()에서 배열의 각 항목에 대해 null 값을 검사하는 부분을 제거한다. //ver 16 - 인스턴스 변수를 직접 사용하는 대신 겟터, 셋터 사용. // ver 15 - MemberDao를 생성자에서 주입 받도록 변경. // ver 14 - MemberDao를 사용하여 회원 데이터를 관리한다.
[ "rhdwn1955@naver.com" ]
rhdwn1955@naver.com
d0f87772099fb4e64df22b055ffd8f614b9aacf7
109fd119a50b30ab0668903b9c44c8297f44f7b2
/antlr-editing-plugins/antlr-live-execution/src/main/java/org/nemesis/antlr/live/execution/InvocationRunner.java
e1973a045bffdcdcd681b93e4ddea8f6bb777cb2
[ "Apache-2.0" ]
permissive
timboudreau/ANTLR4-Plugins-for-NetBeans
d9462bbcd77e9c01788d349b0af2dd31eeb4a183
29c3fc648e833c8d45abd8b2ceb68eee19c76b70
refs/heads/master
2023-05-11T05:28:47.232422
2023-04-29T22:42:03
2023-04-29T22:42:37
156,080,858
1
2
null
2018-11-04T12:40:57
2018-11-04T12:40:57
null
UTF-8
Java
false
false
2,766
java
/* * Copyright 2016-2019 Tim Boudreau, Frédéric Yvon Vinet * * 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.nemesis.antlr.live.execution; import com.mastfrog.function.throwing.ThrowingFunction; import com.mastfrog.util.path.UnixPath; import java.io.IOException; import java.util.function.Consumer; import java.util.function.Supplier; import org.nemesis.antlr.ANTLRv4Parser; import org.nemesis.antlr.memory.AntlrGenerationResult; import org.nemesis.extraction.Extraction; import org.nemesis.jfs.JFS; import org.nemesis.jfs.javac.JFSCompileBuilder; import org.nemesis.jfs.javac.JavacOptions; import org.openide.filesystems.FileObject; /** * Generic abstraction for a thing which will generate some source code into a * JFS, configure a compiler to compile it, configure a (most likely isolated) * and classloader to invoke it. * * @author Tim Boudreau */ public abstract class InvocationRunner<T, A> implements ThrowingFunction<A, T> { private final Class<T> type; protected InvocationRunner(Class<T> type) { this.type = type; } public Class<T> type() { return type; } protected void onDisposed(FileObject fo) { } public boolean isStillValid(A a) { return true; } public final A configureCompilation(ANTLRv4Parser.GrammarFileContext tree, AntlrGenerationResult res, Extraction extraction, JFS jfs, JFSCompileBuilder bldr, String packageName, Consumer<Supplier<ClassLoader>> classloaderSupplierConsumer, Consumer<UnixPath> singleJavaSourceConsumer) throws IOException { bldr.runAnnotationProcessors(false); bldr.sourceAndTargetLevel(8); bldr.setOptions(new JavacOptions().withCharset(jfs.encoding()).withMaxErrors(1)); return onBeforeCompilation(tree, res, extraction, jfs, bldr, packageName, classloaderSupplierConsumer, singleJavaSourceConsumer); } protected abstract A onBeforeCompilation(ANTLRv4Parser.GrammarFileContext tree, AntlrGenerationResult res, Extraction extraction, JFS jfs, JFSCompileBuilder bldr, String grammarPackageName, Consumer<Supplier<ClassLoader>> classloaderSupplierConsumer, Consumer<UnixPath> singleJavaSourceConsumer) throws IOException; }
[ "tim@timboudreau.com" ]
tim@timboudreau.com
aac7c7042fd5c2fdbd4f6b7492e44ce824cb85be
eb8bc68b5c716ec884fe7db0cd7b73f8ee545788
/src/williamsNotebook/easy/binarySearch/FindPeakII.java
fdd31b58f6454232ace5ec9172c47f84d544412b
[]
no_license
yimin12/Algorithm
af5e3fe1ded5e27627e6032d4599987a893698ee
72df21866f2444c7da9b623dbbc3eb74c53118c4
refs/heads/master
2020-08-27T00:19:02.088475
2020-04-30T19:52:43
2020-04-30T19:52:43
217,191,862
2
0
null
2020-04-30T19:52:44
2019-10-24T02:11:44
Java
UTF-8
Java
false
false
3,070
java
/** * */ package williamsNotebook.easy.binarySearch; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * @author yiminH-mail:hymlaucs@gmail.com * @version Create Time:2020年4月6日 下午11:58:04 * Description: * There is an integer matrix which has the following features: * The numbers in adjacent positions are different. The matrix has n rows and m columns. * For all i < m, A[0][i] < A[1][i] && A[n – 2][i] > A[n – 1][i]. * For all j < n, A[j][0] < A[j][1] && A[j][m – 2] > A[j][m – 1]. * We define a position P is a peek if: * A[j][i] > A[j+1][i] && A[j][i] > A[j-1][i] && A[j][i] > A[j][i+1] && A[j][i] > A[j][i-1] * Find a peak element in this matrix. Return the index of the peak. * Example: * [ [1 ,2 ,3 ,6 ,5], [16,41,23,22,6], [15,17,24,21,7], [14,18,19,20,10], [13,14,11,10,9] ] */ public class FindPeakII { // Analysis: 因为21是第三行的最大值, 所以我们如果找个一个比21大的, 就是第二行第四列的22. 我们发现, 如果从21走到22, // 在从22找比它大的往高爬, 永远都不会爬回21所在的第三行, 所以我成功甩掉了第四五行…下面我们来确定在剩下的一半里面, // 一定有我们要找的答案: public List<Integer> findPeak(int[][] A) { if(A == null || A.length == 0) { return new ArrayList<Integer>(); } int m = A.length, n = A[0].length; return find(1, m-2, 1, n-2, A, true); } // Binary Search 的策略是先沿着x轴对半折,然后再沿着y轴对半折,往复循环找到峰值。 private List<Integer> find(int x1, int x2, int y1, int y2, int[][] A, boolean flag){ if(flag) { // binary search for x int mid = x1 + (x2-x1)/2; int index = y1; // record the index of maximum value in mid row for(int i = y1; i < y2; i++) { if(A[mid][i] > A[mid][index]) { index = i; } } if(A[mid-1][index] > A[mid][index]) { return find(x1, mid-1, y1, y2, A, !flag); } else if(A[mid+1][index] > A[mid][index]) { return find(mid+1, x2, y1, y2, A, !flag); } else { // A[mid-1][index] < A[mid][index] > A[mid+1][index] return new ArrayList<Integer>(Arrays.asList(mid, index)); } } else { // binary search for y int mid = y1 + (y2-y1)/2; int index = x1; // record the index of maximum value int mid col for(int i = x1; i < x2; i++) { if(A[i][mid] > A[i][index]) { index = i; } } if(A[index][mid-1] > A[index][mid]) { return find(x1, x2, y1, mid-1, A, !flag); } else if(A[index][mid+1] > A[index][mid]) { return find(x1, x2, mid+1, y2, A, !flag); } else { return new ArrayList<Integer>(Arrays.asList(index, mid)); } } } public static void main(String[] args) { FindPeakII solution = new FindPeakII(); int[][] matrix = {{1 ,2 ,3 ,6 ,5},{16,41,23,22,6},{15,17,24,21,7},{14,18,19,20,10},{13,14,11,10,9}}; List<Integer> findPeak = solution.findPeak(matrix); System.out.println(findPeak.toString()); } }
[ "hymlaucs@gmail.com" ]
hymlaucs@gmail.com
419540812d7f5643b1a11f6b0bc8330e83361360
5714e7075baaa2ed98fe9cc10dfa0e5110a98d5e
/support/cas-server-support-saml-googleapps-core/src/main/java/org/apereo/cas/support/saml/util/GoogleSaml20ObjectBuilder.java
f28fb95b9aecb3ec1c6bee6e0c4200aee9b95b3b
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
hunybei/cas
5646d3a2e7496b400c2d89f6a970a8e841e3067a
6553eace018407336b14c6c016783525d1a7e5eb
refs/heads/master
2020-03-27T20:21:27.270060
2018-09-01T09:41:58
2018-09-01T09:41:58
147,062,720
2
0
Apache-2.0
2018-09-02T07:03:25
2018-09-02T07:03:25
null
UTF-8
Java
false
false
1,744
java
package org.apereo.cas.support.saml.util; import org.apereo.cas.support.saml.OpenSamlConfigBean; import lombok.EqualsAndHashCode; import lombok.val; import org.opensaml.saml.common.xml.SAMLConstants; import org.opensaml.saml.saml2.core.Response; import org.opensaml.saml.saml2.core.Status; import org.opensaml.saml.saml2.core.StatusCode; import javax.xml.XMLConstants; import javax.xml.namespace.QName; /** * This is {@link GoogleSaml20ObjectBuilder} that * attempts to build the saml response. QName based on the spec described here: * https://developers.google.com/google-apps/sso/saml_reference_implementation_web#samlReferenceImplementationWebSetupChangeDomain * * @author Misagh Moayyed * @since 4.1.0 */ @EqualsAndHashCode(callSuper = true) public class GoogleSaml20ObjectBuilder extends AbstractSaml20ObjectBuilder { private static final long serialVersionUID = 2979638064754730668L; public GoogleSaml20ObjectBuilder(final OpenSamlConfigBean configBean) { super(configBean); } @Override public QName getSamlObjectQName(final Class objectType) { try { val f = objectType.getField(DEFAULT_ELEMENT_LOCAL_NAME_FIELD); val name = f.get(null).toString(); if (objectType.equals(Response.class) || objectType.equals(Status.class) || objectType.equals(StatusCode.class)) { return new QName(SAMLConstants.SAML20P_NS, name, "samlp"); } return new QName(SAMLConstants.SAML20_NS, name, XMLConstants.DEFAULT_NS_PREFIX); } catch (final Exception e) { throw new IllegalStateException("Cannot access field " + objectType.getName() + '.' + DEFAULT_ELEMENT_LOCAL_NAME_FIELD); } } }
[ "mmoayyed@unicon.net" ]
mmoayyed@unicon.net
3938278a77ae232a48e75b24f2cce82a77fdec83
0caffe05aeee72bc681351c7ba843bb4b2a4cd42
/dcma-gwt/dcma-gwt-core/src/main/java/com/ephesoft/dcma/gwt/core/client/AbstractController.java
c9a60c8bb2326850f04142fabf2b64a994976e5e
[]
no_license
plutext/ephesoft
d201a35c6096f9f3b67df00727ae262976e61c44
d84bf4fa23c9ed711ebf19f8d787a93a71d97274
refs/heads/master
2023-06-23T10:15:34.223961
2013-02-13T18:35:49
2013-02-13T18:35:49
43,588,917
4
1
null
null
null
null
UTF-8
Java
false
false
2,716
java
/********************************************************************************* * Ephesoft is a Intelligent Document Capture and Mailroom Automation program * developed by Ephesoft, Inc. Copyright (C) 2010-2012 Ephesoft Inc. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by the * Free Software Foundation with the addition of the following permission added * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK * IN WHICH THE COPYRIGHT IS OWNED BY EPHESOFT, EPHESOFT DISCLAIMS THE WARRANTY * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * 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 Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along with * this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact Ephesoft, Inc. headquarters at 111 Academy Way, * Irvine, CA 92617, USA. or at email address info@ephesoft.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Ephesoft" logo. * If the display of the logo is not reasonably feasible for * technical reasons, the Appropriate Legal Notices must display the words * "Powered by Ephesoft". ********************************************************************************/ package com.ephesoft.dcma.gwt.core.client; import com.google.gwt.event.shared.HandlerManager; import com.google.gwt.user.client.ui.Composite; public abstract class AbstractController { protected final HandlerManager eventBus; private final DCMARemoteServiceAsync rpcService; public AbstractController(HandlerManager eventBus, DCMARemoteServiceAsync rpcService) { this.eventBus = eventBus; this.rpcService = rpcService; injectEvents(eventBus); } public HandlerManager getEventBus() { return eventBus; } public DCMARemoteServiceAsync getRpcService() { return rpcService; } public abstract void injectEvents(HandlerManager eventBus); public abstract Composite createView(); public abstract void refresh(); }
[ "enterprise.support@ephesoft.com" ]
enterprise.support@ephesoft.com
4823ced46b8791473522877b7857c39be953ce18
b5695905d93af4d942d48054258fe7e0b4e8fe45
/module/nuls-public-service/src/main/java/io/nuls/api/model/po/SymbolRegInfo.java
6b522c3876ac09b1a834b507f9f3f3d49de32bb4
[ "MIT" ]
permissive
arkDelphi/nerve
d4cddb6916e380afff71adc551dc3bbf679cb518
b0950a2f882e7858db7f75beb4cf12f130f098a3
refs/heads/master
2022-04-20T10:22:20.442901
2020-04-09T09:20:44
2020-04-09T09:20:44
255,826,499
0
1
MIT
2020-04-15T06:33:21
2020-04-15T06:33:20
null
UTF-8
Java
false
false
2,849
java
package io.nuls.api.model.po; import io.nuls.api.constant.ApiConstant; import java.util.Objects; /** * @Author: zhoulijun * @Time: 2020-03-09 11:22 * @Description: 币种注册表,所有通过跨链进入网络的其他币种需要注册在这个对象中 */ public class SymbolRegInfo { private String _id; private String symbol; private Integer assetId; private String contractAddress; private Integer chainId; private String fullName; private Integer decimals; private String icon; private double stackWeight = 0D; private boolean queryPrice; private Integer source; private Integer level = 0; public static String buildId(int assetChainId,int assetId){ return assetChainId + ApiConstant.SPACE + assetId; } public void buildId(){ Objects.requireNonNull(this.getChainId(),"chainId can't be null"); Objects.requireNonNull(this.getAssetId(),"assetId can't be null"); this._id = buildId(chainId,assetId); } public Integer getChainId() { return chainId; } public void setChainId(Integer chainId) { this.chainId = chainId; } public String getFullName() { return fullName; } public void setFullName(String fullName) { this.fullName = fullName; } public Integer getDecimals() { return decimals; } public void setDecimals(Integer decimal) { this.decimals = decimal; } public String getIcon() { return icon; } public void setIcon(String icon) { this.icon = icon; } public double getStackWeight() { return stackWeight; } public void setStackWeight(double stackWeight) { this.stackWeight = stackWeight; } public String get_id() { return _id; } public void set_id(String _id) { this._id = _id; } public String getSymbol() { return symbol; } public void setSymbol(String symbol) { this.symbol = symbol; } public Integer getAssetId() { return assetId; } public void setAssetId(Integer assetId) { this.assetId = assetId; } public String getContractAddress() { return contractAddress; } public void setContractAddress(String contractAddress) { this.contractAddress = contractAddress; } public boolean isQueryPrice() { return queryPrice; } public void setQueryPrice(boolean queryPrice) { this.queryPrice = queryPrice; } public Integer getSource() { return source; } public void setSource(Integer source) { this.source = source; } public Integer getLevel() { return level; } public void setLevel(Integer level) { this.level = level; } }
[ "jideas@163.com" ]
jideas@163.com
60ed6763a11a39a0ffb10727e6c2098936c1e071
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_9606.java
89e0d208365b27873ec7adf356a09a973c6d7564
[ "Apache-2.0" ]
permissive
lesaint/experimenting-annotation-processing
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
1e9692ceb0d3d2cda709e06ccc13290262f51b39
refs/heads/master
2021-01-23T11:20:19.836331
2014-11-13T10:37:14
2014-11-13T10:37:14
26,336,984
1
0
null
null
null
null
UTF-8
Java
false
false
151
java
package fr.javatronic.blog.massive.annotation1.sub1; import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_9606 { }
[ "sebastien.lesaint@gmail.com" ]
sebastien.lesaint@gmail.com
16eacb7ef6c3d403c7ee201d8e320cc4f71930d6
353c42d919fdc6c0c389e911fce9181c018e253e
/ss.core/src/ss/client/networking/protocol/getters/SearchMostRecentMessagesInSphereCommand.java
d186622078fb53ce49dbb50de51de1c18e43d88b
[]
no_license
djat/suprabrowser
ca5decc6fc27a66d7acd6068060285e6c6ac7659
110d84094e3ac6abda2af09f4f20368683103f80
refs/heads/master
2023-05-11T06:34:57.322343
2014-02-08T01:31:07
2014-02-08T01:31:07
10,919,796
1
2
null
2014-02-08T01:31:08
2013-06-24T20:45:03
Java
UTF-8
Java
false
false
493
java
/** * */ package ss.client.networking.protocol.getters; /** * @author zobo * */ public class SearchMostRecentMessagesInSphereCommand extends AbstractGetterCommand { private static final long serialVersionUID = -7886476623541881227L; private static final String SPHERE_ID_TO_SEARCH = "sphereIdToSearch"; public void setSphereId( final String sphereId ){ putArg(SPHERE_ID_TO_SEARCH, sphereId); } public String getSphereId(){ return getStringArg(SPHERE_ID_TO_SEARCH); } }
[ "mexwebdev@gmail.com" ]
mexwebdev@gmail.com
edfcb94ad5c32bec8e64080d41e0635f1a1f0ddd
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/21/org/apache/commons/math3/stat/descriptive/moment/GeometricMean_GeometricMean_77.java
f432e813aed641bd71cfc719b84e9a012ec20501
[]
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,032
java
org apach common math3 stat descript moment return href http www xycoon geometr htm geometr valu link sum log sumoflog instanc comput sum log return code exp sum log code valu result code nan code valu neg code doubl posit infin code result code code code doubl posit infin code code doubl neg infin code valu result code nan code strong note implement strong multipl thread access instanc concurr thread invok code increment code code clear code method extern version geometr geometricmean abstract storeless univari statist abstractstorelessunivariatestatist serializ copi constructor creat code geometr geometricmean ident code origin param origin code geometr geometricmean instanc copi null argument except nullargumentexcept origin geometr geometricmean geometr geometricmean origin null argument except nullargumentexcept copi origin
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
a467501cf5206b3c2a83d9e3be97c9dccedde220
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/third-party/other/external-module-0394/src/java/external_module_0394/a/Foo0.java
efab96be822eaf78f6eadb503fd2dd6b362b41e7
[ "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
1,302
java
package external_module_0394.a; import java.nio.file.*; import java.sql.*; import java.util.logging.*; /** * 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.annotation.processing.Completion * @see javax.lang.model.AnnotatedConstruct * @see javax.management.Attribute */ @SuppressWarnings("all") public abstract class Foo0<O> implements external_module_0394.a.IFoo0<O> { javax.naming.directory.DirContext f0 = null; javax.net.ssl.ExtendedSSLSession f1 = null; javax.rmi.ssl.SslRMIClientSocketFactory f2 = null; public O element; public static Foo0 instance; public static Foo0 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return null; } public String getName() { return element.toString(); } public void setName(String string) { return; } public O get() { return element; } public void set(Object element) { this.element = (O)element; } public O call() throws Exception { return (O)getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
6fc271f266b2a93f67a150648716fc79fc97b78e
18689b77b32bd6557d6b82b3f483e934bcd17511
/ShopBook/src/main/java/com/tampro/entity/ShipmentDetails.java
ec89e4270971972833b4fa1296909c47bd35810e
[]
no_license
xomrayno1/ShopBook
47faf3511ace260b353d33689494f43f4e2e838a
097700d4fcd4d4741230fba11eee9aeb8e9bf914
refs/heads/master
2022-12-29T06:49:27.748072
2020-10-19T17:49:36
2020-10-19T17:49:36
297,365,374
0
0
null
null
null
null
UTF-8
Java
false
false
2,120
java
package com.tampro.entity; import java.util.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; @Entity public class ShipmentDetails { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; private String name; private String province; private String district; private String commune; private String description; private String phone; @ManyToOne @JoinColumn(name = "user_id") private User user; private Date createDate; private Date updateDate; private int activeFlag; public ShipmentDetails() { super(); } public ShipmentDetails(int id) { this.id = id; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getProvince() { return province; } public void setProvince(String province) { this.province = province; } public String getDistrict() { return district; } public void setDistrict(String district) { this.district = district; } public String getCommune() { return commune; } public void setCommune(String commune) { this.commune = commune; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Date getCreateDate() { return createDate; } public void setCreateDate(Date createDate) { this.createDate = createDate; } public Date getUpdateDate() { return updateDate; } public void setUpdateDate(Date updateDate) { this.updateDate = updateDate; } public int getActiveFlag() { return activeFlag; } public void setActiveFlag(int activeFlag) { this.activeFlag = activeFlag; } }
[ "xomrayno5" ]
xomrayno5
50477f9e9cc3a27e2a148005574a27b99bae3801
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-85b-1-3-PESA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils_ESTest.java
e63bddc1f167ef4ac3f6941fe442d1f505a012c7
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
597
java
/* * This file was automatically generated by EvoSuite * Fri Apr 03 08:44:15 UTC 2020 */ package org.apache.commons.math.analysis.solvers; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class UnivariateRealSolverUtils_ESTest extends UnivariateRealSolverUtils_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
657b68f2f18bdaa30d70db854d3eb6dfcc662e9a
318e7e526abb817214cdf558422a2637403ca5c6
/CGB-DB-SYS-V3.01/src/main/java/com/cy/pj/sys/service/impl/SysRoleServiceImpl.java
85354f98e40abe84fb7995f223020e0e65eecb0b
[]
no_license
1083310764/CGB-DB-SYS-V3.01
6298df46e58d7d9fadeb4d2758e957b6df09a999
379e5486570ab4e7554fee66b65e8626b8bd2f41
refs/heads/master
2022-02-19T15:06:30.537812
2020-05-13T10:43:34
2020-05-13T10:43:34
231,498,284
1
0
null
2022-02-09T22:21:28
2020-01-03T02:40:36
JavaScript
UTF-8
Java
false
false
4,158
java
package com.cy.pj.sys.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; import com.cy.pj.common.config.PageProperties; import com.cy.pj.common.exception.ServiceException; import com.cy.pj.common.vo.CheckBox; import com.cy.pj.common.vo.PageObject; import com.cy.pj.sys.dao.SysRoleDao; import com.cy.pj.sys.dao.SysRoleMenuDao; import com.cy.pj.sys.dao.SysUserRoleDao; import com.cy.pj.sys.entity.SysRole; import com.cy.pj.sys.service.SysRoleService; import com.cy.pj.sys.vo.SysRoleMenuVo; @Service public class SysRoleServiceImpl implements SysRoleService { @Autowired private SysRoleDao sysRoleDao; @Autowired private SysRoleMenuDao sysRoleMenuDao; @Autowired private SysUserRoleDao sysUserRoleDao; @Autowired private PageProperties pageProperties; @Override public int saveObject(SysRole entity, Integer[] menuIds) { //1.参数有效性校验 if(entity==null) throw new IllegalArgumentException("保存对象不能为空"); if(StringUtils.isEmpty(entity.getName())) throw new IllegalArgumentException("角色名不能为空"); if(menuIds==null||menuIds.length==0) throw new IllegalArgumentException("需要为角色分配权限"); //2.保存角色自身信息 int rows=sysRoleDao.insertObject(entity); //3.保存角色和菜单关系数据 sysRoleMenuDao.insertObjects(entity.getId(), menuIds); //4.返回结果 return rows; } @Override public int deleteObject(Integer id) { //1.参数校验 if(id==null||id<1) throw new IllegalArgumentException("id值无效"); //2.删除角色关系数据 //2.1删除角色菜单关系数据 sysRoleMenuDao.deleteObjectsByRoleId(id); //2.2删除角色用户关系数据 sysUserRoleDao.deleteObjectsByRoleId(id); //3.删除自身信息并返回结果 int rows=sysRoleDao.deleteObject(id); if(rows==0) throw new ServiceException("记录可能已经不存在"); return rows; } @Override public PageObject<SysRole> findPageObjects(String name, Integer pageCurrent) { //1.参数有效性校验 if(pageCurrent==null||pageCurrent<1) throw new IllegalArgumentException("页码值不正确"); //2.基于条件查询总记录数 int rowCount=sysRoleDao.getRowCount(name); if(rowCount==0) throw new ServiceException("记录不存在"); //3.查询当前页记录 int pageSize=pageProperties.getPageSize(); int startIndex=(pageCurrent-1)*pageSize; List<SysRole> records= sysRoleDao.findPageObjects(name,startIndex, pageSize); //4.封装数据被返回 return new PageObject<>(records, rowCount, pageCurrent, pageSize); } @Override public SysRoleMenuVo findObjectById(Integer id) { //1.合法性验证 if(id==null||id<=0) throw new ServiceException("id的值不合法"); //2.执行查询 SysRoleMenuVo result=sysRoleDao.findObjectById(id); //3.验证结果并返回 if(result==null) throw new ServiceException("此记录已经不存在"); return result; } @Override public int updateObject(SysRole entity,Integer[] menuIds) { //1.合法性验证 if(entity==null) throw new ServiceException("更新的对象不能为空"); if(entity.getId()==null) throw new ServiceException("id的值不能为空"); if(StringUtils.isEmpty(entity.getName())) throw new ServiceException("角色名不能为空"); if(menuIds==null||menuIds.length==0) throw new ServiceException("必须为角色指定一个权限"); //2.更新数据 int rows=sysRoleDao.updateObject(entity); if(rows==0) throw new ServiceException("对象可能已经不存在"); sysRoleMenuDao.deleteObjectsByRoleId(entity.getId()); sysRoleMenuDao.insertObjects(entity.getId(),menuIds); //3.返回结果 return rows; } @Override public List<CheckBox> findObjects() { return sysRoleDao.findObjects(); } }
[ "you@example.com" ]
you@example.com
9f6d3154c6f60e3a34e968cfc94f66d9d1faad5b
eb3707aca229ee832a4302dc3bc7486b33876d16
/core/JavaSource/org/jfantasy/framework/spring/mvc/config/CommonInitializer.java
2cca3990d4acad008f548767e72907d30ae7c5e7
[ "MIT" ]
permissive
limaofeng/jfantasy
2f3a3f7e529c454bb3a982809f0cfeaef8ffafc4
847f789175bfe3f251c497b9926db0db04c7cf4f
refs/heads/master
2021-01-19T04:50:14.451725
2017-07-08T03:44:56
2017-07-08T03:44:56
44,217,781
12
12
null
2016-01-06T08:36:45
2015-10-14T02:00:07
Java
UTF-8
Java
false
false
2,808
java
package org.jfantasy.framework.spring.mvc.config; import org.jfantasy.framework.util.common.PropertiesHelper; import org.jfantasy.framework.util.web.filter.ActionContextFilter; import org.springframework.core.annotation.Order; import org.springframework.orm.hibernate4.support.OpenSessionInViewFilter; import org.springframework.web.WebApplicationInitializer; import org.springframework.web.filter.DelegatingFilterProxy; import org.springframework.web.util.Log4jConfigListener; import javax.servlet.DispatcherType; import javax.servlet.FilterRegistration; import javax.servlet.ServletContext; import javax.servlet.ServletException; import java.util.EnumSet; @Order(1) public class CommonInitializer implements WebApplicationInitializer { @Override public void onStartup(ServletContext servletContext)throws ServletException { //Log4jConfigListener PropertiesHelper propertiesHelper = PropertiesHelper.load("props/application.properties"); servletContext.setInitParameter("webAppRootKey", propertiesHelper.getProperty("webAppRootKey")); //1、Log4jConfigListener servletContext.setInitParameter("log4jConfigLocation", "classpath:log4j/log4j.xml");//由Sprng载入的Log4j配置文件位置 servletContext.setInitParameter("log4jRefreshInterval", "60000");//fresh once every minutes servletContext.setInitParameter("log4jExposeWebAppRoot", "true");//应用是否可以通过System.getProperties(“webAppRootKey”)得到当前应用名。 servletContext.addListener(Log4jConfigListener.class); //5、为 request, response 提供上下文访问对象 ActionContextFilter actionContextFilter = new ActionContextFilter(); FilterRegistration.Dynamic filterRegistration = servletContext.addFilter("actionContextFilter", actionContextFilter); filterRegistration.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, "/*"); //OpenSessionInViewFilter OpenSessionInViewFilter hibernateSessionInViewFilter = new OpenSessionInViewFilter(); filterRegistration = servletContext.addFilter("hibernateOpenSessionInViewFilter", hibernateSessionInViewFilter); filterRegistration.setInitParameter("flushMode", "COMMIT"); filterRegistration.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.INCLUDE), false, "/*"); //6、FileFilter DelegatingFilterProxy fileFilter = new DelegatingFilterProxy(); filterRegistration = servletContext.addFilter("fileFilter", fileFilter); filterRegistration.setInitParameter("targetFilterLifecycle", "true"); filterRegistration.setInitParameter("allowHosts", propertiesHelper.getProperty("file.allowHosts", "static.jfantasy.org")); filterRegistration.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.INCLUDE), false, "/*"); } }
[ "limaofeng@msn.com" ]
limaofeng@msn.com