blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
sequencelengths
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
sequencelengths
1
1
author_id
stringlengths
0
313
75b00b128d6033385b59c140cace3ad2bed309b6
2df6bdc18fc913bd7dc704f1c1199641e4480cea
/Lavoro/Lavoro.java
c15ecd4220f5412ead585c0e60e7c935b0004e3d
[]
no_license
GianlucaVeschi/Algorithms-in-Java
bb71a50f68d11ae59c62cb7218e528dee1d6007f
dc23f817f293aa3cfcccb8ae33bc54df4805c243
refs/heads/master
2020-03-16T18:57:23.859164
2018-05-10T12:06:51
2018-05-10T12:06:51
132,893,994
0
0
null
null
null
null
UTF-8
Java
false
false
330
java
public class Lavoro extends Attivita implements Comparable<Attivita>{ // CAMPI // COSTRUTTORI public Lavoro(int giorno, int ora_inizio, String nome_progetto){ super(giorno, ora_inizio, nome_progetto); } // METODI public String toString(){ return super.toString() + " lavoro su progetto "+this.getNomeProgetto(); } }
b2cabb24b466cfb7ef74d1e7630b3fb370bd04b6
7e7af445b226ef0bdc51e1b2d9acaa62143444f2
/multithreading/src/chapter02/section_2_1/section_2_1_3/Run.java
4ab8fd24f4e7a0699742daca042ac8a6712a8c1a
[]
no_license
coldcicada/thread
e630bdd664eaee1257ce9d8b77cc616e47bd632d
12e2b507072bfd29bdb7341011be6cd9d7f20118
refs/heads/master
2021-04-17T01:45:53.706142
2020-04-04T13:22:58
2020-04-04T13:22:58
249,401,213
0
0
null
null
null
null
UTF-8
Java
false
false
386
java
package chapter02.section_2_1.section_2_1_3; public class Run { public static void main(String[] args) { HasSelfPrivateNum numRef1 = new HasSelfPrivateNum(); HasSelfPrivateNum numRef2 = new HasSelfPrivateNum(); ThreadA threadA = new ThreadA(numRef1); threadA.start(); ThreadB threadB = new ThreadB(numRef2); threadB.start(); } }
f456b583871589cc79590dfd826ae5a37ccc920d
ab21bbc03abcade93ca43c54598bc4ef0c2c8849
/src/test/java/katas/multicurrency/DollarTest.java
aa5ec1c67b5ef2d0f50d7a3f74319ff691598bcf
[]
no_license
bushi-go/katas-tdd
c5f09f4d05d4de97a0661d8564e61b63456e65e0
9f58a9909089f799ecafb59a4971055086e9d786
refs/heads/master
2020-04-17T19:26:17.401834
2019-01-21T19:05:10
2019-01-21T19:05:10
166,865,580
0
0
null
null
null
null
UTF-8
Java
false
false
2,027
java
package katas.multicurrency; import org.junit.Test; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; public class DollarTest { @Test public void testMultiplication(){ Money five = Money.dollar(5); assertEquals( Money.dollar(10), five.times(2)); assertEquals( Money.dollar(15), five.times(3)); } @Test public void testEquality(){ assertTrue( Money.dollar(5).equals( Money.dollar(5))); assertFalse( Money.dollar(5).equals( Money.dollar(6))); assertFalse( Money.franc(5).equals( Money.dollar(5))); } @Test public void testCurrencies(){ assertEquals("USD", Money.dollar(1).currency()); assertEquals("CHF", Money.franc(1).currency()); } @Test public void testAddition(){ Money five = Money.dollar(5); Expression expr = five.plus(Money.dollar(5)); Bank bank = new Bank(); Money ten = bank.reduce(expr, "USD"); assertTrue(Money.dollar(10).equals(ten)); } @Test public void testPlusReturnSum(){ Money five = Money.dollar(5); Expression expr = five.plus(Money.dollar(5)); Sum sum =(Sum) expr; assertEquals(five, sum.augend); assertEquals(five, sum.addend); } @Test public void testReduceSum(){ Expression sum = new Sum(Money.dollar(4), Money.dollar(3)); Bank bank = new Bank(); Money result = bank.reduce(sum, "USD"); assertEquals(Money.dollar(7), result); } @Test public void testReduceMoney(){ Bank bank = new Bank(); Money result = bank.reduce(Money.dollar(1), "USD"); assertEquals(Money.dollar(1), result); } @Test public void testReduceMoneyDifferentCurrency(){ Bank bank = new Bank(); bank.addRate("CHF", "USD", 2); Money result = bank.reduce(Money.franc(2), "CHF"); assertEquals(Money.dollar(1),result); } }
c07c9fd325d1efe410016d675e4ade90eccc3217
609c3c2c43c21863fe5319c10a56530fea799a5d
/Chapter 11/Exercise 11-3/SavingsAccount.java
259ccacc7f3f7853020f37c2d244e9263156a550
[]
no_license
Joshawott64/CSCI_1111_Object_Oriented_Programming
357a111bd73c9df099a30f81231366b43d0b7b1c
eb7f5f9d2ea5b514af0a14f6217f402aeee7d850
refs/heads/master
2023-07-18T02:51:47.057722
2021-08-12T15:20:09
2021-08-12T15:20:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
734
java
import java.util.Date; public class SavingsAccount extends Account { // Default constructor public SavingsAccount() { } public SavingsAccount(int id, double balance, double annualInterestRate, Date dateCreated) { setId(id); setBalance(balance); setAnnualInterestRate(annualInterestRate); setDateCreated(dateCreated); } // Returns string description of savings account public String toString(int id, double balance, double annualInterestRate, Date dateCreated) { String balanceF = String.format("%.2f", balance); String monthlyInterestF = String.format("%.2f", Account.getMonthlyInterest()); return "Balance: $" + balanceF + " Monthly Interest: $" + monthlyInterestF + " " + dateCreated; } }
c4ec8e0b8440d7ea1cc48ab7c9c501b27fe6b23f
6ffb6cdff6b40c0893202ddf7dc6210c3b8f0f5d
/loanquery/src/com/mcjs/service/FundStreamSeleService.java
b98dee094d000575f9c94fe981f3de1d5c9bd4ce
[]
no_license
lingxiao123/loanquery
8335affe340fef9a66519b956d3c24547e5bfddb
a47344ee5cb5600353d03b96591cee4de99551bd
refs/heads/master
2016-09-14T01:30:57.569799
2016-04-21T09:29:34
2016-04-21T09:29:34
56,758,350
0
0
null
null
null
null
UTF-8
Java
false
false
527
java
package com.mcjs.service; import java.util.List; import com.mcjs.entity.FundStreamSele; import com.mcjs.tool.PageTool; public interface FundStreamSeleService { public void addFundStreamSele(FundStreamSele fundStreamSele); public int getFundStreamSele(); public List<FundStreamSele> findFundStreamSeles(PageTool tool); public int getFundStreamSele(String where); public List<FundStreamSele> findFundStreamSeles(PageTool tool,String where); public List<FundStreamSele> findFundStreamSele(String where); }
91de96fff3de9440bbbadc15b257b01cadbcd4ca
8bf7fc828ddc913fc885d8c72585a2e5481d7d88
/app/src/main/java/zhushen/com/shejimoshi/chapter18/example1/ProxySubject.java
483c25e8714deef150592b5c4771008651ec398a
[ "MIT" ]
permissive
keeponZhang/android_design_pattern_book_source
eacfb6b6d338e7b2c52042d5a0cdb5c27e1be3ec
8c8e98c2071546da5fc517f1c937f302d3a5ec52
refs/heads/master
2022-12-16T03:43:31.622111
2020-09-11T11:43:58
2020-09-11T11:43:58
293,052,105
0
0
null
null
null
null
UTF-8
Java
false
false
353
java
package zhushen.com.shejimoshi.chapter18.example1; /** * Created by Zhushen on 2018/5/30. */ public class ProxySubject extends Subject { private RealSubject realSubject; public ProxySubject(RealSubject realSubject) { this.realSubject = realSubject; } @Override public void visit() { realSubject.visit(); } }
c204b09277dbdff888b4998615d498a5c9ee2be9
aa0c3c4fcf69127dc4d361d7c4f12dc164e3d561
/java/AULAS/src/lista4Exercicios/CadCliente.java
24a90586ed0fdd7bbb58897527d550815a370e05
[]
no_license
rodrigoroseo/turma30java
be16310ed640ff5869fc626cbdf41643f8ceb5ae
28e3951ca39568ac917369c4f405c194dbb68e56
refs/heads/main
2023-08-18T20:00:58.876333
2021-10-03T20:14:24
2021-10-03T20:14:24
388,224,797
0
0
null
null
null
null
UTF-8
Java
false
false
731
java
package lista4Exercicios; public class CadCliente { public static void main(String[] args) { Cliente cliente1 = new Cliente(); cliente1.nome = "Rodrigo"; cliente1.cpf = "11122233345"; cliente1.anoNascimento = 1998; Cliente cliente2 = new Cliente(); cliente2.nome = "Roseo"; cliente2.cpf = "111222333"; cliente2.anoNascimento = 1990; System.out.printf("NOME\t| CPF\t\t| IDADE"); System.out.printf("\n-------------------------------"); System.out.printf("\n%s\t| %s\t| %d",cliente1.nome,cliente1.validarCPF(),cliente1.calcularIdade()); System.out.printf("\n-------------------------------"); System.out.printf("\n%s\t| %s\t| %d",cliente2.nome,cliente2.validarCPF(),cliente2.calcularIdade()); } }
95ff44278375fb08fdabd13800fe99d05d76d0ec
9289413d3f638ebaf95ddc40540ef8d725f2b9b9
/java/sakila-business-webapi/src/main/java/isep/web/sakila/webapi/controller/FilmRestController.java
7e8ee4147930a3cd1647b59404ff855facfc0d89
[]
no_license
snehnain/WebLAB04
3d35c6c1a8005e10239ef777f98cd489ba6b2298
a0d182fe7eec7f1a04bdae879013ca0889ebc6e9
refs/heads/master
2021-04-25T03:31:38.240499
2017-12-28T09:32:39
2017-12-28T09:32:39
115,607,490
0
0
null
null
null
null
UTF-8
Java
false
false
3,615
java
package isep.web.sakila.webapi.controller; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.util.UriComponentsBuilder; import isep.web.sakila.webapi.model.FilmWO; import isep.web.sakila.webapi.service.FilmService; @RestController public class FilmRestController { @Autowired FilmService filmService; private static final Log log = LogFactory.getLog(FilmRestController.class); @RequestMapping(value = "/film/", method = RequestMethod.GET) public ResponseEntity<List<FilmWO>> listAllFilms() { List<FilmWO> films = filmService.findAllFilms(); if (films.isEmpty()) { return new ResponseEntity<List<FilmWO>>(HttpStatus.NO_CONTENT); } return new ResponseEntity<List<FilmWO>>(films, HttpStatus.OK); } @RequestMapping(value = "/film/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<FilmWO> getFilm(@PathVariable("id") int id) { System.out.println("Fetching Film with id " + id); FilmWO staffWO = filmService.findById(id); if (staffWO == null) { System.out.println("Film with id " + id + " not found"); return new ResponseEntity<FilmWO>(HttpStatus.NOT_FOUND); } return new ResponseEntity<FilmWO>(staffWO, HttpStatus.OK); } // -------------------Create a Film---------------------------------- @RequestMapping(value = "/film/", method = RequestMethod.POST) public ResponseEntity<Void> createFilm(@RequestBody FilmWO filmWO, UriComponentsBuilder ucBuilder) { System.out.println("Creating Film " + filmWO.getTitle()); filmService.saveFilm(filmWO); HttpHeaders headers = new HttpHeaders(); headers.setLocation(ucBuilder.path("/film/{id}").buildAndExpand(filmWO.getFilmId()).toUri()); return new ResponseEntity<Void>(headers, HttpStatus.CREATED); } @RequestMapping(value = "/filmUpdate/", method = RequestMethod.POST) public ResponseEntity<FilmWO> updateFilm(@RequestBody FilmWO filmWO, UriComponentsBuilder ucBuilder) { log.error(String.format("Updating Film %s ", filmWO.getFilmId())); FilmWO currentFilm = filmService.findById(filmWO.getFilmId()); if (currentFilm == null) { System.out.println("Film with id " + filmWO.getFilmId() + " not found"); return new ResponseEntity<FilmWO>(HttpStatus.NOT_FOUND); } currentFilm.setTitle(filmWO.getTitle()); currentFilm.setDuration(filmWO.getDuration()); filmService.updateFilm(currentFilm); return new ResponseEntity<FilmWO>(currentFilm, HttpStatus.OK); } @RequestMapping(value = "/filmDelete/{id}", method = RequestMethod.GET) public ResponseEntity<FilmWO> deleteFilm(@PathVariable("id") int id) { System.out.println("Fetching & Deleting Film with id " + id); FilmWO staffWO = filmService.findById(id); if (staffWO == null) { System.out.println("Unable to delete. Film with id " + id + " not found"); return new ResponseEntity<FilmWO>(HttpStatus.NOT_FOUND); } filmService.deleteFilmById(id); return new ResponseEntity<FilmWO>(HttpStatus.NO_CONTENT); } }
4d08b75cbab341efdab2f5ffa5385341d6fa9067
7e8b691e046c14470f2edf9d646be90432ab0922
/springmvc/src/test/java/com/apple/springmvc/dao/UserDaoTest.java
f857897764cd847c76b86284a04423a60f9ec3b6
[]
no_license
Winteren/springmvc
52379cf219214bba16f78c02b9b7752803d6ae96
21809950b6566d1e65f03fae20ecf2313e4d62f4
refs/heads/master
2020-04-03T09:54:28.997513
2016-07-06T10:12:00
2016-07-06T10:12:00
62,710,920
0
0
null
null
null
null
UTF-8
Java
false
false
695
java
package com.apple.springmvc.dao; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * UserDaoImpl Tester. * * @author renxueni * @since <pre>七月 4, 2016</pre> * @version 1.0 */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:spring/applicationContext-dao.xml", "classpath:spring/applicationContext-mvc.xml" }) public class UserDaoTest { /** * * Method: getAllUser() * */ @Test public void testGetAllUser() throws Exception { //TODO: Test goes here... } }
99b61775f10ac51e8e24ba43cc8841b31ae49fe7
ac257a668fe587822f1151e306583fa9d40f5785
/oop/src/main/java/com/w1761344/oop/cw/LeagueManager.java
c8146a05f8de468e15ede45129a17014e9b73981
[]
no_license
ashen99/PremierLeageManager
bd87080be042b79c86520d73575b19819dde454c
6ed86cecb49c61a5bf5fc15ae67093917cb571e9
refs/heads/main
2023-04-29T08:51:21.962864
2021-05-22T17:46:47
2021-05-22T17:46:47
369,856,675
1
0
null
null
null
null
UTF-8
Java
false
false
594
java
package com.w1761344.oop.cw; import java.io.IOException; import java.util.List; public interface LeagueManager { void createClub(); void deleteClub(); void displayStats(); void showTable(); void addMatch(); void saveFile(); void saveFile2(); void loadFile() throws IOException, ClassNotFoundException; void loadFile2() throws IOException, ClassNotFoundException; List<FootballClub> Pointsshow(); List<FootballClub> goalsScored(); List<FootballClub> winsShow(); List<Match> matches(); List<Match> randomMatch(); }
c31ab271057b49ccbcf8369bd46036abbd2b80a3
f59b67b7644a810ad4068df001279ea587fe2296
/spring-cloud/gateway/src/main/java/com/zkdlu/DemoFilter.java
6c9b50b78a1e165f7cee75ab249d6f46272ccf93
[]
no_license
saywithu/spring-boot
1a318631b370549e420a4b6377582701bf72ae0c
7d14c2ad737490fc97b14c2563422ba5a1611cd3
refs/heads/main
2023-06-07T11:13:08.363093
2021-06-29T12:54:43
2021-06-29T12:54:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,884
java
package com.zkdlu; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.gateway.filter.GatewayFilter; import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory; import org.springframework.stereotype.Component; import reactor.core.publisher.Mono; @Component public class DemoFilter extends AbstractGatewayFilterFactory<DemoFilter.Config> { private final Logger log = LoggerFactory.getLogger(DemoFilter.class); public DemoFilter() { super(Config.class); } @Override public GatewayFilter apply(Config config) { return ((exchange, chain) -> { log.info("DemoFilter baseMessage>>>>>>" + config.getBaseMessage()); if (config.isPreLogger()) { log.info("DemoFilter Start>>>>>>" + exchange.getRequest()); } return chain.filter(exchange).then(Mono.fromRunnable(()->{ if (config.isPostLogger()) { log.info("DemoFilter End>>>>>>" + exchange.getResponse()); } })); }); } public static class Config { private String baseMessage; private boolean preLogger; private boolean postLogger; public String getBaseMessage() { return baseMessage; } public void setBaseMessage(String baseMessage) { this.baseMessage = baseMessage; } public boolean isPreLogger() { return preLogger; } public void setPreLogger(boolean preLogger) { this.preLogger = preLogger; } public boolean isPostLogger() { return postLogger; } public void setPostLogger(boolean postLogger) { this.postLogger = postLogger; } } }
040dab000941fcc91544ec4ca441c0d8be314a68
c5f8c4f03d277c640c56925bebb778bf4930b505
/SeProject/src/day1110/network/gui/EchoServer.java
69c2cb799f18a7e08c19fc3ca299011bbbf07d09
[]
no_license
qowoeo948/java_swing_javafx
67dcd8545182c9d1ab1c6db362075a7cde2a9fcc
cb73a69a8f90629e014597a303fdccc18ee85ee1
refs/heads/master
2023-01-22T07:05:23.846706
2020-12-01T09:00:40
2020-12-01T09:00:40
307,729,305
0
0
null
null
null
null
UTF-8
Java
false
false
3,610
java
package day1110.network.gui; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.ServerSocket; import java.net.Socket; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; public class EchoServer extends JFrame{ JTextField t_port; JButton bt; JPanel p_north; JTextArea area; JScrollPane scroll; ServerSocket server; int port=7777; Thread thread ; //메인쓰레드 대신, 접속자를 감지하게 될 쓰레드!! (accept()메서드 떄문에,,) BufferedReader buffr; //듣기 (서버입장) BufferedWriter buffw;// 말하기 (써버입장) public EchoServer() { t_port = new JTextField((Integer.toString(port)),10); bt = new JButton("서버가동"); p_north = new JPanel(); area = new JTextArea(); scroll = new JScrollPane(area); //조립 p_north.add(t_port); p_north.add(bt); add(p_north,BorderLayout.NORTH); add(scroll); //가동버튼과 리스너 연결 bt.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { thread = new Thread() { @Override public void run() { startServer(); } }; thread.start(); } }); setDefaultCloseOperation(EXIT_ON_CLOSE); //윈도우창 닫기 + 프로세스종료 setVisible(true); setBounds(600,200,300,400); //x,y,width,height 순서 } //서버 가동 public void startServer() { try { server = new ServerSocket(Integer.parseInt(t_port.getText())); area.append("서버 준비\n"); //서버가동하기 //자바는 쓰레드기반이므로, 지금까지 메인실행부라 불렸던 실행조체도 사실은 시스템에 의해서 생성된 쓰레드였다. //하지만, 메인쓰레드는 개발자가 생성하는 일반쓰레드와는 하는 역할에 차이가 있다. //메인쓰레드는 프로그램을 운영해주는 역할, 특히 그래픽처리와, 이벤트처리까지 담당하므로, 절대로 //이러한 업무 금지 1) 무한루프에 빠뜨리지 말것 2) 대기상태에 빠뜨리지 말것, 예로 (accept,read()) //참고로 안드로이드에서는 메인쓰레드의 1,2번 시도자체를 에러로 본다. //결론) 별도의 쓰레드를 생성하여 처리하자!! Socket socket = server.accept(); //접속자 감지와 동시에 대화용 소켓 반환! area.append("접속자 발견\n"); buffr = new BufferedReader(new InputStreamReader(socket.getInputStream())); buffw = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); listen(); //듣기시작 } catch (NumberFormatException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } //메시지 받기 (청취) public void listen() { String msg=null; try { while(true) { msg = buffr.readLine(); area.append(msg+"\n"); //클라이언트에게 다시 보내야 한다(서버의 의무) send(msg); } } catch (IOException e) { e.printStackTrace(); } } //클라이언트에게 메시지 보내기 public void send(String msg) { try { buffw.write(msg+"\n"); buffw.flush(); } catch (IOException e) { e.printStackTrace(); } } public static void main(String[] args) { new EchoServer(); } }
f251f71e9e41b7feee8af3d32f9437b4e7765c84
d16c972976f43e0fd3747c6e9c4d5daacaa7fdff
/app/src/main/java/it/gioacchinovaiana/pizzabuona/PizzeriaFragment.java
8b01f3a013919b8850de9ab0c309db73c4e7cefe
[]
no_license
gioacchinovaiana/PizzaBuona
82e371589a41c231d43a7f16a4a6230f99ebdffc
98bcabc4534a01ccf0510e09dd87aa713b54ea48
refs/heads/master
2020-05-19T22:27:18.070804
2015-05-19T20:03:20
2015-05-19T20:03:20
35,510,262
0
0
null
null
null
null
UTF-8
Java
false
false
15,486
java
package it.gioacchinovaiana.pizzabuona; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.graphics.Color; import android.graphics.PorterDuff; import android.graphics.drawable.LayerDrawable; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.LoaderManager; import android.support.v4.content.CursorLoader; import android.support.v4.content.Loader; import android.support.v7.widget.ShareActionProvider; import android.telephony.TelephonyManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.CheckBox; import android.widget.ImageView; import android.widget.RatingBar; import android.widget.TextView; import it.gioacchinovaiana.pizzabuona.data.PizzaBuonaContratc; /** * Created by Gioacchino on 04/04/2015. */ public class PizzeriaFragment extends Fragment implements LoaderManager.LoaderCallbacks<Cursor> { private static final String LOG_TAG = PizzeriaFragment.class.getSimpleName(); private static final String FORECAST_SHARE_HASHTAG = " #PizzaBuonaApp"; private ShareActionProvider mShareActionProvider; private String mForecast; private static final int DETAIL_LOADER = 1; private static final String[] DETAIL_COLUMNS = { PizzaBuonaContratc.PizzerieEntry.TABLE_NAME + "." + PizzaBuonaContratc.PizzerieEntry.ID_PIZZERIE, //PizzaBuonaContratc.PizzerieEntry.ID_PIZZERIE, PizzaBuonaContratc.PizzerieEntry.NOME_PIZZERIA, PizzaBuonaContratc.PizzerieEntry.TITOLARE, PizzaBuonaContratc.PizzerieEntry.INDIRIZZO, PizzaBuonaContratc.PizzerieEntry.CAP, PizzaBuonaContratc.PizzerieEntry.CITTA, PizzaBuonaContratc.PizzerieEntry.PROV, PizzaBuonaContratc.PizzerieEntry.COORD1, PizzaBuonaContratc.PizzerieEntry.COORD2, PizzaBuonaContratc.PizzerieEntry.TEL1, PizzaBuonaContratc.PizzerieEntry.TEL2, PizzaBuonaContratc.PizzerieEntry.EMAIL, PizzaBuonaContratc.PizzerieEntry.FORNO, PizzaBuonaContratc.PizzerieEntry.CHIUSURA, PizzaBuonaContratc.PizzerieEntry.CELIACI, PizzaBuonaContratc.PizzerieEntry.NUMIMP, PizzaBuonaContratc.PizzerieEntry.LIEVMADR, PizzaBuonaContratc.PizzerieEntry.BIRREART, PizzaBuonaContratc.PizzerieEntry.FARINEPIETRA, PizzaBuonaContratc.PizzerieEntry.FILONE, PizzaBuonaContratc.PizzerieEntry.BOCCONE, PizzaBuonaContratc.PizzerieEntry.PIZZAIOLO, PizzaBuonaContratc.PizzerieEntry.CONTO, PizzaBuonaContratc.PizzerieEntry.DATA_RECENSIONE, PizzaBuonaContratc.PizzerieEntry.DATA_RIVALUTAZIONE, PizzaBuonaContratc.PizzerieEntry.LINK_ARTICOLO, PizzaBuonaContratc.PizzerieEntry.VALUTAZIONE }; // These indices are tied to DETAIL_COLUMNS. If DETAIL_COLUMNS changes, these // must change. public static final int COL_ID_PIZZERIE =0; public static final int COL_NOME_PIZZERIA = 1; public static final int COL_TITOLARE = 2; public static final int COL_INDIRIZZO = 3; public static final int COL_CAP = 4; public static final int COL_CITTA = 5; public static final int COL_PROV = 6; public static final int COL_COORD1 = 7; public static final int COL_COORD2 = 8; public static final int COL_TEL1 = 9; public static final int COL_TEL2 = 10; public static final int COL_EMAIL = 11;// public static final int COL_FORNO = 12; public static final int COL_CHIUSURA = 13; public static final int COL_CELIACI = 14; public static final int COL_NUMIMP = 15; public static final int COL_LIEVMADR = 16; public static final int COL_BIRREART = 17; public static final int COL_FARINEPIETRA = 18; public static final int COL_FILONE = 19; public static final int COL_BOCCONE = 20; public static final int COL_PIZZAIOLO = 21; public static final int COL_CONTO = 22; public static final int COL_DATA_RECENSIONE = 23; public static final int COL_DATA_RIVALUTAZIONE = 24; public static final int COL_LINK_ARTICOLO = 25; public static final int COL_VALUTAZIONE = 26; private TextView textView_nome_pizzeria; private TextView textView_indirizzo_pizzeria; private TextView textView_t1; private TextView textView_t2; private RatingBar ratingBar; private LayerDrawable stars; private TextView textView_pizzaiolo; private TextView textView_proprietario; private TextView textView_forno; private CheckBox check_celiaci; private CheckBox check_filone; private CheckBox check_farine_pietra; private CheckBox check_boccone; private CheckBox check_lievito_madre; private CheckBox check_birre_art; private TextView textView_num_impasti; private TextView textView_chiusura; private TextView textView_conto; private TextView textView_recensione; private TextView textView_rivalutazione; private Button button_chiama_tel1; private Button button_chiama_tel2; private ImageView image_recensione; private ImageView image_map; public PizzeriaFragment() { setHasOptionsMenu(true); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_dettaglio_pizzeria, container, false); textView_nome_pizzeria= (TextView)rootView.findViewById(R.id.textView_nome_pizzeria); textView_indirizzo_pizzeria= (TextView)rootView.findViewById(R.id.textView_indirizzo); textView_t1 = (TextView)rootView.findViewById(R.id.textView_tel1); textView_t2 = (TextView)rootView.findViewById(R.id.textView_tel2); ratingBar = (RatingBar) rootView.findViewById(R.id.rating_pizzeria); stars = (LayerDrawable) ratingBar.getProgressDrawable(); stars.getDrawable(0).setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP); stars.getDrawable(1).setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP); stars.getDrawable(2).setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_ATOP); textView_pizzaiolo= (TextView)rootView.findViewById(R.id.text_pizzaiolo); textView_proprietario = (TextView)rootView.findViewById(R.id.text_proprietario); textView_forno= (TextView)rootView.findViewById(R.id.text_forno); check_celiaci =(CheckBox) rootView.findViewById(R.id.checkBox_celiaci); check_filone =(CheckBox) rootView.findViewById(R.id.checkBox_filone); check_farine_pietra =(CheckBox) rootView.findViewById(R.id.checkBox_farine_pietra); check_boccone =(CheckBox) rootView.findViewById(R.id.checkBox_boccone); check_lievito_madre =(CheckBox) rootView.findViewById(R.id.checkBox_lievito_madre); check_birre_art = (CheckBox) rootView.findViewById(R.id.checkBox_birre_art); textView_num_impasti= (TextView)rootView.findViewById(R.id.textView_num_impasti); textView_chiusura= (TextView)rootView.findViewById(R.id.textView_chiusura); textView_conto= (TextView)rootView.findViewById(R.id.textView_conto); textView_recensione= (TextView)rootView.findViewById(R.id.textView_recensione); textView_rivalutazione= (TextView)rootView.findViewById(R.id.textView_rivalutazione); button_chiama_tel1 = (Button)rootView.findViewById(R.id.textView_tel1); button_chiama_tel2 = (Button)rootView.findViewById(R.id.textView_tel2); image_recensione = (ImageView)rootView.findViewById(R.id.imageViewSite); image_map = (ImageView)rootView.findViewById(R.id.imageViewMap); return rootView; } private Intent createShareForecastIntent() { Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); shareIntent.setType("text/plain"); shareIntent.putExtra(Intent.EXTRA_TEXT, mForecast + FORECAST_SHARE_HASHTAG); return shareIntent; } @Override public void onActivityCreated(Bundle savedInstanceState) { getLoaderManager().initLoader(DETAIL_LOADER, null, this); super.onActivityCreated(savedInstanceState); } @Override public Loader<Cursor> onCreateLoader(int id, Bundle args) { //Log.v(LOG_TAG, "In onCreateLoader"); Intent intent = getActivity().getIntent(); if (intent == null || intent.getData() == null) { return null; } // Now create and return a CursorLoader that will take care of // creating a Cursor for the data being displayed. CursorLoader myCursor = new CursorLoader( getActivity(), intent.getData(), DETAIL_COLUMNS, null, null, null ); return myCursor; } public void updateView(Uri uri){ CursorLoader myCursor = new CursorLoader( getActivity(), uri, DETAIL_COLUMNS, null, null, null ); onLoadFinished(myCursor,null); } @Override public void onLoadFinished(Loader<Cursor> loader, final Cursor data) { if (data != null && data.moveToFirst()) { // Read date from cursor and update views String indirizzo = data.getString(COL_INDIRIZZO)+", "+data.getString(COL_CITTA)+", "+data.getString(COL_PROV); setDataPizzeria(data.getString(COL_NOME_PIZZERIA),indirizzo,data.getString(COL_TEL1),data.getString(COL_TEL2),data.getFloat(COL_VALUTAZIONE),data.getString(COL_PIZZAIOLO), data.getString(COL_FORNO),data.getString(COL_CELIACI),data.getString(COL_FILONE),data.getString(COL_FARINEPIETRA),data.getString(COL_BOCCONE),data.getString(COL_LIEVMADR),data.getString(COL_BIRREART), data.getString(COL_NUMIMP),data.getString(COL_CHIUSURA),data.getString(COL_CONTO),data.getString(COL_DATA_RECENSIONE),data.getString(COL_DATA_RIVALUTAZIONE), data.getString(COL_LINK_ARTICOLO), data.getString(COL_TITOLARE),data.getString(COL_COORD1),data.getString(COL_COORD2)); } } @Override public void onLoaderReset(Loader<Cursor> loader) { } public void setDataPizzeria(final String NomePizzeria, String Indirizzo, final String T1, final String T2, Float valutazione, String pizzaiolo, String forno, String celiaci, String filone, String farinepietra, String boccone, String lievitomadre, String birreart, String numimp, String chiusura, String conto, String recensione, String rivalutazione, final String link, String proprietario, final String coord1, final String coord2){ textView_nome_pizzeria.setText(NomePizzeria); textView_indirizzo_pizzeria.setText(Indirizzo); ratingBar.setRating(valutazione); if(pizzaiolo.length()>0){textView_pizzaiolo.setText("Pizzaiolo: "+pizzaiolo);}else{textView_pizzaiolo.setText("");} if(proprietario.length()>0){textView_proprietario.setText("Titolare: "+proprietario);}else{textView_proprietario.setText("");} String nomeGiorno = nomeGiornoSettimana(chiusura); if(nomeGiorno.length()>0){textView_chiusura.setText("Chiusura: "+nomeGiorno);}else{textView_chiusura.setText("");} textView_t1.setText(T1); textView_t2.setText(T2); if (celiaci.equals("Si")){ check_celiaci.setChecked(true);}else{check_celiaci.setChecked(false);} if (filone.equals("Si")){check_filone.setChecked(true);}else{check_filone.setChecked(false);} if (farinepietra.equals("Si")){check_farine_pietra.setChecked(true);}else{check_farine_pietra.setChecked(false);} if (boccone.equals("Si")){check_boccone.setChecked(true);}else{check_boccone.setChecked(false);} if (lievitomadre.equals("Si")) {check_lievito_madre.setChecked(true);}else{check_lievito_madre.setChecked(false);} if (birreart.equals("Si")) {check_birre_art.setChecked(true);}else{check_birre_art.setChecked(false);} if(forno.length()>0){textView_forno.setText("Forno: "+forno);}else{textView_forno.setText("");} if(numimp.length()>0){textView_num_impasti.setText("Numero impasti: "+numimp);}else{textView_num_impasti.setText("");} if(conto.length()>0){textView_conto.setText("Conto: € "+conto);}else{textView_conto.setText("");} if(recensione.length()>0){textView_recensione.setText("Recensione del "+recensione);}else{textView_recensione.setText("");} if(rivalutazione.length()>0){textView_rivalutazione.setText("Rivalutazione del " + rivalutazione);}else{textView_rivalutazione.setText("");} if(link.length()>0){ image_recensione.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View arg0) { String url = link; Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(url)); startActivity(i); } }); } image_map.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View arg0){ // Creates an Intent that will load a map Uri gmmIntentUri = Uri.parse("geo:" + coord1 +","+coord2+"?q="+ coord1 +","+coord2+"("+NomePizzeria+")"); Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri); mapIntent.setPackage("com.google.android.apps.maps"); startActivity(mapIntent); } }); } private String nomeGiornoSettimana(String giorno){ String nomeGiorno=""; switch (giorno){ case "Lun": nomeGiorno="Lunedi"; break; case "Mar": nomeGiorno="Martedi"; break; case "Mer": nomeGiorno="Mercoledi"; break; case "Gio": nomeGiorno="Giovedi"; break; case "Ven": nomeGiorno="Venerdi"; break; case "Sab": nomeGiorno="Sabato"; break; case "Dom": nomeGiorno="Domenica"; break; } return nomeGiorno; } }
dfd4eacd2cc21be81994a027aab51c54cb04f3a1
f100931e377c58623d6bd958eafafaf679d54488
/src/main/ru/konstpavlov/exchangeUtils/Exchange.java
7c11fc6c52010e5c2e9acb73ede3a6a2f6b14799
[]
no_license
KonstantinPavlov/SBT-Test
ed6e2438eb25c59904d3361c91ea07bfdd1bf49d
7d3aa60d77be2bf906f25d71a09c083aa6d5d9a8
refs/heads/master
2021-01-13T16:20:00.224293
2017-01-25T10:33:20
2017-01-25T10:33:20
79,887,460
0
0
null
null
null
null
UTF-8
Java
false
false
4,774
java
package main.ru.konstpavlov.exchangeUtils; import main.ru.konstpavlov.operations.ExchangeOperation; import main.ru.konstpavlov.operations.OperationFactory; import main.ru.konstpavlov.utils.SecurityType; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; public class Exchange { private OperationFactory operationFactory = new OperationFactory(); private Map<String,Client> clients = new LinkedHashMap<>(); private OperationList sellList = new OperationList(); private OperationList buyList = new OperationList(); public Exchange(String clientsFilePath, String ordersFilePath) { try( BufferedReader bufferedFileReader = new BufferedReader(new FileReader(clientsFilePath)); BufferedReader bufferedFileReader2 = new BufferedReader(new FileReader(ordersFilePath))) { String line; while ((line = bufferedFileReader.readLine())!= null){ String[] temp = line.split("\\t"); createClient(temp); } while ((line = bufferedFileReader2.readLine())!= null){ String[] temp = line.split("\\t"); createOrder(temp); } } catch (IOException e){ System.out.println(e.getMessage()); } } private void createClient(String[] temp){ // parsing data int balance = Integer.parseInt(temp[1]); Map<SecurityType,Integer> securities = new LinkedHashMap<>(); securities.put(SecurityType.A,Integer.parseInt(temp[2])); securities.put(SecurityType.B,Integer.parseInt(temp[3])); securities.put(SecurityType.C,Integer.parseInt(temp[4])); securities.put(SecurityType.D,Integer.parseInt(temp[5])); Client client = new Client(temp[0],balance,securities); this.clients.put(temp[0],client); } private void createOrder(String[] temp){ // parsing data String clientName = temp[0]; SecurityType securityType = selectSecurityType(temp[2]); Order order = new Order(securityType,Integer.parseInt(temp[3]),Integer.parseInt(temp[4])); // call factory for getting correct operation ExchangeOperation operation = operationFactory.getOperation(temp[1],clientName,order); //execute operation operation.executeOperation(this); } public void sellOperation(ExchangeOperation operation){ baseOperation(-1,1,operation); } public void buyOperation(ExchangeOperation operation){ baseOperation(1,-1,operation); } private void baseOperation(int a, int b ,ExchangeOperation operation){ Client currentClient= clients.get(operation.getClientName()); SecurityType secType = operation.getOrder().getSecurityType(); int secCount; secCount=currentClient.getSecurities().get(secType); secCount+= a*operation.getOrder().getSecurityCount(); currentClient.getSecurities().put(secType,secCount); int currentBalance=currentClient.getBalance(); currentBalance = currentBalance + b*(operation.getOrder().getSecurityCount()*operation.getOrder().getSecurityCost()); currentClient.setBalance(currentBalance); clients.put(currentClient.getName(),currentClient); } private SecurityType selectSecurityType (String text){ switch (text){ case "A": return SecurityType.A; case "B": return SecurityType.B; case "C": return SecurityType.C; case "D": return SecurityType.D; default: throw new IllegalArgumentException(); } } public void showResults(String resultFilePath){ try(FileWriter writer = new FileWriter(resultFilePath, false)) { int size=clients.size(); int count=0; for (Map.Entry<String,Client> entry: clients.entrySet()) { count++; String text = entry.getKey()+ "\t"; text = text + entry.getValue().getBalance()+"\t"; text = text+ entry.getValue().getSecuritiesString(); writer.write(text); if (count<size){ writer.append("\n"); } } writer.flush(); } catch (IOException e){ System.out.println(e.getMessage()); } } public Map<String, Client> getClients() { return clients; } public OperationList getSellList() { return sellList; } public OperationList getBuyList() { return buyList; } }
132e490d8c120ddfb7a32f08e41c326aebcafe8f
269ebddaee9fec0a70fdc3b72c0781b0ce6bc74c
/app/src/main/java/com/example/android/sqliteweather/MainActivity.java
c1fab10c9c300cb95d58c6870ff8b0d87c35b3f5
[]
no_license
ConnerN/weather-mobile-app
3f5f21876206e52a6fe44eb4d931102265e2cfb6
20f538359483047f0dc9224bb4b5c579756a13ae
refs/heads/main
2023-08-30T02:22:37.451235
2021-11-09T08:26:08
2021-11-09T08:26:08
363,277,418
0
0
null
null
null
null
UTF-8
Java
false
false
9,103
java
package com.example.android.sqliteweather; import androidx.annotation.NonNull; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import androidx.core.view.GravityCompat; import androidx.drawerlayout.widget.DrawerLayout; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProvider; import androidx.preference.PreferenceManager; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.content.ActivityNotFoundException; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; import com.example.android.sqliteweather.data.FiveDayForecast; import com.example.android.sqliteweather.data.ForecastCity; import com.example.android.sqliteweather.data.ForecastData; import com.example.android.sqliteweather.data.LoadingStatus; import com.google.android.material.navigation.NavigationView; public class MainActivity extends AppCompatActivity implements ForecastAdapter.OnForecastItemClickListener, SharedPreferences.OnSharedPreferenceChangeListener, NavigationView.OnNavigationItemSelectedListener { private static final String TAG = MainActivity.class.getSimpleName(); private static final String OPENWEATHER_APPID = BuildConfig.OPENWEATHER_API_KEY; private ForecastAdapter forecastAdapter; private FiveDayForecastViewModel fiveDayForecastViewModel; private SharedPreferences sharedPreferences; private ForecastCity forecastCity; private RecyclerView forecastListRV; private ProgressBar loadingIndicatorPB; private TextView errorMessageTV; private DrawerLayout drawerLayout; private Toast errorToast; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); this.loadingIndicatorPB = findViewById(R.id.pb_loading_indicator); this.errorMessageTV = findViewById(R.id.tv_error_message); this.forecastListRV = findViewById(R.id.rv_forecast_list); this.forecastListRV.setLayoutManager(new LinearLayoutManager(this)); this.forecastListRV.setHasFixedSize(true); this.drawerLayout = findViewById(R.id.drawer_layout); this.forecastAdapter = new ForecastAdapter(this); this.forecastListRV.setAdapter(this.forecastAdapter); this.sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); this.sharedPreferences.registerOnSharedPreferenceChangeListener(this); this.fiveDayForecastViewModel = new ViewModelProvider(this) .get(FiveDayForecastViewModel.class); this.loadForecast(); /* * Update UI to reflect newly fetched forecast data. */ this.fiveDayForecastViewModel.getFiveDayForecast().observe( this, new Observer<FiveDayForecast>() { @Override public void onChanged(FiveDayForecast fiveDayForecast) { forecastAdapter.updateForecastData(fiveDayForecast); if (fiveDayForecast != null) { forecastCity = fiveDayForecast.getForecastCity(); ActionBar actionBar = getSupportActionBar(); actionBar.setTitle(forecastCity.getName()); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setHomeAsUpIndicator(R.drawable.ic_menu); } } } ); /* * Update UI to reflect changes in loading status. */ this.fiveDayForecastViewModel.getLoadingStatus().observe( this, new Observer<LoadingStatus>() { @Override public void onChanged(LoadingStatus loadingStatus) { if (loadingStatus == LoadingStatus.LOADING) { loadingIndicatorPB.setVisibility(View.VISIBLE); } else if (loadingStatus == LoadingStatus.SUCCESS) { loadingIndicatorPB.setVisibility(View.INVISIBLE); forecastListRV.setVisibility(View.VISIBLE); errorMessageTV.setVisibility(View.INVISIBLE); } else { loadingIndicatorPB.setVisibility(View.INVISIBLE); forecastListRV.setVisibility(View.INVISIBLE); errorMessageTV.setVisibility(View.VISIBLE); errorMessageTV.setText(getString(R.string.loading_error, "ヽ(。_°)ノ")); } } } ); NavigationView navigationView = findViewById(R.id.na_nav_drawer); navigationView.setNavigationItemSelectedListener(this); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); } @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { this.drawerLayout.closeDrawers(); switch (item.getItemId()) { case R.id.nav_weather: return true; case R.id.nav_bookmarked_weather: Intent bookmarkedWeather = new Intent(this, BookmarkedWeather.class); startActivity(bookmarkedWeather); return true; case R.id.nav_setting: Intent settingsIntent = new Intent(this, SettingsActivity.class); startActivity(settingsIntent); return true; default: return false; } } @Override public void onForecastItemClick(ForecastData forecastData) { Intent intent = new Intent(this, ForecastDetailActivity.class); intent.putExtra(ForecastDetailActivity.EXTRA_FORECAST_DATA, forecastData); intent.putExtra(ForecastDetailActivity.EXTRA_FORECAST_CITY, this.forecastCity); startActivity(intent); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true; } @Override public boolean onOptionsItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { case R.id.action_map: viewForecastCityInMap(); return true; case R.id.action_settings: Intent intent = new Intent(this, SettingsActivity.class); startActivity(intent); return true; case android.R.id.home: this.drawerLayout.openDrawer(GravityCompat.START); return true; default: return super.onOptionsItemSelected(item); } } @Override protected void onDestroy() { super.onDestroy(); this.sharedPreferences.unregisterOnSharedPreferenceChangeListener(this); } @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { this.loadForecast(); } /** * Triggers a new forecast to be fetched based on current preference values. */ private void loadForecast() { this.fiveDayForecastViewModel.loadForecast( this.sharedPreferences.getString( getString(R.string.pref_location_key), "Corvallis,OR,US" ), this.sharedPreferences.getString( getString(R.string.pref_units_key), getString(R.string.pref_units_default_value) ), OPENWEATHER_APPID ); } /** * This function uses an implicit intent to view the forecast city in a map. */ private void viewForecastCityInMap() { if (this.forecastCity != null) { Uri forecastCityGeoUri = Uri.parse(getString( R.string.geo_uri, this.forecastCity.getLatitude(), this.forecastCity.getLongitude(), 12 )); Intent intent = new Intent(Intent.ACTION_VIEW, forecastCityGeoUri); try { startActivity(intent); } catch (ActivityNotFoundException e) { if (this.errorToast != null) { this.errorToast.cancel(); } this.errorToast = Toast.makeText( this, getString(R.string.action_map_error), Toast.LENGTH_LONG ); this.errorToast.show(); } } } }
c9d3c9c3a41031b0f80bd9dd0c60949f8fd869a6
8e26c45835806b7c19a27676c163bc95a6255a24
/src/com/shadowburst/bubblechamber/ColourPair.java
60421f73fc0e401dcf4c0d205b9985d5233a48e7
[ "Apache-2.0" ]
permissive
orac/bubblechamber
b3dfc81d24ac181d09df60d13894ce4cb11d589b
305476d71faf7122258a500353a68fd5fedff81d
refs/heads/master
2020-05-18T18:21:30.264435
2012-08-24T13:34:40
2012-08-25T14:50:11
2,704,482
0
0
null
null
null
null
UTF-8
Java
false
false
184
java
package com.shadowburst.bubblechamber; public class ColourPair { public int positive; public int negative; public ColourPair(int p, int n) { positive = p; negative = n; } }
c2f523caae89ea1844678bde2e9d190fe2c1f52c
b23404e272db01f2bf46320565c11b9e02cf0c61
/new/pps/src/main/java/ice/cn/joy/ggg/api/model/PageSupport.java
47ebce3910e38623f22b0be1a961cfd7f4857329
[]
no_license
brucesq/brucedamon001
95ab98798f1c29d722a397681956c24ff4091385
92ab181f90005afffb354d10768921545912119c
refs/heads/master
2021-05-29T09:35:05.115101
2011-12-20T05:42:28
2011-12-20T05:42:28
32,131,555
0
1
null
null
null
null
UTF-8
Java
false
false
3,962
java
// ********************************************************************** // // Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** // Ice version 3.4.0 package cn.joy.ggg.api.model; // <auto-generated> // // Generated from file `community.ice' // // Warning: do not edit this file. // // </auto-generated> public class PageSupport implements java.lang.Cloneable, java.io.Serializable { public int pageNo; public int pageSize; public int totalSize; public Ice.Object result; public PageSupport() { } public PageSupport(int pageNo, int pageSize, int totalSize, Ice.Object result) { this.pageNo = pageNo; this.pageSize = pageSize; this.totalSize = totalSize; this.result = result; } public boolean equals(java.lang.Object rhs) { if(this == rhs) { return true; } PageSupport _r = null; try { _r = (PageSupport)rhs; } catch(ClassCastException ex) { } if(_r != null) { if(pageNo != _r.pageNo) { return false; } if(pageSize != _r.pageSize) { return false; } if(totalSize != _r.totalSize) { return false; } if(result != _r.result && result != null && !result.equals(_r.result)) { return false; } return true; } return false; } public int hashCode() { int __h = 0; __h = 5 * __h + pageNo; __h = 5 * __h + pageSize; __h = 5 * __h + totalSize; if(result != null) { __h = 5 * __h + result.hashCode(); } return __h; } public java.lang.Object clone() { java.lang.Object o = null; try { o = super.clone(); } catch(CloneNotSupportedException ex) { assert false; // impossible } return o; } public void __write(IceInternal.BasicStream __os) { __os.writeInt(pageNo); __os.writeInt(pageSize); __os.writeInt(totalSize); __os.writeObject(result); } private class Patcher implements IceInternal.Patcher { public void patch(Ice.Object v) { try { result = (Ice.Object)v; } catch(ClassCastException ex) { IceInternal.Ex.throwUOE(type(), v.ice_id()); } } public String type() { return "::Ice::Object"; } } public void __read(IceInternal.BasicStream __is) { pageNo = __is.readInt(); pageSize = __is.readInt(); totalSize = __is.readInt(); __is.readObject(new Patcher()); } public int getPageNo() { return pageNo; } public void setPageNo(int pageNo) { this.pageNo = pageNo; } public int getPageSize() { return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } public int getTotalSize() { return totalSize; } public void setTotalSize(int totalSize) { this.totalSize = totalSize; } public Ice.Object getResult() { return result; } public void setResult(Ice.Object result) { this.result = result; } }
[ "quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141" ]
quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141
d6a38f26766e1f3b1ed1da9e993326252d1137e3
e16c386483e203721bf469698e2110fbd2c3033b
/src/main/java/ua/in/dris4ecoder/model/businessServices/ServiceService.java
fa87e021d229b019d466d8a4c5c1253f476fe688
[]
no_license
alex-korneyko/Restaurant
1fdf0225d7868d1245f27a263ca6cadf40d425a4
60fe3d1afcc28d6396e465789667d84ba21be711
refs/heads/master
2020-05-21T20:05:33.236044
2016-12-29T16:26:36
2016-12-29T16:26:36
64,385,747
0
0
null
null
null
null
UTF-8
Java
false
false
2,833
java
package ua.in.dris4ecoder.model.businessServices; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import ua.in.dris4ecoder.model.businessObjects.*; import ua.in.dris4ecoder.model.dao.RestaurantDao; import java.time.LocalDateTime; import java.util.List; /** * Created by Alex Korneyko on 04.08.2016 10:55. */ public class ServiceService implements BusinessService { private RestaurantDao<Order> ordersDao; private RestaurantDao<KitchenProcess> kitchenProcessDao; @Autowired private ManagementService managementController; @Transactional public WarehouseChangeResult addOrder(Order order) { SalesInvoice salesInvoice = new SalesInvoice(true, order); WarehouseChangeResult result = managementController.addSalesInvoice(salesInvoice, false); if (result.isChangeSuccessfully()) { order.addSalesInvoice(salesInvoice); ordersDao.addItem(order); } return result; } public WarehouseChangeResult editOrder(Order order) { //receiving old invoice for this order SalesInvoice salesInvoice = managementController.findSalesInvoice(order.getSalesInvoice().getId()); //filling old invoice salesInvoice.fillInvoice(order); //attempt updating of warehouse WarehouseChangeResult changeResult = managementController.editSalesInvoice(salesInvoice, false); if (changeResult.isChangeSuccessfully()) { order.addSalesInvoice(salesInvoice); ordersDao.editItem(order.getId(), order); } return changeResult; } @Transactional public void removeOrder(Order order) { managementController.removeSalesInvoice(order.getSalesInvoice().getId(), false); ordersDao.removeItem(order); } @Transactional public void removeOrder(int id) { removeOrder(findOrder(id)); } @Transactional public Order findOrder(int id) { final Order order = ordersDao.findItemById(id); if (order != null) return order; else throw new IllegalArgumentException("order not found"); } @Transactional public List<Order> findOrder(OrderDishStatus orderDishStatus) { return ordersDao.findItem(orderDishStatus); } @Transactional public List<Order> findOrder(LocalDateTime start, LocalDateTime end) { return ordersDao.findItem(start, end); } public List<Order> getAllOrders() { return ordersDao.findAll(); } public void setOrdersDao(RestaurantDao<Order> ordersDao) { this.ordersDao = ordersDao; } public void setKitchenProcessDao(RestaurantDao<KitchenProcess> kitchenProcessDao) { this.kitchenProcessDao = kitchenProcessDao; } }
35754ad3dad01b5cfa04c76e2691e6292a820879
a120e4f6c0d1f60e4bae95f32888f8d5a257a359
/STUN5389Emu/src/STUN/STUNrfc/Util.java
1ca45a362682f3344be95e24a5feeda60d6e5aa9
[]
no_license
zhiji6/basic_STUN_5389_Emulator
a8582c86b9598cf911a892c0bf84de8d0a376426
5bc5496960e9d50cc79b9e1e3aaeca76b326022d
refs/heads/master
2020-04-28T14:36:23.735274
2018-03-22T13:31:59
2018-03-22T13:31:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
558
java
package STUN.STUNrfc; import java.math.BigInteger; import java.util.Random; public class Util { private static Random rnd = new Random(); public static BigInteger generateTrxId() { return new BigInteger(Constants.TRX_ID_SIZE - 1, rnd); } public static String formatIPAddress(byte[] addr) { StringBuilder buffer = new StringBuilder(); for(int i=0; i<4; i++) { buffer.append(addr[i] & 0xFF).append("."); } return buffer.toString(); } }
[ "Mrhie@DESKTOP-1S23VTE" ]
Mrhie@DESKTOP-1S23VTE
3bec660aa71550737df61eaab473728013742ccf
7617a656b6f77dfc60cd405baf87bc7700296092
/src/konstruktory_metody_dziedziczenie/src/konstruktory_metody_dziedziczenie/Car.java
8298094500988f85c7faf02d1cf8e5e23a916b5a
[]
no_license
iJaguar/Cwiczenia
6f38d74c7077b1faaea2b190a3257cbb0c174f09
9c200980a9205cec28f7374301a6a555aaabf736
refs/heads/master
2021-01-20T17:47:26.197080
2017-05-10T18:05:36
2017-05-10T18:05:36
90,889,595
0
0
null
null
null
null
UTF-8
Java
false
false
1,141
java
package konstruktory_metody_dziedziczenie; import static java.lang.String.*; public class Car { double kilometers; String nazwa; int liczba_pasazerow; double pojemnosc_baku; Car() { //konstruktoir domyslny } Car(double kilometers, String name, int passengers, double capacity) { this.kilometers = kilometers; this.nazwa = name; this.liczba_pasazerow = passengers; this.pojemnosc_baku = capacity; } Car(String name, int passengers, double capacity) { this.kilometers = 10; this.nazwa = name; this.liczba_pasazerow = passengers; this.pojemnosc_baku = capacity; }//klasa,metody,konstruktory musza miec cialo void print() { System.out.println(format("%s pomiesci %d pasazerow, a pojemnosc jego baku wynosi: %d spala na 100 km %d", nazwa, liczba_pasazerow, pojemnosc_baku, kilometers)); } void printRange() { System.out.println(format("%s na pelnym baku przejedzie: %d", nazwa, getRange())); } private double getRange() { return (pojemnosc_baku / kilometers) * 100; } }
822a1047848a9f4e117e1a87257ddc840f161af8
45cbf4213e178994963ec018d3344d11ab7e8d03
/SkynetBus/src/main/java/com/auxo/cache/AuxoCacheConstant.java
632a1054eb8d48e813ec844e5a734d876eccd3cb
[]
no_license
skynet-auxo/skynet-auxo
412f88e65d9f2eb08acfeef3230251f3670de4e8
cdab50c63b0124f77d777df00677bff49fe54674
refs/heads/master
2022-11-01T08:13:47.681341
2019-06-17T01:10:21
2019-06-17T01:10:21
192,259,296
0
0
null
2022-10-12T20:28:02
2019-06-17T02:09:26
JavaScript
UTF-8
Java
false
false
677
java
/** * Project Name: AuxoBus * File Name:AuxoCacheConstant.java * Package Name:com.auxo.cache * History * Seq Date Developer Description * --------------------------------------------------------------------------- * 1 2019年06月14日 zeroLi Create * * --------------------------------------------------------------------------- * Copyright (c) 2018, zeroLi of AuXo All Rights Reserved. * */ package com.auxo.cache; public class AuxoCacheConstant { protected final static String AUXO_CACHE_TYPE_EHCACHE = "EHCACHE"; protected final static String AUXO_CACHE_TYPE_REDIS = "REDIS"; }
77e069d27274d7db84986f4f49b00fcd109a9582
5f8620ad72f80d011c0124becea4df74f949bfdd
/src/interfacce/opvaccinale.java
6e619cfe33a68c1817e55d0731c60c7646a75b37
[]
no_license
francesco-esposito/Laboratorio-B
6d5bd6aca2bf1c99ad6c844b6b62a8edd627eb7f
d1282fcc078ac14e18297f80121a8d90ad2b3726
refs/heads/master
2023-07-23T15:22:31.719901
2021-09-05T09:40:24
2021-09-05T09:40:24
401,123,199
0
0
null
null
null
null
ISO-8859-13
Java
false
false
3,662
java
package interfacce; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.GridLayout; import javax.swing.JLabel; import java.awt.Font; import javax.swing.SwingConstants; import backenddb.ServerDBMSInterface; import javax.swing.JButton; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; /**Interfaccia che mostra tutte le funzionalitą che il sistema offre per gli operatori vaccinali. * @author Alessandro Alonzi * @author Daniel Pedrotti * @author Francesco Esposito */ public class opvaccinale { JFrame frame; private ServerDBMSInterface db; /** * Launch the application. */ public static void main(String[] args, final ServerDBMSInterface db) { EventQueue.invokeLater(new Runnable() { public void run() { try { opvaccinale window = new opvaccinale(); window.setDB(db); window.frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the application. */ public opvaccinale() { initialize(); } public void setDB(ServerDBMSInterface db){ this.db = db; } /** * Initialize the contents of the frame. */ private void initialize() { frame = new JFrame(); frame.setBounds(100, 100, 450, 281); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); //creazione di una label e imposta i vari campi (posizione, font) inoltre lo aggiunge al frame JLabel lblNewLabel = new JLabel("Quale operazione desideri effettuare?"); lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER); lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 20)); lblNewLabel.setBounds(10, 29, 416, 30); frame.getContentPane().add(lblNewLabel); //bottone che permette di aprire la schermata per inserire un nuovo centro vaccinale JButton btnNewButton = new JButton("Registra nuovo centro vaccinale "); btnNewButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { frame.setVisible(false); //regcentro rc= new regcentro(db); regcentro.main(null, db); } }); btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 14)); btnNewButton.setBounds(10, 89, 416, 30); frame.getContentPane().add(btnNewButton); //bottone che apre la schermata per inserire un nuovo vaccinato JButton btnNewButton_1 = new JButton("Registra nuovo vaccinato"); btnNewButton_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { frame.setVisible(false); //regvaccinato rv= new regvaccinato(db); regvaccinato.main(null, db); } }); btnNewButton_1.setFont(new Font("Tahoma", Font.PLAIN, 14)); btnNewButton_1.setBounds(10, 155, 416, 30); frame.getContentPane().add(btnNewButton_1); //bottone che permette di tornare alla schermata principale JButton btnNewButton_2 = new JButton("\uD83D\uDD19"); btnNewButton_2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { frame.setVisible(false); //client c1 = new client(); client.main(null, db); } }); btnNewButton_2.setBounds(10, 213, 52, 21); frame.getContentPane().add(btnNewButton_2); //bottone che permette di tornare alla home JButton btnNewButton_2_1 = new JButton("\u2302"); btnNewButton_2_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { frame.setVisible(false); //client c1= new client(null); client.main(null, db); } }); btnNewButton_2_1.setBounds(369, 213, 57, 21); frame.getContentPane().add(btnNewButton_2_1); } }
[ "francesco-esposito" ]
francesco-esposito
c8c69b959d08553eb725987aea58072b92c78c36
92543800c0b9c8978ed327212f0628e442ce7473
/app/src/main/java/in/savegenie/savegenie/backgroundclasses/BundleItem.java
5bf7b2b4d463d2fbb79e19ebb436e3e01cd09419
[]
no_license
gupta-manish/Savegenie
75766e831ab2a651f14a1b285fa63d4a0a5fd5fa
6b0728bde14c10f7b6f185a87da50080b3e62230
refs/heads/master
2021-01-01T19:29:35.241193
2015-04-11T07:00:33
2015-04-11T07:00:33
23,832,129
0
0
null
null
null
null
UTF-8
Java
false
false
597
java
package in.savegenie.savegenie.backgroundclasses; /** * Created by manish on 20/3/15. */ public class BundleItem { public String id,bundle_get_id,store_id,store_sku_id,qty,status; public StoreSku storeSku; public BundleItem(String id,String bundle_get_id,String store_id,String store_sku_id,String qty,String status,StoreSku storeSku) { this.id = id; this.bundle_get_id = bundle_get_id; this.store_id = store_id; this.store_sku_id = store_sku_id; this.qty = qty; this.status = status; this.storeSku = storeSku; } }
554f7ef95b7d61d7d5454c5327b16c267debb28b
cb6f5939c9fa12ab07cf71401b977d4fa4c22860
/week-05/practical-04/.svn/pristine/55/554f7ef95b7d61d7d5454c5327b16c267debb28b.svn-base
89392044b6aaa3d88b0fa4e562e7cfbccdd90bfc
[]
no_license
arpit2412/Foundation-of-Computer-Science
be6807359f5e8cf93ffbea80b58ab1c458c75d03
9008b7482d71410dff4c3449dfa4a32f8ab6e7e3
refs/heads/master
2022-12-07T17:55:37.002403
2020-09-03T11:01:24
2020-09-03T11:01:24
292,543,573
0
0
null
null
null
null
UTF-8
Java
false
false
1,005
/* * * Foundations of Computer Science * Semester 02 Year 2019 * id: a1784072 name: Arpit Garg * */ //class human child class of player import java.util.*; class Human extends Player{ public String input; Scanner in = new Scanner(System.in); //Overriding the performmove and return the string @Override public String performMove(){ //exception handling try{ System.out.println("\n-----------------------------------\n"); System.out.println("Select: \n1.Rock \n2.Paper \n3.Scissor"); System.out.println("\n-----------------------------------\n"); input = in.nextLine(); //users choice if(input.equalsIgnoreCase("Rock")){ return "Rock"; }else if(input.equalsIgnoreCase("Paper")){ return "Paper"; }else if(input.equalsIgnoreCase("Scissor")){ return "Scissor"; }else{ return input; } }catch (Exception e){ System.out.println("Exception: " + e); //showing exceptions if occurs return "Error wrong input!!"; } } }
ef464ff9fd36985ae2620315627ac8d13f45819f
055a93bd6ac2eac503ed21ed24e7ee419759a0e9
/src/main/java/lsv/core/graphics/Turtle.java
b5dc6f4e3f63d8749c486f6928afcdadd7462606
[]
no_license
ccieh/LSystemVisualizer
3be7c8a1d5cbf4c7e84d96d652915b1267853f9d
a9cf72e1b6e2425743022a05965bbaf6b7a4ae1b
refs/heads/master
2021-01-10T13:33:40.951071
2016-03-23T21:10:50
2016-03-23T21:13:05
54,454,875
0
0
null
null
null
null
UTF-8
Java
false
false
292
java
package lsv.core.graphics; public interface Turtle { void rotate(double radians); void push(); void pop(); void move(double distance); void penUp(); void penDown(); void setWidth(double width); void setColor(double r, double g, double b); void reset(); }
19d2481ce1ad807b2e12ca5ccfddbfe8028084e8
3a6c7d7dca31ef6a65d4d893696585d26e6bcfb6
/src/game/graphics/effects/Updatable.java
21fb740c598d762a91aa320c61e75f46326ba400
[]
no_license
Shamzaa/OOP-spillprosjekt
1918fb74b483fa1c8bc5ae34635c110b2eae24be
5025ad2907a4ac6de3ab93443d5274da9ad20095
refs/heads/master
2016-08-12T12:49:31.180930
2016-04-20T11:29:14
2016-04-20T11:29:14
54,209,028
1
0
null
null
null
null
UTF-8
Java
false
false
191
java
package game.graphics.effects; public interface Updatable { public void update(long dtime); public void render(); public void destroy(); public void kill(); public boolean isAlive(); }
47c28f34e55bb76b2af7300f827b536030c18651
709d581732f5026d2d637205ea28bad58e9bda7c
/test/src/main/java/fpt/finish/severlet/QuanLyUserController.java
eb34fc8ef5385b445b56fe1c21751ec48a7de7b3
[]
no_license
quachtan/finish
614b5053ff45af60285c78392fa6ccc82bec1935
a88930904634a4ca0b20ce09326aeeedbb00525f
refs/heads/master
2021-08-26T09:09:44.860955
2017-11-22T17:56:29
2017-11-22T17:56:29
108,884,949
0
0
null
null
null
null
UTF-8
Java
false
false
1,976
java
package fpt.finish.severlet; import java.io.IOException; import java.sql.Connection; import java.util.ArrayList; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import fpt.finish.Dao.UserDao; import fpt.finish.bean.User_haui; import fpt.finish.until.MyUtils; @WebServlet("/qluser") public class QuanLyUserController extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public QuanLyUserController() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); User_haui userhaui = MyUtils.getLoginedUser(session); if (userhaui == null) { RequestDispatcher dispatcher = request.getServletContext() .getRequestDispatcher("/DangNhap.jsp"); dispatcher.forward(request, response); } else{ if (userhaui.getMa_role()==1) { UserDao userDao=new UserDao(); Connection conn=MyUtils.getStoredConnection(request); ArrayList<User_haui> list=userDao.findAll(conn); request.setAttribute("listUser", list); RequestDispatcher rd=request.getRequestDispatcher("/QuanLyNguoiDung.jsp"); rd.forward(request, response); } } } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); } }
d59401a1593ed1aac6a9e8f8bd19a4b8c61f361b
6260b4be792a7efc35bb333de9a62ffba23344e3
/app/src/main/java/com/harunkor/androidgifviewsample/GifImageView.java
a0c54c00db73b6b5c7ace9d48480c99141031594
[]
no_license
harunkor/AndroidGifViewSample
cfc58d666ba4c51aa504ee6c2f5e09f8adecb0c5
98a8568932130053dfff967c79b58d3959f9cd89
refs/heads/master
2021-01-20T00:06:17.381656
2017-04-22T15:30:09
2017-04-22T15:30:09
89,079,834
0
0
null
null
null
null
UTF-8
Java
false
false
2,444
java
package com.harunkor.androidgifviewsample; import android.content.Context; import android.graphics.Canvas; import android.graphics.Movie; import android.net.Uri; import android.os.SystemClock; import android.util.AttributeSet; import android.view.View; import java.io.FileNotFoundException; import java.io.InputStream; /** * Created by harunkor on 22.04.2017. */ public class GifImageView extends View { private InputStream mInputStream; private Movie mMovie; private int mWidth, mHeight; private long mStart; private Context mContext; public GifImageView(Context context) { super(context); this.mContext=context; } public GifImageView(Context context, AttributeSet attributeSet) { this(context,attributeSet,0); } public GifImageView(Context context,AttributeSet attributeSet,int defStyleattr) { super(context,attributeSet,defStyleattr); this.mContext=context; if(attributeSet.getAttributeName(1).equals("background")) { int id=Integer.parseInt(attributeSet.getAttributeName(1).substring(1)); setGifImageResource(id); } } private void init() { setFocusable(true); mMovie=Movie.decodeStream(mInputStream); mWidth=mMovie.width(); mHeight=mMovie.height(); requestLayout(); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { setMeasuredDimension(mWidth,mHeight); } @Override protected void onDraw(Canvas canvas) { long now= SystemClock.uptimeMillis(); if(mStart==0) { mStart=now; } if(mMovie!=null) { int duration = mMovie.duration(); if(duration==0) { duration=1000; } int relTime=(int) ((now-mStart) % duration); mMovie.setTime(relTime); mMovie.draw(canvas,0,0); invalidate(); } } public void setGifImageResource(int id) { mInputStream=mContext.getResources().openRawResource(id); init(); } public void setGifImageUri(Uri uri) { try { mInputStream=mContext.getContentResolver().openInputStream(uri); init(); }catch (FileNotFoundException e) { e.printStackTrace(); } } }
637bc289f2e064b959aa1bd303fbe7f7899d3cfb
0c8db90e2cd0d1a91d9e384d54c31b1ad881aa7d
/Exercicio27.java
62c2301e1fa5ab53f747ca207b8381832f70ad8d
[]
no_license
ViniciusAlmeidaIFC/Lista-Repeticao-POOI-2019
6083018b9ca9117efb29201ee3eabcdf149f2cbd
0f792f58bd23917f6423309d3dcd3c13a7ed797c
refs/heads/master
2020-07-04T08:50:16.026536
2019-08-13T21:57:40
2019-08-13T21:57:40
202,228,532
0
0
null
null
null
null
UTF-8
Java
false
false
607
java
package com; import java.util.Scanner; public class Exercicio27 { public static void main(String[] args) { Scanner entrada = new Scanner(System.in); System.out.println("Lojas Tabajara"); int cont = 1; float soma = 0; float num, pagamento; do { System.out.print("Produto "+cont+" R$"); num = entrada.nextFloat(); soma = soma + num; cont++; }while (num != 0); do { System.out.print("Dinheiro: R$ "); pagamento = entrada.nextFloat(); }while (pagamento < soma); System.out.println("Troco: R$ "+ (pagamento - soma)); entrada.close(); } }
ed47755df55c29c8052e342877c2104b238179b2
48d8ce3ba08e482a2253f7982a01998518a91517
/src/main/java/com/zte/model/UserInfo.java
e030b2d179779d9ba472a773b6d20e3885ab4dde
[]
no_license
daviddai429/springboot
b7ba3d4653269062da97db2c2e06928932f9dd7a
340d294baa6c51194d3eb3e25dcfe171f3a30135
refs/heads/master
2021-06-27T05:08:13.618945
2017-09-17T13:50:11
2017-09-17T13:50:11
103,832,461
0
0
null
null
null
null
UTF-8
Java
false
false
1,759
java
package com.zte.model; import java.util.List; /** * 用戶信息表 * @author david * */ public class UserInfo extends BaseModel { private String username; private String password; private String usertype; private Integer enabled; private String realname; private String qq; private String email; private String tel; private List<String> roleStrlist; private List<String> menuStrlist; public List<String> getMenuStrlist() { return menuStrlist; } public void setMenuStrlist(List<String> menuStrlist) { this.menuStrlist = menuStrlist; } public List<String> getRoleStrlist() { return roleStrlist; } public void setRoleStrlist(List<String> roleStrlist) { this.roleStrlist = roleStrlist; } 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 String getUsertype() { return usertype; } public void setUsertype(String usertype) { this.usertype = usertype; } public Integer getEnabled() { return enabled; } public void setEnabled(Integer enabled) { this.enabled = enabled; } public String getRealname() { return realname; } public void setRealname(String realname) { this.realname = realname; } public String getQq() { return qq; } public void setQq(String qq) { this.qq = qq; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getTel() { return tel; } public void setTel(String tel) { this.tel = tel; } }
26e5388aa5f07d057581693156a259e15ca120b5
eda23998e87ee63e25ea7587bc232c3ff36fb6ac
/geobatch/webapp/src/test/java/it/geosolutions/geobatch/jetty/StartDESTINATION.java
d51fbb20b38de8397b3787a3ed62b2673ff37fb7
[]
no_license
geosolutions-it/destination
ad260ae0f34140f77210ab347c5f91086b32dcc2
f9d65cc2f30e6cb14590539ea2d6fa8c296af133
refs/heads/master
2023-07-19T08:58:10.249183
2015-09-24T15:19:20
2015-09-24T15:19:20
7,544,277
0
4
null
2015-12-17T14:01:00
2013-01-10T16:22:05
Java
UTF-8
Java
false
false
3,673
java
/* * GeoBatch - Open Source geospatial batch processing system * http://geobatch.codehaus.org/ * Copyright (C) 2007-2008-2009 GeoSolutions S.A.S. * http://www.geo-solutions.it * * GPLv3 + Classpath exception * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package it.geosolutions.geobatch.jetty; import java.io.File; import org.mortbay.jetty.Connector; import org.mortbay.jetty.Server; import org.mortbay.jetty.bio.SocketConnector; import org.mortbay.jetty.webapp.WebAppContext; import org.mortbay.thread.BoundedThreadPool; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Jetty starter, will run GeoBatch inside the Jetty web container.<br> * Useful for debugging, especially in IDE were you have direct dependencies between the sources of * the various modules (such as Eclipse). * * @author wolf * */ public class StartDESTINATION { private static final Logger log = LoggerFactory.getLogger(StartDESTINATION.class); public static void main(String[] args) { Server jettyServer = null; try { jettyServer = new Server(); // don't even think of serving more than XX requests in parallel... // we // have a limit in our processing and memory capacities BoundedThreadPool tp = new BoundedThreadPool(); tp.setMaxThreads(50); SocketConnector conn = new SocketConnector(); String portVariable = System.getProperty("jetty.port"); int port = parsePort(portVariable); if (port <= 0) { port = 8081; } conn.setPort(port); conn.setThreadPool(tp); conn.setAcceptQueueSize(100); jettyServer.setConnectors(new Connector[] { conn }); WebAppContext wah = new WebAppContext(); wah.setContextPath("/geobatch"); // wah.setWar("target/geobatch"); wah.setWar("src/main/webapp"); jettyServer.setHandler(wah); wah.setTempDirectory(new File("target/work")); jettyServer.start(); // use this to test normal stop behavior, that is, to check stuff // that // need to be done on container shutdown (and yes, this will make // jetty stop just after you started it...) // jettyServer.stop(); } catch (Throwable e) { log.error("Could not start the Jetty server: " + e.getMessage(), e); if (jettyServer != null) { try { jettyServer.stop(); } catch (Exception e1) { log.error("Unable to stop the " + "Jetty server:" + e1.getMessage(), e1); } } } } private static int parsePort(String portVariable) { if (portVariable == null) { return -1; } try { return Integer.valueOf(portVariable).intValue(); } catch (NumberFormatException e) { return -1; } } }
163d3c44c99c64cc294c55a82ddd0b9b9d1b0fff
c9edd21bdf3e643fe182c5b0f480d7deb218737c
/dy-agent-log4j/dy-agent-log4j-core/src/main/java/com/hust/foolwc/dy/agent/log4j/core/util/datetime/DateParser.java
730fc21b42aa69c14b15b3856b85e500bf7b0f3c
[]
no_license
foolwc/dy-agent
f302d2966cf3ab9fe8ce6872963828a66ca8a34e
d7eca9df2fd8c4c4595a7cdc770d6330e7ab241c
refs/heads/master
2022-11-22T00:13:52.434723
2022-02-18T09:39:15
2022-02-18T09:39:15
201,186,332
10
4
null
2022-11-16T02:45:38
2019-08-08T05:44:02
Java
UTF-8
Java
false
false
5,132
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache license, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the license for the specific language governing permissions and * limitations under the license. */ package com.hust.foolwc.dy.agent.log4j.core.util.datetime; import java.text.ParseException; import java.text.ParsePosition; import java.util.Calendar; import java.util.Date; import java.util.Locale; import java.util.TimeZone; /** * DateParser is the "missing" interface for the parsing methods of * {@link java.text.DateFormat}. You can obtain an object implementing this * interface by using one of the FastDateFormat factory methods. * <p> * Warning: Since binary compatible methods may be added to this interface in any * release, developers are not expected to implement this interface. * * <p> * Copied and modified from <a href="https://commons.apache.org/proper/commons-lang/">Apache Commons Lang</a>. * </p> * * @since Apache Commons Lang 3.2 */ public interface DateParser { /** * Equivalent to DateFormat.parse(String). * * See {@link java.text.DateFormat#parse(String)} for more information. * @param source A <code>String</code> whose beginning should be parsed. * @return A <code>Date</code> parsed from the string * @throws ParseException if the beginning of the specified string cannot be parsed. */ Date parse(String source) throws ParseException; /** * Equivalent to DateFormat.parse(String, ParsePosition). * * See {@link java.text.DateFormat#parse(String, ParsePosition)} for more information. * * @param source A <code>String</code>, part of which should be parsed. * @param pos A <code>ParsePosition</code> object with index and error index information * as described above. * @return A <code>Date</code> parsed from the string. In case of error, returns null. * @throws NullPointerException if text or pos is null. */ Date parse(String source, ParsePosition pos); /** * Parses a formatted date string according to the format. Updates the Calendar with parsed fields. * Upon success, the ParsePosition index is updated to indicate how much of the source text was consumed. * Not all source text needs to be consumed. Upon parse failure, ParsePosition error index is updated to * the offset of the source text which does not match the supplied format. * * @param source The text to parse. * @param pos On input, the position in the source to start parsing, on output, updated position. * @param calendar The calendar into which to set parsed fields. * @return true, if source has been parsed (pos parsePosition is updated); otherwise false (and pos errorIndex is updated) * @throws IllegalArgumentException when Calendar has been set to be not lenient, and a parsed field is * out of range. * * @since 3.5 */ boolean parse(String source, ParsePosition pos, Calendar calendar); // Accessors //----------------------------------------------------------------------- /** * <p>Gets the pattern used by this parser.</p> * * @return the pattern, {@link java.text.SimpleDateFormat} compatible */ String getPattern(); /** * <p> * Gets the time zone used by this parser. * </p> * * <p> * The default {@link TimeZone} used to create a {@link Date} when the {@link TimeZone} is not specified by * the format pattern. * </p> * * @return the time zone */ TimeZone getTimeZone(); /** * <p>Gets the locale used by this parser.</p> * * @return the locale */ Locale getLocale(); /** * Parses text from a string to produce a Date. * * @param source A <code>String</code> whose beginning should be parsed. * @return a <code>java.util.Date</code> object * @throws ParseException if the beginning of the specified string cannot be parsed. * @see java.text.DateFormat#parseObject(String) */ Object parseObject(String source) throws ParseException; /** * Parses a date/time string according to the given parse position. * * @param source A <code>String</code> whose beginning should be parsed. * @param pos the parse position * @return a <code>java.util.Date</code> object * @see java.text.DateFormat#parseObject(String, ParsePosition) */ Object parseObject(String source, ParsePosition pos); }
3d4824d6de4dfbec228671e330cdcace61954c81
57607404d2006cfd6ce5098b73d4ab2a5015c702
/src/grades.java
835ca99f6d0d2ac09866cfa232483fa5cf6c4954
[]
no_license
agregforrester/pset-3
e5939a0f346f318767e3db18f4349262a9022bb9
ca76eb15f9703434390d5fb0e470b74bea3da3c9
refs/heads/master
2022-12-24T12:44:52.988341
2020-09-28T20:59:31
2020-09-28T20:59:31
296,691,240
0
0
null
null
null
null
UTF-8
Java
false
false
1,239
java
import java.util.Scanner; public class grades { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("Homework 1 : "); double homework1 = in.nextDouble(); in.nextLine(); System.out.println("Homework 2 : "); double homework2 = in.nextDouble(); in.nextLine(); System.out.println("Homework 3 : "); double homework3 = in.nextDouble(); in.nextLine(); System.out.println("Quiz 1 : "); double quiz1 = in.nextDouble(); in.nextLine(); System.out.println("Quiz 2 : "); double quiz2 = in.nextDouble(); in.nextLine(); System.out.println("Test 1 : "); double test1 = in.nextDouble(); double finalGrade = (((homework1 + homework2 + homework3) / 3) * .15) + (((quiz1 + quiz2) / 2) * .35) + (test1 * .5); System.out.println(" "); System.out.printf("%.2f", finalGrade); System.out.println("%."); in.close(); } }
fdee542756ade2163164947d6f0ee035419563e3
d99b5c846628cba29622048454cba3546c305e3c
/datacenterframework/src/main/java/br/framework/domain/mission/SpaceMission.java
f4b1d1cfab74bdf1469f40593fb1520f3237ab59
[]
no_license
anovais/famtee
14ae0eaf3bb128d0cddbf077cb4e2a2c8b92d155
48c32f5a47696b1d61345be367d2a2fca510da36
refs/heads/master
2021-01-13T11:58:32.047812
2017-02-07T00:44:00
2017-02-07T00:44:00
81,148,333
1
0
null
null
null
null
UTF-8
Java
false
false
3,617
java
package br.framework.domain.mission; import java.util.ArrayList; import java.util.Calendar; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.ElementCollection; import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinTable; import javax.persistence.Lob; import javax.persistence.ManyToMany; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.stereotype.Component; import br.framework.domain.PhotoEntity; import br.framework.domain.GenericEntity; import br.framework.domain.Institution; import br.framework.domain.Metadata; import br.framework.domain.assessment.Environment; import br.framework.domain.instrument.Instrument; import br.framework.domain.secutiry.User; import br.framework.domain.util.Period; /** * Author: Andre Novais <br> * Date: 10/2016 <br> * Description: Representa uma missão espacial */ @Entity @Component public class SpaceMission extends Environment implements GenericEntity, PhotoEntity{ /** * identificação do veiculo espacial */ @OneToOne(cascade=CascadeType.ALL, fetch=FetchType.EAGER) @Autowired private SpaceCraft spaceCraft; private String code; // Logs de reports do status da missão @OneToMany(fetch=FetchType.LAZY) private List<MissionReport> status; @ManyToMany(fetch=FetchType.EAGER) private List<Institution> institutions; @OneToMany(cascade=CascadeType.DETACH, fetch=FetchType.LAZY) private List<User> researchers; @OneToMany(cascade=CascadeType.ALL , fetch=FetchType.EAGER) private List<Metadata> metadata; @Lob private String objective; //Payloads embarcadas @ManyToMany @JoinTable(name="mission_instrument") private List<Instrument> payloads = new ArrayList<Instrument>(); @Embedded private Period period; @DateTimeFormat private Calendar launchDate; private String photoPath; public List<Institution> getInstitutions() { return institutions; } public void setInstitutions(List<Institution> institutions) { this.institutions = institutions; } public List<User> getResearchers() { return researchers; } public void setResearchers(List<User> researchers) { this.researchers = researchers; } public List<Metadata> getMetadata() { return metadata; } public void setMetadata(List<Metadata> metadata) { this.metadata = metadata; } public Period getPeriod() { return period; } public void setPeriod(Period period) { this.period = period; } public Calendar getLaunchDate() { return launchDate; } public void setLaunchDate(Calendar launchDate) { this.launchDate = launchDate; } public String getObjective() { return objective; } public void setObjective(String objective) { this.objective = objective; } public SpaceCraft getSpaceCraft() { return spaceCraft; } public void setSpaceCraft(SpaceCraft spaceCraft) { this.spaceCraft = spaceCraft; } public List<MissionReport> getStatus() { return status; } public void setStatus(List<MissionReport> status) { this.status = status; } public List<Instrument> getPayloads() { return payloads; } public void setPayloads(List<Instrument> payloads) { this.payloads = payloads; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getPhotoPath() { return photoPath; } public void setPhotoPath(String photoPath) { this.photoPath = photoPath; } }
[ "Andre Novais" ]
Andre Novais
da4b18118a2abe7b1e3075ebaad53adff53ff8ae
fe83cee7e251f2085bd1516ec36711a3ec044251
/forum/forum-web/target/tmp/jsp/org/apache/jsp/WEB_002dINF/jsp/role/list_jsp.java
e98690f649931bf8e1cbc796239bbfe2f88174e1
[]
no_license
aymwxbb2012/forum
f983e99938a694ed22775933ed7f80241c19879a
cc3697746d0cc60c6ceda6b6dac8298b4f7c35d0
refs/heads/master
2021-01-02T09:35:36.285152
2018-09-27T06:42:24
2018-09-27T06:42:24
99,254,600
1
0
null
null
null
null
UTF-8
Java
false
false
8,263
java
package org.apache.jsp.WEB_002dINF.jsp.role; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public final class list_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); private static java.util.List<String> _jspx_dependants; private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_forEach_var_items; private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector; public java.util.List<String> getDependants() { return _jspx_dependants; } public void _jspInit() { _jspx_tagPool_c_forEach_var_items = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); } public void _jspDestroy() { _jspx_tagPool_c_forEach_var_items.release(); } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\r\n"); out.write("\r\n"); out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n"); out.write("<html>\r\n"); out.write("<head>\r\n"); out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n"); out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\""); out.print(request.getContextPath() ); out.write("/resources/css/admin/main.css\"/>\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.print(request.getContextPath() ); out.write("/resources/js/jquery-1.7.2.min.js\"></script>\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.print(request.getContextPath() ); out.write("/resources/js/core/jquery.forum.core.js\"></script>\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.print(request.getContextPath() ); out.write("/resources/js/admin/main.js\"></script>\r\n"); out.write("</head>\r\n"); out.write("<body>\r\n"); out.write("<div id=\"content\">\r\n"); out.write("\t<h3 class=\"admin_link_bar\">\r\n"); out.write("\t\t"); org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "inc.jsp", out, false); out.write("\r\n"); out.write("\t</h3>\r\n"); out.write("\t<table width=\"800\" cellspacing=\"0\" cellPadding=\"0\" id=\"listTable\">\r\n"); out.write("\t\t<thead>\r\n"); out.write("\t\t<tr>\r\n"); out.write("\t\t\t<td>Role identification</td>\r\n"); out.write("\t\t\t<td>Role name</td>\r\n"); out.write("\t\t\t<td>Role type</td>\r\n"); out.write("\t\t\t<td>Role operation</td>\r\n"); out.write("\t\t</tr>\r\n"); out.write("\t\t</thead>\r\n"); out.write("\t\t<tbody>\r\n"); out.write("\t\t"); if (_jspx_meth_c_forEach_0(_jspx_page_context)) return; out.write("\r\n"); out.write("\t\t</tbody>\r\n"); out.write("\t</table>\r\n"); out.write("</div>\r\n"); out.write("</body>\r\n"); out.write("</html>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } private boolean _jspx_meth_c_forEach_0(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:forEach org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_forEach_0 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _jspx_tagPool_c_forEach_var_items.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class); _jspx_th_c_forEach_0.setPageContext(_jspx_page_context); _jspx_th_c_forEach_0.setParent(null); _jspx_th_c_forEach_0.setItems((java.lang.Object) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${roles}", java.lang.Object.class, (PageContext)_jspx_page_context, null)); _jspx_th_c_forEach_0.setVar("role"); int[] _jspx_push_body_count_c_forEach_0 = new int[] { 0 }; try { int _jspx_eval_c_forEach_0 = _jspx_th_c_forEach_0.doStartTag(); if (_jspx_eval_c_forEach_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write("\t\t\t<tr>\r\n"); out.write("\t\t\t\t<td>"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${role.id }", java.lang.String.class, (PageContext)_jspx_page_context, null)); out.write("&nbsp;</td>\r\n"); out.write("\t\t\t\t<td><a href=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${role.id }", java.lang.String.class, (PageContext)_jspx_page_context, null)); out.write("\" class=\"list_link\">"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${role.name }", java.lang.String.class, (PageContext)_jspx_page_context, null)); out.write("</a></td>\r\n"); out.write("\t\t\t\t<td>"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${role.roleType }", java.lang.String.class, (PageContext)_jspx_page_context, null)); out.write("&nbsp;</td>\r\n"); out.write("\t\t\t\t<td>\r\n"); out.write("\t\t\t\t\t<a href=\"delete/"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${role.id }", java.lang.String.class, (PageContext)_jspx_page_context, null)); out.write("\" class=\"list_op delete\">Delete</a>\r\n"); out.write("\t\t\t\t\t<a href=\"update/"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${role.id }", java.lang.String.class, (PageContext)_jspx_page_context, null)); out.write("\" class=\"list_op\">Update</a>\r\n"); out.write("\t\t\t\t\t<a href=\"clearUsers/"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${role.id }", java.lang.String.class, (PageContext)_jspx_page_context, null)); out.write("\" class=\"list_op delete\">Clean user</a>\r\n"); out.write("\t\t\t\t&nbsp;\r\n"); out.write("\t\t\t\t</td>\r\n"); out.write("\t\t\t</tr>\r\n"); out.write("\t\t"); int evalDoAfterBody = _jspx_th_c_forEach_0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_forEach_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { return true; } } catch (Throwable _jspx_exception) { while (_jspx_push_body_count_c_forEach_0[0]-- > 0) out = _jspx_page_context.popBody(); _jspx_th_c_forEach_0.doCatch(_jspx_exception); } finally { _jspx_th_c_forEach_0.doFinally(); _jspx_tagPool_c_forEach_var_items.reuse(_jspx_th_c_forEach_0); } return false; } }
f43a109e10421f61f42afef4e8b4a1efab2b729d
b96387cf04a4a82754762f87294564d2b2ffcd71
/src/main/java/com/gishere/aicamera/config/http/domain/push/SmartData.java
ba7bfa0da2ba7aa1af3b8133ab4ec78485feac4d
[]
no_license
nixuechao/ai-camera
91dc80786e4b414609709b943d0f6786e3b0cab3
ffba0cd4e19b39d1d5d47df2598def53f302367d
refs/heads/main
2023-03-20T00:16:34.460759
2021-03-08T14:02:24
2021-03-08T14:02:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
589
java
package com.gishere.aicamera.config.http.domain.push; import com.fasterxml.jackson.annotation.JsonAutoDetect; import lombok.Data; import com.gishere.aicamera.config.http.domain.push.smart.*; /** * @author niXueChao * @date 2021/2/4. */ @JsonAutoDetect(getterVisibility=JsonAutoDetect.Visibility.NONE) @Data public class SmartData { /** * 抓拍 */ private Face Face; /** * 过线 */ private FlowEvent FlowEvent; /** * 客流统计 */ private FlowStats FlowStats; /** * 数据识别 */ private Feature Feature; }
8fbb4a44d4b00f0b3a4bd1019038941735094859
34fa725679633f757a2b758f6eebb699d72488e8
/task-manager/src/main/java/com/colpatria/taskmanager/commons/domains/generic/UserDTO.java
2e7754814e5970cafc5a898c5131d88a044f4849
[]
no_license
jsquimbayo/Colpatria-Task-manager
88f2b6510a34fd5dd6fb1b3b1aae3c416571a2b0
ec74d74d65bebb6f81812de6023ee0213e7940fe
refs/heads/main
2023-09-05T23:17:53.125096
2021-11-18T18:43:50
2021-11-18T18:43:50
429,539,907
0
0
null
null
null
null
UTF-8
Java
false
false
384
java
package com.colpatria.taskmanager.commons.domains.generic; import lombok.*; @Data @AllArgsConstructor @NoArgsConstructor @ToString @Builder public class UserDTO { private String idUser; private String nameUser; private String lastNameUser; private String identUser; private String mailUser; private String loginNameUser; private String passwordUser; }
d1af8f9ef0cfd6714965446280218178bf561718
90ccb066437d0323009c32c3cec1592e10a7e0b9
/SGame/app/src/main/java/kr/ac/kpu/game/s2016180003/sgame/framework/GameBitmap.java
966d17756827daa006c7c5a7db93f5b171da3740
[]
no_license
hd3379/SGPProjects
7bdcb905a7b0f712c5802058bf0fdb6cae8e6968
28d86491504990cd8194a344129e3f57425c77a0
refs/heads/main
2023-05-22T08:24:00.083249
2021-06-10T19:33:43
2021-06-10T19:33:43
350,710,057
0
0
null
null
null
null
UTF-8
Java
false
false
784
java
package kr.ac.kpu.game.s2016180003.sgame.framework; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.util.HashMap; import kr.ac.kpu.game.s2016180003.sgame.view.GameView; public class GameBitmap { private static HashMap<Integer, Bitmap> bitmaps = new HashMap<Integer, Bitmap>(); protected Bitmap load(int resId) { Bitmap bitmap = bitmaps.get(resId); if(bitmap == null) { Resources res = GameView.view.getResources(); BitmapFactory.Options opts = new BitmapFactory.Options(); opts.inScaled = false; bitmap = BitmapFactory.decodeResource(res, resId, opts); bitmaps.put(resId, bitmap); } return bitmap; } }
9955c982a7694f9863b90ee54fd3df16748ae233
42aaa68a848c0f5cbedf265567e2466e4b1d6757
/src/main/java/jxl/biff/drawing/Dgg.java
f19b2c31abb42219861e42b6939c6df4108eacd0
[]
no_license
qinglinyi/jexcelapi-gradle
c6abd8ada1a75a06b1ed8d102c983ae203eba46a
d50a877597c54f578855b315902e18f149fc3503
refs/heads/master
2021-01-16T15:49:02.486798
2017-02-01T09:47:27
2017-02-01T15:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,213
java
/********************************************************************* * * Copyright (C) 2003 Andrew Khan * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ***************************************************************************/ package jxl.biff.drawing; import jxl.biff.IntegerHelper; import jxl.common.Logger; import java.util.ArrayList; /** * Dgg record */ class Dgg extends EscherAtom { /** * The logger */ private static Logger logger = Logger.getLogger(Dgg.class); /** * The binary data */ private byte[] data; /** * The number of clusters */ private int numClusters; /** * The maximum shape id */ private int maxShapeId; /** * The number of shapes saved */ private int shapesSaved; /** * The number of drawings saved */ private int drawingsSaved; /** * The clusters */ private ArrayList clusters; /** * The cluster structure */ static final class Cluster { /** * The drawing group id */ int drawingGroupId; /** * The something or other */ int shapeIdsUsed; /** * Constructor * * @param dgId the drawing group id * @param sids the sids */ Cluster(int dgId, int sids) { drawingGroupId = dgId; shapeIdsUsed = sids; } } /** * Constructor * * @param erd the read in data */ public Dgg(EscherRecordData erd) { super(erd); clusters = new ArrayList(); byte[] bytes = getBytes(); maxShapeId = IntegerHelper.getInt (bytes[0], bytes[1], bytes[2], bytes[3]); numClusters = IntegerHelper.getInt (bytes[4], bytes[5], bytes[6], bytes[7]); shapesSaved = IntegerHelper.getInt (bytes[8], bytes[9], bytes[10], bytes[11]); drawingsSaved = IntegerHelper.getInt (bytes[12], bytes[13], bytes[14], bytes[15]); int pos = 16; for (int i = 0; i < numClusters; i++) { int dgId = IntegerHelper.getInt(bytes[pos], bytes[pos + 1]); int sids = IntegerHelper.getInt(bytes[pos + 2], bytes[pos + 3]); Cluster c = new Cluster(dgId, sids); clusters.add(c); pos += 4; } } /** * Constructor * * @param numShapes the number of shapes * @param numDrawings the number of drawings */ public Dgg(int numShapes, int numDrawings) { super(EscherRecordType.DGG); shapesSaved = numShapes; drawingsSaved = numDrawings; clusters = new ArrayList(); } /** * Adds a cluster to this record * * @param dgid the id * @param sids the sid */ void addCluster(int dgid, int sids) { Cluster c = new Cluster(dgid, sids); clusters.add(c); } /** * Gets the data for writing out * * @return the binary data */ byte[] getData() { numClusters = clusters.size(); data = new byte[16 + numClusters * 4]; // The max shape id IntegerHelper.getFourBytes(1024 + shapesSaved, data, 0); // The number of clusters IntegerHelper.getFourBytes(numClusters, data, 4); // The number of shapes saved IntegerHelper.getFourBytes(shapesSaved, data, 8); // The number of drawings saved // IntegerHelper.getFourBytes(drawingsSaved, data, 12); IntegerHelper.getFourBytes(1, data, 12); int pos = 16; for (int i = 0; i < numClusters; i++) { Cluster c = (Cluster) clusters.get(i); IntegerHelper.getTwoBytes(c.drawingGroupId, data, pos); IntegerHelper.getTwoBytes(c.shapeIdsUsed, data, pos + 2); pos += 4; } return setHeaderData(data); } /** * Accessor for the number of shapes saved * * @return the number of shapes saved */ int getShapesSaved() { return shapesSaved; } /** * Accessor for the number of drawings saved * * @return the number of drawings saved */ int getDrawingsSaved() { return drawingsSaved; } /** * Accessor for a particular cluster * * @param i the cluster number * @return the cluster */ Cluster getCluster(int i) { return (Cluster) clusters.get(i); } }
46b97f43aca46ae6e21cb3f2448e6ce9ec72a9ba
3cc4d5e841e30b5717a6fb2fdb05b12405b2d3ce
/RobotOnTiles/src/main/java/assignment/home/tina/Translator.java
071bb45e49eaa9292158d419220c1a2c6823911a
[]
no_license
stortina/AuditionStortina
1ff198974281f0261ad5a28a6111bc3676fb9039
3cbf50cbace9d08545aa0c412dcd6633a7192e92
refs/heads/master
2020-12-25T19:26:21.957482
2012-03-26T19:33:55
2012-03-26T19:33:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,482
java
package assignment.home.tina; //import java.util.regex.Matcher; //import java.util.regex.Pattern; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Translator { private final static Logger LOG = LoggerFactory.getLogger(Translator.class .getSimpleName()); public static String translateEnlighsOrdersToSwedish (String commands){ commands = commands.replaceAll("L", "V"); commands = commands.replaceAll("R", "H"); commands = commands.replaceAll("F", "G"); return commands; } public static String getDirectionAsCompass(int currentRotation, boolean english){ switch( currentRotation ){ case 0: { return "N"; } case 90: { return english? "E": "Ö"; //East is to the right on a map! } case 180: { return "S"; } case 270: { return english? "W": "V";//West is to the left on a map! } default: return null; } } } //public static String tidyUpCommands(String commands, boolean useEnglish){ // //LOG.info("Receiving a String of length {}", commands.length()); // //String tidyCommands = commands; // //String regex_anyCharBut = ( useEnglish ) ? "[^FLRflr]" : "[^GHVghv]"; // // tidyCommands = Pattern.compile(regex_anyCharBut).matcher(tidyCommands).replaceAll(""); // tidyCommands = tidyCommands.toUpperCase(Locale.ENGLISH); // // // LOG.info("no length is: ", tidyCommands.length()); //return tidyCommands; //}
2ee09bb86bee13e8ebebf267d16d55aa90313e54
eace8b32a87489266bec9f2a867f89e6b9caa5e7
/GingerUI/gingerui/src/main/java/com/spicerack/framework/frameworkutilities/LogUtil.java
72a68f794e6887fee2e02342367343d04c92a6cd
[]
no_license
nageshphaniraj81/SpiceRack
d3e161918b9f4a7c40b23f9762f991df98d13699
4a3078f426f46d3d8c9cb491bf2ce65e0c9b5cdd
refs/heads/master
2021-01-20T02:42:30.159445
2019-03-14T10:40:31
2019-03-14T10:40:31
89,444,622
0
0
null
null
null
null
UTF-8
Java
false
false
2,040
java
/* * */ package com.spicerack.framework.frameworkutilities; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import com.spicerack.framework.configuration.ConfigReader; import com.spicerack.framework.configuration.Settings; /** * The Class LogUtil used to generate userdefined logs */ public class LogUtil { /** The date. */ // File format for the log file ZonedDateTime date = ZonedDateTime.now(); /** The formatter. */ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("ddMMyyyyHHMMSS"); /** The file name format. */ String fileNameFormat = date.format(formatter); /** The buffered writter. */ private BufferedWriter bufferedWritter = null; /** * Instantiates a new log util. * * @throws IOException * Signals that an I/O exception has occurred. */ public LogUtil() throws IOException{ // Initializing configuration Settings ConfigReader.populateSetting(); } /** * Creates the log file in the location specified in * Global Configuration properties file. */ private void CreateLogFile() { try { File dir = new File(Settings.LogFolder); if (!dir.exists()) dir.mkdir(); File logFile = new File(dir + "/" +fileNameFormat+".log"); FileWriter fileWriter = new FileWriter(logFile.getAbsolutePath()); bufferedWritter = new BufferedWriter(fileWriter); } catch (Exception e) { System.out.println(e.toString()); } } /** * To write the log message in the log. * * @param message * the message */ public void Write(String message) { CreateLogFile(); try { formatter = DateTimeFormatter.ofPattern("dd-MM-yy:HH_MM_SS"); String dateFormat = date.format(formatter); bufferedWritter.write(" ["+dateFormat+"] "+message); bufferedWritter.newLine(); bufferedWritter.flush(); } catch (Exception e) { System.out.println(e.toString()); } } }
0c31eafa2e7409fa0ef80c628bd673be38ea370c
0c13449e14bb50987b2a16a8f8798daaae5c44c9
/hotel/common/jpacommonsecurity/com/jython/serversecurity/jpa/OObjectAdminJpa.java
438711862d3b604c57111f84d9dca10b458083f4
[]
no_license
digideskio/javahotel
68929601930ef6cbee2e6d06fc8b92a764e5663e
169d131f9e515fa3032fe061e3bcb0512950ffbc
refs/heads/master
2021-01-13T03:39:34.874305
2016-12-06T22:42:42
2016-12-06T22:42:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
13,629
java
package com.jython.serversecurity.jpa; /* * Copyright 2016 [email protected] * 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. */ import java.util.ArrayList; import java.util.List; import javax.inject.Named; import javax.persistence.EntityManager; import javax.persistence.NoResultException; import javax.persistence.Query; import com.google.inject.Inject; import com.gwtmodel.table.common.CUtil; import com.gwtmodel.table.shared.RMap; import com.jython.serversecurity.AppInstanceId; import com.jython.serversecurity.IOObjectAdmin; import com.jython.serversecurity.OObject; import com.jython.serversecurity.OObjectRoles; import com.jython.serversecurity.Person; import com.jython.serversecurity.jpa.entities.EDictEntry; import com.jython.serversecurity.jpa.entities.EObject; import com.jython.serversecurity.jpa.entities.EPersonPassword; import com.jython.serversecurity.jpa.entities.EPersonRoles; import com.jython.ui.server.jpatrans.ITransactionContextFactory; import com.jython.ui.server.jpatrans.JpaTransaction; import com.jythonui.server.BUtil; import com.jythonui.server.ISharedConsts; import com.jythonui.server.UtilHelper; import com.jythonui.server.getmess.IGetLogMess; import com.jythonui.server.logmess.IErrorCode; import com.jythonui.server.logmess.ILogMess; public class OObjectAdminJpa extends UtilHelper implements IOObjectAdmin { private final ITransactionContextFactory iC; private final IGetLogMess lMess; @Inject public OObjectAdminJpa(ITransactionContextFactory iC, @Named(ISharedConsts.JYTHONMESSSERVER) IGetLogMess lMess) { this.iC = iC; this.lMess = lMess; } private abstract class doTransaction extends JpaTransaction { final AppInstanceId i; private doTransaction(AppInstanceId i) { super(iC); this.i = i; if (i.getId() == null) { String mess = lMess.getMess(IErrorCode.ERRORCODE85, ILogMess.INSTANCEIDCANNOTNENULLHERE); errorLog(mess); } } } private void addRole(List<OObjectRoles> resList, RMap object, EPersonRoles p) { OObjectRoles role = new OObjectRoles(object); for (String r : p.getRoles()) { role.getRoles().add(r); } resList.add(role); } private EObject getObjectByName(EntityManager em, AppInstanceId i, String name) { Query q = em.createNamedQuery("findObjectByName"); q.setParameter(1, i.getId()); q.setParameter(2, name); try { EObject hote = (EObject) q.getSingleResult(); return hote; } catch (NoResultException e) { return null; } } private EPersonPassword getPersonByName(EntityManager em, AppInstanceId i, String name) { Query q = em.createNamedQuery("findPersonByName"); q.setParameter(1, i.getId()); q.setParameter(2, name); try { EPersonPassword pers = (EPersonPassword) q.getSingleResult(); return pers; } catch (NoResultException e) { return null; } } private class GetListOfRolesForPerson extends doTransaction { private final String person; private List<OObjectRoles> resList = new ArrayList<OObjectRoles>(); GetListOfRolesForPerson(AppInstanceId i, String person) { super(i); this.person = person; } @Override protected void dosth(EntityManager em) { EPersonPassword pers = getPersonByName(em, i, person); if (pers == null) { resList = null; return; } Query q = em.createNamedQuery("getListOfRolesForPerson"); q.setParameter(1, pers); List<EPersonRoles> list = q.getResultList(); for (EPersonRoles p : list) { // Query q1 = em.createNamedQuery("findObjectByLong"); // q1.setParameter(1, p.getObject()); // EObject h = (EObject) q1.getSingleResult(); EObject h = p.getObject(); OObject ho = new OObject(); PropUtils.copyToProp(ho, h); addRole(resList, ho, p); } } } @Override public List<OObjectRoles> getListOfRolesForPerson(AppInstanceId i, String person) { GetListOfRolesForPerson com = new GetListOfRolesForPerson(i, person); com.executeTran(); return com.resList; } private class GetListOfRolesForOObject extends doTransaction { private final String Object; private List<OObjectRoles> resList = new ArrayList<OObjectRoles>(); GetListOfRolesForOObject(AppInstanceId i, String Object) { super(i); this.Object = Object; } @Override protected void dosth(EntityManager em) { EObject hote = getObjectByName(em, i, Object); if (hote == null) { resList = null; return; } Query q = em.createNamedQuery("getListOfRolesForObject"); q.setParameter(1, hote); List<EPersonRoles> list = q.getResultList(); for (EPersonRoles p : list) { EPersonPassword h = p.getPerson(); Person ho = new Person(); PropUtils.copyToProp(ho, h); addRole(resList, ho, p); } } } @Override public List<OObjectRoles> getListOfRolesForObject(AppInstanceId i, String Object) { GetListOfRolesForOObject comm = new GetListOfRolesForOObject(i, Object); comm.executeTran(); return comm.resList; } private void modifPersonRoles(EntityManager em, EObject object, EPersonPassword pe, OObjectRoles role) { EPersonRoles eRoles = new EPersonRoles(); eRoles.setObject(object); eRoles.setPerson(pe); ArrayList<String> roles = new ArrayList<String>(); for (String ro : role.getRoles()) { roles.add(ro); } eRoles.setRoles(roles); em.persist(eRoles); } private class AddModifOObject extends doTransaction { private final OObject OObject; private final List<OObjectRoles> roles; AddModifOObject(AppInstanceId i, OObject OObject, List<OObjectRoles> roles) { super(i); this.OObject = OObject; this.roles = roles; } @Override protected void dosth(EntityManager em) { EObject hote = getObjectByName(em, i, OObject.getName()); boolean create = false; if (hote == null) { hote = new EObject(); hote.setInstanceId(i.getId()); create = true; } PropUtils.copyToEDict(hote, OObject); BUtil.setCreateModif(i.getPerson(), hote, create); em.persist(hote); makekeys(); Query q = em.createNamedQuery("removeRolesForObject"); q.setParameter(1, hote); q.executeUpdate(); for (OObjectRoles rol : roles) { Person pe = (Person) rol.getObject(); String person = pe.getName(); EPersonPassword pers = getPersonByName(em, i, person); modifPersonRoles(em, hote, pers, rol); } } } @Override public void addOrModifObject(AppInstanceId i, OObject Object, List<OObjectRoles> roles) { AddModifOObject comma = new AddModifOObject(i, Object, roles); comma.executeTran(); } private class AddModifPerson extends doTransaction { private final Person person; private final List<OObjectRoles> roles; AddModifPerson(AppInstanceId i, Person person, List<OObjectRoles> roles) { super(i); this.person = person; this.roles = roles; } @Override protected void dosth(EntityManager em) { EPersonPassword pe = getPersonByName(em, i, person.getName()); boolean create = false; if (pe == null) { pe = new EPersonPassword(); pe.setInstanceId(i.getId()); create = true; } PropUtils.copyToEDict(pe, person); BUtil.setCreateModif(i.getPerson(), pe, create); em.persist(pe); makekeys(); Query q = em.createNamedQuery("removeRolesForPerson"); q.setParameter(1, pe); q.executeUpdate(); for (OObjectRoles rol : roles) { OObject ho = (OObject) rol.getObject(); String OObject = ho.getName(); EObject hote = getObjectByName(em, i, OObject); modifPersonRoles(em, hote, pe, rol); } } } @Override public void addOrModifPerson(AppInstanceId i, Person person, List<OObjectRoles> roles) { AddModifPerson comma = new AddModifPerson(i, person, roles); comma.executeTran(); } private class ChangePassword extends doTransaction { private final String person; private final String password; ChangePassword(AppInstanceId i, String person, String password) { super(i); this.person = person; this.password = password; } @Override protected void dosth(EntityManager em) { EPersonPassword pe = getPersonByName(em, i, person); pe.setPassword(password); em.persist(pe); } } @Override public void changePasswordForPerson(AppInstanceId i, String person, String password) { ChangePassword comma = new ChangePassword(i, person, password); comma.executeTran(); } private class ValidatePassword extends doTransaction { private final String person; private final String password; boolean ok = false; ValidatePassword(AppInstanceId i, String person, String password) { super(i); this.person = person; this.password = password; } @Override protected void dosth(EntityManager em) { EPersonPassword pe = getPersonByName(em, i, person); if (pe == null) return; if (CUtil.EmptyS(pe.getPassword())) return; ok = password.equals(pe.getPassword()); } } @Override public boolean validatePasswordForPerson(AppInstanceId i, String person, String password) { ValidatePassword comma = new ValidatePassword(i, person, password); comma.executeTran(); return comma.ok; } private class GetListOfPersons extends doTransaction { private final List<Person> pList = new ArrayList<Person>(); GetListOfPersons(AppInstanceId i) { super(i); } @Override protected void dosth(EntityManager em) { Query q = em.createNamedQuery("findAllPersons"); q.setParameter(1, i.getId()); List<EPersonPassword> resList = q.getResultList(); for (EPersonPassword e : resList) { Person pe = new Person(); PropUtils.copyToProp(pe, e); pList.add(pe); } } } @Override public List<Person> getListOfPersons(AppInstanceId i) { GetListOfPersons comma = new GetListOfPersons(i); comma.executeTran(); return comma.pList; } private class GetListOfOObjects extends doTransaction { private final List<OObject> hList = new ArrayList<OObject>(); GetListOfOObjects(AppInstanceId i) { super(i); } @Override protected void dosth(EntityManager em) { Query q = em.createNamedQuery("findAllObjects"); q.setParameter(1, i.getId()); List<EObject> resList = q.getResultList(); for (EObject e : resList) { OObject ho = new OObject(); PropUtils.copyToProp(ho, e); hList.add(ho); } } } @Override public List<OObject> getListOfObjects(AppInstanceId i) { GetListOfOObjects comma = new GetListOfOObjects(i); comma.executeTran(); return comma.hList; } private class DeleteAll extends doTransaction { DeleteAll(AppInstanceId i) { super(i); } @Override protected void dosth(EntityManager em) { String[] findAllQ = { "findAllPersons", "findAllObjects" }; String[] removeQ = { "removeRolesForPerson", "removeRolesForObject" }; for (int k = 0; k < findAllQ.length; k++) { Query q = em.createNamedQuery(findAllQ[k]); q.setParameter(1, i.getId()); List<EDictEntry> resList = q.getResultList(); for (EDictEntry e : resList) { Query q1 = em.createNamedQuery(removeQ[k]); q1.setParameter(1, e); q1.executeUpdate(); } } String[] namedQ = new String[] { "removeAllObjects", "removeAllPersons" }; for (String s : namedQ) { Query q = em.createNamedQuery(s); q.setParameter(1, i.getId()); q.executeUpdate(); } } } @Override public void clearAll(AppInstanceId i) { info(lMess.getMessN(ILogMess.CLEANALLADMIN)); DeleteAll comm = new DeleteAll(i); comm.executeTran(); } private class RemovePerson extends doTransaction { private final String person; RemovePerson(AppInstanceId i, String person) { super(i); this.person = person; } @Override protected void dosth(EntityManager em) { EPersonPassword pe = getPersonByName(em, i, person); Query q = em.createNamedQuery("removeRolesForPerson"); q.setParameter(1, pe); q.executeUpdate(); em.remove(pe); } } @Override public void removePerson(AppInstanceId i, String person) { RemovePerson comma = new RemovePerson(i, person); comma.executeTran(); } private class RemoveOObject extends doTransaction { private final String OObject; RemoveOObject(AppInstanceId i, String OObject) { super(i); this.OObject = OObject; } @Override protected void dosth(EntityManager em) { EObject hote = getObjectByName(em, i, OObject); Query q = em.createNamedQuery("removeRolesForObject"); q.setParameter(1, hote); q.executeUpdate(); em.remove(hote); } } @Override public void removeObject(AppInstanceId i, String OObject) { RemoveOObject comma = new RemoveOObject(i, OObject); comma.executeTran(); } private class GetPassword extends doTransaction { private final String person; String password; GetPassword(AppInstanceId i, String person) { super(i); this.person = person; password = null; } @Override protected void dosth(EntityManager em) { EPersonPassword pe = getPersonByName(em, i, person); if (pe == null) return; if (CUtil.EmptyS(pe.getPassword())) return; password = pe.getPassword(); } } @Override public String getPassword(AppInstanceId i, String person) { GetPassword comm = new GetPassword(i, person); comm.executeTran(); return comm.password; } }
64fe5dcb7859611e3f1ded36e5a1d50d13318ea0
66e307e4a2ed39ae7de82759d6c6f8b1eb278484
/src/main/java/br/ifpe/pp2/controller/VideoAulaController.java
8928c7e4a27b66dfc66b476e646fad9aeee76923
[]
no_license
TaisSantana/Projeto-2-IFPE
445d73fad8ef054c954d2c4cc96544cffb0477c3
334bd2bbffc03bf673c37ebd6fea22b43d3d2a38
refs/heads/master
2023-08-14T22:56:05.731634
2021-08-17T03:02:08
2021-08-17T03:02:08
368,006,597
0
1
null
2021-08-17T03:02:09
2021-05-16T23:35:38
CSS
UTF-8
Java
false
false
71
java
package br.ifpe.pp2.controller; public class VideoAulaController { }
4bdf2f8539e1863729244f523c8469a49e46e5c9
89dc8e394218cb49b4d3d46f0bbd1db4b010fed7
/idea2/ProjectSpringmvc/src/com/systop/controller/ProController.java
90c7b81917fd048047399a045cc349b2e7a0530e
[]
no_license
cloud-star-player/java-test
90ee45a78a3a6a69d5e588cad5e2360fd59e7ffc
dbad0c81a291a7b9c2cf324cf8fd0e83da451b93
refs/heads/master
2022-12-04T16:20:29.788999
2020-08-15T11:17:35
2020-08-15T11:17:35
287,731,861
0
0
null
null
null
null
UTF-8
Java
false
false
1,671
java
package com.systop.controller; import java.util.List; import java.util.UUID; import java.io.File; import java.net.URLEncoder; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import com.systop.pojo.UserLogin; import com.systop.service.UserLoginService; @Controller public class ProController { @Autowired private UserLoginService useLoginService; @RequestMapping("/tologin") public String tologin(){ return "login"; } @RequestMapping("/login") public String tocustomer() { return "customer"; } @PostMapping(value = "/user/{usercode}/{password}") public @ResponseBody Integer selectUser(@PathVariable("usercode") String usercode, @PathVariable("password") String password, HttpSession session) throws Exception { UserLogin a =useLoginService.login(usercode,password); session.setAttribute("user",a); int b = 1; if (a != null) { b = 1; } else { b = 0; } return b; } }
1358652d078a2969bdb44b99acf190a75c4d63a5
f4fec896b47fd72f9fb81b5fef037bda86d035f7
/app/src/main/java/com/example/videoplayer/view/MyViedeoPlayer.java
5c707a313049a867875ea5092d58cf31467ea351
[]
no_license
zhuandian/videoplayer
e313a3cbf73c3317103b6118aa761da6f5d034b0
03eccd17d3271905e09448eb8037c0d7baf278a9
refs/heads/master
2021-01-04T06:47:08.902324
2020-02-22T10:54:24
2020-02-22T10:54:24
240,435,893
0
0
null
null
null
null
UTF-8
Java
false
false
945
java
package com.example.videoplayer.view; import android.content.Context; import android.util.AttributeSet; import cn.jzvd.JZVideoPlayer; import cn.jzvd.JZVideoPlayerStandard; /** * desc : * author:xiedong * date:2020/02/07 */ public class MyViedeoPlayer extends JZVideoPlayerStandard { private OnVideoPlayingListener videoPlayingListener; public MyViedeoPlayer(Context context) { this(context, null); } public MyViedeoPlayer(Context context, AttributeSet attrs) { super(context, attrs); } @Override public void onStatePlaying() { super.onStatePlaying(); if (videoPlayingListener != null) { videoPlayingListener.onVideoPlaying(); } } public void setOnVideoPlayingListener(OnVideoPlayingListener listener) { this.videoPlayingListener = listener; } public interface OnVideoPlayingListener { void onVideoPlaying(); } }
86ff2840b9e7be8b517357fc984bf05aa69e5017
4d0c8db0342cdc1ba109ffcfda77fda9514b77a7
/src/hawox/uquest/PluginListener.java
daabdab1f725ab730cc913d22c1ed5f22dd04427
[]
no_license
Elephunk/uQuest
cc72560bc2afb4592f73545e7a8d4e813053f151
44b79f81853f32d117b189cff0e8abd41a17668a
refs/heads/master
2021-01-18T05:50:53.711877
2011-05-05T03:57:13
2011-05-05T03:57:13
1,689,984
0
0
null
null
null
null
UTF-8
Java
false
false
2,221
java
package hawox.uquest; import org.bukkit.event.server.PluginEnableEvent; import org.bukkit.event.server.ServerListener; import org.bukkit.plugin.Plugin; import com.earth2me.essentials.Essentials; import com.nijiko.coelho.iConomy.iConomy; import com.nijikokun.bukkit.Permissions.Permissions; import cosine.boseconomy.BOSEconomy; /** * Checks for plugins whenever one is enabled */ public class PluginListener extends ServerListener { public PluginListener() { } @Override public void onPluginEnable(PluginEnableEvent event) { if(UQuest.getiConomy() == null) { Plugin iConomy = UQuest.getBukkitServer().getPluginManager().getPlugin("iConomy"); if (iConomy != null) { if(iConomy.isEnabled()) { UQuest.setiConomy((iConomy)iConomy); System.out.println("[uQuest] Successfully linked with iConomy."); } } } if(UQuest.getPermissions() == null){ Plugin Permissions = UQuest.getBukkitServer().getPluginManager().getPlugin("Permissions"); if (Permissions != null) { if(Permissions.isEnabled()){ UQuest.setPermissions(((Permissions) Permissions).getHandler()); System.out.println("[uQuest] Successfully linked with Permissions."); } } } if(UQuest.getBOSEconomy() == null){ Plugin BOSEconomy = UQuest.getBukkitServer().getPluginManager().getPlugin("BOSEconomy"); if (BOSEconomy != null) { if(BOSEconomy.isEnabled()){ UQuest.setBOSEconomy((BOSEconomy) BOSEconomy); System.out.println("[uQuest] Successfully linked with BOSEconomy."); } } } if(UQuest.getEssentials() == null){ Plugin Essentials = UQuest.getBukkitServer().getPluginManager().getPlugin("Essentials"); if (Essentials != null) { if(Essentials.isEnabled()){ UQuest.setEssentials((Essentials) Essentials); System.out.println("[uQuest] Successfully linked with Essentials."); } } } } }
52c0853825c8ddebd6c6ec7a1c509e207eb8aa37
fec4a09f54f4a1e60e565ff833523efc4cc6765a
/Dependencies/work/decompile-00fabbe5/net/minecraft/world/level/levelgen/feature/WorldGenDungeons.java
b200edc481ef21c92009fdd6bdc8d453560ef46e
[]
no_license
DefiantBurger/SkyblockItems
012d2082ae3ea43b104ac4f5bf9eeb509889ec47
b849b99bd4dc52ae2f7144ddee9cbe2fd1e6bf03
refs/heads/master
2023-06-23T17:08:45.610270
2021-07-27T03:27:28
2021-07-27T03:27:28
389,780,883
0
0
null
null
null
null
UTF-8
Java
false
false
7,443
java
package net.minecraft.world.level.levelgen.feature; import com.mojang.serialization.Codec; import java.util.Iterator; import java.util.Random; import java.util.function.Predicate; import net.minecraft.SystemUtils; import net.minecraft.core.BlockPosition; import net.minecraft.core.EnumDirection; import net.minecraft.tags.TagsBlock; import net.minecraft.world.entity.EntityTypes; import net.minecraft.world.level.GeneratorAccessSeed; import net.minecraft.world.level.IBlockAccess; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.entity.TileEntity; import net.minecraft.world.level.block.entity.TileEntityLootable; import net.minecraft.world.level.block.entity.TileEntityMobSpawner; import net.minecraft.world.level.block.state.IBlockData; import net.minecraft.world.level.levelgen.feature.configurations.WorldGenFeatureEmptyConfiguration; import net.minecraft.world.level.levelgen.structure.StructurePiece; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.storage.loot.LootTables; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class WorldGenDungeons extends WorldGenerator<WorldGenFeatureEmptyConfiguration> { private static final Logger LOGGER = LogManager.getLogger(); private static final EntityTypes<?>[] MOBS = new EntityTypes[]{EntityTypes.SKELETON, EntityTypes.ZOMBIE, EntityTypes.ZOMBIE, EntityTypes.SPIDER}; private static final IBlockData AIR = Blocks.CAVE_AIR.getBlockData(); public WorldGenDungeons(Codec<WorldGenFeatureEmptyConfiguration> codec) { super(codec); } @Override public boolean generate(FeaturePlaceContext<WorldGenFeatureEmptyConfiguration> featureplacecontext) { Predicate<IBlockData> predicate = WorldGenerator.a(TagsBlock.FEATURES_CANNOT_REPLACE.a()); BlockPosition blockposition = featureplacecontext.d(); Random random = featureplacecontext.c(); GeneratorAccessSeed generatoraccessseed = featureplacecontext.a(); boolean flag = true; int i = random.nextInt(2) + 2; int j = -i - 1; int k = i + 1; boolean flag1 = true; boolean flag2 = true; int l = random.nextInt(2) + 2; int i1 = -l - 1; int j1 = l + 1; int k1 = 0; BlockPosition blockposition1; int l1; int i2; int j2; for (l1 = j; l1 <= k; ++l1) { for (i2 = -1; i2 <= 4; ++i2) { for (j2 = i1; j2 <= j1; ++j2) { blockposition1 = blockposition.c(l1, i2, j2); Material material = generatoraccessseed.getType(blockposition1).getMaterial(); boolean flag3 = material.isBuildable(); if (i2 == -1 && !flag3) { return false; } if (i2 == 4 && !flag3) { return false; } if ((l1 == j || l1 == k || j2 == i1 || j2 == j1) && i2 == 0 && generatoraccessseed.isEmpty(blockposition1) && generatoraccessseed.isEmpty(blockposition1.up())) { ++k1; } } } } if (k1 >= 1 && k1 <= 5) { for (l1 = j; l1 <= k; ++l1) { for (i2 = 3; i2 >= -1; --i2) { for (j2 = i1; j2 <= j1; ++j2) { blockposition1 = blockposition.c(l1, i2, j2); IBlockData iblockdata = generatoraccessseed.getType(blockposition1); if (l1 != j && i2 != -1 && j2 != i1 && l1 != k && i2 != 4 && j2 != j1) { if (!iblockdata.a(Blocks.CHEST) && !iblockdata.a(Blocks.SPAWNER)) { this.a(generatoraccessseed, blockposition1, WorldGenDungeons.AIR, predicate); } } else if (blockposition1.getY() >= generatoraccessseed.getMinBuildHeight() && !generatoraccessseed.getType(blockposition1.down()).getMaterial().isBuildable()) { generatoraccessseed.setTypeAndData(blockposition1, WorldGenDungeons.AIR, 2); } else if (iblockdata.getMaterial().isBuildable() && !iblockdata.a(Blocks.CHEST)) { if (i2 == -1 && random.nextInt(4) != 0) { this.a(generatoraccessseed, blockposition1, Blocks.MOSSY_COBBLESTONE.getBlockData(), predicate); } else { this.a(generatoraccessseed, blockposition1, Blocks.COBBLESTONE.getBlockData(), predicate); } } } } } l1 = 0; while (l1 < 2) { i2 = 0; while (true) { if (i2 < 3) { label100: { j2 = blockposition.getX() + random.nextInt(i * 2 + 1) - i; int k2 = blockposition.getY(); int l2 = blockposition.getZ() + random.nextInt(l * 2 + 1) - l; BlockPosition blockposition2 = new BlockPosition(j2, k2, l2); if (generatoraccessseed.isEmpty(blockposition2)) { int i3 = 0; Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator(); while (iterator.hasNext()) { EnumDirection enumdirection = (EnumDirection) iterator.next(); if (generatoraccessseed.getType(blockposition2.shift(enumdirection)).getMaterial().isBuildable()) { ++i3; } } if (i3 == 1) { this.a(generatoraccessseed, blockposition2, StructurePiece.a((IBlockAccess) generatoraccessseed, blockposition2, Blocks.CHEST.getBlockData()), predicate); TileEntityLootable.a((IBlockAccess) generatoraccessseed, random, blockposition2, LootTables.SIMPLE_DUNGEON); break label100; } } ++i2; continue; } } ++l1; break; } } this.a(generatoraccessseed, blockposition, Blocks.SPAWNER.getBlockData(), predicate); TileEntity tileentity = generatoraccessseed.getTileEntity(blockposition); if (tileentity instanceof TileEntityMobSpawner) { ((TileEntityMobSpawner) tileentity).getSpawner().setMobName(this.a(random)); } else { WorldGenDungeons.LOGGER.error("Failed to fetch mob spawner entity at ({}, {}, {})", blockposition.getX(), blockposition.getY(), blockposition.getZ()); } return true; } else { return false; } } private EntityTypes<?> a(Random random) { return (EntityTypes) SystemUtils.a((Object[]) WorldGenDungeons.MOBS, random); } }
73b11f24de4827e09e7acff07e9531775161af9c
af6cb688760ffd70603efffa285e8469ecaf7834
/springbootfirst/src/test/java/com/faramarz/spring/springbootfirst/SpringbootfirstApplicationTests.java
5457ece98b999c9aa0a72d67dd3119d82c92154d
[]
no_license
faramarzaf/SpringReference
fcf84de7399e14d986c51136aa18a6206d7d282b
e953e341c9d43fa04afe850ad2f83876127f0d6a
refs/heads/main
2023-06-20T18:44:23.564653
2021-07-30T08:03:35
2021-07-30T08:05:21
376,356,228
0
0
null
2021-07-29T20:52:40
2021-06-12T18:10:56
Java
UTF-8
Java
false
false
236
java
package com.faramarz.spring.springbootfirst; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class SpringbootfirstApplicationTests { @Test void contextLoads() { } }
f6485390e234eb9a07aa14682e41a055f3e115c1
681e97a53c76afc2ffdfceeb2bfecdb3ffd9aeff
/app/src/main/java/com/ihm/myapp/entity/DurationObject.java
883fe82cbdbbcb2c3d65228f92d2777fb96cc9e3
[]
no_license
madforfame/jogging
3b936f387552917eae47026820c71dbeeb036c85
3110f91cada5e0663590d2f11fdce9a58da71020
refs/heads/master
2020-08-26T11:36:26.371885
2019-11-06T09:29:30
2019-11-06T09:29:30
217,005,124
0
0
null
null
null
null
UTF-8
Java
false
false
324
java
package com.ihm.myapp.entity; public class DurationObject { private String text; public DurationObject(){} public DurationObject(String text) { this.text = text; } public String getText() { return text; } public void setText(String text) { this.text = text; } }
[ "liveforlove123123+" ]
liveforlove123123+
4e7956a478c7b71287a114c4fd1d915e44b288b2
8f7d1e218613839fc5bf1daec09aa1a80bdc29da
/src/main/java/com/orange/entity/ListSortUtil.java
0130997db9f77ba3d967d3cabf170cce5b9a8f87
[]
no_license
Alex429/gittest
320fd096a9b15e6211f37f949261be1fb639cc92
25d4f2cdcfa3a2090ef1d71d976e42c1992e4ac5
refs/heads/master
2020-03-22T09:26:35.039120
2018-07-05T11:42:44
2018-07-05T11:42:44
139,837,607
0
0
null
null
null
null
UTF-8
Java
false
false
3,798
java
package com.orange.entity; import java.lang.reflect.Method; import java.util.Collections; import java.util.Comparator; import java.util.List; public class ListSortUtil<T> { /** * @param targetList 要排序的集合(使用泛型) * @param sortField 要排序的集合中的实体类的某个字段 * @param sortMode 排序的方式(升序asc/降序desc) */ @SuppressWarnings({"unchecked", "rawtypes"}) public void sort(List<T> targetList, final String sortField, final String sortMode) { //使用集合的sort方法 ,并且自定义一个排序的比较器 /** * API文档: * public static <T> void sort(List<T> list,Comparator<? super T> c) * 根据指定比较器产生的顺序对指定列表进行排序。此列表内的所有元素都必须可使用指定比较器 相互比较 * (也就是说,对于列表中的任意 e1 和 e2 元素, c.compare(e1, e2) 不得抛出 ClassCastException)。 * 参数: list - 要排序的列表。 * c - 确定列表顺序的比较器。 null 值指示应该使用元素的 自然顺序。 */ Collections.sort(targetList, new Comparator() { //匿名内部类,重写compare方法 public int compare(Object obj1, Object obj2) { int result = 0; try { //首字母转大写 String newStr = sortField.substring(0, 1).toUpperCase() + sortField.replaceFirst("\\w", ""); //获取需要排序字段的“get方法名” String methodStr = "get" + newStr; /** API文档:: * getMethod(String name, Class<?>... parameterTypes) * 返回一个 Method 对象,它反映此 Class 对象所表示的类或接口的指定公共成员方法。 */ Method method1 = ((T) obj1).getClass().getMethod(methodStr, null); Method method2 = ((T) obj2).getClass().getMethod(methodStr, null); if (sortMode != null && "desc".equals(sortMode)) { /** * Method类代表一个方法,invoke(调用)就是调用Method类代表的方法。 * 它可以让你实现动态调用,也可以动态的传入参数。 * API文档:(这个英文解释更地道易懂,原谅我是英文渣,哎!) * invoke(Object obj, Object... args) * Invokes the underlying method represented by this Method object, * on the specified object with the specified parameters. */ /** API文档: * String-----public int compareTo(String anotherString) * 按字典顺序比较两个字符串。该比较基于字符串中各个字符的 Unicode 值。 * 按字典顺序将此 String 对象表示的字符序列与参数字符串所表示的字符序列进行比较 */ result = method2.invoke(((T) obj2), null).toString() .compareTo(method1.invoke(((T) obj1), null).toString()); // 倒序 } else { result = method1.invoke(((T) obj1), null).toString() .compareTo(method2.invoke(((T) obj2), null).toString()); // 正序 } } catch (Exception e) { throw new RuntimeException(); } return result; } }); } }
fde6b5781035dd1c33d30dfbfd0df4f88a784392
720ba343ce147af5b3881679e3b2aebd21d62910
/multi-language/src/main/java/com/greentea/multilang/controller/FileController.java
65333afcdfa7117f3746a16a30243b7156ad1de5
[]
no_license
tomlxq/ShowCase
698ffdaf16979c8197cba5a1f97c179b25617281
17717c3411c98ede281c75a747ff3583b82e5997
refs/heads/master
2021-01-20T10:10:49.638899
2018-11-22T16:31:56
2018-11-22T16:31:56
28,090,123
1
0
null
null
null
null
UTF-8
Java
false
false
2,678
java
package com.greentea.multilang.controller; import org.apache.commons.io.FileUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; /** * 说明: * * @author tom * @version 创建时间: 2015/1/12 20:47 */ @Controller public class FileController { @RequestMapping("/file") public ModelAndView showContacts() { Map model = new HashMap(); return new ModelAndView("file", model); } @RequestMapping(value = "/file", method = RequestMethod.POST) public void addUser(@RequestParam MultipartFile[] file_upload, HttpServletRequest request) throws IOException { //如果只是上传一个文件,则只需要MultipartFile类型接收文件即可,而且无需显式指定@RequestParam注解 //如果想上传多个文件,那么这里就要用MultipartFile[]类型来接收文件,并且还要指定@RequestParam注解 //并且上传多个文件时,前台表单中的所有<input type="file"/>的name都应该是myfiles,否则参数里的myfiles无法获取到所有上传的文件 for (MultipartFile file : file_upload) { if (file.isEmpty()) { System.out.println("文件未上传"); } else { System.out.println("文件长度: " + file.getSize()); System.out.println("文件类型: " + file.getContentType()); System.out.println("文件名称: " + file.getName()); System.out.println("文件原名: " + file.getOriginalFilename()); System.out.println("========================================"); //如果用的是Tomcat服务器,则文件会上传到\\%TOMCAT_HOME%\\webapps\\YourWebProject\\WEB-INF\\upload\\文件夹中 String realPath = request.getSession().getServletContext().getRealPath("/WEB-INF/upload"); FileUtils.forceMkdir(new File(realPath)); //这里不必处理IO流关闭的问题,因为FileUtils.copyInputStreamToFile()方法内部会自动把用到的IO流关掉,我是看它的源码才知道的 FileUtils.copyInputStreamToFile(file.getInputStream(), new File(realPath, file.getOriginalFilename())); } } } }
877b733ebe6e04ec3f08fa127f065004bb9f2651
246cb32999128007fda169aa1c6070bdce3e4464
/GamoManosALaObra2019/src/Utility/Utilities.java
76b5fa6ff62f80d40b70d44700c792bf1c9d9ff9
[]
no_license
stevenmr98/Gamos-ManosALaObra
ad20dafadfec981f80ed4cd7e337cb1b274d5b84
ea5492b2246818c4a26419319becff09f82b959c
refs/heads/master
2020-05-01T14:20:41.131528
2019-04-05T05:55:50
2019-04-05T05:55:50
177,517,201
0
0
null
null
null
null
UTF-8
Java
false
false
159
java
package Utility; /** * * @author Steven */ public class Utilities { public static String PATHTOSAVEADMINISTRATORS="Administrator.dat"; }
f5f51c8e23a377d9cee6ece1d118ea9cbbf9a6f2
763b71c5c56bedee02e29fed6bb206556a30a45e
/app/src/main/java/com/xyd/red_wine/balance/BalanceActivity.java
74bdf713c08cc1a20a004c345dee0bfa7591fe53
[]
no_license
zhengyiheng123/Red_wine
8d39bacd4e18642d4179cf436b037055cf1d98a6
3173de942c29f864ada6d1a70e7033bc28487597
refs/heads/master
2021-08-28T21:35:18.089452
2017-12-13T06:30:35
2017-12-13T06:30:35
100,663,653
0
0
null
null
null
null
UTF-8
Java
false
false
7,355
java
package com.xyd.red_wine.balance; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.text.TextUtils; import android.view.View; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import com.xyd.red_wine.R; import com.xyd.red_wine.api.MineApi; import com.xyd.red_wine.base.BaseActivity; import com.xyd.red_wine.base.BaseApi; import com.xyd.red_wine.base.BaseModel; import com.xyd.red_wine.base.BaseObserver; import com.xyd.red_wine.base.PublicStaticData; import com.xyd.red_wine.base.RxSchedulers; import com.xyd.red_wine.glide.GlideUtil; import com.xyd.red_wine.login.LoginActivity; import com.xyd.red_wine.login.StartupPageActivity; import com.xyd.red_wine.main.MainActivity; import com.xyd.red_wine.personinformation.BindActivity; import com.xyd.red_wine.personinformation.InfromationModel; import com.xyd.red_wine.promptdialog.PromptDialog; import com.xyd.red_wine.view.DrawImageView; import java.util.Random; import butterknife.Bind; import butterknife.ButterKnife; /** * @author: zhaoxiaolei * @date: 2017/7/13 * @time: 16:05 * @description: 账户余额 */ public class BalanceActivity extends BaseActivity { @Bind(R.id.base_title_back) TextView baseTitleBack; @Bind(R.id.base_title_right) TextView baseTitleRight; @Bind(R.id.base_title_title) TextView baseTitleTitle; @Bind(R.id.base_title_menu) ImageView baseTitleMenu; @Bind(R.id.balance_tv_name) TextView balanceTvName; @Bind(R.id.balance_tv_money) TextView balanceTvMoney; @Bind(R.id.balance_tv_all) TextView balanceTvAll; @Bind(R.id.balance_tv_generalize) TextView balanceTvGeneralize; @Bind(R.id.balance_tv_withdraw) TextView balanceTvWithdraw; @Bind(R.id.balance_tv_balance) TextView balanceTvBalance; @Bind(R.id.balance_tv_top_up) TextView balanceTvTopUp; @Bind(R.id.balance_rl) RelativeLayout balanceRl; @Bind(R.id.balance_iv_head) ImageView balanceIvHead; @Bind(R.id.balance_iv_money) DrawImageView balanceIvMoney; @Bind(R.id.base_title_headline) ImageView mHeadLine; private BalanceModel model; @Override protected int getLayoutId() { return R.layout.activity_account_balance; } @Override protected void initView() { mHeadLine.setVisibility(View.GONE); baseTitleTitle.setText("账户余额"); baseTitleMenu.setVisibility(View.GONE); baseTitleRight.setVisibility(View.VISIBLE); baseTitleRight.setText("记录"); getData(); } @Override protected void onResume() { super.onResume(); getData(); } private void getData() { BaseApi.getRetrofit() .create(MineApi.class) .balance() .compose(RxSchedulers.<BaseModel<BalanceModel>>compose()) .subscribe(new BaseObserver<BalanceModel>() { @Override protected void onHandleSuccess(BalanceModel balanceModel, String msg, int code) { model = balanceModel; balanceTvName.setText(balanceModel.getNickname()); GlideUtil.getInstance().loadCircleImage(BalanceActivity.this, balanceIvHead, PublicStaticData.baseUrl + balanceModel.getHead_img()); balanceTvMoney.setText(balanceModel.getTotal() + ""); balanceTvBalance.setText(balanceModel.getAccount_balance() + ""); balanceTvGeneralize.setText(balanceModel.getRevenue_balance() + ""); balanceIvMoney.setAngel(balanceModel.getTotal() / 20); } @Override protected void onHandleError(String msg) { showToast(msg); } }); } @Override protected void initEvent() { baseTitleBack.setOnClickListener(this); baseTitleMenu.setOnClickListener(this); balanceTvWithdraw.setOnClickListener(this); balanceTvTopUp.setOnClickListener(this); baseTitleRight.setOnClickListener(this); } @Override public void widgetClick(View v) { switch (v.getId()) { case R.id.base_title_back: finish(); break; case R.id.base_title_menu: // showTestToast("菜单"); // Random random = new Random(); // balanceIvMoney.setAngel(random.nextInt(360)); break; case R.id.balance_tv_withdraw: getUserInfo(); break; case R.id.balance_tv_top_up: startActivity(ChongzhiActivity.class); break; case R.id.base_title_right: startActivity(RecordActivity.class); break; } } //获取用户信息 private void getUserInfo(){ final PromptDialog dialog=new PromptDialog(BalanceActivity.this); dialog.showLoading("请稍后",false); BaseApi.getRetrofit() .create(MineApi.class) .information() .compose(RxSchedulers.<BaseModel<InfromationModel>>compose()) .subscribe(new BaseObserver<InfromationModel>() { @Override protected void onHandleSuccess(InfromationModel infromationModel, String msg, int code) { dialog.dismissImmediately(); // login("qiaozhijinhan" + infromationModel.getUserid(), "123456"); if (!TextUtils.isEmpty(infromationModel.getPhone())){ Bundle bundle=new Bundle(); bundle.putDouble(TixianActivity.AVAILAVLE_MONEY,model.getAccount_balance()); bundle.putString(TixianActivity.PHONENUM,infromationModel.getPhone()); startActivity(TixianActivity.class,bundle); }else { AlertDialog.Builder builder=new AlertDialog.Builder(BalanceActivity.this); builder.setTitle("提示"); builder.setMessage("请先绑定手机号码,才能进行提现。"); builder.setPositiveButton("确定", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { startActivity(BindActivity.class); } }); builder.setNegativeButton("取消", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); } }); builder.show(); } } @Override protected void onHandleError(String msg) { showTestToast(msg); dialog.dismissImmediately(); } }); } }
8110b1bcb4cf740ed30a65adbe71ddf639462cd9
d3d4bf071cef3df0735dde43ec800c80cad28922
/services/gamemgmt-service/src/main/java/com/trdsimul/gamemgmt/model/entity/Roles.java
0159f2ec5185c948e766ea28768daea8fbc16f3f
[]
no_license
Damini25/TradeDashboard
0df566365a2c066ab65135b299df09215f45a4a2
7686cf94410860be07a9313a7d8ba12882d75783
refs/heads/master
2022-07-14T18:44:32.922095
2021-01-02T05:45:01
2021-01-02T05:45:01
200,001,631
0
0
null
2022-06-29T18:28:01
2019-08-01T07:37:02
JavaScript
UTF-8
Java
false
false
872
java
package com.trdsimul.gamemgmt.model.entity; import java.util.Date; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table public class Roles { @Id private Integer roleId; private String roleName; private Date lastUpdate; public Roles() { super(); } public Roles(Integer roleId, String roleName, Date lastUpdate) { super(); this.roleId = roleId; this.roleName = roleName; this.lastUpdate = lastUpdate; } public Integer getRoleId() { return roleId; } public void setRoleId(Integer roleId) { this.roleId = roleId; } public String getRoleName() { return roleName; } public void setRoleName(String roleName) { this.roleName = roleName; } public Date getLastUpdate() { return lastUpdate; } public void setLastUpdate(Date lastUpdate) { this.lastUpdate = lastUpdate; } }
1d96e099a9719ce339867eacd32fa21c7618e92a
3ad3b08bd84691cb40de4c3835218a39556852d6
/Java prototype/src/SettingsPage.java
85365ef5c0ea345fd86c94cf426ee0226cea18f1
[]
no_license
SomeBeavers/StyleClassification
fe3cea483eab35153445bdaf8320f6a0852beee2
7b8634b7736cee8533fd611bc98679855ac6290e
refs/heads/master
2021-06-16T19:44:09.682056
2017-04-18T15:41:38
2017-04-18T15:41:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,054
java
import BayesClassifier.DBHelper; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.MultipartConfig; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.sql.SQLException; @WebServlet(name = "SettingsPage") // Servlet for handling Settings page. public class SettingsPage extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setAttribute("IsAdmin", CommonMethods.ConnectToDBAndCheckUser()); request.setAttribute("usernameDisplay", DBHelper.user); RequestDispatcher view = request.getRequestDispatcher("SettingsPage.jsp"); view.forward(request, response); } }
ba7f6e70923ad8687244457a90402d6a6c744b91
1c28979765ab5020071da0333afc851d92e44218
/Servidor/src/servidor/Server.java
6a1bc9c525074ddc0062ca95d8efa9f80ddda59b
[]
no_license
planthree1/SI
4ea63f27281a9c63a7ec7f94f3c814ccb9346ec8
b74eb9ddd2273f8d13906c47d8cf2493733ae7d8
refs/heads/master
2020-04-03T19:40:05.449224
2019-01-09T10:37:25
2019-01-09T10:37:25
155,530,829
0
0
null
null
null
null
UTF-8
Java
false
false
1,154
java
package servidor; import java.net.Socket; import java.net.ServerSocket; import java.net.InetAddress; class Server { static public void waitForClients ( ServerSocket s ) { ServerControl registry = new ServerControl(); try { while (true) { Socket c = s.accept(); ServerActions handler = new ServerActions( c, registry ); new Thread( handler ).start (); } } catch ( Exception e ) { System.err.print( "Cannot use socket: " + e ); } } public static void main ( String[] args ) { // if (args.length < 1) { // System.err.print( "Usage: port\n" ); // System.exit( 1 ); // } // // int port = Integer.parseInt(args[0]); try { ServerSocket s = new ServerSocket( 3000, 5, InetAddress.getByName( "localhost" ) ); System.out.print( "Started server on port " + 3000 + "\n" ); waitForClients( s ); } catch (Exception e) { System.err.print( "Cannot open socket: " + e ); System.exit( 1 ); } } }
437f99fd942a339c4147036f97cff3ca6e012a15
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/alibaba--druid/78488b0b1ab0fb312cd0c0ec4c591ed68362f91d/after/Oracle_pl_if_2.java
3e76b3edc53a51f2f2b6a3a80096917465ea9270
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,033
java
/* * Copyright 1999-2017 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.druid.bvt.sql.oracle.pl; import com.alibaba.druid.sql.OracleTest; import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.SQLStatement; import com.alibaba.druid.sql.visitor.SchemaStatVisitor; import com.alibaba.druid.util.JdbcConstants; import java.util.List; public class Oracle_pl_if_2 extends OracleTest { public void test_0() throws Exception { String sql = "IF l_salary <= 40000\n" + "THEN\n" + " give_bonus (l_employee_id, 0);\n" + "ELSE\n" + " give_bonus (l_employee_id, 500);\n" + "END IF;"; // List<SQLStatement> statementList = SQLUtils.parseStatements(sql, JdbcConstants.ORACLE); SQLStatement stmt = statementList.get(0); assertEquals(1, statementList.size()); SchemaStatVisitor visitor = SQLUtils.createSchemaStatVisitor(JdbcConstants.ORACLE); for (SQLStatement statement : statementList) { statement.accept(visitor); } // System.out.println("Tables : " + visitor.getTables()); // System.out.println("fields : " + visitor.getColumns()); // System.out.println("coditions : " + visitor.getConditions()); // System.out.println("relationships : " + visitor.getRelationships()); // System.out.println("orderBy : " + visitor.getOrderByColumns()); assertEquals(0, visitor.getTables().size()); // Assert.assertTrue(visitor.getTables().containsKey(new TableStat.Name("employees"))); // Assert.assertTrue(visitor.getTables().containsKey(new TableStat.Name("emp_name"))); // Assert.assertEquals(7, visitor.getColumns().size()); // Assert.assertEquals(3, visitor.getConditions().size()); // Assert.assertEquals(1, visitor.getRelationships().size()); // Assert.assertTrue(visitor.getColumns().contains(new TableStat.Column("employees", "salary"))); { String output = SQLUtils.toOracleString(stmt); assertEquals("IF l_salary <= 40000 THEN\n" + "\tgive_bonus(l_employee_id, 0);\n" + "ELSE\n" + "\tgive_bonus(l_employee_id, 500);\n" + "END IF;", // output); } { String output = SQLUtils.toOracleString(stmt, SQLUtils.DEFAULT_LCASE_FORMAT_OPTION); assertEquals("if l_salary <= 40000 then\n" + "\tgive_bonus(l_employee_id, 0);\n" + "else\n" + "\tgive_bonus(l_employee_id, 500);\n" + "end if;", // output); } } }
67195c493ed03a483a0894d1a0c34f258ae4831a
b84ecda4559551a58658945b78505d0da96f8bc5
/develop/source-code/framework/msg-framework/src/com/zte/mos/msg/framework/CommServiceFactory.java
34328b564a740dae2b696cc50f3806b51b166619
[]
no_license
qingw/mos
bb114f0d1fafea4d19ec839309900473075541cb
dff2428487293a7cb1ae5f98718f985a6f7362bc
refs/heads/master
2023-03-16T07:54:18.515765
2018-10-18T10:45:01
2018-10-18T10:45:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,423
java
package com.zte.mos.msg.framework; import com.zte.mos.msg.framework.session.ISessionConfigBuilder; import com.zte.mos.msg.framework.session.ISessionService; import com.zte.mos.util.Scan; import java.lang.reflect.Constructor; import java.util.Set; public class CommServiceFactory { private static ISouthService service = new SouthService(); public static ISouthService getService() { return service; } public static void setService(ISouthService userService) { service = userService; } public static void stop(){ } public static void initService() { Class[] filters = new Class[3]; filters[0] = MsgProcess.class; filters[1] = ISessionService.class; filters[2] = ISessionConfigBuilder.class; Set<Class> set = Scan.getClasses("com.zte.mos.msg.impl", filters); if (!set.isEmpty()) { for (Class clazz : set) { if (MsgProcess.class.isAssignableFrom(clazz)){ Class<? extends MsgProcess> implClazz = clazz.asSubclass(MsgProcess.class); try { MsgProcessPool.register(implClazz); } catch (Exception e) { e.printStackTrace(); } }else if(ISessionService.class.isAssignableFrom(clazz) || ISessionConfigBuilder.class.isAssignableFrom(clazz)){ try { Constructor<?> constructor = clazz.getDeclaredConstructor(); constructor.setAccessible(true); constructor.newInstance(); } catch (Exception e) { e.printStackTrace(); } } } } // Set<Class<LocalOnly>> increamentalSet = // Scan.getClasses("com.zte.mos.domain.model.autogen.nr8120.v241.local", LocalOnly.class); // if (!increamentalSet.isEmpty()) { // for (Class<LocalOnly> clazz : increamentalSet) { // Class<? extends LocalOnly> implClazz = clazz.asSubclass(LocalOnly.class); // try { // LocalOnlyPool.register(implClazz); // } catch (Exception e) { // e.printStackTrace(); // } // } // } } }
56508249c564041e64655dcdfeb3349dbf71118c
abb505b77b09acf19c1a19000c6332e41eba14bd
/Conticious.HlokkPlugin/src/main/java/no/kodegenet/conticious/plugin/hlokk/HlokkAuthService.java
c30dcf4bee0b332a92ef2c27c57a5c6dda1326af
[ "Apache-2.0" ]
permissive
oddbjornkvalsund/Conticious
2fcac3462334acb55981d8449299cdb9d51160c5
33557d3197127984a8f9683f2f4a2365e65861c2
refs/heads/master
2021-01-26T06:59:46.308832
2020-02-27T07:42:05
2020-02-27T07:42:05
243,356,369
0
0
Apache-2.0
2020-02-26T20:14:28
2020-02-26T20:14:27
null
UTF-8
Java
false
false
2,053
java
package no.kodegenet.conticious.plugin.hlokk; import no.haagensoftware.contentice.util.RandomString; import no.kodegenet.conticious.plugin.hlokk.data.HlokkUser; import java.util.*; /** * Created by joachimhaagenskeie on 16/08/2017. */ public class HlokkAuthService { private static HlokkAuthService instance = null; private static Map<String, HlokkUser> tokenMap; private static long lastCheckTimestamp = 0; private HlokkAuthService() { tokenMap = new HashMap<>(); } public static HlokkAuthService getInstance() { if (instance == null) { instance = new HlokkAuthService(); } return instance; } public String generateTokenForUser(String username) { String newToken = new RandomString(6).nextString(); tokenMap.put(newToken, new HlokkUser(newToken, username)); purgeOldTokens(); return newToken; } public HlokkUser authenticateToken(String token, String username) { HlokkUser hlokkUser = tokenMap.get(token); /** * Only return user if token and username matches. */ if (hlokkUser != null && hlokkUser.getUsername() != null && hlokkUser.getUsername().equals(username)) { tokenMap.remove(token); return hlokkUser; } else { return null; } } /** * Only check once every 5 minutes. If a token is older than 7 days, delete it */ private void purgeOldTokens() { long now = new Date().getTime(); List<String> tokensToDelete = new ArrayList<>(); if (now - lastCheckTimestamp > 300000l) { //5 minutes for (String token : tokenMap.keySet()) { if (now - tokenMap.get(token).getGeneratedTimestamp() > 604800000l) { // 7 days tokensToDelete.add(token); } } for (String token : tokensToDelete) { tokenMap.remove(token); } lastCheckTimestamp = now; } } }
b9cb9725b139bfceee1a9a6fd805eff8fcf9cbcd
908975042ea662f775192d22927d5485368668dc
/app/src/main/java/kamrulhasan3288/weatherapp/component/WeatherApiComponent.java
5b6a2d6372b120accfe27b70039a631d1e88303c
[]
no_license
kamrul3288/WeatherApp
ef89191920eef546811029db4a132b1aa5468035
96536174202d5f641d46897bd22ab37222306188
refs/heads/master
2020-03-18T21:53:04.372030
2018-05-29T14:59:12
2018-05-29T14:59:12
135,310,552
1
0
null
null
null
null
UTF-8
Java
false
false
399
java
package kamrulhasan3288.weatherapp.component; import dagger.Component; import kamrulhasan3288.weatherapp.interfaces.WeatherApi; import kamrulhasan3288.weatherapp.module.WeatherApiModule; import kamrulhasan3288.weatherapp.scope.WeatherApplicationScope; @Component(modules = WeatherApiModule.class) @WeatherApplicationScope public interface WeatherApiComponent { WeatherApi getWeatherApi(); }
f416145d344577aae47ecfbd9d301b4a096c4eae
4a886eb79b50f6b6e93c360e7ee085569bcaedd9
/ProtocolBuffer/src/ProtoWrite.java
1dcea283f77fd4dda3927560e45727b8c7525d5a
[]
no_license
dandujaipalreddy/DataSerialization
cc28e7d24307112ddc48955763b9d4879aa4082f
47154be223309fa77ed0468a00e22532f7d078f5
refs/heads/master
2021-01-10T12:42:53.699725
2015-11-09T16:25:06
2015-11-09T16:25:06
45,820,729
0
0
null
null
null
null
UTF-8
Java
false
false
2,746
java
import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintStream; import com.example.tutorial.AddressBookProtos.AddressBook; import com.example.tutorial.AddressBookProtos.Person; class ProtoWrite { // This function fills in a Person message based on user input. static Person PromptForAddress(BufferedReader stdin, PrintStream stdout) throws IOException { Person.Builder person = Person.newBuilder(); stdout.print("Enter person ID: "); person.setId(Integer.valueOf(stdin.readLine())); stdout.print("Enter name: "); person.setName(stdin.readLine()); stdout.print("Enter email address (blank for none): "); String email = stdin.readLine(); if (email.length() > 0) { person.setEmail(email); } while (true) { stdout.print("Enter a phone number (or leave blank to finish): "); String number = stdin.readLine(); if (number.length() == 0) { break; } Person.PhoneNumber.Builder phoneNumber = Person.PhoneNumber.newBuilder().setNumber(number); stdout.print("Is this a mobile, home, or work phone? "); String type = stdin.readLine(); if (type.equals("mobile")) { phoneNumber.setType(Person.PhoneType.MOBILE); } else if (type.equals("home")) { phoneNumber.setType(Person.PhoneType.HOME); } else if (type.equals("work")) { phoneNumber.setType(Person.PhoneType.WORK); } else { stdout.println("Unknown phone type. Using default."); } person.addPhone(phoneNumber); } return person.build(); } // Main function: Reads the entire address book from a file, // adds one person based on user input, then writes it back out to the same // file. public static void main(String[] args) throws Exception { if (args.length != 1) { System.err.println("Usage: AddPerson ADDRESS_BOOK_FILE"); System.exit(-1); } AddressBook.Builder addressBook = AddressBook.newBuilder(); // Read the existing address book. try { addressBook.mergeFrom(new FileInputStream(args[0])); } catch (FileNotFoundException e) { System.out.println(args[0] + ": File not found. Creating a new file."); } // Add an address. addressBook.addPerson( PromptForAddress(new BufferedReader(new InputStreamReader(System.in)), System.out)); // Write the new address book back to disk. FileOutputStream output = new FileOutputStream(args[0]); addressBook.build().writeTo(output); output.close(); } }
0b087e6b48c76b4f564ec3d9ba1b6693d3e94e1f
61b010b34e3a5e01b75b6496e14f288391c33ab3
/hondayesway-hu-service/src/main/java/cn/yesway/common/soap/userextrainfoservice/UserExtraInfoService_Service.java
ebcdfca1346766271f72857ce3a9d5e091f779c7
[]
no_license
respectOrg/hondayesway
2d7cab76e96a95653c44dcdc4ac7ac8ed4b7162c
b68635ed40fc6136ed650538d3421775eff4a0ab
refs/heads/master
2021-07-14T21:16:14.043261
2017-10-20T03:32:01
2017-10-20T03:32:01
107,385,500
1
2
null
null
null
null
UTF-8
Java
false
false
734
java
/** * UserExtraInfoService_Service.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package cn.yesway.common.soap.userextrainfoservice; public interface UserExtraInfoService_Service extends javax.xml.rpc.Service { public java.lang.String getBasicHttpBinding_UserExtraInfoServiceAddress(); public cn.yesway.common.soap.userextrainfoservice.UserExtraInfoService_PortType getBasicHttpBinding_UserExtraInfoService() throws javax.xml.rpc.ServiceException; public cn.yesway.common.soap.userextrainfoservice.UserExtraInfoService_PortType getBasicHttpBinding_UserExtraInfoService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; }
3164ccd1c0982382859d12a5ab235346b2a5ea7f
e8685ddbe3d5a281ee0f8e9853415a7fa23d764f
/src/main/java/mcgill/fiveCardStud/GameTest.java
f5ecde82e194918662f71ea84060fe033f077b7d
[]
no_license
angelini/ECSE_321-Game
2b6a75c151b4d2c86389db7ef6e61fff7e6913d3
a28d0be0031bcc37713bf8f145ec2fd94a76f7ab
refs/heads/master
2021-01-22T22:45:51.119891
2012-04-15T18:24:46
2012-04-15T18:24:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,084
java
/* package mcgill.fiveCardStud; import java.util.ArrayList; import java.util.Scanner; import mcgill.poker.OutOfMoneyException; import mcgill.poker.Player; import mcgill.poker.Hand; import mcgill.poker.Card; import mcgill.poker.TooFewCardsException; import mcgill.poker.TooManyCardsException; public class GameTest { private static final int LOW_BET = 20; private static final int STARTING_CASH = 400; private static final int NUMBER_OF_PLAYERS = 5; private static final int MAX_RAISES = 3; private static final int BRING_IN = 10; public static void main(String[] args) throws TooFewCardsException, TooManyCardsException, OutOfMoneyException { ArrayList<Player> players = new ArrayList<Player>(); for(int i = 0; i < NUMBER_OF_PLAYERS; i++) { players.add(new Player(STARTING_CASH)); } FiveCardStud game = new FiveCardStud(players, LOW_BET, MAX_RAISES, BRING_IN); game.playRound(); } //0 is check, -1 is fold, any positive integer is a raise or call. public static int getAction(int indexPlayer, int callAmount) { System.out.println("The amount to call is "+callAmount); System.out.println("Player "+indexPlayer+" please enter your desired action.\n"+ "0 is check, -1 is fold, any positive integer is a raise or call:"); Scanner scan = new Scanner(System.in); int action = scan.nextInt(); System.out.println("You entered "+action); return action; } public static void printHand(Player player) { Hand hand = player.getHand(); System.out.print(" #"); for (Card card : hand) { System.out.print("|"+card.getValue()+"."+card.getSuit()+"|"); } System.out.print("# \n"); } public static void printAmountInPots(Player player) { System.out.println("Amount In Pots = "+player.getAmountInPots()); } public static void printPlayerStatus(Player player) { if (player.isAllIn()) { System.out.println("Your status: All In"); } else if (player.isFolded()) { System.out.println("Your status: Folded"); } else if (player.isBetting()) { System.out.println("Your status: Betting"); } } } */
f4eeaee1ca3e292f65bfec2f9bc17b283dfcb1ec
15cab14e7bf380b825acd18c2fed4a7c59f00170
/ReverseString.java
393871176e1bed9efc0e494fcc4ad84bb809728b
[]
no_license
fenil9/utils
3cfcefe6208be4699d992bb680123fda71cd4286
01be318d6ab00e6affd28d698af562f88ff34df9
refs/heads/master
2020-05-16T05:51:50.768197
2019-04-22T16:52:54
2019-04-22T16:52:54
182,829,094
0
0
null
null
null
null
UTF-8
Java
false
false
669
java
import java.lang.*; import java.io.*; import java.util.*; class ReverseString { public static void main(String[] args) { String input = "fedcba"; // getBytes() method to convert string // into bytes[]. byte [] strAsByteArray = input.getBytes(); byte [] result = new byte [strAsByteArray.length]; // Store result in reverse order into the // result byte[] for (int i = 0; i<strAsByteArray.length; i++) result[i] = strAsByteArray[strAsByteArray.length-i-1]; System.out.println(new String(result)); } }
8d8782d98aca5fc34e181ad63bd56dcdd94740c5
d8e924ef91475ee893b7d550b78dc97fdd321a49
/apidiff-lib/src/main/java/net/ninjacat/brking/api/ApiObjectPool.java
1d0040954a9a08cfc9e6281955228078c8f01094
[ "MIT" ]
permissive
uaraven/brkng-change
d0fb9853d00ae661d701685168caa59d27e3626e
0e48ffa93721c123c03a1394feabc76c6439c3b7
refs/heads/master
2023-06-23T22:54:58.701028
2023-06-16T13:34:07
2023-06-16T13:34:07
246,708,592
0
0
MIT
2023-06-16T13:34:09
2020-03-12T00:31:14
Java
UTF-8
Java
false
false
821
java
package net.ninjacat.brking.api; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.function.Function; import java.util.stream.Collectors; public class ApiObjectPool<T> { private final Map<String, T> objects; protected ApiObjectPool(final List<T> objects, final Function<T, String> nameExtractor) { this.objects = objects.stream().collect(Collectors.toUnmodifiableMap(nameExtractor, Function.identity())); } public Map<String, T> all() { return objects; } public boolean has(final String name) { return objects.containsKey(name); } public Optional<T> find(final String name) { return Optional.ofNullable(objects.get(name)); } public T get(final String name) { return objects.get(name); } }
6e53010da1f7ddbe6bb170a2e36f86e31ac49ebb
be8005660700eb1785c91f9c5ac263c8d13ebfd4
/javasrc/edu/brown/cs/fait/testgen/TestgenReferenceValue.java
88eeddf4d1503c957182ccf16b998968f7986a1c
[]
no_license
StevenReiss/fait
e1403ae4a2509d92f83e64ebea5e240c58719f51
af54cd525ac86ccc07850832eacb99dc3845dfde
refs/heads/master
2023-08-17T08:00:02.711001
2023-08-16T15:30:41
2023-08-16T15:30:41
183,441,883
0
0
null
null
null
null
UTF-8
Java
false
false
6,824
java
/********************************************************************************/ /* */ /* TestgenReferenceValue.java */ /* */ /* Value that is a reference to a stack/local/field/array */ /* */ /********************************************************************************/ /* Copyright 2013 Brown University -- Steven P. Reiss */ /********************************************************************************* * Copyright 2013, Brown University, Providence, RI. * * * * All Rights Reserved * * * * Permission to use, copy, modify, and distribute this software and its * * documentation for any purpose other than its incorporation into a * * commercial product is hereby granted without fee, provided that the * * above copyright notice appear in all copies and that both that * * copyright notice and this permission notice appear in supporting * * documentation, and that the name of Brown University not be used in * * advertising or publicity pertaining to distribution of the software * * without specific, written prior permission. * * * * BROWN UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS * * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * * FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT SHALL BROWN UNIVERSITY * * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY * * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * * OF THIS SOFTWARE. * * * ********************************************************************************/ package edu.brown.cs.fait.testgen; import java.util.List; import edu.brown.cs.fait.iface.IfaceControl; import edu.brown.cs.fait.iface.IfaceField; import edu.brown.cs.fait.iface.IfaceState; import edu.brown.cs.fait.iface.IfaceType; class TestgenReferenceValue extends TestgenValue implements TestgenConstants { /********************************************************************************/ /* */ /* Private Storage */ /* */ /********************************************************************************/ private int slot_value; private int stack_value; private TestgenValue base_value; private IfaceField field_ref; private TestgenValue index_ref; /********************************************************************************/ /* */ /* Constructors */ /* */ /********************************************************************************/ TestgenReferenceValue(IfaceType t,int slot,boolean var) { this(t); if (var) slot_value = slot; else stack_value = slot; } TestgenReferenceValue(TestgenValue base,IfaceField fld) { this(fld.getType()); base_value = base; field_ref = fld; } TestgenReferenceValue(TestgenValue base,TestgenValue idx) { this(base.getDataType().getBaseType()); base_value = base; index_ref = idx; } private TestgenReferenceValue(IfaceType t) { super(t); slot_value = -1; stack_value = -1; base_value = null; field_ref = null; index_ref = null; } /********************************************************************************/ /* */ /* Access methods */ /* */ /********************************************************************************/ int getRefStack() { return stack_value; } IfaceField getRefField() { return field_ref; } int getRefSlot() { return slot_value; } /********************************************************************************/ /* */ /* Abstract Method Implementations */ /* */ /********************************************************************************/ @Override protected void updateInternal(IfaceControl fc,IfaceState prior,IfaceState cur,List<TestgenValue> rslt) { rslt.add(this); } /********************************************************************************/ /* */ /* Output methods */ /* */ /********************************************************************************/ @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("<^^^"); if (stack_value >= 0) { buf.append("S"); buf.append(stack_value); } else if (slot_value >= 0) { buf.append("V"); buf.append(slot_value); } else { if (base_value != null) { buf.append(base_value.toString()); } if (field_ref != null) { buf.append(" . "); buf.append(field_ref.getFullName()); } else if (index_ref != null) { buf.append(" [] "); buf.append(index_ref.toString()); } } buf.append(">"); return buf.toString(); } } // end of class TestgenReferenceValue /* end of TestgenReferenceValue.java */
2cf6f463d01ce2b84d7268d9120593186bcfcf2f
e184db02f3b9051f78184cebbc0a0f66cf5cc48f
/src/main/java/com/coller/clibrary/service/UserService.java
487aff9d3f83ec45558226697d112ea57a2088e2
[]
no_license
npmcdn-to-unpkg-bot/clibrary
e6e5e0406d719a88fc3aa4b55e6b677f958f5e1a
ac1de95e844b00730a7c958cd32657e728d43c8d
refs/heads/master
2021-01-24T23:50:36.780291
2016-08-23T17:49:52
2016-08-23T17:50:08
67,340,698
0
0
null
2016-09-04T11:20:43
2016-09-04T11:20:43
null
UTF-8
Java
false
false
397
java
package com.coller.clibrary.service; import com.coller.clibrary.entity.Authority; import com.coller.clibrary.entity.User; import com.coller.clibrary.exception.UserExistsException; import org.springframework.security.core.userdetails.UserDetails; import java.util.List; public interface UserService { UserDetails addUser(User user, List<Authority> authorities) throws UserExistsException; }
76fc422e44179fee7e8e5de0e6ea4761fd3591fa
58f9ed107e610a612af459d8231fbe97dd0c814f
/src/main/java/com/ht/extra/pojo/outpbill/ChargeReduceMaster.java
afc85cc8e3ace4cac1c48c96ecc8bcc417f25edb
[]
no_license
tangguoqiang/htwebExtra
3bee6434a87e9333d80eeb391f80dfb72178675d
ca9d50a66586905d5164f6087b7778f233a1fd13
refs/heads/master
2020-03-15T13:13:57.645083
2018-08-22T12:54:44
2018-08-22T12:54:44
132,161,700
0
0
null
null
null
null
UTF-8
Java
false
false
3,519
java
package com.ht.extra.pojo.outpbill; import java.math.BigDecimal; import java.util.Date; public class ChargeReduceMaster { private Integer serialNo; private String rcptNo; private String patientId; private Short visitId; private String name; private String chargeType; private String unit; private String cardNo; private BigDecimal reduceAmount; private String reduceCause; private String ratifier; private String undertaker; private String undertakerUnit; private String operNo; private String operName; private Date operDateTime; public Integer getSerialNo() { return serialNo; } public void setSerialNo(Integer serialNo) { this.serialNo = serialNo; } public String getRcptNo() { return rcptNo; } public void setRcptNo(String rcptNo) { this.rcptNo = rcptNo == null ? null : rcptNo.trim(); } public String getPatientId() { return patientId; } public void setPatientId(String patientId) { this.patientId = patientId == null ? null : patientId.trim(); } public Short getVisitId() { return visitId; } public void setVisitId(Short visitId) { this.visitId = visitId; } public String getName() { return name; } public void setName(String name) { this.name = name == null ? null : name.trim(); } public String getChargeType() { return chargeType; } public void setChargeType(String chargeType) { this.chargeType = chargeType == null ? null : chargeType.trim(); } public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit == null ? null : unit.trim(); } public String getCardNo() { return cardNo; } public void setCardNo(String cardNo) { this.cardNo = cardNo == null ? null : cardNo.trim(); } public BigDecimal getReduceAmount() { return reduceAmount; } public void setReduceAmount(BigDecimal reduceAmount) { this.reduceAmount = reduceAmount; } public String getReduceCause() { return reduceCause; } public void setReduceCause(String reduceCause) { this.reduceCause = reduceCause == null ? null : reduceCause.trim(); } public String getRatifier() { return ratifier; } public void setRatifier(String ratifier) { this.ratifier = ratifier == null ? null : ratifier.trim(); } public String getUndertaker() { return undertaker; } public void setUndertaker(String undertaker) { this.undertaker = undertaker == null ? null : undertaker.trim(); } public String getUndertakerUnit() { return undertakerUnit; } public void setUndertakerUnit(String undertakerUnit) { this.undertakerUnit = undertakerUnit == null ? null : undertakerUnit.trim(); } public String getOperNo() { return operNo; } public void setOperNo(String operNo) { this.operNo = operNo == null ? null : operNo.trim(); } public String getOperName() { return operName; } public void setOperName(String operName) { this.operName = operName == null ? null : operName.trim(); } public Date getOperDateTime() { return operDateTime; } public void setOperDateTime(Date operDateTime) { this.operDateTime = operDateTime; } }
3479acc5eb511fee5e7dedf38f42fe9e6f2eb93f
a6a1516fd45ef009fbf50581293ce001c19dab67
/src/com/sujan/lms/entity/author/Author.java
e039efe4ccf77fe2a7c3d2ddf24da93aa40cc22b
[ "Apache-2.0" ]
permissive
suzan-1515/Library-Management-System
c2eeea0ea24d99e14cfcf84696fd3026aba69560
c9ef0089d080fcdc7ea03724e295bcabdeeff751
refs/heads/master
2021-08-29T10:46:03.630383
2017-12-13T19:05:02
2017-12-13T19:05:02
106,183,660
1
1
null
null
null
null
UTF-8
Java
false
false
1,387
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 com.sujan.lms.entity.author; import java.io.Serializable; /** * * @author Suzn */ public class Author implements Serializable { private int id; private String title; private String contact; public Author() { } public Author(int id) { this.id = id; } public Author(int id, String title, String contact) { this.id = id; this.title = title; this.contact = contact; } /** * @return the title */ public String getTitle() { return title; } /** * @param title the title to set */ public void setTitle(String title) { this.title = title; } /** * @return the contact */ public String getContact() { return contact; } /** * @param contact the contact to set */ public void setContact(String contact) { this.contact = contact; } /** * @return the id */ public int getId() { return id; } /** * @param id the id to set */ public void setId(int id) { this.id = id; } }
[ "Suzn@DESKTOP-0ISHRHQ" ]
Suzn@DESKTOP-0ISHRHQ
d4807df369c466f01e9e0cdd961ef147b90c1edd
dc0790c71fb8a2eac4d541b236081c233f27d633
/src/main/java/com/example/kkcbackend/service/DataService.java
8e51298ecb489d00614c163caa761bc1af02d2b7
[]
no_license
D3V41/kkc-backend
df417420d5734ffdbee07c8b7b009c8ba98f6bf5
2f3fd45f27be678ea51f4c659bbede9b6dacb56a
refs/heads/master
2023-06-21T00:03:23.297683
2021-07-15T15:34:39
2021-07-15T15:34:39
379,503,900
0
0
null
null
null
null
UTF-8
Java
false
false
2,619
java
package com.example.kkcbackend.service; import com.example.kkcbackend.dao.DataDao; import com.example.kkcbackend.model.Data; import com.example.kkcbackend.payload.responce.StatusResponce; import com.example.kkcbackend.payload.responce.UnitListResponce; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.Date; import java.util.List; @Service public class DataService { @Autowired DataDao dataDao; public Boolean insertData(Data d){ dataDao.save(d); return true; } public List<Data> getDatalistByUlbname(String ulbname){ return dataDao.findByUlbname(ulbname); } public Boolean getDataById(Long id){ List<Data> data = dataDao.findByDataId(id); return !data.isEmpty(); } public List<StatusResponce> getStatusData(int phase,String ulbname){ List<Object[]> list = dataDao.getStatusData(phase,ulbname); return extractStatus(list); } public List<StatusResponce> getStatusDataAllPhase(String ulbname){ List<Object[]> list = dataDao.getStatusDataAllPhase(ulbname); return extractStatus(list); } public float getTotalcurrent(float r,float y, float b){ return (r+y+b)/3; } public List<StatusResponce> extractStatus(List<Object[]> list){ List<StatusResponce> list2 = new ArrayList<>(); int i=1; for (Object[] obj : list){ StatusResponce statusResponce = new StatusResponce(); statusResponce.setSrNo(i++); statusResponce.setTimestamp((Date) obj[0]); statusResponce.setZone((String) obj[1]); statusResponce.setWard((int) obj[2]); statusResponce.setRoadName((String) obj[3]); statusResponce.setUnitId((int) obj[4]); float iTotal = getTotalcurrent((float)obj[8],(float)obj[9],(float)obj[10]); if(iTotal==0){ statusResponce.setStatus(false); } else { statusResponce.setStatus(true); } statusResponce.setOnTime((String) obj[5]); statusResponce.setOffTime((String) obj[6]); statusResponce.setKwh((float) obj[7]); statusResponce.setiTotal(iTotal); statusResponce.setKwTotal(0.0F); statusResponce.setEventType((String) obj[11]); statusResponce.setTotalloadwattage(0.0F); statusResponce.setImei((Long) obj[12]); list2.add(statusResponce); } return list2; } }
88c494abcbbfc1d5dd598116725f149eea65ee53
27a1accb04033c111ed32ca9539798687a01e1a0
/Stacks-On/src/com/stacks_on/accounts/GenericAccountService.java
629bd8908d1a11aec7fc886fe6808c5993917d5f
[]
no_license
kaputnikGo/Stacks-On
fff3d28d7254b9c8bc2e0fcad3ee476591b7c908
0907b87aafd79d9124d6875d0c8d723e8bc58caa
refs/heads/master
2021-01-10T08:46:42.206395
2015-11-15T22:21:46
2015-11-15T22:21:46
44,781,907
0
0
null
null
null
null
UTF-8
Java
false
false
2,640
java
package com.stacks_on.accounts; import android.accounts.AbstractAccountAuthenticator; import android.accounts.Account; import android.accounts.AccountAuthenticatorResponse; import android.accounts.NetworkErrorException; import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.util.Log; public class GenericAccountService extends Service { private static final String TAG = "GenericAccountService"; public static final String ACCOUNT_NAME = "Account"; private Authenticator mAuthenticator; public static Account GetAccount(String accountType) { final String accountName = ACCOUNT_NAME; return new Account(accountName, accountType); } @Override public void onCreate() { Log.i(TAG, "Service created."); mAuthenticator = new Authenticator(this); } @Override public void onDestroy() { Log.i(TAG, "Service destroyed."); } @Override public IBinder onBind(Intent intent) { return mAuthenticator.getIBinder(); } public class Authenticator extends AbstractAccountAuthenticator { public Authenticator(Context context) { super(context); } @Override public Bundle editProperties(AccountAuthenticatorResponse accountAuthenticatorResponse, String s) { throw new UnsupportedOperationException(); } @Override public Bundle addAccount(AccountAuthenticatorResponse accountAuthenticatorResponse, String s, String s2, String[] strings, Bundle bundle) throws NetworkErrorException { return null; } @Override public Bundle confirmCredentials(AccountAuthenticatorResponse accountAuthenticatorResponse, Account account, Bundle bundle) throws NetworkErrorException { return null; } @Override public Bundle getAuthToken(AccountAuthenticatorResponse accountAuthenticatorResponse, Account account, String s, Bundle bundle) throws NetworkErrorException { throw new UnsupportedOperationException(); } @Override public String getAuthTokenLabel(String s) { throw new UnsupportedOperationException(); } @Override public Bundle updateCredentials(AccountAuthenticatorResponse accountAuthenticatorResponse, Account account, String s, Bundle bundle) throws NetworkErrorException { throw new UnsupportedOperationException(); } @Override public Bundle hasFeatures(AccountAuthenticatorResponse accountAuthenticatorResponse, Account account, String[] strings) throws NetworkErrorException { throw new UnsupportedOperationException(); } } }
514c5a9c4c74e3d26999d82084c0e560803cc70e
b31b2ab93994b59330005d24d2d788e80c4db9dc
/PaintDemo/src/com/example/paintdemo/mywidget/TuYaView.java
5d194d8ce55ae90b5080d0aca87cb10337de55f7
[]
no_license
crazysniper/MyDemoTest
31d04f209a1b546fa32f6dfedb678701377512a1
a75876319949ab8977d56e5059ee3206e7e61457
refs/heads/master
2021-01-21T12:43:43.075653
2015-08-06T15:20:48
2015-08-06T15:20:48
33,294,572
0
0
null
null
null
null
UTF-8
Java
false
false
3,624
java
package com.example.paintdemo.mywidget; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Paint.Style; import android.os.Handler; import android.os.Message; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view.View; import com.example.paintdemo.R; import com.example.paintdemo.TuYa; public class TuYaView extends View { private Paint paint = null; private Bitmap originalBitmap = null; private Bitmap new1Bitmap = null; private Bitmap new2Bitmap = null; private float clickX = 0, clickY = 0; private float startX = 0, startY = 0; private boolean isMove = true; private boolean isClear = false; private int color = Color.GREEN; private float strokeWidth = 2.0f; public Handler handler1; private Context context; public TuYaView(Context context, AttributeSet attrs) { super(context, attrs); this.context = context; originalBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.bg).copy(Bitmap.Config.ARGB_8888, true); new1Bitmap = Bitmap.createBitmap(originalBitmap); setDrawingCacheEnabled(true); Log.i("RG", "new1Bitmap--->>>" + new1Bitmap); } public void clear() { isClear = true; new2Bitmap = Bitmap.createBitmap(originalBitmap); invalidate(); } Bitmap saveImage = null; public Bitmap saveImage() { if (saveImage == null) { return null; } return saveImage; } public void setImge() { saveImage = null; } public void setstyle(float strokeWidth) { this.strokeWidth = strokeWidth; } @SuppressLint("DrawAllocation") @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.drawBitmap(HandWriting(new1Bitmap), 0, 0, null); handler1 = new Handler() { @Override public void handleMessage(Message msg) { Log.i("RG", "--------------------"); int what = msg.what; if (what == 2) { saveImage = Bitmap.createBitmap(HandWriting(new1Bitmap)); Message msg1 = new Message(); msg1 = Message.obtain(TuYa.hh, 3); TuYa.hh.sendMessage(msg1); } super.handleMessage(msg); } }; } @SuppressLint("HandlerLeak") Handler handler; public Bitmap HandWriting(Bitmap originalBitmap) { handler = new Handler() { @Override public void handleMessage(Message msg) { int what = msg.what; if (what == 1) { startX = clickX; startY = clickY; } super.handleMessage(msg); } }; Canvas canvas = null; if (isClear) { canvas = new Canvas(new2Bitmap); Log.i("RG", "canvas "); } else { canvas = new Canvas(originalBitmap); } paint = new Paint(); paint.setStyle(Style.STROKE); paint.setAntiAlias(true); paint.setColor(color); paint.setStrokeWidth(strokeWidth); Log.i("RG", "startX-->>>>" + startX); Log.i("RG", "startY-->>>>" + startY); if (isMove) { canvas.drawLine(startX, startY, clickX, clickY, paint); } if (isClear) { return new2Bitmap; } return originalBitmap; } @Override public boolean onTouchEvent(MotionEvent event) { Message msg = new Message(); msg = Message.obtain(handler, 1); handler.sendMessage(msg); clickX = event.getX(); clickY = event.getY(); if (event.getAction() == MotionEvent.ACTION_DOWN) { isMove = false; invalidate(); return true; } else if (event.getAction() == MotionEvent.ACTION_MOVE) { isMove = true; invalidate(); return true; } return super.onTouchEvent(event); } }
dd01de254e44faa4a724168b4f37ff388634e8a1
92ba03db38f54a5c30fad23fe620f9ef5c1a8654
/src/main/java/org/apache/xmlrpc/server/XmlRpcServerConfig.java
85806e3f6938a68bf18f6f2fb773baf63cfa7734
[ "Apache-2.0" ]
permissive
mrccao/xmlrpc-server
082587f09c16aa56a34f34bf47ad257eb0ac9a6c
2a7588b02e120e580f2c9b0cb3b89214870599f2
refs/heads/master
2020-09-27T22:31:07.459894
2019-12-08T04:40:40
2019-12-08T04:40:40
226,614,391
0
0
null
null
null
null
UTF-8
Java
false
false
1,009
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xmlrpc.server; import org.apache.xmlrpc.XmlRpcConfig; /** Server specific extension of {@link XmlRpcConfig}. */ public interface XmlRpcServerConfig extends XmlRpcConfig { }
ec34e7e48e9e89d43af47becf64d419adeccc0f7
720340dad26787a400b222740dc813b2e7de40c0
/tags/yc-2.0.0/domain-api/src/main/java/org/yes/cart/domain/entity/CustomerWishList.java
a6286a59e0ed4d61bd33d890eaab9ce4d4f383db
[]
no_license
svn2github/yes-cart
2062601f03c433cbfb8cb9aee8bbb82de9d1e0d5
0687d3b91d687de46369058d37ef54998deae171
refs/heads/master
2021-01-21T11:46:10.756615
2015-01-09T23:25:13
2015-01-09T23:25:13
27,273,015
0
0
null
null
null
null
UTF-8
Java
false
false
2,242
java
/* * Copyright 2009 Igor Azarnyi, Denys Pavlov * * 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.yes.cart.domain.entity; /** * TODO: V2 nice to have scheduler, that perform old wish list items clean up * <p/> * Shopper wish list item. Also reponsible to notification sheduling. * <p/> * User: Igor Azarny [email protected] * Date: 07-May-2011 * Time: 11:12:54 */ public interface CustomerWishList extends Auditable { String SIMPLE_WISH_ITEM = "W"; String REMIND_WHEN_WILL_BE_AVAILABLE = "A"; String REMIND_WHEN_PRICE_CHANGED = "P"; String REMIND_WHEN_WILL_BE_IN_PROMO = "R"; /** * Primary key value. * * @return key value. */ long getCustomerwishlistId(); /** * Set key value * * @param customerwishlistId value to set. */ void setCustomerwishlistId(long customerwishlistId); /** * Product sku * * @return {@link ProductSku} */ ProductSku getSkus(); /** * Set {@link ProductSku} * * @param skus Product Sku */ void setSkus(ProductSku skus); /** * Get customer * * @return {@link Customer} */ Customer getCustomer(); /** * Set customer * * @param customer customer to set */ void setCustomer(Customer customer); /** * Get type of wsih list item. * * @return type of wsih list item */ String getWlType(); /** * Set type of wsih list item * * @param wlType type of wsih list item to set. */ void setWlType(final String wlType); }
[ "[email protected]@b5e963ab-246d-477c-a38c-82af0a68ca80" ]
[email protected]@b5e963ab-246d-477c-a38c-82af0a68ca80
1804c5709465951c9b7c1454c29cac744b03f0c5
fefe984a326e87f67605f2e9cbb1490d82f101af
/app/templates/src/main/java/package/domain/_Authority.java
f37195d79664f184f5b895f24ed9d34c4ce32075
[ "MIT" ]
permissive
alanma/generator-jhipster
f0a12248600856f33f4e3879a47c716267c5295d
935d80541650a36817d0384f9bef3f8fb6a8a2c1
refs/heads/master
2021-01-15T11:02:20.434083
2013-10-30T16:08:04
2013-10-30T16:08:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,351
java
package <%=packageName%>.domain; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.io.Serializable; /** * An authority (a security role) used by Spring Security. */ @Entity @Table(name="T_AUTHORITY") @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public class Authority implements Serializable { @NotNull @Size(min = 0, max = 50) @Id private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Authority authority = (Authority) o; if (name != null ? !name.equals(authority.name) : authority.name != null) return false; return true; } @Override public int hashCode() { return name != null ? name.hashCode() : 0; } @Override public String toString() { return "Authority{" + "name='" + name + '\'' + "} " + super.toString(); } }
ad59700a8107b5ba92c5194fbdda6073b2f19705
1e518c5592b6aa7d9dc60fe50591abad77b8deeb
/HelloWorld/app/src/main/java/com/example/davidkezi/helloworld/MainActivity.java
d85b6fd3e0d78895aa8c7980cb692e2cea542715
[]
no_license
Mrkezii/Hello_World_andriod
50693eb121d251fc3b3e4f87005102add71d230f
9ecaef4f616a359afd98cbe8fb1de78dff40bf3d
refs/heads/master
2021-01-10T16:24:45.920363
2016-03-09T15:34:27
2016-03-09T15:34:27
52,697,761
0
0
null
null
null
null
UTF-8
Java
false
false
2,119
java
package com.example.davidkezi.helloworld; import android.content.Context; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.View; import android.view.Menu; import android.view.MenuItem; import android.widget.Toast; public class MainActivity extends AppCompatActivity { static String TAG = "MainActivity "; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); Log.i(TAG, "app is running"); FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } public void btnClick(View view){ Toast.makeText(getBaseContext(), "You have just clicked a button", Toast.LENGTH_LONG).show(); } }
89b0a7bfda4ef55d9a042ffd5fbe9c1c16e50cb5
763402baa75acab62b021275da8e8d5df6294f69
/src/main/java/com/uta/stcok/ServerGestionStockProduitsApplication.java
21dcb355a6109bf219f1ec0d51fc58e05ade4196
[]
no_license
diakitela/ServerGestionStockProduits
147505e18b0d53a747e593927f2a772252abadc1
d663a2fdca4edf05c6bd4e4e679c2979b2b1ece2
refs/heads/main
2023-03-31T05:21:43.069314
2021-04-08T08:16:02
2021-04-08T08:16:02
355,832,619
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package com.uta.stcok; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class ServerGestionStockProduitsApplication { public static void main(String[] args) { SpringApplication.run(ServerGestionStockProduitsApplication.class, args); } }
463e2326edbb2046162ca05979f2f2a1043a7ee8
39f2037f209a0f267019d4ea7cb7739c9334324f
/src/test/java/org/neo4j/ogm/domain/entityMapping/UserV13.java
81c25fcfa30ab3984874425716079e8b8d7ff47d
[]
no_license
odd/neo4j-ogm
9d097435271684444503a6967e89d6ed56417659
b26d1c3f6248c3763f8d3baa869eeb0ea6047463
refs/heads/master
2021-01-16T21:26:38.086441
2015-11-12T06:29:20
2015-11-12T06:29:20
46,112,325
1
0
null
2015-11-13T09:22:06
2015-11-13T09:22:06
null
UTF-8
Java
false
false
874
java
/* * Copyright (c) 2002-2015 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This product is licensed to you under the Apache License, Version 2.0 (the "License"). * You may not use this product except in compliance with the License. * * This product may include a number of subcomponents with * separate copyright notices and license terms. Your use of the source * code for these subcomponents is subject to the terms and * conditions of the subcomponent's license, as noted in the LICENSE file. * */ package org.neo4j.ogm.domain.entityMapping; /** * No method or field annotated. * @author Luanne Misquitta */ public class UserV13 extends Entity { private UserV13 knows; public UserV13() { } public UserV13 getKnows() { return knows; } public void setKnows(UserV13 knows) { this.knows = knows; } }
3a30ad5f32d70f58eef91c6a9a0f9f725fc40083
341b135bb224b0988a52f9d443e9ef356e00f2e5
/app/src/main/java/com/usinformatics/nytrip/models/ChatModel.java
889c65d3cb04ba16a5b3406438a7312987c0d8bb
[]
no_license
lg-studio/NTA-android
6805e6fc813bc3c51cb09523863ed5695b059f0c
8a89390bd95ce6e758b8eeed23934f31200687a9
refs/heads/master
2021-01-09T06:47:31.397114
2016-01-15T21:03:56
2016-01-15T21:03:56
49,743,246
0
0
null
null
null
null
UTF-8
Java
false
false
1,590
java
package com.usinformatics.nytrip.models; import java.util.Arrays; /** * Created by D1m11n on 14.07.2015. */ public class ChatModel/* implements Parcelable*/ { public QuestionModel [] questions; public long chatDuration; public long chatTimeEnded; public float mark; @Override public String toString() { return "ChatModel{" + "questions=" + Arrays.toString(questions) + ", chatDuration=" + chatDuration + ", chatTimeEnded=" + chatTimeEnded + ", mark=" + mark + '}'; } public ChatModel() { } // public ChatModel(Parcel in) { // Parcelable[] parcelableArray = // in.readParcelableArray(ItemQuestion.class.getClassLoader()); // if (parcelableArray != null) // questions = Arrays.copyOf(parcelableArray, parcelableArray.length, ItemQuestion[].class); // } /* @Override public int describeContents() { return 0; } private void readFromParcel(Parcel in) { questions = in.createTypedArray(ItemQuestion.CREATOR); } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeParcelableArray(questions, flags); } public static final Creator<ChatModel> CREATOR = new Creator<ChatModel>() { @Override public ChatModel createFromParcel(Parcel in) { return new ChatModel(in); } @Override public ChatModel[] newArray(int size) { return new ChatModel[size]; } }; */ }
bfad8cee3fa1a37ed68743f32c801fef9ff2c1b4
46315fd1be3db3433ebfc608caecdf634bc8e1ba
/InformationBook/app/src/main/java/com/ongel/informationbook/adapters/ViewPagerAdapterCountries.java
2699359965cd023ce782c1d8b2aa4b698b3f03e9
[]
no_license
xavierjr85/Android-Applications
67d45bc4c3ff796c0c85bf702c59d191a4f6127c
68976b6d7601c4e351365f9050548d3071ae4958
refs/heads/main
2023-01-23T15:36:10.421850
2020-11-23T10:47:35
2020-11-23T10:47:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,291
java
package com.ongel.informationbook.adapters; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.lifecycle.Lifecycle; import androidx.viewpager2.adapter.FragmentStateAdapter; import com.ongel.informationbook.fragments.FragmentFrance; import com.ongel.informationbook.fragments.FragmentItaly; import com.ongel.informationbook.fragments.FragmentUnitedKingdom; public class ViewPagerAdapterCountries extends FragmentStateAdapter { public ViewPagerAdapterCountries(@NonNull FragmentManager fragmentManager, @NonNull Lifecycle lifecycle) { super(fragmentManager, lifecycle); } @NonNull @Override public Fragment createFragment(int position) { Fragment fragment; switch (position) { case 0: fragment = FragmentUnitedKingdom.newInstance(); break; case 1: fragment = FragmentFrance.newInstance(); break; case 2: fragment = FragmentItaly.newInstance(); break; default: return null; } return fragment; } @Override public int getItemCount() { return 3; } }
35de50a7f2863b2587e060cf28d7131abe0ec8c1
45dd3fd97707638c0e1ee04c04d6f0ccfac92de6
/1.10.2/src/compat111/java/com/rwtema/extrautils2/compatibility/CraftingHelper112.java
f20fb35678e65f1fdb9d0c9e6a8258a3f77c3a94
[]
no_license
Zarkov2/Extra-Utilities-2-Source
3f754127e838c3dba88de8f4f6c1ac9e01a6b7b5
bcdbc91a79a0ea1690b512889a6f45be4319a33d
refs/heads/master
2020-03-22T15:46:48.376696
2018-07-09T11:54:16
2018-07-09T11:55:54
140,277,754
0
0
null
2018-07-09T11:46:45
2018-07-09T11:46:45
null
UTF-8
Java
false
false
4,839
java
package com.rwtema.extrautils2.compatibility; import com.rwtema.extrautils2.gui.backend.WidgetCraftingMatrix; import com.rwtema.extrautils2.itemhandler.XUCrafter; import com.rwtema.extrautils2.tile.TileCrafter; import com.rwtema.extrautils2.utils.datastructures.ConcatList; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.item.crafting.ShapelessRecipes; import net.minecraft.world.World; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.function.BiFunction; public class CraftingHelper112 { public static List<IRecipe> getRecipeList() { return CraftingManager.func_77594_a().func_77592_b(); } public static Object[] getShapedIngredientRecipes(Object... recipes){ return new Object[]{"S", 'S', Items.STICK}; } public static void processRecipe(XUShapedRecipe shapedRecipe, ItemStack result, Object... recipe) { int width = 0; int height = 0; String shape = ""; int idx = 0; if (recipe[idx] instanceof BiFunction) { shapedRecipe.finalOutputTransform = (BiFunction<ItemStack, InventoryCrafting, ItemStack>) recipe[idx]; if (recipe[idx + 1] instanceof Object[]) { recipe = (Object[]) recipe[idx + 1]; } else { idx++; } } if (recipe[idx] instanceof Boolean) { shapedRecipe.setMirrored((Boolean) recipe[idx]); if (recipe[idx + 1] instanceof Object[]) { recipe = (Object[]) recipe[idx + 1]; } else { idx++; } } if (recipe[idx] instanceof String[]) { String[] parts = ((String[]) recipe[idx++]); for (String s : parts) { width = s.length(); shape += s; } height = parts.length; } else { while (recipe[idx] instanceof String) { String s = (String) recipe[idx++]; shape += s; width = s.length(); height++; } } if (width * height != shape.length()) { String ret = "Invalid shaped ore recipe: "; for (Object tmp : recipe) { ret += tmp + ", "; } ret += shapedRecipe.getRecipeOutput(); throw new RuntimeException(ret); } HashMap<Character, Object> itemMap = new HashMap<>(); for (; idx < recipe.length; idx += 2) { Character chr = (Character) recipe[idx]; Object in = recipe[idx + 1]; itemMap.put(chr, getRecipeObject(in)); } Object[] input = new Object[width * height]; int x = 0; for (char chr : shape.toCharArray()) { input[x++] = itemMap.get(chr); } shapedRecipe.setWidth(width); shapedRecipe.setHeight(height); shapedRecipe.setInput(input); } public static Object getRecipeObject(Object in) { ConcatList<ItemStack> list = new ConcatList<>(); XUShapedRecipe.handleListInput(list, in); Object out; if (list.subLists.size() == 1) { if (list.size() == 1) { out = list.modifiableList.get(0); } else { out = list.modifiableList; } } else { if (list.subLists.size() == 2 && list.modifiableList.isEmpty()) { out = list.subLists.get(1); } else out = list; } return out; } public static ItemStack getMatchingResult(WidgetCraftingMatrix widgetCraftingMatrix, EntityPlayer player) { return CraftingManager.func_77594_a().findMatchingResult(widgetCraftingMatrix.crafter, player.world); } @Nonnull public static List<Object> getRecipeInputs(IRecipe curRecipe) { List<Object> input = new ArrayList<>(); if (curRecipe instanceof ShapedRecipes || curRecipe instanceof ShapedOreRecipe) { int w, h; Object[] inputs; if (curRecipe instanceof ShapedOreRecipe) { ShapedOreRecipe recipe = (ShapedOreRecipe) curRecipe; inputs = recipe.getInput(); w = TileCrafter.SOR_WIDTH.getUnchecked(recipe); h = TileCrafter.SOR_HEIGHT.getUnchecked(recipe); } else { ShapedRecipes recipe = (ShapedRecipes) curRecipe; inputs = recipe.recipeItems; w = recipe.recipeWidth; h = recipe.recipeHeight; } Object[] inputs3x3 = new Object[9]; for (int x = 0; x < w; x++) { for (int y = 0; y < h; y++) { if (x >= 0 && x < w && y >= 0 && y < h) { inputs3x3[x + y * 3] = inputs[x + y * w]; } } } Collections.addAll(input, inputs3x3); } else if (curRecipe instanceof ShapelessRecipes) { input.addAll(((ShapelessRecipes) curRecipe).recipeItems); } else if (curRecipe instanceof ShapelessOreRecipe) { input.addAll(((ShapelessOreRecipe) curRecipe).getInput()); } return input; } public static Object unwrapIngredients(Object o) { return o; } }
c2efe789bc952dd004cd4d418b4585f9c111c92e
1dafbb12aeb8967ca43f5223c0ed649629cd8df2
/BasicComponentsApp/app/src/main/java/com/example/basiccomponentsapp/demo.java
cccaeb80a0ee0fd1c375d4ebfd06377933430b41
[]
no_license
nehamarne2700/Android_Studio_Projects
9a4efeb56c5d55755968ee0e1d4ed5599b5eb983
59cdcb767537947cb512917d9cd8d57815f0c99d
refs/heads/master
2023-06-11T23:13:53.849319
2021-07-04T06:53:07
2021-07-04T06:53:07
382,783,623
1
0
null
null
null
null
UTF-8
Java
false
false
219
java
package com.example.basiccomponentsapp; public class demo { public static String name; public static String state; public static String city; public static String gen; public static String year; }
2b553132dba62641447f3ac498fca3d7320f7953
cf60bcdd191dd256d86cc99e96a0b940ee0a475f
/src/practice/inputstream/InputSystem.java
f62b422cd30fe7ef31c2ed931e5885acd647bd2a
[]
no_license
hhxx1994/c-compiler
89e305465065ab3f28d7d2d095871dc4dbd074e0
e0c064743cfe37531f363304f0ba7deb192686f2
refs/heads/master
2022-12-12T19:43:43.614177
2020-09-11T00:00:01
2020-09-11T00:00:01
292,978,858
0
0
null
2020-09-05T01:26:44
2020-09-05T01:26:43
null
UTF-8
Java
false
false
2,805
java
package practice.inputstream; import java.io.UnsupportedEncodingException; public class InputSystem { private Input input = new Input(); public void runStdinExampe() { input.ii_newFile(null); //控制台输入 input.ii_mark_start(); printWord(); input.ii_mark_end(); input.ii_mark_prev(); /* * 执行上面语句后,缓冲区及相关指针情况如下图 * sMark * | * pMark eMark * | | * Start_buf Next Danger End_buf * | | | | * V V V V * +---------------------------------------------------------+---------+ * | typedef| 未读取的区域 | | 浪费的区域| * +-------------------------------------------------------------------- * |<-------------------------BUFSIZE---------------------------------->| * */ input.ii_mark_start(); printWord(); input.ii_mark_end(); /* * 执行上面语句后,缓冲区及相关指针情况如下图 * sMark * | * pMark | eMark * | | | * Start_buf | Next Danger End_buf * | | | | | * V V V V V * +---------------------------------------------------------+---------+ * | typedef|int| 未读取区域 | | 浪费的区域| * +-------------------------------------------------------------------- * |<-------------------------BUFSIZE---------------------------------->| * */ System.out.println("prev word: " + input.ii_ptext());// 打印出 typedef System.out.println("current word: " + input.ii_text()); //打印出int } private void printWord() { byte c; while ((c = input.ii_advance()) != ' ') { byte[] buf = new byte[1]; buf[0] = c; try { String s = new String(buf, "UTF8"); System.out.print(s); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } } System.out.println(""); } public static void main(String[] args) { InputSystem input = new InputSystem(); input.runStdinExampe(); } }
499c9602247a8c7951b7bd55f47552a479aeb4a7
8fff35de65d4d4ecf67bebcc27b92b1fff320dc6
/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Demo.java
b634667df7f1d6e57550235a90f4050b17be22b5
[ "BSD-3-Clause" ]
permissive
7959/2016-Season
c9c962c2e51ae15e50cb91d7f7b53e0d49a7991d
cdc9649906498049ceeba6c7081068748e107373
refs/heads/master
2020-12-25T10:23:51.229581
2017-02-26T01:00:20
2017-02-26T01:00:20
62,473,465
4
0
null
2016-11-30T13:51:11
2016-07-02T23:24:23
Java
UTF-8
Java
false
false
968
java
package org.firstinspires.ftc.teamcode; import com.qualcomm.robotcore.eventloop.opmode.TeleOp; /** * Created by Robi on 2/23/2017. */ @TeleOp(name = "Judging") public class Demo extends functionlist { double speed = 0; double angle = 0; public void runOpMode() { Map(); MotorSet(); telemetry.addData("Hey you!", "BACK OFF BUCKO I AM CALIBRATING"); telemetry.update(); gy.calibrate(); while (!isStopRequested() && gy.isCalibrating()) ; telemetry.addData("All done", "Thanks"); telemetry.update(); waitForStart(); gy.resetZAxisIntegrator(); while(opModeIsActive()){ straighttime(angle, speed, .1); if(gamepad1.a){ speed = .1; } if(gamepad1.y){ angle = 90; } if(gamepad1.b){ angle = 0; speed = 0; } } } }
ed38bf7100ac3dd5046f1e62733a503f5cb61f02
43707ab8fdd019026ee34c36cd89adfe8c3889f1
/app/src/main/java/linc/com/alarmclockforprogrammers/entity/Question.java
a8b567746bfab078fdccb6e29a55cd85cc25167f
[]
no_license
aloon8/AlarmClock-for-programmers
57518afafba8f56644935553cda8caa63647a537
f9dc0e36c71a7b5ea5661edf817d664fb3abafa1
refs/heads/master
2020-07-06T19:54:45.808412
2019-08-13T18:05:14
2019-08-13T18:05:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,676
java
package linc.com.alarmclockforprogrammers.entity; import android.arch.persistence.room.ColumnInfo; import android.arch.persistence.room.Entity; import android.arch.persistence.room.Ignore; import android.arch.persistence.room.PrimaryKey; import java.util.List; import static android.arch.persistence.room.ColumnInfo.INTEGER; import static android.arch.persistence.room.ColumnInfo.TEXT; @Entity (tableName = "questions") public class Question { @PrimaryKey @ColumnInfo(name = "_id") private int id; @ColumnInfo(name = "difficult", typeAffinity = INTEGER) private int difficult; @ColumnInfo(name = "true_answer", typeAffinity = INTEGER) private int trueAnswerPosition; @ColumnInfo(name = "language", typeAffinity = TEXT) private String programmingLanguage; @ColumnInfo(name = "pre_question", typeAffinity = TEXT) private String preQuestion; @ColumnInfo(name = "post_question", typeAffinity = TEXT) private String postQuestion; @ColumnInfo(name = "answers", typeAffinity = TEXT) private String jsonAnswers; @ColumnInfo(name = "code_snippet", typeAffinity = TEXT) private String htmlCodeSnippet; @ColumnInfo(name = "completed", typeAffinity = INTEGER) private boolean completed; @Ignore private List<String> answersList; public Question(int id, int difficult, int trueAnswerPosition, String programmingLanguage, String preQuestion, String postQuestion, String jsonAnswers, String htmlCodeSnippet, boolean completed) { this.id = id; this.difficult = difficult; this.trueAnswerPosition = trueAnswerPosition; this.programmingLanguage = programmingLanguage; this.preQuestion = preQuestion; this.postQuestion = postQuestion; this.jsonAnswers = jsonAnswers; this.htmlCodeSnippet = htmlCodeSnippet; this.completed = completed; } public int getId() { return id; } public void setId(int id) { this.id = id; } public int getDifficult() { return difficult; } public void setDifficult(int difficult) { this.difficult = difficult; } public int getTrueAnswerPosition() { return trueAnswerPosition; } public void setTrueAnswerPosition(int trueAnswerPosition) { this.trueAnswerPosition = trueAnswerPosition; } public String getProgrammingLanguage() { return programmingLanguage; } public void setProgrammingLanguage(String programmingLanguage) { this.programmingLanguage = programmingLanguage; } public String getPreQuestion() { return preQuestion; } public void setPreQuestion(String preQuestion) { this.preQuestion = preQuestion; } public String getPostQuestion() { return postQuestion; } public void setPostQuestion(String postQuestion) { this.postQuestion = postQuestion; } public String getJsonAnswers() { return jsonAnswers; } public void setJsonAnswers(String jsonAnswers) { this.jsonAnswers = jsonAnswers; } public String getHtmlCodeSnippet() { return htmlCodeSnippet; } public void setHtmlCodeSnippet(String htmlCodeSnippet) { this.htmlCodeSnippet = htmlCodeSnippet; } public boolean isCompleted() { return completed; } public void setCompleted(boolean completed) { this.completed = completed; } public List<String> getAnswersList() { return answersList; } public void setAnswersList(List<String> answersList) { this.answersList = answersList; } }
b8054e9adbe0006dc50ed1c79c278e573c2ba24f
83d45b0794c83f79efe99f1396395794a1b2efe1
/src/main/java/com/course/project/hibernateAndJpa/DAO/ICityDal.java
29fe96d7f1584c134f15a4faeafbdfd70a00025a
[]
no_license
fatihkrks/Adding-Restful-Deletion-Update-Writing-Operations
1f2e14233868881e386b23ab5fdbe02100967c70
e9dbf8e349dd691575c8d59607921da8cf1f2c12
refs/heads/master
2022-07-06T06:51:44.544168
2020-04-16T08:54:01
2020-04-16T08:54:01
256,160,821
0
0
null
2022-06-21T03:13:42
2020-04-16T08:53:11
Java
UTF-8
Java
false
false
279
java
package com.course.project.hibernateAndJpa.DAO; import java.util.List; import com.course.project.hibernateAndJpa.Entities.City; public interface ICityDal { List<City> getAll(); void add(City city); void update(City city); void delete(City city); City getById(int id ); }
e986603d1e67411ba1ef974ec739a7e3fa21a23f
a502c3f96c8020c9812991e3a7e0f462670bd856
/设计模式/code/shangguigu/JDKSRC/src/com/atguigu/jdk/FlyWeight.java
c49e1b7a2f1d093b567268592ad2390d75d03707
[]
no_license
La2ck/learn
9ef2a24e4482256cdf2f89dc345651578c71c1ec
65f451672c7484484b625a4e31c2adb0959dbcb6
refs/heads/master
2023-04-16T23:05:17.685513
2020-02-04T12:36:56
2020-02-04T12:36:56
null
0
0
null
null
null
null
GB18030
Java
false
false
1,155
java
package com.atguigu.jdk; public class FlyWeight { public static void main(String[] args) { //如果 Integer.valueOf(x) x 在 -128 --- 127 直接,就是使用享元模式返回,如果不在 //范围类,则仍然 new //小结: //1. 在valueOf 方法中,先判断值是否在 IntegerCache 中,如果不在,就创建新的Integer(new), 否则,就直接从 缓存池返回 //2. valueOf 方法,就使用到享元模式 //3. 如果使用valueOf 方法得到一个Integer 实例,范围在 -128 - 127 ,执行速度比 new 快 Integer x = Integer.valueOf(127); // 得到 x实例,类型 Integer Integer y = new Integer(127); // 得到 y 实例,类型 Integer Integer z = Integer.valueOf(127);//.. Integer w = new Integer(127); System.out.println(x.equals(y)); // 大小,true System.out.println(x == y ); // false System.out.println(x == z ); // true System.out.println(w == x ); // false System.out.println(w == y ); // false Integer x1 = Integer.valueOf(200); Integer x2 = Integer.valueOf(200); System.out.println("x1==x2 " + (x1 == x2)); // false } }
572c9ba3ae3bb2c3be88a29a8b5dc39da58df559
93c32a8726768c5932f612064e30bbb930e46f45
/app/src/main/java/com/lhc/android/gz_guide/activity/GeneralSettingActivity.java
9529647cf6e8e6ef772276c24327a9cd0e64dd07
[]
no_license
Great001/GZ_Guide
077fb1712c6453fdba4952f736e5b763eb059840
a245f20bd0985613ef7377e8a074b0e03afe19bd
refs/heads/master
2021-01-23T04:33:45.643397
2017-04-24T05:41:59
2017-04-24T05:41:59
86,208,674
0
0
null
null
null
null
UTF-8
Java
false
false
4,812
java
package com.lhc.android.gz_guide.activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.SharedPreferences; import android.content.res.Configuration; import android.content.res.Resources; import android.os.Bundle; import android.util.DisplayMetrics; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import com.lhc.android.gz_guide.GZGuide_APP; import com.lhc.android.gz_guide.R; import com.lhc.android.gz_guide.util.NavigationUtil; import com.lhc.android.gz_guide.util.ToastUtil; import java.util.Locale; public class GeneralSettingActivity extends BaseActivity implements View.OnClickListener { private LinearLayout mLlLanguage; private TextView mTvLanSelected; private TextView mTvFontSize; private TextView mTvFlow; private TextView mTvCacheClear; private int selectLanguage = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_general_setting); initView(); } @Override public int getTitleRes() { return R.string.general_setting; } public void initView() { mLlLanguage = (LinearLayout) findViewById(R.id.ll_language_setting); mTvLanSelected = (TextView) findViewById(R.id.tv_language_selected); mTvCacheClear = (TextView) findViewById(R.id.tv_cache_clear); mTvFlow = (TextView) findViewById(R.id.tv_flow_setting); mTvFontSize = (TextView) findViewById(R.id.tv_font_size_setting); SharedPreferences sp = getSharedPreferences(GZGuide_APP.SP_APP_CONFIG, MODE_PRIVATE); String language = sp.getString(GZGuide_APP.KEY_LANGUAGE, "NULL"); if ("zh".equals(language)) { mTvLanSelected.setText(R.string.selected_language_zh); selectLanguage = 0; } else if ("en".equals(language)) { mTvLanSelected.setText(R.string.selected_language_en); selectLanguage = 1; } mLlLanguage.setOnClickListener(this); mTvFlow.setOnClickListener(this); mTvFontSize.setOnClickListener(this); mTvCacheClear.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.ll_language_setting: showLanguageChoices(); break; case R.id.tv_font_size_setting: ToastUtil.show(this, R.string.font_size_not_need_change); break; case R.id.tv_cache_clear: ToastUtil.show(this, R.string.cache_clear_finish); break; case R.id.tv_flow_setting: ToastUtil.show(this, R.string.current_flow); break; default: break; } } public void showLanguageChoices() { String[] languages = {getResources().getString(R.string.selected_language_zh), getResources().getString(R.string.selected_language_en)}; AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setSingleChoiceItems(languages, selectLanguage, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { switch (which) { case 0: changeLanguage(Locale.SIMPLIFIED_CHINESE); mTvLanSelected.setText(R.string.selected_language_zh); break; case 1: changeLanguage(Locale.ENGLISH); mTvLanSelected.setText(R.string.selected_language_en); break; default: break; } dialog.cancel(); NavigationUtil.navigateToMainActivity(GeneralSettingActivity.this); } }); builder.create().show(); } //应用内语言切换 public void changeLanguage(Locale locale) { Resources resources = getResources(); DisplayMetrics dm = resources.getDisplayMetrics(); Configuration config = resources.getConfiguration(); config.locale = locale; resources.updateConfiguration(config, dm); saveLanguageConfig(locale); } //保存语言设置 public void saveLanguageConfig(Locale locale) { String language; if (locale.equals(Locale.SIMPLIFIED_CHINESE)) { language = "zh"; } else { language = "en"; } SharedPreferences sp = getSharedPreferences(GZGuide_APP.SP_APP_CONFIG, MODE_PRIVATE); sp.edit().putString(GZGuide_APP.KEY_LANGUAGE, language).commit(); } }
c2ca5eb9888d1a02e3fe675d360768f707fb1edc
f1ea1b815bafc86fc4dadc42f2f32721b103c6f4
/RPCSD/src/ServidorPedidos/PedidoPaqueteEscucha.java
e2922a85563da3176bd35264ad71efed36ab438f
[]
no_license
PaulGiancarlo/RPC-Java
0d5cba8c88ea063c880a9e0e719fa266c3207bf1
f3b5a2a11ee18e5c236f5d7347e0cd7a6df3c6a9
refs/heads/master
2016-09-05T12:34:03.815588
2014-10-19T18:02:31
2014-10-19T18:02:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
253
java
package ServidorPedidos; import GlobalPedidos.PedidoPaquete; import GlobalPedidos.RespuestaPaquete; /** * @author fabian */ public interface PedidoPaqueteEscucha { RespuestaPaquete pedidoPaqueteEscucha(PedidoPaquete pedidoPaquete); }
057bc6277574f501d5a45462167543810c8de63c
601582228575ca0d5f61b4c211fd37f9e4e2564c
/logisoft_revision1/src/com/gp/cong/logisoft/struts/form/VendorForm.java
9a829fdfd663406bfe3d1c3b978c64c66742d338
[]
no_license
omkarziletech/StrutsCode
3ce7c36877f5934168b0b4830cf0bb25aac6bb3d
c9745c81f4ec0169bf7ca455b8854b162d6eea5b
refs/heads/master
2021-01-11T08:48:58.174554
2016-12-17T10:45:19
2016-12-17T10:45:19
76,713,903
1
1
null
null
null
null
UTF-8
Java
false
false
4,542
java
/* * Generated by MyEclipse Struts * Template path: templates/java/JavaClass.vtl */ package com.gp.cong.logisoft.struts.form; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; /** * MyEclipse Struts * Creation date: 09-17-2008 * * XDoclet definition: * @struts.form name="vendorForm" */ public class VendorForm extends ActionForm { private String legalname; private String dba; private String tin; private String wfile; private String apname; private String phone; private String fax; private String email; private String web; private String eamanager; private String credit; private String climit; private String cterms; private String baccount; private String paymethod; private String bankname; private String baddr; private String vacctname; private String vacctno; private String aba; private String swift; private String remail; private String rfax; private String payemail; private String buttonValue; private String deactivate; public String getAba() { return aba; } public void setAba(String aba) { this.aba = aba; } public String getApname() { return apname; } public void setApname(String apname) { this.apname = apname; } public String getBaccount() { return baccount; } public void setBaccount(String baccount) { this.baccount = baccount; } public String getBaddr() { return baddr; } public void setBaddr(String baddr) { this.baddr = baddr; } public String getVacctname() { return vacctname; } public void setVacctname(String vacctname) { this.vacctname = vacctname; } public String getVacctno() { return vacctno; } public void setVacctno(String vacctno) { this.vacctno = vacctno; } public String getClimit() { return climit; } public void setClimit(String climit) { this.climit = climit; } public String getCredit() { return credit; } public void setCredit(String credit) { this.credit = credit; } public String getCterms() { return cterms; } public void setCterms(String cterms) { this.cterms = cterms; } public String getDba() { return dba; } public void setDba(String dba) { this.dba = dba; } public String getEamanager() { return eamanager; } public void setEamanager(String eamanager) { this.eamanager = eamanager; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getFax() { return fax; } public void setFax(String fax) { this.fax = fax; } public String getLegalname() { return legalname; } public void setLegalname(String legalname) { this.legalname = legalname; } public String getPayemail() { return payemail; } public void setPayemail(String payemail) { this.payemail = payemail; } public String getPaymethod() { return paymethod; } public void setPaymethod(String paymethod) { this.paymethod = paymethod; } public String getBankname() { return bankname; } public void setBankname(String bankname) { this.bankname = bankname; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getRemail() { return remail; } public void setRemail(String remail) { this.remail = remail; } public String getRfax() { return rfax; } public void setRfax(String rfax) { this.rfax = rfax; } public String getSwift() { return swift; } public void setSwift(String swift) { this.swift = swift; } public String getTin() { return tin; } public void setTin(String tin) { this.tin = tin; } public String getWeb() { return web; } public void setWeb(String web) { this.web = web; } public String getWfile() { return wfile; } public void setWfile(String wfile) { this.wfile = wfile; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub return null; } /** * Method reset * @param mapping * @param request */ public void reset(ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub } public String getButtonValue() { return buttonValue; } public void setButtonValue(String buttonValue) { this.buttonValue = buttonValue; } public String getDeactivate() { return deactivate; } public void setDeactivate(String deactivate) { this.deactivate = deactivate; } }
2ed17bae9f0c8c572200ba172fd4417926ca6e66
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_45d7524cf40770f04a5a8753395f5a2e8ae8ef3f/GameMenuPopup/2_45d7524cf40770f04a5a8753395f5a2e8ae8ef3f_GameMenuPopup_s.java
e290952b51b2533f3ea0b252cb9f9531938432d0
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,485
java
/* ################################################################## # GNU BACKGAMMON MOBILE # ################################################################## # # # Authors: Domenico Martella - Davide Saurino # # E-mail: [email protected] # # Date: 19/12/2012 # # # ################################################################## # # # Copyright (C) 2012 Alca Societa' Cooperativa # # # # This file is part of GNU BACKGAMMON MOBILE. # # GNU BACKGAMMON MOBILE 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. # # # # GNU BACKGAMMON MOBILE 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 v3 along with this program. # # If not, see <http://http://www.gnu.org/licenses/> # # # ################################################################## */ package it.alcacoop.backgammon.ui; import it.alcacoop.backgammon.GnuBackgammon; import it.alcacoop.backgammon.fsm.BaseFSM.Events; import it.alcacoop.backgammon.fsm.GameFSM.States; import it.alcacoop.backgammon.logic.MatchState; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.InputListener; import com.badlogic.gdx.scenes.scene2d.Stage; import com.badlogic.gdx.scenes.scene2d.actions.Actions; import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.scenes.scene2d.ui.TextButton; import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.scenes.scene2d.utils.Drawable; public final class GameMenuPopup extends Table { private Table t1; private Drawable background; private static TextButton undo; private static TextButton resign; private static TextButton abandon; private TextButton options; private Actor a; private Runnable noop; private boolean visible; public GameMenuPopup(Stage stage) { noop = new Runnable(){ @Override public void run() { } }; setWidth(stage.getWidth()); setHeight(stage.getHeight()/(6.8f-GnuBackgammon.ss)); setX(0); setY(-getHeight()); background = GnuBackgammon.skin.getDrawable("popup-region"); setBackground(background); a = new Actor(); a.addListener(new InputListener(){ @Override public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) { hide(noop); return true; } }); t1 = new Table(); t1.setFillParent(true); TextButtonStyle tl = GnuBackgammon.skin.get("button", TextButtonStyle.class); undo = new TextButton("Undo Move", tl); undo.addListener(new ClickListener(){ @Override public void clicked(InputEvent event, float x, float y) { hide(new Runnable(){ @Override public void run() { if (undo.isDisabled()) return; GnuBackgammon.Instance.board.undoMove(); }}); } }); resign = new TextButton("Resign Game", tl); resign.addListener(new ClickListener(){ @Override public void clicked(InputEvent event, float x, float y) { hide(new Runnable(){ @Override public void run() { if (resign.isDisabled()) return; GnuBackgammon.fsm.state(States.DIALOG_HANDLER); GnuBackgammon.fsm.processEvent(Events.ACCEPT_RESIGN, 0); }}); } }); abandon = new TextButton("Abandon Match", tl); abandon.addListener(new ClickListener(){@Override public void clicked(InputEvent event, float x, float y) { hide(new Runnable(){ @Override public void run() { if (abandon.isDisabled()) return; GnuBackgammon.fsm.state(States.DIALOG_HANDLER); UIDialog.getYesNoDialog( Events.ABANDON_MATCH, "Really exit this match?", 0.82f, GnuBackgammon.Instance.board.getStage()); }}); }}); options = new TextButton("Options", tl); options.addListener(new ClickListener(){@Override public void clicked(InputEvent event, float x, float y) { hide(new Runnable(){ @Override public void run() { UIDialog.getOptionsDialog(0.82f, GnuBackgammon.Instance.board.getStage()); }}); }}); float pad = getHeight()/15; float w = getWidth()/3.3f - pad; add(undo).fill().expand().pad(pad).width(w); add(resign).fill().expand().pad(pad).width(w); add(abandon).fill().expand().pad(pad).width(w); add(options).fill().expand().pad(pad).width(w); visible = false; addActor(t1); } public static void setDisabledButtons() { if ((MatchState.matchType==0) && (MatchState.fMove==1)) { //CPU IS PLAYING undo.setDisabled(true); resign.setDisabled(true); abandon.setDisabled(true); undo.setColor(1,1,1,0.4f); resign.setColor(1,1,1,0.4f); abandon.setColor(1,1,1,0.4f); } else { undo.setDisabled(false); resign.setDisabled(false); abandon.setDisabled(false); undo.setColor(1,1,1,1); resign.setColor(1,1,1,1); abandon.setColor(1,1,1,1); } } private void show() { visible = true; addAction(Actions.moveTo(0, 0, 0.1f)); } private void hide(Runnable r) { visible = false; addAction(Actions.sequence( Actions.moveTo(0, -getHeight(), 0.1f), Actions.run(r) )); } public void toggle() { if (visible) hide(noop); else { GnuBackgammon.Instance.board.points.reset(); if (GnuBackgammon.Instance.board.selected!=null) GnuBackgammon.Instance.board.selected.highlight(false); show(); } } public Actor hit (float x, float y, boolean touchable) { Actor hit = super.hit(x, y, touchable); if (visible) { if (hit != null) return hit; else { return a; } } else { return hit; } } }
7758807facff64868ec4b8a75c9845ae1bf6bfbf
2435ef886043efcaa18eb92e84f9bb8477fb6307
/workspace/EjercicioCompra_Notificaciones/src/main/java/com/example/notificaciones/ConfiguracionJms.java
73d9e6ad0f75e3a646785780f07b0b09c9260944
[]
no_license
victorherrerocazurro/MicroserviciosAccentureOctubre2017
ae6c98ac472814e9b25bee0fb7b4b9a98dcfbce4
98bceb105d7e692c0614dd53a956f2f110ac5d5d
refs/heads/master
2021-05-08T01:57:32.454573
2017-10-25T15:40:41
2017-10-25T15:40:41
107,946,621
0
0
null
null
null
null
UTF-8
Java
false
false
1,541
java
package com.example.notificaciones; import javax.jms.ConnectionFactory; import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jms.annotation.EnableJms; import org.springframework.jms.config.DefaultJmsListenerContainerFactory; import org.springframework.jms.config.JmsListenerContainerFactory; import org.springframework.jms.support.converter.MappingJackson2MessageConverter; import org.springframework.jms.support.converter.MessageConverter; import org.springframework.jms.support.converter.MessageType; @Configuration @EnableJms public class ConfiguracionJms { @Bean public JmsListenerContainerFactory<?> myFactory(ConnectionFactory connectionFactory, DefaultJmsListenerContainerFactoryConfigurer configurer) { DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); // This provides all boot's default to this factory, including the message // converter configurer.configure(factory, connectionFactory); // You could still override some of Boot's default if necessary. return factory; } @Bean // Serialize message content to json using TextMessage public MessageConverter jacksonJmsMessageConverter() { MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter(); converter.setTargetType(MessageType.TEXT); converter.setTypeIdPropertyName("_type"); return converter; } }
4ecf879cc3b2c37a509dc67b2b42bf719926718c
b0b08d185f11bee8b11f6524583f992079ea0879
/core/src/com/snake/entity/EntityBase.java
6006e3f3e079adb9015a8093c14412e08dbbf363
[]
no_license
Hennrie/simpleSnakeGame
27e0dcaefc6c15d9b21a899821b3a612172e52cb
f05230fdf950af865813bde99860bda0915e61e1
refs/heads/master
2021-02-05T03:05:18.373802
2020-02-28T10:45:19
2020-02-28T10:45:19
243,737,515
0
0
null
null
null
null
UTF-8
Java
false
false
1,295
java
package com.snake.entity; import com.badlogic.gdx.math.Rectangle; /** * Created by goran on 26/09/2016. */ @Deprecated public abstract class EntityBase { // == attributes == protected float x; protected float y; protected float width = 1; protected float height = 1; protected Rectangle bounds; // == constructors == public EntityBase() { bounds = new Rectangle(x, y, width, height); } // == public methods == public void setPosition(float x, float y) { this.x = x; this.y = y; updateBounds(); } public void setSize(float width, float height) { this.width = width; this.height = height; updateBounds(); } public float getX() { return x; } public float getY() { return y; } public void setX(float x) { this.x = x; updateBounds(); } public void setY(float y) { this.y = y; updateBounds(); } public float getWidth() { return width; } public float getHeight() { return height; } public Rectangle getBounds() { return bounds; } public void updateBounds() { bounds.setPosition(x, y); bounds.setSize(width, height); } }
31b2676378a39945db6dcf248ce764ff265c7f2f
fdaa8c6a1bcf9df60a0a08f2472bd4858854f701
/src/main/java/com/example/yachting/domain/yacht/YachtRepository.java
660601933f82ad1316074917f4d82fa54c508725
[]
no_license
dpcode123/yachting-backend
be61820db2ef8411326442647d8b977835eadc5e
ae2109b981b8ff782d6aee54de5baf6eee830a50
refs/heads/main
2023-08-08T08:26:19.886783
2021-09-15T18:54:45
2021-09-15T18:54:45
390,289,460
0
0
null
null
null
null
UTF-8
Java
false
false
706
java
package com.example.yachting.domain.yacht; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.Optional; /** * Yacht repository. * @author dp */ @Repository public interface YachtRepository extends JpaRepository<Yacht, Long> { /** * Counts all yachts. * @return total number of yachts */ Long countAllBy(); /** * Get a yacht by id. * @param id * @return yacht wrapped in an Optional */ Optional<Yacht> findById(Long id); /** * Deletes an existing yacht. * @param id * @return number of deleted yachts (0 or 1) */ Long removeById(Long id); }
33cb42f3a9ce8a8a87b568cb98041dd8bd2690a7
610abbcf9f08c4fb6cb0afc75027eee4ffdce50f
/src/thread/threadPool3/Task.java
87db4acc74bfb525405cce75155d9f0531131b79
[]
no_license
warrenrui/RunRun
d7fa5c5430e5ee220193212e06c3f0a07e6a5ff4
494bdf841670aa962df46f8ac8ec5aca224f544a
refs/heads/master
2022-11-19T15:57:24.799698
2021-12-29T16:12:14
2021-12-29T16:12:14
137,385,293
0
0
null
2022-11-16T09:28:28
2018-06-14T16:52:06
JavaScript
UTF-8
Java
false
false
347
java
package thread.threadPool3; public abstract class Task { public enum State { NEW, RUNNING, FINISHED } // 任务状态 private State state = State.NEW; public void setState(State state) { this.state = state; } public State getState() { return state; } public abstract void deal(); }
74307b49a5099633867521038f07918290422cd7
27511a2f9b0abe76e3fcef6d70e66647dd15da96
/src/com/instagram/android/business/b/a.java
882b88c2d30caee0fe670a48d5410367bcd6d720
[]
no_license
biaolv/com.instagram.android
7edde43d5a909ae2563cf104acfc6891f2a39ebe
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
refs/heads/master
2022-05-09T15:05:05.412227
2016-07-21T03:48:36
2016-07-21T03:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,715
java
package com.instagram.android.business.b; import android.content.Context; import android.content.res.Resources; import android.util.DisplayMetrics; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.facebook.s; import com.facebook.u; import com.facebook.w; import com.github.mikephil.charting.c.k; import com.github.mikephil.charting.charts.BarChart; import com.github.mikephil.charting.charts.HorizontalBarChart; import com.github.mikephil.charting.data.b; import com.github.mikephil.charting.data.g; import com.github.mikephil.charting.data.h; import com.github.mikephil.charting.i.d; import com.instagram.android.business.c.n; import com.instagram.android.business.c.o; import com.instagram.common.z.a.e; import java.util.List; public final class a extends e<g, Void> { private final Context a; public a(Context paramContext) { a = paramContext; } public final int a() { return 1; } public final View a(int paramInt, View paramView, ViewGroup paramViewGroup, Object paramObject1, Object paramObject2) { paramObject2 = paramView; if (paramView == null) { paramView = a; paramObject2 = LayoutInflater.from(paramView).inflate(w.horizontal_bar_chart_view, paramViewGroup, false); paramViewGroup = new o(); a = ((HorizontalBarChart)((View)paramObject2).findViewById(u.chart)); f1 = paramView.getResources().getDimensionPixelOffset(s.horizontal_chart_left_margin); float f2 = paramView.getResources().getDimensionPixelOffset(s.chart_horizontal_margin); float f3 = paramView.getResources().getDimensionPixelOffset(s.chart_top_margin); float f4 = paramView.getResources().getDimensionPixelOffset(s.horizontal_chart_bottom_margin); a.b(f1, f3, f2, f4); a.getViewPortHandler().a(f1, f3, f2, f4); ((View)paramObject2).setTag(paramViewGroup); } paramView = a; paramViewGroup = (o)((View)paramObject2).getTag(); paramObject1 = (g)paramObject1; paramInt = 0; while (paramInt < ((g)paramObject1).e().size()) { h localh = (h)((g)paramObject1).c(paramInt); if (localh != null) { localh.a(5.35F); localh.a(n.a(localh, paramView)); localh.a(false); } paramInt += 1; } n.a(a, (g)paramObject1, paramView); float f1 = paramView.getResources().getDimensionPixelOffset(s.horizontal_chart_label_padding) / getResourcesgetDisplayMetricsdensity; a.getXAxis().b(f1); a.setData((b)paramObject1); return (View)paramObject2; } } /* Location: * Qualified Name: com.instagram.android.business.b.a * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
ce74bd7b294c3c4bbc650ccc55161a984348d8a7
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Closure-176/com.google.javascript.jscomp.TypeInference/BBC-F0-opt-20/7/com/google/javascript/jscomp/TypeInference_ESTest.java
111f11d1249eed5f5eca1066f981a87b4369a900
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
198,360
java
/* * This file was automatically generated by EvoSuite * Wed Oct 13 16:10:17 GMT 2021 */ package com.google.javascript.jscomp; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSortedMap; import com.google.javascript.jscomp.ClosureCodingConvention; import com.google.javascript.jscomp.CodingConvention; import com.google.javascript.jscomp.Compiler; import com.google.javascript.jscomp.ControlFlowGraph; import com.google.javascript.jscomp.GoogleCodingConvention; import com.google.javascript.jscomp.LinkedFlowScope; import com.google.javascript.jscomp.Scope; import com.google.javascript.jscomp.StatementFusion; import com.google.javascript.jscomp.TypeInference; import com.google.javascript.jscomp.TypedScopeCreator; import com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter; import com.google.javascript.jscomp.type.FlowScope; import com.google.javascript.jscomp.type.ReverseAbstractInterpreter; import com.google.javascript.jscomp.type.SemanticReverseAbstractInterpreter; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.SimpleErrorReporter; import com.google.javascript.rhino.jstype.BooleanLiteralSet; import com.google.javascript.rhino.jstype.JSType; import com.google.javascript.rhino.jstype.JSTypeNative; import com.google.javascript.rhino.jstype.JSTypeRegistry; import com.google.javascript.rhino.jstype.NamedType; import java.util.List; import java.util.Map; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class TypeInference_ESTest extends TypeInference_ESTest_scaffolding { @Test(timeout = 4000) public void test000() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString("t", (-2932), 1595); Node node2 = new Node(101, node1, node0, (-1), 4); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node2, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // AND does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test001() throws Throwable { BooleanLiteralSet booleanLiteralSet0 = BooleanLiteralSet.BOTH; // Undeclared exception! // try { TypeInference.getBooleanOutcomes(booleanLiteralSet0, (BooleanLiteralSet) null, true); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test002() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(38, node0, node0, 1, 12); // Undeclared exception! // try { typeInference0.flowThrough(node1, linkedFlowScope0); // fail("Expecting exception: UnsupportedOperationException"); // } catch(UnsupportedOperationException e) { // // // // NAME 1 is not a string node // // // verifyException("com.google.javascript.rhino.Node", e); // } } @Test(timeout = 4000) public void test003() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); Node node1 = Node.newString(64, "Object#Key"); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); FlowScope flowScope0 = typeInference0.createEntryLattice(); // Undeclared exception! // try { typeInference0.flowThrough(node1, flowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.common.base.Preconditions", e); // } } @Test(timeout = 4000) public void test004() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(100, node0, node0, node0); closureReverseAbstractInterpreter0.append(closureReverseAbstractInterpreter0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: StackOverflowError"); // } catch(StackOverflowError e) { // // // // no message in exception (getMessage() returned null) // // // } } @Test(timeout = 4000) public void test005() throws Throwable { Compiler compiler0 = new Compiler(); GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, (JSTypeRegistry) null); TypeInference typeInference0 = null; // try { typeInference0 = new TypeInference(compiler0, (ControlFlowGraph<Node>) null, closureReverseAbstractInterpreter0, (Scope) null, (Map<String, CodingConvention.AssertionFunctionSpec>) null); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.DataFlowAnalysis", e); // } } @Test(timeout = 4000) public void test006() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("com.google.javascript.jscomp.TypeInference$TemplateTypeReplacer"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); Scope scope0 = Scope.createLatticeBottom(node0); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(93, "Object#Key"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test007() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); Scope scope0 = Scope.createLatticeBottom(node0); SemanticReverseAbstractInterpreter semanticReverseAbstractInterpreter0 = new SemanticReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, semanticReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(100, "Object#Element"); FlowScope flowScope0 = typeInference0.createEntryLattice(); // Undeclared exception! // try { typeInference0.flowThrough(node1, flowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test008() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(31, ""); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // DELPROP : boolean does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test009() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(90, node0, node0, node0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test010() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createGlobalScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(13, "Object#Element"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // NE Object#Element : boolean does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test011() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); JSTypeNative jSTypeNative0 = JSTypeNative.ARRAY_TYPE; CodingConvention.AssertionFunctionSpec codingConvention_AssertionFunctionSpec0 = new CodingConvention.AssertionFunctionSpec("Object#Key", jSTypeNative0); ImmutableMap<String, CodingConvention.AssertionFunctionSpec> immutableMap0 = ImmutableMap.of("com.google.javascript.jscomp.TypeInference$BooleanOutcomePair", codingConvention_AssertionFunctionSpec0, "Object#Element", codingConvention_AssertionFunctionSpec0, "k", codingConvention_AssertionFunctionSpec0, "com.google.javascript.jscomp.TypeInference$2", codingConvention_AssertionFunctionSpec0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, immutableMap0); Node node1 = Node.newString(51, ""); FlowScope flowScope0 = typeInference0.createEntryLattice(); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // IN : boolean does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test012() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); Node node1 = Node.newString(30, "i03'C.iI@\"Nd8yH"); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test013() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseSyntheticCode("t", "t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(89, "t"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // ASSIGN_BITAND t : number does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test014() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); Scope scope0 = Scope.createLatticeBottom(node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(102, node0, node0, node0); SemanticReverseAbstractInterpreter semanticReverseAbstractInterpreter0 = new SemanticReverseAbstractInterpreter(closureCodingConvention0, (JSTypeRegistry) null); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, semanticReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test015() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(46, node0, node0, node0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test016() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(101, "Object#Key"); FlowScope flowScope0 = typeInference0.createEntryLattice(); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test017() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(9, node0, node0, node0); Node node2 = new Node(31, node1, node1, node1); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node2, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // DELPROP : boolean does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test018() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = new Node(130, node0, node0, node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test019() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(49, "k"); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // THROW k does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test020() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(32, "Object#Key"); FlowScope flowScope0 = typeInference0.createEntryLattice(); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // TYPEOF Object#Key : string does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test021() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(10, node0, node0, node0); Node node2 = new Node(31, node1, node1, node1); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node2, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // DELPROP : boolean does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test022() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); Scope scope0 = Scope.createLatticeBottom(node0); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(85, "yi,i5"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test023() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); Scope scope0 = Scope.createLatticeBottom(node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = new Node(18, node0, node0, 8, 146); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test024() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseSyntheticCode("k", "k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(33, "\"2u7hA*:|"); TypeInference typeInference1 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); FlowScope flowScope0 = typeInference0.createInitialEstimateLattice(); // Undeclared exception! // try { typeInference1.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test025() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); NamedType namedType0 = jSTypeRegistry0.createNamedType("{t=L", "k", 55, 32); JSType jSType0 = namedType0.findPropertyType("Object#Element"); ImmutableList<JSType> immutableList0 = ImmutableList.of(jSType0, (JSType) namedType0, (JSType) namedType0, jSType0, (JSType) namedType0, (JSType) namedType0, jSType0, (JSType) namedType0); Node node1 = jSTypeRegistry0.createParameters((List<JSType>) immutableList0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // PARAM_LIST : ? does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test026() throws Throwable { BooleanLiteralSet booleanLiteralSet0 = BooleanLiteralSet.TRUE; BooleanLiteralSet booleanLiteralSet1 = TypeInference.getBooleanOutcomes(booleanLiteralSet0, booleanLiteralSet0, false); assertEquals(BooleanLiteralSet.TRUE, booleanLiteralSet1); } @Test(timeout = 4000) public void test027() throws Throwable { Compiler compiler0 = new Compiler(); compiler0.parseTestCode("dk"); Node node0 = Node.newString(16, "dk"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Node node1 = new Node(33, node0, 16, 49); Scope scope0 = Scope.createLatticeBottom(node1); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test028() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(57, "L_"); Node node2 = new Node(33, node1, node1, node1, node1); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node2, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // GETPROP : ? does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test029() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); Scope scope0 = Scope.createLatticeBottom(node0); Node node1 = new Node(37, node0, node0, node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test030() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(38, "k"); node1.addChildrenToFront(node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // NAME k : ? does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test031() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(4, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // RETURN does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test032() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); CodingConvention.AssertionFunctionSpec codingConvention_AssertionFunctionSpec0 = new CodingConvention.AssertionFunctionSpec("k"); ImmutableSortedMap<String, CodingConvention.AssertionFunctionSpec> immutableSortedMap0 = ImmutableSortedMap.of("9hx", codingConvention_AssertionFunctionSpec0, "com.google.javascript.jscomp.ExternExportsPass", codingConvention_AssertionFunctionSpec0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, immutableSortedMap0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(1242, node0, node0, node0, 1, 1589); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 1242 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test033() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(155, "Object#Key"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // CAST Object#Key does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test034() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(154, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // STRING_KEY does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test035() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(153, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // LABEL_NAME does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test036() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(152, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // DEBUGGER does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test037() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(151, node0, node0, node0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test038() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); Scope scope0 = Scope.createLatticeBottom(node0); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(150, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 150 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test039() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice((Scope) null); Node node1 = new Node(149, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // CONST does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test040() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); Scope scope0 = Scope.createLatticeBottom(node0); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(148, "d7}/srDv.Pf"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // SETTER_DEF d7}/srDv.Pf does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test041() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); FlowScope flowScope0 = typeInference0.createEntryLattice(); Node node1 = new Node(147, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // GETTER_DEF does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test042() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice((Scope) null); Node node1 = Node.newString(146, "Object#Key"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 146 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test043() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(145, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 145 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test044() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(144, "k"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 144 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test045() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(143, node0, node0, 32, (-799)); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 143 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test046() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(142, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 142 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test047() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(141, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 141 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test048() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); FlowScope flowScope0 = typeInference0.createEntryLattice(); Node node1 = new Node(140, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 140 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test049() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(139, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 139 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test050() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("gBy"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createGlobalScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(138, ""); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 138 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test051() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(137, node0, node0, 2, 39); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 137 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test052() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("r"); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(136, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 136 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test053() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(135, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 135 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test054() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); Node node1 = new Node(134, node0, node0, node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); FlowScope flowScope0 = typeInference0.createEntryLattice(); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 134 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test055() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("0"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(133, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 133 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test056() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); Scope scope0 = Scope.createGlobalScope(node0); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(131, node0, node0, node0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test057() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); FlowScope flowScope0 = typeInference0.createEntryLattice(); Node node1 = new Node(129, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 129 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test058() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(128, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 128 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test059() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createGlobalScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(127, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 127 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test060() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createGlobalScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(126, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // LABEL does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test061() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(125, "Object#Element"); FlowScope flowScope0 = typeInference0.createEntryLattice(); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // BLOCK Object#Element does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test062() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); CodingConvention codingConvention0 = compiler0.getCodingConvention(); TypedScopeCreator typedScopeCreator0 = new TypedScopeCreator(compiler0, codingConvention0); Scope scope0 = typedScopeCreator0.createInitialScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(124, "Object#Key"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // EMPTY Object#Key does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test063() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = (ClosureCodingConvention)compiler0.defaultCodingConvention; ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(123, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 123 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test064() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice((Scope) null); Node node1 = new Node(122, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // VOID does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test065() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(121, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 121 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test066() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("gBy"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(120, node0, node0, node0, node0); // Undeclared exception! // try { typeInference0.flowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.common.base.Preconditions", e); // } } @Test(timeout = 4000) public void test067() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(119, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // WITH does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test068() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(118, ""); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // VAR does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test069() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(117, "t"); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test070() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(116, "", 131, 1); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // BREAK 131 does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test071() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(115, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // FOR does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test072() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(114, node0, node0, node0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test073() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice((Scope) null); Node node1 = new Node(113, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // WHILE does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test074() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createGlobalScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(112, node0, node0, 43, (-1341)); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // DEFAULT_CASE does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test075() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(111, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // CASE does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test076() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseSyntheticCode("k", "k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(110, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // SWITCH does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test077() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice((Scope) null); Node node1 = new Node(109, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 109 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test078() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(108, "k"); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test079() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createGlobalScope(node0); ImmutableSortedMap<String, CodingConvention.AssertionFunctionSpec> immutableSortedMap0 = ImmutableSortedMap.of(); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, immutableSortedMap0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(107, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 107 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test080() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(106, "Object#Key"); FlowScope flowScope0 = typeInference0.createEntryLattice(); FlowScope flowScope1 = typeInference0.flowThrough(node1, flowScope0); assertNotSame(flowScope1, flowScope0); } @Test(timeout = 4000) public void test081() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice((Scope) null); Node node1 = Node.newString(105, "Object#Element"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // FUNCTION Object#Element does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test082() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(103, "k"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // DEC k : number does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test083() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice((Scope) null); Node node1 = new Node(99, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 99 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test084() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(98, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test085() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(97, node0, node0, node0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test086() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(96, "Object#Key"); FlowScope flowScope0 = typeInference0.createEntryLattice(); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // ASSIGN_DIV Object#Key : number does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test087() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(95, "Object#Key"); FlowScope flowScope0 = typeInference0.createEntryLattice(); FlowScope flowScope1 = typeInference0.flowThrough(node1, flowScope0); assertNotSame(flowScope1, flowScope0); } @Test(timeout = 4000) public void test088() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); Scope scope0 = Scope.createLatticeBottom(node0); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(94, "Object#Key"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // ASSIGN_SUB Object#Key : number does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test089() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(93, node0, node0, node0); // Undeclared exception! // try { typeInference0.flowThrough(node1, linkedFlowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test090() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseSyntheticCode("k", "k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = new Node(91); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // ASSIGN_RSH : number does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test091() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); FlowScope flowScope0 = typeInference0.createEntryLattice(); Node node1 = new Node(88, node0, node0, node0); FlowScope flowScope1 = typeInference0.flowThrough(node1, flowScope0); assertNotSame(flowScope1, flowScope0); } @Test(timeout = 4000) public void test092() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(87, "t"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // ASSIGN_BITOR t : number does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test093() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(84, node0, node0, node0); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test094() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("gBy"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = new Node(81, node0, node0, 43, 146); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 81 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test095() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(80, "Object#Key"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 80 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test096() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(79, "Object#Key"); FlowScope flowScope0 = typeInference0.createEntryLattice(); FlowScope flowScope1 = typeInference0.flowThrough(node1, flowScope0); assertNotSame(flowScope1, flowScope0); } @Test(timeout = 4000) public void test097() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createGlobalScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(78, "t"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 78 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test098() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice((Scope) null); Node node1 = new Node(77, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // TRY does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test099() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseSyntheticCode("t", "t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(76, "t"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 76 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test100() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("dk"); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); Scope scope0 = Scope.createLatticeBottom(node0); Node node1 = Node.newString(75, "Object#Element"); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node1, false, false); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test101() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(74, "Object#Key"); FlowScope flowScope0 = typeInference0.createEntryLattice(); FlowScope flowScope1 = typeInference0.flowThrough(node1, flowScope0); assertNotSame(flowScope1, flowScope0); } @Test(timeout = 4000) public void test102() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(73, node0, node0, node0, node0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test103() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createGlobalScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(72, "Object#Key"); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test104() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(71, node0, node0, node0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test105() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(70, "t"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 70 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test106() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(69, "Object#Key"); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test107() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createGlobalScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(66, "k"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 66 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test108() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(65, "Object#Element"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 65 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test109() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); Scope scope0 = Scope.createLatticeBottom(node0); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(64, "yi,i5"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.common.base.Preconditions", e); // } } @Test(timeout = 4000) public void test110() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(62, "k"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 62 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test111() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = new Node(61, node0, node0, node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test112() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice((Scope) null); Node node1 = Node.newString(60, "k"); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test113() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(59, "t"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 59 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test114() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = new Node(56, node0, node0, node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test115() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(55, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 55 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test116() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseSyntheticCode("k", "k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(54, node0, 43, 39); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 54 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test117() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(53, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 53 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test118() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = new Node(52, node0, node0, node0); FlowScope flowScope0 = typeInference0.createEntryLattice(); FlowScope flowScope1 = typeInference0.flowThrough(node1, flowScope0); assertNotSame(flowScope1, flowScope0); } @Test(timeout = 4000) public void test119() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(50, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 50 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test120() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(48, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 48 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test121() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(47, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // REGEXP does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test122() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(45, "k"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // SHEQ k : boolean does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test123() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(44, "k"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // TRUE k does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test124() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); Scope scope0 = Scope.createLatticeBottom(node0); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(43, "Object#Key"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // FALSE Object#Key does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test125() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(42, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // THIS does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test126() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(41, node0, node0, node0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test127() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newNumber((-37.42955614)); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // NUMBER -37.42955614 does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test128() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(37, "com.google.javascript.rhino.head.Node$PropListItem"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test129() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(36, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 36 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test130() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(30, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // NEW does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test131() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(29, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // NEG : number does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test132() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); Scope scope0 = Scope.createLatticeBottom(node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(28, "<LWVAKiJlW8"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test133() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createGlobalScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(27, "k"); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test134() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(25, "k"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // MOD k : number does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test135() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); Scope scope0 = Scope.createLatticeBottom(node0); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = Node.newString(24, "Object#Element"); FlowScope flowScope0 = typeInference0.createEntryLattice(); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // DIV Object#Element : number does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test136() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createLatticeBottom(node0); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice((Scope) null); Node node1 = new Node(23, node0, node0, node0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test137() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(22, ""); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // SUB : number does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test138() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(21, "<LWVAKiJlW8"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test139() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("dk"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Node node1 = new Node(20, node0, 16, 49); Scope scope0 = Scope.createLatticeBottom(node1); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test140() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createGlobalScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(19, "Object#Element"); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // RSH Object#Element : number does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test141() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(17, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // GE : boolean does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test142() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("dk"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createGlobalScope(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(15, "dk"); Node node2 = StatementFusion.fuseExpressionIntoExpression(node1, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node2, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // COMMA 1 [source_file: com.google.javascript.rhino.Node$ObjectPropListItem@0000000969] : ? does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test143() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(14, node0, node0, 115, 146); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // LT 115 : boolean does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test144() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("0"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = new Node(12, node0, node0, node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test145() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(8, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 8 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test146() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(7, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 7 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test147() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("NzG"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); Scope scope0 = Scope.createLatticeBottom(node0); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(6, node0); FlowScope flowScope0 = typeInference0.flowThrough(node1, linkedFlowScope0); assertNotSame(flowScope0, linkedFlowScope0); } @Test(timeout = 4000) public void test148() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); Node node1 = new Node(5, node0, node0, node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalStateException"); // } catch(IllegalStateException e) { // // // // 5 // // // verifyException("com.google.javascript.rhino.Token", e); // } } @Test(timeout = 4000) public void test149() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); Node node1 = Node.newString(4, "Object#Key"); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); FlowScope flowScope0 = typeInference0.createEntryLattice(); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, flowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // RETURN Object#Key does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test150() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ControlFlowGraph.Branch controlFlowGraph_Branch0 = ControlFlowGraph.Branch.ON_FALSE; controlFlowGraph0.connectToImplicitReturn(node0, controlFlowGraph_Branch0); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node0, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // SCRIPT 1 [synthetic: com.google.javascript.rhino.Node$IntPropListItem@0000000617] [source_file: com.google.javascript.rhino.Node$ObjectPropListItem@0000000618] [input_id: com.google.javascript.rhino.Node$ObjectPropListItem@0000000619] does not have a condition. // // // verifyException("com.google.javascript.jscomp.NodeUtil", e); // } } @Test(timeout = 4000) public void test151() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ControlFlowGraph.Branch controlFlowGraph_Branch0 = ControlFlowGraph.Branch.ON_TRUE; controlFlowGraph0.connectToImplicitReturn(node0, controlFlowGraph_Branch0); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node0, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // SCRIPT 1 [synthetic: com.google.javascript.rhino.Node$IntPropListItem@0000000617] [source_file: com.google.javascript.rhino.Node$ObjectPropListItem@0000000618] [input_id: com.google.javascript.rhino.Node$ObjectPropListItem@0000000619] does not have a condition. // // // verifyException("com.google.javascript.jscomp.NodeUtil", e); // } } @Test(timeout = 4000) public void test152() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseSyntheticCode("t", "t"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ControlFlowGraph.Branch controlFlowGraph_Branch0 = ControlFlowGraph.Branch.UNCOND; controlFlowGraph0.connectToImplicitReturn(node0, controlFlowGraph_Branch0); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); List<FlowScope> list0 = typeInference0.branchedFlowThrough(node0, linkedFlowScope0); assertEquals(1, list0.size()); } @Test(timeout = 4000) public void test153() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); FlowScope flowScope0 = typeInference0.createInitialEstimateLattice(); List<FlowScope> list0 = typeInference0.branchedFlowThrough(node0, flowScope0); assertTrue(list0.isEmpty()); } @Test(timeout = 4000) public void test154() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); JSTypeRegistry jSTypeRegistry0 = compiler0.getTypeRegistry(); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(100, node0, node0, node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // OR does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test155() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, false); Scope scope0 = Scope.createLatticeBottom(node0); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = Node.newString(86, "k"); ReverseAbstractInterpreter reverseAbstractInterpreter0 = compiler0.getReverseAbstractInterpreter(); JSTypeNative jSTypeNative0 = JSTypeNative.NUMBER_STRING_BOOLEAN; CodingConvention.AssertionFunctionSpec codingConvention_AssertionFunctionSpec0 = new CodingConvention.AssertionFunctionSpec(" r.:h2So", jSTypeNative0); ImmutableSortedMap<String, CodingConvention.AssertionFunctionSpec> immutableSortedMap0 = ImmutableSortedMap.of("YPO)I&tji,K4", codingConvention_AssertionFunctionSpec0, "Object#Key", codingConvention_AssertionFunctionSpec0, "?}lIy8[u Bk#xp8KCl", codingConvention_AssertionFunctionSpec0, "com.google.javascript.jscomp.TypeInference$BooleanOutcomePair", codingConvention_AssertionFunctionSpec0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, reverseAbstractInterpreter0, scope0, immutableSortedMap0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("com.google.javascript.jscomp.TypeInference", e); // } } @Test(timeout = 4000) public void test156() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, false, true); ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention(); SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true); ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, jSTypeRegistry0); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, closureReverseAbstractInterpreter0, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(63, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // ARRAYLIT : Array does not exist in graph // // // verifyException("com.google.javascript.jscomp.graph.Graph", e); // } } @Test(timeout = 4000) public void test157() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = compiler0.parseTestCode("k"); ControlFlowGraph<Node> controlFlowGraph0 = new ControlFlowGraph<Node>(node0, true, true); Scope scope0 = Scope.createLatticeBottom(node0); TypeInference typeInference0 = new TypeInference(compiler0, controlFlowGraph0, (ReverseAbstractInterpreter) null, scope0, (Map<String, CodingConvention.AssertionFunctionSpec>) null); LinkedFlowScope linkedFlowScope0 = LinkedFlowScope.createEntryLattice(scope0); Node node1 = new Node(33, node0, node0, node0, node0); // Undeclared exception! // try { typeInference0.branchedFlowThrough(node1, linkedFlowScope0); // fail("Expecting exception: UnsupportedOperationException"); // } catch(UnsupportedOperationException e) { // // // // SCRIPT 1 [synthetic: com.google.javascript.rhino.Node$IntPropListItem@0000000617] [source_file: com.google.javascript.rhino.Node$ObjectPropListItem@0000000618] [input_id: com.google.javascript.rhino.Node$ObjectPropListItem@0000000619] is not a string node // // // verifyException("com.google.javascript.rhino.Node", e); // } } }
10fa5a73b35acfbe080150ace42f1f71a52560f9
2b9e332e6c0d2fc1dd321d1995b00e67cd60d103
/android/src/ru/geekbrains/zsa/game/AndroidLauncher.java
4cd7acf08eba9fe4b6cee8507881e813bd6196c4
[]
no_license
PaulFrere/SpaceBattle
1ac4e74c62850caa80e9cb0864a3f4deb09582b4
87f88f6d9c381da7bb95bdb463a6ce177bcb26b3
refs/heads/master
2023-03-30T22:54:20.359465
2021-04-02T06:58:37
2021-04-02T06:58:37
304,032,720
0
0
null
2021-04-02T06:58:38
2020-10-14T13:59:43
Java
UTF-8
Java
false
false
524
java
package ru.geekbrains.zsa.game; import android.os.Bundle; import com.badlogic.gdx.backends.android.AndroidApplication; import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; import ru.geekbrains.zsa.SpaceBattle; public class AndroidLauncher extends AndroidApplication { @Override protected void onCreate (Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); initialize(new SpaceBattle(), config); } }
d30190b96c83a6f4069260f8ede5d5a5ce1ee704
dd17fef23d94f0eb52dcdb53c7805b5d712d2ff1
/Properties.java
2b300ada6d2dacbb735fe0f2af0cf91de318be2a
[]
no_license
gsfk/Analogy_java
457982874319d8f5846111694eff2ae46530498c
7c922022944bdebf41332126d43e3c214e021aa4
refs/heads/master
2021-01-10T23:48:45.382960
2016-10-17T01:14:26
2016-10-17T01:14:26
70,094,405
0
0
null
null
null
null
UTF-8
Java
false
false
211
java
public enum Properties { ASSOCIATIVITY, COMMUTATIVITY, CLOSURE, LEFT_IDENTITY_LEFT_INVERSE, RIGHT_IDENTITY_LEFT_INVERSE, LEFT_IDENTITY_RIGHT_INVERSE, RIGHT_IDENTITY_RIGHT_INVERSE, }
ec8b5f9d8de4e72a09cf9796dfccb84573a5cf65
f46c3c059d274f9125b5ddf706e050f25f8fcc6d
/cmfz_fjq/src/main/java/com/baizhi/controller/MenuController.java
f5090536c807e758cbfcb0cb2c2bf9426170bdc1
[]
no_license
gitissosogood/cmfz
bcdd12cab2807acc81671ad3d125136e06537d7a
4304b90924c5ef9610187a3daa3ecab31741f51c
refs/heads/master
2020-05-16T18:27:51.741811
2019-04-24T12:34:43
2019-04-24T12:34:43
183,225,487
0
0
null
null
null
null
UTF-8
Java
false
false
645
java
package com.baizhi.controller; import com.baizhi.entity.Menu; import com.baizhi.service.MenuService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import java.util.List; import java.util.Map; @Controller @RequestMapping("menu") public class MenuController { @Autowired private MenuService menuService; @RequestMapping("queryAll") public String queryAll(Map map) { List<Menu> menuList = menuService.queryAll(); map.put("menuList", menuList); return "main/main"; } }