blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
131 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
32 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
313
9f806ffca10be31b24ce8093bf58dfb5e191f873
6da26f63fca48a8776e2c259156cf2dc79e44dca
/DiagnosticCenter/src/main/java/spboot/web/jpa/entity/TestAppointmentTests.java
00f31c7e3b9a90da1040d601f1edff97ec906ffd
[]
no_license
J-Orion015/DiagnosticCenter
aebe9f0e368068f5f2b5ec8bd35cbb29e5ebcb00
2f605f10195be4f3e0e5ce8125de34f4392ee49f
refs/heads/main
2023-08-29T15:19:32.791550
2021-11-11T07:15:48
2021-11-11T07:15:48
426,555,079
0
0
null
null
null
null
UTF-8
Java
false
false
1,972
java
package spboot.web.jpa.entity; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import javax.persistence.Table; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.ObjectIdGenerators; @Entity @Table(name="test_appointment_tests") @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,property="testAppointmentTestsId") public class TestAppointmentTests { @Id @Column(name="test_appointment_tests_id") int testAppointmentTestsId; @ManyToOne(cascade = CascadeType.REMOVE) @JoinColumn(name="test_appointment_tests_test_app_id") TestAppointment testAppointment; @OneToOne(cascade = CascadeType.REMOVE) @JoinColumn(name="test_appointment_tests_test_id") Tests tests; public TestAppointmentTests() { super(); } public TestAppointmentTests(int testAppointmentTestsId, TestAppointment testAppointment, Tests tests) { super(); this.testAppointmentTestsId = testAppointmentTestsId; this.testAppointment = testAppointment; this.tests = tests; } public int getTestAppointmentTestsId() { return testAppointmentTestsId; } public void setTestAppointmentTestsId(int testAppointmentTestsId) { this.testAppointmentTestsId = testAppointmentTestsId; } public TestAppointment getTestAppointment() { return testAppointment; } public void setTestAppointment(TestAppointment testAppointment) { this.testAppointment = testAppointment; } public Tests getTests() { return tests; } public void setTests(Tests tests) { this.tests = tests; } @Override public String toString() { return "TestAppointmentTests [testAppointmentTestsId=" + testAppointmentTestsId + ", testAppointment=" + testAppointment + ", tests=" + tests + "]"; } }
[ "nayanbhushankn@dr-ait.org" ]
nayanbhushankn@dr-ait.org
d34fe3a1eae74a2f16932b3ef983ca4f871bab3b
ccd9092eba66254d69e7a45233537dec82e7afb5
/DataStructuresandAlgorithms/DataStructs_Implemented/Searching/Search.java
7f0f015b8f53c2c5e4bf2e471c3a8c1ee0b72594
[]
no_license
SandraPapo/CompSci
80cadb816e3f90966d3bb3a8ee92e155bcf862ea
50d46b2d39a8e3c64aba0a36fbfbadb744bd35d5
refs/heads/master
2020-03-21T10:29:34.707778
2018-06-24T04:13:42
2018-06-24T04:13:42
138,452,902
0
0
null
null
null
null
UTF-8
Java
false
false
1,881
java
import java.util.*; public class Search{ public boolean isOrdered(int[] data, int size){ for(int i = 0; i < size-1; i++){ if (data[i] > data[i+1]) return false; } return true; } public int linearSearch(int key, int[] data, int size){ int index = -1; for(int i = 0; i < size; i++){ if(key == data[i]){ index =i; return index; } } return index; } public int jumpSearch(int key, int[] data, int size){ int stepSize = (int)Math.floor(Math.sqrt(size)); int index = -1; for(int i = 0; i < size; i+= stepSize){ if(key == data[i]){ index = i; return index; } if(data[i] > key){ index = linearSearch(key, Arrays.copyOfRange(data, i - stepSize, i),stepSize); return index; } } return index; } public int binarySearch(int key, int[] data, int size){ int begin = 0; int end = size - 1; int mid; while(begin <= end){ mid = (begin+end)/2; if(data[mid] == key) return mid; else if(data[mid] < key) begin = mid + 1; else end = mid -1; } return -1; } public int interpolationSearch(int key, int[] data, int size){ int begin = 0; int end = size - 1; int loc; while(begin <= end){ loc = begin + ((end - begin)/(data[end] - data[begin])*(key - data[begin])); if(data[loc] == key) return loc; else if(data[loc] < key) begin = loc + 1; else end = loc - 1; } return -1; } public static void main(String[] args){ int[] data = {0,1,2,3,4,5,6,7,8,9}; Search test = new Search(); System.out.println("isOrdered: " + test.isOrdered(data, 10)); //Linear Search System.out.println("The number 4 is in Position " + test.linearSearch(4,data, 10)); System.out.println("The number 10 is in Position " + test.jumpSearch(9,data, 10)); System.out.println("The number 2 is in Position " + test.interpolationSearch(2,data, 10)); } }
[ "papos@uwindsor.ca" ]
papos@uwindsor.ca
2f34cb355caf7a8261db96319b60aa1440cb0020
91c8c76c19e26be402ee4798bb076e3a5cfef9aa
/BIDoruDraw/src/pl/idoru/draw/Female.java
ae2b94aad03f4d7b58b4eecf4f164ce5f606f4f9
[]
no_license
bluszcz/BIDoruDraw
74cd04f013f326816cfc06f5c40107dfdcda89ef
88241401d7c8794b8f24996bc6ff2f9aa538fc90
refs/heads/master
2021-01-10T20:59:05.857774
2013-04-22T07:30:14
2013-04-22T07:30:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
196
java
package pl.idoru.draw; public class Female extends Human { public Female(String name) { super(name); this.sex = 0; this.gender = 1; // TODO Auto-generated constructor stub } }
[ "bluszcz@bluszcz.net" ]
bluszcz@bluszcz.net
d9d826ecc409c60cf1f8fbaec5b5ce3ab8ab0d2e
fdee716791e62e0d9752b31b397a381d1d72f645
/CinemaJavaFX-master/src/main/java/Tests/Domain/BookingTest.java
9d70de285f16edacf1ea15f4d14796c3b67dec6b
[]
no_license
ginarosianu/ProiectulColegului
06b49da58760c572f98928071e0fd1db48715c5b
e6ebb4d80a4c981d9b7c9d12c8b2990ff783beac
refs/heads/master
2020-05-09T11:41:23.680777
2019-04-12T22:09:48
2019-04-12T22:09:48
181,089,739
0
0
null
null
null
null
UTF-8
Java
false
false
2,513
java
package Tests.Domain; import Domain.*; import Repository.IRepository; import Repository.InMemoryRepository; import Service.BookingService; import org.junit.jupiter.api.Test; import java.time.LocalDate; import java.time.LocalTime; import static org.junit.jupiter.api.Assertions.*; class BookingTest { private IValidator<Movie> validatorMovie = new MovieValidator(); private IValidator<CustomerCard> validatorCard = new CustomerCardValidator(); private IValidator<Booking> validatorTransaction = new BookingValidator(); private IRepository<Movie> movieRepository = new InMemoryRepository<>(validatorMovie); private IRepository<CustomerCard> customerCardRepository = new InMemoryRepository<>(validatorCard); private IRepository<Booking> bookingRepository = new InMemoryRepository<>(validatorTransaction); private BookingService bookingService = new BookingService(bookingRepository, movieRepository, customerCardRepository); private Movie movie1 = new Movie("1", "batman", 2000, 32, true); private CustomerCard card1 = new CustomerCard("1", "aaa", "bbb", "2222222222222", LocalDate.of(2012,11,22), LocalDate.of(2013,12,11), 15); @Test void getIdMovie() { movieRepository.insert(movie1); customerCardRepository.insert(card1); bookingService.insert("5", "1", "1", LocalDate.of(2012,11,10), LocalTime.of(20,0)); assertEquals("1", bookingService.getAll().get(0).getIdMovie()); } @Test void setIdMovieIdCardDateTimeEqualsAndToString() { movieRepository.insert(movie1); customerCardRepository.insert(card1); bookingService.insert("5", "1", "1", LocalDate.of(2012,11,10), LocalTime.of(20,0)); bookingService.getAll().get(0).setIdMovie("6"); assertEquals("6", bookingService.getAll().get(0).getIdMovie()); bookingService.getAll().get(0).setIdCard("3"); assertEquals("3", bookingService.getAll().get(0).getIdCard()); bookingService.getAll().get(0).setDate(LocalDate.of(2000,11,20)); assertEquals(LocalDate.of(2000,11,20), bookingService.getAll().get(0).getDate()); bookingService.getAll().get(0).setTime(LocalTime.of(13,37)); assertEquals(LocalTime.of(13,37), bookingService.getAll().get(0).getTime()); assertEquals(bookingService.getAll().get(0), new Booking("5", "1", "1", LocalDate.of(2012, 11, 10), LocalTime.of(20, 0))); assertTrue(bookingService.getAll().get(0).toString().contains("5")); } }
[ "gina.rosianu@gmail.com" ]
gina.rosianu@gmail.com
1bd8bf8b2c209a0bef3dc7e5952dea006163d44d
876429b8333f15b3c1ecc8704d7d20676d39363e
/Communicator.Client/src/main/java/bc/bcCommunicator/Client/Model/Messages/Handling/RecievedMessagesHandler.java
6f53a989d3cf5e7527d57a6c5f3a228cd9e8e282
[]
no_license
defacto2k15/bcCommunicator
fa395d5e391c70c98811b742f0fe53b5508bab69
48ff4a5fa538b98f765d0e9a4fd787fb19dd18bd
refs/heads/master
2021-01-21T14:04:32.038798
2016-05-25T13:00:28
2016-05-25T13:00:28
53,136,712
0
0
null
null
null
null
UTF-8
Java
false
false
4,647
java
package bc.bcCommunicator.Client.Model.Messages.Handling; import bc.bcCommunicator.Model.Messages.IMessage; import bc.bcCommunicator.Model.Messages.Handling.AbstractMessageHandler; import bc.bcCommunicator.Model.Messages.Handling.IRecievedMessagesHandler; import bc.bcCommunicator.Model.Messages.Response.IAllUsersAddressesResponse; import bc.bcCommunicator.Model.Messages.Response.IUsernameBadResponse; import bc.bcCommunicator.Model.Messages.Response.IUsernameOkResponse; import bc.bcCommunicator.Model.Messages.Talk.IIntroductoryTalk; import bc.bcCommunicator.Model.Messages.Talk.ILetterTalk; import bc.internetMessageProxy.ConnectionId; // TODO: Auto-generated Javadoc /** * The Class RecievedMessagesHandler. */ public class RecievedMessagesHandler extends AbstractMessageHandler implements IRecievedMessagesHandler { /** The username ok response handler. */ UsernameOkResponseHandler usernameOkResponseHandler; /** The all users addresses response handler. */ AllUsersAddressesResponseHandler allUsersAddressesResponseHandler; /** The introductory talk handler. */ private IntroductoryTalkHandler introductoryTalkHandler; /** The letter talk handler. */ private LetterTalkMessageHandler letterTalkHandler; /** The username bad handler. */ private UsernameBadMessageHandler usernameBadHandler; /** * Instantiates a new recieved messages handler. * * @param usernameOkResponseHandler the username ok response handler * @param allUsersAddressesResponseHandler the all users addresses response handler * @param introductoryTalkHandler the introductory talk handler * @param letterTalkHandler the letter talk handler * @param usernameBadHandler the username bad handler */ public RecievedMessagesHandler(UsernameOkResponseHandler usernameOkResponseHandler, AllUsersAddressesResponseHandler allUsersAddressesResponseHandler, IntroductoryTalkHandler introductoryTalkHandler, LetterTalkMessageHandler letterTalkHandler, UsernameBadMessageHandler usernameBadHandler){ this.usernameOkResponseHandler = usernameOkResponseHandler; this.allUsersAddressesResponseHandler = allUsersAddressesResponseHandler; this.introductoryTalkHandler = introductoryTalkHandler; this.letterTalkHandler = letterTalkHandler; this.usernameBadHandler = usernameBadHandler; } /* (non-Javadoc) * @see bc.bcCommunicator.Model.Messages.Handling.IRecievedMessagesHandler#handle(bc.bcCommunicator.Model.Messages.IMessage, bc.internetMessageProxy.ConnectionId) */ @Override public void handle(IMessage message, ConnectionId id){ try { message.chooseHandler(this, id); } catch (Exception e) { String messageText = null; try { messageText = message.getMessageText(); } catch (Exception e1) { e1.printStackTrace(); } System.err.println("Exception during handling of message "+messageText); e.printStackTrace(); } } /* (non-Javadoc) * @see bc.bcCommunicator.Model.Messages.Handling.AbstractMessageHandler#handle(bc.bcCommunicator.Model.Messages.Response.IUsernameOkResponse, bc.internetMessageProxy.ConnectionId) */ public void handle( IUsernameOkResponse usernameOkResponse, ConnectionId id) throws Exception{ usernameOkResponseHandler.handle(usernameOkResponse, id); } /* (non-Javadoc) * @see bc.bcCommunicator.Model.Messages.Handling.AbstractMessageHandler#handle(bc.bcCommunicator.Model.Messages.Response.IAllUsersAddressesResponse, bc.internetMessageProxy.ConnectionId) */ public void handle( IAllUsersAddressesResponse usernameOkResponse, ConnectionId id) throws Exception{ allUsersAddressesResponseHandler.handle(usernameOkResponse, id); } /* (non-Javadoc) * @see bc.bcCommunicator.Model.Messages.Handling.AbstractMessageHandler#handle(bc.bcCommunicator.Model.Messages.Talk.IIntroductoryTalk, bc.internetMessageProxy.ConnectionId) */ public void handle( IIntroductoryTalk introductoryTalk, ConnectionId id) throws Exception{ introductoryTalkHandler.handle(introductoryTalk, id); } /* (non-Javadoc) * @see bc.bcCommunicator.Model.Messages.Handling.AbstractMessageHandler#handle(bc.bcCommunicator.Model.Messages.Talk.ILetterTalk, bc.internetMessageProxy.ConnectionId) */ public void handle( ILetterTalk talk, ConnectionId id) throws Exception{ letterTalkHandler.handle(talk, id); } /* (non-Javadoc) * @see bc.bcCommunicator.Model.Messages.Handling.AbstractMessageHandler#handle(bc.bcCommunicator.Model.Messages.Response.IUsernameBadResponse, bc.internetMessageProxy.ConnectionId) */ public void handle( IUsernameBadResponse response, ConnectionId id) throws Exception{ usernameBadHandler.handle(response, id); } }
[ "defacto2k15@gmail.com" ]
defacto2k15@gmail.com
3b4581a1439245a1f4d9ac3dd2227f704686be9a
8096895435eef552b7080b6fc10fc3c11d50d260
/common-util/src/main/java/org/igetwell/common/util/JwtTokenUtil.java
39b1bc21e89eb58fe468ed75fffc4262b81bdb67
[]
no_license
HeYixuan/CN-Park
124038aa9c9c0c6523330b1b49003366f3cc1fac
003390be26601e4029eb5338a3a427854944f191
refs/heads/master
2021-07-12T14:52:33.912813
2017-10-13T08:11:51
2017-10-13T08:11:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,984
java
package org.igetwell.common.util; import io.jsonwebtoken.*; import org.apache.tomcat.util.codec.binary.Base64; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.stereotype.Component; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import java.util.Date; import static io.jsonwebtoken.SignatureAlgorithm.HS512; @Component public class JwtTokenUtil { @Value("${jwt.issuer}") private String issuer; @Value("${jwt.secret}") private String secret; @Value("${jwt.expiration}") private Long expiration; /** * Tries to parse specified String as a JWT token. If successful, returns User object with username, id and role prefilled (extracted from token). * If unsuccessful (token is invalid or not containing all required user properties), simply returns null. * * @param token the JWT token to parse * @return the Claims object extracted from specified token or null if a token is invalid. */ public Claims parseToken(String token) { Claims claims; try { claims = Jwts.parser() .requireIssuer(issuer) .setSigningKey(secret) .parseClaimsJws(token) .getBody(); } catch (Exception e){ claims = null; } return claims; } /** * Generates a JWT token containing username as subject, and userId and role as additional claims. These properties are taken from the specified * User object. Tokens validity is infinite. * * @param subject the user for which the token will be generated * @return the JWT token */ public String createToken(String subject) { JwtBuilder builder = Jwts.builder().setHeaderParam("typ", "JWT") .setHeaderParam("alg", SignatureAlgorithm.RS256.getValue()) .setSubject(subject) .setIssuer(issuer) .setIssuedAt(new Date()) .setExpiration(createExpirationDate()) .compressWith(CompressionCodecs.GZIP) .signWith(HS512, secret); return builder.compact(); } /** * 获取用户名 * @param token * @return */ public String getUsername(String token) { String username; try { final Claims claims = parseToken(token); username = claims.getSubject(); }catch (Exception e){ username = null; } return username; } /** * 生成过期时间 * @return */ public Date createExpirationDate(){ return new Date(System.currentTimeMillis() + expiration * 1000); } /** * 解析Token获取过期时间 * @param token * @return */ public Date getExpirationDate(String token) { Date expiration; try { final Claims claims = parseToken(token); expiration = claims.getExpiration(); } catch (Exception e) { expiration = null; } return expiration; } /** * 验证Token是否过期 * @param token * @return */ public Boolean isTokenExpired(String token) { final Date expiration = getExpirationDate(token); return expiration.before(new Date()); } /** * 解析Token验证用户是否当前用户 * @param token * @param info * @return */ public Boolean validateToken(String token, UserDetails info) { final Claims claims = parseToken(token); final String username = claims.getSubject(); return (username.equals(info.getUsername()) && !isTokenExpired(token)); } /** * * </p>生成密钥</p> * @param base64Key base64编码密钥 * @return * @date 2017年7月8日 */ private SecretKey generalKey(String base64Key) { byte[] secretBytes = Base64.decodeBase64(base64Key); SecretKey key = new SecretKeySpec(secretBytes, SignatureAlgorithm.RS256.getJcaName()); return key; } public static void main(String [] args){ System.err.println("test1:" +System.currentTimeMillis()); System.err.println("test2:" +(System.currentTimeMillis() + 180 * 1000)); Date date = new Date(System.currentTimeMillis() + 180 * 1000); JwtTokenUtil jwtTokenUtil = new JwtTokenUtil(); System.out.println("*************************************"); String token = jwtTokenUtil.createToken("admin"); System.err.println(token); System.out.println("*************************************"); System.err.println("parse: " + jwtTokenUtil.parseToken(token)); System.err.println("ExpirationDate: "+ jwtTokenUtil.getExpirationDate(token)); System.err.println("Invalid " + jwtTokenUtil.isTokenExpired(token)); } }
[ "heyixuan@igetwell.cn" ]
heyixuan@igetwell.cn
cb1e7da88f2a9c1d8c2b4644039adf31e336d0c9
a7abad34a59e5a01835443a2f2217edc35459410
/my-multimodule-workshop-v1/multimodule-api-one-workshop-v1/src/main/java/com/multimoduleworkshopv1/apione/home/HomeController.java
c5d6e3692526c3f7877c32557834d87ef8cb7397
[]
no_license
imrangthub/SPRING_BOOT_MULTI_MODULE
4d3d02e32ccad518b260cb95453a780cf67e8e0b
83e5884b50efea6339c6b96707aeb3c4a2356fd9
refs/heads/master
2021-07-10T11:52:37.002951
2020-02-21T03:40:04
2020-02-21T03:40:04
202,865,882
0
0
null
2020-10-13T19:38:09
2019-08-17T10:17:02
Java
UTF-8
Java
false
false
726
java
package com.multimoduleworkshopv1.apione.home; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import com.multimoduleworkshopv1.core.service.MyService; @RestController public class HomeController { @Autowired private MyService myService; @GetMapping("/msg1") public String msg1(HttpServletRequest request) { myService.getMsg1(); return "Home Controller msg1"; } @GetMapping("/msg2") public String msg2(HttpServletRequest request) { myService.getMsg2(); return "Home Controller msg2"; } }
[ "imranmadbar@gmail.com" ]
imranmadbar@gmail.com
4fd4e9fc29b12c93ff9aecf5228a1cb0346c3c19
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_27bbefef14dfcbaf9048bb9fc92e991bbc4a36fe/RawTCPInput/2_27bbefef14dfcbaf9048bb9fc92e991bbc4a36fe_RawTCPInput_s.java
ad70e10cec5bb0fc9dffce13385d227739565ecc
[]
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
4,235
java
/** * Copyright 2013 Lennart Koopmann <lennart@torch.sh> * * This file is part of Graylog2. * * Graylog2 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. * * Graylog2 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 Graylog2. If not, see <http://www.gnu.org/licenses/>. * */ package org.graylog2.inputs.raw.tcp; import com.codahale.metrics.Gauge; import com.codahale.metrics.MetricRegistry; import com.google.common.util.concurrent.ThreadFactoryBuilder; import org.graylog2.inputs.raw.RawInputBase; import org.graylog2.inputs.raw.udp.RawUDPInput; import org.graylog2.inputs.raw.udp.RawUDPPipelineFactory; import org.graylog2.inputs.syslog.tcp.SyslogTCPPipelineFactory; import org.graylog2.plugin.configuration.ConfigurationRequest; import org.graylog2.plugin.configuration.fields.BooleanField; import org.graylog2.plugin.inputs.MisfireException; import org.jboss.netty.bootstrap.ConnectionlessBootstrap; import org.jboss.netty.bootstrap.ServerBootstrap; import org.jboss.netty.channel.ChannelException; import org.jboss.netty.channel.FixedReceiveBufferSizePredictorFactory; import org.jboss.netty.channel.socket.nio.NioDatagramChannelFactory; import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * @author Lennart Koopmann <lennart@torch.sh> */ public class RawTCPInput extends RawInputBase { private static final Logger LOG = LoggerFactory.getLogger(RawUDPInput.class); public static final String NAME = "Raw/Plaintext TCP"; public static final String CK_USE_NULL_DELIMITER = "use_null_delimiter"; @Override public void launch() throws MisfireException { // Register throughput counter gauges. for(Map.Entry<String,Gauge<Long>> gauge : throughputCounter.gauges().entrySet()) { core.metrics().register(MetricRegistry.name(RawUDPInput.class, gauge.getKey()), gauge.getValue()); } final ExecutorService bossThreadPool = Executors.newCachedThreadPool( new ThreadFactoryBuilder() .setNameFormat("input-" + inputId + "-rawtcp-boss-%d") .build()); final ExecutorService workerThreadPool = Executors.newCachedThreadPool( new ThreadFactoryBuilder() .setNameFormat("input-" + inputId + "-rawtcp-worker-%d") .build()); bootstrap = new ServerBootstrap( new NioServerSocketChannelFactory(bossThreadPool, workerThreadPool) ); bootstrap.setPipelineFactory(new RawTCPPipelineFactory(core, config, this, throughputCounter)); try { channel = ((ServerBootstrap) bootstrap).bind(socketAddress); LOG.info("Started raw TCP input on {}", socketAddress); } catch (ChannelException e) { String msg = "Could not bind raw TCP input to address " + socketAddress; LOG.error(msg, e); throw new MisfireException(msg, e); } } @Override public ConfigurationRequest getRequestedConfiguration() { ConfigurationRequest x = super.getRequestedConfiguration(); x.addField( new BooleanField( CK_USE_NULL_DELIMITER, "Null frame delimiter?", false, "Use null byte as frame delimiter? Default is newline." ) ); return x; } @Override public String getName() { return NAME; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
33fc674e6b08935b51f27575fe34632f79e6867c
c2f552f347d4f3eb17ae324150b218df1064af7c
/src/main/java/com/lannis/mybatisplus/service/IDepartmentService.java
ab756aa9098c29d6a827499b49a74ebb775d0bc3
[]
no_license
LuBangTao/MybatisPlusPaging
073097ac52bc18d56c9b4f5a42d5139fc3acf876
2354b414b25625ba6827548de8c0b3af9b57cfdd
refs/heads/master
2022-03-19T11:46:23.262857
2019-11-08T06:42:55
2019-11-08T06:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,882
java
package com.lannis.mybatisplus.service; // _ooOoo_ // o8888888o // 88" . "88 // (| -_- |) // O\ = /O // ____/`---'\____ // . ' \\| |// `. // / \\||| : |||// \ // / _||||| -:- |||||- \ // | | \\\ - /// | | // | \_| ''\---/'' | | // \ .-\__ `-` ___/-. / // ___`. .' /--.--\ `. . __ // ."" '< `.___\_<|>_/___.' >'"". // | | : `- \`.;`\ _ /`;.`/ - ` : | | // \ \ `-. \_ __\ /__ _/ .-` / / // ======`-.____`-.___\_____/___.-`____.-'====== // `=---=' // // ............................................. // 佛祖镇楼 BUG辟易 // // 佛曰: // // 写字楼里写字间,写字间里程序员; // 程序人员写程序,又拿程序换酒钱。 // 酒醒只在网上坐,酒醉还来网下眠; // 酒醉酒醒日复日,网上网下年复年。 // 但愿老死电脑间,不愿鞠躬老板前; // 奔驰宝马贵者趣,公交自行程序员。 // 别人笑我忒疯癫,我笑自己命太贱; // 不见满街漂亮妹,哪个归得程序员? import com.baomidou.mybatisplus.extension.service.IService; import com.lannis.mybatisplus.entity.BusinessDept; /** * @package: com.lannis.mybatisplus.service * @program: mybatisplus * @description: 科室接口层 * @author: LuBangtao * @create: 2019-11-08 13:29 **/ public interface IDepartmentService extends IService<BusinessDept> { }
[ "623636245@qq.com" ]
623636245@qq.com
14eb78e5334b02b06da0ac10e59969420e86f810
01e879b7252d249fb19a2aa2d4c5c653e4d3689f
/Aula6 - Retomada - Lambda/exercicio12/src/exercicio12/Principal.java
22774510a95032764f40b35cb2394c22bb3efd38
[]
no_license
nfandre/LP3A5---Exercicios
f6d016693696830ec0cbe17d55f02e6b730ca490
8e85ea395e0aa3d3d06bb6d0193b7de5e7069de5
refs/heads/master
2021-01-04T05:08:36.657539
2020-10-14T14:10:13
2020-10-14T14:10:13
240,400,763
0
0
null
null
null
null
UTF-8
Java
false
false
999
java
package exercicio12; import java.util.Scanner; import org.omg.PortableServer.THREAD_POLICY_ID; public class Principal { static double X; static double Z; public static void main(String[] args) { Scanner ler = new Scanner(System.in); System.out.println("----------------------------"); System.out.println("Informe o valor de X:"); X = Double.parseDouble(ler.next()); System.out.println("Informe o valor de Z:"); Z = Double.parseDouble(ler.next()); while(Z< X) { System.out.println("Informe o valor de Z que seja maio que o valor de X: X = "+ X); Z = Double.parseDouble(ler.next()); } Thread t = new Thread(() -> { Double count = X; System.out.println("X Z RESPOSTA "); System.out.print(X + " " + Z); System.out.print(" " +count + " + "); while(X<Z) { count++; X += count; System.out.print(" " + count + " + "); } //this.x +=count; System.out.print(" = " + Z); }) ; t.start(); } }
[ "andre.freitas@ibm.com" ]
andre.freitas@ibm.com
f384716c4f3f432cc21237d5ca8d9dddaaddeaef
caf3126dced27d85780991e5405581347d8027a4
/src/main/java/Tree/LC428SerializeAndDeserializeNaryTree.java
71c46e341aa2e455e33e4f4e21f8e7154f52690a
[]
no_license
CSStudySession/AlgoInJava
5d15242e3dbbb6cb9e661dc79b0985f489e2470a
6fa73f00d228a8b68c2842bf940198705c6b0349
refs/heads/master
2020-09-14T21:28:31.021984
2020-03-19T01:41:45
2020-03-19T01:41:45
223,261,121
0
1
null
null
null
null
UTF-8
Java
false
false
3,142
java
package Tree; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; /** * Design an algorithm to serialize and deserialize an N-ary tree. * An N-ary tree is a rooted tree in which each node has no more than N children. * There is no restriction on how your serialization/deserialization algorithm should work. * You just need to ensure that an N-ary tree can be serialized to * a string and this string can be deserialized to the original tree structure. * * Note: * N is in the range of [1, 1000] * Do not use class member/global/static variables to store states. * Your serialize and deserialize algorithms should be stateless. * * 思路:bfs level oder traversal */ public class LC428SerializeAndDeserializeNaryTree { // Encodes a tree to a single string. public String serialize(Node root) { if (root == null) return null; StringBuilder sb = new StringBuilder(); Queue<Node> queue = new LinkedList<>(); sb.append(root.val); sb.append("#"); queue.offer(root); while (!queue.isEmpty()) { int size = queue.size(); for (int i = 0; i < size; i++) { Node curr = queue.poll(); if (curr != null) { List<Node> children = curr.children; if (children == null || children.size() == 0) { sb.append("null"); } else { for (Node c : children) { sb.append(c.val); sb.append(","); queue.offer(c); } } sb.append("#"); } } } return sb.toString().substring(0, sb.length() - 1); } // Decodes your encoded data to tree. public Node deserialize(String data) { if (data == null || data.length() == 0) return null; String[] elements = data.split("#"); Queue<Node> nodes = new LinkedList<>(); Node root = new Node(Integer.valueOf(elements[0]), null); nodes.offer(root); for (int i = 1; i < elements.length; i++) { Node parent = nodes.poll(); List<Node> children = new ArrayList<>(); if (elements[i].equals("null")) { parent.children = children; continue; } String[] kids = elements[i].split(","); for (String child : kids) { if (child.equals("")) continue; if (child.equals("null")) continue; Node curChild = new Node(Integer.valueOf(child), null); children.add(curChild); nodes.offer(curChild); } parent.children = children; } return root; } class Node { public int val; public List<Node> children; public Node() { } public Node(int _val, List<Node> _children) { val = _val; children = _children; } } }
[ "aarliu@cisco.com" ]
aarliu@cisco.com
3a85026b5f1c2ef359474611baaaae1b5112a78d
da79dce23cf47ddb924696fcf68eb08036653910
/app/src/main/java/edu/mesa/cisc/enhancedsnake/MainActivity.java
cbb74929e3ddf6d162d71e60a1e0e8c32a4d0f02
[]
no_license
JamesMesa/EnhancedSnake
47e631a04446e26d11d5c261f52b9e71cb6c86f7
5e1e5d34fc2f7d97e3a1c5bfb4859ca7586a3648
refs/heads/master
2021-01-13T13:22:42.810083
2016-11-03T20:59:58
2016-11-03T20:59:58
72,786,282
0
0
null
null
null
null
UTF-8
Java
false
false
6,026
java
package edu.mesa.cisc.enhancedsnake; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Point; import android.graphics.Rect; import android.os.Bundle; import android.view.Display; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; public class MainActivity extends Activity { Canvas canvas; SnakeAnimView snakeAnimView; //THe snake head sprite sheet Bitmap headAnimBitmap; Bitmap bodyBitmap; Bitmap tailBitmap; //The portion of the bitmap to be drawn in the current frame Rect rectToBeDrawn; //The dimensions of a single frame int frameHeight = 64; int frameWidth = 64; int numFrames = 6; int frameNumber; int screenWidth; int screenHeight; //stats long lastFrameTime; int fps; int hi; //To start the game from onTouchEvent Intent i; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //find out the width and height of the screen Display display = getWindowManager().getDefaultDisplay(); Point size = new Point(); display.getSize(size); screenWidth = size.x; screenHeight = size.y; headAnimBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.head_sprite_sheet); bodyBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.body); bodyBitmap= Bitmap.createScaledBitmap(bodyBitmap, 200, 200, false); tailBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.tail); tailBitmap= Bitmap.createScaledBitmap(tailBitmap, 200, 200, false); snakeAnimView = new SnakeAnimView(this); setContentView(snakeAnimView); i = new Intent(this, GameActivity.class); } class SnakeAnimView extends SurfaceView implements Runnable { Thread ourThread = null; SurfaceHolder ourHolder; volatile boolean playingSnake; Paint paint; public SnakeAnimView(Context context) { super(context); ourHolder = getHolder(); paint = new Paint(); frameWidth=headAnimBitmap.getWidth()/numFrames; frameHeight=headAnimBitmap.getHeight(); } @Override public void run() { while (playingSnake) { update(); draw(); controlFPS(); } } public void update() { //which frame should we draw rectToBeDrawn = new Rect((frameNumber * frameWidth), 0, (frameNumber * frameWidth +frameWidth)-1, frameHeight); //now the next frame frameNumber++; //don't try and draw frames that don't exist if(frameNumber == numFrames){ frameNumber = 0;//back to the first frame } } public void draw() { if (ourHolder.getSurface().isValid()) { canvas = ourHolder.lockCanvas(); //Paint paint = new Paint(); canvas.drawColor(Color.argb(255,186,230,177));//the background paint.setColor(Color.argb(255, 255, 255, 255)); paint.setTextSize(150); canvas.drawText("Snake", 40, 150, paint); paint.setTextSize(45); canvas.drawText(" Hi Score:" + hi, 40, screenHeight-50, paint); //Draw the snake head //make this Rect whatever size and location you like //(startX, startY, endX, endY) Rect destRect = new Rect(screenWidth/2+100, screenHeight/2-100, screenWidth/2+300, screenHeight/2+100); canvas.drawBitmap(headAnimBitmap, rectToBeDrawn, destRect, paint); canvas.drawBitmap(bodyBitmap,screenWidth/2-100,screenHeight/2-100, paint); canvas.drawBitmap(tailBitmap,screenWidth/2-300,screenHeight/2-100, paint); ourHolder.unlockCanvasAndPost(canvas); } } public void controlFPS() { long timeThisFrame = (System.currentTimeMillis() - lastFrameTime); long timeToSleep = 500 - timeThisFrame; if (timeThisFrame > 0) { fps = (int) (1000 / timeThisFrame); } if (timeToSleep > 0) { try { ourThread.sleep(timeToSleep); } catch (InterruptedException e) { } } lastFrameTime = System.currentTimeMillis(); } public void pause() { playingSnake = false; try { ourThread.join(); } catch (InterruptedException e) { } } public void resume() { playingSnake = true; ourThread = new Thread(this); ourThread.start(); } @Override public boolean onTouchEvent(MotionEvent motionEvent) { startActivity(i); finish(); return true; } } @Override protected void onStop() { super.onStop(); while (true) { snakeAnimView.pause(); break; } finish(); } @Override protected void onResume() { super.onResume(); snakeAnimView.resume(); } @Override protected void onPause() { super.onPause(); snakeAnimView.pause(); } public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { snakeAnimView.pause(); finish(); return true; } return false; } }
[ "cisc@ac.sdmesa.net" ]
cisc@ac.sdmesa.net
3385a62b6138c5ab3a323551b6a45d4e6e3b114a
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/8_gfarcegestionfa-fr.unice.gfarce.interGraph.EnvoiRespAction-1.0-10/fr/unice/gfarce/interGraph/EnvoiRespAction_ESTest_scaffolding.java
aab32d5e23f33374342ed94324b4450697a1a007
[]
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
548
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Oct 26 01:35:01 GMT 2019 */ package fr.unice.gfarce.interGraph; 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 EnvoiRespAction_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
4689f6656273757dafdd8af7997be5738eed71e0
3a3baec615ee37818d713c8784b1c9c439b5ab58
/visaprocess/src/main/java/org/boa/visaprocess/delegates/AcceptDelegate.java
64e5aa402dbb5c7a1714b3de84f78597bdac7906
[ "Apache-2.0" ]
permissive
VigneshSettipalli/camunda
8813f6414eca39d130465c1aec45f3840c47a5c1
4f3d22565a60a851460a9fa3daa5c53e7458de46
refs/heads/master
2021-02-04T18:16:19.732950
2020-02-28T06:38:50
2020-02-28T06:38:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
794
java
package org.boa.visaprocess.delegates; import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.engine.delegate.DelegateExecution; import org.camunda.bpm.engine.delegate.JavaDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component("acceptedDelegate") public class AcceptDelegate implements JavaDelegate { @Autowired private RuntimeService runtimeService; @Override public void execute(DelegateExecution execution) throws Exception { System.out.println("Visa Accepted -> " + execution.getVariable("status")); /* * runtimeService.createSignalEvent("Signal_1pcdpsb").send(); * execution.setVariable("token", 24); */ System.out.println("Subprocess Triggered"); } }
[ "rajkumar.balu@yahoo.co.in" ]
rajkumar.balu@yahoo.co.in
823a166464af08d2b104e8c0e33520acce49affb
978c5d3b0ddbe1147d9acf15ff8113243b2a574f
/src/com/flf/entity/Fadvert.java
f74ed75e12c6dafc0260cf287b23e23417f6910f
[]
no_license
zhusmile/ssm
0284a762174818c037adee9a7429c89eba9f2ac7
09ad82378e907960cab28dc6b27e7210baf0d082
refs/heads/master
2020-04-01T17:01:56.067256
2018-10-17T06:44:16
2018-10-17T06:57:08
153,409,786
0
0
null
null
null
null
UTF-8
Java
false
false
1,718
java
package com.flf.entity; //金融服务宣传位 特殊单独写 public class Fadvert { private Integer fId;//id 对应表tb_finadvert 字段fa_id private String fName;//名称 对应字段fa_name private String fType;//类别 对应字段fa_type private String fDescrip;//描述 对应字段fa_descrip private String fLink;//链接 对应字段fa_link private Integer fOrder;//排序 对应字段fa_order private Integer fSetTop;//置顶 对应字段fa_setTop private Page page; public Page getPage() { if(page==null) page=new Page(); return page; } public void setPage(Page page) { this.page = page; } public Integer getfId() { return fId; } public void setfId(Integer fId) { this.fId = fId; } public String getfName() { return fName; } public void setfName(String fName) { this.fName = fName; } public String getfType() { return fType; } public void setfType(String fType) { this.fType = fType; } public String getfDescrip() { return fDescrip; } public void setfDescrip(String fDescrip) { this.fDescrip = fDescrip; } public String getfLink() { return fLink; } public void setfLink(String fLink) { this.fLink = fLink; } public Integer getfOrder() { return fOrder; } public void setfOrder(Integer fOrder) { this.fOrder = fOrder; } public Integer getfSetTop() { return fSetTop; } public void setfSetTop(Integer fSetTop) { this.fSetTop = fSetTop; } @Override public String toString() { return "Fadvert [fId=" + fId + ", fName=" + fName + ", fType=" + fType + ", fDescrip=" + fDescrip + ", fLink=" + fLink + ", fOrder=" + fOrder + ", fSetTop=" + fSetTop + "]"; } }
[ "zhusmiling@163.com" ]
zhusmiling@163.com
2c00a3a4d3b3087adb99324e96192a7c4e1d4500
57594d5f4cde08331a782be9d31f00d74f930bae
/app/src/test/java/com/juntcompany/godandgodsummer/ExampleUnitTest.java
03bf310399399b66a342796c908e3078997d4d98
[]
no_license
kiss9815/GodAndGodSummer
96b8228eaac6341fbc3860a87d4ca7bda7835f6c
c647c04224e84b14b0acc29afe6cffa1f1d58380
refs/heads/master
2020-05-21T13:46:42.835088
2016-10-26T08:54:02
2016-10-26T08:54:02
62,382,822
0
3
null
2016-10-26T08:54:02
2016-07-01T09:45:13
Java
UTF-8
Java
false
false
324
java
package com.juntcompany.godandgodsummer; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "kiss9815@naver.com" ]
kiss9815@naver.com
482e9b09da60745f67f86c4b1b516daf27c197b9
2f6572a14d02c5dc7ad6ba6302c9199f9558efb0
/src/test/java/HomeWork4/tsk1/TrapeziumTest.java
451c82e3c0f1df6ec7f77651e82c5079f19ce96b
[]
no_license
jekoGetMan/HomeWork4
bee8e43e9f02928883328e5cf6d0768283547bb2
c6a311787994a38fc04c63a0f6d7b69f2131081e
refs/heads/master
2020-04-09T05:55:06.882621
2018-12-02T21:22:03
2018-12-02T21:22:03
160,086,926
0
0
null
null
null
null
UTF-8
Java
false
false
946
java
package HomeWork4.tsk1; import static org.junit.jupiter.api.Assertions.*; import org.junit.Test; import static org.junit.Assert.*; //import static org.mockito.Mockito.mock; //import static org.mockito.Mockito.verify; public class TrapeziumTest { @Test public void trap1() { Trapezium trapeziume = new Trapezium(3,5,2,3); assertEquals("Trapezium", figureSquare.getName()); assertEquals(8, figureSquare.square(), 0.4); } @Test public void trap2() { Trapezium trapezium = new Trapezium(); assertEquals("Trapezium",figureSquare.getName()); assertEquals(3, figureSquare.square(), 0.3); } @Test public void trap3() { Trapezium trapezium = new Trapezium(88,1,2,3); assertEquals("Trapezium", figureSquare.getName()); assertEquals(3, figureSquare.square(), 0.7); } }
[ "sl1mvsshady@gmail.com" ]
sl1mvsshady@gmail.com
b948ede691edbe59785364756008b54108b1a6b8
2be34d47600854fd13b003bca430c97feaa340a8
/SpringBoot/springboot-demo/src/test/java/com/zuql/springbootdemo/SpringbootDemoApplicationTests.java
21657da87c83fa37b6fa642480af92d6a15784d2
[]
no_license
zuql/demo
1a99b58bb86cd8c4b6ec72d84644cb02bbaf1ac5
c06ad8cb8647609b790eaf31af66accd6efdf11b
refs/heads/master
2020-05-05T09:58:10.567402
2019-05-21T15:25:10
2019-05-21T15:25:10
179,924,817
0
0
null
null
null
null
UTF-8
Java
false
false
357
java
package com.zuql.springbootdemo; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class SpringbootDemoApplicationTests { @Test public void contextLoads() { } }
[ "17712743419@163.com" ]
17712743419@163.com
30b1fbd8226fe09e9ccd44bcede73db73ef2dcaf
8a71e3e05dd69a8feb931ac5f975bbbaa056e95f
/src/se/chalmers/matsho/Tetris/TetrisModel.java
55fd9b6be8ced2bffd6fe7d4b3249f1e123c7e67
[]
no_license
mhgbrg/Tetris.ep
ae622eb5299610926f79cd1bec2d297ad4d00326
20d6e415ab77f9a1bca22a8dac325992dd069539
refs/heads/master
2021-01-13T02:14:34.577630
2016-02-23T20:40:44
2016-02-23T20:40:52
26,589,368
0
0
null
null
null
null
UTF-8
Java
false
false
8,483
java
// Labbgrupp 74 // Mats Högberg // Filip Hallqvist package se.chalmers.matsho.Tetris; import java.awt.Color; import java.awt.Dimension; import java.awt.event.KeyEvent; import java.util.Random; /** * Model class for the game Tetris * * @author Mats Högberg * @author Filip Hallqvist */ public class TetrisModel extends GameModel { // The gameboard size private static Dimension size; private int score = 0; private boolean gameOver = false; // Tile for the background private static final GameTile BLANK_TILE = new RectangularTile(Color.BLACK); // Startposition for new pieces private static Position START_POS; // Containers for current piece and current piece tile private TetrisPiece currentPiece; private PieceTile currentPieceTile; // Number of times the gameloop has run private int loopCount = 0; /** * Default constructor. Blanks the board, sets start position for new pieces * and gets and displays a new piece. */ public TetrisModel() { size = getGameboardSize(); blankBoard(); START_POS = new Position(size.width / 2 - 2, -1); getNewPiece(); } /** * Fills the entire board with blank tiles. */ private void blankBoard() { for (int row = 0; row < size.height; row++) { blankRow(row); } } /** * Fills a single row with blank tiles. * * @param row The row to blank */ private void blankRow(final int row) { for (int col = 0; col < size.width; col++) { setGameboardState(col, row, BLANK_TILE); } } /** * Sets the current piece to a new random piece and sets currentPieceTile * to the correct color. */ private void getNewPiece() { Position startPos = new Position(START_POS.getX(), START_POS.getY()); Random rand = new Random(); switch (rand.nextInt(7)) { case 0: currentPiece = new OPiece(startPos, Color.YELLOW); break; case 1: currentPiece = new IPiece(startPos, Color.CYAN); break; case 2: currentPiece = new SPiece(startPos, Color.GREEN); break; case 3: currentPiece = new ZPiece(startPos, Color.RED); break; case 4: currentPiece = new LPiece(startPos, Color.ORANGE); break; case 5: currentPiece = new JPiece(startPos, Color.BLUE); break; case 6: currentPiece = new TPiece(startPos, new Color(255, 0, 255)); break; } currentPieceTile = new PieceTile(currentPiece.getColor()); } /** * This method is called periodically to update the game state. * * It takes the last user input and performs the corresponding action * every time it runs. Every fourth iteration it automatically moves the current * piece down one row. * * @throws GameOverException */ @Override public void gameUpdate(final int lastKey) throws GameOverException { if (gameOver) { throw new GameOverException(this.score); } loopCount++; blankCurrentPiece(); try { updateAction(lastKey); // Move the piece down one row automatically every fourth iteration if (loopCount >= 4) { if (isMoveLegal(0, 1)) { currentPiece.moveDown(); } else { throw new HitBottomException(); } loopCount = 0; } } catch (HitBottomException e) { displayCurrentPiece(); lineClear(); getNewPiece(); gameOver = checkForGameOver(); loopCount = 0; } displayCurrentPiece(); } /** * This method is run when a new piece is generated, and checks if it is spawned * on an already placed piece. * * @return True if game over, otherwise false */ private boolean checkForGameOver() { if (checkForCollision(currentPiece.getState(), currentPiece.getPos())) { return true; } return false; } /** * Performs an action depending on user input. * * * up arrow - rotate piece * * down arrow - move piece down one row * * left arrow - move piece one column to the left * * right arrow - move piece one column to the right * * space key - drop piece to the bottom * * @throws HitBottomException if a piece hits the bottom after movement */ private void updateAction(final int key) throws HitBottomException { switch (key) { case KeyEvent.VK_LEFT: if (isMoveLegal(-1, 0)) { currentPiece.moveLeft(); } break; case KeyEvent.VK_RIGHT: if (isMoveLegal(1, 0)) { currentPiece.moveRight(); } break; case KeyEvent.VK_UP: if (isRotateLegal()) { currentPiece.rotate(); } break; case KeyEvent.VK_DOWN: if (isMoveLegal(0, 1)) { currentPiece.moveDown(); } else { throw new HitBottomException(); } break; case KeyEvent.VK_SPACE: dropPiece(); throw new HitBottomException(); } } /** * Drops a piece to the bottom. */ private void dropPiece() { while (isMoveLegal(0, 1)) { currentPiece.moveDown(); } } /** * Loops through all and checks for line clears. Updates score if * one or more lines have been cleared. */ private void lineClear() { int combo = 0; for (int row = 0; row < size.height; row++) { if (checkFullRow(row)) { combo++; blankRow(row); shiftBoardDown(row); blankRow(0); } } score += getScoreForCombo(combo); } /** * Returns the correct score for a combo * * @param combo Number of lines cleared * @return Score for specified combo */ private static int getScoreForCombo(int combo) { switch(combo) { case 1: return 40; case 2: return 100; case 3: return 300; case 4: return 1200; } return 0; } /** * Checks if a row has been filled * * @param row The row to check * @return true if full, otherwise false */ private boolean checkFullRow(final int row) { for (int col = 0; col < size.width; col++) { if (getGameboardState(col, row) == BLANK_TILE) { return false; } } return true; } /** * Shifts the entire board down one row, starting from fromRow and going up * * @param fromRow The row to start from */ private void shiftBoardDown(final int fromRow) { for (int i = fromRow - 1; i >= 0; i--) { shiftRowDown(i); } } /** * Shifts a row down one step * * @param row The row to shift */ private void shiftRowDown(final int row) { for (int col = 0; col < size.width; col++) { setGameboardState(col, row + 1, getGameboardState(col, row)); } } /** * Checks if a move is legal * * @param deltaX Movement in x-axis * @param deltaY Movement in y-axis * @return True if move is legal, otherwise false */ private boolean isMoveLegal(final int deltaX, final int deltaY) { try { Position newPos = new Position(currentPiece.getPos().getX() + deltaX, currentPiece.getPos().getY() + deltaY); return !checkForCollision(currentPiece.getState(), newPos); } catch (ArrayIndexOutOfBoundsException e) { return false; } } /** * Checks if rotate is legal * * @return True if move is legal, otherwise false */ private boolean isRotateLegal() { try { return !checkForCollision(currentPiece.getNextState(), currentPiece.getPos()); } catch (ArrayIndexOutOfBoundsException e) { return false; } } /** * Checks if a piece state on a given position collides with something * * @param state The state to check with * @param pos The position to check from * @return True if collision, otherwise false */ private boolean checkForCollision(final boolean[][] state, final Position pos) { for (int i = 0; i < state.length; i++) { for (int j = 0; j < state[i].length; j++) { if (state[i][j]) { if (getGameboardState( j + pos.getX(), i + pos.getY()) != BLANK_TILE) { return true; } } } } return false; } /** * Fills the current piece on current position with blank tiles */ private void blankCurrentPiece() { repaintCurrentPiece(BLANK_TILE); } /** * Fills the current piece on current position with currentPieceTile */ private void displayCurrentPiece() { repaintCurrentPiece(currentPieceTile); } /** * Fills the squares for the current piece with a specified tile * * @param tile The tile to fill with */ private void repaintCurrentPiece(final GameTile tile) { boolean[][] state = currentPiece.getState(); Position pos = currentPiece.getPos(); for (int i = 0; i < state.length; i++) { for (int j = 0; j < state[i].length; j++) { if (state[i][j]) { setGameboardState( j + pos.getX(), i + pos.getY(), tile ); } } } } }
[ "mats@hgbrg.se" ]
mats@hgbrg.se
130c6230dc0f399a22f8bc7a222f6188d820ab80
5d7c8d78e72ae3ea6e61154711fdd23248c19614
/sources/android/support/v4/widget/DrawerLayout.java
265679f3ff9644b05d12a9bddc4a81c252936455
[]
no_license
activeliang/tv.taobao.android
8058497bbb45a6090313e8445107d987d676aff6
bb741de1cca9a6281f4c84a6d384333b6630113c
refs/heads/master
2022-11-28T10:12:53.137874
2020-08-06T05:43:15
2020-08-06T05:43:15
285,483,760
7
6
null
null
null
null
UTF-8
Java
false
false
64,773
java
package android.support.v4.widget; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemClock; import android.support.annotation.ColorInt; import android.support.annotation.DrawableRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.content.ContextCompat; import android.support.v4.graphics.drawable.DrawableCompat; import android.support.v4.os.ParcelableCompat; import android.support.v4.os.ParcelableCompatCreatorCallbacks; import android.support.v4.view.AbsSavedState; import android.support.v4.view.AccessibilityDelegateCompat; import android.support.v4.view.GravityCompat; import android.support.v4.view.MotionEventCompat; import android.support.v4.view.ViewCompat; import android.support.v4.view.ViewGroupCompat; import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; import android.support.v4.widget.ViewDragHelper; import android.util.AttributeSet; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; import android.view.accessibility.AccessibilityEvent; import com.uc.webview.export.extension.UCCore; import java.util.ArrayList; import java.util.List; public class DrawerLayout extends ViewGroup implements DrawerLayoutImpl { private static final boolean ALLOW_EDGE_LOCK = false; static final boolean CAN_HIDE_DESCENDANTS; private static final boolean CHILDREN_DISALLOW_INTERCEPT = true; private static final int DEFAULT_SCRIM_COLOR = -1728053248; private static final int DRAWER_ELEVATION = 10; static final DrawerLayoutCompatImpl IMPL; static final int[] LAYOUT_ATTRS = {16842931}; public static final int LOCK_MODE_LOCKED_CLOSED = 1; public static final int LOCK_MODE_LOCKED_OPEN = 2; public static final int LOCK_MODE_UNDEFINED = 3; public static final int LOCK_MODE_UNLOCKED = 0; private static final int MIN_DRAWER_MARGIN = 64; private static final int MIN_FLING_VELOCITY = 400; private static final int PEEK_DELAY = 160; private static final boolean SET_DRAWER_SHADOW_FROM_ELEVATION; public static final int STATE_DRAGGING = 1; public static final int STATE_IDLE = 0; public static final int STATE_SETTLING = 2; private static final String TAG = "DrawerLayout"; private static final float TOUCH_SLOP_SENSITIVITY = 1.0f; private final ChildAccessibilityDelegate mChildAccessibilityDelegate; private boolean mChildrenCanceledTouch; private boolean mDisallowInterceptRequested; private boolean mDrawStatusBarBackground; private float mDrawerElevation; private int mDrawerState; private boolean mFirstLayout; private boolean mInLayout; private float mInitialMotionX; private float mInitialMotionY; private Object mLastInsets; private final ViewDragCallback mLeftCallback; private final ViewDragHelper mLeftDragger; @Nullable private DrawerListener mListener; private List<DrawerListener> mListeners; private int mLockModeEnd; private int mLockModeLeft; private int mLockModeRight; private int mLockModeStart; private int mMinDrawerMargin; private final ArrayList<View> mNonDrawerViews; private final ViewDragCallback mRightCallback; private final ViewDragHelper mRightDragger; private int mScrimColor; private float mScrimOpacity; private Paint mScrimPaint; private Drawable mShadowEnd; private Drawable mShadowLeft; private Drawable mShadowLeftResolved; private Drawable mShadowRight; private Drawable mShadowRightResolved; private Drawable mShadowStart; private Drawable mStatusBarBackground; private CharSequence mTitleLeft; private CharSequence mTitleRight; interface DrawerLayoutCompatImpl { void applyMarginInsets(ViewGroup.MarginLayoutParams marginLayoutParams, Object obj, int i); void configureApplyInsets(View view); void dispatchChildInsets(View view, Object obj, int i); Drawable getDefaultStatusBarBackground(Context context); int getTopInset(Object obj); } public interface DrawerListener { void onDrawerClosed(View view); void onDrawerOpened(View view); void onDrawerSlide(View view, float f); void onDrawerStateChanged(int i); } static { boolean z; boolean z2 = true; if (Build.VERSION.SDK_INT >= 19) { z = true; } else { z = false; } CAN_HIDE_DESCENDANTS = z; if (Build.VERSION.SDK_INT < 21) { z2 = false; } SET_DRAWER_SHADOW_FROM_ELEVATION = z2; if (Build.VERSION.SDK_INT >= 21) { IMPL = new DrawerLayoutCompatImplApi21(); } else { IMPL = new DrawerLayoutCompatImplBase(); } } public static abstract class SimpleDrawerListener implements DrawerListener { public void onDrawerSlide(View drawerView, float slideOffset) { } public void onDrawerOpened(View drawerView) { } public void onDrawerClosed(View drawerView) { } public void onDrawerStateChanged(int newState) { } } static class DrawerLayoutCompatImplBase implements DrawerLayoutCompatImpl { DrawerLayoutCompatImplBase() { } public void configureApplyInsets(View drawerLayout) { } public void dispatchChildInsets(View child, Object insets, int drawerGravity) { } public void applyMarginInsets(ViewGroup.MarginLayoutParams lp, Object insets, int drawerGravity) { } public int getTopInset(Object insets) { return 0; } public Drawable getDefaultStatusBarBackground(Context context) { return null; } } static class DrawerLayoutCompatImplApi21 implements DrawerLayoutCompatImpl { DrawerLayoutCompatImplApi21() { } public void configureApplyInsets(View drawerLayout) { DrawerLayoutCompatApi21.configureApplyInsets(drawerLayout); } public void dispatchChildInsets(View child, Object insets, int drawerGravity) { DrawerLayoutCompatApi21.dispatchChildInsets(child, insets, drawerGravity); } public void applyMarginInsets(ViewGroup.MarginLayoutParams lp, Object insets, int drawerGravity) { DrawerLayoutCompatApi21.applyMarginInsets(lp, insets, drawerGravity); } public int getTopInset(Object insets) { return DrawerLayoutCompatApi21.getTopInset(insets); } public Drawable getDefaultStatusBarBackground(Context context) { return DrawerLayoutCompatApi21.getDefaultStatusBarBackground(context); } } public DrawerLayout(Context context) { this(context, (AttributeSet) null); } public DrawerLayout(Context context, AttributeSet attrs) { this(context, attrs, 0); } public DrawerLayout(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); this.mChildAccessibilityDelegate = new ChildAccessibilityDelegate(); this.mScrimColor = DEFAULT_SCRIM_COLOR; this.mScrimPaint = new Paint(); this.mFirstLayout = true; this.mLockModeLeft = 3; this.mLockModeRight = 3; this.mLockModeStart = 3; this.mLockModeEnd = 3; this.mShadowStart = null; this.mShadowEnd = null; this.mShadowLeft = null; this.mShadowRight = null; setDescendantFocusability(262144); float density = getResources().getDisplayMetrics().density; this.mMinDrawerMargin = (int) ((64.0f * density) + 0.5f); float minVel = 400.0f * density; this.mLeftCallback = new ViewDragCallback(3); this.mRightCallback = new ViewDragCallback(5); this.mLeftDragger = ViewDragHelper.create(this, TOUCH_SLOP_SENSITIVITY, this.mLeftCallback); this.mLeftDragger.setEdgeTrackingEnabled(1); this.mLeftDragger.setMinVelocity(minVel); this.mLeftCallback.setDragger(this.mLeftDragger); this.mRightDragger = ViewDragHelper.create(this, TOUCH_SLOP_SENSITIVITY, this.mRightCallback); this.mRightDragger.setEdgeTrackingEnabled(2); this.mRightDragger.setMinVelocity(minVel); this.mRightCallback.setDragger(this.mRightDragger); setFocusableInTouchMode(true); ViewCompat.setImportantForAccessibility(this, 1); ViewCompat.setAccessibilityDelegate(this, new AccessibilityDelegate()); ViewGroupCompat.setMotionEventSplittingEnabled(this, false); if (ViewCompat.getFitsSystemWindows(this)) { IMPL.configureApplyInsets(this); this.mStatusBarBackground = IMPL.getDefaultStatusBarBackground(context); } this.mDrawerElevation = 10.0f * density; this.mNonDrawerViews = new ArrayList<>(); } public void setDrawerElevation(float elevation) { this.mDrawerElevation = elevation; for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); if (isDrawerView(child)) { ViewCompat.setElevation(child, this.mDrawerElevation); } } } public float getDrawerElevation() { if (SET_DRAWER_SHADOW_FROM_ELEVATION) { return this.mDrawerElevation; } return 0.0f; } public void setChildInsets(Object insets, boolean draw) { this.mLastInsets = insets; this.mDrawStatusBarBackground = draw; setWillNotDraw(!draw && getBackground() == null); requestLayout(); } public void setDrawerShadow(Drawable shadowDrawable, int gravity) { if (!SET_DRAWER_SHADOW_FROM_ELEVATION) { if ((gravity & GravityCompat.START) == 8388611) { this.mShadowStart = shadowDrawable; } else if ((gravity & GravityCompat.END) == 8388613) { this.mShadowEnd = shadowDrawable; } else if ((gravity & 3) == 3) { this.mShadowLeft = shadowDrawable; } else if ((gravity & 5) == 5) { this.mShadowRight = shadowDrawable; } else { return; } resolveShadowDrawables(); invalidate(); } } public void setDrawerShadow(@DrawableRes int resId, int gravity) { setDrawerShadow(ContextCompat.getDrawable(getContext(), resId), gravity); } public void setScrimColor(@ColorInt int color) { this.mScrimColor = color; invalidate(); } @Deprecated public void setDrawerListener(DrawerListener listener) { if (this.mListener != null) { removeDrawerListener(this.mListener); } if (listener != null) { addDrawerListener(listener); } this.mListener = listener; } public void addDrawerListener(@NonNull DrawerListener listener) { if (listener != null) { if (this.mListeners == null) { this.mListeners = new ArrayList(); } this.mListeners.add(listener); } } public void removeDrawerListener(@NonNull DrawerListener listener) { if (listener != null && this.mListeners != null) { this.mListeners.remove(listener); } } public void setDrawerLockMode(int lockMode) { setDrawerLockMode(lockMode, 3); setDrawerLockMode(lockMode, 5); } public void setDrawerLockMode(int lockMode, int edgeGravity) { int absGravity = GravityCompat.getAbsoluteGravity(edgeGravity, ViewCompat.getLayoutDirection(this)); switch (edgeGravity) { case 3: this.mLockModeLeft = lockMode; break; case 5: this.mLockModeRight = lockMode; break; case GravityCompat.START: this.mLockModeStart = lockMode; break; case GravityCompat.END: this.mLockModeEnd = lockMode; break; } if (lockMode != 0) { (absGravity == 3 ? this.mLeftDragger : this.mRightDragger).cancel(); } switch (lockMode) { case 1: View toClose = findDrawerWithGravity(absGravity); if (toClose != null) { closeDrawer(toClose); return; } return; case 2: View toOpen = findDrawerWithGravity(absGravity); if (toOpen != null) { openDrawer(toOpen); return; } return; default: return; } } public void setDrawerLockMode(int lockMode, View drawerView) { if (!isDrawerView(drawerView)) { throw new IllegalArgumentException("View " + drawerView + " is not a " + "drawer with appropriate layout_gravity"); } setDrawerLockMode(lockMode, ((LayoutParams) drawerView.getLayoutParams()).gravity); } public int getDrawerLockMode(int edgeGravity) { int layoutDirection = ViewCompat.getLayoutDirection(this); switch (edgeGravity) { case 3: if (this.mLockModeLeft != 3) { return this.mLockModeLeft; } int leftLockMode = layoutDirection == 0 ? this.mLockModeStart : this.mLockModeEnd; if (leftLockMode != 3) { return leftLockMode; } break; case 5: if (this.mLockModeRight != 3) { return this.mLockModeRight; } int rightLockMode = layoutDirection == 0 ? this.mLockModeEnd : this.mLockModeStart; if (rightLockMode != 3) { return rightLockMode; } break; case GravityCompat.START: if (this.mLockModeStart != 3) { return this.mLockModeStart; } int startLockMode = layoutDirection == 0 ? this.mLockModeLeft : this.mLockModeRight; if (startLockMode != 3) { return startLockMode; } break; case GravityCompat.END: if (this.mLockModeEnd != 3) { return this.mLockModeEnd; } int endLockMode = layoutDirection == 0 ? this.mLockModeRight : this.mLockModeLeft; if (endLockMode != 3) { return endLockMode; } break; } return 0; } public int getDrawerLockMode(View drawerView) { if (isDrawerView(drawerView)) { return getDrawerLockMode(((LayoutParams) drawerView.getLayoutParams()).gravity); } throw new IllegalArgumentException("View " + drawerView + " is not a drawer"); } public void setDrawerTitle(int edgeGravity, CharSequence title) { int absGravity = GravityCompat.getAbsoluteGravity(edgeGravity, ViewCompat.getLayoutDirection(this)); if (absGravity == 3) { this.mTitleLeft = title; } else if (absGravity == 5) { this.mTitleRight = title; } } @Nullable public CharSequence getDrawerTitle(int edgeGravity) { int absGravity = GravityCompat.getAbsoluteGravity(edgeGravity, ViewCompat.getLayoutDirection(this)); if (absGravity == 3) { return this.mTitleLeft; } if (absGravity == 5) { return this.mTitleRight; } return null; } /* access modifiers changed from: package-private */ public void updateDrawerState(int forGravity, int activeState, View activeDrawer) { int state; int leftState = this.mLeftDragger.getViewDragState(); int rightState = this.mRightDragger.getViewDragState(); if (leftState == 1 || rightState == 1) { state = 1; } else if (leftState == 2 || rightState == 2) { state = 2; } else { state = 0; } if (activeDrawer != null && activeState == 0) { LayoutParams lp = (LayoutParams) activeDrawer.getLayoutParams(); if (lp.onScreen == 0.0f) { dispatchOnDrawerClosed(activeDrawer); } else if (lp.onScreen == TOUCH_SLOP_SENSITIVITY) { dispatchOnDrawerOpened(activeDrawer); } } if (state != this.mDrawerState) { this.mDrawerState = state; if (this.mListeners != null) { for (int i = this.mListeners.size() - 1; i >= 0; i--) { this.mListeners.get(i).onDrawerStateChanged(state); } } } } /* access modifiers changed from: package-private */ public void dispatchOnDrawerClosed(View drawerView) { View rootView; LayoutParams lp = (LayoutParams) drawerView.getLayoutParams(); if ((lp.openState & 1) == 1) { lp.openState = 0; if (this.mListeners != null) { for (int i = this.mListeners.size() - 1; i >= 0; i--) { this.mListeners.get(i).onDrawerClosed(drawerView); } } updateChildrenImportantForAccessibility(drawerView, false); if (hasWindowFocus() && (rootView = getRootView()) != null) { rootView.sendAccessibilityEvent(32); } } } /* access modifiers changed from: package-private */ public void dispatchOnDrawerOpened(View drawerView) { LayoutParams lp = (LayoutParams) drawerView.getLayoutParams(); if ((lp.openState & 1) == 0) { lp.openState = 1; if (this.mListeners != null) { for (int i = this.mListeners.size() - 1; i >= 0; i--) { this.mListeners.get(i).onDrawerOpened(drawerView); } } updateChildrenImportantForAccessibility(drawerView, true); if (hasWindowFocus()) { sendAccessibilityEvent(32); } } } private void updateChildrenImportantForAccessibility(View drawerView, boolean isDrawerOpen) { int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View child = getChildAt(i); if ((isDrawerOpen || isDrawerView(child)) && (!isDrawerOpen || child != drawerView)) { ViewCompat.setImportantForAccessibility(child, 4); } else { ViewCompat.setImportantForAccessibility(child, 1); } } } /* access modifiers changed from: package-private */ public void dispatchOnDrawerSlide(View drawerView, float slideOffset) { if (this.mListeners != null) { for (int i = this.mListeners.size() - 1; i >= 0; i--) { this.mListeners.get(i).onDrawerSlide(drawerView, slideOffset); } } } /* access modifiers changed from: package-private */ public void setDrawerViewOffset(View drawerView, float slideOffset) { LayoutParams lp = (LayoutParams) drawerView.getLayoutParams(); if (slideOffset != lp.onScreen) { lp.onScreen = slideOffset; dispatchOnDrawerSlide(drawerView, slideOffset); } } /* access modifiers changed from: package-private */ public float getDrawerViewOffset(View drawerView) { return ((LayoutParams) drawerView.getLayoutParams()).onScreen; } /* access modifiers changed from: package-private */ public int getDrawerViewAbsoluteGravity(View drawerView) { return GravityCompat.getAbsoluteGravity(((LayoutParams) drawerView.getLayoutParams()).gravity, ViewCompat.getLayoutDirection(this)); } /* access modifiers changed from: package-private */ public boolean checkDrawerViewAbsoluteGravity(View drawerView, int checkFor) { return (getDrawerViewAbsoluteGravity(drawerView) & checkFor) == checkFor; } /* access modifiers changed from: package-private */ public View findOpenDrawer() { int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View child = getChildAt(i); if ((((LayoutParams) child.getLayoutParams()).openState & 1) == 1) { return child; } } return null; } /* access modifiers changed from: package-private */ public void moveDrawerToOffset(View drawerView, float slideOffset) { float oldOffset = getDrawerViewOffset(drawerView); int width = drawerView.getWidth(); int dx = ((int) (((float) width) * slideOffset)) - ((int) (((float) width) * oldOffset)); if (!checkDrawerViewAbsoluteGravity(drawerView, 3)) { dx = -dx; } drawerView.offsetLeftAndRight(dx); setDrawerViewOffset(drawerView, slideOffset); } /* access modifiers changed from: package-private */ public View findDrawerWithGravity(int gravity) { int absHorizGravity = GravityCompat.getAbsoluteGravity(gravity, ViewCompat.getLayoutDirection(this)) & 7; int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View child = getChildAt(i); if ((getDrawerViewAbsoluteGravity(child) & 7) == absHorizGravity) { return child; } } return null; } static String gravityToString(int gravity) { if ((gravity & 3) == 3) { return "LEFT"; } if ((gravity & 5) == 5) { return "RIGHT"; } return Integer.toHexString(gravity); } /* access modifiers changed from: protected */ public void onDetachedFromWindow() { super.onDetachedFromWindow(); this.mFirstLayout = true; } /* access modifiers changed from: protected */ public void onAttachedToWindow() { super.onAttachedToWindow(); this.mFirstLayout = true; } /* access modifiers changed from: protected */ public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int widthMode = View.MeasureSpec.getMode(widthMeasureSpec); int heightMode = View.MeasureSpec.getMode(heightMeasureSpec); int widthSize = View.MeasureSpec.getSize(widthMeasureSpec); int heightSize = View.MeasureSpec.getSize(heightMeasureSpec); if (!(widthMode == 1073741824 && heightMode == 1073741824)) { if (isInEditMode()) { if (widthMode != Integer.MIN_VALUE) { if (widthMode == 0) { widthSize = 300; } } if (heightMode != Integer.MIN_VALUE) { if (heightMode == 0) { heightSize = 300; } } } else { throw new IllegalArgumentException("DrawerLayout must be measured with MeasureSpec.EXACTLY."); } } setMeasuredDimension(widthSize, heightSize); boolean applyInsets = this.mLastInsets != null && ViewCompat.getFitsSystemWindows(this); int layoutDirection = ViewCompat.getLayoutDirection(this); boolean hasDrawerOnLeftEdge = false; boolean hasDrawerOnRightEdge = false; int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View child = getChildAt(i); if (child.getVisibility() != 8) { LayoutParams lp = (LayoutParams) child.getLayoutParams(); if (applyInsets) { int cgrav = GravityCompat.getAbsoluteGravity(lp.gravity, layoutDirection); if (ViewCompat.getFitsSystemWindows(child)) { IMPL.dispatchChildInsets(child, this.mLastInsets, cgrav); } else { IMPL.applyMarginInsets(lp, this.mLastInsets, cgrav); } } if (isContentView(child)) { child.measure(View.MeasureSpec.makeMeasureSpec((widthSize - lp.leftMargin) - lp.rightMargin, UCCore.VERIFY_POLICY_QUICK), View.MeasureSpec.makeMeasureSpec((heightSize - lp.topMargin) - lp.bottomMargin, UCCore.VERIFY_POLICY_QUICK)); } else if (isDrawerView(child)) { if (SET_DRAWER_SHADOW_FROM_ELEVATION && ViewCompat.getElevation(child) != this.mDrawerElevation) { ViewCompat.setElevation(child, this.mDrawerElevation); } int childGravity = getDrawerViewAbsoluteGravity(child) & 7; boolean isLeftEdgeDrawer = childGravity == 3; if ((!isLeftEdgeDrawer || !hasDrawerOnLeftEdge) && (isLeftEdgeDrawer || !hasDrawerOnRightEdge)) { if (isLeftEdgeDrawer) { hasDrawerOnLeftEdge = true; } else { hasDrawerOnRightEdge = true; } child.measure(getChildMeasureSpec(widthMeasureSpec, this.mMinDrawerMargin + lp.leftMargin + lp.rightMargin, lp.width), getChildMeasureSpec(heightMeasureSpec, lp.topMargin + lp.bottomMargin, lp.height)); } else { throw new IllegalStateException("Child drawer has absolute gravity " + gravityToString(childGravity) + " but this " + TAG + " already has a " + "drawer view along that edge"); } } else { throw new IllegalStateException("Child " + child + " at index " + i + " does not have a valid layout_gravity - must be Gravity.LEFT, " + "Gravity.RIGHT or Gravity.NO_GRAVITY"); } } } } private void resolveShadowDrawables() { if (!SET_DRAWER_SHADOW_FROM_ELEVATION) { this.mShadowLeftResolved = resolveLeftShadow(); this.mShadowRightResolved = resolveRightShadow(); } } private Drawable resolveLeftShadow() { int layoutDirection = ViewCompat.getLayoutDirection(this); if (layoutDirection == 0) { if (this.mShadowStart != null) { mirror(this.mShadowStart, layoutDirection); return this.mShadowStart; } } else if (this.mShadowEnd != null) { mirror(this.mShadowEnd, layoutDirection); return this.mShadowEnd; } return this.mShadowLeft; } private Drawable resolveRightShadow() { int layoutDirection = ViewCompat.getLayoutDirection(this); if (layoutDirection == 0) { if (this.mShadowEnd != null) { mirror(this.mShadowEnd, layoutDirection); return this.mShadowEnd; } } else if (this.mShadowStart != null) { mirror(this.mShadowStart, layoutDirection); return this.mShadowStart; } return this.mShadowRight; } private boolean mirror(Drawable drawable, int layoutDirection) { if (drawable == null || !DrawableCompat.isAutoMirrored(drawable)) { return false; } DrawableCompat.setLayoutDirection(drawable, layoutDirection); return true; } /* access modifiers changed from: protected */ public void onLayout(boolean changed, int l, int t, int r, int b) { int childLeft; float newOffset; this.mInLayout = true; int width = r - l; int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View child = getChildAt(i); if (child.getVisibility() != 8) { LayoutParams lp = (LayoutParams) child.getLayoutParams(); if (isContentView(child)) { child.layout(lp.leftMargin, lp.topMargin, lp.leftMargin + child.getMeasuredWidth(), lp.topMargin + child.getMeasuredHeight()); } else { int childWidth = child.getMeasuredWidth(); int childHeight = child.getMeasuredHeight(); if (checkDrawerViewAbsoluteGravity(child, 3)) { childLeft = (-childWidth) + ((int) (((float) childWidth) * lp.onScreen)); newOffset = ((float) (childWidth + childLeft)) / ((float) childWidth); } else { childLeft = width - ((int) (((float) childWidth) * lp.onScreen)); newOffset = ((float) (width - childLeft)) / ((float) childWidth); } boolean changeOffset = newOffset != lp.onScreen; switch (lp.gravity & 112) { case 16: int height = b - t; int childTop = (height - childHeight) / 2; if (childTop < lp.topMargin) { childTop = lp.topMargin; } else if (childTop + childHeight > height - lp.bottomMargin) { childTop = (height - lp.bottomMargin) - childHeight; } child.layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight); break; case 80: int height2 = b - t; child.layout(childLeft, (height2 - lp.bottomMargin) - child.getMeasuredHeight(), childLeft + childWidth, height2 - lp.bottomMargin); break; default: child.layout(childLeft, lp.topMargin, childLeft + childWidth, lp.topMargin + childHeight); break; } if (changeOffset) { setDrawerViewOffset(child, newOffset); } int newVisibility = lp.onScreen > 0.0f ? 0 : 4; if (child.getVisibility() != newVisibility) { child.setVisibility(newVisibility); } } } } this.mInLayout = false; this.mFirstLayout = false; } public void requestLayout() { if (!this.mInLayout) { super.requestLayout(); } } public void computeScroll() { int childCount = getChildCount(); float scrimOpacity = 0.0f; for (int i = 0; i < childCount; i++) { scrimOpacity = Math.max(scrimOpacity, ((LayoutParams) getChildAt(i).getLayoutParams()).onScreen); } this.mScrimOpacity = scrimOpacity; if (this.mLeftDragger.continueSettling(true) || this.mRightDragger.continueSettling(true)) { ViewCompat.postInvalidateOnAnimation(this); } } private static boolean hasOpaqueBackground(View v) { Drawable bg = v.getBackground(); if (bg == null || bg.getOpacity() != -1) { return false; } return true; } public void setStatusBarBackground(Drawable bg) { this.mStatusBarBackground = bg; invalidate(); } public Drawable getStatusBarBackgroundDrawable() { return this.mStatusBarBackground; } public void setStatusBarBackground(int resId) { this.mStatusBarBackground = resId != 0 ? ContextCompat.getDrawable(getContext(), resId) : null; invalidate(); } public void setStatusBarBackgroundColor(@ColorInt int color) { this.mStatusBarBackground = new ColorDrawable(color); invalidate(); } public void onRtlPropertiesChanged(int layoutDirection) { resolveShadowDrawables(); } public void onDraw(Canvas c) { int inset; super.onDraw(c); if (this.mDrawStatusBarBackground && this.mStatusBarBackground != null && (inset = IMPL.getTopInset(this.mLastInsets)) > 0) { this.mStatusBarBackground.setBounds(0, 0, getWidth(), inset); this.mStatusBarBackground.draw(c); } } /* access modifiers changed from: protected */ public boolean drawChild(Canvas canvas, View child, long drawingTime) { int height = getHeight(); boolean drawingContent = isContentView(child); int clipLeft = 0; int clipRight = getWidth(); int restoreCount = canvas.save(); if (drawingContent) { int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View v = getChildAt(i); if (v != child && v.getVisibility() == 0 && hasOpaqueBackground(v) && isDrawerView(v) && v.getHeight() >= height) { if (checkDrawerViewAbsoluteGravity(v, 3)) { int vright = v.getRight(); if (vright > clipLeft) { clipLeft = vright; } } else { int vleft = v.getLeft(); if (vleft < clipRight) { clipRight = vleft; } } } } canvas.clipRect(clipLeft, 0, clipRight, getHeight()); } boolean result = super.drawChild(canvas, child, drawingTime); canvas.restoreToCount(restoreCount); if (this.mScrimOpacity > 0.0f && drawingContent) { this.mScrimPaint.setColor((((int) (((float) ((this.mScrimColor & ViewCompat.MEASURED_STATE_MASK) >>> 24)) * this.mScrimOpacity)) << 24) | (this.mScrimColor & ViewCompat.MEASURED_SIZE_MASK)); canvas.drawRect((float) clipLeft, 0.0f, (float) clipRight, (float) getHeight(), this.mScrimPaint); } else if (this.mShadowLeftResolved != null && checkDrawerViewAbsoluteGravity(child, 3)) { int shadowWidth = this.mShadowLeftResolved.getIntrinsicWidth(); int childRight = child.getRight(); float alpha = Math.max(0.0f, Math.min(((float) childRight) / ((float) this.mLeftDragger.getEdgeSize()), TOUCH_SLOP_SENSITIVITY)); this.mShadowLeftResolved.setBounds(childRight, child.getTop(), childRight + shadowWidth, child.getBottom()); this.mShadowLeftResolved.setAlpha((int) (255.0f * alpha)); this.mShadowLeftResolved.draw(canvas); } else if (this.mShadowRightResolved != null && checkDrawerViewAbsoluteGravity(child, 5)) { int shadowWidth2 = this.mShadowRightResolved.getIntrinsicWidth(); int childLeft = child.getLeft(); float alpha2 = Math.max(0.0f, Math.min(((float) (getWidth() - childLeft)) / ((float) this.mRightDragger.getEdgeSize()), TOUCH_SLOP_SENSITIVITY)); this.mShadowRightResolved.setBounds(childLeft - shadowWidth2, child.getTop(), childLeft, child.getBottom()); this.mShadowRightResolved.setAlpha((int) (255.0f * alpha2)); this.mShadowRightResolved.draw(canvas); } return result; } /* access modifiers changed from: package-private */ public boolean isContentView(View child) { return ((LayoutParams) child.getLayoutParams()).gravity == 0; } /* access modifiers changed from: package-private */ public boolean isDrawerView(View child) { int absGravity = GravityCompat.getAbsoluteGravity(((LayoutParams) child.getLayoutParams()).gravity, ViewCompat.getLayoutDirection(child)); if ((absGravity & 3) != 0) { return true; } if ((absGravity & 5) != 0) { return true; } return false; } public boolean onInterceptTouchEvent(MotionEvent ev) { View child; int action = MotionEventCompat.getActionMasked(ev); boolean interceptForDrag = this.mLeftDragger.shouldInterceptTouchEvent(ev) | this.mRightDragger.shouldInterceptTouchEvent(ev); boolean interceptForTap = false; switch (action) { case 0: float x = ev.getX(); float y = ev.getY(); this.mInitialMotionX = x; this.mInitialMotionY = y; if (this.mScrimOpacity > 0.0f && (child = this.mLeftDragger.findTopChildUnder((int) x, (int) y)) != null && isContentView(child)) { interceptForTap = true; } this.mDisallowInterceptRequested = false; this.mChildrenCanceledTouch = false; break; case 1: case 3: closeDrawers(true); this.mDisallowInterceptRequested = false; this.mChildrenCanceledTouch = false; break; case 2: if (this.mLeftDragger.checkTouchSlop(3)) { this.mLeftCallback.removeCallbacks(); this.mRightCallback.removeCallbacks(); break; } break; } if (interceptForDrag || interceptForTap || hasPeekingDrawer() || this.mChildrenCanceledTouch) { return true; } return false; } public boolean onTouchEvent(MotionEvent ev) { View openDrawer; this.mLeftDragger.processTouchEvent(ev); this.mRightDragger.processTouchEvent(ev); switch (ev.getAction() & 255) { case 0: float x = ev.getX(); float y = ev.getY(); this.mInitialMotionX = x; this.mInitialMotionY = y; this.mDisallowInterceptRequested = false; this.mChildrenCanceledTouch = false; break; case 1: float x2 = ev.getX(); float y2 = ev.getY(); boolean peekingOnly = true; View touchedView = this.mLeftDragger.findTopChildUnder((int) x2, (int) y2); if (touchedView != null && isContentView(touchedView)) { float dx = x2 - this.mInitialMotionX; float dy = y2 - this.mInitialMotionY; int slop = this.mLeftDragger.getTouchSlop(); if ((dx * dx) + (dy * dy) < ((float) (slop * slop)) && (openDrawer = findOpenDrawer()) != null) { peekingOnly = getDrawerLockMode(openDrawer) == 2; } } closeDrawers(peekingOnly); this.mDisallowInterceptRequested = false; break; case 3: closeDrawers(true); this.mDisallowInterceptRequested = false; this.mChildrenCanceledTouch = false; break; } return true; } public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) { super.requestDisallowInterceptTouchEvent(disallowIntercept); this.mDisallowInterceptRequested = disallowIntercept; if (disallowIntercept) { closeDrawers(true); } } public void closeDrawers() { closeDrawers(false); } /* access modifiers changed from: package-private */ public void closeDrawers(boolean peekingOnly) { boolean needsInvalidate = false; int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View child = getChildAt(i); LayoutParams lp = (LayoutParams) child.getLayoutParams(); if (isDrawerView(child) && (!peekingOnly || lp.isPeeking)) { int childWidth = child.getWidth(); if (checkDrawerViewAbsoluteGravity(child, 3)) { needsInvalidate |= this.mLeftDragger.smoothSlideViewTo(child, -childWidth, child.getTop()); } else { needsInvalidate |= this.mRightDragger.smoothSlideViewTo(child, getWidth(), child.getTop()); } lp.isPeeking = false; } } this.mLeftCallback.removeCallbacks(); this.mRightCallback.removeCallbacks(); if (needsInvalidate) { invalidate(); } } public void openDrawer(View drawerView) { openDrawer(drawerView, true); } public void openDrawer(View drawerView, boolean animate) { if (!isDrawerView(drawerView)) { throw new IllegalArgumentException("View " + drawerView + " is not a sliding drawer"); } LayoutParams lp = (LayoutParams) drawerView.getLayoutParams(); if (this.mFirstLayout) { lp.onScreen = TOUCH_SLOP_SENSITIVITY; lp.openState = 1; updateChildrenImportantForAccessibility(drawerView, true); } else if (animate) { lp.openState |= 2; if (checkDrawerViewAbsoluteGravity(drawerView, 3)) { this.mLeftDragger.smoothSlideViewTo(drawerView, 0, drawerView.getTop()); } else { this.mRightDragger.smoothSlideViewTo(drawerView, getWidth() - drawerView.getWidth(), drawerView.getTop()); } } else { moveDrawerToOffset(drawerView, TOUCH_SLOP_SENSITIVITY); updateDrawerState(lp.gravity, 0, drawerView); drawerView.setVisibility(0); } invalidate(); } public void openDrawer(int gravity) { openDrawer(gravity, true); } public void openDrawer(int gravity, boolean animate) { View drawerView = findDrawerWithGravity(gravity); if (drawerView == null) { throw new IllegalArgumentException("No drawer view found with gravity " + gravityToString(gravity)); } openDrawer(drawerView, animate); } public void closeDrawer(View drawerView) { closeDrawer(drawerView, true); } public void closeDrawer(View drawerView, boolean animate) { if (!isDrawerView(drawerView)) { throw new IllegalArgumentException("View " + drawerView + " is not a sliding drawer"); } LayoutParams lp = (LayoutParams) drawerView.getLayoutParams(); if (this.mFirstLayout) { lp.onScreen = 0.0f; lp.openState = 0; } else if (animate) { lp.openState |= 4; if (checkDrawerViewAbsoluteGravity(drawerView, 3)) { this.mLeftDragger.smoothSlideViewTo(drawerView, -drawerView.getWidth(), drawerView.getTop()); } else { this.mRightDragger.smoothSlideViewTo(drawerView, getWidth(), drawerView.getTop()); } } else { moveDrawerToOffset(drawerView, 0.0f); updateDrawerState(lp.gravity, 0, drawerView); drawerView.setVisibility(4); } invalidate(); } public void closeDrawer(int gravity) { closeDrawer(gravity, true); } public void closeDrawer(int gravity, boolean animate) { View drawerView = findDrawerWithGravity(gravity); if (drawerView == null) { throw new IllegalArgumentException("No drawer view found with gravity " + gravityToString(gravity)); } closeDrawer(drawerView, animate); } public boolean isDrawerOpen(View drawer) { if (!isDrawerView(drawer)) { throw new IllegalArgumentException("View " + drawer + " is not a drawer"); } else if ((((LayoutParams) drawer.getLayoutParams()).openState & 1) == 1) { return true; } else { return false; } } public boolean isDrawerOpen(int drawerGravity) { View drawerView = findDrawerWithGravity(drawerGravity); if (drawerView != null) { return isDrawerOpen(drawerView); } return false; } public boolean isDrawerVisible(View drawer) { if (isDrawerView(drawer)) { return ((LayoutParams) drawer.getLayoutParams()).onScreen > 0.0f; } throw new IllegalArgumentException("View " + drawer + " is not a drawer"); } public boolean isDrawerVisible(int drawerGravity) { View drawerView = findDrawerWithGravity(drawerGravity); if (drawerView != null) { return isDrawerVisible(drawerView); } return false; } private boolean hasPeekingDrawer() { int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { if (((LayoutParams) getChildAt(i).getLayoutParams()).isPeeking) { return true; } } return false; } /* access modifiers changed from: protected */ public ViewGroup.LayoutParams generateDefaultLayoutParams() { return new LayoutParams(-1, -1); } /* access modifiers changed from: protected */ public ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p) { if (p instanceof LayoutParams) { return new LayoutParams((LayoutParams) p); } return p instanceof ViewGroup.MarginLayoutParams ? new LayoutParams((ViewGroup.MarginLayoutParams) p) : new LayoutParams(p); } /* access modifiers changed from: protected */ public boolean checkLayoutParams(ViewGroup.LayoutParams p) { return (p instanceof LayoutParams) && super.checkLayoutParams(p); } public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs) { return new LayoutParams(getContext(), attrs); } public void addFocusables(ArrayList<View> views, int direction, int focusableMode) { if (getDescendantFocusability() != 393216) { int childCount = getChildCount(); boolean isDrawerOpen = false; for (int i = 0; i < childCount; i++) { View child = getChildAt(i); if (!isDrawerView(child)) { this.mNonDrawerViews.add(child); } else if (isDrawerOpen(child)) { isDrawerOpen = true; child.addFocusables(views, direction, focusableMode); } } if (!isDrawerOpen) { int nonDrawerViewsCount = this.mNonDrawerViews.size(); for (int i2 = 0; i2 < nonDrawerViewsCount; i2++) { View child2 = this.mNonDrawerViews.get(i2); if (child2.getVisibility() == 0) { child2.addFocusables(views, direction, focusableMode); } } } this.mNonDrawerViews.clear(); } } private boolean hasVisibleDrawer() { return findVisibleDrawer() != null; } /* access modifiers changed from: package-private */ public View findVisibleDrawer() { int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View child = getChildAt(i); if (isDrawerView(child) && isDrawerVisible(child)) { return child; } } return null; } /* access modifiers changed from: package-private */ public void cancelChildViewTouch() { if (!this.mChildrenCanceledTouch) { long now = SystemClock.uptimeMillis(); MotionEvent cancelEvent = MotionEvent.obtain(now, now, 3, 0.0f, 0.0f, 0); int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { getChildAt(i).dispatchTouchEvent(cancelEvent); } cancelEvent.recycle(); this.mChildrenCanceledTouch = true; } } public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode != 4 || !hasVisibleDrawer()) { return super.onKeyDown(keyCode, event); } event.startTracking(); return true; } public boolean onKeyUp(int keyCode, KeyEvent event) { if (keyCode != 4) { return super.onKeyUp(keyCode, event); } View visibleDrawer = findVisibleDrawer(); if (visibleDrawer != null && getDrawerLockMode(visibleDrawer) == 0) { closeDrawers(); } return visibleDrawer != null; } /* access modifiers changed from: protected */ public void onRestoreInstanceState(Parcelable state) { View toOpen; if (!(state instanceof SavedState)) { super.onRestoreInstanceState(state); return; } SavedState ss = (SavedState) state; super.onRestoreInstanceState(ss.getSuperState()); if (!(ss.openDrawerGravity == 0 || (toOpen = findDrawerWithGravity(ss.openDrawerGravity)) == null)) { openDrawer(toOpen); } if (ss.lockModeLeft != 3) { setDrawerLockMode(ss.lockModeLeft, 3); } if (ss.lockModeRight != 3) { setDrawerLockMode(ss.lockModeRight, 5); } if (ss.lockModeStart != 3) { setDrawerLockMode(ss.lockModeStart, (int) GravityCompat.START); } if (ss.lockModeEnd != 3) { setDrawerLockMode(ss.lockModeEnd, (int) GravityCompat.END); } } /* access modifiers changed from: protected */ public Parcelable onSaveInstanceState() { LayoutParams lp; boolean isOpenedAndNotClosing; boolean isClosedAndOpening; SavedState ss = new SavedState(super.onSaveInstanceState()); int childCount = getChildCount(); int i = 0; while (true) { if (i >= childCount) { break; } lp = (LayoutParams) getChildAt(i).getLayoutParams(); if (lp.openState == 1) { isOpenedAndNotClosing = true; } else { isOpenedAndNotClosing = false; } if (lp.openState == 2) { isClosedAndOpening = true; } else { isClosedAndOpening = false; } if (isOpenedAndNotClosing || isClosedAndOpening) { ss.openDrawerGravity = lp.gravity; } else { i++; } } ss.openDrawerGravity = lp.gravity; ss.lockModeLeft = this.mLockModeLeft; ss.lockModeRight = this.mLockModeRight; ss.lockModeStart = this.mLockModeStart; ss.lockModeEnd = this.mLockModeEnd; return ss; } public void addView(View child, int index, ViewGroup.LayoutParams params) { super.addView(child, index, params); if (findOpenDrawer() != null || isDrawerView(child)) { ViewCompat.setImportantForAccessibility(child, 4); } else { ViewCompat.setImportantForAccessibility(child, 1); } if (!CAN_HIDE_DESCENDANTS) { ViewCompat.setAccessibilityDelegate(child, this.mChildAccessibilityDelegate); } } static boolean includeChildForAccessibility(View child) { return (ViewCompat.getImportantForAccessibility(child) == 4 || ViewCompat.getImportantForAccessibility(child) == 2) ? false : true; } protected static class SavedState extends AbsSavedState { public static final Parcelable.Creator<SavedState> CREATOR = ParcelableCompat.newCreator(new ParcelableCompatCreatorCallbacks<SavedState>() { public SavedState createFromParcel(Parcel in, ClassLoader loader) { return new SavedState(in, loader); } public SavedState[] newArray(int size) { return new SavedState[size]; } }); int lockModeEnd; int lockModeLeft; int lockModeRight; int lockModeStart; int openDrawerGravity = 0; public SavedState(Parcel in, ClassLoader loader) { super(in, loader); this.openDrawerGravity = in.readInt(); this.lockModeLeft = in.readInt(); this.lockModeRight = in.readInt(); this.lockModeStart = in.readInt(); this.lockModeEnd = in.readInt(); } public SavedState(Parcelable superState) { super(superState); } public void writeToParcel(Parcel dest, int flags) { super.writeToParcel(dest, flags); dest.writeInt(this.openDrawerGravity); dest.writeInt(this.lockModeLeft); dest.writeInt(this.lockModeRight); dest.writeInt(this.lockModeStart); dest.writeInt(this.lockModeEnd); } } private class ViewDragCallback extends ViewDragHelper.Callback { private final int mAbsGravity; private ViewDragHelper mDragger; private final Runnable mPeekRunnable = new Runnable() { public void run() { ViewDragCallback.this.peekDrawer(); } }; ViewDragCallback(int gravity) { this.mAbsGravity = gravity; } public void setDragger(ViewDragHelper dragger) { this.mDragger = dragger; } public void removeCallbacks() { DrawerLayout.this.removeCallbacks(this.mPeekRunnable); } public boolean tryCaptureView(View child, int pointerId) { return DrawerLayout.this.isDrawerView(child) && DrawerLayout.this.checkDrawerViewAbsoluteGravity(child, this.mAbsGravity) && DrawerLayout.this.getDrawerLockMode(child) == 0; } public void onViewDragStateChanged(int state) { DrawerLayout.this.updateDrawerState(this.mAbsGravity, state, this.mDragger.getCapturedView()); } public void onViewPositionChanged(View changedView, int left, int top, int dx, int dy) { float offset; int childWidth = changedView.getWidth(); if (DrawerLayout.this.checkDrawerViewAbsoluteGravity(changedView, 3)) { offset = ((float) (childWidth + left)) / ((float) childWidth); } else { offset = ((float) (DrawerLayout.this.getWidth() - left)) / ((float) childWidth); } DrawerLayout.this.setDrawerViewOffset(changedView, offset); changedView.setVisibility(offset == 0.0f ? 4 : 0); DrawerLayout.this.invalidate(); } public void onViewCaptured(View capturedChild, int activePointerId) { ((LayoutParams) capturedChild.getLayoutParams()).isPeeking = false; closeOtherDrawer(); } private void closeOtherDrawer() { int otherGrav = 3; if (this.mAbsGravity == 3) { otherGrav = 5; } View toClose = DrawerLayout.this.findDrawerWithGravity(otherGrav); if (toClose != null) { DrawerLayout.this.closeDrawer(toClose); } } public void onViewReleased(View releasedChild, float xvel, float yvel) { int left; float offset = DrawerLayout.this.getDrawerViewOffset(releasedChild); int childWidth = releasedChild.getWidth(); if (DrawerLayout.this.checkDrawerViewAbsoluteGravity(releasedChild, 3)) { left = (xvel > 0.0f || (xvel == 0.0f && offset > 0.5f)) ? 0 : -childWidth; } else { int width = DrawerLayout.this.getWidth(); left = (xvel < 0.0f || (xvel == 0.0f && offset > 0.5f)) ? width - childWidth : width; } this.mDragger.settleCapturedViewAt(left, releasedChild.getTop()); DrawerLayout.this.invalidate(); } public void onEdgeTouched(int edgeFlags, int pointerId) { DrawerLayout.this.postDelayed(this.mPeekRunnable, 160); } /* access modifiers changed from: package-private */ public void peekDrawer() { boolean leftEdge; View toCapture; int childLeft; int i = 0; int peekDistance = this.mDragger.getEdgeSize(); if (this.mAbsGravity == 3) { leftEdge = true; } else { leftEdge = false; } if (leftEdge) { toCapture = DrawerLayout.this.findDrawerWithGravity(3); if (toCapture != null) { i = -toCapture.getWidth(); } childLeft = i + peekDistance; } else { toCapture = DrawerLayout.this.findDrawerWithGravity(5); childLeft = DrawerLayout.this.getWidth() - peekDistance; } if (toCapture == null) { return; } if (((leftEdge && toCapture.getLeft() < childLeft) || (!leftEdge && toCapture.getLeft() > childLeft)) && DrawerLayout.this.getDrawerLockMode(toCapture) == 0) { this.mDragger.smoothSlideViewTo(toCapture, childLeft, toCapture.getTop()); ((LayoutParams) toCapture.getLayoutParams()).isPeeking = true; DrawerLayout.this.invalidate(); closeOtherDrawer(); DrawerLayout.this.cancelChildViewTouch(); } } public boolean onEdgeLock(int edgeFlags) { return false; } public void onEdgeDragStarted(int edgeFlags, int pointerId) { View toCapture; if ((edgeFlags & 1) == 1) { toCapture = DrawerLayout.this.findDrawerWithGravity(3); } else { toCapture = DrawerLayout.this.findDrawerWithGravity(5); } if (toCapture != null && DrawerLayout.this.getDrawerLockMode(toCapture) == 0) { this.mDragger.captureChildView(toCapture, pointerId); } } public int getViewHorizontalDragRange(View child) { if (DrawerLayout.this.isDrawerView(child)) { return child.getWidth(); } return 0; } public int clampViewPositionHorizontal(View child, int left, int dx) { if (DrawerLayout.this.checkDrawerViewAbsoluteGravity(child, 3)) { return Math.max(-child.getWidth(), Math.min(left, 0)); } int width = DrawerLayout.this.getWidth(); return Math.max(width - child.getWidth(), Math.min(left, width)); } public int clampViewPositionVertical(View child, int top, int dy) { return child.getTop(); } } public static class LayoutParams extends ViewGroup.MarginLayoutParams { private static final int FLAG_IS_CLOSING = 4; private static final int FLAG_IS_OPENED = 1; private static final int FLAG_IS_OPENING = 2; public int gravity; boolean isPeeking; float onScreen; int openState; public LayoutParams(Context c, AttributeSet attrs) { super(c, attrs); this.gravity = 0; TypedArray a = c.obtainStyledAttributes(attrs, DrawerLayout.LAYOUT_ATTRS); this.gravity = a.getInt(0, 0); a.recycle(); } public LayoutParams(int width, int height) { super(width, height); this.gravity = 0; } public LayoutParams(int width, int height, int gravity2) { this(width, height); this.gravity = gravity2; } public LayoutParams(LayoutParams source) { super(source); this.gravity = 0; this.gravity = source.gravity; } public LayoutParams(ViewGroup.LayoutParams source) { super(source); this.gravity = 0; } public LayoutParams(ViewGroup.MarginLayoutParams source) { super(source); this.gravity = 0; } } class AccessibilityDelegate extends AccessibilityDelegateCompat { private final Rect mTmpRect = new Rect(); AccessibilityDelegate() { } public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) { if (DrawerLayout.CAN_HIDE_DESCENDANTS) { super.onInitializeAccessibilityNodeInfo(host, info); } else { AccessibilityNodeInfoCompat superNode = AccessibilityNodeInfoCompat.obtain(info); super.onInitializeAccessibilityNodeInfo(host, superNode); info.setSource(host); ViewParent parent = ViewCompat.getParentForAccessibility(host); if (parent instanceof View) { info.setParent((View) parent); } copyNodeInfoNoChildren(info, superNode); superNode.recycle(); addChildrenForAccessibility(info, (ViewGroup) host); } info.setClassName(DrawerLayout.class.getName()); info.setFocusable(false); info.setFocused(false); info.removeAction(AccessibilityNodeInfoCompat.AccessibilityActionCompat.ACTION_FOCUS); info.removeAction(AccessibilityNodeInfoCompat.AccessibilityActionCompat.ACTION_CLEAR_FOCUS); } public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) { super.onInitializeAccessibilityEvent(host, event); event.setClassName(DrawerLayout.class.getName()); } public boolean dispatchPopulateAccessibilityEvent(View host, AccessibilityEvent event) { CharSequence title; if (event.getEventType() != 32) { return super.dispatchPopulateAccessibilityEvent(host, event); } List<CharSequence> eventText = event.getText(); View visibleDrawer = DrawerLayout.this.findVisibleDrawer(); if (!(visibleDrawer == null || (title = DrawerLayout.this.getDrawerTitle(DrawerLayout.this.getDrawerViewAbsoluteGravity(visibleDrawer))) == null)) { eventText.add(title); } return true; } public boolean onRequestSendAccessibilityEvent(ViewGroup host, View child, AccessibilityEvent event) { if (DrawerLayout.CAN_HIDE_DESCENDANTS || DrawerLayout.includeChildForAccessibility(child)) { return super.onRequestSendAccessibilityEvent(host, child, event); } return false; } private void addChildrenForAccessibility(AccessibilityNodeInfoCompat info, ViewGroup v) { int childCount = v.getChildCount(); for (int i = 0; i < childCount; i++) { View child = v.getChildAt(i); if (DrawerLayout.includeChildForAccessibility(child)) { info.addChild(child); } } } private void copyNodeInfoNoChildren(AccessibilityNodeInfoCompat dest, AccessibilityNodeInfoCompat src) { Rect rect = this.mTmpRect; src.getBoundsInParent(rect); dest.setBoundsInParent(rect); src.getBoundsInScreen(rect); dest.setBoundsInScreen(rect); dest.setVisibleToUser(src.isVisibleToUser()); dest.setPackageName(src.getPackageName()); dest.setClassName(src.getClassName()); dest.setContentDescription(src.getContentDescription()); dest.setEnabled(src.isEnabled()); dest.setClickable(src.isClickable()); dest.setFocusable(src.isFocusable()); dest.setFocused(src.isFocused()); dest.setAccessibilityFocused(src.isAccessibilityFocused()); dest.setSelected(src.isSelected()); dest.setLongClickable(src.isLongClickable()); dest.addAction(src.getActions()); } } final class ChildAccessibilityDelegate extends AccessibilityDelegateCompat { ChildAccessibilityDelegate() { } public void onInitializeAccessibilityNodeInfo(View child, AccessibilityNodeInfoCompat info) { super.onInitializeAccessibilityNodeInfo(child, info); if (!DrawerLayout.includeChildForAccessibility(child)) { info.setParent((View) null); } } } }
[ "activeliang@gmail.com" ]
activeliang@gmail.com
eebfc26b39c3b11b3ed7a89a9c11d649c18b4688
7b0d92f9d75a172ebe461f60a73576ee194281af
/src/main/java/org/jol/core/MLCollection.java
7ec2be61feb55c0a27cd24f19e49c396bd920cbf
[ "Apache-2.0" ]
permissive
ThousandMonkeysTypewriter/Deployer
433cb28c56d375ff41afbd28cae31f7a0219aa6e
0025ba7a880a6b62518c88386efd7e6e50126f78
refs/heads/master
2021-09-04T09:24:12.652153
2018-01-17T17:25:25
2018-01-17T17:25:25
110,859,336
2
0
null
null
null
null
UTF-8
Java
false
false
669
java
package org.jol.core; import java.util.ArrayList; import java.util.Comparator; import java.util.Collections; import org.jol.core.MLItem; public class MLCollection { private ArrayList<MLItem> items; public MLCollection (ArrayList<MLItem> items_, MLModel model) { items = items_; model.prepareFeatures(items); model.getLabel(items); } public void sort() { Collections.sort(items, comparator_items_labels); } public static Comparator<MLItem> comparator_items_labels = new Comparator<MLItem>() { public int compare(MLItem o1, MLItem o2) { return o2.getLabel().compareTo(o1.getLabel()); } }; }
[ "nayname@gmail.com" ]
nayname@gmail.com
c9359276dc5ed78a36700b741cb52d4a34632a4d
54c115686820070bb7f558ca73de82ae3f83cc78
/app/src/main/java/lekt02_intents/BenytIntentsMedTilladelser.java
99559eb3671a81ed00b7744f1d26bd86666a7360
[ "Apache-2.0" ]
permissive
gee12/AndroidElementer
1af12f342dec4b21469ab5e38d6a872a4bed99d7
7a70f80b31639f2ae513157312ee01949c4c5ce2
refs/heads/master
2021-05-23T12:29:38.101441
2020-01-27T12:11:14
2020-01-27T12:11:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,013
java
package lekt02_intents; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import androidx.annotation.NonNull; import com.google.android.material.snackbar.Snackbar; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; import androidx.appcompat.app.AppCompatActivity; import android.text.InputType; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.ScrollView; import android.widget.TableLayout; import android.widget.TextView; import android.widget.Toast; /** * @author Jacob Nordfalk */ public class BenytIntentsMedTilladelser extends AppCompatActivity implements OnClickListener { EditText nummerfelt; Button ringOpDirekte, info; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TableLayout tl = new TableLayout(this); TextView tv = new TextView(this); tv.setText("Brugeren skal spørges om lov først før visse handlinger kan udføres.\n\n"); tl.addView(tv); nummerfelt = new EditText(this); nummerfelt.setHint("Skriv telefonnummer her"); nummerfelt.setInputType(InputType.TYPE_CLASS_PHONE); tl.addView(nummerfelt); ringOpDirekte = new Button(this); ringOpDirekte.setText("Ring op - direkte"); tl.addView(ringOpDirekte); info = new Button(this); info.setText("Info om runtime tilladelser"); tl.addView(info); ScrollView sv = new ScrollView(this); sv.addView(tl); setContentView(sv); ringOpDirekte.setOnClickListener(this); } public void onClick(View v) { if (v == info) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://developer.android.com/training/permissions/requesting"))); return; } String nummer = nummerfelt.getText().toString(); nummerfelt.setError(null); if (nummer.length() == 0) { nummerfelt.setError("Skriv et telefonnummer"); Toast.makeText(this, "Skriv et telefonnummer", Toast.LENGTH_LONG).show(); return; } // Kræver <uses-permission android:name="android.permission.CALL_PHONE" /> i manifestet. try { if (v == ringOpDirekte) { if (ContextCompat.checkSelfPermission(this, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) { if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.CALL_PHONE)) { Toast.makeText(this, "Her skal vises et rationale/forklaring: ...", Toast.LENGTH_LONG).show(); Toast.makeText(this, "Giv tilladelse for at eksemplet virker :-)", Toast.LENGTH_LONG).show(); } ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CALL_PHONE}, 12345); } else { startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + nummer))); } } else if (v == info) { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://developer.android.com/training/permissions/index.html")); startActivity(intent); } } catch (Exception e) { Toast.makeText(this, "Du mangler vist <uses-permission android:name=\"android.permission.CALL_PHONE\" /> i manifestet\n" + e, Toast.LENGTH_LONG).show(); e.printStackTrace(); } } @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (requestCode != 12345) return; // ikke vores requestCode if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) { Snackbar.make(ringOpDirekte, "Du har afvist at give tilladelser", Snackbar.LENGTH_SHORT).show(); return; } String nummer = nummerfelt.getText().toString(); startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + nummer))); } }
[ "jacob.nordfalk@gmail.com" ]
jacob.nordfalk@gmail.com
113f7810b05de3b6360fc04b1c40ecd9224a0bd2
6c0eec2fe8f477a694a4d11485c09ec7cfdbe3a0
/src/com/globe/games/guess/GameActivity.java
39fde484f1d871fe1b96ea01a3de8691fac38924
[]
no_license
jmetran/guess
cd05c5b886c8f5da6576f991c8b7fefbcc5fae69
58df719b30469868cc246d5174f488e56d4f0f31
refs/heads/master
2020-05-15T20:01:38.045643
2014-03-11T02:45:47
2014-03-11T02:45:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,535
java
package com.globe.games.guess; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.json.JSONException; import org.json.JSONObject; import com.androidquery.AQuery; import com.androidquery.callback.AjaxCallback; import com.androidquery.callback.AjaxStatus; import com.androidquery.util.AQUtility; import com.globe.games.guess.utilities.AlertUtility; import com.globe.games.guess.utilities.AppSettingsDataSource; import com.globe.games.guess.utilities.MyUuId; import com.globe.games.guess.utilities.ErrorMessageUtility; import com.globe.games.guess.utilities.IntentUtility; import com.globe.games.guess.utilities.SoundsHelper; import android.os.Bundle; import android.os.Parcelable; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.res.TypedArray; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.widget.EditText; public class GameActivity extends Activity { private AQuery aq; private List<Guess> questions = new ArrayList<GameActivity.Guess>(); private int totalQuestions; private boolean finish = false; private int questionIdx = 0; private int level = 1; private int score = 0; private int hintReveal = 0; private EditText et_answer; private AlertUtility alertUtil; private ErrorMessageUtility errMsg; private ProgressDialog progress; private MyUuId appDetails; private AppSettingsDataSource datasource; private String accessToken = ""; private String phoneNumber = ""; private SoundsHelper soundHelper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_game); init(); TypedArray images = getResources().obtainTypedArray(R.array.questions); String[] answers = getResources().getStringArray(R.array.answers); String[] hints = getResources().getStringArray(R.array.hints); totalQuestions = answers.length; for (int i = 0; i < totalQuestions; i++) { Guess g = new Guess(answers[i], images.getResourceId(i, -1), hints[i]); questions.add(g); } Collections.shuffle(questions); drawQuestion(); aq.id(R.id.btn_ok).clicked(new OnClickListener() { @Override public void onClick(View v) { soundHelper.playBeep(); if(!finish){ if (et_answer.getText().toString().trim().length() != 0){ if(validateAnswer()){ AQUtility.debug("CORRECT"); addScoreLevel(); moveNext(); }else{ AQUtility.debug("WRONG"); alertUtil.alertInfo("Sorry!", "Your answer is incorrect."); } }else{ errMsg.showMessage("Please enter your answer", true); et_answer.findFocus(); } } } }); aq.id(R.id.btn_hint).clicked(new OnClickListener() { @Override public void onClick(View v) { soundHelper.playBeep(); if(hintReveal == 0){ AlertDialog.Builder alertbox = new AlertDialog.Builder(GameActivity.this); alertbox.setTitle("Notice"); alertbox.setMessage("Do you want to purchase a HINT for this question? 1 Hint = 1 peso"); alertbox.setPositiveButton("NO",null); alertbox.setNegativeButton("YES", new DialogInterface.OnClickListener() { public void onClick(DialogInterface arg0, int arg1) { getReference(); } }); alertbox.show(); }else{ errMsg.showMessage("Only one hint per level", true); } } }); aq.id(R.id.btn_cancel).clicked(new OnClickListener() { @Override public void onClick(View v) { soundHelper.playExit(); new IntentUtility(GameActivity.this).startIntent(MainActivity.class, null, null, null, null, true); } }); } private long reference; public void getReference(){ aq.progress(progress).ajax("http://guess-app.herokuapp.com/reference", JSONObject.class, -1, this, "referenceCb"); } public void referenceCb(String url, JSONObject jo, AjaxStatus status) throws JSONException{ AQUtility.debug("jo", jo); if (status.getCode() == 200) { long ref = jo.getLong("reference"); reference = ref + 1; AQUtility.debug("reference", reference); getHint(); // hintReveal++; // aq.id(R.id.tv_hint).text(questions.get(questionIdx).hint).visible(); }else{ errMsg.showMessage(status.getMessage()); } } public void saveReference(){ AjaxCallback<JSONObject> cb = new AjaxCallback<JSONObject>(); cb.url("http://guess-app.herokuapp.com/increment").type(JSONObject.class).fileCache(true).expire(-1); cb.method(AQuery.METHOD_POST); cb.weakHandler(this, "saveReferenceCb"); cb.param("reference", "ok"); aq.ajax(cb); } public void saveReferenceCb(String url, JSONObject jo, AjaxStatus status) throws JSONException{ AQUtility.debug("jo", jo); if (status.getCode() == 200) { }else{ saveReference(); } } public void getHint(){ AjaxCallback<JSONObject> cb = new AjaxCallback<JSONObject>(); cb.url("http://devapi.globelabs.com.ph/payment/v1/transactions/amount?access_token="+accessToken).type(JSONObject.class).fileCache(true).expire(-1); cb.method(AQuery.METHOD_POST); cb.weakHandler(this, "hintCb"); cb.param("amount", "0.00"); cb.param("description", "Guess (?)"); cb.param("endUserId", phoneNumber); cb.param("referenceCode", reference); cb.param("transactionOperationStatus", "Charged"); aq.progress(progress).ajax(cb); } public void hintCb(String url, JSONObject jo, AjaxStatus status) throws JSONException{ AQUtility.debug("jo", jo); if (status.getCode() == 201) { hintReveal++; aq.id(R.id.tv_hint).text(questions.get(questionIdx).hint).visible(); saveReference(); }else{ errMsg.showMessage(status.getMessage()); } } private void moveNext(){ if(questionIdx < (totalQuestions-1)){ questionIdx++; hintReveal = 0; et_answer.setText(""); aq.id(R.id.tv_hint).gone(); drawQuestion(); }else{ finish = true; AQUtility.debug("NO NEW QUESTION"); new IntentUtility(this).startIntent(CongratsActivity.class, null, null, null, null, true); } } private void addScoreLevel(){ level++; score++; initLabel(); } private void initLabel(){ // aq.id(R.id.tv_level).text("Level: "+ level); aq.id(R.id.tv_score).text(String.valueOf(score)); } private boolean validateAnswer(){ return (et_answer.getText().toString().equalsIgnoreCase(questions.get(questionIdx).answer) ? true : false); } private void drawQuestion(){ aq.id(R.id.img_question).image(questions.get(questionIdx).picture); } private void init(){ aq = new AQuery(this); AQUtility.setDebug(true); et_answer = aq.id(R.id.et_answer).getEditText(); alertUtil = new AlertUtility(this); errMsg = new ErrorMessageUtility(this); initLabel(); progress = new ProgressDialog(this); progress.setMessage("Please wait..."); appDetails = new MyUuId(this); soundHelper = new SoundsHelper(this); soundHelper.playBeat(); datasource = new AppSettingsDataSource(this); datasource.open(); datasource.getDetails(); accessToken = datasource.accessToken; phoneNumber = datasource.phoneNumber; datasource.close(); } private class Guess { public String answer; public int picture; public String hint; public Guess(String answer, int picture, String hint) { this.answer = answer; this.picture = picture; this.hint = hint; } } public boolean onKeyDown(int keyCode, KeyEvent event) { return false; } }
[ "josephmetran@yahoo.com" ]
josephmetran@yahoo.com
c3576a80e047e6ad69fc2c8b28dd54c620f661ed
071a9fa7cfee0d1bf784f6591cd8d07c6b2a2495
/corpus/norm-class/tomcat70/489.java
65ffed54093f8d5061c997c1261e6c92eb88e0a8
[ "MIT" ]
permissive
masud-technope/ACER-Replication-Package-ASE2017
41a7603117f01382e7e16f2f6ae899e6ff3ad6bb
cb7318a729eb1403004d451a164c851af2d81f7a
refs/heads/master
2021-06-21T02:19:43.602864
2021-02-13T20:44:09
2021-02-13T20:44:09
187,748,164
0
0
null
null
null
null
UTF-8
Java
false
false
2,325
java
licensed apache software foundation asf contributor license agreements notice file distributed work additional copyright ownership asf licenses file apache license version license file compliance license copy license http apache org licenses license required applicable law agreed writing software distributed license distributed basis warranties conditions kind express implied license specific language governing permissions limitations license org apache tomcat jdbc test java sql connection javax sql pooled connection pooledconnection org junit org junit org junit test org apache tomcat jdbc test driver driver equals hash code test equalshashcodetest default test case defaulttestcase string password password string username username set up setup exception datasource set driver class name setdriverclassname driver get name getname datasource set url seturl jdbc tomcat test datasource set password setpassword password datasource set max active setmaxactive datasource set min idle setminidle datasource get max active getmaxactive datasource set max idle setmaxidle datasource get max active getmaxactive datasource set username setusername username datasource get connection getconnection close datasource create pool createpool test test equals testequals exception connection con datasource get connection getconnection connection real pooled connection pooledconnection con get connection getconnection assert equals assertequals con con con close assert equals assertequals con con connection con datasource get connection getconnection connection real pooled connection pooledconnection con get connection getconnection assert equals assertequals real real assert equals assertequals con con assert not same assertnotsame con con con close assert equals assertequals con con test test hash code testhashcode exception connection con datasource get connection getconnection assert equals assertequals con hash code hashcode con hash code hashcode con close assert equals assertequals con hash code hashcode con hash code hashcode connection con datasource get connection getconnection assert equals assertequals con hash code hashcode con hash code hashcode assert true asserttrue con hash code hashcode con hash code hashcode con close assert equals assertequals con hash code hashcode con hash code hashcode
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
57c2dcb1daae99b4ccd5231c79d4c66c12d04cb9
affdb038a605b98addf7c1a046246daf47b3a339
/guia_2/src/com/company/Cashier.java
92d441d7df3eaea7b73dc933c6ce49db45a47858
[]
no_license
crpache/programacion_3
65b45297c863f8ed0c23c5b723eef3e1c217e141
f16a4e2c1a41c1919fd1a273966ac630c0267f2c
refs/heads/master
2020-05-04T17:11:27.651522
2019-04-04T23:17:31
2019-04-04T23:17:31
179,301,874
0
0
null
null
null
null
UTF-8
Java
false
false
460
java
package com.company; public class Cashier { private int bankCode; private int officeCode; private float availableMoney; public Cashier(){ } public void agregate(float cash){ this.availableMoney += cash; } public void exctract(float cash){ if(this.availableMoney >= cash){ this.availableMoney -= cash; } } public float getBalance(){ return this.availableMoney; } }
[ "crpache@gmail.com" ]
crpache@gmail.com
1313745cf2291e460eaee6e470dc3d105b01b85c
a0192e80611c25eadbdf916d11e25e2fcd5df5fb
/coder/project/hello/Hello.java
e2ed608096513410281dcab60fa21f7785283869
[ "MIT" ]
permissive
dounine/code-server-scala
f0bf1b146468694324aa5c31c566f3b695323b35
c7a5421892f46b80d04ea1d1e8968998f9af1037
refs/heads/main
2023-01-07T17:18:41.055045
2020-11-10T08:07:47
2020-11-10T08:07:47
311,527,039
0
0
null
null
null
null
UTF-8
Java
false
false
120
java
public class Hello{ public static void main(String[] args){ System.out.println("hello world"); } }
[ "lake@starsriver.cn" ]
lake@starsriver.cn
422df53cef0799d825a42911b349a17907ea4b8e
f3cb68e1a09801bf6addb3cda18e0358cbbee86a
/Space-Game-Java-Seng201-master/space game/src/main/DaySelectScreen.java
d0a948e79bcfed6bf0faab3092490980a3609f99
[]
no_license
Mike-Whitley/Programming
da9c1f37bf298d29f4906ce65153de5b99b6e266
4225343494d559e8d87ffb0911222cc32794bd54
refs/heads/main
2023-07-08T12:37:25.492337
2021-08-18T08:11:28
2021-08-18T08:11:28
391,745,647
0
0
null
null
null
null
UTF-8
Java
false
false
2,781
java
/** * This Class contains a Sliders which the player is able to choose the number of days the want to player for. */ package main; import java.awt.*; import javax.swing.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; public class DaySelectScreen { public JFrame frame; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { DaySelectScreen window = new DaySelectScreen(); window.frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the application. * * */ public DaySelectScreen() { initialize(); } /** * Initialize the contents of the frame. */ private void initialize() { frame = new JFrame(); frame.setResizable(false); frame.getContentPane().setForeground(Color.WHITE); frame.getContentPane().setBackground(Color.BLACK); frame.setBounds(100, 100, 660, 530); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); JLabel lblNumberOfDays = new JLabel("Number of Days"); lblNumberOfDays.setForeground(Color.WHITE); lblNumberOfDays.setFont(new Font("Courier 10 Pitch", Font.PLAIN, 16)); lblNumberOfDays.setBounds(40, 140, 140, 30); frame.getContentPane().add(lblNumberOfDays); final JSlider slider = new JSlider(); slider.setForeground(Color.WHITE); slider.setBounds(180, 140, 420, 50); slider.setMinorTickSpacing(1); slider.setSnapToTicks(true); slider.setPaintTicks(true); slider.setPaintLabels(true); slider.setBackground(Color.BLACK); slider.setMajorTickSpacing(1); slider.setMaximum(10); slider.setMinimum(3); frame.getContentPane().add(slider); JLabel lblGameLength = new JLabel("Game Length"); lblGameLength.setBackground(Color.BLACK); lblGameLength.setForeground(Color.WHITE); lblGameLength.setFont(new Font("Courier 10 Pitch", Font.BOLD, 24)); lblGameLength.setBounds(240, 20, 180, 40); frame.getContentPane().add(lblGameLength); /** * ButtonContinue takes the current slider number of Days and passes it to a variable to store * opens the story screen then closes this screen. */ JButton btnContinue = new JButton("Continue"); btnContinue.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { GameEnvironment.setNumSimulationDays(slider.getValue()); GameEnvironment.openStoryScreen(); frame.setVisible(false); } }); btnContinue.setForeground(Color.WHITE); btnContinue.setBackground(Color.GRAY); btnContinue.setBounds(240, 260, 200, 60); frame.getContentPane().add(btnContinue); } }
[ "noreply@github.com" ]
Mike-Whitley.noreply@github.com
a54159ca1209051f82063ee3e6f983139af23fda
8c614cb2bb14ed22544cb34f99ce1081f64f0f82
/src/main/java/org/arnotec/bankws/BankWsApplication.java
63f4a2b0d7c84c6562e9bed0db299a24a31287dd
[]
no_license
Arnotec/Demo-rest_ws
20a3172375110f737ec861cc20be8afb9dc9de3e
475ba3b2abdca2330143e7b059a8991f45fd79ef
refs/heads/main
2023-09-01T11:05:08.849856
2021-10-28T19:10:36
2021-10-28T19:10:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,570
java
package org.arnotec.bankws; import org.arnotec.bankws.entities.Account; import org.arnotec.bankws.entities.Customer; import org.arnotec.bankws.entities.TypeAccount; import org.arnotec.bankws.repositories.AccountRepository; import org.arnotec.bankws.repositories.CustomerRepository; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import java.util.Date; @SpringBootApplication public class BankWsApplication { public static void main(String[] args) { SpringApplication.run(BankWsApplication.class, args); } @Bean CommandLineRunner start(AccountRepository accountRepository, CustomerRepository customerRepository) { return args -> { Customer c1 = new Customer(null, "Enzo", null); Customer c2 = new Customer(null, "Judith", null); customerRepository.save(c1); customerRepository.save(c2); accountRepository.save(new Account(null, Math.random()*90000, new Date(), TypeAccount.CURRENT, c1)); accountRepository.save(new Account(null, Math.random()*90000, new Date(), TypeAccount.SAVINGS, c1)); accountRepository.save(new Account(null, Math.random()*90000, new Date(), TypeAccount.CURRENT, c2)); accountRepository.findAll().forEach(account -> { System.out.println(account.getSolde() + " - " + account.getType()); }); }; } }
[ "tsofackarnaud@gmail.com" ]
tsofackarnaud@gmail.com
16d7a73a45e4805d1feab649e73d923a0c7591d4
18c10aa1261bea4ae02fa79598446df714519c6f
/10_Java/22_JDBC_DAO/src/ArrayListExam.java
a95087edd5b967b124f58782fdd5d7cf39192cb8
[]
no_license
giveseul-23/give_Today_I_Learn
3077efbcb11ae4632f68dfa3f9285d2c2ad27359
f5599f0573fbf0ffdfbcc9c79b468e3c76303dd4
refs/heads/master
2023-05-06T08:13:49.845436
2021-05-25T04:33:20
2021-05-25T04:33:20
330,189,867
0
0
null
null
null
null
UTF-8
Java
false
false
2,431
java
import java.util.ArrayList; public class ArrayListExam { public static void main(String[] args) { ArrayList list1 = new ArrayList(); list1.add(new Integer(3)); list1.add(1); // int -> Integer 자동형변환되어서 저장 list1.add(new Integer(5)); list1.add(new Integer(3)); list1.add("123"); //String System.out.println(list1); Integer obj = (Integer) list1.get(0); //Intger <- Object(실체 Integer) int intvalue = obj.intValue(); // int <- Integer System.out.println("intvalue : " + intvalue); //Integer obj2 = (Integer) list1.get(4); //강제형변환.. 자료형변경시에는 integer.parseint?사용해야하는 것이 아닐까? // int <- Integer <- Object(실체 String) : 형변환 안됨 //4번 인덱스 값 처리 : 문자열 데이터가 있음 //실행시 java.lang.ClassCastException 발생 if(list1.get(4) instanceof Integer) { Integer obj2 = (Integer) list1.get(4); //강제형변환 // int <- Integer <- Object(실체 String) : 형변환 안됨 intvalue = obj2.intValue(); System.out.println("intvalue : " + intvalue); }else if(list1.get(4) instanceof String) { String str = (String)list1.get(4); System.out.println("str.substring(1) : "+str.substring(1)); } //---------------------- System.out.println("--------------------------"); //인덱스 0 1 2 3 4 //list1 : [3, 1, 5, 3, 홍길동] ArrayList list2 = new ArrayList(list1.subList(1, 4)); // 지정 리스트만큼 담아줄수있음, subString과 동일한 방식으로 잘림, 1 ~ 4이전까지 System.out.println("list2 : " + list2); //데이터 추가 : add list2.add(4); System.out.println("list2 : " + list2); //데이터 참조(검색, 확인) System.out.println(list2.get(0)); //첫번째 데이터 조회(확인) //데이터 수정 list2.set(1, 999); System.out.println(list2.get(1)); //데이터 삭제 list2.remove(0); System.out.println("list2.remove(0) 실행 후 : " + list2); list2.add(77); list2.add(88); list2.add(77); System.out.println(list2); //[999, 3, 4, 77, 88, 77] - 77이 지금 중복됨 //list2.remove(77); //index로 인식하고 오류로 인식 list2.remove(new Integer(77)); System.out.println("list2.remove(new Integer(77)) : " + list2); //앞에서부터 삭제해서 한 개만 삭제된다. System.out.println("-----------"); System.out.println("list2 : "+ list2); } }
[ "joodasel@icloud.com" ]
joodasel@icloud.com
462cdc8cf7d1548f3d632b8bfd25c34218010377
22af0b491ee5e5fa224a52707bf68bac41b239bc
/i18n-tools/src/main/java/com/yonyou/i18n/utils/FilesUtils.java
c865eeb7fc29bc70a8874f4a1cd4576d01ebbefb
[]
no_license
wenfan919/ms-i18n
aa73f29c19a946a5c0869cffdabdd7fc873465ff
a1611fffcce80e3d45d5b34b147026e9b6d2cfef
refs/heads/master
2020-04-02T20:22:07.286381
2018-12-20T06:28:47
2018-12-20T06:28:47
154,766,611
0
4
null
null
null
null
UTF-8
Java
false
false
2,900
java
package com.yonyou.i18n.utils; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.TreeSet; import org.apache.log4j.Logger; import com.yonyou.i18n.model.PageNode; /** * 扫描文件目录下的所有适当类型的文件 * * @author wenfan */ public class FilesUtils { private static Logger logger = Logger.getLogger(FilesUtils.class); public static List<PageNode> dirFileList(String dirPath, String scanFileType) throws Exception { File dirFile = new File(dirPath); File[] fileList = dirFile.listFiles(); if (fileList == null || fileList.length == 0) { logger.error(LogUtils.printMessage("扫描文件失败,文件路径为:" + dirPath)); throw new Exception("扫描文件失败!"); } // String[] scanFileTypes = scanFileType.split(","); if (fileList == null || fileList.length == 0) { logger.error(LogUtils.printMessage("扫描文件失败,文件路径为:" + dirPath)); throw new Exception("扫描文件失败!"); } List<PageNode> pageNodes = new ArrayList<PageNode>(); for (int i = 0; i < fileList.length; i++) { String fileName = fileList[i].getName(); String suffix = fileName.substring(fileName.lastIndexOf(".") + 1); if (scanFileType.indexOf(suffix) >= 0) { } } return pageNodes; } public static void fileWriter(String fileName, TreeSet<String> clist) throws IOException { //创建一个FileWriter对象 FileWriter fw = new FileWriter(fileName); //遍历clist集合写入到fileName中 for (String str : clist) { fw.write(str); fw.write("\n"); } //刷新缓冲区 fw.flush(); //关闭文件流对象 fw.close(); } public static TreeSet<String> readFileByLines(String fileName) throws IOException { File file = new File(fileName); BufferedReader reader = new BufferedReader(new FileReader(file)); String tempString = null; //创建一个集合 TreeSet<String> nums = new TreeSet<String>(); //按行读取文件内容,并存放到集合 while ((tempString = reader.readLine()) != null) { nums.add(tempString); } reader.close(); //返回集合变量 return nums; } public static void moveFolder(String src, String dest) { File srcFolder = new File(src); File destFolder = new File(dest); File newFile = new File(destFolder.getAbsoluteFile() + File.separator + srcFolder.getName()); srcFolder.renameTo(newFile); } public static void main(String[] args) { } }
[ "yanyongc@yonyou.com" ]
yanyongc@yonyou.com
059b23d01aa2e9510ad8ff9724438a7af91859a9
3f035e71c8c70005bae7a8b53c539cfcf0d2dc8a
/app/src/main/java/com/example/nbdell/movieisland/MovieAdapter.java
b4c80e1cfb9a2af9e56bdf506eedf5607d0bca9c
[]
no_license
khaled94/MovieIsland
f359134ac4f096e2cb454f62ff1fa8097c29a56f
462b61c6ec3dc608621f24d045dd12ea18897cbb
refs/heads/master
2021-01-12T06:03:33.726515
2016-12-24T14:26:34
2016-12-24T14:26:34
77,286,667
0
0
null
null
null
null
UTF-8
Java
false
false
2,662
java
package com.example.nbdell.movieisland; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import com.squareup.picasso.Picasso; import java.util.ArrayList; import java.util.List; /** * Created by NB DELL on 11/29/2016. */ public class MovieAdapter extends BaseAdapter { List<Movie> movielist = new ArrayList<>(); Context context; LayoutInflater inflter; public MovieAdapter(Context mcontext, List<Movie> movies) { movielist = movies; context = mcontext; inflter = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } @Override public int getCount() { return movielist.size(); } @Override public Object getItem(int position) { return movielist.get(position); } @Override public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ImageView moviePoster; if(convertView == null) { convertView = inflter.inflate(R.layout.image_item, null); moviePoster = (ImageView) convertView.findViewById(R.id.image); convertView.setTag(moviePoster); } else{ moviePoster = (ImageView) convertView.getTag(); } if( movielist.get(position) != null ) Picasso.with(context).load(movielist.get(position).getImageFullURL()).into(moviePoster); return convertView; } } /* public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); // A holder will hold the references // to your views. ViewHodler holder; if(convertView == null) { View rowView = inflater.inflate(R.layout.artist, parent, false); holder = new ViewHodler(); holder.someTextField = (TextView) rowView.findViewById(R.id.sometext); holder.someImageView = (ImageView) rowView.findViewById(R.id.someimage); rowView.setTag(holder); } else { holder = (ViewHodler) convertView.getTag(); } holder.someTextView.setText(somtexts.get(position)); if (somearray.get(position) != null) Picasso.with(context) .load(somearray.get(position)) .into(holder.someImageView); return convertView; } class ViewHodler { // declare your views here TextView someTextView; ImageView someImageView; } */
[ "khaledmamdouh33@gmail.com" ]
khaledmamdouh33@gmail.com
5f37fad918489298179dd8bd7281e19e6860a047
c816f21804f473b7773a85d51947ab286a2189b3
/src/main/java/js/text/statistics/js/text/detector/APIlanguageDetector.java
3fa0e435b0ca99739a6465b2a770cb3c95338e79
[]
no_license
justynastanek/text-statistics
0adb255b72433a782ea62c843a1809443b606a45
3c743f9e9ab155d56e961cd2cf68b578ad0f04d0
refs/heads/master
2020-06-08T22:26:06.709604
2019-06-29T08:30:07
2019-06-29T08:30:07
193,317,112
0
1
null
null
null
null
UTF-8
Java
false
false
872
java
package js.text.statistics.js.text.detector; import com.detectlanguage.DetectLanguage; import com.detectlanguage.Result; import com.detectlanguage.errors.APIError; import java.util.ArrayList; import java.util.List; public class APIlanguageDetector implements LanguageDetector{ private String yourApiKey; public APIlanguageDetector(String yourApiKey) { this.yourApiKey = yourApiKey; } @Override public String detect(String text) { DetectLanguage.apiKey = yourApiKey; List<Result> results = new ArrayList<>(); try { results = DetectLanguage.detect(text); }catch(APIError ex){ ex.toString(); } Result result = results.get(0); return "Language: " + result.language + " Is reliable: " + result.isReliable + " Confidence: " + result.confidence ; } }
[ "justyna.stanek.js@gmail.com" ]
justyna.stanek.js@gmail.com
42cda8148c7287ead52c31336298be82a65a4dfb
14bd997c844f69bd4585318ce65e533c9ac2df41
/src/sample/Main.java
75dfb38256fcd6f95c327536f3dc9edff2b83c5c
[]
no_license
larawehbe/Hotel-Management-System
506a7bbcd015d7e9328537bd9d10d712b82ae1a5
bb8ead474e2f76e7f089a4ab58d1357f6658602a
refs/heads/master
2022-11-09T05:25:12.610925
2022-10-30T08:07:46
2022-10-30T08:07:46
272,401,761
0
0
null
null
null
null
UTF-8
Java
false
false
626
java
package sample; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; public class Main extends Application { public static int c=9; public static Scene se; public static Stage st = new Stage(); @Override public void start(Stage primaryStage) throws Exception{ Parent root = FXMLLoader.load(getClass().getResource("../view/MainPage.fxml")); se = new Scene(root); st.setScene(se); st.show(); } public static void main(String[] args) { launch(args); } }
[ "larawehbee@outlook.com" ]
larawehbee@outlook.com
eb412f28930f8cfe8d23a5dba2503536bfc22f27
a11b8c2d2c482879ee49a528cfa95782227fe8d7
/approvaltests-tests/src/test/java/tests/PackageSettings.java
80be510c36f8df2cf43bbcaf8836ad57ff0f1c2c
[ "Apache-2.0" ]
permissive
approvals/ApprovalTests.Java
dfa30be480d3310dc0bdb9c28d9c836d998b09fb
58f1756ab03a6de0796da66c122fe6b5f40c8346
refs/heads/master
2023-08-04T15:21:56.401052
2023-08-01T20:37:58
2023-08-01T20:42:10
8,533,893
270
78
Apache-2.0
2023-09-07T20:42:09
2013-03-03T08:44:41
Java
UTF-8
Java
false
false
112
java
package tests; public class PackageSettings { public static String ApprovalBaseDirectory = "../resources"; }
[ "lars.eckart@hey.com" ]
lars.eckart@hey.com
0677b1afa9b9a74a98cff62106424be2f7eed3d6
a0beade9466b6a841c590adc0eb98a35440b1564
/yxkj-pom/yxkj-app/src/main/java/com/yxkj/service/ShipmentExceptionService.java
32218952f34ff61e042728a4474fbbf9a80cfd3a
[]
no_license
StoneInCHN/yxkj-interface
80506fa40dd6ff2ee27a6a008f9481d2e26a0b42
56ef06b5ff1ead6c94bb563267ff5419d2b1f2bd
refs/heads/master
2021-08-14T16:48:03.097903
2017-11-16T08:02:24
2017-11-16T08:02:24
103,117,710
0
0
null
null
null
null
UTF-8
Java
false
false
214
java
package com.yxkj.service; import com.yxkj.entity.ShipmentException; import com.yxkj.framework.service.BaseService; public interface ShipmentExceptionService extends BaseService<ShipmentException,Long>{ }
[ "464709367@qq.com" ]
464709367@qq.com
d51c57d296dd5390b9b79c915185b0ed46d9970a
22a216f4658a2003c25011cf1e0236ee586b3d8b
/src/com/javarush/task/task20/task2002/Solution.java
ce471f4febbd082085d40b81f2f1a107fd7bfa14
[]
no_license
aleksey-bulygin/JavaRushTasks
377515a01ec5979c20b7c6de1e980a0ad64e5cc5
f1a0ae6059119f18a0afed73716b3f4beaf36ad3
refs/heads/master
2020-04-15T16:48:25.454684
2019-01-09T11:47:49
2019-01-09T11:47:49
163,992,814
1
0
null
null
null
null
UTF-8
Java
false
false
5,138
java
package com.javarush.task.task20.task2002; import java.io.*; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Locale; /* Читаем и пишем в файл: JavaRush */ public class Solution { // public static SimpleDateFormat dateFormat = new SimpleDateFormat("EE MMM dd HH:mm:ss z yyyy", Locale.ENGLISH); public static void main(String[] args) { //you can find your_file_name.tmp in your TMP directory or adjust outputStream/inputStream according to your file's actual location //вы можете найти your_file_name.tmp в папке TMP или исправьте outputStream/inputStream в соответствии с путем к вашему реальному файлу try { File yourFile = File.createTempFile("your_file_name", "tmp", new File("/Users/User/Desktop")); OutputStream outputStream = new FileOutputStream(yourFile); InputStream inputStream = new FileInputStream(yourFile); JavaRush javaRush = new JavaRush(); //initialize users field for the javaRush object here - инициализируйте поле users для объекта javaRush тут javaRush.users.add(new User()); javaRush.users.get(0).setFirstName("Alex"); javaRush.users.get(0).setLastName("Bulygin"); javaRush.users.get(0).setBirthDate(new Date(1508944516168L)); javaRush.users.get(0).setMale(true); javaRush.users.get(0).setCountry(User.Country.RUSSIA); javaRush.save(outputStream); outputStream.flush(); JavaRush loadedObject = new JavaRush(); loadedObject.load(inputStream); //here check that the codeGym object is equal to the loadedObject object - проверьте тут, что javaRush и loadedObject равны System.out.println(javaRush.equals(loadedObject)); outputStream.close(); inputStream.close(); } catch (IOException e) { //e.printStackTrace(); System.out.println("Oops, something is wrong with my file"); } catch (Exception e) { //e.printStackTrace(); System.out.println("Oops, something is wrong with the save/load method"); } } public static class JavaRush { public List<User> users = new ArrayList<>(); public void save(OutputStream outputStream) throws Exception { //implement this method - реализуйте этот метод PrintWriter printWriter = new PrintWriter(outputStream); if (users.size() != 0) { for (int i = 0; i < users.size(); i++) { printWriter.println(users.get(i).getFirstName()); printWriter.println(users.get(i).getLastName()); printWriter.println(users.get(i).getBirthDate().getTime()); printWriter.println(users.get(i).isMale()); printWriter.println(users.get(i).getCountry().getDisplayName()); } printWriter.flush(); printWriter.close(); } } public void load(InputStream inputStream) throws Exception { //implement this method - реализуйте этот метод BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); if (users != null) { while (bufferedReader.ready()) { String firstName = bufferedReader.readLine(); String lastName = bufferedReader.readLine(); String birthDateTime = bufferedReader.readLine(); boolean isMale = Boolean.parseBoolean(bufferedReader.readLine()); String displayName = bufferedReader.readLine(); User user = new User(); user.setFirstName(firstName); user.setLastName(lastName); user.setBirthDate(new Date(Long.parseLong(birthDateTime))); user.setMale(isMale); if (displayName.equals("Russia")) user.setCountry(User.Country.RUSSIA); if (displayName.equals("Ukraine")) user.setCountry(User.Country.UKRAINE); if (displayName.equals("Other")) user.setCountry(User.Country.OTHER); users.add(user); } bufferedReader.close(); } } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JavaRush javaRush = (JavaRush) o; return users != null ? users.equals(javaRush.users) : javaRush.users == null; } @Override public int hashCode() { return users != null ? users.hashCode() : 0; } } }
[ "Strong.bulygin@bk.ru" ]
Strong.bulygin@bk.ru
61c69cfedd88738ab3ad1cd4f0fbeff3d06a1ca8
e578f838f15e5f185ee9c0f956478bfb5429d7e3
/SpringRedis/src/lion/core/LogicExecuterPool.java
a2c3bcb161fc5dbe87eccc468c50b385555b1dbb
[]
no_license
mbsky/herbert-utils
097ac2f9ac1603cab442f29e8f4f32e7f1ab4a09
e79b4a96e5f29eb767261ced6ab8e12b81d3bf97
refs/heads/master
2020-04-14T15:16:21.754708
2014-03-25T05:44:10
2014-03-25T05:44:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,542
java
package lion.core; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import lion.common.Utils; import org.apache.commons.lang3.concurrent.BasicThreadFactory; import org.jboss.netty.channel.Channel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * 单线程执行游戏逻辑 * @author hexuhui * */ public class LogicExecuterPool { private static ExecutorService threadPool; private static Logger logger = LoggerFactory.getLogger(LogicExecuterPool.class); private static Map<String, Method> methodMap = new HashMap<String, Method>(); private static Class<? extends IGameService> gameService; static { BasicThreadFactory factory = new BasicThreadFactory.Builder().namingPattern("logic-thread").daemon(true).priority(Thread.MAX_PRIORITY).build(); threadPool = Executors.newFixedThreadPool(1, factory); } @SuppressWarnings("rawtypes") public static void init(Class<? extends IGameService> gameService) { LogicExecuterPool.gameService = gameService; try { Class gameServiceClass = Class.forName(LogicExecuterPool.gameService.getName()); Method[] methods = gameServiceClass.getDeclaredMethods(); for (Method method : methods) { methodMap.put(method.getName().toLowerCase(), method); } } catch (ClassNotFoundException e) { logger.error("", e); } } public static void executeEvents() { threadPool.execute(new Runnable() { @Override public void run() { //TODO handle } }); } public static void executeIoRequest(final Channel channel, final Object remoteObj) { threadPool.execute(new Runnable() { @Override public void run() { execute(channel, remoteObj); } }); } public static void execute(Channel channel, Object remoteObj) { String simpleClassName = remoteObj.getClass().getSimpleName(); if (simpleClassName.endsWith(Utils.DTO_END_STR)) { String methodName = simpleClassName.substring(0, simpleClassName.indexOf((Utils.DTO_END_STR))).toLowerCase(); Method callMethod = methodMap.get(methodName); if (callMethod == null) { logger.error("method not find!name={},class={}", methodName, LogicExecuterPool.gameService.getName()); return; } try { callMethod.invoke(SpringContextHolder.getBean(LogicExecuterPool.gameService), channel, remoteObj); } catch (Exception e) { logger.error("", e); } } } }
[ "herberthuige@aa37def6-18b5-fd36-5fc6-d360b81b0eb2" ]
herberthuige@aa37def6-18b5-fd36-5fc6-d360b81b0eb2
aa6fcca2c4c031d1c01a64682200c99a100532cd
9fd0fe22c003ed2f25195a6c298fdaa9dd947005
/src/main/java/sample/aop/SampleAopApplication.java
d923311241bb15bb620c630b7cd0a88a947b1a07
[]
no_license
hyunjun19/spring-boot-sample-aop
b1bc73c20cd12a3ba06e873d6d48b25ec7ef8497
2e047fea7d4a390952e99fee4a2595fa941258f4
refs/heads/master
2020-09-16T13:53:27.253242
2016-08-22T15:50:39
2016-08-22T15:50:39
66,285,817
0
0
null
null
null
null
UTF-8
Java
false
false
1,108
java
/* * Copyright 2012-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package sample.aop; import sample.aop.service.HelloWorldService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SampleAopApplication { public static void main(String[] args) throws Exception { SpringApplication.run(SampleAopApplication.class, args); } }
[ "hyunjun19@gmail.com" ]
hyunjun19@gmail.com
b4f11ed291b0123bf27d983e467521cb590765b2
94faeb4c17af9c28de13ad554a90ae9bc314fa26
/resources/android-project-template/Junit3MainActivityTest.java
379a04da9fdbb13fcdc4dcba288cca513b8c7971
[ "BSD-3-Clause" ]
permissive
jeffboutotte/sbt-android
a4be9d17ee83c258528b7336e525c353b9adf843
280b0dd29584d164bfc3aa4289c9907e03b38ae5
refs/heads/master
2020-06-18T22:08:32.424489
2019-10-18T20:27:53
2019-10-18T20:27:53
196,468,612
0
1
NOASSERTION
2019-07-11T21:42:38
2019-07-11T21:42:38
null
UTF-8
Java
false
false
652
java
package %s; import android.support.test.rule.ActivityTestRule; /** * This is a simple framework for a test of an Application. See * {@link android.test.ApplicationTestCase ApplicationTestCase} for more information on * how to write and extend Application tests. * <p/> * To run this test, you can type: * adb shell am instrument -w \ * -e class com.example.MainActivityTest \ * com.example.tests/android.test.InstrumentationTestRunner */ public class Junit3MainActivityTest extends ActivityTestRule<MainActivity> { public Junit3MainActivityTest() { super(MainActivity.class); } public void testSuccessful() { } }
[ "pfnguyen@hanhuy.com" ]
pfnguyen@hanhuy.com
90178b70e54e8161a4171eecfc960f08f0b16d3a
52d52f4787c31c5ec9c0789779ac7457cad768e9
/Arif-GCCS-Maven-20200823T183952Z-001/Arif-GCCS-Maven/CashControlEJBX/EntitySrc/com/fedex/lacitd/cashcontrol/datatier/manager/ReceivablesManagerLocalHome.java
572bd828a9f7917b3f854ac21ba54e804b0dd596
[]
no_license
mohanb147/sample_project
c5ce0eccd75f6d1e955b0159ec570a922709dd0d
e7420d89ebd15c8eb59fb0e0fa7fb02abd98a42c
refs/heads/master
2022-12-05T10:01:50.599928
2020-08-24T10:15:04
2020-08-24T10:15:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
695
java
/** * @(#)ReceivablesManagerLocalHome.java Tue Aug 02 15:38:51 VET 2005 * * FedEx * Cash Control * * FedEx * Santiago, Chile * * Copyright (c) 2001 FedEx, All rights reserved. * * This software is the confidential and proprietary information * of FedEx. ("Confidential Information"). * * Visit our website at http://www.fedex.com for more information * * @author Cristian C?enas * @version 1.0 */ package com.fedex.lacitd.cashcontrol.datatier.manager; import javax.ejb.CreateException; import javax.ejb.EJBLocalHome; public interface ReceivablesManagerLocalHome extends EJBLocalHome { public ReceivablesManagerLocal create() throws CreateException; }
[ "ankitoct1995@gmail.com" ]
ankitoct1995@gmail.com
72ac272d61e45b8f9a9f0efc83118333ab3f1900
7eaf48c5b7becc7162682cacb093182ffcaa4a8f
/talleres/taller11/DigraphAL.java
92056eba8e1dcbbdb3253d8c442ce777b8008591
[]
no_license
agrimaldoe/ST0245-032
9c205e51787bfc4c95f161e2ac5cb3aabea05260
5e191dadd01ec825c43a3768a4d6331b3557a1c2
refs/heads/master
2021-07-16T06:35:26.306959
2020-08-11T17:12:19
2020-08-11T17:12:19
197,216,261
0
1
null
null
null
null
UTF-8
Java
false
false
1,016
java
import javafx.util.Pair; import java.util.ArrayList; import java.util.LinkedList; public class DigraphAL extends Graph { private ArrayList<LinkedList<Pair<Integer,Integer>>> nodo; public DigraphAL(int size) { super(size); nodo = new ArrayList<>(); for (int i = 0; i < size + 1; i++) { nodo.add(new LinkedList<>() ); } } public void addArc(int source, int destination, int weight) { nodo.get(source).add(new Pair<>(destination,weight)); } public ArrayList<Integer> getSuccessors(int vertex) { ArrayList<Integer> n = new ArrayList<>(); nodo.get(vertex).forEach(i -> n.add(i.getValue())); return n; } public int getWeight(int source, int destination) { int result = 0; for (Pair<Integer, Integer> integerIntegerPair : nodo.get(source)) { if (integerIntegerPair.getKey() == source ) result = integerIntegerPair.getValue(); } return result; } }
[ "noreply@github.com" ]
agrimaldoe.noreply@github.com
a56e088792d565f93384cfbad3c1ea975b44c47c
8e23b362cf833efa71123ce2da9a5d3f4155fba8
/xxh-demo/src/main/java/com/aopDemo/demo04/OneMethodInterceptor.java
65a7108fd054ed6515288e8f7890ee5e411ebf90
[ "Apache-2.0" ]
permissive
tomlikeyou/spring-framework
15a9e872106f8f97d8d08e0fabf809f01c671f84
36f89a59035f52a343ed5fd1be0778be2112272a
refs/heads/master
2023-04-27T23:51:14.135596
2023-04-24T14:37:50
2023-04-24T14:37:50
289,951,580
0
0
Apache-2.0
2020-08-24T14:30:45
2020-08-24T14:30:44
null
UTF-8
Java
false
false
351
java
package com.aopDemo.demo04; public class OneMethodInterceptor implements MyMethodInterceptor{ @Override public Object invoke(MyMethodInvocation methodInvocation) throws Exception { System.out.println("one start............"); Object proceed = methodInvocation.proceed(); System.out.println("one finished............"); return proceed; } }
[ "hjjy2727@163.com" ]
hjjy2727@163.com
b9b597ac61446ec1a09829508b370f277d6969cb
86f989796f59eefebe369deee00ee8c4950a964d
/src/main/java/com/dk/app/web/rest/vm/LoginVM.java
a7f12d70e8718573e04a67afeb1e0d138cfdb3cc
[]
no_license
BulkSecurityGeneratorProject/dc-3
733ae2e2e4db1ed8f0ada9bd89ea9f1add4e187a
a685168c862f59687b5a57b7457a8fb58f70f44a
refs/heads/master
2022-12-17T01:38:11.812003
2016-10-29T14:35:03
2016-10-29T14:35:03
296,590,943
0
0
null
2020-09-18T10:36:49
2020-09-18T10:36:48
null
UTF-8
Java
false
false
1,270
java
package com.dk.app.web.rest.vm; import com.dk.app.config.Constants; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; /** * View Model object for storing a user's credentials. */ public class LoginVM { @Pattern(regexp = Constants.LOGIN_REGEX) @NotNull @Size(min = 1, max = 50) private String username; @NotNull @Size(min = ManagedUserVM.PASSWORD_MIN_LENGTH, max = ManagedUserVM.PASSWORD_MAX_LENGTH) private String password; private Boolean rememberMe; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Boolean isRememberMe() { return rememberMe; } public void setRememberMe(Boolean rememberMe) { this.rememberMe = rememberMe; } @Override public String toString() { return "LoginVM{" + "password='*****'" + ", username='" + username + '\'' + ", rememberMe=" + rememberMe + '}'; } }
[ "nbarban@millhouse.com" ]
nbarban@millhouse.com
eeed005e8b12f6e8ca9884be1426ba73808b7684
e7fc5fe683f0b49529ec72cdab041f8b7d129902
/app/src/main/java/com/pulkit/buyhatke/utils/Miscellaneous.java
547949aaea29a40bcee11e1431d2e7ed9bda0194
[]
no_license
pulkit-mital/buy-hatke
c2012ca393747557397a0077aaa94e01e792b083
59e24e89269f4bca1d97d135105b06d7248c1f3a
refs/heads/master
2021-01-13T02:48:20.579748
2016-12-22T16:44:57
2016-12-22T16:44:57
77,160,570
0
0
null
null
null
null
UTF-8
Java
false
false
3,024
java
package com.pulkit.buyhatke.utils; import android.content.Context; import android.database.Cursor; import android.provider.ContactsContract; import android.text.TextUtils; import android.util.Log; import java.util.ArrayList; import java.util.List; /** * @author pulkitmital * @date 22-12-2016 */ public class Miscellaneous { // Always send the number to this function to remove the first n digits (+1,+52, +520, etc) public static String removeCountryCode(String number) { int digits = 10; if (hasCountryCode(number)) { // +52 for MEX +526441122345, 13-10 = 3, so we need to remove 3 characters int country_digits = number.length() - digits; number = number.substring(country_digits); } return number; } // Every country code starts with + right? public static boolean hasCountryCode(String number) { int plus_sign_pos = 0; return number.charAt(plus_sign_pos) == '+' || number.charAt(plus_sign_pos) == '0'; // Didn't String had contains() method?... } public static List<String> getGroupsTitle(Context context, String name) { List<String> groupsTitle = new ArrayList<>(); String contactId = null; Cursor cursorContactId = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, new String[]{ContactsContract.CommonDataKinds.Phone.CONTACT_ID}, ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + "=?", new String[]{name}, null); if (cursorContactId.moveToFirst()) { contactId = cursorContactId.getString(0); } cursorContactId.close(); if (contactId == null) return null; List<String> groupIdList = new ArrayList<>(); Cursor cursorGroupId = context.getContentResolver().query( ContactsContract.Data.CONTENT_URI, new String[]{ContactsContract.Data.DATA1}, String.format("%s=? AND %s=?", ContactsContract.Data.CONTACT_ID, ContactsContract.Data.MIMETYPE), new String[]{contactId, ContactsContract.CommonDataKinds.GroupMembership.CONTENT_ITEM_TYPE}, null); while (cursorGroupId.moveToNext()) { String groupId = cursorGroupId.getString(0); groupIdList.add(groupId); } cursorGroupId.close(); Cursor cursorGroupTitle = context.getContentResolver().query( ContactsContract.Groups.CONTENT_URI, new String[]{ContactsContract.Groups.TITLE}, ContactsContract.Groups._ID + " IN (" + TextUtils.join(",", groupIdList) + ")", null, null); while (cursorGroupTitle.moveToNext()) { String groupName = cursorGroupTitle.getString(0); Log.e("groupName", groupName); groupsTitle.add(groupName); } cursorGroupTitle.close(); return groupsTitle; } }
[ "pmital@bitbucket.org" ]
pmital@bitbucket.org
b6f33c85454705aa96aaa1be423a3c03647b8b2b
907b0da421599a8b1de5b3f2d91999f5c06c1ef7
/LeetCode/src/com/array/easy/solution605/Solution.java
bcb4f3ff6ee40bfa7ffd3f86ffae49f05e4ad53b
[]
no_license
stephanie-lss/play-data-structures
a4391647f087611a7aadeb4f963524726b81eb19
3c51b14181664c14553cb2b06d48eef7d147dd9d
refs/heads/master
2020-12-03T03:16:38.059224
2020-09-11T09:09:48
2020-09-11T09:09:48
231,192,253
2
0
null
null
null
null
UTF-8
Java
false
false
2,069
java
package com.array.easy.solution605; /** * @author LiSheng * @date 2020/3/29 21:53 */ public class Solution { public boolean canPlaceFlowers(int[] flowerbed, int n) { if (n == 0) { return true; } for (int i = 0; i < flowerbed.length; i++) { if (i == 0) { if (i + 1 < flowerbed.length) { if (flowerbed[i + 1] != 1 && flowerbed[i] != 1) { flowerbed[i] = 1; n--; if (n == 0) { return true; } } } else { if (flowerbed[i] != 1) { flowerbed[i] = 1; n--; if (n == 0) { return true; } } } continue; } if (i == flowerbed.length - 1) { if (i - 1 >= 0) { if (flowerbed[i - 1] != 1 && flowerbed[i] != 1) { flowerbed[i] = 1; n--; if (n == 0) { return true; } } } else { if (flowerbed[i] != 1) { flowerbed[i] = 1; n--; if (n == 0) { return true; } } } continue; } if (flowerbed[i - 1] != 1 && flowerbed[i + 1] != 1 && flowerbed[i] != 1) { flowerbed[i] = 1; n--; if (n == 0) { return true; } } } return false; } public static void main(String[] args) { int[] nums = {1}; int n = 1; System.out.println(new Solution().canPlaceFlowers(nums, n)); } }
[ "892958173@qq.com" ]
892958173@qq.com
9e40746b151c791c2ec0c924a0be442000d7cad3
ee3d7d64696ae6bbac75912292b124765831e2cc
/im-service-ws-ref/src/main/java/com/bjs/im/server/handler/impl/JoinGroupRequestHandler.java
05182c13c467006ab378010edb60c2c06fc5da6b
[]
no_license
bianjiashuai/im_chat
ab4c81dc7abf2e537e43a17cc459d79d557eb868
bf43b26f27da672d6253c39a0141116971f1b079
refs/heads/master
2022-06-24T07:57:59.015461
2019-12-20T09:18:11
2019-12-20T09:18:11
229,231,187
0
0
null
2022-06-17T02:48:03
2019-12-20T09:15:44
Java
UTF-8
Java
false
false
1,967
java
package com.bjs.im.server.handler.impl; import com.bjs.im.protocol.request.JoinGroupRequestPacket; import com.bjs.im.protocol.response.JoinGroupResponsePacket; import com.bjs.im.server.handler.AbstractHandler; import com.bjs.im.server.handler.annotation.IMRequest; import com.bjs.im.util.SessionUtil; import io.netty.channel.Channel; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.group.ChannelGroup; @IMRequest @ChannelHandler.Sharable public class JoinGroupRequestHandler extends AbstractHandler<JoinGroupRequestPacket> { @Override protected void channelRead(ChannelHandlerContext ctx, JoinGroupRequestPacket requestPacket) { // 获取对应的ChannelGroup, 然后将当前用户加入 String groupId = requestPacket.getGroupId(); ChannelGroup channelGroup = SessionUtil.getChannelGroup(groupId); // 2. 构造加群响应发送给客户端 JoinGroupResponsePacket responsePacket = new JoinGroupResponsePacket(); responsePacket.setGroupId(groupId); if (null != channelGroup) { Channel channel = ctx.channel(); if (channelGroup.contains(channel)) { responsePacket.setSuccess(false); responsePacket.setErrMsg("已经加入此群聊,不能重复加入"); } else { responsePacket.setSuccess(true); responsePacket.setGroupName(channelGroup.name()); responsePacket.setUserSession(SessionUtil.getUserSession(channel)); writeAndFlush(channelGroup, responsePacket); // 通知其他客户端有新用户加群了 channelGroup.add(channel); } } else { // 无此群聊 responsePacket.setSuccess(false); responsePacket.setErrMsg("无此群聊"); } writeAndFlush(ctx, responsePacket); // 通知当前用户加群操作 } }
[ "393252841@qq.com" ]
393252841@qq.com
868473033e6ffc91a33c67dd79b6399b344b7e5c
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/protocal/c/aew.java
2f7baeedfe42c11d9d7e4deeb933f19d3026a07d
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
4,269
java
package com.tencent.mm.protocal.c; import f.a.a.b; import java.util.LinkedList; public final class aew extends bhp { public int rDj; public String rDk; public String rDl; public int rDm; public String rDn; public String rIM; public String rIN; protected final int a(int paramInt, Object... paramVarArgs) { if (paramInt == 0) { paramVarArgs = (f.a.a.c.a)paramVarArgs[0]; if (this.six == null) { throw new b("Not all required fields were included: BaseResponse"); } if (this.six != null) { paramVarArgs.fV(1, this.six.boi()); this.six.a(paramVarArgs); } if (this.rIM != null) { paramVarArgs.g(2, this.rIM); } paramVarArgs.fT(3, this.rDj); if (this.rDk != null) { paramVarArgs.g(4, this.rDk); } if (this.rDl != null) { paramVarArgs.g(5, this.rDl); } paramVarArgs.fT(6, this.rDm); if (this.rDn != null) { paramVarArgs.g(7, this.rDn); } if (this.rIN != null) { paramVarArgs.g(8, this.rIN); } return 0; } if (paramInt == 1) { if (this.six == null) { break label666; } } label666: for (paramInt = f.a.a.a.fS(1, this.six.boi()) + 0;; paramInt = 0) { int i = paramInt; if (this.rIM != null) { i = paramInt + f.a.a.b.b.a.h(2, this.rIM); } i += f.a.a.a.fQ(3, this.rDj); paramInt = i; if (this.rDk != null) { paramInt = i + f.a.a.b.b.a.h(4, this.rDk); } i = paramInt; if (this.rDl != null) { i = paramInt + f.a.a.b.b.a.h(5, this.rDl); } i += f.a.a.a.fQ(6, this.rDm); paramInt = i; if (this.rDn != null) { paramInt = i + f.a.a.b.b.a.h(7, this.rDn); } i = paramInt; if (this.rIN != null) { i = paramInt + f.a.a.b.b.a.h(8, this.rIN); } return i; if (paramInt == 2) { paramVarArgs = new f.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler); for (paramInt = bhp.a(paramVarArgs); paramInt > 0; paramInt = bhp.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.cJS(); } } if (this.six != null) { break; } throw new b("Not all required fields were included: BaseResponse"); } if (paramInt == 3) { Object localObject1 = (f.a.a.a.a)paramVarArgs[0]; aew localaew = (aew)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); switch (paramInt) { default: return -1; case 1: paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { Object localObject2 = (byte[])paramVarArgs.get(paramInt); localObject1 = new fl(); localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler); for (boolean bool = true; bool; bool = ((fl)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, bhp.a((f.a.a.a.a)localObject2))) {} localaew.six = ((fl)localObject1); paramInt += 1; } case 2: localaew.rIM = ((f.a.a.a.a)localObject1).vHC.readString(); return 0; case 3: localaew.rDj = ((f.a.a.a.a)localObject1).vHC.rY(); return 0; case 4: localaew.rDk = ((f.a.a.a.a)localObject1).vHC.readString(); return 0; case 5: localaew.rDl = ((f.a.a.a.a)localObject1).vHC.readString(); return 0; case 6: localaew.rDm = ((f.a.a.a.a)localObject1).vHC.rY(); return 0; case 7: localaew.rDn = ((f.a.a.a.a)localObject1).vHC.readString(); return 0; } localaew.rIN = ((f.a.a.a.a)localObject1).vHC.readString(); return 0; } return -1; } } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes5-dex2jar.jar!/com/tencent/mm/protocal/c/aew.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
c2b2243e8348158e4244eade79a24717d7197aaa
5ca2a1106468c194dd43701babf32c691b9ef5bf
/src/main/java/com/thomsonreuters/ce/hbasestudy/filter/FilterListExample.java
256398f1128ab0dec8df65c71032af1092e687f1
[]
no_license
sihanwang/hbasestudy
743091c05cc04f95c5be09b69b19a6f69607906d
e85c2cb7fd54a79145ad7200d0c1958c7f8eae6c
refs/heads/master
2020-12-30T22:32:17.552667
2016-04-21T03:37:56
2016-04-21T03:37:56
56,740,020
0
0
null
null
null
null
UTF-8
Java
false
false
3,608
java
package com.thomsonreuters.ce.hbasestudy.filter; // cc FilterListExample Example of using a filter list to combine single purpose filters import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.ConnectionFactory; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.filter.BinaryComparator; import org.apache.hadoop.hbase.filter.CompareFilter; import org.apache.hadoop.hbase.filter.Filter; import org.apache.hadoop.hbase.filter.FilterList; import org.apache.hadoop.hbase.filter.QualifierFilter; import org.apache.hadoop.hbase.filter.RegexStringComparator; import org.apache.hadoop.hbase.filter.RowFilter; import org.apache.hadoop.hbase.util.Bytes; import java.io.IOException; import java.util.ArrayList; import java.util.List; public class FilterListExample { public static void main(String[] args) throws IOException { Configuration conf = HBaseConfiguration.create(); HBaseHelper helper = HBaseHelper.getHelper(conf); helper.dropTable("testtable"); helper.createTable("testtable", "colfam1"); System.out.println("Adding rows to table..."); helper.fillTable("testtable", 1, 10, 5, 2, true, false, "colfam1"); Connection connection = ConnectionFactory.createConnection(conf); Table table = connection.getTable(TableName.valueOf("testtable")); // vv FilterListExample List<Filter> filters = new ArrayList<Filter>(); Filter filter1 = new RowFilter(CompareFilter.CompareOp.GREATER_OR_EQUAL, new BinaryComparator(Bytes.toBytes("row-03"))); filters.add(filter1); Filter filter2 = new RowFilter(CompareFilter.CompareOp.LESS_OR_EQUAL, new BinaryComparator(Bytes.toBytes("row-06"))); filters.add(filter2); Filter filter3 = new QualifierFilter(CompareFilter.CompareOp.EQUAL, new RegexStringComparator("col-0[03]")); filters.add(filter3); FilterList filterList1 = new FilterList(filters); Scan scan = new Scan(); scan.setFilter(filterList1); ResultScanner scanner1 = table.getScanner(scan); // ^^ FilterListExample System.out.println("Results of scan #1 - MUST_PASS_ALL:"); int n = 0; // vv FilterListExample for (Result result : scanner1) { for (KeyValue kv : result.raw()) { System.out.println("KV: " + kv + ", Value: " + Bytes.toString(kv.getValue())); // ^^ FilterListExample n++; // vv FilterListExample } } scanner1.close(); FilterList filterList2 = new FilterList( FilterList.Operator.MUST_PASS_ONE, filters); scan.setFilter(filterList2); ResultScanner scanner2 = table.getScanner(scan); // ^^ FilterListExample System.out.println("Total KeyValue count for scan #1: " + n); n = 0; System.out.println("Results of scan #2 - MUST_PASS_ONE:"); // vv FilterListExample for (Result result : scanner2) { for (KeyValue kv : result.raw()) { System.out.println("KV: " + kv + ", Value: " + Bytes.toString(kv.getValue())); // ^^ FilterListExample n++; // vv FilterListExample } } scanner2.close(); // ^^ FilterListExample System.out.println("Total KeyValue count for scan #2: " + n); } }
[ "ocp.wang@gmail.com" ]
ocp.wang@gmail.com
3694822a11efeb5ca693fabeec4bb63e2a358ab0
2d17a89aa086d8d4185f8a35d78549803ddc8808
/src/main/java/snya/reina/rest/dto/IntervencionDTO.java
97ee7bd48db3d4b1097d9bf2a9fcd2d277be0aa7
[]
no_license
berlot83/reina-test
7519010528bb8ddb3ef6de3c20b669aa36cfb58e
9d6d379eafc50eed098dc628644ef634bfd9feb4
refs/heads/master
2022-09-18T15:10:05.981437
2019-10-29T17:36:22
2019-10-29T17:36:22
208,308,976
0
0
null
2022-09-01T23:13:07
2019-09-13T17:00:50
Java
UTF-8
Java
false
false
1,744
java
package snya.reina.rest.dto; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonInclude.Include; @JsonInclude(Include.NON_NULL) public class IntervencionDTO { @JsonProperty(value="Id") private String id; @JsonProperty(value="Detalle_Intervencion") private String detalleIntervencion; @JsonProperty(value="Observaciones") private String observaciones; @JsonProperty(value="Id_Legajo") private String idLegajo; @JsonProperty(value="Fecha") private String fecha; @JsonProperty(value="Zonal") private String zonal; @JsonProperty(value="Local") private String local; @JsonProperty(value="Derivado_Por") private String derivadoPor; @JsonProperty(value="Motivo") private String motivo; @JsonProperty(value="Nombre_Estado") private String nombreEstado; public IntervencionDTO() { } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getFecha() { return fecha; } public void setFecha(String fecha) { this.fecha = fecha; } public String getZonal() { return zonal; } public void setZonal(String zonal) { this.zonal = zonal; } public String getLocal() { return local; } public void setLocal(String local) { this.local = local; } public String getDerivadoPor() { return derivadoPor; } public void setDerivadoPor(String derivadoPor) { this.derivadoPor = derivadoPor; } public String getMotivo() { return motivo; } public void setMotivo(String motivo) { this.motivo = motivo; } public String getNombreEstado() { return nombreEstado; } public void setNombreEstado(String nombreEstado) { this.nombreEstado = nombreEstado; } }
[ "berlot83@yahoo.com.ar" ]
berlot83@yahoo.com.ar
3b1b3f40156bf19f4dcdabb03a9b349b3f9bf254
8435e07bec1afd7c9159da9ef038f7c0cae72469
/src/main/java/com/mrisk/monitoreo/rule/domain/Component.java
6da5c17303d872644fffe3157a3aa88aa7b8cfb7
[]
no_license
eespinozah/monitoreo-rule
2da502e0d8d708a27f724660d87260e0ffb7aef1
4ca058069bf647f8e12575eaae3f37753a0f031a
refs/heads/master
2023-04-15T10:10:42.973318
2021-04-19T20:25:36
2021-04-19T20:25:50
359,575,827
0
0
null
null
null
null
UTF-8
Java
false
false
392
java
package com.mrisk.monitoreo.rule.domain; import java.util.Calendar; import lombok.Data; @Data public class Component { private Integer compId; private String name; private String description; private Boolean alive = Boolean.TRUE; private Calendar creationTime = Calendar.getInstance(); private Calendar modificationTime; private Calendar destructionTime; }
[ "eespinoza@mrisk.com" ]
eespinoza@mrisk.com
7da6ab09ae720169ff29a06f359527157823950c
725d4bb86564b5d224224b14978af6802aeed32a
/MarchEvening9PMBatch/src/com/verifications/TC_006.java
0fc8aa68564b0d3a391d749cd37381a7ab7dd313
[]
no_license
ravilella1234/marchEvening9PMRepo
b175b3f077fd27969028fb7ff73e8e8d1aefc30a
bb0614c2614035086a4c631c67f44f0b70b344c3
refs/heads/master
2022-07-11T15:00:17.950999
2020-04-24T16:24:13
2020-04-24T16:24:13
248,021,487
0
0
null
2020-10-13T21:03:26
2020-03-17T16:39:11
HTML
UTF-8
Java
false
false
1,196
java
package com.verifications; import org.openqa.selenium.By; import com.launchings.BaseTest; import com.relevantcodes.extentreports.LogStatus; public class TC_006 extends BaseTest { public static void main(String[] args) throws Exception { init(); test=report.startTest("TC_006"); test.log(LogStatus.INFO, "Initializing properties files....."); openBrowser("chromebrowser"); test.log(LogStatus.INFO, "Opened the Browser :- " + p.getProperty("chromebrowser")); navigateUrl("amazonurl"); test.log(LogStatus.INFO, "Navigated to url :- " + subprop.getProperty("amazonurl")); //String actualLink = driver.findElement(By.linkText("Customer Service")).getText(); String actualLink = driver.findElement(By.linkText("Customer Service")).getAttribute("innerHTML"); String expectedLink="Customer Ser"; System.out.println("ActualLink is :-" + actualLink); System.out.println("ExpectedLink is :-" + expectedLink); //if(actualLink.equals(expectedLink)) //if(actualLink.equalsIgnoreCase(expectedLink)) if(actualLink.contains(expectedLink)) System.out.println("Both links are equal..."); else System.out.println("Both links are not equal..."); } }
[ "maha@gmail.com" ]
maha@gmail.com
040371dd96f8991823984de21b2d45d22f8fef5e
593391c8f6fc4a4675b56b2c34fe7146e1a7b253
/devops-query/src/test/java/com/scw/devops/query/controller/response/ProductDefTest.java
1498763654533e2fcc248cfcaac61f8021422883
[]
no_license
elvis197686/deployment-agnostic-example-project
02c8578e445ab58c64fa75ba2d697c0df8b8318b
b1029d5e70bb1d029995567307188fd8f5d36202
refs/heads/master
2022-12-04T07:35:50.296898
2020-04-26T09:08:19
2020-04-26T09:08:19
250,492,905
0
0
null
2022-11-16T00:59:31
2020-03-27T09:30:17
Java
UTF-8
Java
false
false
4,018
java
package com.scw.devops.query.controller.response; import java.util.Arrays; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.junit.jupiter.api.Test; import org.skyscreamer.jsonassert.JSONAssert; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.scw.devops.query.controller.response.ApplicationAlias; import com.scw.devops.query.controller.response.ApplicationDef; import com.scw.devops.query.controller.response.ConfigurationErrorData; import com.scw.devops.query.controller.response.EnvironmentDef; import com.scw.devops.query.controller.response.ProductDef; public class ProductDefTest { private static final String A_NAME = "A name"; private static final String A_VERSION = "0.1.0"; private static final String AN_ERROR = "An error"; private static final String A_SOURCE_REPOSITORY = "http://example/it.git"; private static final String A_CLASS_NAME = "aClass"; private static final String AN_APPLICATION_ALIAS = "appAlias"; private static final String AN_APPLICATION_NAME = "appName"; private static final String AN_APPLICATION_VERSION = "0.3.0"; private static final String AN_APPLICATION_RUNTIME = "JAVA_11"; private static final String AN_APPLICATION_IMAGE_REF = "abc/gef"; private static final String A_DEFINITION_NAME = "Another name"; @Test // @Ignore("It is failing to match the Json, even thriough they appear to be // matching") public void shouldSerialiseToJson() throws JsonProcessingException, JSONException { JSONObject expectedJson = getExpectedJson(); String actualJson = new ObjectMapper().writeValueAsString(getExampleObject()); JSONAssert.assertEquals("Expected deserialised json does not match actual json", expectedJson.toString(), actualJson, false); } private ProductDef getExampleObject() { return new ProductDef(A_NAME, A_VERSION, A_CLASS_NAME, A_SOURCE_REPOSITORY, Arrays.asList(getExampleEnvironmentObject()), Arrays.asList(getExampleApplicationObject()), new ConfigurationErrorData(AN_ERROR)); } private EnvironmentDef getExampleEnvironmentObject() { return new EnvironmentDef(A_DEFINITION_NAME, "Any version", true, "Any source repo", null); } private ApplicationAlias getExampleApplicationObject() { return new ApplicationAlias(AN_APPLICATION_ALIAS, new ApplicationDef(AN_APPLICATION_NAME, AN_APPLICATION_VERSION, A_SOURCE_REPOSITORY, AN_APPLICATION_IMAGE_REF, AN_APPLICATION_RUNTIME, null)); } private JSONObject getExpectedJson() throws JsonProcessingException, JSONException { JSONObject expectedEnvironmentDefinition = new JSONObject(); expectedEnvironmentDefinition.put("name", A_DEFINITION_NAME); JSONArray expectedEnvironmentDefinitions = new JSONArray(); expectedEnvironmentDefinitions.put(expectedEnvironmentDefinition); JSONObject expectedApplicationDefinition = new JSONObject(); expectedApplicationDefinition.put("name", AN_APPLICATION_NAME); expectedApplicationDefinition.put("version", AN_APPLICATION_VERSION); expectedApplicationDefinition.put("sourceRepository", A_SOURCE_REPOSITORY); expectedApplicationDefinition.put("imageRepository", AN_APPLICATION_IMAGE_REF); expectedApplicationDefinition.put("runtime", AN_APPLICATION_RUNTIME); JSONObject expectedApplicationAlias = new JSONObject(); expectedApplicationAlias.put("alias", AN_APPLICATION_ALIAS); expectedApplicationAlias.put("definition", expectedApplicationDefinition); JSONArray expectedApplicationAliases = new JSONArray(); expectedApplicationAliases.put(expectedApplicationAlias); JSONObject expectedJson = new JSONObject(); expectedJson.put("name", A_NAME); expectedJson.put("version", A_VERSION); expectedJson.put("productClass", A_CLASS_NAME); expectedJson.put("sourceRepository", A_SOURCE_REPOSITORY); expectedJson.put("deployToEnvironments", expectedEnvironmentDefinitions); expectedJson.put("aliasedAppDefs", expectedApplicationAliases); return expectedJson; } }
[ "steve.watson@soprabanking.com" ]
steve.watson@soprabanking.com
8cf8dd14c1deab16279651d5360ee0eb6312db51
2acd17a259215240128abc08e58700f987bfe3c1
/AnimeBook/app/src/main/java/com/example/animebook/DetailActivity.java
1ae66dc1b30cd68dced871e3dd2b038f2a222ece
[]
no_license
codepath-android-group-project/group-project
52d994a6480d45a476a68c4daa8ecaafbe5495ed
824861bc050be70dc27290ce14b307a49924484f
refs/heads/main
2023-05-06T02:29:56.012717
2021-05-26T03:49:51
2021-05-26T03:49:51
357,724,387
0
1
null
2021-05-26T03:45:35
2021-04-14T00:22:59
Java
UTF-8
Java
false
false
6,047
java
package com.example.animebook; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.os.Bundle; import android.util.Log; import android.widget.ImageView; import android.widget.TextView; import com.codepath.asynchttpclient.AsyncHttpClient; import com.codepath.asynchttpclient.RequestHeaders; import com.codepath.asynchttpclient.RequestParams; import com.codepath.asynchttpclient.callback.JsonHttpResponseHandler; import com.example.animebook.adapters.AnimeListAdapter; import com.example.animebook.adapters.GenreAdapter; import com.example.animebook.adapters.ReviewsAdapter; import com.example.animebook.models.DetailAnime; import com.example.animebook.models.Review; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.List; import okhttp3.Headers; public class DetailActivity extends AppCompatActivity { public static final String TAG = "DetailActivity"; public static final String Url = "https://graphql.anilist.co"; public static final String ARG_ID = "argID"; private int animeID; private AsyncHttpClient client; protected AnimeListAdapter animeListAdapter; private RecyclerView rvReviews; private RecyclerView rvGenres; private List<String> genres; private List<Review> reviews; private ImageView ivPoster; private TextView tvTitle; private TextView tvDescription; private GenreAdapter genreAdapter; private ReviewsAdapter reviewsAdapter; public static final String query = "query ( $id: Int) {\n" + " Page(page: 1, perPage: 1) {\n" + " media(id: $id) {\n" + " id\n" + " title {\n" + " english\n" + " romaji\n" + " }\n" + " description(asHtml: true)\n" + " genres\n" + " bannerImage\n" + " reviews(sort: UPDATED_AT_DESC, page: 1, perPage: 8) {\n" + " edges {\n" + " node {\n" + " id\n" + " score\n" + " summary\n" + " user {\n" + " id\n" + " name\n" + " }\n" + " }\n" + " }\n" + " }\n" + " }\n" + " }\n" + "}\n"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_detail); animeID = getIntent().getIntExtra("ID", 0); genres = new ArrayList<String>(); reviews = new ArrayList<Review>(); client = new AsyncHttpClient(); rvGenres = findViewById(R.id.rvGenres); rvReviews = findViewById(R.id.rvReviews); ivPoster = findViewById(R.id.ivPoster); tvTitle = findViewById(R.id.tvTitle); tvDescription = findViewById(R.id.tvDescription); genreAdapter = new GenreAdapter(this, genres); rvGenres.setAdapter(genreAdapter); LinearLayoutManager horizontalLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false); rvGenres.setLayoutManager(horizontalLayoutManager); reviewsAdapter = new ReviewsAdapter(this, reviews); rvReviews.setAdapter(reviewsAdapter); LinearLayoutManager verticalLayoutManager = new LinearLayoutManager(this); rvReviews.setLayoutManager(verticalLayoutManager); try { JSONObject variables = new JSONObject().put("id", animeID); Log.i(TAG, variables.toString(1)); sendRequest(query, variables, false); } catch (JSONException e) { e.printStackTrace(); } } public void sendRequest(String query, JSONObject variables, boolean notify){ try{ JSONObject body = new JSONObject().put("query", query).put("variables", variables); RequestHeaders requestHeaders = new RequestHeaders(); requestHeaders.put("Content-Type", "application/json"); requestHeaders.put("Accept", "application/json"); RequestParams params = new RequestParams(); client.post(Url, requestHeaders, params, body.toString(), new JsonHttpResponseHandler() { @Override public void onSuccess(int i, Headers headers, JSON json) { // Log.i(TAG, json.toString()); try { JSONObject jsonObject = json.jsonObject; // Log.i(TAG, jsonObject.toString()); JSONObject results = jsonObject.getJSONObject("data").getJSONObject("Page").getJSONArray("media").getJSONObject(0); Log.i(TAG, results.toString(2)); DetailAnime detailedAnime= new DetailAnime(results); bindDetails(detailedAnime); genreAdapter.addAll(detailedAnime.getGenres()); reviewsAdapter.addAll(detailedAnime.getReviews(), true); } catch (JSONException e) { e.printStackTrace(); } } @Override public void onFailure(int i, Headers headers, String s, Throwable throwable) { Log.i(TAG, "request failed: " + s); } }); } catch (JSONException e){ e.printStackTrace(); } } private void bindDetails(DetailAnime detailedAnime){ getSupportActionBar().setTitle(detailedAnime.getTitle()); tvTitle.setText(detailedAnime.getTitle()); tvDescription.setText(detailedAnime.getDescription()); GlideApp.with(this).load(detailedAnime.getPosterPath()).centerCrop().into(ivPoster); } }
[ "abidh0601@gmail.com" ]
abidh0601@gmail.com
1079cd83d54fece42747e38ab10cb3f4dabc69e4
7b2608866e9422fa40b8556b5fffd45050bc0ddc
/.svn/pristine/10/1079cd83d54fece42747e38ab10cb3f4dabc69e4.svn-base
32af23e327d922ff427cbcd8f08a6ba88f15cd6c
[]
no_license
adcoolguy/ksstoolkit
4e362583c77ec0bb5c46ef347b715b89b4988a87
e65039ed875603400c5331d25d96ad1e13b2a779
refs/heads/master
2021-01-15T23:30:44.577440
2015-06-26T01:09:35
2015-06-26T01:09:35
38,082,940
0
0
null
null
null
null
UTF-8
Java
false
false
84
package com.google.code.kss.tool.common; public enum AxisPlane { X, Y }
[ "you@example.com" ]
you@example.com
edb9b9e632641bb9183d9becac35666b1678491a
584f5e6f4e34a5d825b8fd8c1f9638b720821c7e
/ibdata-avro-types/src/test/java/org/infrastructurebuilder/data/DefaultAvroIBTypedRecordDataStreamSupplierTest.java
ee60c6001ea11dbbc354c05148a277c6d8528415
[]
no_license
infrastructurebuilder/ibdata-reference-root
9569412a373391c235fc86f46db3c9a6ba31917b
81596be310810cde1f8c6389d3cca3df0fa784b0
refs/heads/master
2021-06-21T12:59:08.133839
2019-12-23T16:40:50
2019-12-23T16:40:50
209,095,274
0
0
null
null
null
null
UTF-8
Java
false
false
2,929
java
/** * Copyright © 2019 admin (admin@infrastructurebuilder.org) * * 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.infrastructurebuilder.data; import static org.junit.Assert.assertEquals; import java.io.InputStream; import java.nio.file.Path; import java.util.Date; import java.util.List; import java.util.Optional; import java.util.UUID; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.avro.Schema; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.infrastructurebuilder.data.model.DataStream; import org.infrastructurebuilder.data.transform.BA; import org.infrastructurebuilder.util.config.TestingPathSupplier; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; public class DefaultAvroIBTypedRecordDataStreamSupplierTest { public static final String CHECKSUM = "3b2c63ccb53069e8b0472ba50053fcae7d1cc84ef774ff2b01c8a0658637901b7d91e71534243b5d29ee246e925efb985b4dbd7330ab1ab251d1e1b8848b9c49"; private static final String LOAD1 = "ba.avro"; public final static TestingPathSupplier wps = new TestingPathSupplier(); @BeforeClass public static void setUpBeforeClass() throws Exception { } @AfterClass public static void tearDownAfterClass() throws Exception { wps.finalize(); } private DefaultAvroIBTypedRecordDataStreamSupplier<BA> q; private Path targetPath; private IBDataStream stream; private boolean parallel; private Schema schema; private InputStream ins; private DataStream id; @Before public void setUp() throws Exception { targetPath = wps.get(); ins = getClass().getResourceAsStream(LOAD1); id = new DataStream(); id.setUuid(UUID.randomUUID().toString()); id.setCreationDate(new Date()); id.setSha512(CHECKSUM); id.setMetadata(new Xpp3Dom("metadata")); stream = new DefaultIBDataStream(id, wps.getTestClasses().resolve(LOAD1)); schema = IBDataAvroUtils.avroSchemaFromString.apply(wps.getTestClasses().resolve("ba.avsc").toAbsolutePath().toString()); q = new DefaultAvroIBTypedRecordDataStreamSupplier<BA>(targetPath, stream, new BA().getSpecificData(), parallel); } @After public void tearDown() throws Exception { } @Test public void testGet() { Stream<BA> p = q.get(); List<BA> l2 = p.collect(Collectors.toList()); assertEquals(5000, l2.size()); } }
[ "mykel.alvis@gmail.com" ]
mykel.alvis@gmail.com
0e70ae93da08171319ccbefb262951ed5c477390
dda001436a70c67250b6cf01ea8530a8c96629ef
/Character_Main/src/main/java/net/sf/anathema/character/main/library/trait/rules/TraitRules.java
279d61236a548bfc5bf28c40b898c5c824b5b1eb
[]
no_license
curttasker/anathema
6e423fa5e4bc4825a6431b652955adc5bcc4750f
3d57baffca193e409144023ef9a82d27dfbd8803
refs/heads/master
2020-12-24T16:59:35.339668
2014-03-21T21:17:45
2014-03-21T21:18:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,144
java
package net.sf.anathema.character.main.library.trait.rules; import com.google.common.base.Preconditions; import net.sf.anathema.character.main.traits.ITraitTemplate; import net.sf.anathema.character.main.traits.LowerableState; import net.sf.anathema.character.main.traits.TraitType; import net.sf.anathema.hero.model.Hero; import net.sf.anathema.lib.data.Range; public class TraitRules implements ITraitRules { private int capModifier = 0; private final ITraitTemplate template; private final TraitType traitType; private Range modifiedCreationRange; private Hero hero; public TraitRules(TraitType traitType, ITraitTemplate template, Hero hero) { Preconditions.checkNotNull(traitType, "TemplateType must not be null."); Preconditions.checkNotNull(template, "Template must not be null."); this.traitType = traitType; this.hero = hero; this.template = template; } @Override public int getAbsoluteMaximumValue() { return template.getLimitation().getAbsoluteLimit(hero); } private int getCreationMaximumValue() { if (modifiedCreationRange == null) { return getCurrentMaximumValue(true); } return modifiedCreationRange.getUpperBound(); } @Override public int getCurrentMaximumValue(boolean modified) { return template.getLimitation().getCurrentMaximum(hero, modified) + (modified ? capModifier : 0); } @Override public int getAbsoluteMinimumValue() { if (modifiedCreationRange == null) { return template.getMinimumValue(hero); } return modifiedCreationRange.getLowerBound(); } @Override public int getCalculationMinValue() { return template.getCalculationMinValue(hero, traitType); } @Override public int getStartValue() { return template.getStartValue(); } @Override public void setCapModifier(int modifier) { capModifier = modifier; } @Override public boolean isLowerable() { LowerableState lowerableState = template.getLowerableState(); return lowerableState != LowerableState.Default && lowerableState != LowerableState.Immutable; } @Override public int getZeroCalculationCost() { return template.getZeroLevelValue(); } protected final ITraitTemplate getTemplate() { return template; } @Override public TraitType getType() { return traitType; } @Override public void setModifiedCreationRange(Range range) { this.modifiedCreationRange = range; } @Override public int getExperiencedValue(int creationValue, int demandedValue) { Range range; int maximumValue = getCurrentMaximumValue(true); if (isLowerable()) { range = new Range(getAbsoluteMinimumValue(), maximumValue); } else { boolean isImmutable = template.getLowerableState() == LowerableState.Immutable; range = new Range(Math.max(Math.min(creationValue, maximumValue), getAbsoluteMinimumValue()), isImmutable ? creationValue : maximumValue); } int correctedValue = getCorrectedValue(demandedValue, range); if (isLowerable()) { return correctedValue; } return correctedValue; //the purpose for the below is unclear... hopefully it is safe to remove //return correctedValue <= creationValue ? ITraitRules.UNEXPERIENCED : correctedValue; } @Override public int getCreationValue(int demandedValue) { Range currentCreationPointRange = new Range(getAbsoluteMinimumValue(), getCreationMaximumValue()); return getCorrectedValue(demandedValue, currentCreationPointRange); } private int getCorrectedValue(int value, Range allowedRange) { if (allowedRange.contains(value)) { return value; } if (value < allowedRange.getLowerBound()) { return allowedRange.getLowerBound(); } return allowedRange.getUpperBound(); } @Override public int getExperienceCalculationValue(int creationValue, int experiencedValue, int currentValue) { if (template.getLowerableState() == LowerableState.LowerableRegain) { if (experiencedValue == UNEXPERIENCED) { return creationValue; } return currentValue; } return Math.max(currentValue, creationValue); } }
[ "sandra.sieroux@googlemail.com" ]
sandra.sieroux@googlemail.com
f5b3c136264a505d48a3de9359ae156cc6aa7525
f4f9387e9a45494e3063260e19eed8076c643d46
/wyxyd-rest/.svn/pristine/f5/f5b3c136264a505d48a3de9359ae156cc6aa7525.svn-base
3c48a98616b9116ff716b69865aebfcd590503b7
[ "MIT" ]
permissive
shawncai/houtaiguanli
8df6ad4511c732538865240c97f56d4ce24354e3
f50cda14af87e25d78fcb9d7ed9a38ffc895b688
refs/heads/master
2020-03-30T07:12:58.572779
2018-09-30T03:16:38
2018-09-30T03:16:38
150,923,412
0
0
null
null
null
null
UTF-8
Java
false
false
182
package wy.rest.addons.zcgl.cpn_branch.service; /** * 企业分支机构Service * * @author wyframe * @Date 2017-09-18 11:22:47 */ public interface IXyd_cpn_branchService { }
[ "784836221@qq.com" ]
784836221@qq.com
1711250f6d24a4010a25a55fe6ef858f8b3cdc2a
77623d6dd90f2d1a401ee720adb41c3c0c264715
/DiffTGen-result/output/Closure_62_simfix/target/0/14/evosuite-tests/com/google/javascript/jscomp/LightweightMessageFormatter_ESTest.java
83ec7c2734104908c17fa3200e9efb57e6717c39
[]
no_license
wuhongjun15/overfitting-study
40be0f062bbd6716d8de6b06454b8c73bae3438d
5093979e861cda6575242d92ca12355a26ca55e0
refs/heads/master
2021-04-17T05:37:48.393527
2020-04-11T01:53:53
2020-04-11T01:53:53
249,413,962
0
0
null
null
null
null
UTF-8
Java
false
false
97,588
java
/* * This file was automatically generated by EvoSuite * Tue Mar 10 13:39:26 GMT 2020 */ package com.google.javascript.jscomp; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import com.google.javascript.jscomp.CheckLevel; import com.google.javascript.jscomp.Compiler; import com.google.javascript.jscomp.ControlStructureCheck; import com.google.javascript.jscomp.DiagnosticType; import com.google.javascript.jscomp.JSError; import com.google.javascript.jscomp.JSModule; import com.google.javascript.jscomp.LightweightMessageFormatter; import com.google.javascript.jscomp.ProcessClosurePrimitives; import com.google.javascript.jscomp.Region; import com.google.javascript.jscomp.ScopedAliases; import com.google.javascript.jscomp.SimpleRegion; import com.google.javascript.jscomp.SourceExcerptProvider; import java.io.PrintStream; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true) public class LightweightMessageFormatter_ESTest extends LightweightMessageFormatter_ESTest_scaffolding { //Test case number: 0 /* * 56 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch * Goal 3. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false * Goal 4. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I35 Branch 8 IFNULL L75 - false * Goal 5. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I47 Branch 9 IFLE L77 - true * Goal 6. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I72 Branch 10 IFEQ L84 - true * Goal 7. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I103 Branch 11 IFNULL L89 - true * Goal 8. Branch com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch in context: com.google.javascript.jscomp.LightweightMessageFormatter:formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 9. Branch com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch in context: * Goal 10. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false in context: * Goal 11. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I35 Branch 8 IFNULL L75 - false in context: * Goal 12. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I47 Branch 9 IFLE L77 - true in context: * Goal 13. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I72 Branch 10 IFEQ L84 - true in context: * Goal 14. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I103 Branch 11 IFNULL L89 - true in context: * Goal 15. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 40 * Goal 16. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 41 * Goal 17. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 68 * Goal 18. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 69 * Goal 19. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 74 * Goal 20. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 75 * Goal 21. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 76 * Goal 22. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 77 * Goal 23. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 81 * Goal 24. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 84 * Goal 25. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 85 * Goal 26. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 87 * Goal 27. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 88 * Goal 28. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 89 * Goal 29. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 120 * Goal 30. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: Line 59 * Goal 31. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: Line 55 * Goal 32. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 33. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 34. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 35. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 36. Weak Mutation 66: com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;:59 - ReplaceConstant - 0 -> 1 * Goal 37. Weak Mutation 68: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:69 - ReplaceComparisonOperator != null -> = null * Goal 38. Weak Mutation 72: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:75 - ReplaceComparisonOperator = null -> != null * Goal 39. Weak Mutation 73: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - InsertUnaryOp Negation * Goal 40. Weak Mutation 74: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - InsertUnaryOp +1 * Goal 41. Weak Mutation 75: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - InsertUnaryOp -1 * Goal 42. Weak Mutation 77: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - ReplaceComparisonOperator <= -> == * Goal 43. Weak Mutation 87: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:81 - ReplaceConstant - : -> * Goal 44. Weak Mutation 88: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp Negation * Goal 45. Weak Mutation 89: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp IINC 1 * Goal 46. Weak Mutation 90: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp IINC -1 * Goal 47. Weak Mutation 91: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - ReplaceComparisonOperator == -> != * Goal 48. Weak Mutation 92: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:85 - ReplaceConstant - - -> * Goal 49. Weak Mutation 93: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 0 * Goal 50. Weak Mutation 94: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 1 * Goal 51. Weak Mutation 95: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> -1 * Goal 52. Weak Mutation 96: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 9 * Goal 53. Weak Mutation 97: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 11 * Goal 54. Weak Mutation 98: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:89 - ReplaceComparisonOperator = null -> != null * Goal 55. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;:nonnull * Goal 56. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;:nonnull */ @Test public void test00() throws Throwable { LightweightMessageFormatter lightweightMessageFormatter0 = LightweightMessageFormatter.withoutSource(); CheckLevel checkLevel0 = CheckLevel.OFF; DiagnosticType diagnosticType0 = ControlStructureCheck.USE_OF_WITH; String[] stringArray0 = new String[2]; JSError jSError0 = JSError.make("}\"aAj%I!(@qS}!", (-1084), (-1084), checkLevel0, diagnosticType0, stringArray0); String string0 = lightweightMessageFormatter0.formatError(jSError0); } //Test case number: 1 /* * 7 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;Lcom/google/javascript/jscomp/SourceExcerptProvider$SourceExcerpt;)V: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;)V: root-Branch * Goal 3. <init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;)V_java.lang.NullPointerException_EXPLICIT * Goal 4. com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;Lcom/google/javascript/jscomp/SourceExcerptProvider$SourceExcerpt;)V: Line 50 * Goal 5. com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;)V * Goal 6. com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;Lcom/google/javascript/jscomp/SourceExcerptProvider$SourceExcerpt;)V * Goal 7. com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;Lcom/google/javascript/jscomp/SourceExcerptProvider$SourceExcerpt;)V */ @Test public void test01() throws Throwable { SourceExcerptProvider sourceExcerptProvider0 = null; LightweightMessageFormatter lightweightMessageFormatter0 = null; try { lightweightMessageFormatter0 = new LightweightMessageFormatter((SourceExcerptProvider) null); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // assertThrownBy("com.google.common.base.Preconditions", e); } } //Test case number: 2 /* * 2 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;)V * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;)V */ @Test public void test02() throws Throwable { Compiler compiler0 = null; try { compiler0 = new Compiler((PrintStream) null); } catch(NoSuchMethodError e) { // // com.google.common.collect.ImmutableSet.of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet; // assertThrownBy("com.google.javascript.jscomp.ClosureCodingConvention", e); } } //Test case number: 3 /* * 102 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.<init>()V: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I3 Branch 1 IFNONNULL L136 - true * Goal 3. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I17 Branch 2 IFNE L140 - true * Goal 4. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I60 Branch 3 IFLT L153 - false * Goal 5. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I64 Branch 4 IFGE L156 - true * Goal 6. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I64 Branch 4 IFGE L156 - false * Goal 7. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I75 Branch 5 IFNE L158 - false * Goal 8. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I130 Branch 6 IFGE L173 - true * Goal 9. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.<init>()V: root-Branch in context: * Goal 10. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I3 Branch 1 IFNONNULL L136 - true in context: * Goal 11. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I17 Branch 2 IFNE L140 - true in context: * Goal 12. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I60 Branch 3 IFLT L153 - false in context: * Goal 13. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I64 Branch 4 IFGE L156 - true in context: * Goal 14. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I64 Branch 4 IFGE L156 - false in context: * Goal 15. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I75 Branch 5 IFNE L158 - false in context: * Goal 16. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I130 Branch 6 IFGE L173 - true in context: * Goal 17. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 136 * Goal 18. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 139 * Goal 19. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 140 * Goal 20. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 145 * Goal 21. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 146 * Goal 22. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 149 * Goal 23. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 150 * Goal 24. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 151 * Goal 25. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 152 * Goal 26. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 153 * Goal 27. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 156 * Goal 28. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 157 * Goal 29. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 158 * Goal 30. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 159 * Goal 31. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 162 * Goal 32. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 164 * Goal 33. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 167 * Goal 34. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 168 * Goal 35. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 169 * Goal 36. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 170 * Goal 37. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 173 * Goal 38. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 177 * Goal 39. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 178 * Goal 40. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 179 * Goal 41. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 180 * Goal 42. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 181 * Goal 43. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 183 * Goal 44. Weak Mutation 0: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:136 - ReplaceComparisonOperator != null -> = null * Goal 45. Weak Mutation 2: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:140 - ReplaceComparisonOperator != -> < * Goal 46. Weak Mutation 4: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceConstant - 2 -> 0 * Goal 47. Weak Mutation 5: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceConstant - 2 -> 1 * Goal 48. Weak Mutation 6: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceConstant - 2 -> -1 * Goal 49. Weak Mutation 7: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceConstant - 2 -> 3 * Goal 50. Weak Mutation 8: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceArithmeticOperator * -> + * Goal 51. Weak Mutation 9: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceArithmeticOperator * -> % * Goal 52. Weak Mutation 10: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceArithmeticOperator * -> - * Goal 53. Weak Mutation 11: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceArithmeticOperator * -> / * Goal 54. Weak Mutation 12: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:150 - ReplaceConstant - 0 -> 1 * Goal 55. Weak Mutation 13: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - ReplaceConstant - 10 -> 0 * Goal 56. Weak Mutation 14: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - ReplaceConstant - 10 -> 1 * Goal 57. Weak Mutation 15: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - ReplaceConstant - 10 -> -1 * Goal 58. Weak Mutation 16: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - ReplaceConstant - 10 -> 9 * Goal 59. Weak Mutation 17: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - ReplaceConstant - 10 -> 11 * Goal 60. Weak Mutation 18: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - InsertUnaryOp Negation * Goal 61. Weak Mutation 19: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - InsertUnaryOp IINC 1 * Goal 62. Weak Mutation 20: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - InsertUnaryOp IINC -1 * Goal 63. Weak Mutation 21: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:153 - InsertUnaryOp Negation * Goal 64. Weak Mutation 22: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:153 - InsertUnaryOp IINC 1 * Goal 65. Weak Mutation 23: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:153 - InsertUnaryOp IINC -1 * Goal 66. Weak Mutation 25: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:153 - ReplaceComparisonOperator < -> != * Goal 67. Weak Mutation 26: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:153 - ReplaceComparisonOperator < -> <= * Goal 68. Weak Mutation 27: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:156 - InsertUnaryOp Negation * Goal 69. Weak Mutation 28: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:156 - InsertUnaryOp IINC 1 * Goal 70. Weak Mutation 29: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:156 - InsertUnaryOp IINC -1 * Goal 71. Weak Mutation 30: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:156 - ReplaceComparisonOperator >= -> -1 * Goal 72. Weak Mutation 31: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:156 - ReplaceComparisonOperator >= -> == * Goal 73. Weak Mutation 33: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:157 - InsertUnaryOp Negation * Goal 74. Weak Mutation 34: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:157 - InsertUnaryOp IINC 1 * Goal 75. Weak Mutation 35: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:157 - InsertUnaryOp IINC -1 * Goal 76. Weak Mutation 36: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:158 - ReplaceComparisonOperator != -> -1 * Goal 77. Weak Mutation 39: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:159 - ReplaceConstant - 0 -> 1 * Goal 78. Weak Mutation 40: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:159 - ReplaceConstant - 1 -> 0 * Goal 79. Weak Mutation 41: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:159 - ReplaceArithmeticOperator - -> + * Goal 80. Weak Mutation 42: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:159 - ReplaceArithmeticOperator - -> % * Goal 81. Weak Mutation 43: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:159 - ReplaceArithmeticOperator - -> * * Goal 82. Weak Mutation 44: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:159 - ReplaceArithmeticOperator - -> / * Goal 83. Weak Mutation 45: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:162 - InsertUnaryOp Negation * Goal 84. Weak Mutation 46: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:162 - InsertUnaryOp IINC 1 * Goal 85. Weak Mutation 47: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:162 - InsertUnaryOp IINC -1 * Goal 86. Weak Mutation 48: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:162 - InsertUnaryOp Negation * Goal 87. Weak Mutation 49: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:162 - InsertUnaryOp IINC 1 * Goal 88. Weak Mutation 50: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:162 - InsertUnaryOp IINC -1 * Goal 89. Weak Mutation 51: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:164 - ReplaceConstant - -> * Goal 90. Weak Mutation 52: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp Negation * Goal 91. Weak Mutation 53: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp IINC 1 * Goal 92. Weak Mutation 54: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp IINC -1 * Goal 93. Weak Mutation 55: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp Negation * Goal 94. Weak Mutation 56: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp IINC 1 * Goal 95. Weak Mutation 57: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp IINC -1 * Goal 96. Weak Mutation 58: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - ReplaceArithmeticOperator - -> + * Goal 97. Weak Mutation 60: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - ReplaceArithmeticOperator - -> * * Goal 98. Weak Mutation 61: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - ReplaceArithmeticOperator - -> / * Goal 99. Weak Mutation 62: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:168 - ReplaceConstant - -> * Goal 100. Weak Mutation 63: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:168 - InsertUnaryOp Negation * Goal 101. Weak Mutation 64: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:168 - InsertUnaryOp IINC 1 * Goal 102. Weak Mutation 65: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:168 - InsertUnaryOp IINC -1 */ @Test public void test03() throws Throwable { LightweightMessageFormatter.LineNumberingFormatter lightweightMessageFormatter_LineNumberingFormatter0 = new LightweightMessageFormatter.LineNumberingFormatter(); SimpleRegion simpleRegion0 = new SimpleRegion((-2870), (-2870), " (CLASS)\n"); String string0 = lightweightMessageFormatter_LineNumberingFormatter0.formatRegion(simpleRegion0); } //Test case number: 4 /* * 12 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.<init>()V: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I3 Branch 1 IFNONNULL L136 - true * Goal 3. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I17 Branch 2 IFNE L140 - false * Goal 4. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.<init>()V: root-Branch in context: * Goal 5. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I3 Branch 1 IFNONNULL L136 - true in context: * Goal 6. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I17 Branch 2 IFNE L140 - false in context: * Goal 7. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 136 * Goal 8. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 139 * Goal 9. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 140 * Goal 10. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 141 * Goal 11. Weak Mutation 0: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:136 - ReplaceComparisonOperator != null -> = null * Goal 12. Weak Mutation 1: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:140 - ReplaceComparisonOperator != -> -1 */ @Test public void test04() throws Throwable { LightweightMessageFormatter.LineNumberingFormatter lightweightMessageFormatter_LineNumberingFormatter0 = new LightweightMessageFormatter.LineNumberingFormatter(); SimpleRegion simpleRegion0 = new SimpleRegion(58, (-403), ""); String string0 = lightweightMessageFormatter_LineNumberingFormatter0.formatRegion(simpleRegion0); } //Test case number: 5 /* * 7 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.<init>()V: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I3 Branch 1 IFNONNULL L136 - false * Goal 3. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.<init>()V: root-Branch in context: * Goal 4. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I3 Branch 1 IFNONNULL L136 - false in context: * Goal 5. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 136 * Goal 6. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 137 * Goal 7. Weak Mutation 0: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:136 - ReplaceComparisonOperator != null -> = null */ @Test public void test05() throws Throwable { LightweightMessageFormatter.LineNumberingFormatter lightweightMessageFormatter_LineNumberingFormatter0 = new LightweightMessageFormatter.LineNumberingFormatter(); String string0 = lightweightMessageFormatter_LineNumberingFormatter0.formatRegion((Region) null); } //Test case number: 6 /* * 86 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.<init>()V: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I3 Branch 1 IFNONNULL L136 - true * Goal 3. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I17 Branch 2 IFNE L140 - true * Goal 4. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I60 Branch 3 IFLT L153 - true * Goal 5. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I60 Branch 3 IFLT L153 - false * Goal 6. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I64 Branch 4 IFGE L156 - false * Goal 7. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I75 Branch 5 IFNE L158 - true * Goal 8. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I130 Branch 6 IFGE L173 - false * Goal 9. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.<init>()V: root-Branch in context: * Goal 10. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I3 Branch 1 IFNONNULL L136 - true in context: * Goal 11. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I17 Branch 2 IFNE L140 - true in context: * Goal 12. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I60 Branch 3 IFLT L153 - true in context: * Goal 13. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I60 Branch 3 IFLT L153 - false in context: * Goal 14. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I64 Branch 4 IFGE L156 - false in context: * Goal 15. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I75 Branch 5 IFNE L158 - true in context: * Goal 16. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: I130 Branch 6 IFGE L173 - false in context: * Goal 17. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 136 * Goal 18. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 139 * Goal 19. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 140 * Goal 20. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 145 * Goal 21. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 146 * Goal 22. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 149 * Goal 23. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 150 * Goal 24. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 151 * Goal 25. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 152 * Goal 26. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 153 * Goal 27. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 156 * Goal 28. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 157 * Goal 29. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 158 * Goal 30. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 164 * Goal 31. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 167 * Goal 32. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 168 * Goal 33. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 169 * Goal 34. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 170 * Goal 35. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 173 * Goal 36. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 174 * Goal 37. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 175 * Goal 38. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 183 * Goal 39. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;: Line 184 * Goal 40. Weak Mutation 0: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:136 - ReplaceComparisonOperator != null -> = null * Goal 41. Weak Mutation 2: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:140 - ReplaceComparisonOperator != -> < * Goal 42. Weak Mutation 4: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceConstant - 2 -> 0 * Goal 43. Weak Mutation 5: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceConstant - 2 -> 1 * Goal 44. Weak Mutation 6: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceConstant - 2 -> -1 * Goal 45. Weak Mutation 7: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceConstant - 2 -> 3 * Goal 46. Weak Mutation 8: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceArithmeticOperator * -> + * Goal 47. Weak Mutation 9: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceArithmeticOperator * -> % * Goal 48. Weak Mutation 10: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceArithmeticOperator * -> - * Goal 49. Weak Mutation 11: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:149 - ReplaceArithmeticOperator * -> / * Goal 50. Weak Mutation 12: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:150 - ReplaceConstant - 0 -> 1 * Goal 51. Weak Mutation 13: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - ReplaceConstant - 10 -> 0 * Goal 52. Weak Mutation 14: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - ReplaceConstant - 10 -> 1 * Goal 53. Weak Mutation 15: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - ReplaceConstant - 10 -> -1 * Goal 54. Weak Mutation 16: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - ReplaceConstant - 10 -> 9 * Goal 55. Weak Mutation 17: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - ReplaceConstant - 10 -> 11 * Goal 56. Weak Mutation 18: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - InsertUnaryOp Negation * Goal 57. Weak Mutation 19: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - InsertUnaryOp IINC 1 * Goal 58. Weak Mutation 20: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:151 - InsertUnaryOp IINC -1 * Goal 59. Weak Mutation 21: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:153 - InsertUnaryOp Negation * Goal 60. Weak Mutation 22: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:153 - InsertUnaryOp IINC 1 * Goal 61. Weak Mutation 23: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:153 - InsertUnaryOp IINC -1 * Goal 62. Weak Mutation 24: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:153 - ReplaceComparisonOperator < -> -2 * Goal 63. Weak Mutation 26: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:153 - ReplaceComparisonOperator < -> <= * Goal 64. Weak Mutation 27: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:156 - InsertUnaryOp Negation * Goal 65. Weak Mutation 28: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:156 - InsertUnaryOp IINC 1 * Goal 66. Weak Mutation 29: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:156 - InsertUnaryOp IINC -1 * Goal 67. Weak Mutation 30: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:156 - ReplaceComparisonOperator >= -> -1 * Goal 68. Weak Mutation 33: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:157 - InsertUnaryOp Negation * Goal 69. Weak Mutation 34: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:157 - InsertUnaryOp IINC 1 * Goal 70. Weak Mutation 35: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:157 - InsertUnaryOp IINC -1 * Goal 71. Weak Mutation 37: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:158 - ReplaceComparisonOperator != -> < * Goal 72. Weak Mutation 51: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:164 - ReplaceConstant - -> * Goal 73. Weak Mutation 52: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp Negation * Goal 74. Weak Mutation 53: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp IINC 1 * Goal 75. Weak Mutation 54: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp IINC -1 * Goal 76. Weak Mutation 55: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp Negation * Goal 77. Weak Mutation 56: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp IINC 1 * Goal 78. Weak Mutation 57: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - InsertUnaryOp IINC -1 * Goal 79. Weak Mutation 58: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - ReplaceArithmeticOperator - -> + * Goal 80. Weak Mutation 59: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - ReplaceArithmeticOperator - -> % * Goal 81. Weak Mutation 60: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - ReplaceArithmeticOperator - -> * * Goal 82. Weak Mutation 61: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:167 - ReplaceArithmeticOperator - -> / * Goal 83. Weak Mutation 62: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:168 - ReplaceConstant - -> * Goal 84. Weak Mutation 63: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:168 - InsertUnaryOp Negation * Goal 85. Weak Mutation 64: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:168 - InsertUnaryOp IINC 1 * Goal 86. Weak Mutation 65: com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatRegion(Lcom/google/javascript/jscomp/Region;)Ljava/lang/String;:168 - InsertUnaryOp IINC -1 */ @Test public void test06() throws Throwable { LightweightMessageFormatter.LineNumberingFormatter lightweightMessageFormatter_LineNumberingFormatter0 = new LightweightMessageFormatter.LineNumberingFormatter(); SimpleRegion simpleRegion0 = new SimpleRegion(1, 310, " "); String string0 = lightweightMessageFormatter_LineNumberingFormatter0.formatRegion(simpleRegion0); } //Test case number: 7 /* * 66 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch * Goal 3. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false * Goal 4. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I35 Branch 8 IFNULL L75 - false * Goal 5. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I47 Branch 9 IFLE L77 - false * Goal 6. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I72 Branch 10 IFEQ L84 - false * Goal 7. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I103 Branch 11 IFNULL L89 - true * Goal 8. Branch com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch in context: com.google.javascript.jscomp.LightweightMessageFormatter:formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 9. Branch com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch in context: * Goal 10. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false in context: * Goal 11. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I35 Branch 8 IFNULL L75 - false in context: * Goal 12. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I47 Branch 9 IFLE L77 - false in context: * Goal 13. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I72 Branch 10 IFEQ L84 - false in context: * Goal 14. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I103 Branch 11 IFNULL L89 - true in context: * Goal 15. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 40 * Goal 16. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 41 * Goal 17. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 68 * Goal 18. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 69 * Goal 19. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 74 * Goal 20. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 75 * Goal 21. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 76 * Goal 22. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 77 * Goal 23. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 78 * Goal 24. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 79 * Goal 25. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 81 * Goal 26. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 84 * Goal 27. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 85 * Goal 28. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 87 * Goal 29. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 88 * Goal 30. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 89 * Goal 31. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 120 * Goal 32. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: Line 63 * Goal 33. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: Line 55 * Goal 34. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 35. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 36. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 37. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 38. Weak Mutation 67: com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;:63 - ReplaceConstant - 1 -> 0 * Goal 39. Weak Mutation 68: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:69 - ReplaceComparisonOperator != null -> = null * Goal 40. Weak Mutation 72: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:75 - ReplaceComparisonOperator = null -> != null * Goal 41. Weak Mutation 73: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - InsertUnaryOp Negation * Goal 42. Weak Mutation 74: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - InsertUnaryOp +1 * Goal 43. Weak Mutation 75: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - InsertUnaryOp -1 * Goal 44. Weak Mutation 76: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - ReplaceComparisonOperator <= -> -1 * Goal 45. Weak Mutation 79: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:78 - ReplaceConstant - 58 -> 0 * Goal 46. Weak Mutation 80: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:78 - ReplaceConstant - 58 -> 1 * Goal 47. Weak Mutation 81: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:78 - ReplaceConstant - 58 -> -1 * Goal 48. Weak Mutation 82: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:78 - ReplaceConstant - 58 -> 57 * Goal 49. Weak Mutation 83: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:78 - ReplaceConstant - 58 -> 59 * Goal 50. Weak Mutation 84: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:79 - InsertUnaryOp Negation * Goal 51. Weak Mutation 85: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:79 - InsertUnaryOp +1 * Goal 52. Weak Mutation 86: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:79 - InsertUnaryOp -1 * Goal 53. Weak Mutation 87: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:81 - ReplaceConstant - : -> * Goal 54. Weak Mutation 88: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp Negation * Goal 55. Weak Mutation 89: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp IINC 1 * Goal 56. Weak Mutation 90: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp IINC -1 * Goal 57. Weak Mutation 91: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - ReplaceComparisonOperator == -> != * Goal 58. Weak Mutation 92: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:85 - ReplaceConstant - - -> * Goal 59. Weak Mutation 93: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 0 * Goal 60. Weak Mutation 94: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 1 * Goal 61. Weak Mutation 95: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> -1 * Goal 62. Weak Mutation 96: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 9 * Goal 63. Weak Mutation 97: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 11 * Goal 64. Weak Mutation 98: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:89 - ReplaceComparisonOperator = null -> != null * Goal 65. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;:nonnull * Goal 66. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;:nonnull */ @Test public void test07() throws Throwable { LightweightMessageFormatter lightweightMessageFormatter0 = LightweightMessageFormatter.withoutSource(); CheckLevel checkLevel0 = CheckLevel.WARNING; DiagnosticType diagnosticType0 = ScopedAliases.GOOG_SCOPE_REFERENCES_THIS; String[] stringArray0 = new String[2]; JSError jSError0 = JSError.make("Expected a string; found: null", 446, 446, checkLevel0, diagnosticType0, stringArray0); String string0 = lightweightMessageFormatter0.formatWarning(jSError0); } //Test case number: 8 /* * 56 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch * Goal 3. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false * Goal 4. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I35 Branch 8 IFNULL L75 - false * Goal 5. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I47 Branch 9 IFLE L77 - true * Goal 6. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I72 Branch 10 IFEQ L84 - true * Goal 7. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I103 Branch 11 IFNULL L89 - true * Goal 8. Branch com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch in context: com.google.javascript.jscomp.LightweightMessageFormatter:formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 9. Branch com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch in context: * Goal 10. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false in context: * Goal 11. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I35 Branch 8 IFNULL L75 - false in context: * Goal 12. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I47 Branch 9 IFLE L77 - true in context: * Goal 13. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I72 Branch 10 IFEQ L84 - true in context: * Goal 14. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I103 Branch 11 IFNULL L89 - true in context: * Goal 15. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 40 * Goal 16. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 41 * Goal 17. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 68 * Goal 18. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 69 * Goal 19. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 74 * Goal 20. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 75 * Goal 21. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 76 * Goal 22. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 77 * Goal 23. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 81 * Goal 24. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 84 * Goal 25. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 85 * Goal 26. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 87 * Goal 27. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 88 * Goal 28. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 89 * Goal 29. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 120 * Goal 30. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: Line 59 * Goal 31. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: Line 55 * Goal 32. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 33. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 34. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 35. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 36. Weak Mutation 66: com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;:59 - ReplaceConstant - 0 -> 1 * Goal 37. Weak Mutation 68: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:69 - ReplaceComparisonOperator != null -> = null * Goal 38. Weak Mutation 72: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:75 - ReplaceComparisonOperator = null -> != null * Goal 39. Weak Mutation 73: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - InsertUnaryOp Negation * Goal 40. Weak Mutation 74: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - InsertUnaryOp +1 * Goal 41. Weak Mutation 75: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - InsertUnaryOp -1 * Goal 42. Weak Mutation 78: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:77 - ReplaceComparisonOperator <= -> < * Goal 43. Weak Mutation 87: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:81 - ReplaceConstant - : -> * Goal 44. Weak Mutation 88: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp Negation * Goal 45. Weak Mutation 89: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp IINC 1 * Goal 46. Weak Mutation 90: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp IINC -1 * Goal 47. Weak Mutation 91: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - ReplaceComparisonOperator == -> != * Goal 48. Weak Mutation 92: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:85 - ReplaceConstant - - -> * Goal 49. Weak Mutation 93: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 0 * Goal 50. Weak Mutation 94: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 1 * Goal 51. Weak Mutation 95: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> -1 * Goal 52. Weak Mutation 96: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 9 * Goal 53. Weak Mutation 97: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 11 * Goal 54. Weak Mutation 98: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:89 - ReplaceComparisonOperator = null -> != null * Goal 55. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;:nonnull * Goal 56. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;:nonnull */ @Test public void test08() throws Throwable { LightweightMessageFormatter lightweightMessageFormatter0 = LightweightMessageFormatter.withoutSource(); CheckLevel checkLevel0 = CheckLevel.ERROR; DiagnosticType diagnosticType0 = JSModule.CIRCULAR_DEPENDENCY_ERROR; String[] stringArray0 = new String[2]; JSError jSError0 = JSError.make(")", 0, (-2439), checkLevel0, diagnosticType0, stringArray0); String string0 = lightweightMessageFormatter0.formatError(jSError0); } //Test case number: 9 /* * 46 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch * Goal 3. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false * Goal 4. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I35 Branch 8 IFNULL L75 - true * Goal 5. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I72 Branch 10 IFEQ L84 - false * Goal 6. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I103 Branch 11 IFNULL L89 - true * Goal 7. Branch com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch in context: com.google.javascript.jscomp.LightweightMessageFormatter:formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 8. Branch com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch in context: * Goal 9. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false in context: * Goal 10. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I35 Branch 8 IFNULL L75 - true in context: * Goal 11. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I72 Branch 10 IFEQ L84 - false in context: * Goal 12. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I103 Branch 11 IFNULL L89 - true in context: * Goal 13. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 40 * Goal 14. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 41 * Goal 15. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 68 * Goal 16. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 69 * Goal 17. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 74 * Goal 18. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 75 * Goal 19. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 84 * Goal 20. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 85 * Goal 21. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 87 * Goal 22. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 88 * Goal 23. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 89 * Goal 24. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 120 * Goal 25. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: Line 63 * Goal 26. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: Line 55 * Goal 27. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 28. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 29. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 30. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 31. Weak Mutation 67: com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;:63 - ReplaceConstant - 1 -> 0 * Goal 32. Weak Mutation 68: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:69 - ReplaceComparisonOperator != null -> = null * Goal 33. Weak Mutation 72: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:75 - ReplaceComparisonOperator = null -> != null * Goal 34. Weak Mutation 88: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp Negation * Goal 35. Weak Mutation 89: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp IINC 1 * Goal 36. Weak Mutation 90: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - InsertUnaryOp IINC -1 * Goal 37. Weak Mutation 91: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:84 - ReplaceComparisonOperator == -> != * Goal 38. Weak Mutation 92: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:85 - ReplaceConstant - - -> * Goal 39. Weak Mutation 93: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 0 * Goal 40. Weak Mutation 94: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 1 * Goal 41. Weak Mutation 95: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> -1 * Goal 42. Weak Mutation 96: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 9 * Goal 43. Weak Mutation 97: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:88 - ReplaceConstant - 10 -> 11 * Goal 44. Weak Mutation 98: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:89 - ReplaceComparisonOperator = null -> != null * Goal 45. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;:nonnull * Goal 46. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;:nonnull */ @Test public void test09() throws Throwable { LightweightMessageFormatter lightweightMessageFormatter0 = LightweightMessageFormatter.withoutSource(); DiagnosticType diagnosticType0 = ProcessClosurePrimitives.EXPECTED_STRING_ERROR; String[] stringArray0 = new String[8]; JSError jSError0 = JSError.make(diagnosticType0, stringArray0); String string0 = lightweightMessageFormatter0.formatWarning(jSError0); } //Test case number: 10 /* * 21 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch * Goal 3. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false * Goal 4. Branch com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch in context: com.google.javascript.jscomp.LightweightMessageFormatter:formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 5. Branch com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch in context: * Goal 6. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false in context: * Goal 7. formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;_java.lang.NullPointerException_IMPLICIT * Goal 8. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 40 * Goal 9. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 41 * Goal 10. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 68 * Goal 11. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 69 * Goal 12. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 74 * Goal 13. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 75 * Goal 14. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: Line 63 * Goal 15. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: Line 55 * Goal 16. com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 17. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 18. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 19. Weak Mutation 67: com.google.javascript.jscomp.LightweightMessageFormatter.formatWarning(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;:63 - ReplaceConstant - 1 -> 0 * Goal 20. Weak Mutation 68: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:69 - ReplaceComparisonOperator != null -> = null * Goal 21. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;:nonnull */ @Test public void test10() throws Throwable { LightweightMessageFormatter lightweightMessageFormatter0 = LightweightMessageFormatter.withoutSource(); // Undeclared exception! try { lightweightMessageFormatter0.formatWarning((JSError) null); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // assertThrownBy("com.google.javascript.jscomp.LightweightMessageFormatter", e); } } //Test case number: 11 /* * 5 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;Lcom/google/javascript/jscomp/SourceExcerptProvider$SourceExcerpt;)V: root-Branch * Goal 2. Branch com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;Lcom/google/javascript/jscomp/SourceExcerptProvider$SourceExcerpt;)V: root-Branch in context: com.google.javascript.jscomp.LightweightMessageFormatter:<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;Lcom/google/javascript/jscomp/SourceExcerptProvider$SourceExcerpt;)V * Goal 3. <init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;Lcom/google/javascript/jscomp/SourceExcerptProvider$SourceExcerpt;)V_java.lang.NullPointerException_EXPLICIT * Goal 4. com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;Lcom/google/javascript/jscomp/SourceExcerptProvider$SourceExcerpt;)V: Line 50 * Goal 5. com.google.javascript.jscomp.LightweightMessageFormatter.<init>(Lcom/google/javascript/jscomp/SourceExcerptProvider;Lcom/google/javascript/jscomp/SourceExcerptProvider$SourceExcerpt;)V */ @Test public void test11() throws Throwable { SourceExcerptProvider.SourceExcerpt sourceExcerptProvider_SourceExcerpt0 = SourceExcerptProvider.SourceExcerpt.REGION; LightweightMessageFormatter lightweightMessageFormatter0 = null; try { lightweightMessageFormatter0 = new LightweightMessageFormatter((SourceExcerptProvider) null, sourceExcerptProvider_SourceExcerpt0); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // assertThrownBy("com.google.common.base.Preconditions", e); } } //Test case number: 12 /* * 21 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch * Goal 3. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false * Goal 4. Branch com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: root-Branch in context: com.google.javascript.jscomp.LightweightMessageFormatter:formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 5. Branch com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: root-Branch in context: * Goal 6. Branch com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: I8 Branch 7 IFNONNULL L69 - false in context: * Goal 7. formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;_java.lang.NullPointerException_IMPLICIT * Goal 8. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 40 * Goal 9. com.google.javascript.jscomp.LightweightMessageFormatter.<init>()V: Line 41 * Goal 10. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 68 * Goal 11. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 69 * Goal 12. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 74 * Goal 13. com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;: Line 75 * Goal 14. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;: Line 59 * Goal 15. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;: Line 55 * Goal 16. com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String; * Goal 17. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 18. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter; * Goal 19. Weak Mutation 66: com.google.javascript.jscomp.LightweightMessageFormatter.formatError(Lcom/google/javascript/jscomp/JSError;)Ljava/lang/String;:59 - ReplaceConstant - 0 -> 1 * Goal 20. Weak Mutation 68: com.google.javascript.jscomp.LightweightMessageFormatter.format(Lcom/google/javascript/jscomp/JSError;Z)Ljava/lang/String;:69 - ReplaceComparisonOperator != null -> = null * Goal 21. com.google.javascript.jscomp.LightweightMessageFormatter.withoutSource()Lcom/google/javascript/jscomp/LightweightMessageFormatter;:nonnull */ @Test public void test12() throws Throwable { LightweightMessageFormatter lightweightMessageFormatter0 = LightweightMessageFormatter.withoutSource(); // Undeclared exception! try { lightweightMessageFormatter0.formatError((JSError) null); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // assertThrownBy("com.google.javascript.jscomp.LightweightMessageFormatter", e); } } //Test case number: 13 /* * 5 covered goals: * Goal 1. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.<init>()V: root-Branch * Goal 2. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatLine(Ljava/lang/String;I)Ljava/lang/String;: root-Branch * Goal 3. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatLine(Ljava/lang/String;I)Ljava/lang/String;: root-Branch in context: * Goal 4. Branch com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.<init>()V: root-Branch in context: * Goal 5. com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter.formatLine(Ljava/lang/String;I)Ljava/lang/String;: Line 132 */ @Test public void test13() throws Throwable { LightweightMessageFormatter.LineNumberingFormatter lightweightMessageFormatter_LineNumberingFormatter0 = new LightweightMessageFormatter.LineNumberingFormatter(); String string0 = lightweightMessageFormatter_LineNumberingFormatter0.formatLine("-", 310); } }
[ "375882286@qq.com" ]
375882286@qq.com
26d31e2945c8f1facda315d284daa073b9b295a9
ff79091b4522e769a6f420a94ad1b3e6343b122a
/src/test/java/FCMTest.java
21782f91c0b1e520b16bdbce8d1fddf34ab837e2
[]
no_license
SS6795/FailureCauseMgmt
ade861cbe6ed1bfc553edf42c99dd648202ea0d5
cd367f2d22b1395ce9dc2ab26f6f9b3df24d40f0
refs/heads/master
2023-02-24T11:26:04.760453
2021-01-28T10:18:42
2021-01-28T10:18:42
333,721,114
0
0
null
null
null
null
UTF-8
Java
false
false
230
java
package test.java; import org.junit.Test; import main.java.FCMMain; public class FCMTest { FCMMain main = new FCMMain(); @Test public void TestFailureCauseMgmt() { main.addListElement(); main.getList().get(2); } }
[ "simran.soni1717@gmail.com" ]
simran.soni1717@gmail.com
d09154d9bae3381daa0e69eba3fec6f8a0f7899e
f603f3309f8a67c2fc64f94a8aebde9b3c264a6f
/Management/NetworkManagement/src/main/java/com/rest/infrastructure/LogInterceptor.java
e74d3ea90226622c84874af64cdb4767b271153b
[]
no_license
MaKi77/Management
c6e8164dbb00034d2a4541294519e8ea30309a6f
31c3a68d36a894f0d87918a31fa20a2eef816e64
refs/heads/master
2020-03-22T16:10:12.507173
2018-07-22T16:25:05
2018-07-22T16:25:05
140,307,926
0
0
null
null
null
null
UTF-8
Java
false
false
581
java
package com.rest.infrastructure; import javax.inject.Inject; import javax.interceptor.AroundInvoke; import javax.interceptor.InvocationContext; import org.slf4j.Logger; import com.rest.domain.device.entity.DeviceEntity; public class LogInterceptor { @Inject private Logger logger; @AroundInvoke public Object modifyGreeting(InvocationContext ctx) throws Exception { Object[] parameters = ctx.getParameters(); DeviceEntity param = (DeviceEntity) parameters[0]; logger.info("interceptor: " + param); return ctx.proceed(); } }
[ "Comarch@10.132.226.165" ]
Comarch@10.132.226.165
280fd00c1c6ddad748c267bb6da4959e1ba08e0e
6ad81b875fb1befb3e290a60717ba6bef975fa1c
/src/Array/Topic1.java
0f143c47f0d31c8ecb3a6bec079ba6c16e2695da
[]
no_license
wanaghao729/LeetCode
9a2515b26f901c97c90b05ffa1a88712773b0c6f
9e624270104602a562e78e7a21221d90587b4f85
refs/heads/master
2021-07-06T18:05:54.395775
2020-08-07T17:20:26
2020-08-07T17:20:26
160,179,740
0
0
null
null
null
null
UTF-8
Java
false
false
878
java
package Array; import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** * 题目描述与167类似,只不过输入数组未指名有序 */ public class Topic1 { public int[] twoSum(int[] nums, int target) { int[] result = new int[2]; if (nums == null || nums.length < 2) return result; int N = nums.length; Map<Integer, Integer> map = new HashMap<>(N << 1); for (int i = 0; i < N; i++) { if (map.containsKey(nums[i])) { result[1] = i; result[0] = map.get(nums[i]); return result; } map.put(target - nums[i], i); } return result; } public static void main(String[] args) { int[] A = {2, 7, 11, 15}; System.out.println(Arrays.toString(new Topic1().twoSum(A, 9))); } }
[ "1090305486@qq.com" ]
1090305486@qq.com
6f36ab0023b50236a7684a75505ceafe485a7c95
a3fb0a0b17ca09680fe69c6431d8637bfaa7772a
/demoPractice/src/main/java/com/vikas/demo/AnnuSwap.java
fb8af97731f3a9746d53f10f103aa6230e7c243c
[]
no_license
vikash97185217/Sample
737d81f15c8b8e2342be65161243ef4f79d4f572
a0feb98d7da22c323060803e33701a00f963d0a5
refs/heads/master
2022-12-25T05:16:37.506169
2019-09-07T06:21:58
2019-09-07T06:21:58
189,194,055
0
0
null
2022-12-16T03:47:03
2019-05-29T09:28:53
JavaScript
UTF-8
Java
false
false
388
java
package com.vikas.demo; import java.util.Scanner; public class AnnuSwap { public static void main(String[] args) { Scanner sc= new Scanner(System.in); System.out.println("Enter String"); String[] a=sc.nextLine().split(" "); String sb = new String(); for (int i = a.length-1; i>=0; i--) { sb=sb+a[i]; sb=sb+" "; } System.out.println(sb); } }
[ "suresh.jayapalan@sidusa.com" ]
suresh.jayapalan@sidusa.com
1e26fd08bf254ae881441eb1feeaac23d615d31d
80a7129324844e8c2e044f69b06fb484ecd2b5a1
/src/main/java/me/study/java8to14/RunSomething.java
ac1f0af1f2ea7e53d8139dfefee8e2970d8789d2
[]
no_license
haepyung/java8to14
11c1936b12371f5cb48497591eed40e19663f124
21a0d66826a58aa066040d9570a424cf6bb5add7
refs/heads/master
2023-03-30T10:45:55.706681
2021-03-25T14:53:41
2021-03-25T14:53:41
294,352,578
0
0
null
null
null
null
UTF-8
Java
false
false
237
java
package me.study.java8to14; @FunctionalInterface public interface RunSomething { int doIt(int num); static void printName() { System.out.println("haepyung"); } default void printAge() { System.out.println("33"); } }
[ "haepyung88@gmail.com" ]
haepyung88@gmail.com
0adc6e2d6ebecc103158c6f3d05db6ed44948d56
3401fa65b56e94586844e69e6b55a70191f33278
/app/src/main/java/com/example/muia/firebase/util/RecyclerViewMargin.java
3a8191161c99763f9be1588bf1ccdedebed626e0
[]
no_license
mchlmuia/Muia
a0611de2dfc7404abb47e8c3d6aae7b0b5693b6f
a139bdb7ee92a97243abd684937d7eb2c01fabd5
refs/heads/master
2020-04-01T15:42:15.104392
2018-10-17T18:03:31
2018-10-17T18:03:31
153,347,986
0
0
null
null
null
null
UTF-8
Java
false
false
854
java
package com.example.muia.firebase.util; import android.graphics.Rect; import android.support.v7.widget.RecyclerView; import android.view.View; /** * Created by User on 11/1/2017. */ public class RecyclerViewMargin extends RecyclerView.ItemDecoration{ private final int columns; private int margin; public RecyclerViewMargin(int columns, int margin) { this.columns = columns; this.margin = margin; } @Override public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { int position = parent.getChildAdapterPosition(view); outRect.right = margin; outRect.bottom = margin; if(position < columns){ outRect.top = margin; } if(position % columns == 0) { outRect.left = margin; } } }
[ "mikepeter18@gmail.com" ]
mikepeter18@gmail.com
4866c5be6ee9ad7d101c507fe767257bf886973e
40665051fadf3fb75e5a8f655362126c1a2a3af6
/intuit-Tank/55158719b539f779e020d745f0cd8adb7f19a137/865/JobTOTest.java
04615cd72eaadb9d65dc5a248d2f4da7c42b08f4
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
18,532
java
package com.intuit.tank.api.model.v1.job; /* * #%L * Job Rest Api * %% * Copyright (C) 2011 - 2015 Intuit Inc. * %% * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * #L% */ import java.text.DateFormat; import java.util.Date; import org.junit.*; import com.intuit.tank.api.model.v1.job.JobTO; import static org.junit.Assert.*; /** * The class <code>JobTOTest</code> contains tests for the class <code>{@link JobTO}</code>. * * @generatedBy CodePro at 12/15/14 3:07 PM */ public class JobTOTest { /** * Run the JobTO() constructor test. * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testJobTO_1() throws Exception { JobTO result = new JobTO(); assertNotNull(result); } /** * Run the Date getEndTime() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetEndTime_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); Date result = fixture.getEndTime(); assertNotNull(result); } /** * Run the Integer getId() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetId_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); Integer result = fixture.getId(); assertNotNull(result); assertEquals("1", result.toString()); assertEquals((byte) 1, result.byteValue()); assertEquals((short) 1, result.shortValue()); assertEquals(1, result.intValue()); assertEquals(1L, result.longValue()); assertEquals(1.0f, result.floatValue(), 1.0f); assertEquals(1.0, result.doubleValue(), 1.0); } /** * Run the String getLocation() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetLocation_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); String result = fixture.getLocation(); assertEquals("", result); } /** * Run the String getName() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetName_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); String result = fixture.getName(); assertEquals("", result); } /** * Run the int getNumUsers() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetNumUsers_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); int result = fixture.getNumUsers(); assertEquals(1, result); } /** * Run the long getRampTimeMilis() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetRampTimeMilis_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); long result = fixture.getRampTimeMilis(); assertEquals(1L, result); } /** * Run the long getSimulationTimeMilis() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetSimulationTimeMilis_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); long result = fixture.getSimulationTimeMilis(); assertEquals(1L, result); } /** * Run the Date getStartTime() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetStartTime_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); Date result = fixture.getStartTime(); assertNotNull(result); } /** * Run the String getStatus() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetStatus_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); String result = fixture.getStatus(); assertEquals("", result); } /** * Run the Date getSteadyStateEndTime() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetSteadyStateEndTime_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(0L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); Date result = fixture.getSteadyStateEndTime(); assertNotNull(result); } /** * Run the Date getSteadyStateEndTime() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetSteadyStateEndTime_2() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(0L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime((Date) null); fixture.setStatus(""); Date result = fixture.getSteadyStateEndTime(); assertEquals(null, result); } /** * Run the Date getSteadyStateEndTime() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetSteadyStateEndTime_3() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); Date result = fixture.getSteadyStateEndTime(); assertNotNull(result); } /** * Run the Date getSteadyStateEndTime() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetSteadyStateEndTime_4() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime((Date) null); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); Date result = fixture.getSteadyStateEndTime(); assertEquals(null, result); } /** * Run the Date getSteadyStateStartTime() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetSteadyStateStartTime_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); Date result = fixture.getSteadyStateStartTime(); assertNotNull(result); } /** * Run the Date getSteadyStateStartTime() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testGetSteadyStateStartTime_2() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime((Date) null); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); Date result = fixture.getSteadyStateStartTime(); assertEquals(null, result); } /** * Run the void setEndTime(Date) method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testSetEndTime_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); Date endTime = new Date(); fixture.setEndTime(endTime); } /** * Run the void setId(Integer) method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testSetId_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); Integer id = new Integer(1); fixture.setId(id); } /** * Run the void setLocation(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testSetLocation_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); String location = ""; fixture.setLocation(location); } /** * Run the void setName(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testSetName_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); String name = ""; fixture.setName(name); } /** * Run the void setNumUsers(int) method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testSetNumUsers_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); int numUsers = 1; fixture.setNumUsers(numUsers); } /** * Run the void setRampTimeMilis(long) method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testSetRampTimeMilis_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); long rampTimeMilis = 1L; fixture.setRampTimeMilis(rampTimeMilis); } /** * Run the void setSimulationTimeMilis(long) method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testSetSimulationTimeMilis_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); long simulationTimeMilis = 1L; fixture.setSimulationTimeMilis(simulationTimeMilis); } /** * Run the void setStartTime(Date) method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testSetStartTime_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); Date startTime = new Date(); fixture.setStartTime(startTime); } /** * Run the void setStatus(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testSetStatus_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); String status = ""; fixture.setStatus(status); } /** * Run the String toString() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:07 PM */ @Test public void testToString_1() throws Exception { JobTO fixture = new JobTO(); fixture.setSimulationTimeMilis(1L); fixture.setStartTime(new Date()); fixture.setName(""); fixture.setId(new Integer(1)); fixture.setLocation(""); fixture.setRampTimeMilis(1L); fixture.setNumUsers(1); fixture.setEndTime(new Date()); fixture.setStatus(""); String result = fixture.toString(); } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
686b71af4b50c938879bc28f1c0b4cee32567d28
e53885e088a3f1c663d5527fff3e449c273ef831
/android/app/src/main/java/com/okta_auth/MainActivity.java
09364f4115fc1cb9d397c91593c12a6031c292b8
[ "MIT" ]
permissive
JHouk/okta_auth
1edf0dae4a7b8a3256851c0ab69e1fc6a4d59c8a
de7d5fba63bde9e20817af9cf1985fb03a44328d
refs/heads/master
2023-01-23T16:03:28.269332
2019-07-08T00:03:08
2019-07-08T00:03:08
195,665,096
0
0
MIT
2023-01-04T03:53:15
2019-07-07T15:07:17
JavaScript
UTF-8
Java
false
false
363
java
package com.okta_auth; import com.facebook.react.ReactActivity; public class MainActivity extends ReactActivity { /** * Returns the name of the main component registered from JavaScript. * This is used to schedule rendering of the component. */ @Override protected String getMainComponentName() { return "okta_auth"; } }
[ "jsh.dev@gmail.com" ]
jsh.dev@gmail.com
a4ca8e158829fa2fbc5cb940aaab3b6f2ccedc01
e57083ea584d69bc9fb1b32f5ec86bdd4fca61c0
/sample-project-5400/src/main/java/com/example/project/sample5400/other/sample6/Other6_208.java
4668e22b350b06c059e2eed71482640b16e58f85
[]
no_license
snicoll-scratches/test-spring-components-index
77e0ad58c8646c7eb1d1563bf31f51aa42a0636e
aa48681414a11bb704bdbc8acabe45fa5ef2fd2d
refs/heads/main
2021-06-13T08:46:58.532850
2019-12-09T15:11:10
2019-12-09T15:11:10
65,806,297
5
3
null
null
null
null
UTF-8
Java
false
false
84
java
package com.example.project.sample5400.other.sample6; public class Other6_208 { }
[ "snicoll@pivotal.io" ]
snicoll@pivotal.io
fe052852dedc6f2eadb15b2bbdfb0345e96e2267
ee65f7101f7c31eb96cf3a5bed48cf236c00f93c
/src/com/pemng/serviceSystem/common/WebInfo.java
abe657b8977a079ae79222097b835d7224e23fb6
[]
no_license
Aaronqcd/price-authentication
bf8bc7cbcd5e179882700c92a5f53743dbee0c67
6c490395ba22f9da3aa300f59adce8db9c0c62a3
refs/heads/master
2021-01-16T18:47:47.513642
2017-08-13T16:02:09
2017-08-13T16:02:09
100,116,373
0
0
null
null
null
null
UTF-8
Java
false
false
690
java
package com.pemng.serviceSystem.common; /** * 储存用户基本信息、角色、设置等。保存在Session中 * @author sherlockq * */ public class WebInfo { WebUser webUser = null; WebActions webActions = null; // WebOrg webOrg =null; // public WebOrg getWebOrg() { // return webOrg; // } // public void setWebOrg(WebOrg webOrg) { // this.webOrg = webOrg; // } public WebUser getWebUser() { return webUser; } public void setWebUser(WebUser webUser) { this.webUser = webUser; } public WebActions getWebActions() { return webActions; } public void setWebActions(WebActions webActions) { this.webActions = webActions; } }
[ "Aaronqcd@gmail.com" ]
Aaronqcd@gmail.com
f4b9ef52941367690f32409e6fe508dde5f1a758
2c0b19a1e2d0953a789ccae61aa064f13e975400
/tpCompilation/tp2/ex2/Yylex.java
53725618acbd5d26f85e73d0f8fd0dd170b689d3
[]
no_license
Spader42/M1TIIL
9715479d3a4ae3cd068563c7e41a0b103d3b6d15
fcfb6f31f5dabc7468ae7d2a994bf791d7d03794
refs/heads/master
2021-01-11T20:53:42.294021
2017-01-17T09:44:54
2017-01-17T09:44:54
79,207,197
0
0
null
null
null
null
UTF-8
Java
false
true
15,438
java
/* The following code was generated by JFlex 1.4.1 on 30/09/16 16:31 */ import java_cup.runtime.Symbol; /** * This class is a scanner generated by * <a href="http://www.jflex.de/">JFlex</a> 1.4.1 * on 30/09/16 16:31 from the specification file * <tt>maSpec.lex</tt> */ class Yylex implements java_cup.runtime.Scanner { /** This character denotes the end of file */ public static final int YYEOF = -1; /** initial size of the lookahead buffer */ private static final int ZZ_BUFFERSIZE = 16384; /** lexical states */ public static final int YYINITIAL = 0; /** * Translates characters to character classes */ private static final String ZZ_CMAP_PACKED = "\12\0\1\0\45\0\2\1\uffce\0"; /** * Translates characters to character classes */ private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); /** * Translates DFA states to action switch labels. */ private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = "\1\0\1\1\1\2"; private static int [] zzUnpackAction() { int [] result = new int[3]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; } private static int zzUnpackAction(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** * Translates a state to a row index in the transition table */ private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = "\0\0\0\2\0\4"; private static int [] zzUnpackRowMap() { int [] result = new int[3]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; } private static int zzUnpackRowMap(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int high = packed.charAt(i++) << 16; result[j++] = high | packed.charAt(i++); } return j; } /** * The transition table of the DFA */ private static final int [] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_0 = "\1\2\1\3\3\0\1\3"; private static int [] zzUnpackTrans() { int [] result = new int[6]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; } private static int zzUnpackTrans(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); value--; do result[j++] = value; while (--count > 0); } return j; } /* error codes */ private static final int ZZ_UNKNOWN_ERROR = 0; private static final int ZZ_NO_MATCH = 1; private static final int ZZ_PUSHBACK_2BIG = 2; /* error messages for the codes above */ private static final String ZZ_ERROR_MSG[] = { "Unkown internal scanner error", "Error: could not match input", "Error: pushback value was too large" }; /** * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code> */ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = "\1\0\1\11\1\1"; private static int [] zzUnpackAttribute() { int [] result = new int[3]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; } private static int zzUnpackAttribute(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** the input device */ private java.io.Reader zzReader; /** the current state of the DFA */ private int zzState; /** the current lexical state */ private int zzLexicalState = YYINITIAL; /** this buffer contains the current text to be matched and is the source of the yytext() string */ private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; /** the textposition at the last accepting state */ private int zzMarkedPos; /** the textposition at the last state to be included in yytext */ private int zzPushbackPos; /** the current text position in the buffer */ private int zzCurrentPos; /** startRead marks the beginning of the yytext() string in the buffer */ private int zzStartRead; /** endRead marks the last character in the buffer, that has been read from input */ private int zzEndRead; /** number of newlines encountered up to the start of the matched text */ private int yyline; /** the number of characters up to the start of the matched text */ private int yychar; /** * the number of characters from the last newline up to the start of the * matched text */ private int yycolumn; /** * zzAtBOL == true <=> the scanner is currently at the beginning of a line */ private boolean zzAtBOL = true; /** zzAtEOF == true <=> the scanner is at the EOF */ private boolean zzAtEOF; /** denotes if the user-EOF-code has already been executed */ private boolean zzEOFDone; /** * Creates a new scanner * There is also a java.io.InputStream version of this constructor. * * @param in the java.io.Reader to read input from. */ Yylex(java.io.Reader in) { this.zzReader = in; } /** * Creates a new scanner. * There is also java.io.Reader version of this constructor. * * @param in the java.io.Inputstream to read input from. */ Yylex(java.io.InputStream in) { this(new java.io.InputStreamReader(in)); } /** * Unpacks the compressed character translation table. * * @param packed the packed character translation table * @return the unpacked character translation table */ private static char [] zzUnpackCMap(String packed) { char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ while (i < 10) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); } return map; } /** * Refills the input buffer. * * @return <code>false</code>, iff there was new input. * * @exception java.io.IOException if any I/O-Error occurs */ private boolean zzRefill() throws java.io.IOException { /* first: make room (if you can) */ if (zzStartRead > 0) { System.arraycopy(zzBuffer, zzStartRead, zzBuffer, 0, zzEndRead-zzStartRead); /* translate stored positions */ zzEndRead-= zzStartRead; zzCurrentPos-= zzStartRead; zzMarkedPos-= zzStartRead; zzPushbackPos-= zzStartRead; zzStartRead = 0; } /* is the buffer big enough? */ if (zzCurrentPos >= zzBuffer.length) { /* if not: blow it up */ char newBuffer[] = new char[zzCurrentPos*2]; System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); zzBuffer = newBuffer; } /* finally: fill the buffer with new input */ int numRead = zzReader.read(zzBuffer, zzEndRead, zzBuffer.length-zzEndRead); if (numRead < 0) { return true; } else { zzEndRead+= numRead; return false; } } /** * Closes the input stream. */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) zzReader.close(); } /** * Resets the scanner to read from a new input stream. * Does not close the old reader. * * All internal variables are reset, the old input stream * <b>cannot</b> be reused (internal buffer is discarded and lost). * Lexical state is set to <tt>ZZ_INITIAL</tt>. * * @param reader the new input stream */ public final void yyreset(java.io.Reader reader) { zzReader = reader; zzAtBOL = true; zzAtEOF = false; zzEndRead = zzStartRead = 0; zzCurrentPos = zzMarkedPos = zzPushbackPos = 0; yyline = yychar = yycolumn = 0; zzLexicalState = YYINITIAL; } /** * Returns the current lexical state. */ public final int yystate() { return zzLexicalState; } /** * Enters a new lexical state * * @param newState the new lexical state */ public final void yybegin(int newState) { zzLexicalState = newState; } /** * Returns the text matched by the current regular expression. */ public final String yytext() { return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); } /** * Returns the character at position <tt>pos</tt> from the * matched text. * * It is equivalent to yytext().charAt(pos), but faster * * @param pos the position of the character to fetch. * A value from 0 to yylength()-1. * * @return the character at position pos */ public final char yycharat(int pos) { return zzBuffer[zzStartRead+pos]; } /** * Returns the length of the matched text region. */ public final int yylength() { return zzMarkedPos-zzStartRead; } /** * Reports an error that occured while scanning. * * In a wellformed scanner (no or only correct usage of * yypushback(int) and a match-all fallback rule) this method * will only be called with things that "Can't Possibly Happen". * If this method is called, something is seriously wrong * (e.g. a JFlex bug producing a faulty scanner etc.). * * Usual syntax/scanner level error handling should be done * in error fallback rules. * * @param errorCode the code of the errormessage to display */ private void zzScanError(int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); } /** * Pushes the specified amount of characters back into the input stream. * * They will be read again by then next call of the scanning method * * @param number the number of characters to be read again. * This number must not be greater than yylength()! */ public void yypushback(int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; } /** * Contains user EOF-code, which will be executed exactly once, * when the end of file is reached */ private void zzDoEOF() throws java.io.IOException { if (!zzEOFDone) { zzEOFDone = true; yyclose(); } } /** * Resumes scanning until the next regular expression is matched, * the end of input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs */ public java_cup.runtime.Symbol next_token() throws java.io.IOException { int zzInput; int zzAction; // cached fields: int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char [] zzBufferL = zzBuffer; char [] zzCMapL = ZZ_CMAP; int [] zzTransL = ZZ_TRANS; int [] zzRowMapL = ZZ_ROWMAP; int [] zzAttrL = ZZ_ATTRIBUTE; while (true) { zzMarkedPosL = zzMarkedPos; boolean zzR = false; for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; zzCurrentPosL++) { switch (zzBufferL[zzCurrentPosL]) { case '\u000B': case '\u000C': case '\u0085': case '\u2028': case '\u2029': yyline++; yycolumn = 0; zzR = false; break; case '\r': yyline++; yycolumn = 0; zzR = true; break; case '\n': if (zzR) zzR = false; else { yyline++; yycolumn = 0; } break; default: zzR = false; yycolumn++; } } if (zzR) { // peek one character ahead if it is \n (if we have counted one line too much) boolean zzPeek; if (zzMarkedPosL < zzEndReadL) zzPeek = zzBufferL[zzMarkedPosL] == '\n'; else if (zzAtEOF) zzPeek = false; else { boolean eof = zzRefill(); zzEndReadL = zzEndRead; zzMarkedPosL = zzMarkedPos; zzBufferL = zzBuffer; if (eof) zzPeek = false; else zzPeek = zzBufferL[zzMarkedPosL] == '\n'; } if (zzPeek) yyline--; } zzAction = -1; zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; zzState = zzLexicalState; zzForAction: { while (true) { if (zzCurrentPosL < zzEndReadL) zzInput = zzBufferL[zzCurrentPosL++]; else if (zzAtEOF) { zzInput = YYEOF; break zzForAction; } else { // store back cached positions zzCurrentPos = zzCurrentPosL; zzMarkedPos = zzMarkedPosL; boolean eof = zzRefill(); // get translated positions and possibly new buffer zzCurrentPosL = zzCurrentPos; zzMarkedPosL = zzMarkedPos; zzBufferL = zzBuffer; zzEndReadL = zzEndRead; if (eof) { zzInput = YYEOF; break zzForAction; } else { zzInput = zzBufferL[zzCurrentPosL++]; } } int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; if (zzNext == -1) break zzForAction; zzState = zzNext; int zzAttributes = zzAttrL[zzState]; if ( (zzAttributes & 1) == 1 ) { zzAction = zzState; zzMarkedPosL = zzCurrentPosL; if ( (zzAttributes & 8) == 8 ) break zzForAction; } } } // store back cached position zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { case 2: { return new Symbol(sym.ENTIER, new Integer(yytext())); } case 3: break; case 1: { } case 4: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; zzDoEOF(); { return new java_cup.runtime.Symbol(sym.EOF); } } else { zzScanError(ZZ_NO_MATCH); } } } } }
[ "steevenbrest@hotmail.com" ]
steevenbrest@hotmail.com
afa329dad3b2c43698b4ef824f1c88e87579e29f
bf04609395b70e3faccda4736d7bced20a63695c
/software construct/src/Lab08MemberCardV2/Pointable.java
38da480bd9fcd920dab23ef8f8d01b887a2d8cab
[]
no_license
BIRDDYTTP/softwareConstruct
ec49db86da79caf6dddf1c39c178a41ef3e6dba3
ea63bbcd7b3f3f10015446fd6320fa894ca6e1b2
refs/heads/master
2020-04-11T02:11:35.319910
2018-12-12T05:36:24
2018-12-12T05:36:24
161,437,486
0
0
null
null
null
null
UTF-8
Java
false
false
164
java
package Lab08MemberCardV2; public interface Pointable { void addScore(double score); void usePoint(int point); int getPoint(); String getInfo(); }
[ "thitipong.ha@ku.th" ]
thitipong.ha@ku.th
ad3f3fc0bcc01f6181ba2d8bfa7ca7b532641617
112df12dacc49a4657e4ace908a794964a077896
/main/java/com/brainacad/studyproject/gui/editor/AdFullButtonEditor.java
8093f6601bb67e88a40eaf295f6fbdccf696e325
[]
no_license
rem89yev/studyproject
bc5b059b55464ae0c2e7503b5d3c0a48a9fd3af9
e6e7d589b78155963dc982d37120f9b2c07a18fe
refs/heads/master
2021-01-11T08:02:15.031251
2016-11-26T21:46:37
2016-11-26T21:46:37
72,134,959
0
0
null
null
null
null
UTF-8
Java
false
false
2,174
java
package com.brainacad.studyproject.gui.editor; import com.brainacad.studyproject.gui.ViewRouter; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import static com.brainacad.studyproject.gui.view.View.ALL_ADS; import static com.brainacad.studyproject.gui.view.View.FULL_AD_DESCRIPTION; /** * Created by Yevhen-PC on 26.11.2016. */ public class AdFullButtonEditor extends DefaultCellEditor { private JTable table; private JButton button; private int row; private String label; private boolean isPushed; public AdFullButtonEditor(JCheckBox checkBox) { super(checkBox); button = new JButton(); button.setOpaque(true); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { fireEditingStopped(); } }); } public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { this.table = table; this.row = row; if (isSelected) { button.setForeground(table.getSelectionForeground()); button.setBackground(table.getSelectionBackground()); } else { button.setForeground(table.getForeground()); button.setBackground(table.getBackground()); } label = (value == null) ? "" : value.toString(); button.setText(label); isPushed = true; return button; } public Object getCellEditorValue() { if (isPushed) { int adId = (int) table.getValueAt(row, 0); int userEnterId = (int) table.getValueAt(row, 2); ViewRouter viewRouter = ViewRouter.getInstance(); viewRouter.switchView(ALL_ADS, FULL_AD_DESCRIPTION, adId, userEnterId); } isPushed = false; return label; } public boolean stopCellEditing() { isPushed = false; return super.stopCellEditing(); } protected void fireEditingStopped() { super.fireEditingStopped(); } }
[ "rem89yev@gmail.com" ]
rem89yev@gmail.com
f9969e5d01f382ead2f6d7096fa806f05254fd11
f8b1b06de7e55a5a416ca7f6d1fe95a6e04214ff
/Game/src/com/grasernetwork/game/components/player/PlayerState.java
036246f8b9d4c49552c0120b5954ba015567250b
[]
no_license
ThatForkyDev/Graser-Network
8d0eb1a66a0955fecb2f5544a4fd27771c5bb9eb
353189e163eb315b28324353ac41068c1200f007
refs/heads/master
2021-09-07T21:00:18.097108
2018-03-01T03:02:12
2018-03-01T03:02:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
144
java
package com.grasernetwork.game.components.player; /** * Created by Teddeh on 08/03/2016. */ public enum PlayerState { PLAYING, SPECTATING }
[ "DeclaredMC@gmail.com" ]
DeclaredMC@gmail.com
0da0b165bac3b0d332334efaf52ee937b7c69431
b78866da64def8241613d44d76a1e789989bc4e5
/src/main/java/it/paoloyx/blobcrud/usertypes/BlobUserType.java
fdba616dd79cddfe9239e0cb688677724e00402e
[]
no_license
paoloyx/BlobCrud
205cedd89d4881341960d1e7ba75c22ef3fb259c
4f7bfb651890e661b1471189e2872bb9d0b7fe45
refs/heads/master
2020-05-16T20:49:53.245346
2012-04-12T11:32:58
2012-04-12T11:32:58
3,470,618
0
0
null
null
null
null
UTF-8
Java
false
false
4,856
java
package it.paoloyx.blobcrud.usertypes; import java.io.InputStream; import java.io.OutputStream; import java.io.Serializable; import java.sql.Blob; import java.sql.DatabaseMetaData; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; import oracle.jdbc.OraclePreparedStatement; import oracle.sql.BLOB; import org.apache.commons.io.IOUtils; import org.hibernate.HibernateException; import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.usertype.UserType; import org.postgresql.PGConnection; import org.postgresql.core.BaseStatement; import org.postgresql.largeobject.LargeObject; import org.postgresql.largeobject.LargeObjectManager; /** * Immutable Blob User type */ public class BlobUserType implements UserType { @Override public int[] sqlTypes() { return new int[] { Types.BLOB }; } @Override public Class returnedClass() { return BlobUserType.class; } @Override public boolean equals(Object x, Object y) throws HibernateException { if (x == y) return true; if (x == null || y == null) return false; return x.equals(y); } @Override public int hashCode(Object x) throws HibernateException { return x.hashCode(); } @Override public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { Blob blob = rs.getBlob(names[0]); if (blob == null) return null; return blob; } @Override public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { if (value == null) { st.setNull(index, sqlTypes()[0]); } else { InputStream in = null; OutputStream out = null; BLOB tempBlob = null; LargeObject obj = null; try { // InputStream from blob Blob valueAsBlob = (Blob) value; in = valueAsBlob.getBinaryStream(); // Retrieves information about the database DatabaseMetaData dbMetaData = session.connection().getMetaData(); String dbProductName = dbMetaData.getDatabaseProductName(); if (dbProductName.toUpperCase().contains("ORACLE")) { OraclePreparedStatement oraclePreparedStatement = st.unwrap(OraclePreparedStatement.class); tempBlob = BLOB.createTemporary(oraclePreparedStatement.getConnection(), true, BLOB.DURATION_SESSION); tempBlob.open(BLOB.MODE_READWRITE); out = tempBlob.setBinaryStream(1); IOUtils.copy(in, out); out.flush(); st.setBlob(index, tempBlob); } else if (dbProductName.toUpperCase().contains("POSTGRES")) { BaseStatement pgStatement = st.unwrap(BaseStatement.class); PGConnection connection = (PGConnection) pgStatement.getConnection(); LargeObjectManager lobj = connection.getLargeObjectAPI(); long oid = lobj.createLO(); obj = lobj.open(oid, LargeObjectManager.WRITE); out = obj.getOutputStream(); IOUtils.copy(in, out); out.flush(); st.setLong(index, oid); } else { throw new RuntimeException("Database " + dbProductName + " is currently not supported"); } } catch (Exception e) { // Eccezione non recuperabile, la rilanciamo come // runtimeException e.printStackTrace(); throw new RuntimeException(e); } finally { if (obj != null) { obj.close(); } if (tempBlob != null && tempBlob.isOpen()) { tempBlob.close(); } IOUtils.closeQuietly(out); IOUtils.closeQuietly(in); } } } @Override public Object deepCopy(Object value) throws HibernateException { return value; } @Override public boolean isMutable() { return false; } @Override public Serializable disassemble(Object value) throws HibernateException { return (Serializable) value; } @Override public Object assemble(Serializable cached, Object owner) throws HibernateException { return cached; } @Override public Object replace(Object original, Object target, Object owner) throws HibernateException { return original; } }
[ "paoloyx@gmail.com" ]
paoloyx@gmail.com
a2a719550fa55250e4152f3023be42c14ebcbea2
0591ec51f8d1552df0defe6a24215bef6e20fe04
/test/testcase/TestCase.java
337e687efeeed8bb4e9b024b145afb4390e815ca
[ "Apache-2.0" ]
permissive
shiverking/yosebook
3adb2ddfdb510603ae36d80321188883ff3fb7ee
52096693f3df12381a4ad038905ed96b24239dcd
refs/heads/master
2022-11-11T05:57:07.105775
2020-07-01T13:32:09
2020-07-01T13:32:09
276,382,883
0
0
Apache-2.0
2020-07-01T13:32:10
2020-07-01T13:19:03
Java
UTF-8
Java
false
false
4,187
java
package testcase; import java.sql.SQLException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.Before; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.tyust.dao.BookDao; import com.tyust.dao.CartItemDao; import com.tyust.dao.CategoryDao; import com.tyust.dao.OrderDao; import com.tyust.dao.OrderItemDao; import com.tyust.entity.CartItem; import com.tyust.entity.Category; import com.tyust.entity.Order; import com.tyust.entity.OrderItem; import com.tyust.service.BookService; import com.tyust.service.CartItemService; import com.tyust.service.CategoryService; import com.tyust.service.OrderService; public class TestCase { private ApplicationContext ac; CategoryDao categoryDao; CategoryService categoryService; BookService bookService; BookDao bookDao; CartItemService cartItemService; CartItemDao cartItemDao; OrderDao orderDao; OrderService orderService; OrderItemDao orderItemDao; @Before public void init(){ ac = new ClassPathXmlApplicationContext( "spring-mybatis.xml", "spring-service.xml"); categoryDao = ac.getBean("categoryDao",CategoryDao.class); categoryService = ac.getBean("categoryService",CategoryService.class); bookService = ac.getBean("bookService",BookService.class); bookDao = ac.getBean("bookDao",BookDao.class); cartItemService = ac.getBean("cartItemService",CartItemService.class); cartItemDao = ac.getBean("cartItemDao",CartItemDao.class); orderDao = ac.getBean("orderDao",OrderDao.class); orderService = ac.getBean("orderService",OrderService.class); orderItemDao = ac.getBean("orderItemDao",OrderItemDao.class); } @Test public void testMybatis() { Object obj = ac.getBean("dataSource"); System.out.println(obj); } @Test public void testCategory() throws SQLException{ /*List<Map<String,Object>> categoryList = categoryDao.findAll(); for(Map<String, Object> category : categoryList){ System.out.println(category); }*/ /*int num = categoryDao.findChildrenByParent("1"); System.out.println(num);*/ /*Category category = categoryDao.load("1"); System.out.println(category); //System.out.println(category.getChildren()); * */ /*List<Map<String,String>> categoryList = categoryDao.findByParent("2"); for(Map<String, String> category : categoryList){ System.out.println(category); }*/ /*Map<String,String> map = categoryDao.load("1"); System.out.println(map);*/ /*System.out.println(category.getParent());*/ } @Test public void testCategoryService(){ List<Category> categoryList = categoryService.findAll(); for(Category cate : categoryList){ System.out.println(cate); } /*List<Category> categoryList = categoryService.findParents(); for(Category cate : categoryList){ System.out.println(cate); }*/ /*List<Category> categoryList = categoryService.findByParent("1"); for(Category cate : categoryList){ System.out.println(cate); }*/ } //5F79D0D246AD4216AC04E9C5FAB3199E @Test public void testBook() throws SQLException{ /*PageBean<Book> pb = bookService.findByBname("web", 1); System.out.println(pb.getBeanList());*/ Map<String,Object> map = new HashMap<String,Object>(); map.put("cid", "5F79D0D246AD4216AC04E9C5FAB3199E"); map.put("ps", 12); map.put("start", 0); //List<Book> bookList = bookDao.findByBname(map); Integer n = bookDao.findBookTr(map); System.out.println(n); /*int n = bookDao.findBookTr(map); System.out.println(n);*/ } @Test public void testCartItem() throws SQLException{ //List<CartItem> cartItemList = cartItemService.myCart("531D8A16D524478D86F8A115FE95D93F"); List<CartItem> cartItemList = cartItemDao.findByUser("531D8A16D524478D86F8A115FE95D93F"); System.out.println(cartItemList); } //FAC08EE0DF2C4487A6FA2B11B343307E @Test public void testOrder() throws SQLException{ Order order = orderDao.load("FAC08EE0DF2C4487A6FA2B11B343307E"); System.out.println(order.getOrderItemList()); /*OrderItem orderItem = orderItemDao.load("06AD3253E7EA415B828D1299462DE812"); System.out.println(orderItem);*/ } }
[ "35066603+shiverking@users.noreply.github.com" ]
35066603+shiverking@users.noreply.github.com
e8390a27246469597e0c0ee63a4019eabd109172
247283842ecc921f4fe68d14d28f7416752ef7ec
/vhr-spring/src/main/java/com/guigui/springboot/service/MenuService.java
8e3eb87b612d102c4f0a1cb955aea3b694cc7c19
[]
no_license
JKGUIGUI/Vhr
a0dbbb7f37ee393a4b3f0a4ca0b0ecd5236cff69
347e0fd633039b9a7526e6acf1b84945a33b48e2
refs/heads/master
2023-03-05T19:25:00.193436
2021-02-16T05:27:25
2021-02-16T05:27:25
334,600,994
0
0
null
null
null
null
UTF-8
Java
false
false
182
java
package com.guigui.springboot.service; import com.guigui.springboot.model.Menu; import java.util.List; public interface MenuService { List<Menu> getMenusByHrId(Integer id); }
[ "xiaoguaiguai914@hotmail.com" ]
xiaoguaiguai914@hotmail.com
ae85b6a2f46e48022b54c384bbb5b89766808dcd
6a4a76d49bc7698ac4c73e8af5736365618e5a53
/shoppingf/src/main/java/com/yc/shopping/bean/CartExample.java
7ab5d66b3a324eeced0a1dc09eae08aeb0833375
[]
no_license
qingzzb/shoppingf
b7671048bae280422a76da0de59d6d7793cd06e1
b78dea46e1d458d1b2d32500942da99d0256a84c
refs/heads/master
2022-12-21T21:56:56.700639
2019-06-26T12:27:36
2019-06-26T12:27:36
193,894,788
0
0
null
2022-12-16T09:43:31
2019-06-26T11:52:58
CSS
UTF-8
Java
false
false
31,597
java
package com.yc.shopping.bean; import java.util.ArrayList; import java.util.List; public class CartExample { /** * This field was generated by MyBatis Generator. * This field corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. * This field corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. * This field corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ protected List<Criteria> oredCriteria; /** * This method was generated by MyBatis Generator. * This method corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ public CartExample() { oredCriteria = new ArrayList<Criteria>(); } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ public String getOrderByClause() { return orderByClause; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ public void setDistinct(boolean distinct) { this.distinct = distinct; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ public boolean isDistinct() { return distinct; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ public List<Criteria> getOredCriteria() { return oredCriteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ public void or(Criteria criteria) { oredCriteria.add(criteria); } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(Integer value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(Integer value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(Integer value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(Integer value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(Integer value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(Integer value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdIn(List<Integer> values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List<Integer> values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(Integer value1, Integer value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(Integer value1, Integer value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andCommodityNameIsNull() { addCriterion("commodity_name is null"); return (Criteria) this; } public Criteria andCommodityNameIsNotNull() { addCriterion("commodity_name is not null"); return (Criteria) this; } public Criteria andCommodityNameEqualTo(String value) { addCriterion("commodity_name =", value, "commodityName"); return (Criteria) this; } public Criteria andCommodityNameNotEqualTo(String value) { addCriterion("commodity_name <>", value, "commodityName"); return (Criteria) this; } public Criteria andCommodityNameGreaterThan(String value) { addCriterion("commodity_name >", value, "commodityName"); return (Criteria) this; } public Criteria andCommodityNameGreaterThanOrEqualTo(String value) { addCriterion("commodity_name >=", value, "commodityName"); return (Criteria) this; } public Criteria andCommodityNameLessThan(String value) { addCriterion("commodity_name <", value, "commodityName"); return (Criteria) this; } public Criteria andCommodityNameLessThanOrEqualTo(String value) { addCriterion("commodity_name <=", value, "commodityName"); return (Criteria) this; } public Criteria andCommodityNameLike(String value) { addCriterion("commodity_name like", value, "commodityName"); return (Criteria) this; } public Criteria andCommodityNameNotLike(String value) { addCriterion("commodity_name not like", value, "commodityName"); return (Criteria) this; } public Criteria andCommodityNameIn(List<String> values) { addCriterion("commodity_name in", values, "commodityName"); return (Criteria) this; } public Criteria andCommodityNameNotIn(List<String> values) { addCriterion("commodity_name not in", values, "commodityName"); return (Criteria) this; } public Criteria andCommodityNameBetween(String value1, String value2) { addCriterion("commodity_name between", value1, value2, "commodityName"); return (Criteria) this; } public Criteria andCommodityNameNotBetween(String value1, String value2) { addCriterion("commodity_name not between", value1, value2, "commodityName"); return (Criteria) this; } public Criteria andCommodityImgIsNull() { addCriterion("commodity_img is null"); return (Criteria) this; } public Criteria andCommodityImgIsNotNull() { addCriterion("commodity_img is not null"); return (Criteria) this; } public Criteria andCommodityImgEqualTo(String value) { addCriterion("commodity_img =", value, "commodityImg"); return (Criteria) this; } public Criteria andCommodityImgNotEqualTo(String value) { addCriterion("commodity_img <>", value, "commodityImg"); return (Criteria) this; } public Criteria andCommodityImgGreaterThan(String value) { addCriterion("commodity_img >", value, "commodityImg"); return (Criteria) this; } public Criteria andCommodityImgGreaterThanOrEqualTo(String value) { addCriterion("commodity_img >=", value, "commodityImg"); return (Criteria) this; } public Criteria andCommodityImgLessThan(String value) { addCriterion("commodity_img <", value, "commodityImg"); return (Criteria) this; } public Criteria andCommodityImgLessThanOrEqualTo(String value) { addCriterion("commodity_img <=", value, "commodityImg"); return (Criteria) this; } public Criteria andCommodityImgLike(String value) { addCriterion("commodity_img like", value, "commodityImg"); return (Criteria) this; } public Criteria andCommodityImgNotLike(String value) { addCriterion("commodity_img not like", value, "commodityImg"); return (Criteria) this; } public Criteria andCommodityImgIn(List<String> values) { addCriterion("commodity_img in", values, "commodityImg"); return (Criteria) this; } public Criteria andCommodityImgNotIn(List<String> values) { addCriterion("commodity_img not in", values, "commodityImg"); return (Criteria) this; } public Criteria andCommodityImgBetween(String value1, String value2) { addCriterion("commodity_img between", value1, value2, "commodityImg"); return (Criteria) this; } public Criteria andCommodityImgNotBetween(String value1, String value2) { addCriterion("commodity_img not between", value1, value2, "commodityImg"); return (Criteria) this; } public Criteria andCommodityColorIsNull() { addCriterion("commodity_color is null"); return (Criteria) this; } public Criteria andCommodityColorIsNotNull() { addCriterion("commodity_color is not null"); return (Criteria) this; } public Criteria andCommodityColorEqualTo(String value) { addCriterion("commodity_color =", value, "commodityColor"); return (Criteria) this; } public Criteria andCommodityColorNotEqualTo(String value) { addCriterion("commodity_color <>", value, "commodityColor"); return (Criteria) this; } public Criteria andCommodityColorGreaterThan(String value) { addCriterion("commodity_color >", value, "commodityColor"); return (Criteria) this; } public Criteria andCommodityColorGreaterThanOrEqualTo(String value) { addCriterion("commodity_color >=", value, "commodityColor"); return (Criteria) this; } public Criteria andCommodityColorLessThan(String value) { addCriterion("commodity_color <", value, "commodityColor"); return (Criteria) this; } public Criteria andCommodityColorLessThanOrEqualTo(String value) { addCriterion("commodity_color <=", value, "commodityColor"); return (Criteria) this; } public Criteria andCommodityColorLike(String value) { addCriterion("commodity_color like", value, "commodityColor"); return (Criteria) this; } public Criteria andCommodityColorNotLike(String value) { addCriterion("commodity_color not like", value, "commodityColor"); return (Criteria) this; } public Criteria andCommodityColorIn(List<String> values) { addCriterion("commodity_color in", values, "commodityColor"); return (Criteria) this; } public Criteria andCommodityColorNotIn(List<String> values) { addCriterion("commodity_color not in", values, "commodityColor"); return (Criteria) this; } public Criteria andCommodityColorBetween(String value1, String value2) { addCriterion("commodity_color between", value1, value2, "commodityColor"); return (Criteria) this; } public Criteria andCommodityColorNotBetween(String value1, String value2) { addCriterion("commodity_color not between", value1, value2, "commodityColor"); return (Criteria) this; } public Criteria andCommoditySizeIsNull() { addCriterion("commodity_size is null"); return (Criteria) this; } public Criteria andCommoditySizeIsNotNull() { addCriterion("commodity_size is not null"); return (Criteria) this; } public Criteria andCommoditySizeEqualTo(String value) { addCriterion("commodity_size =", value, "commoditySize"); return (Criteria) this; } public Criteria andCommoditySizeNotEqualTo(String value) { addCriterion("commodity_size <>", value, "commoditySize"); return (Criteria) this; } public Criteria andCommoditySizeGreaterThan(String value) { addCriterion("commodity_size >", value, "commoditySize"); return (Criteria) this; } public Criteria andCommoditySizeGreaterThanOrEqualTo(String value) { addCriterion("commodity_size >=", value, "commoditySize"); return (Criteria) this; } public Criteria andCommoditySizeLessThan(String value) { addCriterion("commodity_size <", value, "commoditySize"); return (Criteria) this; } public Criteria andCommoditySizeLessThanOrEqualTo(String value) { addCriterion("commodity_size <=", value, "commoditySize"); return (Criteria) this; } public Criteria andCommoditySizeLike(String value) { addCriterion("commodity_size like", value, "commoditySize"); return (Criteria) this; } public Criteria andCommoditySizeNotLike(String value) { addCriterion("commodity_size not like", value, "commoditySize"); return (Criteria) this; } public Criteria andCommoditySizeIn(List<String> values) { addCriterion("commodity_size in", values, "commoditySize"); return (Criteria) this; } public Criteria andCommoditySizeNotIn(List<String> values) { addCriterion("commodity_size not in", values, "commoditySize"); return (Criteria) this; } public Criteria andCommoditySizeBetween(String value1, String value2) { addCriterion("commodity_size between", value1, value2, "commoditySize"); return (Criteria) this; } public Criteria andCommoditySizeNotBetween(String value1, String value2) { addCriterion("commodity_size not between", value1, value2, "commoditySize"); return (Criteria) this; } public Criteria andCommodityPriceIsNull() { addCriterion("commodity_price is null"); return (Criteria) this; } public Criteria andCommodityPriceIsNotNull() { addCriterion("commodity_price is not null"); return (Criteria) this; } public Criteria andCommodityPriceEqualTo(Double value) { addCriterion("commodity_price =", value, "commodityPrice"); return (Criteria) this; } public Criteria andCommodityPriceNotEqualTo(Double value) { addCriterion("commodity_price <>", value, "commodityPrice"); return (Criteria) this; } public Criteria andCommodityPriceGreaterThan(Double value) { addCriterion("commodity_price >", value, "commodityPrice"); return (Criteria) this; } public Criteria andCommodityPriceGreaterThanOrEqualTo(Double value) { addCriterion("commodity_price >=", value, "commodityPrice"); return (Criteria) this; } public Criteria andCommodityPriceLessThan(Double value) { addCriterion("commodity_price <", value, "commodityPrice"); return (Criteria) this; } public Criteria andCommodityPriceLessThanOrEqualTo(Double value) { addCriterion("commodity_price <=", value, "commodityPrice"); return (Criteria) this; } public Criteria andCommodityPriceIn(List<Double> values) { addCriterion("commodity_price in", values, "commodityPrice"); return (Criteria) this; } public Criteria andCommodityPriceNotIn(List<Double> values) { addCriterion("commodity_price not in", values, "commodityPrice"); return (Criteria) this; } public Criteria andCommodityPriceBetween(Double value1, Double value2) { addCriterion("commodity_price between", value1, value2, "commodityPrice"); return (Criteria) this; } public Criteria andCommodityPriceNotBetween(Double value1, Double value2) { addCriterion("commodity_price not between", value1, value2, "commodityPrice"); return (Criteria) this; } public Criteria andCommodityNumIsNull() { addCriterion("commodity_num is null"); return (Criteria) this; } public Criteria andCommodityNumIsNotNull() { addCriterion("commodity_num is not null"); return (Criteria) this; } public Criteria andCommodityNumEqualTo(Integer value) { addCriterion("commodity_num =", value, "commodityNum"); return (Criteria) this; } public Criteria andCommodityNumNotEqualTo(Integer value) { addCriterion("commodity_num <>", value, "commodityNum"); return (Criteria) this; } public Criteria andCommodityNumGreaterThan(Integer value) { addCriterion("commodity_num >", value, "commodityNum"); return (Criteria) this; } public Criteria andCommodityNumGreaterThanOrEqualTo(Integer value) { addCriterion("commodity_num >=", value, "commodityNum"); return (Criteria) this; } public Criteria andCommodityNumLessThan(Integer value) { addCriterion("commodity_num <", value, "commodityNum"); return (Criteria) this; } public Criteria andCommodityNumLessThanOrEqualTo(Integer value) { addCriterion("commodity_num <=", value, "commodityNum"); return (Criteria) this; } public Criteria andCommodityNumIn(List<Integer> values) { addCriterion("commodity_num in", values, "commodityNum"); return (Criteria) this; } public Criteria andCommodityNumNotIn(List<Integer> values) { addCriterion("commodity_num not in", values, "commodityNum"); return (Criteria) this; } public Criteria andCommodityNumBetween(Integer value1, Integer value2) { addCriterion("commodity_num between", value1, value2, "commodityNum"); return (Criteria) this; } public Criteria andCommodityNumNotBetween(Integer value1, Integer value2) { addCriterion("commodity_num not between", value1, value2, "commodityNum"); return (Criteria) this; } public Criteria andCommodityTotalPricesIsNull() { addCriterion("commodity_total_prices is null"); return (Criteria) this; } public Criteria andCommodityTotalPricesIsNotNull() { addCriterion("commodity_total_prices is not null"); return (Criteria) this; } public Criteria andCommodityTotalPricesEqualTo(Double value) { addCriterion("commodity_total_prices =", value, "commodityTotalPrices"); return (Criteria) this; } public Criteria andCommodityTotalPricesNotEqualTo(Double value) { addCriterion("commodity_total_prices <>", value, "commodityTotalPrices"); return (Criteria) this; } public Criteria andCommodityTotalPricesGreaterThan(Double value) { addCriterion("commodity_total_prices >", value, "commodityTotalPrices"); return (Criteria) this; } public Criteria andCommodityTotalPricesGreaterThanOrEqualTo(Double value) { addCriterion("commodity_total_prices >=", value, "commodityTotalPrices"); return (Criteria) this; } public Criteria andCommodityTotalPricesLessThan(Double value) { addCriterion("commodity_total_prices <", value, "commodityTotalPrices"); return (Criteria) this; } public Criteria andCommodityTotalPricesLessThanOrEqualTo(Double value) { addCriterion("commodity_total_prices <=", value, "commodityTotalPrices"); return (Criteria) this; } public Criteria andCommodityTotalPricesIn(List<Double> values) { addCriterion("commodity_total_prices in", values, "commodityTotalPrices"); return (Criteria) this; } public Criteria andCommodityTotalPricesNotIn(List<Double> values) { addCriterion("commodity_total_prices not in", values, "commodityTotalPrices"); return (Criteria) this; } public Criteria andCommodityTotalPricesBetween(Double value1, Double value2) { addCriterion("commodity_total_prices between", value1, value2, "commodityTotalPrices"); return (Criteria) this; } public Criteria andCommodityTotalPricesNotBetween(Double value1, Double value2) { addCriterion("commodity_total_prices not between", value1, value2, "commodityTotalPrices"); return (Criteria) this; } public Criteria andUserIdIsNull() { addCriterion("user_id is null"); return (Criteria) this; } public Criteria andUserIdIsNotNull() { addCriterion("user_id is not null"); return (Criteria) this; } public Criteria andUserIdEqualTo(Integer value) { addCriterion("user_id =", value, "userId"); return (Criteria) this; } public Criteria andUserIdNotEqualTo(Integer value) { addCriterion("user_id <>", value, "userId"); return (Criteria) this; } public Criteria andUserIdGreaterThan(Integer value) { addCriterion("user_id >", value, "userId"); return (Criteria) this; } public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { addCriterion("user_id >=", value, "userId"); return (Criteria) this; } public Criteria andUserIdLessThan(Integer value) { addCriterion("user_id <", value, "userId"); return (Criteria) this; } public Criteria andUserIdLessThanOrEqualTo(Integer value) { addCriterion("user_id <=", value, "userId"); return (Criteria) this; } public Criteria andUserIdIn(List<Integer> values) { addCriterion("user_id in", values, "userId"); return (Criteria) this; } public Criteria andUserIdNotIn(List<Integer> values) { addCriterion("user_id not in", values, "userId"); return (Criteria) this; } public Criteria andUserIdBetween(Integer value1, Integer value2) { addCriterion("user_id between", value1, value2, "userId"); return (Criteria) this; } public Criteria andUserIdNotBetween(Integer value1, Integer value2) { addCriterion("user_id not between", value1, value2, "userId"); return (Criteria) this; } public Criteria andKeeperidIsNull() { addCriterion("keeperid is null"); return (Criteria) this; } public Criteria andKeeperidIsNotNull() { addCriterion("keeperid is not null"); return (Criteria) this; } public Criteria andKeeperidEqualTo(Integer value) { addCriterion("keeperid =", value, "keeperid"); return (Criteria) this; } public Criteria andKeeperidNotEqualTo(Integer value) { addCriterion("keeperid <>", value, "keeperid"); return (Criteria) this; } public Criteria andKeeperidGreaterThan(Integer value) { addCriterion("keeperid >", value, "keeperid"); return (Criteria) this; } public Criteria andKeeperidGreaterThanOrEqualTo(Integer value) { addCriterion("keeperid >=", value, "keeperid"); return (Criteria) this; } public Criteria andKeeperidLessThan(Integer value) { addCriterion("keeperid <", value, "keeperid"); return (Criteria) this; } public Criteria andKeeperidLessThanOrEqualTo(Integer value) { addCriterion("keeperid <=", value, "keeperid"); return (Criteria) this; } public Criteria andKeeperidIn(List<Integer> values) { addCriterion("keeperid in", values, "keeperid"); return (Criteria) this; } public Criteria andKeeperidNotIn(List<Integer> values) { addCriterion("keeperid not in", values, "keeperid"); return (Criteria) this; } public Criteria andKeeperidBetween(Integer value1, Integer value2) { addCriterion("keeperid between", value1, value2, "keeperid"); return (Criteria) this; } public Criteria andKeeperidNotBetween(Integer value1, Integer value2) { addCriterion("keeperid not between", value1, value2, "keeperid"); return (Criteria) this; } } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table cart * * @mbg.generated do_not_delete_during_merge Sun Jun 23 21:58:52 CST 2019 */ public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table cart * * @mbg.generated Sun Jun 23 21:58:52 CST 2019 */ public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } }
[ "2773572784@qq.com" ]
2773572784@qq.com
b5143ebf525c3ca8285da11169a869e8bc047d35
7e3e8c0d94147a25704fbe3649cc73117cc2e91f
/dd-java-agent/agent-debugger/src/test/resources/com/datadog/debugger/CapturedSnapshot16.java
7ddedb998797c0f22dcdd68e0165168a15fcb9d1
[ "Apache-2.0", "UPL-1.0", "MIT", "BSD-3-Clause" ]
permissive
DataDog/dd-trace-java
7f9509d37ef7b353c9d74e2da5867a5960ee804a
c30abdce9982ddf8da7b6013112843ba35c7d20e
refs/heads/master
2023-09-01T13:19:22.620726
2023-08-31T15:49:50
2023-08-31T15:49:50
89,221,572
478
292
Apache-2.0
2023-09-14T21:19:36
2017-04-24T09:24:40
Java
UTF-8
Java
false
false
691
java
package com.datadog.debugger; public class CapturedSnapshot16 { public int overload() { return 42; } public int overload(String s, Object[] args) { return Integer.parseInt(s); } public int overload(String s, int i1, int i2, int i3) { return Integer.parseInt(s) + i1 + i2 + i3; } public int overload(String s, double d) { return Integer.parseInt(s) + (int)d; } public static int main(String arg) { CapturedSnapshot16 cs16 = new CapturedSnapshot16(); int sum = 0; sum += cs16.overload(); sum += cs16.overload("1", new Object[] { 1, 2 }); sum += cs16.overload("2", 3, 4, 5); sum += cs16.overload("3", 3.14); return sum; } }
[ "jean-philippe.bempel@datadoghq.com" ]
jean-philippe.bempel@datadoghq.com
4dd5940c079a203f68343cdcea5741956d89e1db
b4307ca2f116a822b9ce8f70878364fbe784b98f
/src/PairSumDivisibility.java
a64f00cb671ad41e2a6bbd8785f1abc18b188b18
[]
no_license
anandkrrai/CompetitiveCoding
b5683d4d1e6f37ba9a4f2fd4a92f7f4668b740ce
63347ee9d571f862bc3ff938b5d96e7fb009764a
refs/heads/master
2023-01-03T06:42:34.054882
2020-10-30T21:25:40
2020-10-30T21:25:40
115,263,952
1
7
null
2020-10-30T21:25:41
2017-12-24T13:17:22
Java
UTF-8
Java
false
false
1,377
java
import java.util.HashMap; import java.util.Scanner; public class PairSumDivisibility { public static boolean doesExist(int[] arr, int target) { HashMap<Integer, Integer> map = new HashMap<Integer, Integer>(); for (int i : arr) { int val; if (i < 0) { val = i % target; val += target; } else { val = i % target; } map.put(val, map.getOrDefault(val, 0) + 1); } if (target % 2 == 0) if (map.getOrDefault(target / 2, 0) % 2 != 0) { return false; } if ((map.getOrDefault(0, 0) + map.getOrDefault(target, 0)) % 2 != 0) return false; for (int i = 1; i < target / 2; ++i) { if (map.get(i) != map.get(target - i)) return false; } return true; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); // Taking input for the arrays. int N = sc.nextInt(); int[] array1 = new int[N]; for (int i = 0; i < N; i++) { int n = sc.nextInt(); array1[i] = n; } int K = sc.nextInt(); if (doesExist(array1, K)) { System.out.println("Yes"); } else { System.out.println("No"); } } // Function to print an array. You can use it for debugging purposes. // It takes as input the array to be displayed. public static void printArray(int[] arr) { for (int i = 0; i < arr.length; i++) { System.out.print(arr[i] + " "); } System.out.println(); } }
[ "kumar.anand.rai@gmail.com" ]
kumar.anand.rai@gmail.com
54fdf66a80d3719697d8cfe9b7ac344b605bd651
fb36b7cb63d4a0a030d426ce7faacf2b7aee4c83
/src/Part2/ReadMe.java
3580ad5fa8776ada679a95844124509fc6b7244f
[]
no_license
vivolric/saturdayProject10
bf15234f308a5241ee11ca07d7a6555cdc53438a
532c2204e6f711d13624248cfb4563f58af2f534
refs/heads/master
2022-11-05T12:33:27.090035
2020-06-22T16:59:13
2020-06-22T16:59:13
274,195,044
0
0
null
null
null
null
UTF-8
Java
false
false
1,497
java
package Part2; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class ReadMe { /* 1) Navigate to https://demo.applitools.com/ 2) Enter the username as "ttechno@gmail.com" 3) Enter the password as "techno123." 4) Click on sign in button 5) Get the following text and print it --> Your nearest branch closes in: 30m 5s is displayed 6) Print the URL */ public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "/Users/bulut/Selenium/chromedriver"); WebDriver driver = new ChromeDriver(); // this will open the chrome browser driver.navigate().to("https://demo.applitools.com/"); // driver.findElement(By.id("username")).sendKeys("ttechno@gmail.com"); this is other way WebElement username = driver.findElement(By.id("username")); username.sendKeys("ttechno@gmail.com"); WebElement password = driver.findElement(By.id("password")); password.sendKeys("techno123."); WebElement clickSignIn = driver.findElement(By.id("log-in")); clickSignIn.click(); WebElement headline = driver.findElement(By.id("time")); System.out.println(headline.getText()); String URL = driver.getCurrentUrl(); System.out.println(URL); } }
[ "yakupbulut11@gmail.com" ]
yakupbulut11@gmail.com
673e78898cc9d19742703e99cac4fd9e2ec322d8
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_32654.java
2941ad9a527e6cd40a4ec88b34f4e39c33d0a930
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
135
java
/** * Gets the number of fields in the period type. * @return the number of fields */ public int size(){ return iTypes.length; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
9e4d1ccca57c600518edd3c7c69a2f16b5071cc9
19fd05d31ff59a498206a134958beb21f5b9e2e0
/app/src/main/java/com/alpha/sanjeev/vehiclesecuritymanager/frag_2.java
8e64ab71e2328353c94844b68e267dad369dc4fe
[]
no_license
getsanjeev/Vehicle-Security-Manager
1b39023c487dbce74bac21f6930c32380af5bd03
9ebd17c780ff2748477f8defa8aca05a27980daf
refs/heads/master
2021-01-19T03:43:37.993341
2017-10-05T12:26:09
2017-10-05T12:26:09
65,194,860
0
0
null
null
null
null
UTF-8
Java
false
false
964
java
package com.alpha.sanjeev.vehiclesecuritymanager; /** * Created by sanjeev on 17/6/16. */ import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; public class frag_2 extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.frag_2, container, false); Button history_btn = (Button) view.findViewById(R.id.history_btn); history_btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(getActivity(), History.class); startActivity(intent); } }); return view; } }
[ "getsanjeevdubey@gmail.com" ]
getsanjeevdubey@gmail.com
54eaf42ccd56bfef0c4babce40fa137a0d57f82d
7e8eaf8088c6c1bd633e131a671628b7c90c8fb8
/src/hostilelands/MapHazard.java
a7fe8ad347c8a34f78c74b6aeaf18d67f987f465
[]
no_license
Elscouta/hostilelands
8a5d6e66c6c496e5435e69096e57a3fa3f4a0405
828cee538ef103ecd829b5182343fcd5fa4bf706
refs/heads/master
2021-01-11T14:46:19.970656
2017-01-29T20:51:04
2017-01-29T20:51:04
80,213,518
0
0
null
null
null
null
UTF-8
Java
false
false
2,220
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package hostilelands; /** * * @author Elscouta */ public abstract class MapHazard extends MapEntity { /** * Represents the various strategies that a hazard can follow. * Implementations do not need to be thread-safe, as they will be * called within the lock of the hazard itself. */ public static interface Strategy { /** * Informs the implementing class the need to compute the strategy. * * @param minutes The time elapsed since the last call to computeStrategy */ void computeStrategy(int minutes); /** * Returns the current x-axis moving direction of the entity. * The (x,y) speed vector is unitary. * * @return The current x-axis direction of the entity. */ double getDirectionX(); /** * Returns the current y-axis moving direction of the entity. * The (x,y) move vector is unitary. * * @return The current y-axis direction of the entity. */ double getDirectionY(); } final Strategy strategy; protected MapHazard(String iconIdentifier, Strategy strategy) { super(iconIdentifier); this.strategy = strategy; } @Override public synchronized void simulateTime(int minutes) { final int granularity = 10; final double speed = 0.03f; double x = getX(); double y = getY(); int i = 0; while (i < minutes) { int d = granularity; if (i + granularity > minutes) d = i + granularity - minutes; strategy.computeStrategy(minutes); x += strategy.getDirectionX() * speed; y += strategy.getDirectionY() * speed; i += d; setPosition(x, y); } } }
[ "Elscouta@Elscouta-PC.home" ]
Elscouta@Elscouta-PC.home
9fa287f3b7357f12900a8e6d65c254e17d4e6b7e
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/imp-20210630/src/main/java/com/aliyun/imp20210630/models/CreateClassRequest.java
1121cb254d0f019eafd5f51853e7a1ce40972286
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,403
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.imp20210630.models; import com.aliyun.tea.*; public class CreateClassRequest extends TeaModel { @NameInMap("AppId") public String appId; @NameInMap("CreateNickname") public String createNickname; @NameInMap("CreateUserId") public String createUserId; @NameInMap("Title") public String title; public static CreateClassRequest build(java.util.Map<String, ?> map) throws Exception { CreateClassRequest self = new CreateClassRequest(); return TeaModel.build(map, self); } public CreateClassRequest setAppId(String appId) { this.appId = appId; return this; } public String getAppId() { return this.appId; } public CreateClassRequest setCreateNickname(String createNickname) { this.createNickname = createNickname; return this; } public String getCreateNickname() { return this.createNickname; } public CreateClassRequest setCreateUserId(String createUserId) { this.createUserId = createUserId; return this; } public String getCreateUserId() { return this.createUserId; } public CreateClassRequest setTitle(String title) { this.title = title; return this; } public String getTitle() { return this.title; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
a4086b4508dc9471454c0608fb8212507c978405
6e5930502bc75335ccffaaf2c83ce22c12ebddd9
/src/main/java/net/coatli/config/MyBatis.java
cac29567605becb04440d3baf44b412ce3d190d8
[]
no_license
b0gg4rd/undertow-docker-embedded-rdbms
0b8dde033a7e2f2093d20a0d4ff54488ada5daba
9bc8ab4b95b40366895c6bb824e3052c17997db3
refs/heads/master
2022-08-24T02:24:10.173223
2019-10-18T15:09:51
2019-10-18T15:09:51
215,810,920
1
1
null
2022-08-18T19:06:41
2019-10-17T14:20:14
Java
UTF-8
Java
false
false
2,199
java
package net.coatli.config; import java.util.Properties; import org.apache.ibatis.mapping.Environment; import org.apache.ibatis.session.Configuration; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; import net.coatli.domain.Person; import net.coatli.persistence.PersonsMapper; public final class MyBatis { private static final Logger LOGGER = LogManager.getLogger(MyBatis.class); private static final String HIKARI_PROPERTIES = "/conf/hikari.properties"; private static volatile SqlSessionFactory SQL_SESSION_FACTORY = null; /** * Private explicit default constructor for {@literal Singleton} pattern. */ private MyBatis() { } public static SqlSessionFactory sqlSessionFactory() { if (SQL_SESSION_FACTORY == null) { SQL_SESSION_FACTORY = new SqlSessionFactoryBuilder().build(configuration()); LOGGER.info("'{}' initialized", SQL_SESSION_FACTORY); } return SQL_SESSION_FACTORY; } private static Configuration configuration() { try (final var inputStream = MyBatis.class.getResourceAsStream(HIKARI_PROPERTIES)) { final var properties = new Properties(); properties.load(inputStream); final var configuration = new Configuration(new Environment("production", new JdbcTransactionFactory(), new HikariDataSource(new HikariConfig(properties)))); // Aliases configuration.getTypeAliasRegistry().registerAlias(Person.class.getSimpleName(), Person.class); // Mappers configuration.addMapper(PersonsMapper.class); return configuration; } catch (final Exception exc) { LOGGER.error("Can not create SQL Session Factory", exc); throw new RuntimeException(exc.toString(), exc); } } }
[ "boggard@hotmail.com" ]
boggard@hotmail.com
47ec5d2d89933595d4c80cdc73c6f55980bae489
5f201e52fa416f563c42b882935f53357e1f1b22
/yz/leetcode/microsoft/Permutation.java
e7979d5bb47fd7767cc7a4955be9cb83c30aeb59
[]
no_license
ayumilong/Algorithm
1719724f1b7b23234826ed5f4054aad5b10f034e
21ddc949b4fea6ca1f1effb2b8efbf981abab77a
refs/heads/master
2021-01-21T04:54:27.243507
2016-05-24T02:35:49
2016-05-24T02:35:49
42,427,239
0
0
null
null
null
null
UTF-8
Java
false
false
4,655
java
/** * File Name: Permutation.java * Package Name: yz.leetcode.microsoft * Project Name: Algorithm * Purpose: * Created Time: 10:38:19 PM May 17, 2016 * Author: Yaolin Zhang */ package yz.leetcode.microsoft; import java.util.*; /** * @author Yaolin Zhang * @time 10:38:19 PM May 17, 2016 */ public class Permutation { public List<List<Integer>> permute(int[] nums) { List<List<Integer>> results = new ArrayList<>(); if(nums == null || nums.length == 0){ return results; } boolean[] flags = new boolean[nums.length]; helper(nums, flags, results, new ArrayList<Integer>()); return results; } private void helper(int[] nums, boolean[] flags, List<List<Integer>> results, List<Integer> one){ if(one.size() == nums.length){ results.add(new ArrayList<>(one)); return; } for(int i = 0; i < nums.length; ++i){ if(flags[i]){ continue; } flags[i] = true; one.add(nums[i]); helper(nums, flags, results, one); flags[i] = false; one.remove(one.size() - 1); } } //Another solution, repeatedly swap two numbers in nums public List<List<Integer>> permute1(int[] nums) { List<List<Integer>> results = new LinkedList<>(); if(nums == null || nums.length == 0){ return results; } List<Integer> list = new LinkedList<>(); for(int num : nums){ list.add(num); } results.add(list); permute(nums, results, 0); return results; } private void permute(int[] nums, List<List<Integer>> results, int start){ if(start < nums.length - 1){ permute(nums, results, start + 1); } for(int i = start + 1; i < nums.length; ++i){ swap(nums, start, i); List<Integer> list = new LinkedList<>(); for(int num : nums){ list.add(num); } results.add(list); permute(nums, results, start + 1); swap(nums, start, i); } } private void swap(int[] nums, int i, int j){ int t = nums[i]; nums[i] = nums[j]; nums[j] = t; } //Permutation II with duplicate numbers: [1,1,2] public List<List<Integer>> permuteUnique(int[] nums) { List<List<Integer>> results = new ArrayList<>(); if(nums == null || nums.length == 0){ return results; } Arrays.sort(nums); boolean[] flags = new boolean[nums.length]; helper1(nums, flags, results, new ArrayList<>()); return results; } private void helper1(int[] nums, boolean[] flags, List<List<Integer>> results, List<Integer> one){ if(one.size() == nums.length){ results.add(new ArrayList<>(one)); return; } for(int i = 0; i < nums.length; ++i){ //If current number has been add to list one //Or if the previous number is the same with current number and //the previous has not been add to list one if((i != 0 && !flags[i - 1] && nums[i] == nums[i - 1]) || flags[i]){ continue; } flags[i] = true; one.add(nums[i]); helper(nums, flags, results, one); one.remove(one.size() - 1); flags[i] = false; } } public List<List<Integer>> permuteUnique1(int[] nums) { List<List<Integer>> results = new LinkedList<>(); if(nums == null || nums.length == 0){ return results; } List<Integer> list = new LinkedList<>(); for(int num : nums){ list.add(num); } results.add(list); permute1(nums, results, 0); return results; } private void permute1(int[] nums, List<List<Integer>> results, int start){ if(start < nums.length - 1){ permute(nums, results, start + 1); } HashSet<Integer> flags = new HashSet<>(); flags.add(nums[start]); for(int i = start + 1; i < nums.length; ++i){ if(flags.contains(nums[i])){ continue; } flags.add(nums[i]); swap(nums, start, i); List<Integer> list = new LinkedList<>(); for(int num : nums){ list.add(num); } results.add(list); permute(nums, results, start + 1); swap(nums, start, i); } } }
[ "ayumilong41@gmail.com" ]
ayumilong41@gmail.com
7faf2127967cbf8de3e88e6772bdba4a068998a4
d9fc33efba5753357554d22f254c4809cf22f096
/boundless/com/mob/tools/utils/SQLiteHelper.java
480182d55bc7a589e310c93ae8ed11dd3d7c7202
[]
no_license
cdfx2016/AndroidDecompilePractice
05bab3f564387df6cfe2c726cdb3f877500414f0
1657bc397606b9caadc75bd6d8a5b6db533a1cb5
refs/heads/master
2021-01-22T20:03:00.256531
2017-03-17T06:37:36
2017-03-17T06:37:36
85,275,937
1
0
null
null
null
null
UTF-8
Java
false
false
7,230
java
package com.mob.tools.utils; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import com.easemob.util.HanziToPinyin.Token; import com.xiaomi.mipush.sdk.Constants; import java.io.File; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map.Entry; public class SQLiteHelper { public static class SingleTableDB { private SQLiteDatabase db; private HashMap<String, Boolean> fieldLimits; private LinkedHashMap<String, String> fieldTypes; private String name; private String path; private String primary; private boolean primaryAutoincrement; private SingleTableDB(String path, String name) { this.path = path; this.name = name; this.fieldTypes = new LinkedHashMap(); this.fieldLimits = new HashMap(); } public void addField(String fieldName, String fieldType, boolean notNull) { if (this.db == null) { this.fieldTypes.put(fieldName, fieldType); this.fieldLimits.put(fieldName, Boolean.valueOf(notNull)); } } public void setPrimary(String fieldName, boolean autoincrement) { this.primary = fieldName; this.primaryAutoincrement = autoincrement; } private void open() { if (this.db == null) { this.db = SQLiteDatabase.openOrCreateDatabase(new File(this.path), null); Cursor cursor = this.db.rawQuery("select count(*) from sqlite_master where type ='table' and name ='" + this.name + "' ", null); boolean shouldCreate = true; if (cursor != null) { if (cursor.moveToNext() && cursor.getInt(0) > 0) { shouldCreate = false; } cursor.close(); } if (shouldCreate) { StringBuilder sb = new StringBuilder(); sb.append("create table ").append(this.name).append("("); for (Entry<String, String> ent : this.fieldTypes.entrySet()) { String field = (String) ent.getKey(); String type = (String) ent.getValue(); boolean notNull = ((Boolean) this.fieldLimits.get(field)).booleanValue(); boolean primary = field.equals(this.primary); boolean autoincrement = primary ? this.primaryAutoincrement : false; sb.append(field).append(Token.SEPARATOR).append(type); sb.append(notNull ? " not null" : ""); sb.append(primary ? " primary key" : ""); sb.append(autoincrement ? " autoincrement," : Constants.ACCEPT_TIME_SEPARATOR_SP); } sb.replace(sb.length() - 1, sb.length(), ");"); this.db.execSQL(sb.toString()); } } } private void close() { if (this.db != null) { this.db.close(); this.db = null; } } private String getName() { return this.name; } } public static SingleTableDB getDatabase(Context context, String name) { return getDatabase(context.getDatabasePath(name).getPath(), name); } public static SingleTableDB getDatabase(String path, String name) { return new SingleTableDB(path, name); } public static long insert(SingleTableDB db, ContentValues values) throws Throwable { db.open(); return db.db.replace(db.getName(), null, values); } public static int delete(SingleTableDB db, String selection, String[] selectionArgs) throws Throwable { db.open(); return db.db.delete(db.getName(), selection, selectionArgs); } public static int update(SingleTableDB db, ContentValues values, String selection, String[] selectionArgs) throws Throwable { db.open(); return db.db.update(db.getName(), values, selection, selectionArgs); } public static Cursor query(SingleTableDB db, String[] columns, String selection, String[] selectionArgs, String sortOrder) throws Throwable { db.open(); return db.db.query(db.getName(), columns, selection, selectionArgs, null, null, sortOrder); } /* JADX WARNING: inconsistent code. */ /* Code decompiled incorrectly, please refer to instructions dump. */ public static void execSQL(com.mob.tools.utils.SQLiteHelper.SingleTableDB r3, java.lang.String r4) throws java.lang.Throwable { /* r3.open(); r1 = r3.db; r1.beginTransaction(); r1 = r3.db; Catch:{ Throwable -> 0x0020 } r1.execSQL(r4); Catch:{ Throwable -> 0x0020 } r1 = r3.db; Catch:{ Throwable -> 0x0020 } r1.setTransactionSuccessful(); Catch:{ Throwable -> 0x0020 } r1 = r3.db; r1.endTransaction(); return; L_0x0020: r0 = move-exception; throw r0; Catch:{ all -> 0x0022 } L_0x0022: r1 = move-exception; r2 = r3.db; r2.endTransaction(); throw r1; */ throw new UnsupportedOperationException("Method not decompiled: com.mob.tools.utils.SQLiteHelper.execSQL(com.mob.tools.utils.SQLiteHelper$SingleTableDB, java.lang.String):void"); } public static Cursor rawQuery(SingleTableDB db, String script, String[] selectionArgs) throws Throwable { db.open(); return db.db.rawQuery(script, selectionArgs); } /* JADX WARNING: inconsistent code. */ /* Code decompiled incorrectly, please refer to instructions dump. */ public static int getSize(com.mob.tools.utils.SQLiteHelper.SingleTableDB r6) throws java.lang.Throwable { /* r6.open(); r1 = 0; r0 = 0; r3 = r6.db; Catch:{ Throwable -> 0x0034 } r4 = new java.lang.StringBuilder; Catch:{ Throwable -> 0x0034 } r4.<init>(); Catch:{ Throwable -> 0x0034 } r5 = "select count(*) from "; r4 = r4.append(r5); Catch:{ Throwable -> 0x0034 } r5 = r6.getName(); Catch:{ Throwable -> 0x0034 } r4 = r4.append(r5); Catch:{ Throwable -> 0x0034 } r4 = r4.toString(); Catch:{ Throwable -> 0x0034 } r5 = 0; r0 = r3.rawQuery(r4, r5); Catch:{ Throwable -> 0x0034 } r3 = r0.moveToNext(); Catch:{ Throwable -> 0x0034 } if (r3 == 0) goto L_0x0030; L_0x002b: r3 = 0; r1 = r0.getInt(r3); Catch:{ Throwable -> 0x0034 } L_0x0030: r0.close(); return r1; L_0x0034: r2 = move-exception; throw r2; Catch:{ all -> 0x0036 } L_0x0036: r3 = move-exception; r0.close(); throw r3; */ throw new UnsupportedOperationException("Method not decompiled: com.mob.tools.utils.SQLiteHelper.getSize(com.mob.tools.utils.SQLiteHelper$SingleTableDB):int"); } public static void close(SingleTableDB db) { db.close(); } }
[ "残刀飞雪" ]
残刀飞雪
2532ae4384b14112ff92f417d2706448462dd82b
7e73b8c9ebe8a5cb69bed85921373dfc9eb64ae2
/HR190032_BerkayBaranFinal/app/src/main/java/com/hr190032/berkay_baran_final/activity/CepheDetayActivity.java
aa2fb294c1391087a5a7f4972e075e803466563f
[ "MIT" ]
permissive
BerkayBaran/Donum-Noktasi-Java-Tabanli-Mobil-Program
21366f4067ff0fedd21c14bf9bfa36aa73e8d684
ee459c228c04a5007f4eec43a6a14718934c50e0
refs/heads/main
2023-02-16T23:07:56.147597
2021-01-18T20:42:36
2021-01-18T20:42:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,516
java
package com.hr190032.berkay_baran_final.activity; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.webkit.WebView; import android.widget.ImageView; import android.widget.TextView; import com.hr190032.berkay_baran_final.R; import com.hr190032.berkay_baran_final.model.CepheModel; import com.hr190032.berkay_baran_final.util.Constants; import com.hr190032.berkay_baran_final.util.GlideUtil; import com.hr190032.berkay_baran_final.util.ObjectUtil; public class CepheDetayActivity extends AppCompatActivity { ImageView imgKapak; TextView txtBaslik; //Burada activity_cephe_detay'daki bulunan ogeleri tanıtmak icin yeni itemler olusturuyoruz TextView txtDetay; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_cephe_detay); init(); } private void init(){ String tasinanCepheString = getIntent().getStringExtra(Constants.NAME_OF_THE_SELECTED_CEPHE); CepheModel cepheModel = ObjectUtil.jsonStringToCephe(tasinanCepheString); imgKapak = findViewById(R.id.imgBannerDetail); txtBaslik = findViewById(R.id.txtTitle); //burada ise onları esitliyoruz txtDetay = findViewById(R.id.txtDetail); txtBaslik.setText(cepheModel.getCephe()); txtDetay.setText(cepheModel.getAciklama()); GlideUtil.showImage(getApplicationContext(),cepheModel.getKapakUrl(),imgKapak); } }
[ "berkaybara@gmail.com" ]
berkaybara@gmail.com
b7be57dcef9ddda49ca6879e04b328a6612cc739
a1996b53fccf024f769b3e99d8dffdf7c1856f8b
/src/main/java/com/ssafy/happyhouse/dao/HouseDao.java
f7b8066dbafdcc5cda93b379f8cff06d6db276b9
[]
no_license
leechaeyeong/HappyHouse
e1aa55043ea75db102d1ae43353f50fc45f71eca
e134e58fbfe4222f4c88692ede816ff6f002c7b0
refs/heads/master
2023-01-30T16:26:46.745155
2020-06-10T05:03:05
2020-06-10T05:03:05
321,242,262
0
0
null
null
null
null
UTF-8
Java
false
false
397
java
package com.ssafy.happyhouse.dao; import java.sql.SQLException; import java.util.List; import com.ssafy.happyhouse.dto.HouseDeal; public interface HouseDao { public HouseDeal search(int no) throws Exception; public List<HouseDeal> listAptmt(int currentPage, int sizePerPage, String key, String word) throws Exception; public int getTotalCount(String key, String word) throws SQLException; }
[ "mjskks94@naver.com" ]
mjskks94@naver.com
2ffbf3f4bbbaa3cc4e97184d0ee1467b895d7505
94efbe909d981b21914ff574a59ca975763268eb
/src/cn/xyb/bean/FunDetailList.java
892d975e8f7c2685af0b467d7cbba07db77b7b98
[]
no_license
fyq-github/XYBProject
90d54097c4a3f06367e5ca14d0327e24bdc4b0c2
0cb5651f86f2dd233b92ec5b18f2bd67b2807908
refs/heads/master
2020-05-17T20:49:43.081366
2015-07-13T06:49:43
2015-07-13T06:49:43
38,995,105
1
1
null
null
null
null
UTF-8
Java
false
false
492
java
package cn.xyb.bean; import java.io.Serializable; import java.util.List; import cn.xyb.model.fun.FunDetail; public class FunDetailList implements Serializable { private int funid; private List<FunDetail> funDetaillist; public int getFunid() { return funid; } public void setFunid(int funid) { this.funid = funid; } public List<FunDetail> getFunDetaillist() { return funDetaillist; } public void setFunDetaillist(List<FunDetail> funDetaillist) { this.funDetaillist = funDetaillist; } }
[ "850513335" ]
850513335
2730cbbe1f2aaace6d041deba7cf9da99808817e
94f050b05aea127449d54817663fd0b15ea370db
/Project Code/src/main/java/World/AbstractShapes/Cube.java
ca06e57659d50e378a4d8829d812f426fa53d51d
[]
no_license
SunnyD121/Capstone
04a17d9d57211839e1c3f18df50125495728400a
98e32b52e8ddbbe94e426589934941e5e301c22c
refs/heads/master
2020-03-19T03:45:35.841870
2018-05-05T21:10:00
2018-05-05T21:10:00
135,759,323
0
0
null
null
null
null
UTF-8
Java
false
false
4,920
java
package World.AbstractShapes; import World.TriangleMesh; import com.jogamp.opengl.util.GLBuffers; import org.joml.Vector3f; import java.nio.FloatBuffer; import java.nio.IntBuffer; /** * Created by (User name) on 7/25/2017. */ public class Cube extends TriangleMesh { private float sideLength; public Cube (float side){ sideLength = side; } @Override public float getLength() { return sideLength; } @Override public float getHeight() { return sideLength; } @Override public float getWidth() { return sideLength; } @Override public void init(){ if (vao != 0) { System.err.println("CUBE: VAO is not 0."); return; } float halfside = sideLength * 0.5f; float[] points = { // Front -halfside,-halfside,halfside, halfside,-halfside,halfside, halfside,halfside,halfside, -halfside,halfside,halfside, // Right halfside,-halfside,halfside, halfside,-halfside,-halfside, halfside,halfside,-halfside, halfside,halfside,halfside, // Back -halfside,-halfside,-halfside, -halfside,halfside,-halfside, halfside,halfside,-halfside, halfside,-halfside,-halfside, // Left -halfside,-halfside,halfside, -halfside,halfside,halfside, -halfside,halfside,-halfside, -halfside,-halfside,-halfside, // Bottom -halfside,-halfside,halfside, -halfside,-halfside,-halfside, halfside,-halfside,-halfside, halfside,-halfside,halfside, // Top -halfside,halfside,halfside, halfside,halfside,halfside, halfside,halfside,-halfside, -halfside,halfside,-halfside }; float[] normals = { // Front 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, // Right 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, // Back 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, // Left -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, // Bottom 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, // Top 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f }; float[] tex = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f }; int[] indices = { 0,1,2,0,2,3, 4,5,6,4,6,7, 8,9,10,8,10,11, 12,13,14,12,14,15, 16,17,18,16,18,19, 20,21,22,20,22,23 }; /* //This is just the code to see how it's done. for (int i = 0; i < triangles.length; i++){ int p1 = indices[3*i]; int p2 = indices[3*i+1]; int p3 = indices[3*i+2]; Triangle t = new Triangle( new Vector3f(points[3*p1], points[3*p1+1], points[3*p1+2]), new Vector3f(points[3*p2], points[3*p2+1], points[3*p2+2]), new Vector3f(points[3*p3], points[3*p3+1], points[3*p3+2]) ); triangles[i] = t; } */ //Triangles, for use in collision detection triangles = new Triangle[indices.length/3]; for (int i = 0; i < triangles.length; i++){ triangles[i] = new Triangle( new Vector3f(points[3*indices[3*i]], points[3*indices[3*i]+1], points[3*indices[3*i]+2]), new Vector3f(points[3*indices[3*i+1]], points[3*indices[3*i+1]+1], points[3*indices[3*i+1]+2]), new Vector3f(points[3*indices[3*i+2]], points[3*indices[3*i+2]+1], points[3*indices[3*i+2]+2]) ); } IntBuffer orderBuf = GLBuffers.newDirectIntBuffer(indices); FloatBuffer vertexBuf = GLBuffers.newDirectFloatBuffer(points); FloatBuffer normalBuf = GLBuffers.newDirectFloatBuffer(normals); FloatBuffer textureBuf = GLBuffers.newDirectFloatBuffer(tex); initGpuVertexArrays(orderBuf, vertexBuf, normalBuf, null, textureBuf); } @Override public Triangle[] getTriangles() { return triangles; } }
[ "sundbeed@plu.edu" ]
sundbeed@plu.edu
81b2299436d2f070d34010ab87f3b0f24b116c6e
874e2d42e185b172d19f01a0ea82692a9203aa6d
/server/parent-skill/lk-skill/src/main/java/org/lk/skill/entiy/Seckill.java
b0d089ba52e7423ae8b33a0c23b101020fdbba51
[]
no_license
okhuandou/skill
9318494acb29b7738e9a4c1172d06ec2eb709b80
7d7f726ba89210798e39377cc32e13be0f8f46b5
refs/heads/master
2020-05-21T20:16:53.888868
2016-12-26T09:59:47
2016-12-26T09:59:47
62,381,527
0
0
null
null
null
null
UTF-8
Java
false
false
1,006
java
package org.lk.skill.entiy; import java.util.Date; /** * 商品库存 * @author morichou * */ public class Seckill { private long seckillId; private String name; private Date startTime; private Date endTime; private Date createTime; private int number; public long getSeckillId() { return seckillId; } public void setSeckillId(long seckillId) { this.seckillId = seckillId; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public int getNumber() { return number; } public void setNumber(int number) { this.number = number; } }
[ "286820336@qq.com" ]
286820336@qq.com
6b8ccf1dfedb582c58f9d4e0f3c065e478a6dadf
d264409468f151da9020b22cd793d86cf52c395f
/src/main/java/tinkersurvival/world/potion/PotionBase.java
3de83eacb33677a5ca012426363796c46a14377f
[ "MIT" ]
permissive
begrs/TinkerSurvival
0e909b54b3b66fe09f1265c24576611975081640
e625ddfad9ad077df9b9fa17405d325725752d35
refs/heads/master
2020-05-16T11:05:25.145087
2019-04-23T11:18:57
2019-04-23T11:18:57
183,004,559
0
0
NOASSERTION
2019-04-23T11:55:15
2019-04-23T11:55:14
null
UTF-8
Java
false
false
416
java
package tinkersurvival.world.potion; import net.minecraft.potion.Potion; import net.minecraft.util.ResourceLocation; import tinkersurvival.TinkerSurvival; public class PotionBase extends Potion { public PotionBase(String name, boolean harmful, int color) { super(harmful, color); setPotionName("effect." + name); setRegistryName(new ResourceLocation(TinkerSurvival.MODID + ":" + name)); } }
[ "wendallc@83864.com" ]
wendallc@83864.com
8968bbd6295e35d9af84c8730bbdfbde8bcb9976
17e24362b57c730425aff25f2f4cd364da296a0d
/app/src/main/java/com/siemanejro/siemanejroproject/utils/SharedPrefUtil.java
19b250e929ee128b9f9ee25f964d7776a996cfb6
[]
no_license
nazkord/Siemanejro
7a1b813ab62553abf41115fbefe4af8c299d2b1a
4c1c4635893a3b0975be0c1a398401879316f5d0
refs/heads/master
2022-04-10T02:38:50.657505
2020-03-04T20:51:52
2020-03-04T20:51:52
179,803,076
0
1
null
2020-03-04T19:54:05
2019-04-06T07:37:44
Java
UTF-8
Java
false
false
2,256
java
package com.siemanejro.siemanejroproject.utils; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import com.siemanejro.siemanejroproject.R; import com.siemanejro.siemanejroproject.model.User; public class SharedPrefUtil { private SharedPreferences sharedPreferences; private String KEY_ID; private String KEY_LOGIN; private String KEY_PASSWORD; private String KEY_TOKEN; public SharedPrefUtil(Context context) { KEY_ID = context.getString(R.string.shPref_id_key); KEY_LOGIN = context.getString(R.string.shPref_login_key); KEY_PASSWORD = context.getString(R.string.shPref_password_key); KEY_TOKEN = context.getString(R.string.shPref_token_key); String KEY_LOGIN = context.getString(R.string.login_preferences_key); this.sharedPreferences = context.getSharedPreferences(KEY_LOGIN, Context.MODE_PRIVATE); } public User getLoggerUser() { long id = sharedPreferences.getLong(KEY_ID, 0); String userName = sharedPreferences.getString(KEY_LOGIN, null); String userPassword = sharedPreferences.getString(KEY_PASSWORD, null); if(id == 0 && userName == null && userPassword == null) { return null; } else { return new User(id, userName, userPassword); } } public void setLoggerUser(User user) { SharedPreferences.Editor prefEditor = sharedPreferences.edit(); prefEditor.putString(KEY_LOGIN, user.getName()); prefEditor.putString(KEY_PASSWORD, user.getPassword()); prefEditor.putLong(KEY_ID, user.getId()); prefEditor.apply(); } public void deleteLoggedUser() { SharedPreferences.Editor prefEditor = sharedPreferences.edit(); prefEditor.remove(KEY_LOGIN); prefEditor.remove(KEY_PASSWORD); prefEditor.remove(KEY_ID); prefEditor.apply(); } public String getToken() { return sharedPreferences.getString(KEY_TOKEN, null); } public void setToken(String token) { SharedPreferences.Editor prefEditor = sharedPreferences.edit(); prefEditor.putString(KEY_TOKEN, token); prefEditor.apply(); } }
[ "nazkord@gmail.com" ]
nazkord@gmail.com
da6ff0776361724d5797f270e669bf4c1cf927fb
2dd7ab647f1d8c086f90d618af7fd1254cfed552
/src/main/java/org/flysli/gadget/plugins/transfer/annotation/Import.java
f65f1a683710f0be76744646b4a8a66e4e4c1742
[]
no_license
lifeifeixz/jst
434c1ae49cd7144d512e3e10bab4a9cc4093d2c0
7f732be4ca85851470b95c5a9d334cdefab9f039
refs/heads/master
2020-05-15T15:30:49.411548
2019-06-18T14:04:59
2019-06-18T14:04:59
182,375,359
0
0
null
null
null
null
UTF-8
Java
false
false
320
java
package org.flysli.gadget.plugins.transfer.annotation; import java.lang.annotation.*; @Documented @Inherited @Target({ElementType.ANNOTATION_TYPE,ElementType.METHOD,ElementType.TYPE,ElementType.PACKAGE,ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) public @interface Import { Class<?>[] procers(); }
[ "lifeifeixz@sina.cn" ]
lifeifeixz@sina.cn
5923a8ab42d4cf911aed71ae99bc23fb7d890792
3ec56b5241f0abd253f9b27ad83cb116a05af172
/src/main/java/com/woostore/entity/commerce/TransactionStatus.java
d86977485285971e066a77f28689dedbeb0f081d
[]
no_license
myzenon/woostore
ddfdac747b490b80618626448f34ba16bf103599
cb013c5f88365e69cd05b9312ba574a111e45b0a
refs/heads/master
2021-03-19T16:30:26.210044
2017-05-16T10:12:06
2017-05-16T10:12:06
91,099,629
0
1
null
null
null
null
UTF-8
Java
false
false
100
java
package com.woostore.entity.commerce; public enum TransactionStatus { PENDING, PAID, SHIPPED }
[ "si.zenon@gmail.com" ]
si.zenon@gmail.com
982511425d564f3e7af713e3eb79b6ca8f7e629a
adb855f3c735c9cabd2aa9b9fc9b047826efd4c9
/player/app/src/main/java/com/example/sharemusicplayer/localPlayer/fragment/LocalPlayerFragment.java
9db8b53774d670c3cec9799bfc93a2f9b324ae24
[]
no_license
huangtingxiang/shareMusicApi
78bdb08d044ce477a3d35066f99dc69185a258dd
f1317624b60c1b1d4f31a4957ca7ae8e7e51ce05
refs/heads/master
2022-12-26T03:03:04.653518
2021-05-29T06:53:26
2021-05-29T06:53:26
245,823,943
0
1
null
2022-12-10T20:53:34
2020-03-08T13:54:59
Python
UTF-8
Java
false
false
12,438
java
package com.example.sharemusicplayer.localPlayer.fragment; import android.Manifest; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import androidx.appcompat.widget.SearchView; import androidx.appcompat.widget.Toolbar; import androidx.core.app.ActivityCompat; import androidx.core.content.FileProvider; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.os.Environment; import android.view.Gravity; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import com.example.sharemusicplayer.R; import com.example.sharemusicplayer.Utils.MusicUtils; import com.example.sharemusicplayer.entity.Song; import com.example.sharemusicplayer.localPlayer.view.ActionMenuAdapter; import com.example.sharemusicplayer.localPlayer.view.LocalSongsAdapter; import com.example.sharemusicplayer.musicPlayer.activities.PlayerActivity; import com.google.android.material.snackbar.Snackbar; import com.google.gson.Gson; import com.leon.lfilepickerlibrary.LFilePicker; import com.orhanobut.dialogplus.DialogPlus; import com.orhanobut.dialogplus.ListHolder; import com.orhanobut.dialogplus.OnItemClickListener; import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import static android.content.Context.MODE_PRIVATE; public class LocalPlayerFragment extends Fragment { private RecyclerView songsView; // 歌曲列表滑动条 private RecyclerView.LayoutManager layoutManager; private LocalSongsAdapter songsAdapter; // 本地歌曲adapter private Toolbar myToolbar; // 操作栏 ActionMenuAdapter.ActionMenu deleteAction; ActionMenuAdapter.ActionMenu removeAction; ActionMenuAdapter.ActionMenu openAction; private static final int OPEN_DIRECTORY = 1; private static final int WRITE_EXTERNAL_STORAGE_CODE = 2; Song[] songList = new Song[0]; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.local_player_fragment, container, false); // 设置操作栏动作 removeAction = new ActionMenuAdapter.ActionMenu(); removeAction.setDrawable(getContext().getDrawable(R.drawable.ic_baseline_remove_circle_outline_24)); removeAction.setText("从列表中删除"); removeAction.setL((view) -> { }); deleteAction = new ActionMenuAdapter.ActionMenu(); deleteAction.setDrawable(getContext().getDrawable(R.drawable.ic_baseline_delete_24)); deleteAction.setText("删除本地文件"); deleteAction.setL((view) -> { return; }); openAction = new ActionMenuAdapter.ActionMenu(); openAction.setDrawable(getContext().getDrawable(R.drawable.ic_baseline_folder_open_24)); openAction.setText("打开本地文件"); openAction.setL((view) -> { return; }); // 设置本地歌曲列表 songsView = rootView.findViewById(R.id.local_songs); songsView.setHasFixedSize(true); layoutManager = new LinearLayoutManager(getContext()); songsView.setLayoutManager(layoutManager); songsAdapter = new LocalSongsAdapter(songList, new LocalSongsAdapter.SongClickListener() { @Override public void onClick(Song song, int position) { ((PlayerActivity) getActivity()).setPlayList(songsAdapter.getSongList(), position); ((PlayerActivity) getActivity()).replay(); } }, false, new LocalSongsAdapter.ActionClickListener() { @Override public void onClick(View view, Song song) { // 点击action时显示dialog List<ActionMenuAdapter.ActionMenu> actionMenus = new ArrayList<>(); actionMenus.add(removeAction); actionMenus.add(openAction); actionMenus.add(deleteAction); DialogPlus dialog = DialogPlus.newDialog(LocalPlayerFragment.this.getActivity()) .setAdapter(new ActionMenuAdapter(actionMenus)) .setContentHolder(new ListHolder()) .setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(DialogPlus dialog, Object item, View view, int position) { } }) .setCancelable(true) .setGravity(Gravity.BOTTOM) .setContentHeight(ViewGroup.LayoutParams.WRAP_CONTENT) .setExpanded(false) // This will enable the expand feature, (similar to android L share dialog) .create(); removeAction.setL((view1) -> { songsAdapter.removeSong(song); LocalPlayerFragment.this.songList = songsAdapter.getSongList(); saveSongList(); if (dialog.isShowing()) { dialog.dismiss(); } }); openAction.setL((view1) -> { Uri selectedUri = Uri.parse(song.getSong_url()); Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setDataAndType(selectedUri, "resource/folder"); startActivity(intent); startActivity(intent); if (dialog.isShowing()) { dialog.dismiss(); } }); deleteAction.setL((view1) -> { songsAdapter.removeSong(song); LocalPlayerFragment.this.songList = songsAdapter.getSongList(); saveSongList(); if (dialog.isShowing()) { dialog.dismiss(); } }); dialog.show(); } }); songsView.setAdapter(songsAdapter); // 从本地数据库中读取存储的歌曲信息 SharedPreferences pre = this.getActivity().getSharedPreferences(getResources().getString(R.string.local_songs), MODE_PRIVATE); final String songListJson = pre.getString(getResources().getString(R.string.local_songs_list), ""); Gson gson = new Gson(); Song[] songs = gson.fromJson(songListJson, Song[].class); if (songs != null) { songList = songs; songsAdapter.setSongs(songList); } // 设置搜索菜单 myToolbar = rootView.findViewById(R.id.my_toolbar2); myToolbar.inflateMenu(R.menu.local_menu); setHasOptionsMenu(true); // 监听搜索框清空、文字变动的事件 final SearchView searchView = (SearchView) myToolbar.getMenu().findItem(R.id.local_songs_search).getActionView(); searchView.setOnCloseListener(new SearchView.OnCloseListener() { @Override public boolean onClose() { songsAdapter.setSongs(LocalPlayerFragment.this.songList); return false; } }); searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { @Override public boolean onQueryTextSubmit(final String query) { searchView.clearFocus(); return true; } @Override public boolean onQueryTextChange(String newText) { Song[] songs = Arrays.stream(LocalPlayerFragment.this.songList).filter(x -> x.getName().contains(newText)).toArray(Song[]::new); songsAdapter.setSongs(songs); return false; } }); // 监听导入本地音乐和清空播放列表 myToolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { switch (item.getItemId()) { // 导入本地音乐选项 case R.id.import_local_music: if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) { selectFiles(); // 选择文件 } else { ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_EXTERNAL_STORAGE_CODE); } break; case R.id.clear_local_music: // 清除保存歌曲列表 SharedPreferences.Editor edit = LocalPlayerFragment.this.getActivity().getSharedPreferences(getResources().getString(R.string.local_songs), MODE_PRIVATE).edit(); edit.putString(getResources().getString(R.string.local_songs_list), ""); edit.apply(); songList = new Song[0]; songsAdapter.setSongs(songList); break; default: break; } return true; } }); return rootView; } /** * 打开选择框选择音频文件 */ public void selectFiles() { new LFilePicker() .withSupportFragment(LocalPlayerFragment.this) .withStartPath("/storage/emulated/0/netease/cloudmusic/Music/") .withRequestCode(OPEN_DIRECTORY) .withFileFilter(new String[]{".mp3", ".MP3"}) .withMutilyMode(true) .withTitle("选择导入音频文件") .start(); } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { switch (requestCode) { case WRITE_EXTERNAL_STORAGE_CODE: { // If request is cancelled, the result arrays are empty. if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { selectFiles(); } else { Snackbar.make(myToolbar, "请允许读写存储器权限!", Snackbar.LENGTH_SHORT) .show(); } return; } } } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case LocalPlayerFragment.OPEN_DIRECTORY: if (resultCode == Activity.RESULT_OK) { // 获取导入文件的列表 // 根据文件路径读取相应歌曲信息 并转化为song实体 // 显示到列表中 List<Song> songList = new ArrayList<>(); for (String path : data.getStringArrayListExtra("paths")) { songList.add(MusicUtils.getMusicData(path)); } songsAdapter.addSongsToFirst(songList.toArray(new Song[songList.size()])); LocalPlayerFragment.this.songList = songsAdapter.getSongList(); saveSongList(); } break; } } private void saveSongList() { // 将本地歌单保存到数据库中 Gson gson = new Gson(); String songListJson = gson.toJson(LocalPlayerFragment.this.songList); // 将歌单列表化为json字符串 SharedPreferences.Editor edit = LocalPlayerFragment.this.getActivity().getSharedPreferences(getResources().getString(R.string.local_songs), MODE_PRIVATE).edit(); edit.putString(getResources().getString(R.string.local_songs_list), songListJson); edit.apply(); } }
[ "2228672279@qq.com" ]
2228672279@qq.com
ed4b360f0bc8d44468523ae7c834c859943ef4b9
a00faaf577d3fc490bb80a9f89df6307f838356b
/CREAM/src/com/example/CREAM/FeedReaderContract.java
5e5d9afa5ea07ef28f5d28a4ba75bbdd8d288fa6
[]
no_license
minh27/Cream
736534a4cc7133f052a9a2a631925b89a2a135bd
7ed5b164268d016d2beec91065f4ff9e86e5d916
refs/heads/master
2016-09-05T12:26:14.583470
2013-10-10T01:43:51
2013-10-10T01:43:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,478
java
package com.example.CREAM; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.provider.BaseColumns; /** * Created with IntelliJ IDEA. * User: Minh * Date: 8/10/13 * Time: 4:17 PM * To change this template use File | Settings | File Templates. */ public final class FeedReaderContract { // To prevent someone from accidentally instantiating the contract class, // give it an empty constructor. public FeedReaderContract() {} /* Inner class that defines the table contents */ public static abstract class FeedEntry implements BaseColumns { public static final String TABLE_NAME = "entry"; public static final String COLUMN_NAME_ENTRY_ID = "entryid"; public static final String COLUMN_NAME_TITLE = "title"; public static final String COLUMN_NAME_SUBTITLE = "subtitle"; } private static final String TEXT_TYPE = " TEXT"; private static final String COMMA_SEP = ","; private static final String SQL_CREATE_ENTRIES = "CREATE TABLE " + FeedEntry.TABLE_NAME + " (" + FeedEntry._ID + " INTEGER PRIMARY KEY," + FeedEntry.COLUMN_NAME_ENTRY_ID + TEXT_TYPE + COMMA_SEP + FeedEntry.COLUMN_NAME_TITLE + TEXT_TYPE + COMMA_SEP + " )"; private static final String SQL_DELETE_ENTRIES = "DROP TABLE IF EXISTS " + FeedEntry.TABLE_NAME; public class FeedReaderDbHelper extends SQLiteOpenHelper { // If you change the database schema, you must increment the database version. public static final int DATABASE_VERSION = 1; public static final String DATABASE_NAME = "FeedReader.db"; public FeedReaderDbHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } public void onCreate(SQLiteDatabase db) { db.execSQL(FeedReaderContract.SQL_CREATE_ENTRIES); } public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // This database is only a cache for online data, so its upgrade policy is // to simply to discard the data and start over db.execSQL(SQL_DELETE_ENTRIES); onCreate(db); } public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { onUpgrade(db, oldVersion, newVersion); } } }
[ "minh_lee27@hotmail.com" ]
minh_lee27@hotmail.com
6b99c5bd51d553b7f541d864986350d98bb0bb3e
4d1a6d895ab05f82577df3c1feb795f160d60cd3
/src/decent/sample/Sample.java
ec31fd3571f61cd0650b686b6da5b4a0e8bbc399
[]
no_license
DECENTSoftwareAssessment/decent_sample
e5fc7a35b7e50832fb3d63e9e770cea7d62e8102
5f88fd1b0309ee3b35fc094863b265a606423f4e
refs/heads/master
2021-01-10T17:53:10.900223
2015-02-17T17:38:29
2015-02-17T17:38:29
36,804,414
0
0
null
null
null
null
UTF-8
Java
false
false
701
java
package decent.sample; public class Sample { public void go() { System.out.println("Hello I!"); System.out.println("Hello We!"); System.out.println("Hello World!"); System.out.println("Hello Universe!"); System.out.println("Hello Multiverses!"); goFurther(); } private void goFurther() { System.out.println("... and further where no man has gone before!"); boolean shallGo = true; if (shallGo) { goEvenFurther(); } } private void goEvenFurther() { System.out.println("... and further into layers!"); for (int i=0; i<5; i++) { for (int j=0; i<5; i++) { for (int k=0; i<5; i++) { System.out.println(" " +i+" -> "+j+" -> "+k + " !"); } } } } }
[ "philip.makedonski@gmail.com" ]
philip.makedonski@gmail.com
14f46ca2e53f3b6764dbc66da1f7b0a00bbc43b3
b2f2a2d2e6c42eb4457ba61de3b5dbd4a383adb6
/Notification/app/src/test/java/com/tushant/notification/ExampleUnitTest.java
c102728b7410741d48e153cb16ec2857f87f9829
[]
no_license
TushantBhatia/AndroidProjects
3d2c80019b8d8305175d316f6b272b1d85dbb74b
8b84e669c8ae5dcea00c5fe65163639ea8cf9c91
refs/heads/master
2021-01-01T19:57:49.582974
2017-07-29T11:53:01
2017-07-29T11:53:01
98,729,276
0
0
null
null
null
null
UTF-8
Java
false
false
402
java
package com.tushant.notification; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "tushantbhatia97@gmail.com" ]
tushantbhatia97@gmail.com
82bd663b43211b6c7d7191893f8987433a0e443f
1698eaa2d9ffaac28ced3b4239a8de9f2621b032
/com/sun/corba/se/PortableActivationIDL/LocatorPackage/ServerLocationPerORBHelper.java
18f26b6fcf840e728a8a8a928a1bb1c4f1b4dde1
[]
no_license
k42jc/java8-src
ff264ce6669dc46b4362a190e3060628b87d0503
0ff109df18e441f698a5b3f8cd3cb76cc796f9b8
refs/heads/master
2020-03-21T08:09:28.750430
2018-07-09T14:58:34
2018-07-09T14:58:34
138,324,536
1
1
null
null
null
null
UTF-8
Java
false
false
3,436
java
package com.sun.corba.se.PortableActivationIDL.LocatorPackage; /** * com/sun/corba/se/PortableActivationIDL/LocatorPackage/ServerLocationPerORBHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/workspace/8-2-build-windows-i586-cygwin/jdk8u144/9417/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl * Friday, July 21, 2017 9:58:50 PM PDT */ abstract public class ServerLocationPerORBHelper { private static String _id = "IDL:PortableActivationIDL/Locator/ServerLocationPerORB:1.0"; public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; private static boolean __active = false; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); _members0[0] = new org.omg.CORBA.StructMember ( "hostname", _tcOf_members0, null); _tcOf_members0 = com.sun.corba.se.PortableActivationIDL.EndPointInfoHelper.type (); _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0); _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.corba.se.PortableActivationIDL.EndpointInfoListHelper.id (), "EndpointInfoList", _tcOf_members0); _members0[1] = new org.omg.CORBA.StructMember ( "ports", _tcOf_members0, null); __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORBHelper.id (), "ServerLocationPerORB", _members0); __active = false; } } } return __typeCode; } public static String id () { return _id; } public static com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB read (org.omg.CORBA.portable.InputStream istream) { com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB value = new com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB (); value.hostname = istream.read_string (); value.ports = com.sun.corba.se.PortableActivationIDL.EndpointInfoListHelper.read (istream); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB value) { ostream.write_string (value.hostname); com.sun.corba.se.PortableActivationIDL.EndpointInfoListHelper.write (ostream, value.ports); } }
[ "liao" ]
liao