blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
listlengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
49cd8f385f1d8009ecf1086f261430879db876dc
|
a96f4e8c2084412bb78506c839787f4930f8efcf
|
/servicetalk-serializer-api/src/main/java/io/servicetalk/serializer/api/Deserializer.java
|
e8ee16120515f3c63da78cb61b05d9e3479b49de
|
[
"Apache-2.0"
] |
permissive
|
apple/servicetalk
|
cf29968c749cbaf5cdf040cb18a8e95b26fb0097
|
670cc9350b84bc24499b7bcea2d15dfeda996d16
|
refs/heads/main
| 2023-08-31T00:47:44.427125 | 2023-08-30T20:57:45 | 2023-08-30T20:57:45 | 147,747,963 | 918 | 168 |
Apache-2.0
| 2023-09-14T18:27:09 | 2018-09-07T00:14:48 |
Java
|
UTF-8
|
Java
| false | false | 1,608 |
java
|
/*
* Copyright © 2021 Apple Inc. and the ServiceTalk project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.servicetalk.serializer.api;
import io.servicetalk.buffer.api.Buffer;
import io.servicetalk.buffer.api.BufferAllocator;
/**
* Deserialize objects from {@link Buffer} to {@link T}.
* @param <T> The type of objects that can be deserialized.
*/
@FunctionalInterface
public interface Deserializer<T> {
/**
* Deserialize the contents from the {@link Buffer} parameter.
* <p>
* The caller is responsible for assuming the buffer contents contains enough {@link Buffer#readableBytes()} to
* successfully deserialize.
* @param serializedData {@link Buffer} whose {@link Buffer#readableBytes()} contains a serialized object. The
* {@link Buffer#readerIndex()} will be advanced to indicate the content which has been consumed.
* @param allocator Used to allocate intermediate {@link Buffer}s if required.
* @return The result of the deserialization.
*/
T deserialize(Buffer serializedData, BufferAllocator allocator);
}
|
[
"[email protected]"
] | |
e18049078096a53b0b7bf0b8413f10d438ac67f8
|
cfa46c58b75ae523dea0f0cb352a3afa7e71ae98
|
/v0.24/fonte/src/argouml-app/src/org/argouml/uml/cognitive/critics/CrAssocNameConflict.java
|
adbf40e7b31ed4baa78afbb2388707a58fb1eda6
|
[
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive"
] |
permissive
|
pichiliani/CoArgoUML
|
8adc0d167ddf81f2af1139a33a9609b96b6cdf0b
|
bd0810c225dc1d02136c9fedc52cf8b90e0d5bc1
|
refs/heads/master
| 2021-01-13T01:45:25.487103 | 2012-11-28T18:38:40 | 2012-11-28T18:38:40 | 6,907,156 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,638 |
java
|
// $Id: CrAssocNameConflict.java 12950 2007-07-01 08:10:04Z tfmorris $
// Copyright (c) 1996-2006 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph appear in all copies. This software program and
// documentation are copyrighted by The Regents of the University of
// California. The software program and documentation are supplied "AS
// IS", without any accompanying services from The Regents. The Regents
// does not warrant that the operation of the program will be
// uninterrupted or error-free. The end-user understands that the program
// was developed for research purposes and is advised not to rely
// exclusively on the program for any reason. IN NO EVENT SHALL THE
// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
package org.argouml.uml.cognitive.critics;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import org.argouml.cognitive.Critic;
import org.argouml.cognitive.Designer;
import org.argouml.cognitive.ListSet;
import org.argouml.cognitive.ToDoItem;
import org.argouml.model.Model;
import org.argouml.uml.cognitive.UMLDecision;
import org.argouml.uml.cognitive.UMLToDoItem;
/**
* Well-formedness rule [2] for Namespace. See section 2.5.3.26 of
* UML 1.4 spec. Rule [1] is checked by CrNameConfusion.
*
* @author mkl
*/
public class CrAssocNameConflict extends CrUML {
/**
* The constructor.
*
*/
public CrAssocNameConflict() {
setupHeadAndDesc();
addSupportedDecision(UMLDecision.NAMING);
setKnowledgeTypes(Critic.KT_SYNTAX);
// no good trigger
}
/*
* @see org.argouml.uml.cognitive.critics.CrUML#predicate2(
* java.lang.Object, org.argouml.cognitive.Designer)
*/
public boolean predicate2(Object dm, Designer dsgr) {
return computeOffenders(dm).size() > 1;
}
/*
* @see org.argouml.cognitive.critics.Critic#toDoItem( java.lang.Object,
* org.argouml.cognitive.Designer)
*/
public ToDoItem toDoItem(Object dm, Designer dsgr) {
ListSet offs = computeOffenders(dm);
return new UMLToDoItem(this, offs, dsgr);
}
/**
* @param dm
* the object to check
* @return the set of offenders
*/
protected ListSet computeOffenders(Object dm) {
ListSet offenderResult = new ListSet();
if (Model.getFacade().isANamespace(dm)) {
HashMap<String, Object> names = new HashMap<String, Object>();
for (Object name1Object : Model.getFacade().getOwnedElements(dm)) {
if (!Model.getFacade().isAAssociation(name1Object)) {
continue;
}
String name = Model.getFacade().getName(name1Object);
Collection typ1 = getAllTypes(name1Object);
if (name == null || "".equals(name)) {
continue;
}
if (names.containsKey(name)) {
Object offender = names.get(name);
Collection typ2 = getAllTypes(offender);
if (typ1.containsAll(typ2) && typ2.containsAll(typ1)) {
if (!offenderResult.contains(offender)) {
offenderResult.add(offender);
}
offenderResult.add(name1Object);
}
}
names.put(name, name1Object);
}
}
return offenderResult;
}
/*
* @see org.argouml.cognitive.Poster#stillValid(
* org.argouml.cognitive.ToDoItem, org.argouml.cognitive.Designer)
*/
@Override
public boolean stillValid(ToDoItem i, Designer dsgr) {
if (!isActive()) {
return false;
}
ListSet offs = i.getOffenders();
// first element is e.g. the class, but we need to have its namespace
// to recompute the offenders.
Object f = offs.get(0);
Object ns = Model.getFacade().getNamespace(f);
if (!predicate(ns, dsgr)) {
return false;
}
ListSet newOffs = computeOffenders(ns);
boolean res = offs.equals(newOffs);
return res;
}
public Collection getAllTypes(Object assoc) {
Set list = new HashSet();
if (assoc == null) {
return list;
}
Collection assocEnds = Model.getFacade().getConnections(assoc);
if (assocEnds == null) {
return list;
}
for (Object element : assocEnds) {
if (Model.getFacade().isAAssociationEnd(element)) {
Object type = Model.getFacade().getType(element);
list.add(type);
}
}
return list;
}
}
|
[
"[email protected]"
] | |
1c8fa536fa6378a10dd02af5414c90ae649420a2
|
091a2336cd35315afcc684222eed0651b9c67b0f
|
/src/main/java/org/gradle/profiler/BuildInvocationResult.java
|
388e514c70f2b76b49760d0cbede98c2a65aa864
|
[
"Apache-2.0"
] |
permissive
|
Vinzhuo/gradle-profiler
|
abcda869afe7afb69a9010eabd2966040e515ea6
|
c4da173bcde8e2a3e2cf4a2b75301b41f49a4202
|
refs/heads/master
| 2021-09-07T21:56:46.344062 | 2018-03-01T17:07:51 | 2018-03-01T17:07:51 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 648 |
java
|
package org.gradle.profiler;
import java.time.Duration;
class BuildInvocationResult {
private final String displayName;
private final Duration executionTime;
private final String daemonPid;
public BuildInvocationResult(String displayName, Duration executionTime, String daemonPid) {
this.displayName = displayName;
this.executionTime = executionTime;
this.daemonPid = daemonPid;
}
public String getDisplayName() {
return displayName;
}
public Duration getExecutionTime() {
return executionTime;
}
public String getDaemonPid() {
return daemonPid;
}
}
|
[
"[email protected]"
] | |
849667b4c8bd5f7eb82395f63904b64026bfe487
|
8baa06836f79eefe2d05caff7a9ca9f055e57c9f
|
/ohShitITSATEST/src/main/java/com/vradiuse/dbManager/database/Session.java
|
97a759640b8dbd5be8a1dcd70fbeccbb63ef9bf8
|
[] |
no_license
|
Gribiwe/my-bottomless-pit
|
8df11ecc6b306c1007402293c1d97238f2981648
|
98c7109af0f276025987cd3f46e16555754cf8c5
|
refs/heads/master
| 2020-03-22T22:49:33.955820 | 2018-07-12T23:11:56 | 2018-07-12T23:11:56 | 140,772,662 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 813 |
java
|
package com.vradiuse.dbManager.database;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.UUID;
@Entity
@Table(name = "session")
@Getter
@Setter
@NoArgsConstructor
public class Session {
@Id
@GenericGenerator(name = "uuid-gen", strategy = "uuid2")
@GeneratedValue(generator = "uuid-gen")
@Column(name = "SESSION_ID", nullable = false, updatable = false)
private UUID id;
@Column(name = "CREATED", nullable = false)
private Timestamp started;
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "PERSON_ID")
private Person personId;
@Column(name = "STATUS", nullable = false)
private boolean status;
}
|
[
"[email protected]"
] | |
f5d51912eaaeb3a852afb1bcb702ced6896273e5
|
84ae3919b45d6547c4dfb9c24fd5a0d2b91bb242
|
/src/main/java/com/yaoyili/controller/ao/ResultBean.java
|
29171edd698c6eab5175ed15a27e61108e259d54
|
[] |
no_license
|
yaoyili123/music-server
|
98b94ebe3122df385380772d533a1f7c9fff2896
|
2865c071eb85716d885107e739a0fdb9506a55b3
|
refs/heads/master
| 2022-05-30T15:23:44.004472 | 2020-08-04T09:54:42 | 2020-08-04T09:54:42 | 220,145,136 | 0 | 0 | null | 2022-05-20T21:15:10 | 2019-11-07T03:38:14 |
Java
|
UTF-8
|
Java
| false | false | 666 |
java
|
package com.yaoyili.controller.ao;
import lombok.Data;
import lombok.NoArgsConstructor;
/*用于业务逻辑API响应*/
@Data
@NoArgsConstructor
public class ResultBean<T> {
public static final int SUCCESS = 0;
public static final int FAIL = 1;
public static final int NO_PERMISSION = 2;
public static final int CHECK_ERROR = 3;
private int code = 0;
private int total;
private String msg = "success";
private T data;
public ResultBean(T data) {
super();
this.data = data;
}
public ResultBean(Throwable e) {
super();
this.msg = e.toString();
this.code = FAIL;
}
}
|
[
"[email protected]"
] | |
840f5e77e2cac2961bd7a432f368ec72278189d2
|
6a42d702dd5c1d10f921a55eb3cbf63857367409
|
/src/main/java/com/namkyujin/sbl/Application.java
|
a8c16fb288f260dcaf418cb2bee354cba5b0998c
|
[] |
no_license
|
iamkyu/hello-spring-logging
|
c55f84a9349d6f1b8bf17298c577287edb3ef51c
|
bb3f6644b677d8116c1d0da39e5147d32b57f939
|
refs/heads/master
| 2023-01-21T11:32:07.906722 | 2020-12-01T12:36:00 | 2020-12-01T12:36:00 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,264 |
java
|
package com.namkyujin.sbl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Component;
@SpringBootApplication
public class Application {
static final String ERROR_MESSAGE = "Hello World1";
static final String WARN_MESSAGE = "Hello World2";
static final String INFO_MESSAGE = "Hello World3";
static final String DEBUG_MESSAGE = "Hello World4";
static final String TRACE_MESSAGE = "Hello World5";
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Component
public static class CustomApplicationRunner implements ApplicationRunner {
private final Logger LOG = LoggerFactory.getLogger(this.getClass());
@Override
public void run(ApplicationArguments args) throws Exception {
LOG.error(ERROR_MESSAGE);
LOG.warn(WARN_MESSAGE);
LOG.info(INFO_MESSAGE);
LOG.debug(DEBUG_MESSAGE);
LOG.trace(TRACE_MESSAGE);
}
}
}
|
[
"[email protected]"
] | |
67fb25322499e26af85cf9b83487fefb6966b000
|
1ee7889cbc97b1ede4ef79485d6164c2008c7d50
|
/broceliande/src/main/java/com/windwagon/broceliande/race/entities/Place.java
|
112d68cbc2b21c9a1dc960898ec34c0351932800
|
[] |
no_license
|
l3eegbee/windwagon
|
2d477a89f5b8a64d7548984d52b3304c79285c47
|
fb7cd6a16a398ec207dfe76c88da332b4774f502
|
refs/heads/master
| 2021-01-21T14:16:06.381394 | 2016-10-15T16:55:27 | 2016-10-15T16:55:27 | 59,361,489 | 2 | 1 | null | 2019-03-13T16:07:07 | 2016-05-21T13:33:27 |
Java
|
UTF-8
|
Java
| false | false | 3,665 |
java
|
package com.windwagon.broceliande.race.entities;
import java.util.Comparator;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import com.windwagon.logres.date.LazyDate;
import com.windwagon.logres.getset.Getter;
@Entity
@Table( name = "ww_place" )
public class Place implements Comparable<Place> {
public static final Comparator<Place> COMPARATOR =
Comparator.comparing( Place::getRace ).thenComparing( Place::getNumber ).thenComparing(
Place::getHorse );
@Id
@SequenceGenerator( name = "sequence_id", sequenceName = "ww_sequence_id" )
@GeneratedValue( strategy = GenerationType.SEQUENCE, generator = "sequence_id" )
private Long id;
@ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH } )
@JoinColumn( name = "race" )
private Race race;
private Integer number;
private String distance;
private Integer duration;
private Integer horse;
@Override
public String toString() {
String id = Getter.get( Place::getId ).str( this );
Race race = Getter.get( Place::getRace ).safe( this );
Meeting meeting = Getter.get( Race::getMeeting ).safe( race );
String date = Getter.get( Meeting::getDate ).then( LazyDate::D ).str( meeting );
String mNum = Getter.get( Meeting::getNumber ).str( meeting );
String rNum = Getter.get( Race::getNumber ).str( race );
String pNum = Getter.get( Place::getNumber ).str( this );
String hNum = Getter.get( Place::getHorse ).str( this );
return "place #"
+ id
+ " "
+ date
+ "-"
+ mNum
+ "-"
+ rNum
+ "-"
+ pNum
+ " ("
+ hNum
+ ")";
}
@Override
public int compareTo( Place place ) {
return COMPARATOR.compare( this, place );
}
/**
* @return the id
*/
public Long getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId( Long id ) {
this.id = id;
}
/**
* @return the race
*/
public Race getRace() {
return race;
}
/**
* @param race the race to set
*/
public void setRace( Race race ) {
this.race = race;
}
/**
* @return the number
*/
public Integer getNumber() {
return number;
}
/**
* @param number the number to set
*/
public void setNumber( Integer number ) {
this.number = number;
}
/**
* @return the distance
*/
public String getDistance() {
return distance;
}
/**
* @param distance the distance to set
*/
public void setDistance( String distance ) {
this.distance = distance;
}
/**
* @return the time
*/
public Integer getDuration() {
return duration;
}
/**
* @param time the time to set
*/
public void setDuration( Integer duration ) {
this.duration = duration;
}
/**
* @return the horse
*/
public Integer getHorse() {
return horse;
}
/**
* @param horse the horse to set
*/
public void setHorse( Integer horse ) {
this.horse = horse;
}
}
|
[
"[email protected]"
] | |
444c40842beabfa5c38552c7054e6c4a4affdc79
|
f42af9ece99928b3f069cd6317e65aa26ca45be4
|
/neo4jdemo/src/main/java/me/wlins/neo4jdemo/controller/UserController.java
|
0eecf8fe44c2cd43aba2f5f4605f1d2329b294da
|
[
"MIT"
] |
permissive
|
strawberrylin/craftsman
|
08d1b43811cdeaa1d7c5a4d2f8d01d26c168a7fa
|
fb5952dbd77ed9c5ab18328cf7dc03a1932a1df0
|
refs/heads/master
| 2020-04-10T13:00:08.316759 | 2018-12-11T16:12:41 | 2018-12-11T16:12:41 | 161,036,942 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 688 |
java
|
package me.wlins.neo4jdemo.controller;
import me.wlins.neo4jdemo.entity.User;
import me.wlins.neo4jdemo.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @ClassName UserController
* @Description TODO
* @Author strawberrylin
* @Date 18-12-11 下午11:31
* @Version 1.0
**/
@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
private UserServiceImpl userService;
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public User getUser(@PathVariable long id){
return userService.findById(id);
}
}
|
[
"[email protected]"
] | |
de13cb2764063cfc79f8ca49ad801ea2fc28c514
|
2de34e3c12fc9c1de91723ef1ee51b61ac0bb10b
|
/app/src/main/java/com/example/parstagram/MainActivity.java
|
07df50ff2b4cb76e00e3f28916c499bffa310c28
|
[
"Apache-2.0"
] |
permissive
|
ltx-kt/Parstagram
|
6d3d81938ce77eae5a7f16c1fb33a3e40ac2354a
|
761c77eb83279fcb4064283363f4f6bf4dd3d9d6
|
refs/heads/master
| 2023-08-22T10:57:57.933250 | 2021-10-15T04:59:57 | 2021-10-15T04:59:57 | 415,485,926 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 3,216 |
java
|
package com.example.parstagram;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.FileProvider;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;
import com.example.parstagram.fragments.ComposeFragment;
import com.example.parstagram.fragments.PostsFragment;
import com.example.parstagram.fragments.ProfileFragment;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.parse.FindCallback;
import com.parse.ParseException;
import com.parse.ParseFile;
import com.parse.ParseQuery;
import com.parse.ParseUser;
import com.parse.SaveCallback;
import java.io.File;
import java.util.List;
public class MainActivity extends AppCompatActivity {
public static final String TAG = "MAINACTIVITY";
final FragmentManager fragmentManager = getSupportFragmentManager();
private BottomNavigationView bottomNavigationView;
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_logout, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
ParseUser.logOut();
ParseUser currentUser = ParseUser.getCurrentUser();
goLoginActivity();
return true;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
bottomNavigationView = findViewById(R.id.bottomNavigation);
bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
Fragment fragment;
switch (item.getItemId()) {
case R.id.action_home:
fragment = new PostsFragment();
break;
case R.id.action_compose:
fragment = new ComposeFragment();
break;
case R.id.action_profile:
default:
fragment = new ProfileFragment();
break;
}
fragmentManager.beginTransaction().replace(R.id.flContainer, fragment).commit();
return true;
}
});
// Set default selection
bottomNavigationView.setSelectedItemId(R.id.action_home);
}
private void goLoginActivity() {
Intent i = new Intent(this,LoginActivity.class);
startActivity(i);
finish();
}
}
|
[
"[email protected]"
] | |
b79ec3fcf104c82d51e1a7e1101f639aaaaafe24
|
24beb9cefb088cc9e8ca9bc211efa4419c2532ce
|
/app/src/main/java/com/messoft/gaoqin/wanyiyuan/utils/dialog/HttpDialogUtils.java
|
4847c36dbf96c8eb1c11cf6b5af57ac230fd2618
|
[] |
no_license
|
pengzhaopeng/wohehe
|
15deac32a4a611789c78d0c4def1ae10ea71d0ab
|
9c81b27dee4ee8d255fa024b7ba0b71dfaf1903a
|
refs/heads/master
| 2021-01-08T18:29:59.479189 | 2020-02-21T14:15:57 | 2020-02-21T14:15:57 | 242,106,795 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,022 |
java
|
package com.messoft.gaoqin.wanyiyuan.utils.dialog;
import android.content.Context;
/**
*
* HttpDialog
*/
public class HttpDialogUtils {
/**
* 显示网络请求的dialog
*
* @param context
* @param canceledOnTouchOutside
* @param messageText
*/
public static void showDialog(Context context, boolean canceledOnTouchOutside, String messageText) {
if (context != null) {
CustomWaitDialogUtil.showWaitDialog(context, messageText, canceledOnTouchOutside);
// if (TextUtils.isEmpty(messageText)) {
// //菊花转圈
//// CustomWaitDialogUtil.showWaitDialog(context, canceledOnTouchOutside);
// CustomWaitDialogUtil.showWaitDialog(context, messageText, canceledOnTouchOutside);
// } else {
// //美团转圈(不用)
//// CustomWaitDialogUtil.showWaitDialog(context, canceledOnTouchOutside);
// CustomWaitDialogUtil.showWaitDialog(context, messageText, canceledOnTouchOutside);
// }
}
}
public static void dismissDialog() {
CustomWaitDialogUtil.stopWaitDialog();
}
}
|
[
"[email protected]"
] | |
0fa65418fdc0aaa35925db81894604e36ff718a6
|
3ea897dc3a15164627b1e4f6f7de75d38dd68e6d
|
/src/Line.java
|
d2ceee6b8d75defa9bbd14e9377fb1a18fba6de6
|
[] |
no_license
|
zorzorzor/Problem
|
cdde2ef30ebcd1c02aea7c3755cf8808ce984e68
|
4985a6c24c69ba77acbca0dedf77c0c801eabd37
|
refs/heads/master
| 2020-05-23T01:24:26.580248 | 2017-03-12T16:15:13 | 2017-03-12T16:15:13 | 84,738,431 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,020 |
java
|
public class Line {
//поля
private double k;
private double b;
//конструкторы
Line(){
this.k=0;
this.b=0;
}
Line(double k, double b){
this.k=k;
this.b=b;
}
Line(Point a,Point b){
this.k=(a.getY()-b.getY())/(a.getX()-b.getX());
this.b=a.getY()-this.k*a.getX();
}
//метод возвращает отношения прямой и точки
int RelationPoint(Point p){
int v;
if(p.getY()>this.k*p.getX()+b){
v=1;
}else{
if(p.getY()<this.k*p.getX()+b){
v=-1;
}else{
v=0;
}
}
return v;
}
@Override
public String toString() {
if (this.b>0){
return "y="+this.k+"x+"+this.b;
}else{
if (this.b==0) {
return "y=" + this.k + "x";
}else{
return "y="+this.k+"x"+this.b;
}
}
}
}
|
[
"[email protected]"
] | |
f29f6b971c65b45c0dd8b34c6974e53d0f347d37
|
32ed1a4d6647190da22e1676cc306672268a83fc
|
/web/org/ace/accounting/web/report/BalanceSheetReportExcel.java
|
742463aee08f352519210c9f6f32fd7fcd1d3b29
|
[] |
no_license
|
LifeTeam-TAT/FNI-Life-Accounting
|
0ba87bc8e924fca498490a3d8c8ba94d7efc123d
|
00ef2eeeb73c4ba3da7094fbbe4252ef03fae0aa
|
refs/heads/master
| 2023-04-02T22:44:16.336160 | 2021-04-08T03:11:16 | 2021-04-08T03:11:16 | 355,033,279 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 9,952 |
java
|
package org.ace.accounting.web.report;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.ace.accounting.common.Utils;
import org.ace.accounting.common.utils.BusinessUtil;
import org.ace.accounting.report.balancesheet.BalanceSheetCriteria;
import org.ace.accounting.report.balancesheet.BalanceSheetDTO;
import org.ace.accounting.web.common.ExcelUtils;
import org.ace.java.component.ErrorCode;
import org.ace.java.component.SystemException;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class BalanceSheetReportExcel {
private XSSFWorkbook wb;
// private FormulaEvaluator evaluator ;
public BalanceSheetReportExcel() {
load();
}
private void load() {
try {
InputStream inp = this.getClass().getResourceAsStream("/report-template/Report.xlsx");
wb = new XSSFWorkbook(inp);
} catch (IOException e) {
throw new SystemException(ErrorCode.SYSTEM_ERROR, "Failed to load Report.xlsx tempalte", e);
}
}
public Map<String, List<BalanceSheetDTO>> separateByPaymentChannel(List<BalanceSheetDTO> orderList) {
Map<String, List<BalanceSheetDTO>> map = new LinkedHashMap<String, List<BalanceSheetDTO>>();
if (orderList != null) {
for (BalanceSheetDTO report : orderList) {
if (map.containsKey(report.getAcCode())) {
map.get(report.getAcCode()).add(report);
} else {
List<BalanceSheetDTO> list = new ArrayList<BalanceSheetDTO>();
list.add(report);
map.put(report.getAcCode(), list);
}
}
}
return map;
}
public void generate(OutputStream op, List<BalanceSheetDTO> orderList, BalanceSheetCriteria criteria) {
try {
Sheet sheet = wb.getSheet("Report");
String type = "";
if (criteria.isMonth()) {
type = "Monthly ";
} else {
type = "Date Range ";
}
if (criteria.getReportType().equalsIgnoreCase("B")) {
wb.setSheetName(wb.getSheetIndex("Report"), "BalanceSheet");
type = type.concat("Balance Sheet ");
} else {
wb.setSheetName(wb.getSheetIndex("Report"), "Profit&Loss");
type = type.concat("Profit And Loss ");
}
XSSFCellStyle defaultCellStyle = ExcelUtils.getDefaultCellStyle(wb);
XSSFCellStyle textCellStyle = ExcelUtils.getTextCellStyle(wb);
XSSFCellStyle dateCellStyle = ExcelUtils.getDateCellStyle(wb);
XSSFCellStyle currencyCellStyle = ExcelUtils.getCurrencyCellStyle(wb);
XSSFCellStyle textAlignRightStyle = ExcelUtils.getTextAlignRightStyle(wb);
XSSFCellStyle centerCellStyle = ExcelUtils.getAlignCenterStyle(wb);
XSSFCellStyle textAlignCenterStyle = ExcelUtils.getAlignCenterStyle(wb);
Row row;
Cell cell;
row = sheet.getRow(0);
cell = row.getCell(0);
String branch = "";
String currency = "";
if (criteria.getBranch() == null) {
branch = "All Branches";
} else {
branch = criteria.getBranch().getName();
}
if (criteria.getCurrency() == null) {
currency = "All Currencies";
} else {
currency = criteria.getCurrency().getCurrencyCode();
}
if (criteria.isHomeConverted() && criteria.getCurrency() != null) {
currency = currency + " By Home Currency Converted";
}
row = sheet.getRow(1);
cell = row.createCell(7);
String dateValue = "";
if (criteria.isMonth()) {
dateValue = type + "as at " + Utils.getDateFormatString(BusinessUtil.getBudgetStartDate()) + " To " + Utils.getDateFormatString(BusinessUtil.getBudgetEndDate());
} else {
dateValue = type + "as at " + Utils.getDateFormatString(criteria.getStartDate()) + " To " + Utils.getDateFormatString(criteria.getEndDate());
}
cell.setCellValue(dateValue);
cell.setCellStyle(textAlignCenterStyle);
row = sheet.getRow(2);
cell = row.getCell(1);
cell.setCellValue(branch);
// cell.setCellStyle(defaultCellStyle);
row = sheet.getRow(3);
cell = row.getCell(1);
cell.setCellValue(currency);
// cell.setCellStyle(defaultCellStyle);
// cell = row.createCell(13);
// cell.setCellValue("Date : ");
// cell.setCellStyle(defaultCellStyle);
cell = row.createCell(14);
cell.setCellValue(Utils.getDateFormatString(new Date()));
// cell.setCellStyle(dateCellStyle);
int i = 4;
int index = 0;
for (BalanceSheetDTO report : orderList) {
i = i + 1;
index = index + 1;
row = sheet.createRow(i);
cell = row.createCell(0);
cell.setCellValue(index);
cell.setCellStyle(textCellStyle);
cell = row.createCell(1);
cell.setCellValue(report.getAcCode());
cell.setCellStyle(textCellStyle);
cell = row.createCell(2);
cell.setCellValue(report.getAcName());
cell.setCellStyle(textCellStyle);
cell = row.createCell(3);
if (null != report.getM1()) {
cell.setCellValue(Double.valueOf(report.getM1().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
cell = row.createCell(4);
if (null != report.getM2()) {
cell.setCellValue(Double.valueOf(report.getM2().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
cell = row.createCell(5);
if (null != report.getM3()) {
cell.setCellValue(Double.valueOf(report.getM3().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
cell = row.createCell(6);
if (null != report.getM4()) {
cell.setCellValue(Double.valueOf(report.getM4().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
cell = row.createCell(7);
if (null != report.getM5()) {
cell.setCellValue(Double.valueOf(report.getM5().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
cell = row.createCell(8);
if (null != report.getM6()) {
cell.setCellValue(Double.valueOf(report.getM6().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
cell = row.createCell(9);
if (null != report.getM7()) {
cell.setCellValue(Double.valueOf(report.getM7().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
cell = row.createCell(10);
if (null != report.getM8()) {
cell.setCellValue(Double.valueOf(report.getM8().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
cell = row.createCell(11);
if (null != report.getM9()) {
cell.setCellValue(Double.valueOf(report.getM9().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
cell = row.createCell(12);
if (null != report.getM10()) {
cell.setCellValue(Double.valueOf(report.getM10().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
cell = row.createCell(13);
if (null != report.getM11()) {
cell.setCellValue(Double.valueOf(report.getM11().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
cell = row.createCell(14);
if (null != report.getM12()) {
cell.setCellValue(Double.valueOf(report.getM12().toString()));
cell.setCellStyle(currencyCellStyle);
} else {
cell.setCellValue(0);
cell.setCellStyle(currencyCellStyle);
}
// paymentChannel = report.getPaymentChannel().toString();
}
i = i + 1;
sheet.addMergedRegion(new CellRangeAddress(i, i, 0, 14));
row = sheet.createRow(i);
cell = row.createCell(0);
cell = row.createCell(0);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(1);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(2);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(3);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(4);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(5);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(6);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(7);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(8);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(9);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(10);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(11);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(12);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(13);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
cell = row.createCell(14);
cell.setCellStyle(defaultCellStyle);
cell.setCellValue("-");
wb.setPrintArea(0, 0, 14, 0, i);
wb.write(op);
op.flush();
op.close();
// }
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"[email protected]"
] | |
640323d23bd52013acf9f233a2e2e43a12b34d91
|
41b5626593f86fe60035fdaae236edf2c9352926
|
/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/common/resq/CourseChapterPeriodViewRESQ.java
|
8a7212f6dcead5768d01ef5003ba21c31b8ab4f5
|
[
"MIT"
] |
permissive
|
chenhaoaixuexi/cloudCourse
|
5b662a822108efa70606c06e590870a9aa6dbbe7
|
eafac97da0a08d7a3245aef2a248778d963c1997
|
refs/heads/master
| 2023-04-06T11:30:58.368217 | 2020-04-08T05:10:53 | 2020-04-08T05:10:53 | 253,463,242 | 0 | 0 |
MIT
| 2023-03-27T22:19:49 | 2020-04-06T10:22:05 |
Java
|
UTF-8
|
Java
| false | false | 1,542 |
java
|
package com.roncoo.education.course.common.resq;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 课时信息-查看
*
* @author wujing
*/
@Data
@Accessors(chain = true)
public class CourseChapterPeriodViewRESQ implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty(value = "课时ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 课程ID
*/
@ApiModelProperty(value = "课程ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long courseId;
/**
* 章节ID
*/
@ApiModelProperty(value = "章节ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long chapterId;
/**
* 课时名称
*/
@ApiModelProperty(value = "课时名称")
private String periodName;
/**
* 课时描述
*/
@ApiModelProperty(value = "课时描述")
private String periodDesc;
/**
* 是否免费:1免费,0收费
*/
@ApiModelProperty(value = "是否免费:1免费,0收费")
private Integer isFree;
/**
* 原价
*/
@ApiModelProperty(value = "原价")
private BigDecimal periodOriginal;
/**
* 优惠价
*/
@ApiModelProperty(value = "优惠价")
private BigDecimal periodDiscount;
}
|
[
"[email protected]"
] | |
b44035971fd756e0ebf3c41a4952fc755d971779
|
8609976e42491c0f6efbb9b3bf082a9b204b2f73
|
/src/cn/itcast/shop/adminuser/service/AdminUserService.java
|
7b1b98a4fc4deb262ce2526d5219ab7b0f281924
|
[] |
no_license
|
liyongchang/shop
|
c4e206fdd77c08d90ec5952e299fc1ed456466bf
|
d785a5f3bdfcb76ae53000bb3ea3d25b017d4801
|
refs/heads/master
| 2021-01-19T04:34:39.512576 | 2016-07-11T07:34:21 | 2016-07-11T07:34:21 | 63,044,881 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 496 |
java
|
package cn.itcast.shop.adminuser.service;
import cn.itcast.shop.adminuser.dao.AdminUserDao;
import cn.itcast.shop.adminuser.vo.AdminUser;
import org.springframework.transaction.annotation.Transactional;
@Transactional
public class AdminUserService {
// 注入Dao
private AdminUserDao adminUserDao;
public void setAdminUserDao(AdminUserDao adminUserDao) {
this.adminUserDao = adminUserDao;
}
public AdminUser login(AdminUser adminUser) {
return adminUserDao.login(adminUser);
}
}
|
[
"[email protected]"
] | |
8ece68e8d12994e154812e2cc73a52e5f8f11d0c
|
f9672ff8d88cad7f6c0da1df76bada7369cce699
|
/shared_resources/src/main/java/com/thewizrd/shared_resources/utils/VersionMigrations.java
|
8f9d01f7c34a0adc494acc56825aefbd2ad9376c
|
[
"Apache-2.0"
] |
permissive
|
sengeiou/SimpleWeather-Android
|
bdf5460d7e4fb44f3b01878dcbf2469fbadb3c5d
|
e17877b4a27000b95563a7686e0f299fdffe2102
|
refs/heads/master
| 2021-05-26T04:05:47.720316 | 2020-03-22T20:27:16 | 2020-03-22T20:27:16 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,463 |
java
|
package com.thewizrd.shared_resources.utils;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.os.Bundle;
import android.util.Log;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.thewizrd.shared_resources.BuildConfig;
import com.thewizrd.shared_resources.SimpleLibrary;
import com.thewizrd.shared_resources.database.LocationsDatabase;
import com.thewizrd.shared_resources.database.WeatherDatabase;
import com.thewizrd.shared_resources.locationdata.LocationData;
import com.thewizrd.shared_resources.weatherdata.WeatherAPI;
import com.thewizrd.shared_resources.weatherdata.WeatherManager;
class VersionMigrations {
static void performMigrations(final WeatherDatabase weatherDB, final LocationsDatabase locationDB) {
Context context = SimpleLibrary.getInstance().getAppContext();
long versionCode = 0;
try {
PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
versionCode = packageInfo.versionCode;
} catch (Exception e) {
Logger.writeLine(Log.DEBUG, e);
}
if (Settings.isWeatherLoaded() && Settings.getVersionCode() < versionCode) {
// v1.3.7 - Yahoo (YQL) is no longer in service
// Update location data from HERE Geocoder service
if (WeatherAPI.HERE.equals(Settings.getAPI()) && Settings.getVersionCode() < 271370400) {
if (Settings.IS_PHONE) {
DBUtils.setLocationData(locationDB, WeatherAPI.HERE);
Settings.saveLastGPSLocData(new LocationData());
} else if (Settings.getLastGPSLocData() != null) {
WeatherManager.getProvider(WeatherAPI.HERE)
.updateLocationData(Settings.getLastGPSLocData());
}
}
// v1.3.8+ - Yahoo API is back in service (but updated)
// Update location data from current geocoder service
if (WeatherAPI.YAHOO.equals(Settings.getAPI()) && Settings.getVersionCode() < 271380000) {
if (Settings.IS_PHONE) {
DBUtils.setLocationData(locationDB, WeatherAPI.YAHOO);
Settings.saveLastGPSLocData(new LocationData());
} else if (Settings.getLastGPSLocData() != null) {
WeatherManager.getProvider(WeatherAPI.YAHOO)
.updateLocationData(Settings.getLastGPSLocData());
}
}
// v1.3.8+
if (Settings.getVersionCode() < 271380100) {
// Added Onboarding Wizard
Settings.setOnBoardingComplete(true);
// The current WeatherUnderground API is no longer in service
// Disable this provider and migrate to HERE
if (WeatherAPI.WEATHERUNDERGROUND.equals(Settings.getAPI())) {
// Set default API to HERE
Settings.setAPI(WeatherAPI.HERE);
WeatherManager wm = WeatherManager.getInstance();
wm.updateAPI();
if (wm.isKeyRequired() && StringUtils.isNullOrWhitespace(wm.getAPIKey())) {
// If (internal) key doesn't exist, fallback to Yahoo
Settings.setAPI(WeatherAPI.YAHOO);
wm.updateAPI();
Settings.setPersonalKey(true);
Settings.setKeyVerified(false);
} else {
// If key exists, go ahead
Settings.setPersonalKey(false);
Settings.setKeyVerified(true);
}
if (Settings.IS_PHONE) {
DBUtils.setLocationData(locationDB, WeatherAPI.HERE);
Settings.saveLastGPSLocData(new LocationData());
} else if (Settings.getLastGPSLocData() != null) {
WeatherManager.getProvider(WeatherAPI.HERE)
.updateLocationData(Settings.getLastGPSLocData());
}
}
}
// v3.0.0+
if (Settings.getVersionCode() < 293000000) {
// Update Met.no and OWM to use LocationIQ
final String API = Settings.getAPI();
if (WeatherAPI.METNO.equals(API) || WeatherAPI.OPENWEATHERMAP.equals(API)) {
if (Settings.IS_PHONE) {
DBUtils.setLocationData(locationDB, API);
Settings.saveLastGPSLocData(new LocationData());
} else if (Settings.getLastGPSLocData() != null) {
WeatherManager.getProvider(API)
.updateLocationData(Settings.getLastGPSLocData());
}
}
}
if (!BuildConfig.DEBUG) {
FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(context);
Bundle bundle = new Bundle();
bundle.putString("API", Settings.getAPI());
bundle.putString("API_IsInternalKey", Boolean.toString(!Settings.usePersonalKey()));
mFirebaseAnalytics.logEvent("App_Upgrading", bundle);
}
}
if (versionCode > 0) Settings.setVersionCode(versionCode);
}
}
|
[
"[email protected]"
] | |
0dbb527bb4ebc7f5e3ce7b04b2c0f71b08884779
|
0f4ddaa3436356da11ae0a5e18d5b7cddc074fd8
|
/hamcrest-source/src/com/jiabb/hancrest/internal/SelfDescribingValueIterator.java
|
1254dd94113cd3eb25de51d308cb88b43f50e9a4
|
[] |
no_license
|
nicai20098/OfficialAccountDemo
|
46b5238bf08f9380692e23652342c1ce1f474ccc
|
d29ac359f23cbf44ba53ae78ec0c767d34331b69
|
refs/heads/master
| 2023-02-05T05:04:40.994638 | 2020-11-22T14:04:36 | 2020-11-22T14:04:36 | 305,987,997 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 817 |
java
|
package com.jiabb.hancrest.internal;
import com.jiabb.hancrest.SelfDescribing;
import java.util.Iterator;
/**
* @author jiabinbin
* @date 2020/11/21 2:13 下午
* @classname SelfDescribingValueIterator
* @description SelfDescribing的迭代器对象
*/
public class SelfDescribingValueIterator<T> implements Iterator<SelfDescribing> {
private Iterator<T> values;
/**
* 构造方法进行初始化
* @param values
*/
public SelfDescribingValueIterator(Iterator<T> values) {
this.values = values;
}
@Override
public boolean hasNext() {
return values.hasNext();
}
@Override
public SelfDescribing next() {
return new SelfDescribingValue(values.next());
}
@Override
public void remove() {
values.remove();
}
}
|
[
"[email protected]"
] | |
9555d47c68e91cc5523e521563de994f6ef17271
|
516cd65b5d81dfc9ad24f292ebd07d11d36ae083
|
/app/src/main/res/drawable/ecommerce/ActivityMenuDetail.java
|
913e133c025a543f589b6cbbca04d3146fe751b2
|
[] |
no_license
|
iamrahulyadav/CariKado
|
b9b2165fa49a5746d4ac0b93d395a2b43a5d1dc0
|
604fd1af1f33fb929582dd6d237803445fe28fbf
|
refs/heads/master
| 2020-03-30T14:21:47.851568 | 2018-02-17T03:33:45 | 2018-02-17T03:33:45 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 10,680 |
java
|
package com.solodroid.ecommerce;
import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.database.SQLException;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.AsyncTask;
import android.os.Bundle;
import android.text.InputFilter;
import android.text.InputType;
import android.util.DisplayMetrics;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.ScrollView;
import android.widget.TextView;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.HttpConnectionParams;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.text.DecimalFormat;
public class ActivityMenuDetail extends Activity {
ImageView imgPreview;
TextView txtText, txtSubText;
WebView txtDescription;
Button btnAdd;
ScrollView sclDetail;
ProgressBar prgLoading;
TextView txtAlert;
// declare dbhelper object
static DBHelper dbhelper;
// declare ImageLoader object
ImageLoader imageLoader;
// declare variables to store menu data
String Menu_image, Menu_name, Menu_serve, Menu_description;
double Menu_price;
int Menu_quantity;
long Menu_ID;
String MenuDetailAPI;
int IOConnect = 0;
// create price format
DecimalFormat formatData = new DecimalFormat("#.##");
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.menu_detail);
ActionBar bar = getActionBar();
bar.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.header)));
bar.setTitle("Detail Menu");
bar.setDisplayHomeAsUpEnabled(true);
bar.setHomeButtonEnabled(true);
imgPreview = (ImageView) findViewById(R.id.imgPreview);
txtText = (TextView) findViewById(R.id.txtText);
txtSubText = (TextView) findViewById(R.id.txtSubText);
txtDescription = (WebView) findViewById(R.id.txtDescription);
btnAdd = (Button) findViewById(R.id.btnAdd);
//btnShare = (Button) findViewById(R.id.btnShare);
sclDetail = (ScrollView) findViewById(R.id.sclDetail);
prgLoading = (ProgressBar) findViewById(R.id.prgLoading);
txtAlert = (TextView) findViewById(R.id.txtAlert);
// get screen device width and height
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
int wPix = dm.widthPixels;
int hPix = wPix / 2 + 50;
// change menu image width and height
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(wPix, hPix);
imgPreview.setLayoutParams(lp);
imageLoader = new ImageLoader(com.solodroid.ecommerce.ActivityMenuDetail.this);
dbhelper = new DBHelper(this);
// get menu id that sent from previous page
Intent iGet = getIntent();
Menu_ID = iGet.getLongExtra("menu_id", 0);
// Menu detail API url
MenuDetailAPI = Constant.MenuDetailAPI+"?accesskey="+Constant.AccessKey+"&menu_id="+Menu_ID;
// call asynctask class to request data from server
new getDataTask().execute();
// event listener to handle add button when clicked
btnAdd.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
// TODO Auto-generated method stub
// show input dialog
inputDialog();
}
});
}
@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_detail, 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.
switch (item.getItemId()) {
case R.id.cart:
// refresh action
Intent iMyOrder = new Intent(com.solodroid.ecommerce.ActivityMenuDetail.this, ActivityCart.class);
startActivity(iMyOrder);
overridePendingTransition (R.anim.open_next, R.anim.close_next);
return true;
case android.R.id.home:
// app icon in action bar clicked; go home
this.finish();
overridePendingTransition(R.anim.open_main, R.anim.close_next);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
// method to show number of order form
void inputDialog(){
// open database first
try{
dbhelper.openDataBase();
}catch(SQLException sqle){
throw sqle;
}
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle(R.string.order);
alert.setMessage(R.string.number_order);
alert.setCancelable(false);
final EditText edtQuantity = new EditText(this);
int maxLength = 3;
edtQuantity.setFilters(new InputFilter[] {new InputFilter.LengthFilter(maxLength)});
edtQuantity.setInputType(InputType.TYPE_CLASS_NUMBER);
alert.setView(edtQuantity);
alert.setPositiveButton("Add", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
String temp = edtQuantity.getText().toString();
int quantity = 0;
// when add button clicked add menu to order table in database
if(!temp.equalsIgnoreCase("")){
quantity = Integer.parseInt(temp);
if(dbhelper.isDataExist(Menu_ID)){
dbhelper.updateData(Menu_ID, quantity, (Menu_price*quantity));
}else{
dbhelper.addData(Menu_ID, Menu_name, quantity, (Menu_price*quantity));
}
}else{
dialog.cancel();
}
}
});
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
// when cancel button clicked close dialog
dialog.cancel();
}
});
alert.show();
}
// asynctask class to handle parsing json in background
public class getDataTask extends AsyncTask<Void, Void, Void> {
// show progressbar first
getDataTask(){
if(!prgLoading.isShown()){
prgLoading.setVisibility(0);
txtAlert.setVisibility(8);
}
}
@Override
protected Void doInBackground(Void... arg0) {
// TODO Auto-generated method stub
// parse json data from server in background
parseJSONData();
return null;
}
@Override
protected void onPostExecute(Void result) {
// TODO Auto-generated method stub
// when finish parsing, hide progressbar
prgLoading.setVisibility(8);
// if internet connection and data available show data
// otherwise, show alert text
if((Menu_name != null) && IOConnect == 0){
sclDetail.setVisibility(0);
imageLoader.DisplayImage(Constant.AdminPageURL+Menu_image, imgPreview);
txtText.setText(Menu_name);
txtSubText.setText("Price : " +Menu_price+" "+ com.solodroid.ecommerce.ActivityMenuList.Currency+"\n"+"Status : "+Menu_serve+"\n"+"Stock : "+Menu_quantity);
txtDescription.loadDataWithBaseURL("", Menu_description, "text/html", "UTF-8", "");
txtDescription.setBackgroundColor(Color.parseColor("#e7e7e7"));
}else{
txtAlert.setVisibility(0);
}
}
}
// method to parse json data from server
public void parseJSONData(){
try {
// request data from menu detail API
HttpClient client = new DefaultHttpClient();
HttpConnectionParams.setConnectionTimeout(client.getParams(), 15000);
HttpConnectionParams.setSoTimeout(client.getParams(), 15000);
HttpUriRequest request = new HttpGet(MenuDetailAPI);
HttpResponse response = client.execute(request);
InputStream atomInputStream = response.getEntity().getContent();
BufferedReader in = new BufferedReader(new InputStreamReader(atomInputStream));
String line;
String str = "";
while ((line = in.readLine()) != null){
str += line;
}
// parse json data and store into tax and currency variables
JSONObject json = new JSONObject(str);
JSONArray data = json.getJSONArray("data"); // this is the "items: [ ] part
for (int i = 0; i < data.length(); i++) {
JSONObject object = data.getJSONObject(i);
JSONObject menu = object.getJSONObject("Menu_detail");
Menu_image = menu.getString("Menu_image");
Menu_name = menu.getString("Menu_name");
Menu_price = Double.valueOf(formatData.format(menu.getDouble("Price")));
Menu_serve = menu.getString("Serve_for");
Menu_description = menu.getString("Description");
Menu_quantity = menu.getInt("Quantity");
}
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
IOConnect = 1;
e.printStackTrace();
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
// close database before back to previous page
@Override
public void onBackPressed() {
// TODO Auto-generated method stub
super.onBackPressed();
dbhelper.close();
finish();
overridePendingTransition(R.anim.open_main, R.anim.close_next);
}
@Override
protected void onDestroy() {
// TODO Auto-generated method stub
//imageLoader.clearCache();
super.onDestroy();
}
@Override
public void onConfigurationChanged(final Configuration newConfig)
{
// Ignore orientation change to keep activity from restarting
super.onConfigurationChanged(newConfig);
}
}
|
[
"[email protected]"
] | |
d36df3d3f241314c1247ceddbe1d565adf3e1753
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/tests-without-trycatch/Csv-13/org.apache.commons.csv.CSVPrinter/BBC-F0-opt-60/27/org/apache/commons/csv/CSVPrinter_ESTest.java
|
2cd92126c436e60557544faceec8fa8f82b69bcb
|
[
"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 | 294,347 |
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Oct 23 01:02:25 GMT 2021
*/
package org.apache.commons.csv;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.io.CharArrayWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.io.PipedReader;
import java.io.PipedWriter;
import java.io.StringReader;
import java.io.StringWriter;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.ReadOnlyBufferException;
import java.nio.charset.Charset;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLDataException;
import java.sql.SQLIntegrityConstraintViolationException;
import java.sql.SQLInvalidAuthorizationSpecException;
import java.util.ArrayDeque;
import java.util.HashSet;
import java.util.TreeSet;
import javax.sql.rowset.RowSetMetaDataImpl;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVParser;
import org.apache.commons.csv.CSVPrinter;
import org.apache.commons.csv.QuoteMode;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.evosuite.runtime.mock.java.io.MockFile;
import org.evosuite.runtime.mock.java.io.MockFileWriter;
import org.evosuite.runtime.mock.java.io.MockPrintStream;
import org.evosuite.runtime.mock.java.io.MockPrintWriter;
import org.evosuite.runtime.mock.java.lang.MockThrowable;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class CSVPrinter_ESTest extends CSVPrinter_ESTest_scaffolding {
@Test(timeout = 4000)
public void test00() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
assertNotNull(cSVFormat0);
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertEquals(',', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVFormat cSVFormat1 = cSVFormat0.withNullString("Ayht;q'Xfdb#");
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertEquals(',', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertEquals(',', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals("Ayht;q'Xfdb#", cSVFormat1.getNullString());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteMode());
CSVPrinter cSVPrinter0 = new CSVPrinter(stringWriter0, cSVFormat1);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotNull(cSVPrinter0);
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertEquals(',', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals("", stringWriter0.toString());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertEquals(',', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals("Ayht;q'Xfdb#", cSVFormat1.getNullString());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteMode());
cSVPrinter0.print((Object) null);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertEquals(',', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals("Ayht;q'Xfdb#", stringWriter0.toString());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertEquals(',', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals("Ayht;q'Xfdb#", cSVFormat1.getNullString());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteMode());
}
@Test(timeout = 4000)
public void test01() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
CSVFormat cSVFormat1 = cSVFormat0.withNullString("9");
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat1.getCommentMarker());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertEquals(',', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isNullStringSet());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals("9", cSVFormat1.getNullString());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteMode());
CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) "9");
assertNotNull(charBuffer0);
assertEquals(0, charBuffer0.position());
assertEquals(1, charBuffer0.limit());
assertFalse(charBuffer0.hasArray());
assertEquals("9", charBuffer0.toString());
assertTrue(charBuffer0.isReadOnly());
assertEquals(1, charBuffer0.remaining());
assertFalse(charBuffer0.isDirect());
assertTrue(charBuffer0.hasRemaining());
assertEquals(1, charBuffer0.capacity());
assertEquals(1, charBuffer0.length());
CSVPrinter cSVPrinter0 = cSVFormat1.print(charBuffer0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat1.getCommentMarker());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertEquals(',', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isNullStringSet());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals("9", cSVFormat1.getNullString());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteMode());
assertEquals(0, charBuffer0.position());
assertEquals(1, charBuffer0.limit());
assertFalse(charBuffer0.hasArray());
assertEquals("9", charBuffer0.toString());
assertTrue(charBuffer0.isReadOnly());
assertEquals(1, charBuffer0.remaining());
assertFalse(charBuffer0.isDirect());
assertTrue(charBuffer0.hasRemaining());
assertEquals(1, charBuffer0.capacity());
assertEquals(1, charBuffer0.length());
// Undeclared exception!
// try {
cSVPrinter0.print((Object) null);
// fail("Expecting exception: ReadOnlyBufferException");
// } catch(ReadOnlyBufferException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test02() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
StackTraceElement[] stackTraceElementArray0 = MockThrowable.getDefaultStackTrace();
assertNotNull(stackTraceElementArray0);
assertEquals(3, stackTraceElementArray0.length);
Character character0 = Character.valueOf('e');
assertEquals('e', (char)character0);
assertNotNull(character0);
CSVFormat cSVFormat1 = cSVFormat0.withEscape(character0);
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isQuoteCharacterSet());
assertEquals("\n", cSVFormat1.getRecordSeparator());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('e', (char)cSVFormat1.getEscapeCharacter());
CSVPrinter cSVPrinter0 = new CSVPrinter(stringWriter0, cSVFormat1);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotNull(cSVPrinter0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertEquals("", stringWriter0.toString());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isQuoteCharacterSet());
assertEquals("\n", cSVFormat1.getRecordSeparator());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('e', (char)cSVFormat1.getEscapeCharacter());
cSVPrinter0.printRecord((Object[]) stackTraceElementArray0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertEquals(3, stackTraceElementArray0.length);
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isQuoteCharacterSet());
assertEquals("\n", cSVFormat1.getRecordSeparator());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('e', (char)cSVFormat1.getEscapeCharacter());
}
@Test(timeout = 4000)
public void test03() throws Throwable {
StringWriter stringWriter0 = new StringWriter(2);
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
MockPrintWriter mockPrintWriter0 = new MockPrintWriter(stringWriter0);
assertNotNull(mockPrintWriter0);
CSVFormat cSVFormat0 = CSVFormat.newFormat('0');
assertNotNull(cSVFormat0);
assertNull(cSVFormat0.getRecordSeparator());
assertEquals('0', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintWriter0, cSVFormat0);
assertNotNull(cSVPrinter0);
assertEquals("", stringWriter0.toString());
assertNull(cSVFormat0.getRecordSeparator());
assertEquals('0', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
Object[] objectArray0 = new Object[7];
objectArray0[0] = (Object) "";
cSVPrinter0.printRecord(objectArray0);
assertEquals(7, objectArray0.length);
assertNull(cSVFormat0.getRecordSeparator());
assertEquals('0', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
}
@Test(timeout = 4000)
public void test04() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
assertNotNull(cSVFormat0);
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isEscapeCharacterSet());
PipedWriter pipedWriter0 = new PipedWriter();
assertNotNull(pipedWriter0);
CSVPrinter cSVPrinter0 = cSVFormat0.print(pipedWriter0);
assertNotNull(cSVPrinter0);
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isEscapeCharacterSet());
// try {
cSVPrinter0.println();
// fail("Expecting exception: IOException");
// } catch(IOException e) {
// //
// // Pipe not connected
// //
// verifyException("java.io.PipedWriter", e);
// }
}
@Test(timeout = 4000)
public void test05() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.DEFAULT;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
SQLDataException sQLDataException0 = new SQLDataException();
assertNotNull(sQLDataException0);
assertNull(sQLDataException0.getMessage());
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
assertEquals(0, sQLDataException0.getErrorCode());
StackTraceElement[] stackTraceElementArray0 = sQLDataException0.getStackTrace();
assertNotNull(stackTraceElementArray0);
assertEquals(13, stackTraceElementArray0.length);
assertNull(sQLDataException0.getMessage());
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
assertEquals(0, sQLDataException0.getErrorCode());
CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) "o9u");
assertNotNull(charBuffer0);
assertTrue(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isDirect());
assertFalse(charBuffer0.hasArray());
assertTrue(charBuffer0.hasRemaining());
assertEquals(3, charBuffer0.remaining());
assertEquals(3, charBuffer0.capacity());
assertEquals("o9u", charBuffer0.toString());
assertEquals(3, charBuffer0.length());
assertEquals(3, charBuffer0.limit());
CSVPrinter cSVPrinter0 = new CSVPrinter(charBuffer0, cSVFormat0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isDirect());
assertFalse(charBuffer0.hasArray());
assertTrue(charBuffer0.hasRemaining());
assertEquals(3, charBuffer0.remaining());
assertEquals(3, charBuffer0.capacity());
assertEquals("o9u", charBuffer0.toString());
assertEquals(3, charBuffer0.length());
assertEquals(3, charBuffer0.limit());
// Undeclared exception!
// try {
cSVPrinter0.printRecords((Object[]) stackTraceElementArray0);
// fail("Expecting exception: ReadOnlyBufferException");
// } catch(ReadOnlyBufferException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test06() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
CSVFormat cSVFormat1 = cSVFormat0.withQuote('Y');
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertEquals('\\', (char)cSVFormat1.getEscapeCharacter());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals('Y', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertEquals("\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getCommentMarker());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isCommentMarkerSet());
RowSetMetaDataImpl rowSetMetaDataImpl0 = new RowSetMetaDataImpl();
assertNotNull(rowSetMetaDataImpl0);
Charset charset0 = Charset.defaultCharset();
assertNotNull(charset0);
assertEquals("US-ASCII", charset0.displayName());
assertEquals("US-ASCII", charset0.name());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.isRegistered());
assertTrue(charset0.canEncode());
ByteBuffer byteBuffer0 = ByteBuffer.allocateDirect('Y');
assertNotNull(byteBuffer0);
assertTrue(byteBuffer0.hasRemaining());
assertTrue(byteBuffer0.isDirect());
assertEquals(89, byteBuffer0.remaining());
assertEquals(89, byteBuffer0.capacity());
assertEquals(89, byteBuffer0.limit());
assertEquals(0, byteBuffer0.position());
assertEquals("java.nio.DirectByteBuffer[pos=0 lim=89 cap=89]", byteBuffer0.toString());
assertFalse(byteBuffer0.isReadOnly());
assertFalse(byteBuffer0.hasArray());
CharBuffer charBuffer0 = charset0.decode(byteBuffer0);
assertNotNull(charBuffer0);
assertEquals("US-ASCII", charset0.displayName());
assertEquals("US-ASCII", charset0.name());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.isRegistered());
assertTrue(charset0.canEncode());
assertTrue(byteBuffer0.isDirect());
assertEquals(89, byteBuffer0.capacity());
assertEquals(89, byteBuffer0.limit());
assertEquals("java.nio.DirectByteBuffer[pos=89 lim=89 cap=89]", byteBuffer0.toString());
assertFalse(byteBuffer0.isReadOnly());
assertEquals(0, byteBuffer0.remaining());
assertFalse(byteBuffer0.hasRemaining());
assertEquals(89, byteBuffer0.position());
assertFalse(byteBuffer0.hasArray());
assertFalse(charBuffer0.isReadOnly());
assertEquals(89, charBuffer0.length());
assertEquals(89, charBuffer0.limit());
assertTrue(charBuffer0.hasRemaining());
assertTrue(charBuffer0.hasArray());
assertEquals(89, charBuffer0.remaining());
assertEquals(89, charBuffer0.capacity());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isDirect());
assertEquals(0, charBuffer0.arrayOffset());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
CSVPrinter cSVPrinter0 = cSVFormat1.print(charBuffer0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVPrinter0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertEquals('\\', (char)cSVFormat1.getEscapeCharacter());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals('Y', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertEquals("\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getCommentMarker());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals("US-ASCII", charset0.displayName());
assertEquals("US-ASCII", charset0.name());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.isRegistered());
assertTrue(charset0.canEncode());
assertTrue(byteBuffer0.isDirect());
assertEquals(89, byteBuffer0.capacity());
assertEquals(89, byteBuffer0.limit());
assertEquals("java.nio.DirectByteBuffer[pos=89 lim=89 cap=89]", byteBuffer0.toString());
assertFalse(byteBuffer0.isReadOnly());
assertEquals(0, byteBuffer0.remaining());
assertFalse(byteBuffer0.hasRemaining());
assertEquals(89, byteBuffer0.position());
assertFalse(byteBuffer0.hasArray());
assertFalse(charBuffer0.isReadOnly());
assertEquals(89, charBuffer0.length());
assertEquals(89, charBuffer0.limit());
assertTrue(charBuffer0.hasRemaining());
assertTrue(charBuffer0.hasArray());
assertEquals(89, charBuffer0.remaining());
assertEquals(89, charBuffer0.capacity());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isDirect());
assertEquals(0, charBuffer0.arrayOffset());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
Object[] objectArray0 = new Object[6];
objectArray0[0] = (Object) byteBuffer0;
objectArray0[1] = (Object) rowSetMetaDataImpl0;
// Undeclared exception!
// try {
cSVPrinter0.printRecords(objectArray0);
// fail("Expecting exception: BufferOverflowException");
// } catch(BufferOverflowException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test07() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
CharArrayWriter charArrayWriter0 = new CharArrayWriter();
assertNotNull(charArrayWriter0);
assertEquals(0, charArrayWriter0.size());
assertEquals("", charArrayWriter0.toString());
CSVPrinter cSVPrinter0 = cSVFormat0.print(charArrayWriter0);
assertNotNull(cSVPrinter0);
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals(0, charArrayWriter0.size());
assertEquals("", charArrayWriter0.toString());
// Undeclared exception!
// try {
cSVPrinter0.printRecords((Object[]) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.csv.CSVPrinter", e);
// }
}
@Test(timeout = 4000)
public void test08() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.RFC4180;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
MockFileWriter mockFileWriter0 = new MockFileWriter(">", false);
assertNotNull(mockFileWriter0);
CSVPrinter cSVPrinter0 = cSVFormat0.print(mockFileWriter0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
SQLDataException sQLDataException0 = new SQLDataException();
assertNotNull(sQLDataException0);
assertEquals(0, sQLDataException0.getErrorCode());
assertNull(sQLDataException0.getMessage());
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
StackTraceElement[] stackTraceElementArray0 = sQLDataException0.getStackTrace();
assertNotNull(stackTraceElementArray0);
assertEquals(13, stackTraceElementArray0.length);
assertEquals(0, sQLDataException0.getErrorCode());
assertNull(sQLDataException0.getMessage());
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
cSVPrinter0.close();
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
// try {
cSVPrinter0.printRecords((Object[]) stackTraceElementArray0);
// fail("Expecting exception: IOException");
// } catch(IOException e) {
// }
}
@Test(timeout = 4000)
public void test09() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isQuoteCharacterSet());
MockPrintStream mockPrintStream0 = new MockPrintStream("@=h");
assertNotNull(mockPrintStream0);
CSVPrinter cSVPrinter0 = cSVFormat0.print(mockPrintStream0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isQuoteCharacterSet());
// Undeclared exception!
// try {
cSVPrinter0.printRecords((ResultSet) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.csv.CSVPrinter", e);
// }
}
@Test(timeout = 4000)
public void test10() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getQuoteMode());
SQLDataException sQLDataException0 = new SQLDataException("JP%KO)1", "org.apache.commons.csv.Lexer");
assertNotNull(sQLDataException0);
assertEquals("JP%KO)1", sQLDataException0.getMessage());
assertEquals(0, sQLDataException0.getErrorCode());
assertEquals("java.sql.SQLDataException: JP%KO)1", sQLDataException0.toString());
assertEquals("org.apache.commons.csv.Lexer", sQLDataException0.getSQLState());
char[] charArray0 = new char[5];
CharBuffer charBuffer0 = CharBuffer.wrap(charArray0);
assertNotNull(charBuffer0);
assertArrayEquals(new char[] {'\u0000', '\u0000', '\u0000', '\u0000', '\u0000'}, charArray0);
assertEquals(5, charArray0.length);
assertEquals(5, charBuffer0.limit());
assertEquals(5, charBuffer0.length());
assertEquals(5, charBuffer0.capacity());
assertEquals(0, charBuffer0.arrayOffset());
assertTrue(charBuffer0.hasArray());
assertTrue(charBuffer0.hasRemaining());
assertEquals("\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isDirect());
assertFalse(charBuffer0.isReadOnly());
assertEquals(5, charBuffer0.remaining());
CSVPrinter cSVPrinter0 = new CSVPrinter(charBuffer0, cSVFormat0);
assertNotNull(cSVPrinter0);
assertArrayEquals(new char[] {'\u0000', '\u0000', '\u0000', '\u0000', '\u0000'}, charArray0);
assertEquals(5, charArray0.length);
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(5, charBuffer0.limit());
assertEquals(5, charBuffer0.length());
assertEquals(5, charBuffer0.capacity());
assertEquals(0, charBuffer0.arrayOffset());
assertTrue(charBuffer0.hasArray());
assertTrue(charBuffer0.hasRemaining());
assertEquals("\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isDirect());
assertFalse(charBuffer0.isReadOnly());
assertEquals(5, charBuffer0.remaining());
// Undeclared exception!
// try {
cSVPrinter0.printRecords((Iterable<?>) sQLDataException0);
// fail("Expecting exception: BufferOverflowException");
// } catch(BufferOverflowException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test11() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.DEFAULT;
assertNotNull(cSVFormat0);
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
PipedReader pipedReader0 = new PipedReader();
assertNotNull(pipedReader0);
CSVParser cSVParser0 = cSVFormat0.parse(pipedReader0);
assertNotNull(cSVParser0);
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals(0L, cSVParser0.getCurrentLineNumber());
assertEquals(0L, cSVParser0.getRecordNumber());
assertFalse(cSVParser0.isClosed());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVPrinter cSVPrinter0 = cSVFormat0.print(stringWriter0);
assertNotNull(cSVPrinter0);
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("", stringWriter0.toString());
// Undeclared exception!
// try {
cSVPrinter0.printRecords((Iterable<?>) cSVParser0);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // java.io.IOException: Pipe not connected
// //
// verifyException("org.apache.commons.csv.CSVParser$1", e);
// }
}
@Test(timeout = 4000)
public void test12() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.newFormat('e');
assertNotNull(cSVFormat0);
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('e', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
StringWriter stringWriter0 = new StringWriter(1252);
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVPrinter cSVPrinter0 = cSVFormat0.print(stringWriter0);
assertNotNull(cSVPrinter0);
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('e', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals("", stringWriter0.toString());
// Undeclared exception!
// try {
cSVPrinter0.printRecords((Iterable<?>) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.csv.CSVPrinter", e);
// }
}
@Test(timeout = 4000)
public void test13() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
SQLDataException sQLDataException0 = new SQLDataException("");
assertNotNull(sQLDataException0);
assertNull(sQLDataException0.getSQLState());
assertEquals("", sQLDataException0.getMessage());
assertEquals("java.sql.SQLDataException: ", sQLDataException0.toString());
assertEquals(0, sQLDataException0.getErrorCode());
MockFileWriter mockFileWriter0 = new MockFileWriter(" EmptyLines:ignored", true);
assertNotNull(mockFileWriter0);
CSVPrinter cSVPrinter0 = cSVFormat0.print(mockFileWriter0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
cSVPrinter0.close();
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
// try {
cSVPrinter0.printRecords((Iterable<?>) sQLDataException0);
// fail("Expecting exception: IOException");
// } catch(IOException e) {
// }
}
@Test(timeout = 4000)
public void test14() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) ";");
assertNotNull(charBuffer0);
assertEquals(1, charBuffer0.capacity());
assertEquals(1, charBuffer0.limit());
assertEquals(";", charBuffer0.toString());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isDirect());
assertFalse(charBuffer0.hasArray());
assertEquals(1, charBuffer0.length());
assertTrue(charBuffer0.hasRemaining());
assertEquals(1, charBuffer0.remaining());
assertTrue(charBuffer0.isReadOnly());
CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer0);
assertNotNull(cSVPrinter0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertEquals(1, charBuffer0.capacity());
assertEquals(1, charBuffer0.limit());
assertEquals(";", charBuffer0.toString());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isDirect());
assertFalse(charBuffer0.hasArray());
assertEquals(1, charBuffer0.length());
assertTrue(charBuffer0.hasRemaining());
assertEquals(1, charBuffer0.remaining());
assertTrue(charBuffer0.isReadOnly());
Object[] objectArray0 = new Object[7];
// Undeclared exception!
// try {
cSVPrinter0.printRecord(objectArray0);
// fail("Expecting exception: ReadOnlyBufferException");
// } catch(ReadOnlyBufferException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.StringCharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test15() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isNullStringSet());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
Charset charset0 = Charset.defaultCharset();
assertNotNull(charset0);
assertEquals("US-ASCII", charset0.name());
assertEquals("US-ASCII", charset0.displayName());
assertTrue(charset0.isRegistered());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.canEncode());
ByteBuffer byteBuffer0 = ByteBuffer.allocateDirect(0);
assertNotNull(byteBuffer0);
assertFalse(byteBuffer0.isReadOnly());
assertEquals(0, byteBuffer0.remaining());
assertEquals(0, byteBuffer0.capacity());
assertEquals("java.nio.DirectByteBuffer[pos=0 lim=0 cap=0]", byteBuffer0.toString());
assertFalse(byteBuffer0.hasArray());
assertEquals(0, byteBuffer0.position());
assertTrue(byteBuffer0.isDirect());
assertFalse(byteBuffer0.hasRemaining());
assertEquals(0, byteBuffer0.limit());
CharBuffer charBuffer0 = charset0.decode(byteBuffer0);
assertNotNull(charBuffer0);
assertEquals("US-ASCII", charset0.name());
assertEquals("US-ASCII", charset0.displayName());
assertTrue(charset0.isRegistered());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.canEncode());
assertFalse(byteBuffer0.isReadOnly());
assertEquals(0, byteBuffer0.remaining());
assertEquals(0, byteBuffer0.capacity());
assertEquals("java.nio.DirectByteBuffer[pos=0 lim=0 cap=0]", byteBuffer0.toString());
assertFalse(byteBuffer0.hasArray());
assertEquals(0, byteBuffer0.position());
assertTrue(byteBuffer0.isDirect());
assertFalse(byteBuffer0.hasRemaining());
assertEquals(0, byteBuffer0.limit());
assertEquals(0, charBuffer0.limit());
assertFalse(charBuffer0.hasRemaining());
assertTrue(charBuffer0.hasArray());
assertEquals(0, charBuffer0.remaining());
assertFalse(charBuffer0.isDirect());
assertEquals("", charBuffer0.toString());
assertEquals(0, charBuffer0.arrayOffset());
assertFalse(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertEquals(0, charBuffer0.length());
assertEquals(0, charBuffer0.capacity());
CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isNullStringSet());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals("US-ASCII", charset0.name());
assertEquals("US-ASCII", charset0.displayName());
assertTrue(charset0.isRegistered());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.canEncode());
assertFalse(byteBuffer0.isReadOnly());
assertEquals(0, byteBuffer0.remaining());
assertEquals(0, byteBuffer0.capacity());
assertEquals("java.nio.DirectByteBuffer[pos=0 lim=0 cap=0]", byteBuffer0.toString());
assertFalse(byteBuffer0.hasArray());
assertEquals(0, byteBuffer0.position());
assertTrue(byteBuffer0.isDirect());
assertFalse(byteBuffer0.hasRemaining());
assertEquals(0, byteBuffer0.limit());
assertEquals(0, charBuffer0.limit());
assertFalse(charBuffer0.hasRemaining());
assertTrue(charBuffer0.hasArray());
assertEquals(0, charBuffer0.remaining());
assertFalse(charBuffer0.isDirect());
assertEquals("", charBuffer0.toString());
assertEquals(0, charBuffer0.arrayOffset());
assertFalse(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertEquals(0, charBuffer0.length());
assertEquals(0, charBuffer0.capacity());
Object[] objectArray0 = new Object[6];
// Undeclared exception!
// try {
cSVPrinter0.printRecord(objectArray0);
// fail("Expecting exception: BufferOverflowException");
// } catch(BufferOverflowException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.Buffer", e);
// }
}
@Test(timeout = 4000)
public void test16() throws Throwable {
StringWriter stringWriter0 = new StringWriter(2);
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
MockPrintWriter mockPrintWriter0 = new MockPrintWriter(stringWriter0);
assertNotNull(mockPrintWriter0);
CSVFormat cSVFormat0 = CSVFormat.newFormat('w');
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getEscapeCharacter());
assertEquals('w', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintWriter0, cSVFormat0);
assertNotNull(cSVPrinter0);
assertEquals("", stringWriter0.toString());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getEscapeCharacter());
assertEquals('w', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
// Undeclared exception!
// try {
cSVPrinter0.printRecord((Object[]) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.csv.CSVPrinter", e);
// }
}
@Test(timeout = 4000)
public void test17() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
SQLDataException sQLDataException0 = new SQLDataException();
assertNotNull(sQLDataException0);
assertEquals(0, sQLDataException0.getErrorCode());
assertNull(sQLDataException0.getMessage());
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException0 = new SQLInvalidAuthorizationSpecException(";^PnLA8)", "ALL", (-1), sQLDataException0);
assertNotNull(sQLInvalidAuthorizationSpecException0);
assertEquals(0, sQLDataException0.getErrorCode());
assertNull(sQLDataException0.getMessage());
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
assertEquals((-1), sQLInvalidAuthorizationSpecException0.getErrorCode());
assertEquals(";^PnLA8)", sQLInvalidAuthorizationSpecException0.getMessage());
assertEquals("java.sql.SQLInvalidAuthorizationSpecException: ;^PnLA8)", sQLInvalidAuthorizationSpecException0.toString());
assertEquals("ALL", sQLInvalidAuthorizationSpecException0.getSQLState());
SQLDataException sQLDataException1 = (SQLDataException)sQLDataException0.initCause(sQLInvalidAuthorizationSpecException0);
assertSame(sQLDataException0, sQLDataException1);
assertSame(sQLDataException1, sQLDataException0);
assertNotNull(sQLDataException1);
assertEquals(0, sQLDataException0.getErrorCode());
assertNull(sQLDataException0.getMessage());
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
assertEquals((-1), sQLInvalidAuthorizationSpecException0.getErrorCode());
assertEquals(";^PnLA8)", sQLInvalidAuthorizationSpecException0.getMessage());
assertEquals("java.sql.SQLInvalidAuthorizationSpecException: ;^PnLA8)", sQLInvalidAuthorizationSpecException0.toString());
assertEquals("ALL", sQLInvalidAuthorizationSpecException0.getSQLState());
assertEquals(0, sQLDataException1.getErrorCode());
assertEquals("java.sql.SQLDataException", sQLDataException1.toString());
assertNull(sQLDataException1.getMessage());
assertNull(sQLDataException1.getSQLState());
CSVPrinter cSVPrinter0 = cSVFormat0.print(stringWriter0);
assertNotNull(cSVPrinter0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertEquals("", stringWriter0.toString());
// Undeclared exception!
cSVPrinter0.printRecord((Iterable<?>) sQLDataException0);
}
@Test(timeout = 4000)
public void test18() throws Throwable {
CharBuffer charBuffer0 = CharBuffer.allocate(43);
assertNotNull(charBuffer0);
assertEquals(0, charBuffer0.arrayOffset());
assertFalse(charBuffer0.isReadOnly());
assertFalse(charBuffer0.isDirect());
assertEquals(43, charBuffer0.remaining());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
assertEquals(43, charBuffer0.capacity());
assertEquals(0, charBuffer0.position());
assertTrue(charBuffer0.hasRemaining());
assertEquals(43, charBuffer0.limit());
assertTrue(charBuffer0.hasArray());
assertEquals(43, charBuffer0.length());
CharBuffer charBuffer1 = CharBuffer.wrap((CharSequence) charBuffer0);
assertTrue(charBuffer1.equals((Object)charBuffer0));
assertNotNull(charBuffer1);
assertEquals(0, charBuffer0.arrayOffset());
assertFalse(charBuffer0.isReadOnly());
assertFalse(charBuffer0.isDirect());
assertEquals(43, charBuffer0.remaining());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
assertEquals(43, charBuffer0.capacity());
assertEquals(0, charBuffer0.position());
assertTrue(charBuffer0.hasRemaining());
assertEquals(43, charBuffer0.limit());
assertTrue(charBuffer0.hasArray());
assertEquals(43, charBuffer0.length());
assertFalse(charBuffer1.hasArray());
assertEquals(43, charBuffer1.length());
assertEquals(43, charBuffer1.remaining());
assertEquals(43, charBuffer1.capacity());
assertEquals(0, charBuffer1.position());
assertEquals(43, charBuffer1.limit());
assertFalse(charBuffer1.isDirect());
assertTrue(charBuffer1.hasRemaining());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer1.toString());
assertTrue(charBuffer1.isReadOnly());
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertNull(cSVFormat0.getNullString());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\t', cSVFormat0.getDelimiter());
CSVPrinter cSVPrinter0 = new CSVPrinter(charBuffer1, cSVFormat0);
assertTrue(charBuffer0.equals((Object)charBuffer1));
assertTrue(charBuffer1.equals((Object)charBuffer0));
assertNotNull(cSVPrinter0);
assertEquals(0, charBuffer0.arrayOffset());
assertFalse(charBuffer0.isReadOnly());
assertFalse(charBuffer0.isDirect());
assertEquals(43, charBuffer0.remaining());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
assertEquals(43, charBuffer0.capacity());
assertEquals(0, charBuffer0.position());
assertTrue(charBuffer0.hasRemaining());
assertEquals(43, charBuffer0.limit());
assertTrue(charBuffer0.hasArray());
assertEquals(43, charBuffer0.length());
assertFalse(charBuffer1.hasArray());
assertEquals(43, charBuffer1.length());
assertEquals(43, charBuffer1.remaining());
assertEquals(43, charBuffer1.capacity());
assertEquals(0, charBuffer1.position());
assertEquals(43, charBuffer1.limit());
assertFalse(charBuffer1.isDirect());
assertTrue(charBuffer1.hasRemaining());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer1.toString());
assertTrue(charBuffer1.isReadOnly());
assertNull(cSVFormat0.getNullString());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\t', cSVFormat0.getDelimiter());
TreeSet<Byte> treeSet0 = new TreeSet<Byte>();
assertNotNull(treeSet0);
// Undeclared exception!
// try {
cSVPrinter0.printRecord((Iterable<?>) treeSet0);
// fail("Expecting exception: ReadOnlyBufferException");
// } catch(ReadOnlyBufferException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test19() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
SQLDataException sQLDataException0 = new SQLDataException();
assertNotNull(sQLDataException0);
assertNull(sQLDataException0.getSQLState());
assertNull(sQLDataException0.getMessage());
assertEquals(0, sQLDataException0.getErrorCode());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
char[] charArray0 = new char[9];
CharBuffer charBuffer0 = CharBuffer.wrap(charArray0);
assertNotNull(charBuffer0);
assertArrayEquals(new char[] {'\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000'}, charArray0);
assertEquals(9, charArray0.length);
assertFalse(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isDirect());
assertEquals(9, charBuffer0.capacity());
assertTrue(charBuffer0.hasArray());
assertEquals(9, charBuffer0.remaining());
assertTrue(charBuffer0.hasRemaining());
assertEquals(9, charBuffer0.limit());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
assertEquals(9, charBuffer0.length());
assertEquals(0, charBuffer0.arrayOffset());
CSVPrinter cSVPrinter0 = new CSVPrinter(charBuffer0, cSVFormat0);
assertNotNull(cSVPrinter0);
assertArrayEquals(new char[] {'\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000'}, charArray0);
assertEquals(9, charArray0.length);
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isDirect());
assertEquals(9, charBuffer0.capacity());
assertTrue(charBuffer0.hasArray());
assertEquals(9, charBuffer0.remaining());
assertTrue(charBuffer0.hasRemaining());
assertEquals(9, charBuffer0.limit());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
assertEquals(9, charBuffer0.length());
assertEquals(0, charBuffer0.arrayOffset());
// Undeclared exception!
// try {
cSVPrinter0.printRecord((Iterable<?>) sQLDataException0);
// fail("Expecting exception: BufferOverflowException");
// } catch(BufferOverflowException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test20() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
StringWriter stringWriter0 = new StringWriter(110);
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVPrinter cSVPrinter0 = cSVFormat0.print(stringWriter0);
assertNotNull(cSVPrinter0);
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
assertEquals("", stringWriter0.toString());
// Undeclared exception!
// try {
cSVPrinter0.printRecord((Iterable<?>) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.csv.CSVPrinter", e);
// }
}
@Test(timeout = 4000)
public void test21() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getCommentMarker());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
PipedWriter pipedWriter0 = new PipedWriter();
assertNotNull(pipedWriter0);
CSVPrinter cSVPrinter0 = cSVFormat0.print(pipedWriter0);
assertNotNull(cSVPrinter0);
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getCommentMarker());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
HashSet<StringReader> hashSet0 = new HashSet<StringReader>();
assertNotNull(hashSet0);
assertEquals(0, hashSet0.size());
assertTrue(hashSet0.isEmpty());
// try {
cSVPrinter0.printRecord((Iterable<?>) hashSet0);
// fail("Expecting exception: IOException");
// } catch(IOException e) {
// //
// // Pipe not connected
// //
// verifyException("java.io.PipedWriter", e);
// }
}
@Test(timeout = 4000)
public void test22() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.RFC4180;
assertNotNull(cSVFormat0);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getEscapeCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertEquals(',', cSVFormat0.getDelimiter());
CSVFormat cSVFormat1 = cSVFormat0.withCommentMarker('0');
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getEscapeCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertNull(cSVFormat1.getEscapeCharacter());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertNull(cSVFormat1.getQuoteMode());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('0', (char)cSVFormat1.getCommentMarker());
assertNull(cSVFormat1.getNullString());
assertEquals(',', cSVFormat1.getDelimiter());
assertTrue(cSVFormat1.isCommentMarkerSet());
CharBuffer charBuffer0 = CharBuffer.allocate(17);
assertNotNull(charBuffer0);
assertFalse(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertEquals(17, charBuffer0.remaining());
assertTrue(charBuffer0.hasRemaining());
assertTrue(charBuffer0.hasArray());
assertEquals(17, charBuffer0.length());
assertFalse(charBuffer0.isDirect());
assertEquals(0, charBuffer0.arrayOffset());
assertEquals(17, charBuffer0.capacity());
assertEquals(17, charBuffer0.limit());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
CSVPrinter cSVPrinter0 = cSVFormat1.print(charBuffer0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVPrinter0);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getEscapeCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertNull(cSVFormat1.getEscapeCharacter());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertNull(cSVFormat1.getQuoteMode());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('0', (char)cSVFormat1.getCommentMarker());
assertNull(cSVFormat1.getNullString());
assertEquals(',', cSVFormat1.getDelimiter());
assertTrue(cSVFormat1.isCommentMarkerSet());
assertFalse(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertEquals(17, charBuffer0.remaining());
assertTrue(charBuffer0.hasRemaining());
assertTrue(charBuffer0.hasArray());
assertEquals(17, charBuffer0.length());
assertFalse(charBuffer0.isDirect());
assertEquals(0, charBuffer0.arrayOffset());
assertEquals(17, charBuffer0.capacity());
assertEquals(17, charBuffer0.limit());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
CharBuffer charBuffer1 = charBuffer0.append((CharSequence) "6cOca $q7ogLz2");
assertSame(charBuffer0, charBuffer1);
assertSame(charBuffer1, charBuffer0);
assertNotNull(charBuffer1);
assertFalse(charBuffer0.isReadOnly());
assertEquals(14, charBuffer0.position());
assertEquals(3, charBuffer0.remaining());
assertTrue(charBuffer0.hasRemaining());
assertTrue(charBuffer0.hasArray());
assertFalse(charBuffer0.isDirect());
assertEquals(0, charBuffer0.arrayOffset());
assertEquals(17, charBuffer0.capacity());
assertEquals(17, charBuffer0.limit());
assertEquals(3, charBuffer0.length());
assertEquals("\u0000\u0000\u0000", charBuffer0.toString());
assertEquals(17, charBuffer1.limit());
assertEquals(14, charBuffer1.position());
assertFalse(charBuffer1.isReadOnly());
assertEquals(3, charBuffer1.length());
assertEquals("\u0000\u0000\u0000", charBuffer1.toString());
assertEquals(17, charBuffer1.capacity());
assertFalse(charBuffer1.isDirect());
assertEquals(3, charBuffer1.remaining());
assertEquals(0, charBuffer1.arrayOffset());
assertTrue(charBuffer1.hasRemaining());
assertTrue(charBuffer1.hasArray());
// Undeclared exception!
// try {
cSVPrinter0.printComment("");
// fail("Expecting exception: BufferOverflowException");
// } catch(BufferOverflowException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test23() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.DEFAULT;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getEscapeCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
CSVFormat cSVFormat1 = cSVFormat0.withCommentMarker('\u0086');
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getEscapeCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getQuoteMode());
assertNull(cSVFormat1.getNullString());
assertEquals(',', cSVFormat1.getDelimiter());
assertTrue(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals('\u0086', (char)cSVFormat1.getCommentMarker());
assertTrue(cSVFormat1.isQuoteCharacterSet());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVPrinter cSVPrinter0 = cSVFormat1.print(stringWriter0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getEscapeCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getQuoteMode());
assertNull(cSVFormat1.getNullString());
assertEquals(',', cSVFormat1.getDelimiter());
assertTrue(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals('\u0086', (char)cSVFormat1.getCommentMarker());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertEquals("", stringWriter0.toString());
// Undeclared exception!
// try {
cSVPrinter0.printComment((String) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.csv.CSVPrinter", e);
// }
}
@Test(timeout = 4000)
public void test24() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
PipedWriter pipedWriter0 = new PipedWriter();
assertNotNull(pipedWriter0);
CSVPrinter cSVPrinter0 = cSVFormat0.print(pipedWriter0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
// try {
cSVPrinter0.print(cSVFormat0);
// fail("Expecting exception: IOException");
// } catch(IOException e) {
// //
// // Pipe not connected
// //
// verifyException("java.io.PipedWriter", e);
// }
}
@Test(timeout = 4000)
public void test25() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getSkipHeaderRecord());
MockFileWriter mockFileWriter0 = new MockFileWriter(":B<D$,q{F1KM0");
assertNotNull(mockFileWriter0);
CSVPrinter cSVPrinter0 = new CSVPrinter(mockFileWriter0, cSVFormat0);
assertNotNull(cSVPrinter0);
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getSkipHeaderRecord());
cSVPrinter0.close();
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getSkipHeaderRecord());
// try {
cSVPrinter0.flush();
// fail("Expecting exception: IOException");
// } catch(IOException e) {
// }
}
@Test(timeout = 4000)
public void test26() throws Throwable {
Charset charset0 = Charset.defaultCharset();
assertNotNull(charset0);
assertEquals("US-ASCII", charset0.name());
assertTrue(charset0.isRegistered());
assertEquals("US-ASCII", charset0.displayName());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.canEncode());
ByteBuffer byteBuffer0 = ByteBuffer.allocateDirect(36);
assertNotNull(byteBuffer0);
assertEquals(36, byteBuffer0.limit());
assertTrue(byteBuffer0.isDirect());
assertEquals("java.nio.DirectByteBuffer[pos=0 lim=36 cap=36]", byteBuffer0.toString());
assertFalse(byteBuffer0.hasArray());
assertEquals(36, byteBuffer0.remaining());
assertEquals(36, byteBuffer0.capacity());
assertTrue(byteBuffer0.hasRemaining());
assertFalse(byteBuffer0.isReadOnly());
assertEquals(0, byteBuffer0.position());
CharBuffer charBuffer0 = charset0.decode(byteBuffer0);
assertNotNull(charBuffer0);
assertEquals("US-ASCII", charset0.name());
assertTrue(charset0.isRegistered());
assertEquals("US-ASCII", charset0.displayName());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.canEncode());
assertFalse(byteBuffer0.hasRemaining());
assertEquals(36, byteBuffer0.position());
assertEquals(0, byteBuffer0.remaining());
assertEquals(36, byteBuffer0.limit());
assertTrue(byteBuffer0.isDirect());
assertFalse(byteBuffer0.hasArray());
assertEquals("java.nio.DirectByteBuffer[pos=36 lim=36 cap=36]", byteBuffer0.toString());
assertEquals(36, byteBuffer0.capacity());
assertFalse(byteBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isReadOnly());
assertTrue(charBuffer0.hasRemaining());
assertEquals(36, charBuffer0.remaining());
assertFalse(charBuffer0.isDirect());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
assertTrue(charBuffer0.hasArray());
assertEquals(36, charBuffer0.limit());
assertEquals(36, charBuffer0.length());
assertEquals(36, charBuffer0.capacity());
assertEquals(0, charBuffer0.arrayOffset());
CharBuffer charBuffer1 = CharBuffer.wrap((CharSequence) charBuffer0);
assertTrue(charBuffer1.equals((Object)charBuffer0));
assertNotNull(charBuffer1);
assertEquals("US-ASCII", charset0.name());
assertTrue(charset0.isRegistered());
assertEquals("US-ASCII", charset0.displayName());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.canEncode());
assertFalse(byteBuffer0.hasRemaining());
assertEquals(36, byteBuffer0.position());
assertEquals(0, byteBuffer0.remaining());
assertEquals(36, byteBuffer0.limit());
assertTrue(byteBuffer0.isDirect());
assertFalse(byteBuffer0.hasArray());
assertEquals("java.nio.DirectByteBuffer[pos=36 lim=36 cap=36]", byteBuffer0.toString());
assertEquals(36, byteBuffer0.capacity());
assertFalse(byteBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertFalse(charBuffer0.isReadOnly());
assertTrue(charBuffer0.hasRemaining());
assertEquals(36, charBuffer0.remaining());
assertFalse(charBuffer0.isDirect());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
assertTrue(charBuffer0.hasArray());
assertEquals(36, charBuffer0.limit());
assertEquals(36, charBuffer0.length());
assertEquals(36, charBuffer0.capacity());
assertEquals(0, charBuffer0.arrayOffset());
assertTrue(charBuffer1.hasRemaining());
assertEquals(36, charBuffer1.length());
assertFalse(charBuffer1.isDirect());
assertEquals(0, charBuffer1.position());
assertEquals(36, charBuffer1.capacity());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer1.toString());
assertEquals(36, charBuffer1.limit());
assertFalse(charBuffer1.hasArray());
assertTrue(charBuffer1.isReadOnly());
assertEquals(36, charBuffer1.remaining());
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\t', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
RowSetMetaDataImpl rowSetMetaDataImpl0 = new RowSetMetaDataImpl();
assertNotNull(rowSetMetaDataImpl0);
CSVFormat cSVFormat1 = cSVFormat0.withHeader((ResultSetMetaData) rowSetMetaDataImpl0);
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\t', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteMode());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
CSVPrinter cSVPrinter0 = null;
// try {
cSVPrinter0 = new CSVPrinter(charBuffer1, cSVFormat1);
// fail("Expecting exception: ReadOnlyBufferException");
// } catch(ReadOnlyBufferException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test27() throws Throwable {
char[] charArray0 = new char[6];
CharBuffer charBuffer0 = CharBuffer.wrap(charArray0);
assertNotNull(charBuffer0);
assertArrayEquals(new char[] {'\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000'}, charArray0);
assertEquals(6, charArray0.length);
assertEquals(6, charBuffer0.limit());
assertEquals(0, charBuffer0.arrayOffset());
assertFalse(charBuffer0.isReadOnly());
assertEquals(6, charBuffer0.capacity());
assertTrue(charBuffer0.hasRemaining());
assertTrue(charBuffer0.hasArray());
assertEquals(0, charBuffer0.position());
assertEquals(6, charBuffer0.length());
assertEquals(6, charBuffer0.remaining());
assertFalse(charBuffer0.isDirect());
assertEquals("\u0000\u0000\u0000\u0000\u0000\u0000", charBuffer0.toString());
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
String[] stringArray0 = new String[5];
stringArray0[0] = "LQScYLACJq*.Ki";
stringArray0[1] = "&X'FMLR>=4#";
stringArray0[2] = "KWbM'~fqeh";
stringArray0[3] = ") invalid char between encapsulated token and delimiter";
CSVFormat cSVFormat1 = cSVFormat0.withHeader(stringArray0);
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertEquals(5, stringArray0.length);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals(',', cSVFormat1.getDelimiter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertNull(cSVFormat1.getCommentMarker());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
CSVPrinter cSVPrinter0 = null;
// try {
cSVPrinter0 = new CSVPrinter(charBuffer0, cSVFormat1);
// fail("Expecting exception: BufferOverflowException");
// } catch(BufferOverflowException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test28() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
CSVPrinter cSVPrinter0 = null;
// try {
cSVPrinter0 = new CSVPrinter((Appendable) null, cSVFormat0);
// fail("Expecting exception: IllegalArgumentException");
// } catch(IllegalArgumentException e) {
// //
// // Parameter 'out' must not be null!
// //
// verifyException("org.apache.commons.csv.Assertions", e);
// }
}
@Test(timeout = 4000)
public void test29() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
SQLDataException sQLDataException0 = new SQLDataException();
assertNotNull(sQLDataException0);
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
assertEquals(0, sQLDataException0.getErrorCode());
assertNull(sQLDataException0.getMessage());
CSVPrinter cSVPrinter0 = cSVFormat0.print(stringWriter0);
assertNotNull(cSVPrinter0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals("", stringWriter0.toString());
cSVPrinter0.printRecord((Iterable<?>) sQLDataException0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
assertEquals(0, sQLDataException0.getErrorCode());
assertNull(sQLDataException0.getMessage());
}
@Test(timeout = 4000)
public void test30() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.DEFAULT;
assertNotNull(cSVFormat0);
assertEquals(',', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) ";");
assertNotNull(charBuffer0);
assertTrue(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertTrue(charBuffer0.hasRemaining());
assertEquals(1, charBuffer0.remaining());
assertEquals(";", charBuffer0.toString());
assertEquals(1, charBuffer0.limit());
assertFalse(charBuffer0.hasArray());
assertFalse(charBuffer0.isDirect());
assertEquals(1, charBuffer0.length());
assertEquals(1, charBuffer0.capacity());
CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer0);
assertNotNull(cSVPrinter0);
assertEquals(',', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.position());
assertTrue(charBuffer0.hasRemaining());
assertEquals(1, charBuffer0.remaining());
assertEquals(";", charBuffer0.toString());
assertEquals(1, charBuffer0.limit());
assertFalse(charBuffer0.hasArray());
assertFalse(charBuffer0.isDirect());
assertEquals(1, charBuffer0.length());
assertEquals(1, charBuffer0.capacity());
// Undeclared exception!
// try {
cSVPrinter0.println();
// fail("Expecting exception: ReadOnlyBufferException");
// } catch(ReadOnlyBufferException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test31() throws Throwable {
StringWriter stringWriter0 = new StringWriter(2);
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
MockPrintWriter mockPrintWriter0 = new MockPrintWriter(stringWriter0);
assertNotNull(mockPrintWriter0);
CSVFormat cSVFormat0 = CSVFormat.newFormat('w');
assertNotNull(cSVFormat0);
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals('w', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintWriter0, cSVFormat0);
assertNotNull(cSVPrinter0);
assertEquals("", stringWriter0.toString());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals('w', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
cSVPrinter0.println();
assertEquals("", stringWriter0.toString());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals('w', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
}
@Test(timeout = 4000)
public void test32() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.newFormat('J');
assertNotNull(cSVFormat0);
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('J', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
PipedWriter pipedWriter0 = new PipedWriter();
assertNotNull(pipedWriter0);
CSVPrinter cSVPrinter0 = new CSVPrinter(pipedWriter0, cSVFormat0);
assertNotNull(cSVPrinter0);
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('J', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
cSVPrinter0.printComment("strng");
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('J', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
}
@Test(timeout = 4000)
public void test33() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
MockPrintStream mockPrintStream0 = new MockPrintStream("@=h");
assertNotNull(mockPrintStream0);
CSVPrinter cSVPrinter0 = cSVFormat0.print(mockPrintStream0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
RowSetMetaDataImpl rowSetMetaDataImpl0 = new RowSetMetaDataImpl();
assertNotNull(rowSetMetaDataImpl0);
ResultSet resultSet0 = mock(ResultSet.class, new ViolatedAssumptionAnswer());
doReturn(rowSetMetaDataImpl0).when(resultSet0).getMetaData();
doReturn(false).when(resultSet0).next();
cSVPrinter0.printRecords(resultSet0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
}
@Test(timeout = 4000)
public void test34() throws Throwable {
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVFormat cSVFormat0 = CSVFormat.RFC4180;
assertNotNull(cSVFormat0);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
PipedReader pipedReader0 = new PipedReader();
assertNotNull(pipedReader0);
CSVParser cSVParser0 = cSVFormat0.parse(pipedReader0);
assertNotNull(cSVParser0);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVParser0.isClosed());
assertEquals(0L, cSVParser0.getCurrentLineNumber());
assertEquals(0L, cSVParser0.getRecordNumber());
CSVPrinter cSVPrinter0 = cSVFormat0.print(stringWriter0);
assertNotNull(cSVPrinter0);
assertEquals("", stringWriter0.toString());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
assertEquals(',', cSVFormat0.getDelimiter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
Object[] objectArray0 = new Object[6];
objectArray0[1] = (Object) cSVParser0;
// Undeclared exception!
// try {
cSVPrinter0.printRecords(objectArray0);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // java.io.IOException: Pipe not connected
// //
// verifyException("org.apache.commons.csv.CSVParser$1", e);
// }
}
@Test(timeout = 4000)
public void test35() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.RFC4180;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
StringWriter stringWriter0 = new StringWriter(44);
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVPrinter cSVPrinter0 = cSVFormat0.print(stringWriter0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertEquals("", stringWriter0.toString());
ArrayDeque<PipedOutputStream> arrayDeque0 = new ArrayDeque<PipedOutputStream>();
assertNotNull(arrayDeque0);
assertEquals(0, arrayDeque0.size());
assertTrue(arrayDeque0.isEmpty());
PipedInputStream pipedInputStream0 = new PipedInputStream();
assertNotNull(pipedInputStream0);
assertEquals(0, pipedInputStream0.available());
PipedOutputStream pipedOutputStream0 = new PipedOutputStream(pipedInputStream0);
assertNotNull(pipedOutputStream0);
assertEquals(0, pipedInputStream0.available());
boolean boolean0 = arrayDeque0.add(pipedOutputStream0);
assertTrue(boolean0);
assertTrue(arrayDeque0.contains(pipedOutputStream0));
assertFalse(arrayDeque0.isEmpty());
assertEquals(1, arrayDeque0.size());
assertEquals(0, pipedInputStream0.available());
cSVPrinter0.printRecords((Iterable<?>) arrayDeque0);
assertTrue(arrayDeque0.contains(pipedOutputStream0));
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(arrayDeque0.isEmpty());
assertEquals(1, arrayDeque0.size());
}
@Test(timeout = 4000)
public void test36() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
CSVFormat cSVFormat1 = cSVFormat0.withCommentMarker('6');
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getQuoteMode());
assertNull(cSVFormat1.getEscapeCharacter());
assertEquals('6', (char)cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getNullString());
MockPrintStream mockPrintStream0 = new MockPrintStream("@=h");
assertNotNull(mockPrintStream0);
CSVPrinter cSVPrinter0 = cSVFormat1.print(mockPrintStream0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getQuoteMode());
assertNull(cSVFormat1.getEscapeCharacter());
assertEquals('6', (char)cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getNullString());
cSVPrinter0.print(cSVFormat0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getQuoteMode());
assertNull(cSVFormat1.getEscapeCharacter());
assertEquals('6', (char)cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getNullString());
cSVPrinter0.printComment("The comment start character and the delimiter cannot be the same ('");
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getQuoteMode());
assertNull(cSVFormat1.getEscapeCharacter());
assertEquals('6', (char)cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getNullString());
}
@Test(timeout = 4000)
public void test37() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.RFC4180;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) "8");
assertNotNull(charBuffer0);
assertFalse(charBuffer0.isDirect());
assertEquals(1, charBuffer0.length());
assertTrue(charBuffer0.hasRemaining());
assertEquals(1, charBuffer0.remaining());
assertTrue(charBuffer0.isReadOnly());
assertEquals(1, charBuffer0.limit());
assertFalse(charBuffer0.hasArray());
assertEquals("8", charBuffer0.toString());
assertEquals(1, charBuffer0.capacity());
assertEquals(0, charBuffer0.position());
CSVFormat cSVFormat1 = cSVFormat0.withCommentMarker('8');
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertEquals(',', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('8', (char)cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
CSVPrinter cSVPrinter0 = cSVFormat1.print(charBuffer0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(charBuffer0.isDirect());
assertEquals(1, charBuffer0.length());
assertTrue(charBuffer0.hasRemaining());
assertEquals(1, charBuffer0.remaining());
assertTrue(charBuffer0.isReadOnly());
assertEquals(1, charBuffer0.limit());
assertFalse(charBuffer0.hasArray());
assertEquals("8", charBuffer0.toString());
assertEquals(1, charBuffer0.capacity());
assertEquals(0, charBuffer0.position());
assertEquals(',', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('8', (char)cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
// Undeclared exception!
// try {
cSVPrinter0.printComment("");
// fail("Expecting exception: ReadOnlyBufferException");
// } catch(ReadOnlyBufferException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.StringCharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test38() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVFormat cSVFormat1 = cSVFormat0.withNullString("Unexpected Quote value: ");
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.isNullStringSet());
assertEquals("Unexpected Quote value: ", cSVFormat1.getNullString());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertNull(cSVFormat1.getCommentMarker());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\t', cSVFormat1.getDelimiter());
CSVPrinter cSVPrinter0 = new CSVPrinter(stringWriter0, cSVFormat1);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("", stringWriter0.toString());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.isNullStringSet());
assertEquals("Unexpected Quote value: ", cSVFormat1.getNullString());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertNull(cSVFormat1.getCommentMarker());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\t', cSVFormat1.getDelimiter());
cSVPrinter0.print((Object) null);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\"Unexpected Quote value: \"", stringWriter0.toString());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.isNullStringSet());
assertEquals("Unexpected Quote value: ", cSVFormat1.getNullString());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertNull(cSVFormat1.getCommentMarker());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\t', cSVFormat1.getDelimiter());
}
@Test(timeout = 4000)
public void test39() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.RFC4180;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
StringWriter stringWriter0 = new StringWriter(44);
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVFormat cSVFormat1 = cSVFormat0.withDelimiter('o');
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertNull(cSVFormat1.getNullString());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals('o', cSVFormat1.getDelimiter());
CSVPrinter cSVPrinter0 = new CSVPrinter(stringWriter0, cSVFormat1);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals("", stringWriter0.toString());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertNull(cSVFormat1.getNullString());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals('o', cSVFormat1.getDelimiter());
Object[] objectArray0 = new Object[3];
objectArray0[1] = (Object) cSVFormat1;
cSVPrinter0.printRecord(objectArray0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertEquals(3, objectArray0.length);
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertNull(cSVFormat1.getNullString());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals('o', cSVFormat1.getDelimiter());
}
@Test(timeout = 4000)
public void test40() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVFormat cSVFormat1 = cSVFormat0.withNullString("!;lvb");
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(',', cSVFormat1.getDelimiter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals("!;lvb", cSVFormat1.getNullString());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
CSVPrinter cSVPrinter0 = new CSVPrinter(stringWriter0, cSVFormat1);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertEquals("", stringWriter0.toString());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(',', cSVFormat1.getDelimiter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals("!;lvb", cSVFormat1.getNullString());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
Object[] objectArray0 = new Object[9];
cSVPrinter0.printRecord(objectArray0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertEquals(9, objectArray0.length);
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertEquals("\"!;lvb\",\"!;lvb\",\"!;lvb\",\"!;lvb\",\"!;lvb\",\"!;lvb\",\"!;lvb\",\"!;lvb\",\"!;lvb\"\r\n", stringWriter0.toString());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(',', cSVFormat1.getDelimiter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals("!;lvb", cSVFormat1.getNullString());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
}
@Test(timeout = 4000)
public void test41() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.RFC4180;
assertNotNull(cSVFormat0);
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVFormat cSVFormat1 = cSVFormat0.withNullString("}l`");
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals("}l`", cSVFormat1.getNullString());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertEquals(',', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getQuoteMode());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
CSVPrinter cSVPrinter0 = cSVFormat1.print(stringWriter0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVPrinter0);
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("", stringWriter0.toString());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals("}l`", cSVFormat1.getNullString());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertEquals(',', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getQuoteMode());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
cSVPrinter0.print((Object) null);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\"}l`\"", stringWriter0.toString());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals("}l`", cSVFormat1.getNullString());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertEquals(',', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getQuoteMode());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
}
@Test(timeout = 4000)
public void test42() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(',', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVFormat cSVFormat1 = cSVFormat0.withNullString("]?<A");
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(',', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals(',', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isNullStringSet());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertEquals("]?<A", cSVFormat1.getNullString());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
CSVPrinter cSVPrinter0 = new CSVPrinter(stringWriter0, cSVFormat1);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(',', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("", stringWriter0.toString());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals(',', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isNullStringSet());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertEquals("]?<A", cSVFormat1.getNullString());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
cSVPrinter0.print((Object) null);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(',', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\"]?<A\"", stringWriter0.toString());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals(',', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isNullStringSet());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertEquals("]?<A", cSVFormat1.getNullString());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
}
@Test(timeout = 4000)
public void test43() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVFormat cSVFormat1 = cSVFormat0.withNullString(";lvb");
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(";lvb", cSVFormat1.getNullString());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertNull(cSVFormat1.getEscapeCharacter());
assertNull(cSVFormat1.getQuoteMode());
assertTrue(cSVFormat1.isNullStringSet());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
CSVPrinter cSVPrinter0 = new CSVPrinter(stringWriter0, cSVFormat1);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertEquals("", stringWriter0.toString());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(";lvb", cSVFormat1.getNullString());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertNull(cSVFormat1.getEscapeCharacter());
assertNull(cSVFormat1.getQuoteMode());
assertTrue(cSVFormat1.isNullStringSet());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
cSVPrinter0.print((Object) null);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getCommentMarker());
assertEquals("\";lvb\"", stringWriter0.toString());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(";lvb", cSVFormat1.getNullString());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertNull(cSVFormat1.getEscapeCharacter());
assertNull(cSVFormat1.getQuoteMode());
assertTrue(cSVFormat1.isNullStringSet());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
}
@Test(timeout = 4000)
public void test44() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals('\t', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getEscapeCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
SQLDataException sQLDataException0 = new SQLDataException("");
assertNotNull(sQLDataException0);
assertEquals(0, sQLDataException0.getErrorCode());
assertEquals("", sQLDataException0.getMessage());
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException: ", sQLDataException0.toString());
SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException0 = new SQLIntegrityConstraintViolationException("", sQLDataException0);
assertNotNull(sQLIntegrityConstraintViolationException0);
assertEquals(0, sQLDataException0.getErrorCode());
assertEquals("", sQLDataException0.getMessage());
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException: ", sQLDataException0.toString());
assertNull(sQLIntegrityConstraintViolationException0.getSQLState());
assertEquals("java.sql.SQLIntegrityConstraintViolationException: ", sQLIntegrityConstraintViolationException0.toString());
assertEquals("", sQLIntegrityConstraintViolationException0.getMessage());
assertEquals(0, sQLIntegrityConstraintViolationException0.getErrorCode());
SQLDataException sQLDataException1 = (SQLDataException)sQLDataException0.initCause(sQLIntegrityConstraintViolationException0);
assertSame(sQLDataException0, sQLDataException1);
assertSame(sQLDataException1, sQLDataException0);
assertNotNull(sQLDataException1);
assertEquals(0, sQLDataException0.getErrorCode());
assertEquals("", sQLDataException0.getMessage());
assertNull(sQLDataException0.getSQLState());
assertEquals("java.sql.SQLDataException: ", sQLDataException0.toString());
assertNull(sQLIntegrityConstraintViolationException0.getSQLState());
assertEquals("java.sql.SQLIntegrityConstraintViolationException: ", sQLIntegrityConstraintViolationException0.toString());
assertEquals("", sQLIntegrityConstraintViolationException0.getMessage());
assertEquals(0, sQLIntegrityConstraintViolationException0.getErrorCode());
assertNull(sQLDataException1.getSQLState());
assertEquals("", sQLDataException1.getMessage());
assertEquals(0, sQLDataException1.getErrorCode());
assertEquals("java.sql.SQLDataException: ", sQLDataException1.toString());
CSVPrinter cSVPrinter0 = new CSVPrinter(stringWriter0, cSVFormat0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals('\t', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getEscapeCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertEquals("", stringWriter0.toString());
// Undeclared exception!
cSVPrinter0.printRecords((Iterable<?>) sQLDataException0);
}
@Test(timeout = 4000)
public void test45() throws Throwable {
MockFile mockFile0 = new MockFile("MySQL");
assertNotNull(mockFile0);
MockPrintStream mockPrintStream0 = new MockPrintStream(mockFile0);
assertNotNull(mockPrintStream0);
OutputStreamWriter outputStreamWriter0 = new OutputStreamWriter(mockPrintStream0);
assertNotNull(outputStreamWriter0);
assertEquals("MySQL", mockFile0.getName());
assertTrue(mockFile0.canExecute());
assertEquals(0L, mockFile0.getTotalSpace());
assertTrue(mockFile0.exists());
assertEquals(1392409281320L, mockFile0.lastModified());
assertTrue(mockFile0.isFile());
assertTrue(mockFile0.canRead());
assertEquals("MySQL", mockFile0.toString());
assertEquals(0L, mockFile0.getUsableSpace());
assertFalse(mockFile0.isHidden());
assertNull(mockFile0.getParent());
assertFalse(mockFile0.isAbsolute());
assertEquals(0L, mockFile0.length());
assertFalse(mockFile0.isDirectory());
assertTrue(mockFile0.canWrite());
assertEquals(0L, mockFile0.getFreeSpace());
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
QuoteMode quoteMode0 = QuoteMode.NON_NUMERIC;
CSVFormat cSVFormat1 = cSVFormat0.withQuoteMode(quoteMode0);
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('\t', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertEquals(QuoteMode.NON_NUMERIC, cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
CSVFormat cSVFormat2 = cSVFormat1.withAllowMissingColumnNames();
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertTrue(cSVFormat2.equals((Object)cSVFormat1));
assertFalse(cSVFormat2.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat2);
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat2);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotSame(cSVFormat2, cSVFormat1);
assertNotSame(cSVFormat2, cSVFormat0);
assertNotNull(cSVFormat2);
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('\t', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertEquals(QuoteMode.NON_NUMERIC, cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals("\r\n", cSVFormat2.getRecordSeparator());
assertNull(cSVFormat2.getCommentMarker());
assertTrue(cSVFormat2.getIgnoreEmptyLines());
assertFalse(cSVFormat2.getSkipHeaderRecord());
assertFalse(cSVFormat2.isEscapeCharacterSet());
assertNull(cSVFormat2.getEscapeCharacter());
assertEquals('\t', cSVFormat2.getDelimiter());
assertTrue(cSVFormat2.isQuoteCharacterSet());
assertEquals(QuoteMode.NON_NUMERIC, cSVFormat2.getQuoteMode());
assertFalse(cSVFormat2.isCommentMarkerSet());
assertFalse(cSVFormat2.getIgnoreHeaderCase());
assertNull(cSVFormat2.getNullString());
assertTrue(cSVFormat2.getAllowMissingColumnNames());
assertFalse(cSVFormat2.isNullStringSet());
assertEquals('\"', (char)cSVFormat2.getQuoteCharacter());
assertTrue(cSVFormat2.getIgnoreSurroundingSpaces());
CSVPrinter cSVPrinter0 = new CSVPrinter(outputStreamWriter0, cSVFormat2);
assertFalse(cSVFormat0.equals((Object)cSVFormat2));
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertTrue(cSVFormat1.equals((Object)cSVFormat2));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertTrue(cSVFormat2.equals((Object)cSVFormat1));
assertFalse(cSVFormat2.equals((Object)cSVFormat0));
assertNotNull(cSVPrinter0);
assertEquals("MySQL", mockFile0.getName());
assertTrue(mockFile0.canExecute());
assertEquals(0L, mockFile0.getTotalSpace());
assertTrue(mockFile0.exists());
assertEquals(1392409281320L, mockFile0.lastModified());
assertTrue(mockFile0.isFile());
assertTrue(mockFile0.canRead());
assertEquals("MySQL", mockFile0.toString());
assertEquals(0L, mockFile0.getUsableSpace());
assertFalse(mockFile0.isHidden());
assertNull(mockFile0.getParent());
assertFalse(mockFile0.isAbsolute());
assertEquals(0L, mockFile0.length());
assertFalse(mockFile0.isDirectory());
assertTrue(mockFile0.canWrite());
assertEquals(0L, mockFile0.getFreeSpace());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('\t', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertEquals(QuoteMode.NON_NUMERIC, cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals("\r\n", cSVFormat2.getRecordSeparator());
assertNull(cSVFormat2.getCommentMarker());
assertTrue(cSVFormat2.getIgnoreEmptyLines());
assertFalse(cSVFormat2.getSkipHeaderRecord());
assertFalse(cSVFormat2.isEscapeCharacterSet());
assertNull(cSVFormat2.getEscapeCharacter());
assertEquals('\t', cSVFormat2.getDelimiter());
assertTrue(cSVFormat2.isQuoteCharacterSet());
assertEquals(QuoteMode.NON_NUMERIC, cSVFormat2.getQuoteMode());
assertFalse(cSVFormat2.isCommentMarkerSet());
assertFalse(cSVFormat2.getIgnoreHeaderCase());
assertNull(cSVFormat2.getNullString());
assertTrue(cSVFormat2.getAllowMissingColumnNames());
assertFalse(cSVFormat2.isNullStringSet());
assertEquals('\"', (char)cSVFormat2.getQuoteCharacter());
assertTrue(cSVFormat2.getIgnoreSurroundingSpaces());
Double double0 = new Double(911.828595);
assertEquals(911.828595, (double)double0, 0.01);
assertNotNull(double0);
cSVPrinter0.print(double0);
assertFalse(cSVFormat0.equals((Object)cSVFormat2));
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertTrue(cSVFormat1.equals((Object)cSVFormat2));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertTrue(cSVFormat2.equals((Object)cSVFormat1));
assertFalse(cSVFormat2.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat2);
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat2);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotSame(cSVFormat2, cSVFormat1);
assertNotSame(cSVFormat2, cSVFormat0);
assertEquals("MySQL", mockFile0.getName());
assertTrue(mockFile0.canExecute());
assertEquals(0L, mockFile0.getTotalSpace());
assertTrue(mockFile0.exists());
assertEquals(1392409281320L, mockFile0.lastModified());
assertTrue(mockFile0.isFile());
assertTrue(mockFile0.canRead());
assertEquals("MySQL", mockFile0.toString());
assertEquals(0L, mockFile0.getUsableSpace());
assertFalse(mockFile0.isHidden());
assertNull(mockFile0.getParent());
assertFalse(mockFile0.isAbsolute());
assertEquals(0L, mockFile0.length());
assertFalse(mockFile0.isDirectory());
assertTrue(mockFile0.canWrite());
assertEquals(0L, mockFile0.getFreeSpace());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getNullString());
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals('\t', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertEquals(QuoteMode.NON_NUMERIC, cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals("\r\n", cSVFormat2.getRecordSeparator());
assertNull(cSVFormat2.getCommentMarker());
assertTrue(cSVFormat2.getIgnoreEmptyLines());
assertFalse(cSVFormat2.getSkipHeaderRecord());
assertFalse(cSVFormat2.isEscapeCharacterSet());
assertNull(cSVFormat2.getEscapeCharacter());
assertEquals('\t', cSVFormat2.getDelimiter());
assertTrue(cSVFormat2.isQuoteCharacterSet());
assertEquals(QuoteMode.NON_NUMERIC, cSVFormat2.getQuoteMode());
assertFalse(cSVFormat2.isCommentMarkerSet());
assertFalse(cSVFormat2.getIgnoreHeaderCase());
assertNull(cSVFormat2.getNullString());
assertTrue(cSVFormat2.getAllowMissingColumnNames());
assertFalse(cSVFormat2.isNullStringSet());
assertEquals('\"', (char)cSVFormat2.getQuoteCharacter());
assertTrue(cSVFormat2.getIgnoreSurroundingSpaces());
}
@Test(timeout = 4000)
public void test46() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
assertNotNull(cSVFormat0);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals(',', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVFormat cSVFormat1 = cSVFormat0.withEscape('H');
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals(',', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals('H', (char)cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(',', cSVFormat1.getDelimiter());
QuoteMode quoteMode0 = QuoteMode.NONE;
CSVFormat cSVFormat2 = cSVFormat1.withQuoteMode(quoteMode0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertFalse(cSVFormat2.equals((Object)cSVFormat0));
assertFalse(cSVFormat2.equals((Object)cSVFormat1));
assertNotSame(cSVFormat0, cSVFormat2);
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotSame(cSVFormat1, cSVFormat2);
assertNotSame(cSVFormat2, cSVFormat0);
assertNotSame(cSVFormat2, cSVFormat1);
assertNotNull(cSVFormat2);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals(',', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals('H', (char)cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(',', cSVFormat1.getDelimiter());
assertTrue(cSVFormat2.isEscapeCharacterSet());
assertEquals('\"', (char)cSVFormat2.getQuoteCharacter());
assertEquals(',', cSVFormat2.getDelimiter());
assertNull(cSVFormat2.getNullString());
assertTrue(cSVFormat2.getAllowMissingColumnNames());
assertFalse(cSVFormat2.isNullStringSet());
assertFalse(cSVFormat2.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat2.isQuoteCharacterSet());
assertFalse(cSVFormat2.isCommentMarkerSet());
assertFalse(cSVFormat2.getIgnoreEmptyLines());
assertFalse(cSVFormat2.getIgnoreHeaderCase());
assertEquals(QuoteMode.NONE, cSVFormat2.getQuoteMode());
assertEquals("\r\n", cSVFormat2.getRecordSeparator());
assertNull(cSVFormat2.getCommentMarker());
assertFalse(cSVFormat2.getSkipHeaderRecord());
assertEquals('H', (char)cSVFormat2.getEscapeCharacter());
CSVPrinter cSVPrinter0 = cSVFormat2.print(stringWriter0);
assertFalse(cSVFormat0.equals((Object)cSVFormat2));
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertFalse(cSVFormat1.equals((Object)cSVFormat2));
assertFalse(cSVFormat2.equals((Object)cSVFormat0));
assertFalse(cSVFormat2.equals((Object)cSVFormat1));
assertNotSame(cSVFormat0, cSVFormat2);
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotSame(cSVFormat1, cSVFormat2);
assertNotSame(cSVFormat2, cSVFormat0);
assertNotSame(cSVFormat2, cSVFormat1);
assertNotNull(cSVPrinter0);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals(',', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertEquals("", stringWriter0.toString());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals('H', (char)cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(',', cSVFormat1.getDelimiter());
assertTrue(cSVFormat2.isEscapeCharacterSet());
assertEquals('\"', (char)cSVFormat2.getQuoteCharacter());
assertEquals(',', cSVFormat2.getDelimiter());
assertNull(cSVFormat2.getNullString());
assertTrue(cSVFormat2.getAllowMissingColumnNames());
assertFalse(cSVFormat2.isNullStringSet());
assertFalse(cSVFormat2.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat2.isQuoteCharacterSet());
assertFalse(cSVFormat2.isCommentMarkerSet());
assertFalse(cSVFormat2.getIgnoreEmptyLines());
assertFalse(cSVFormat2.getIgnoreHeaderCase());
assertEquals(QuoteMode.NONE, cSVFormat2.getQuoteMode());
assertEquals("\r\n", cSVFormat2.getRecordSeparator());
assertNull(cSVFormat2.getCommentMarker());
assertFalse(cSVFormat2.getSkipHeaderRecord());
assertEquals('H', (char)cSVFormat2.getEscapeCharacter());
Float float0 = new Float(0.0);
assertEquals(0.0F, (float)float0, 0.01F);
assertNotNull(float0);
cSVPrinter0.print(float0);
assertFalse(cSVFormat0.equals((Object)cSVFormat2));
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertFalse(cSVFormat1.equals((Object)cSVFormat2));
assertFalse(cSVFormat2.equals((Object)cSVFormat0));
assertFalse(cSVFormat2.equals((Object)cSVFormat1));
assertNotSame(cSVFormat0, cSVFormat2);
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotSame(cSVFormat1, cSVFormat2);
assertNotSame(cSVFormat2, cSVFormat0);
assertNotSame(cSVFormat2, cSVFormat1);
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertEquals(',', cSVFormat0.getDelimiter());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertEquals('H', (char)cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(',', cSVFormat1.getDelimiter());
assertTrue(cSVFormat2.isEscapeCharacterSet());
assertEquals('\"', (char)cSVFormat2.getQuoteCharacter());
assertEquals(',', cSVFormat2.getDelimiter());
assertNull(cSVFormat2.getNullString());
assertTrue(cSVFormat2.getAllowMissingColumnNames());
assertFalse(cSVFormat2.isNullStringSet());
assertFalse(cSVFormat2.getIgnoreSurroundingSpaces());
assertTrue(cSVFormat2.isQuoteCharacterSet());
assertFalse(cSVFormat2.isCommentMarkerSet());
assertFalse(cSVFormat2.getIgnoreEmptyLines());
assertFalse(cSVFormat2.getIgnoreHeaderCase());
assertEquals(QuoteMode.NONE, cSVFormat2.getQuoteMode());
assertEquals("\r\n", cSVFormat2.getRecordSeparator());
assertNull(cSVFormat2.getCommentMarker());
assertFalse(cSVFormat2.getSkipHeaderRecord());
assertEquals('H', (char)cSVFormat2.getEscapeCharacter());
}
@Test(timeout = 4000)
public void test47() throws Throwable {
MockFile mockFile0 = new MockFile("MySQL");
assertNotNull(mockFile0);
MockPrintStream mockPrintStream0 = new MockPrintStream(mockFile0);
assertNotNull(mockPrintStream0);
OutputStreamWriter outputStreamWriter0 = new OutputStreamWriter(mockPrintStream0);
assertNotNull(outputStreamWriter0);
assertEquals("MySQL", mockFile0.toString());
assertFalse(mockFile0.isDirectory());
assertEquals(0L, mockFile0.getUsableSpace());
assertFalse(mockFile0.isHidden());
assertNull(mockFile0.getParent());
assertEquals(1392409281320L, mockFile0.lastModified());
assertTrue(mockFile0.isFile());
assertTrue(mockFile0.canWrite());
assertTrue(mockFile0.canRead());
assertTrue(mockFile0.exists());
assertEquals(0L, mockFile0.length());
assertEquals(0L, mockFile0.getFreeSpace());
assertEquals(0L, mockFile0.getTotalSpace());
assertFalse(mockFile0.isAbsolute());
assertTrue(mockFile0.canExecute());
assertEquals("MySQL", mockFile0.getName());
CSVFormat cSVFormat0 = CSVFormat.TDF;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getNullString());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
QuoteMode quoteMode0 = QuoteMode.NON_NUMERIC;
CSVFormat cSVFormat1 = cSVFormat0.withQuoteMode(quoteMode0);
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getNullString());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(QuoteMode.NON_NUMERIC, cSVFormat1.getQuoteMode());
CSVPrinter cSVPrinter0 = new CSVPrinter(outputStreamWriter0, cSVFormat1);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotNull(cSVPrinter0);
assertEquals("MySQL", mockFile0.toString());
assertFalse(mockFile0.isDirectory());
assertEquals(0L, mockFile0.getUsableSpace());
assertFalse(mockFile0.isHidden());
assertNull(mockFile0.getParent());
assertEquals(1392409281320L, mockFile0.lastModified());
assertTrue(mockFile0.isFile());
assertTrue(mockFile0.canWrite());
assertTrue(mockFile0.canRead());
assertTrue(mockFile0.exists());
assertEquals(0L, mockFile0.length());
assertEquals(0L, mockFile0.getFreeSpace());
assertEquals(0L, mockFile0.getTotalSpace());
assertFalse(mockFile0.isAbsolute());
assertTrue(mockFile0.canExecute());
assertEquals("MySQL", mockFile0.getName());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getNullString());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(QuoteMode.NON_NUMERIC, cSVFormat1.getQuoteMode());
cSVPrinter0.print(outputStreamWriter0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertEquals("MySQL", mockFile0.toString());
assertFalse(mockFile0.isDirectory());
assertEquals(0L, mockFile0.getUsableSpace());
assertFalse(mockFile0.isHidden());
assertNull(mockFile0.getParent());
assertEquals(1392409281320L, mockFile0.lastModified());
assertTrue(mockFile0.isFile());
assertTrue(mockFile0.canWrite());
assertTrue(mockFile0.canRead());
assertTrue(mockFile0.exists());
assertEquals(0L, mockFile0.length());
assertEquals(0L, mockFile0.getFreeSpace());
assertEquals(0L, mockFile0.getTotalSpace());
assertFalse(mockFile0.isAbsolute());
assertTrue(mockFile0.canExecute());
assertEquals("MySQL", mockFile0.getName());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertTrue(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertTrue(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getNullString());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.isNullStringSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertTrue(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertNull(cSVFormat1.getCommentMarker());
assertEquals(QuoteMode.NON_NUMERIC, cSVFormat1.getQuoteMode());
}
@Test(timeout = 4000)
public void test48() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
QuoteMode quoteMode0 = QuoteMode.ALL;
CSVFormat cSVFormat1 = cSVFormat0.withQuoteMode(quoteMode0);
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(QuoteMode.ALL, cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat1.getDelimiter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
CSVPrinter cSVPrinter0 = new CSVPrinter(stringWriter0, cSVFormat1);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals("", stringWriter0.toString());
assertEquals(QuoteMode.ALL, cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat1.getDelimiter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
cSVPrinter0.print("GeQtQak@");
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertEquals("\r\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isQuoteCharacterSet());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertEquals('\"', (char)cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertNull(cSVFormat0.getQuoteMode());
assertEquals(',', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getNullString());
assertTrue(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertEquals(QuoteMode.ALL, cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isNullStringSet());
assertFalse(cSVFormat1.isEscapeCharacterSet());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.getAllowMissingColumnNames());
assertEquals('\"', (char)cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertTrue(cSVFormat1.isQuoteCharacterSet());
assertNull(cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals(',', cSVFormat1.getDelimiter());
assertEquals("\r\n", cSVFormat1.getRecordSeparator());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
}
@Test(timeout = 4000)
public void test49() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
StringWriter stringWriter0 = new StringWriter();
assertNotNull(stringWriter0);
assertEquals("", stringWriter0.toString());
CSVFormat cSVFormat1 = cSVFormat0.withEscape('1');
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isQuoteCharacterSet());
assertEquals("\n", cSVFormat1.getRecordSeparator());
assertEquals('1', (char)cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
SQLDataException sQLDataException0 = new SQLDataException();
assertNotNull(sQLDataException0);
assertEquals(0, sQLDataException0.getErrorCode());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
assertNull(sQLDataException0.getSQLState());
assertNull(sQLDataException0.getMessage());
StackTraceElement[] stackTraceElementArray0 = sQLDataException0.getStackTrace();
assertNotNull(stackTraceElementArray0);
assertEquals(13, stackTraceElementArray0.length);
assertEquals(0, sQLDataException0.getErrorCode());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
assertNull(sQLDataException0.getSQLState());
assertNull(sQLDataException0.getMessage());
CSVPrinter cSVPrinter0 = cSVFormat1.print(stringWriter0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVPrinter0);
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertEquals("", stringWriter0.toString());
assertNull(cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isQuoteCharacterSet());
assertEquals("\n", cSVFormat1.getRecordSeparator());
assertEquals('1', (char)cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
cSVPrinter0.printRecords((Object[]) stackTraceElementArray0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertEquals(13, stackTraceElementArray0.length);
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteCharacter());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getCommentMarker());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat1.getQuoteCharacter());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getNullString());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertEquals('\t', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteMode());
assertFalse(cSVFormat1.isQuoteCharacterSet());
assertEquals("\n", cSVFormat1.getRecordSeparator());
assertEquals('1', (char)cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertEquals(0, sQLDataException0.getErrorCode());
assertEquals("java.sql.SQLDataException", sQLDataException0.toString());
assertNull(sQLDataException0.getSQLState());
assertNull(sQLDataException0.getMessage());
}
@Test(timeout = 4000)
public void test50() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
PipedOutputStream pipedOutputStream0 = new PipedOutputStream();
assertNotNull(pipedOutputStream0);
MockPrintWriter mockPrintWriter0 = new MockPrintWriter(pipedOutputStream0);
assertNotNull(mockPrintWriter0);
CSVFormat cSVFormat1 = cSVFormat0.withDelimiter('L');
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVFormat1);
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.isQuoteCharacterSet());
assertEquals("\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals('\\', (char)cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteCharacter());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('L', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
CSVPrinter cSVPrinter0 = cSVFormat1.print(mockPrintWriter0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.isQuoteCharacterSet());
assertEquals("\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals('\\', (char)cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteCharacter());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('L', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException0 = new SQLInvalidAuthorizationSpecException("hk;}+)8>");
assertNotNull(sQLInvalidAuthorizationSpecException0);
assertNull(sQLInvalidAuthorizationSpecException0.getSQLState());
assertEquals("hk;}+)8>", sQLInvalidAuthorizationSpecException0.getMessage());
assertEquals("java.sql.SQLInvalidAuthorizationSpecException: hk;}+)8>", sQLInvalidAuthorizationSpecException0.toString());
assertEquals(0, sQLInvalidAuthorizationSpecException0.getErrorCode());
cSVPrinter0.print(sQLInvalidAuthorizationSpecException0);
assertFalse(cSVFormat0.equals((Object)cSVFormat1));
assertFalse(cSVFormat1.equals((Object)cSVFormat0));
assertNotSame(cSVFormat0, cSVFormat1);
assertNotSame(cSVFormat1, cSVFormat0);
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertNull(cSVFormat0.getNullString());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertNull(cSVFormat0.getCommentMarker());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.isNullStringSet());
assertNull(cSVFormat0.getQuoteMode());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat1.isCommentMarkerSet());
assertFalse(cSVFormat1.isQuoteCharacterSet());
assertEquals("\n", cSVFormat1.getRecordSeparator());
assertFalse(cSVFormat1.getIgnoreSurroundingSpaces());
assertEquals('\\', (char)cSVFormat1.getEscapeCharacter());
assertFalse(cSVFormat1.isNullStringSet());
assertNull(cSVFormat1.getQuoteCharacter());
assertNull(cSVFormat1.getNullString());
assertFalse(cSVFormat1.getIgnoreEmptyLines());
assertNull(cSVFormat1.getQuoteMode());
assertEquals('L', cSVFormat1.getDelimiter());
assertFalse(cSVFormat1.getSkipHeaderRecord());
assertFalse(cSVFormat1.getAllowMissingColumnNames());
assertTrue(cSVFormat1.isEscapeCharacterSet());
assertNull(cSVFormat1.getCommentMarker());
assertFalse(cSVFormat1.getIgnoreHeaderCase());
assertNull(sQLInvalidAuthorizationSpecException0.getSQLState());
assertEquals("hk;}+)8>", sQLInvalidAuthorizationSpecException0.getMessage());
assertEquals("java.sql.SQLInvalidAuthorizationSpecException: hk;}+)8>", sQLInvalidAuthorizationSpecException0.toString());
assertEquals(0, sQLInvalidAuthorizationSpecException0.getErrorCode());
}
@Test(timeout = 4000)
public void test51() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.newFormat('J');
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals('J', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getRecordSeparator());
Object[] objectArray0 = new Object[8];
PipedWriter pipedWriter0 = new PipedWriter();
assertNotNull(pipedWriter0);
CSVPrinter cSVPrinter0 = new CSVPrinter(pipedWriter0, cSVFormat0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertNull(cSVFormat0.getNullString());
assertNull(cSVFormat0.getEscapeCharacter());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertNull(cSVFormat0.getQuoteMode());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.isEscapeCharacterSet());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertEquals('J', cSVFormat0.getDelimiter());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getRecordSeparator());
// try {
cSVPrinter0.printRecord(objectArray0);
// fail("Expecting exception: IOException");
// } catch(IOException e) {
// //
// // Pipe not connected
// //
// verifyException("java.io.PipedWriter", e);
// }
}
@Test(timeout = 4000)
public void test52() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.MYSQL;
assertNotNull(cSVFormat0);
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\t', cSVFormat0.getDelimiter());
Charset charset0 = Charset.defaultCharset();
assertNotNull(charset0);
assertTrue(charset0.isRegistered());
assertEquals("US-ASCII", charset0.name());
assertEquals("US-ASCII", charset0.displayName());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.canEncode());
ByteBuffer byteBuffer0 = ByteBuffer.allocateDirect(0);
assertNotNull(byteBuffer0);
assertTrue(byteBuffer0.isDirect());
assertFalse(byteBuffer0.hasArray());
assertEquals(0, byteBuffer0.capacity());
assertEquals(0, byteBuffer0.remaining());
assertFalse(byteBuffer0.hasRemaining());
assertEquals(0, byteBuffer0.limit());
assertEquals(0, byteBuffer0.position());
assertEquals("java.nio.DirectByteBuffer[pos=0 lim=0 cap=0]", byteBuffer0.toString());
assertFalse(byteBuffer0.isReadOnly());
CharBuffer charBuffer0 = charset0.decode(byteBuffer0);
assertNotNull(charBuffer0);
assertTrue(charset0.isRegistered());
assertEquals("US-ASCII", charset0.name());
assertEquals("US-ASCII", charset0.displayName());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.canEncode());
assertTrue(byteBuffer0.isDirect());
assertFalse(byteBuffer0.hasArray());
assertEquals(0, byteBuffer0.capacity());
assertEquals(0, byteBuffer0.remaining());
assertFalse(byteBuffer0.hasRemaining());
assertEquals(0, byteBuffer0.limit());
assertEquals(0, byteBuffer0.position());
assertEquals("java.nio.DirectByteBuffer[pos=0 lim=0 cap=0]", byteBuffer0.toString());
assertFalse(byteBuffer0.isReadOnly());
assertFalse(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.remaining());
assertEquals(0, charBuffer0.capacity());
assertEquals(0, charBuffer0.limit());
assertFalse(charBuffer0.isDirect());
assertFalse(charBuffer0.hasRemaining());
assertEquals(0, charBuffer0.length());
assertEquals(0, charBuffer0.arrayOffset());
assertEquals("", charBuffer0.toString());
assertTrue(charBuffer0.hasArray());
assertEquals(0, charBuffer0.position());
CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer0);
assertNotNull(cSVPrinter0);
assertFalse(cSVFormat0.getAllowMissingColumnNames());
assertTrue(cSVFormat0.isEscapeCharacterSet());
assertNull(cSVFormat0.getCommentMarker());
assertNull(cSVFormat0.getQuoteCharacter());
assertFalse(cSVFormat0.getSkipHeaderRecord());
assertFalse(cSVFormat0.getIgnoreSurroundingSpaces());
assertFalse(cSVFormat0.isQuoteCharacterSet());
assertEquals("\n", cSVFormat0.getRecordSeparator());
assertFalse(cSVFormat0.isCommentMarkerSet());
assertFalse(cSVFormat0.getIgnoreEmptyLines());
assertFalse(cSVFormat0.getIgnoreHeaderCase());
assertNull(cSVFormat0.getQuoteMode());
assertNull(cSVFormat0.getNullString());
assertEquals('\\', (char)cSVFormat0.getEscapeCharacter());
assertFalse(cSVFormat0.isNullStringSet());
assertEquals('\t', cSVFormat0.getDelimiter());
assertTrue(charset0.isRegistered());
assertEquals("US-ASCII", charset0.name());
assertEquals("US-ASCII", charset0.displayName());
assertEquals("US-ASCII", charset0.toString());
assertTrue(charset0.canEncode());
assertTrue(byteBuffer0.isDirect());
assertFalse(byteBuffer0.hasArray());
assertEquals(0, byteBuffer0.capacity());
assertEquals(0, byteBuffer0.remaining());
assertFalse(byteBuffer0.hasRemaining());
assertEquals(0, byteBuffer0.limit());
assertEquals(0, byteBuffer0.position());
assertEquals("java.nio.DirectByteBuffer[pos=0 lim=0 cap=0]", byteBuffer0.toString());
assertFalse(byteBuffer0.isReadOnly());
assertFalse(charBuffer0.isReadOnly());
assertEquals(0, charBuffer0.remaining());
assertEquals(0, charBuffer0.capacity());
assertEquals(0, charBuffer0.limit());
assertFalse(charBuffer0.isDirect());
assertFalse(charBuffer0.hasRemaining());
assertEquals(0, charBuffer0.length());
assertEquals(0, charBuffer0.arrayOffset());
assertEquals("", charBuffer0.toString());
assertTrue(charBuffer0.hasArray());
assertEquals(0, charBuffer0.position());
// Undeclared exception!
// try {
cSVPrinter0.print(charBuffer0);
// fail("Expecting exception: BufferOverflowException");
// } catch(BufferOverflowException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test53() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
MockPrintStream mockPrintStream0 = new MockPrintStream("3m4n");
RowSetMetaDataImpl rowSetMetaDataImpl0 = new RowSetMetaDataImpl();
rowSetMetaDataImpl0.setColumnCount(1882);
ResultSet resultSet0 = mock(ResultSet.class, new ViolatedAssumptionAnswer());
doReturn(rowSetMetaDataImpl0).when(resultSet0).getMetaData();
doReturn((Object) null, (Object) null, (Object) null, (Object) null, (Object) null).when(resultSet0).getObject(anyInt());
doReturn(true, true, true, false).when(resultSet0).next();
CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintStream0, cSVFormat0);
cSVPrinter0.printRecords(resultSet0);
}
@Test(timeout = 4000)
public void test54() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
CSVFormat cSVFormat1 = cSVFormat0.withNullString("0");
CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) "0");
CSVPrinter cSVPrinter0 = cSVFormat1.print(charBuffer0);
// Undeclared exception!
// try {
cSVPrinter0.print((Object) null);
// fail("Expecting exception: ReadOnlyBufferException");
// } catch(ReadOnlyBufferException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test55() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) "0");
CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer0);
// Undeclared exception!
// try {
cSVPrinter0.print((Object) null);
// fail("Expecting exception: ReadOnlyBufferException");
// } catch(ReadOnlyBufferException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.StringCharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test56() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.RFC4180;
CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) "@=h", 1, 1);
CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer0);
SQLDataException sQLDataException0 = new SQLDataException("JP%KO)1", "@=h");
// Undeclared exception!
// try {
cSVPrinter0.printRecords((Iterable<?>) sQLDataException0);
// fail("Expecting exception: ReadOnlyBufferException");
// } catch(ReadOnlyBufferException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.nio.CharBuffer", e);
// }
}
@Test(timeout = 4000)
public void test57() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
StringWriter stringWriter0 = new StringWriter();
StringBuffer stringBuffer0 = stringWriter0.getBuffer();
CSVPrinter cSVPrinter0 = cSVFormat0.print(stringBuffer0);
cSVPrinter0.flush();
}
@Test(timeout = 4000)
public void test58() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
StringWriter stringWriter0 = new StringWriter();
StringBuffer stringBuffer0 = stringWriter0.getBuffer();
CSVPrinter cSVPrinter0 = cSVFormat0.print(stringBuffer0);
cSVPrinter0.close();
}
@Test(timeout = 4000)
public void test59() throws Throwable {
StringWriter stringWriter0 = new StringWriter();
StringBuffer stringBuffer0 = stringWriter0.getBuffer();
CSVFormat cSVFormat0 = CSVFormat.RFC4180;
CSVFormat cSVFormat1 = cSVFormat0.withSkipHeaderRecord();
RowSetMetaDataImpl rowSetMetaDataImpl0 = new RowSetMetaDataImpl();
CSVFormat cSVFormat2 = cSVFormat1.withHeader((ResultSetMetaData) rowSetMetaDataImpl0);
cSVFormat2.print(stringBuffer0);
assertEquals(0, stringBuffer0.length());
assertEquals("", stringWriter0.toString());
}
@Test(timeout = 4000)
public void test60() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.DEFAULT;
PipedWriter pipedWriter0 = new PipedWriter();
RowSetMetaDataImpl rowSetMetaDataImpl0 = new RowSetMetaDataImpl();
CSVFormat cSVFormat1 = cSVFormat0.withHeader((ResultSetMetaData) rowSetMetaDataImpl0);
CSVPrinter cSVPrinter0 = null;
// try {
cSVPrinter0 = new CSVPrinter(pipedWriter0, cSVFormat1);
// fail("Expecting exception: IOException");
// } catch(Throwable e) {
// //
// // Pipe not connected
// //
// verifyException("java.io.PipedWriter", e);
// }
}
@Test(timeout = 4000)
public void test61() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.newFormat('J');
Object[] objectArray0 = new Object[8];
objectArray0[4] = (Object) cSVFormat0;
CSVFormat cSVFormat1 = cSVFormat0.withHeaderComments(objectArray0);
PipedWriter pipedWriter0 = new PipedWriter();
CSVPrinter cSVPrinter0 = new CSVPrinter(pipedWriter0, cSVFormat1);
}
@Test(timeout = 4000)
public void test62() throws Throwable {
CSVFormat cSVFormat0 = CSVFormat.EXCEL;
StringWriter stringWriter0 = new StringWriter();
CSVPrinter cSVPrinter0 = new CSVPrinter(stringWriter0, cSVFormat0);
Appendable appendable0 = cSVPrinter0.getOut();
assertSame(appendable0, stringWriter0);
}
}
|
[
"[email protected]"
] | |
e7af6f58cb4f114f1ef384fa8b93652609470fcb
|
98d8dc975e027eb70f3a9d043d98fc6cd3f38586
|
/src/main/java/me/nikl/cookieclicker/buildings/Temple.java
|
a01fe159402bffa1448be81848b5f8e61cb975eb
|
[] |
no_license
|
NiklasEi/cookieclicker-for-gamebox
|
76beca253bc7f65bebebbe36b5f1c28a06b5161e
|
36880434dec5a21fb2bb2abdf840f867c6b4cd40
|
refs/heads/master
| 2023-03-07T13:20:52.286114 | 2021-02-09T20:24:16 | 2021-02-11T18:07:29 | 96,242,994 | 1 | 4 | null | null | null | null |
UTF-8
|
Java
| false | false | 707 |
java
|
package me.nikl.cookieclicker.buildings;
import me.nikl.cookieclicker.CookieClicker;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
/**
* @author Niklas Eicker
*/
public class Temple extends Building {
public Temple(CookieClicker plugin, int slot, Buildings building) {
super(plugin, slot, building);
icon = new ItemStack(Material.ENCHANTING_TABLE, 1);
icon.setAmount(1);
ItemMeta meta = icon.getItemMeta();
meta.setDisplayName(lang.GAME_BUILDING_NAME.replace("%name%", name));
icon.setItemMeta(meta);
this.productionPerSecond = 7800;
this.baseCost = 20000000;
}
}
|
[
"[email protected]"
] | |
dee717e5c456b2cf6b90ebc466f6acad52c74a23
|
ff76af879089682863d47ba94a4e378d059349f8
|
/zww-admin/src/main/java/com/stylefeng/guns/common/persistence/model/TDollOrder.java
|
790db78ac4a07f9ee3905c0d83c2318ae98035b5
|
[] |
no_license
|
xuelu520/zww-cloud
|
f46d4b11e74d297f14deaf8f0b051024053cb03f
|
71b263f10bb6544ad9f0abfead6589231a0aab86
|
refs/heads/master
| 2020-03-27T10:26:12.929297 | 2018-08-28T02:30:06 | 2018-08-28T02:30:06 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 8,916 |
java
|
package com.stylefeng.guns.common.persistence.model;
import java.io.Serializable;
import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelTarget;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author konghuanhuan
* @since 2018-01-30
*/
@TableName("t_doll_order")
@ExcelTarget("tDollOrder")
public class TDollOrder extends Model<TDollOrder> {
private static final long serialVersionUID = 1L;
@TableId(value="id", type= IdType.AUTO)
private Long id;
/**
* 抓到娃娃后生成的订单编号
*/
@TableField("order_number")
private String orderNumber;
@TableField("order_date")
private Date orderDate;
/**
* 收货人外键 t_member
*/
@TableField("order_by")
private Integer orderBy;
/**
* 订单状态
*/
private String status;
/**
* 寄存有效期
*/
@TableField("stock_valid_date")
private Date stockValidDate;
/**
* 发货时间
*/
@TableField("deliver_date")
private Date deliverDate;
/**
* 发货方式(快递公司名称)
*/
@TableField("deliver_method")
private String deliverMethod;
/**
* 快递单号
*/
@TableField("deliver_number")
private String deliverNumber;
/**
* 邮费金额,暂不用,预留字段
*/
@TableField("deliver_amount")
private BigDecimal deliverAmount;
/**
* 邮费等值的游戏币
*/
@TableField("deliver_coins")
private Integer deliverCoins;
@TableField("lover")
@Excel(name = "用户七夕活动", orderNum = "5", isImportField = "street",width = 20.0D)
private String lover;
/**
* 发货地址外键 t_member_addr
*/
@TableField("address_id")
private Integer addressId;
@TableField("modified_date")
private Date modifiedDate;
@TableField("modified_by")
private Integer modifiedBy;
private String comment;
@TableField(exist=false)
@Excel(name = "收货人", orderNum = "3", isImportField = "addrName",width = 20.0D)
private String addrName;//收货人
@TableField(exist=false)
@Excel(name = "收货手机", orderNum = "4", isImportField = "addrPhone",width = 15.0D)
private String addrPhone;//收货手机
@TableField(exist=false)
@Excel(name = "省", orderNum = "6", isImportField = "province",width = 15.0D)
private String province;//省
@TableField(exist=false)
@Excel(name = "市", orderNum = "7", isImportField = "city",width = 15.0D)
private String city;//市
@TableField(exist=false)
@Excel(name = "区", orderNum = "8", isImportField = "county",width = 15.0D)
private String county;//区
@TableField(exist=false)
@Excel(name = "街道", orderNum = "9", isImportField = "street",width = 70.0D)
private String street;//街道
@TableField(exist=false)
private String memberIDs;
@TableField(exist=false)
private String dollCodes; //娃娃编号
@TableField(exist=false)
@Excel(name = "数量", orderNum = "2", isImportField = "quantity")
private Integer quantity; //娃娃数量
@TableField(exist=false)
@Excel(name = "娃娃名称", orderNum = "1",isImportField = "dollName",width = 20.0D)
private String dollName; //娃娃名称
@TableField(exist=false)
private String imgUrl; //娃娃url
public TDollOrder() {
}
public TDollOrder(String orderNumber, Date orderDate, Integer orderBy, String status, Date stockValidDate,Integer deliverCoins, Integer modifiedBy,Integer dollRedeemCoins) {
this.orderNumber = orderNumber;
this.orderDate = orderDate;
this.orderBy = orderBy;
this.status = status;
this.stockValidDate = stockValidDate;
this.deliverCoins = deliverCoins;
this.modifiedBy = modifiedBy;
this.dollRedeemCoins = dollRedeemCoins;
}
public String getDollCodes() {
return dollCodes;
}
public void setDollCodes(String dollCodes) {
this.dollCodes = dollCodes;
}
public Integer getQuantity() {
return quantity;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
public String getDollName() {
return dollName;
}
public void setDollName(String dollName) {
this.dollName = dollName;
}
public String getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl;
}
@TableField("doll_redeem_coins")
private Integer dollRedeemCoins;//返币数
public Integer getDollRedeemCoins() {
return dollRedeemCoins;
}
public void setDollRedeemCoins(Integer dollRedeemCoins) {
this.dollRedeemCoins = dollRedeemCoins;
}
public String getMemberIDs() {
return memberIDs;
}
public void setMemberIDs(String memberIDs) {
this.memberIDs = memberIDs;
}
public String getAddrName() {
return addrName;
}
public void setAddrName(String addrName) {
this.addrName = addrName;
}
public String getAddrPhone() {
return addrPhone;
}
public void setAddrPhone(String addrPhone) {
this.addrPhone = addrPhone;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public Date getOrderDate() {
return orderDate;
}
public void setOrderDate(Date orderDate) {
this.orderDate = orderDate;
}
public Integer getOrderBy() {
return orderBy;
}
public void setOrderBy(Integer orderBy) {
this.orderBy = orderBy;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getStockValidDate() {
return stockValidDate;
}
public void setStockValidDate(Date stockValidDate) {
this.stockValidDate = stockValidDate;
}
public Date getDeliverDate() {
return deliverDate;
}
public void setDeliverDate(Date deliverDate) {
this.deliverDate = deliverDate;
}
public String getDeliverMethod() {
return deliverMethod;
}
public void setDeliverMethod(String deliverMethod) {
this.deliverMethod = deliverMethod;
}
public String getDeliverNumber() {
return deliverNumber;
}
public void setDeliverNumber(String deliverNumber) {
this.deliverNumber = deliverNumber;
}
public BigDecimal getDeliverAmount() {
return deliverAmount;
}
public void setDeliverAmount(BigDecimal deliverAmount) {
this.deliverAmount = deliverAmount;
}
public Integer getDeliverCoins() {
return deliverCoins;
}
public void setDeliverCoins(Integer deliverCoins) {
this.deliverCoins = deliverCoins;
}
public Integer getAddressId() {
return addressId;
}
public void setAddressId(Integer addressId) {
this.addressId = addressId;
}
public Date getModifiedDate() {
return modifiedDate;
}
public void setModifiedDate(Date modifiedDate) {
this.modifiedDate = modifiedDate;
}
public Integer getModifiedBy() {
return modifiedBy;
}
public void setModifiedBy(Integer modifiedBy) {
this.modifiedBy = modifiedBy;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public String getLover() {
return lover;
}
public void setLover(String lover) {
this.lover = lover;
}
@Override
protected Serializable pkVal() {
return this.id;
}
@Override
public String toString() {
return "TDollOrder{" +
"id=" + id +
", orderNumber=" + orderNumber +
", orderDate=" + orderDate +
", orderBy=" + orderBy +
", status=" + status +
", stockValidDate=" + stockValidDate +
", deliverDate=" + deliverDate +
", deliverMethod=" + deliverMethod +
", deliverNumber=" + deliverNumber +
", deliverAmount=" + deliverAmount +
", deliverCoins=" + deliverCoins +
", addressId=" + addressId +
", modifiedDate=" + modifiedDate +
", modifiedBy=" + modifiedBy +
", comment=" + comment +
", addrName=" + addrName +
", addrPhone=" + addrPhone +
", province=" + province +
", city=" + city +
", county=" + county +
", street=" + street +
", memberIDs=" + memberIDs +
", dollRedeemCoins=" + dollRedeemCoins +
", dollCode=" + dollCodes +
", dollName=" + dollName +
", imgUrl=" + imgUrl +
", quantity=" + quantity +
", lover=" + lover +
"}";
}
}
|
[
"[email protected]"
] | |
559a4efbbd5210c738b2f2856b5242ddc7c96f15
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_eada331d8d74f226ad95a41caf4ffb509a366286/DriverConnectionFactory/12_eada331d8d74f226ad95a41caf4ffb509a366286_DriverConnectionFactory_t.java
|
304abdb36e523a8812003895f38c95d919d53723
|
[] |
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 | 1,847 |
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.commons.dbcp2;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.SQLException;
import java.util.Properties;
/**
* A {@link Driver}-based implementation of {@link ConnectionFactory}.
*
* @author Rodney Waldhoff
* @version $Revision$ $Date$
*/
public class DriverConnectionFactory implements ConnectionFactory {
public DriverConnectionFactory(Driver driver, String connectUri, Properties props) {
_driver = driver;
_connectUri = connectUri;
_props = props;
}
@Override
public Connection createConnection() throws SQLException {
return _driver.connect(_connectUri,_props);
}
private final Driver _driver;
private final String _connectUri;
private final Properties _props;
@Override
public String toString() {
return this.getClass().getName() + " [" + String.valueOf(_driver) + ";" +
String.valueOf(_connectUri) + ";" + String.valueOf(_props) + "]";
}
}
|
[
"[email protected]"
] | |
6576f6caab229f770f2b33762f24e278a3b8f5bc
|
7a497a8372818e251ec7df4bdc4fa202cbd77875
|
/ch35/SendSMS/src/mobile/android/send/sms/SendSMS.java
|
8655525c5f7394bf8f76b636c4e103066dc1ef13
|
[] |
no_license
|
solotic/android_definitive_guide
|
dc6fafd5708671a6ec7b0b36a1928f42ca7f8cd8
|
4077d6851de1e0eb9dea1a5162b8b18b592ce3a0
|
refs/heads/master
| 2021-06-02T03:22:48.398109 | 2016-07-18T14:32:58 | 2016-07-18T14:32:58 | null | 0 | 0 | null | null | null | null |
GB18030
|
Java
| false | false | 694 |
java
|
package mobile.android.send.sms;
import android.app.Activity;
import android.app.PendingIntent;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.view.View;
import android.widget.Toast;
public class SendSMS extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
public void onClick_SendSMS(View view)
{
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage("12345678", null, "你好吗?", null, null);
Toast.makeText(this, "短信发送成功.", Toast.LENGTH_LONG).show();
}
}
|
[
"[email protected]"
] | |
ba91c6ba48befba3e1477675476145386d0cc865
|
a67f880d726b9dd5c26ff576ca518ea36948c22f
|
/app/src/main/java/com/tct/gallery3d/polaroid/manager/FrameResource.java
|
c40ea8fc961972fbe79d3f03673e916d8673285a
|
[] |
no_license
|
guixiaoyuan/Gallery
|
ddc917d103b600ac3ec7e7bbf68721857f8bd754
|
8bf571e6cec37917cdd22b056ebf065a45e079a5
|
refs/heads/master
| 2021-01-11T08:14:37.381127 | 2016-11-09T02:07:47 | 2016-11-09T02:07:47 | 72,212,958 | 0 | 2 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,232 |
java
|
package com.tct.gallery3d.polaroid.manager;
import android.graphics.Point;
import android.graphics.Rect;
public class FrameResource {
public int mBgResId;
public int mFgResId;
public Point mTargetResolution;
public Rect mPictureLocation;
public SloganMargin mSloganMargin;
public float mSloganFontSize;
public float mSloganBorderSize;
public float mTagFontSize;
public FrameResource(int bgResId, int fgResId, Point targetResolution, Rect pictureLocation, SloganMargin sloganMargin,
float sloganFontSize, float sloganBorderSize, float tagFontSize) {
mBgResId = bgResId;
mFgResId = fgResId;
mTargetResolution = targetResolution;
mPictureLocation = pictureLocation;
mSloganMargin = sloganMargin;
mSloganFontSize = sloganFontSize;
mSloganBorderSize = sloganBorderSize;
mTagFontSize = tagFontSize;
}
@Override
public String toString() {
return "FrameResource { target: " + mTargetResolution.x + "x" + mTargetResolution.y + "}";
}
public static class SloganMargin {
public int left = 0;
public int right = 0;
public int top = 0;
public int bottom = 0;
};
}
|
[
"[email protected]"
] | |
73ab4b272018d29511d5b406f39da062bd44b104
|
0b36271ff9d113d526a330aa90b8afdf9f118c7b
|
/3.JavaMultithreading/src/com/javarush/task/task27/task2711/Solution.java
|
f2610f804d75f323cc772b3a490404de3e008198
|
[] |
no_license
|
ebezdomnikov/java-programming
|
8ef24c8cec9cab21c6aec61f13ca40287cb028fd
|
985b2627188bc7308c66005bd157cdca37ac6925
|
refs/heads/master
| 2020-06-08T15:37:54.044942 | 2019-06-22T16:21:37 | 2019-06-22T16:21:37 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 625 |
java
|
package com.javarush.task.task27.task2711;
import java.util.concurrent.CountDownLatch;
/*
CountDownLatch
*/
public class Solution {
private volatile boolean isWaitingForValue = true;
CountDownLatch latch = new CountDownLatch(1);
public void someMethod() throws InterruptedException {
while (isWaitingForValue) {
latch.await();
retrieveValue();
isWaitingForValue = false;
this.notify();
}
}
void retrieveValue() {
System.out.println("Value retrieved.");
}
public static void main(String[] args) {
}
}
|
[
"[email protected]"
] | |
7994a19a86d10b9cf70b34d7374d09d9b3efa20f
|
1195d9b91cd6c514ae7002c89e80de1ae579d6e2
|
/app/src/main/java/com/example/mothupii_/ilocatefriends/GooglePlayServicesUtil.java
|
7e71a091e5a3f4f172dfdaff1412f2dd0061aa15
|
[] |
no_license
|
sirMothupii/iLocateFriends
|
55ea5db05210f0b0c448ddfff70cc943e80f98f3
|
a2ff300981471ea6bcf48dbe37ffcf0d118d6470
|
refs/heads/master
| 2021-05-15T20:59:12.894712 | 2017-10-23T01:09:37 | 2017-10-23T01:09:37 | 107,916,448 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 421 |
java
|
package com.example.mothupii_.ilocatefriends;
import android.app.Dialog;
import android.content.Context;
/**
* Created by Mothupii_ on 2017-10-17.
*/
class GooglePlayServicesUtil
{
public static int isGooglePlayServicesAvailable(Context applicationContext)
{
return 0;
}
public static Dialog getErrorDialog(int status, MainActivity mainActivity, int i)
{
return null;
}
}
|
[
"[email protected]"
] | |
180b26ef7315cc3aad63334b91103a45ce2ac529
|
1816ebbff468a0ff2b91a7a4c963d8798cf78ffc
|
/resource-server/src/test/java/br/com/contmatic/api/resource/test/util/GivenServicoIntegracaoPisDto.java
|
9534a9c187428a68171b19cfe1919ee61d8baf06
|
[] |
no_license
|
rodrigoafernandes/resource-server
|
a521961ce166d42815039c6bc88725adf4f0cf79
|
0d01bdf5166a40958bc634561b1490785fb657d0
|
refs/heads/master
| 2021-01-23T01:25:51.991057 | 2017-05-30T20:21:12 | 2017-05-30T20:21:12 | 92,872,616 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,773 |
java
|
package br.com.contmatic.api.resource.test.util;
import java.io.Serializable;
import java.math.BigDecimal;
import org.apache.commons.lang3.math.NumberUtils;
import br.com.contmatic.integration.dto.ServicoIntegracaoPisDto;
import br.com.contmatic.integration.dto.enumeration.EnumBaseCalculoCreditoPisCofinsDto;
import br.com.contmatic.integration.dto.enumeration.EnumContribuicaoSocialApuradaDto;
import br.com.contmatic.integration.dto.enumeration.EnumSituacaoTributariaPisEntradaDto;
import br.com.contmatic.integration.dto.enumeration.EnumSituacaoTributariaPisSaidaDto;
import br.com.contmatic.integration.dto.enumeration.EnumTipoDeCreditoDto;
public class GivenServicoIntegracaoPisDto implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
public static ServicoIntegracaoPisDto getIntegracaoPis() {
ServicoIntegracaoPisDto integracaoPis = new ServicoIntegracaoPisDto();
integracaoPis.setAliquotaPisPrestado(BigDecimal.TEN);
integracaoPis.setAliquotaPisTomado(BigDecimal.TEN);
integracaoPis.setBaseCalculoCredito(EnumBaseCalculoCreditoPisCofinsDto.BASE_CALCULO_CREDITO_PIS_COFINS_01);
integracaoPis.setContribuicaoSocialApurada(EnumContribuicaoSocialApuradaDto.CONTRIBUICAO_SOCIAL_01);
integracaoPis.setId(NumberUtils.LONG_ONE);
integracaoPis.setNaturezaReceita(GivenNaturezaReceitaDto.getNaturezaReceita());
integracaoPis.setServico(GivenServicoDto.getNewServicoDTO());
integracaoPis.setSituacaoTributariaPisEntrada(EnumSituacaoTributariaPisEntradaDto.SITUACAO_PIS_50);
integracaoPis.setSituacaoTributariaPisSaida(EnumSituacaoTributariaPisSaidaDto.SITUACAO_PIS_01);
integracaoPis.setTipoDeCredito(EnumTipoDeCreditoDto.TIPO_CREDITO_101);
return integracaoPis;
}
}
|
[
"[email protected]"
] | |
479410cc6bc4f6d7d1e41dd67af69386fa1d4380
|
a8a25e8fcff9df9c16e25764abc74db3d1706057
|
/src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionSpec.java
|
90de182573ec332e858e3de5254b36cc599e271c
|
[
"Apache-2.0"
] |
permissive
|
xzy256/bazel-mips64
|
b124db82fdf10d0def9c943712a95b4c44661575
|
36137060152f2d05e7eb883e5bdfe1d89f68ab17
|
refs/heads/master
| 2021-01-23T06:10:33.071843 | 2018-06-28T04:58:21 | 2018-06-28T04:58:21 | 93,012,016 | 7 | 3 | null | null | null | null |
UTF-8
|
Java
| false | false | 11,095 |
java
|
// Copyright 2014 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.devtools.build.lib.rules.extra;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.lib.actions.Action;
import com.google.devtools.build.lib.actions.ActionOwner;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.RunfilesSupplier;
import com.google.devtools.build.lib.analysis.CommandHelper;
import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.analysis.TransitiveInfoCollection;
import com.google.devtools.build.lib.analysis.TransitiveInfoProvider;
import com.google.devtools.build.lib.analysis.actions.CommandLine;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import com.google.devtools.build.lib.packages.AspectDescriptor;
import com.google.devtools.build.lib.util.Fingerprint;
import com.google.devtools.build.lib.vfs.PathFragment;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* The specification for a particular extra action type.
*/
@Immutable
public final class ExtraActionSpec implements TransitiveInfoProvider {
private final ImmutableList<Artifact> resolvedTools;
private final RunfilesSupplier runfilesSupplier;
private final ImmutableList<Artifact> resolvedData;
private final ImmutableList<String> outputTemplates;
private final ImmutableMap<String, String> executionInfo;
private final String command;
private final boolean requiresActionOutput;
private final Label label;
ExtraActionSpec(
Iterable<Artifact> resolvedTools,
RunfilesSupplier runfilesSupplier,
Iterable<Artifact> resolvedData,
Iterable<String> outputTemplates,
String command,
Label label,
Map<String, String> executionInfo,
boolean requiresActionOutput) {
this.resolvedTools = ImmutableList.copyOf(resolvedTools);
this.runfilesSupplier = runfilesSupplier;
this.resolvedData = ImmutableList.copyOf(resolvedData);
this.outputTemplates = ImmutableList.copyOf(outputTemplates);
this.command = command;
this.label = label;
this.executionInfo = ImmutableMap.copyOf(executionInfo);
this.requiresActionOutput = requiresActionOutput;
}
public Label getLabel() {
return label;
}
/**
* Adds an extra_action to the action graph based on the action to shadow.
*/
public Collection<Artifact> addExtraAction(RuleContext owningRule, Action actionToShadow) {
Collection<Artifact> extraActionOutputs = new LinkedHashSet<>();
Collection<Artifact> protoOutputs = new ArrayList<>();
NestedSetBuilder<Artifact> extraActionInputs = NestedSetBuilder.stableOrder();
Label ownerLabel = owningRule.getLabel();
if (requiresActionOutput || actionToShadow.discoversInputs()) {
extraActionInputs.addAll(actionToShadow.getOutputs());
}
extraActionInputs.addAll(resolvedTools);
extraActionInputs.addAll(resolvedData);
boolean createDummyOutput = false;
for (String outputTemplate : outputTemplates) {
// We create output for the extra_action based on the 'out_template' attribute.
// See {link #getExtraActionOutputArtifact} for supported variables.
extraActionOutputs.add(getExtraActionOutputArtifact(
owningRule, actionToShadow, outputTemplate));
}
// extra_action has no output, we need to create some dummy output to keep the build up-to-date.
if (extraActionOutputs.isEmpty()) {
createDummyOutput = true;
extraActionOutputs.add(getExtraActionOutputArtifact(
owningRule, actionToShadow, "$(ACTION_ID).dummy"));
}
// We generate a file containing a protocol buffer describing the action that is being shadowed.
// It is up to each action being shadowed to decide what contents to store here.
Artifact extraActionInfoFile = getExtraActionOutputArtifact(
owningRule, actionToShadow, "$(ACTION_ID).xa");
owningRule.registerAction(new ExtraActionInfoFileWriteAction(
actionToShadow.getOwner(), extraActionInfoFile, actionToShadow));
extraActionInputs.add(extraActionInfoFile);
protoOutputs.add(extraActionInfoFile);
// Expand extra_action specific variables from the provided command-line.
// See {@link #createExpandedCommand} for list of supported variables.
String command = createExpandedCommand(owningRule, actionToShadow, extraActionInfoFile);
Map<String, String> env = owningRule.getConfiguration().getLocalShellEnvironment();
Set<String> clientEnvVars = owningRule.getConfiguration().getVariableShellEnvironment();
CommandHelper commandHelper =
new CommandHelper(
owningRule,
ImmutableList.<TransitiveInfoCollection>of(),
ImmutableMap.<Label, Iterable<Artifact>>of());
// Multiple actions in the same configured target need to have different names for the artifact
// that might be created here, so we append something that should be unique for each action.
String actionUniquifier = actionToShadow.getPrimaryOutput().getExecPath().getBaseName() + "."
+ actionToShadow.getKey();
List<String> argv = commandHelper.buildCommandLine(command, extraActionInputs,
"." + actionUniquifier + ".extra_action_script.sh", executionInfo);
String commandMessage = String.format("Executing extra_action %s on %s", label, ownerLabel);
owningRule.registerAction(
new ExtraAction(
ImmutableSet.copyOf(extraActionInputs.build()),
runfilesSupplier,
extraActionOutputs,
actionToShadow,
createDummyOutput,
CommandLine.of(argv, false),
env,
clientEnvVars,
executionInfo,
commandMessage,
label.getName()));
return ImmutableSet.<Artifact>builder().addAll(extraActionOutputs).addAll(protoOutputs).build();
}
/**
* Expand extra_action specific variables:
* $(EXTRA_ACTION_FILE): expands to a path of the file containing a protocol buffer
* describing the action being shadowed.
* $(output <out_template>): expands the output template to the execPath of the file.
* e.g. $(output $(ACTION_ID).out) ->
* <build_path>/extra_actions/bar/baz/devtools/build/test_A41234.out
*/
private String createExpandedCommand(RuleContext owningRule,
Action action, Artifact extraActionInfoFile) {
String realCommand = command.replace(
"$(EXTRA_ACTION_FILE)", extraActionInfoFile.getExecPathString());
for (String outputTemplate : outputTemplates) {
String outFile = getExtraActionOutputArtifact(owningRule, action, outputTemplate)
.getExecPathString();
realCommand = realCommand.replace("$(output " + outputTemplate + ")", outFile);
}
return realCommand;
}
/**
* Creates an output artifact for the extra_action based on the output_template.
* The path will be in the following form:
* <output dir>/<target-configuration-specific-path>/extra_actions/<extra_action_label>/ +
* <configured_target_label>/<expanded_template>
*
* The template can use the following variables:
* $(ACTION_ID): a unique id for the extra_action.
*
* Sample:
* extra_action: foo/bar:extra
* template: $(ACTION_ID).analysis
* target: foo/bar:main
* expands to: output/configuration/extra_actions/\
* foo/bar/extra/foo/bar/4683026f7ac1dd1a873ccc8c3d764132.analysis
*/
private Artifact getExtraActionOutputArtifact(
RuleContext ruleContext, Action action, String template) {
String actionId = getActionId(ruleContext.getActionOwner(), action);
template = template.replace("$(ACTION_ID)", actionId);
template = template.replace("$(OWNER_LABEL_DIGEST)", getOwnerDigest(ruleContext));
return getRootRelativePath(template, ruleContext);
}
private Artifact getRootRelativePath(String template, RuleContext ruleContext) {
PathFragment extraActionPackageFragment = label.getPackageIdentifier().getSourceRoot();
PathFragment extraActionPrefix = extraActionPackageFragment.getRelative(label.getName());
PathFragment rootRelativePath = PathFragment.create("extra_actions")
.getRelative(extraActionPrefix)
.getRelative(ruleContext.getPackageDirectory())
.getRelative(template);
// We need to use getDerivedArtifact here because extra actions are at
// <EXTRA ACTION LABEL> / <RULE LABEL> instead of <RULE LABEL> / <EXTRA ACTION LABEL>. Bummer.
return ruleContext.getAnalysisEnvironment().getDerivedArtifact(rootRelativePath,
ruleContext.getConfiguration().getOutputDirectory(ruleContext.getRule().getRepository()));
}
/**
* Calculates a digest representing the rule context. We use the digest instead of the
* original value as the original value might lead to a filename that is too long.
* By using a digest, tools can deterministically find all extra_action outputs for a given
* target, without having to open every file in the package.
*/
private static String getOwnerDigest(RuleContext ruleContext) {
Fingerprint f = new Fingerprint();
f.addString(ruleContext.getLabel().toString());
return f.hexDigestAndReset();
}
/**
* Creates a unique id for the action shadowed by this extra_action.
*
* We need to have a unique id for the extra_action to use. We build this
* from the owner's label and the shadowed action id (which is only
* guaranteed to be unique per target). Together with the subfolder
* matching the original target's package name, we believe this is enough
* of a uniqueness guarantee.
*/
@VisibleForTesting
public static String getActionId(ActionOwner owner, Action action) {
Fingerprint f = new Fingerprint();
f.addString(owner.getLabel().toString());
ImmutableList<AspectDescriptor> aspectDescriptors = owner.getAspectDescriptors();
f.addInt(aspectDescriptors.size());
for (AspectDescriptor aspectDescriptor : aspectDescriptors) {
f.addString(aspectDescriptor.getDescription());
}
f.addString(action.getKey());
return f.hexDigestAndReset();
}
}
|
[
"[email protected]"
] | |
111667410f60a43f35e02f779f5afec306f7ca98
|
8c6589226ee55954881303eb5856bcb05a769621
|
/src/main/java/com/dheeraj/learning/labwatcher/LabWatcherApplication.java
|
4484751a62722a34822b233cd8a0100d123f2464
|
[] |
no_license
|
dheerajgopali/lab-watcher
|
65e9473227ff52b82207021b84d57d27a6faaedc
|
b69c15364090b8b27762d5bd97245e91a1545fd6
|
refs/heads/master
| 2020-04-29T23:11:38.963534 | 2019-03-21T14:31:52 | 2019-03-21T14:31:52 | 176,440,587 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 659 |
java
|
package com.dheeraj.learning.labwatcher;
import com.dheeraj.learning.labwatcher.service.SchedulerService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
@SpringBootApplication
public class LabWatcherApplication {
public static void main(String[] args) {
/*ApplicationContext applicationContext = SpringApplication.run(LabWatcherApplication.class, args);*/
/*SchedulerService schedulerService = applicationContext.getBean(SchedulerService.class);
schedulerService.analyseAParticularBuild();*/
}
}
|
[
"[email protected]"
] | |
8347352dd63e0f8e159a70d642d5953e6cb1e69d
|
096000a9695b846d1d6e87f83d65a98262db1428
|
/Spring-data-JPA/src/main/java/example2/model/Passanger.java
|
d47a69f5cd2765bf08e411146d699f5b6c11e710
|
[] |
no_license
|
yochevedt/Spring-ALL
|
55164e289f5a98238a5d8a43a18c01977ae729cb
|
7b76b6916be26bf8af2b026a29a1d962929f91f2
|
refs/heads/master
| 2022-12-25T05:00:50.198531 | 2019-07-03T06:21:34 | 2019-07-03T06:21:34 | 194,991,640 | 1 | 0 | null | 2022-12-16T04:59:02 | 2019-07-03T06:20:27 |
Java
|
UTF-8
|
Java
| false | false | 1,107 |
java
|
package example2.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Passanger implements Serializable{
/**
* Require in order to prevent the IDE warning
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@Column(nullable = false)
private Long id;
@Basic(optional = false)
@Column(nullable = false)
private String firstName;
@Basic(optional = false)
@Column(nullable = false)
private String lastName;
@Basic(optional = false)
@Column(nullable = false)
private int seatNumber;
@ToString.Exclude
@OneToMany(fetch= FetchType.LAZY, mappedBy="passanger")
private List<Ticket> tickets=new ArrayList<>();;
}
|
[
"[email protected]"
] | |
c4db02078f3d0a0de9020099ea0b6715b18a3d0c
|
33668d088614a90df45a692481636bb3d7e70c9e
|
/backend/segmentfault-system/src/main/java/com/segmentfault/system/mapper/SysMenuMapper.java
|
fe2dd641b72c3c5d8ecc4557bf67363ee4bc12dc
|
[] |
no_license
|
Xavier-Huang/xwbank-piggame
|
7a231bef625c7b23d2f16c365080b260b99c39dc
|
e5dc975482a781f3ee775493e7a66096474ec7db
|
refs/heads/master
| 2022-12-15T13:02:58.773572 | 2020-09-14T17:29:09 | 2020-09-14T17:29:09 | 295,488,414 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,641 |
java
|
package com.segmentfault.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.segmentfault.system.domain.SysMenu;
/**
* 菜单表 数据层
*
* @author segmentfault
*/
public interface SysMenuMapper
{
/**
* 查询系统所有菜单(含按钮)
*
* @return 菜单列表
*/
public List<SysMenu> selectMenuAll();
/**
* 根据用户ID查询菜单
*
* @param userId 用户ID
* @return 菜单列表
*/
public List<SysMenu> selectMenuAllByUserId(Long userId);
/**
* 查询系统正常显示菜单(不含按钮)
*
* @return 菜单列表
*/
public List<SysMenu> selectMenuNormalAll();
/**
* 根据用户ID查询菜单
*
* @param userId 用户ID
* @return 菜单列表
*/
public List<SysMenu> selectMenusByUserId(Long userId);
/**
* 根据用户ID查询权限
*
* @param userId 用户ID
* @return 权限列表
*/
public List<String> selectPermsByUserId(Long userId);
/**
* 根据角色ID查询菜单
*
* @param roleId 角色ID
* @return 菜单列表
*/
public List<String> selectMenuTree(Long roleId);
/**
* 查询系统菜单列表
*
* @param menu 菜单信息
* @return 菜单列表
*/
public List<SysMenu> selectMenuList(SysMenu menu);
/**
* 查询系统菜单列表
*
* @param menu 菜单信息
* @return 菜单列表
*/
public List<SysMenu> selectMenuListByUserId(SysMenu menu);
/**
* 删除菜单管理信息
*
* @param menuId 菜单ID
* @return 结果
*/
public int deleteMenuById(Long menuId);
/**
* 根据菜单ID查询信息
*
* @param menuId 菜单ID
* @return 菜单信息
*/
public SysMenu selectMenuById(Long menuId);
/**
* 查询菜单数量
*
* @param parentId 菜单父ID
* @return 结果
*/
public int selectCountMenuByParentId(Long parentId);
/**
* 新增菜单信息
*
* @param menu 菜单信息
* @return 结果
*/
public int insertMenu(SysMenu menu);
/**
* 修改菜单信息
*
* @param menu 菜单信息
* @return 结果
*/
public int updateMenu(SysMenu menu);
/**
* 校验菜单名称是否唯一
*
* @param menuName 菜单名称
* @param parentId 父菜单ID
* @return 结果
*/
public SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId);
}
|
[
"[email protected]"
] | |
eb8627690bcd24b9a73a4af6f5ef311f4b6d453a
|
3a6550254307e00e9e146bbf91b2598ecead9ac9
|
/src/fr/istic/agile/client/api/UserStoryClient.java
|
4c31750267303f5bb1a06d1aaf0dc99c9fb1992f
|
[] |
no_license
|
roma2907/GWT-TAA
|
bfc4b584e142f9bb87c2c126b9d46657d7042dcb
|
bee6d76944079b109d88c806548b79ef1b9f494c
|
refs/heads/master
| 2021-01-10T04:23:00.994741 | 2016-01-19T11:15:34 | 2016-01-19T11:15:34 | 49,895,493 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 661 |
java
|
package fr.istic.agile.client.api;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import org.fusesource.restygwt.client.MethodCallback;
import org.fusesource.restygwt.client.RestService;
import fr.istic.agile.client.domain.UserStory;
@Path("/rest/userstory")
public interface UserStoryClient extends RestService {
@PUT
public void putUserStory(final UserStory userStory, final MethodCallback<Void> callback);
@POST
@Path("/{idSprint}")
public void addUserStory(final UserStory userStory, @PathParam("idSprint") Long idSprint,
final MethodCallback<Void> callback);
}
|
[
"[email protected]"
] | |
746e381f35f66d3e8c84ab52d488e619a232ecf9
|
64b4737219b0fb0fcda33faf423904b5a1a58722
|
/jblog-backup/src/main/java/com/bitacademy/jblog/controller/CommentsController.java
|
99d986a64ba50dd2b143b84bc7a3eef72aa9adf3
|
[] |
no_license
|
EomYuri/bit-backup
|
df8dd71e7af53872b1a20cec7935caa52ef71bf5
|
21778699720f8982f2c49127b249b0017e033a48
|
refs/heads/master
| 2020-05-07T08:25:53.113268 | 2019-04-15T08:48:32 | 2019-04-15T08:48:32 | 180,321,693 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,633 |
java
|
package com.bitacademy.jblog.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.bitacademy.jblog.service.CommentsService;
import com.bitacademy.jblog.vo.CommentsVo;
@Controller
@RequestMapping("/comments")
public class CommentsController {
@Autowired
CommentsService commentsServiceImpl;
@RequestMapping(value= {"","/","/list"}, method=RequestMethod.GET)
public String list(Model model) {
List<CommentsVo> list =
commentsServiceImpl.getMessageList();
model.addAttribute("list", list);
return "comments/list";
}
@RequestMapping(value="/delete/{userNo}", method=RequestMethod.GET)
public String deleteform(@PathVariable("userNo") Long userNo, Model model) {
model.addAttribute("userNo", userNo);
return "comments/deleteform";
}
@RequestMapping(value="/delete", method=RequestMethod.POST)
public String deleteAction(@ModelAttribute CommentsVo vo) {
boolean success=commentsServiceImpl.deleteMessage(vo);
// System.out.println("Delete Result:" + success);
return "redirect:/comments";
}
@RequestMapping(value="/write", method=RequestMethod.POST)
public String write(@ModelAttribute CommentsVo vo) {
boolean success = commentsServiceImpl.writeMessage(vo);
return "redirect:/comments";
}
}
|
[
"[email protected]"
] | |
9926cb886285e1b6f626158b97dc7f3fcb2c3951
|
b431e5c92cb7eb265ec726438946c8ce3548d894
|
/src/com/CornelCocioaba/Pixti/Core/Time.java
|
659ca657e6db8b2a27bdb261361407f8c4efd9ea
|
[
"MIT"
] |
permissive
|
cornelcocioaba/Pixti
|
4b0e1085a50c1fb02a8211dbe5c41c8de06c7310
|
5d48e132866120b04b52a54192702efa21e4b8d5
|
refs/heads/master
| 2021-08-27T17:30:54.988980 | 2017-07-17T13:00:38 | 2017-07-17T13:00:38 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,484 |
java
|
package com.CornelCocioaba.Pixti.Core;
public class Time
{
public static final int MONTHS_PER_YEAR = 12;
public static final int DAYS_PER_WEEK = 7;
public static final int DAYS_PER_MONTH = 30;
public static final int HOURS_PER_DAY = 24;
public static final int MINUTES_PER_HOUR = 60;
public static final int MILLISECONDS_PER_SECOND = 1000;
public static final int MICROSECONDS_PER_SECOND = 1000 * 1000;
public static final long NANOSECONDS_PER_SECOND = 1000 * 1000 * 1000;
public static final long MICROSECONDS_PER_MILLISECOND = MICROSECONDS_PER_SECOND / MILLISECONDS_PER_SECOND;
public static final long NANOSECONDS_PER_MICROSECOND = NANOSECONDS_PER_SECOND / MICROSECONDS_PER_SECOND;
public static final long NANOSECONDS_PER_MILLISECOND = NANOSECONDS_PER_SECOND / MILLISECONDS_PER_SECOND;
public static final float SECONDS_PER_NANOSECOND = 1f / NANOSECONDS_PER_SECOND;
public static final float MICROSECONDS_PER_NANOSECOND = 1f / NANOSECONDS_PER_MICROSECOND;
public static final float MILLISECONDS_PER_NANOSECOND = 1f / NANOSECONDS_PER_MILLISECOND;
public static final float SECONDS_PER_MICROSECOND = 1f / MICROSECONDS_PER_SECOND;
public static final float MILLISECONDS_PER_MICROSECOND = 1f / MICROSECONDS_PER_MILLISECOND;
public static final float SECONDS_PER_MILLISECOND = 1f / MILLISECONDS_PER_SECOND;
public static final int SECONDS_PER_MINUTE = 60;
public static final int SECONDS_PER_HOUR = SECONDS_PER_MINUTE * MINUTES_PER_HOUR;
public static final int SECONDS_PER_DAY = SECONDS_PER_HOUR * HOURS_PER_DAY;
public static final int SECONDS_PER_WEEK = SECONDS_PER_DAY * DAYS_PER_WEEK;
public static final int SECONDS_PER_MONTH = SECONDS_PER_DAY * DAYS_PER_MONTH;
public static final int SECONDS_PER_YEAR = SECONDS_PER_MONTH * MONTHS_PER_YEAR;
/**
* deltaTime in seconds
*/
public static float deltaTime;
/**
* time in seconds
*/
public static float time;
/**
* scale factor 1 - normal, 0 - stop
*/
public static float timeScale;
public static void Init(){
time = System.nanoTime() * Time.SECONDS_PER_NANOSECOND;
timeScale = 1f;
}
/*
* this should only be called in onDraw
*/
public static void Update()
{
final float newTime = System.nanoTime() * Time.SECONDS_PER_NANOSECOND;
deltaTime = (newTime - time) * timeScale;
time += deltaTime;
}
}
|
[
"[email protected]"
] | |
ca75618e116d9768c70f59e34e492d72b40c0a35
|
b8fd342e467d026224995105c631e5b82f31f3b4
|
/WorkflowProject/src/main/java/com/service/business/AddressService.java
|
954de25089b6c029316642f731a34acaf1d57e6f
|
[] |
no_license
|
arunson/workflow2013
|
a15cd437e62edc6db620d8c097f8a02430a9e9af
|
4345efc331d322ab9bd2fe81f743fe3fdddda149
|
refs/heads/master
| 2021-01-18T11:46:13.781758 | 2013-09-29T13:54:50 | 2013-09-29T13:54:50 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 334 |
java
|
package com.service.business;
import java.util.List;
import com.database.bean.Address;
public interface AddressService {
public abstract void updateAddress(Address address);
public abstract void createAddress(Address address);
public abstract void deleteAddress(Address address);
public List<Address> searchAddresses();
}
|
[
"[email protected]"
] | |
0784463f1f84449e59d7bdc71ac42da30b29b922
|
f4e097b2228d52e9fa4b56dfe9d85b460da45074
|
/web-and-db-sample/src/main/java/com/github/kazuhito_m/sample/servlet/Index.java
|
35c492078fadfac5765b65eba6473490ecb2ae15
|
[] |
no_license
|
kazuhito-m/flyway-sample-webapp
|
f86452dc917f61568d54b1e7dc31d738c6d260b4
|
3d72295327d60c45983baa4c478743ca6e418152
|
refs/heads/master
| 2021-01-17T07:01:30.517023 | 2016-05-06T00:47:23 | 2016-05-06T00:47:23 | 41,502,929 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,160 |
java
|
package com.github.kazuhito_m.sample.servlet;
import com.github.kazuhito_m.sample.db.DbAccesser;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.ResultSet;
/**
* 「きょうびこんな実装は無いやろ…」という簡素な例。
*/
public class Index extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
this.doPost(req, resp);
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
try {
DbAccesser db = new DbAccesser();
db.open();
ResultSet rs = db.getResultSet("select * from member order by member_id");
String tableHTML = "<table border=1>";
tableHTML += "<tr bgcolor=\"000080\"><td><font color=\"white\">メンバーID</font></td>"
+ "<td><font color=\"white\">名前</font></td>"
+ "<td><font color=\"white\">カナ</font></td>";
while (rs.next()) {
int id = rs.getInt("member_id");
String name = rs.getString("name");
String kana = rs.getString("kana");
tableHTML += "<tr><td align=\"right\">" + id + "</td>"
+ "<td>" + name + "</td><td>" + kana + "</td></tr>";
}
tableHTML += "</table>";
db.close();
resp.setContentType("text/html; charset=utf8");
PrintWriter out = resp.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title>member refalence</title>");
out.println("</head>");
out.println("<body>");
out.println(tableHTML);
out.println("</body>");
out.println("</html>");
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"[email protected]"
] | |
20057a0449109e5ff41e01e365f8f671185b2feb
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/org/apache/camel/component/properties/PropertiesComponentServicePortTest.java
|
7b5f10e582a98bdc6b03768d9d1f990412cc2110
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811 | 2019-11-06T07:17:09 | 2019-11-06T07:17:09 | 75,710,758 | 14 | 19 | null | 2023-01-26T23:57:41 | 2016-12-06T08:27:42 | null |
UTF-8
|
Java
| false | false | 2,365 |
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.camel.component.properties;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
import org.junit.Test;
public class PropertiesComponentServicePortTest extends ContextTestSupport {
@Test
public void testFunction() throws Exception {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:start").to("mock:foo").transform().constant("someserver:{{service.port:FOO}}").to("mock:bar");
}
});
context.start();
String body = "someserver:" + (System.getenv("FOO_SERVICE_PORT"));
getMockEndpoint("mock:foo").expectedBodiesReceived("Hello World");
getMockEndpoint("mock:bar").expectedBodiesReceived(body);
template.sendBody("direct:start", "Hello World");
assertMockEndpointsSatisfied();
}
@Test
public void testFunctionGetOrElse() throws Exception {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:start").to("mock:foo").transform().constant("myotherserver:{{service.port:BAR:8888}}").to("mock:bar");
}
});
context.start();
getMockEndpoint("mock:foo").expectedBodiesReceived("Hello World");
getMockEndpoint("mock:bar").expectedBodiesReceived("myotherserver:8888");
template.sendBody("direct:start", "Hello World");
assertMockEndpointsSatisfied();
}
}
|
[
"[email protected]"
] | |
264588ab0944cba8d8caee47b83bb21c3858ee27
|
fdeb8f7078bb79095fdb70713c90d069a23f92c9
|
/src/main/java/com/zhych/mall/controller/UserController.java
|
bfa09c3f94860507fc2ee1d717d3e50fb75b9405
|
[] |
no_license
|
zhych911005/mall
|
d9b8bc72c6c258927d95c93777086c28707868a1
|
538dafd44ef3057c2b286b881375735cfec54a8a
|
refs/heads/master
| 2021-02-17T14:01:55.841959 | 2020-03-12T17:26:27 | 2020-03-12T17:26:27 | 245,102,143 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,800 |
java
|
package com.zhych.mall.controller;
import com.zhych.mall.consts.MallConst;
import com.zhych.mall.form.UserLoginForm;
import com.zhych.mall.form.UserRegisterForm;
import com.zhych.mall.pojo.User;
import com.zhych.mall.service.IUserService;
import com.zhych.mall.vo.ResponseVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;
@RestController
@Slf4j
public class UserController {
@Autowired
private IUserService userService;
@PostMapping("/user/register")
public ResponseVo register(@Valid @RequestBody UserRegisterForm userRegisterForm) {
User user = new User();
BeanUtils.copyProperties(userRegisterForm, user);
return userService.register(user);
}
@PostMapping("/user/login")
public ResponseVo<User> login(@Valid @RequestBody UserLoginForm userLoginForm,
HttpSession session) {
ResponseVo<User> userResponseVo = userService.login(userLoginForm.getUsername(), userLoginForm.getPassword());
//设置session
session.setAttribute(MallConst.CURRENT_USER, userResponseVo.getData());
return userResponseVo;
}
@GetMapping("/user")
public ResponseVo<User> userInfo(HttpSession session) {
User user = (User) session.getAttribute(MallConst.CURRENT_USER);
return ResponseVo.success(user);
}
@PostMapping("/user/logout")
public ResponseVo logout(HttpSession session) {
log.info("/user/logout sessionId={}",session.getId());
session.removeAttribute(MallConst.CURRENT_USER);
return ResponseVo.success();
}
}
|
[
"[email protected]"
] | |
213c6dd0426cba743ab8692c0524cbc8fd6cc6bd
|
6c1d1c74ee3e15cb231fb3b87934feea7b779e00
|
/BarrenLands/src/main/java/mapData/Shape.java
|
0a71e3a0948ea42a6857738227b543ac8526bee7
|
[] |
no_license
|
JohnHarley/arable
|
ecfa5b88f0b2eb388b9c887b3aac94889aa2cbb4
|
40ee151490f2122d0bdb4f2159e3c734ea4832cc
|
refs/heads/master
| 2020-03-12T07:00:53.333678 | 2018-05-01T04:19:08 | 2018-05-01T04:19:08 | 130,498,092 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 458 |
java
|
package mapData;
import java.util.ArrayList;
import java.util.List;
public class Shape extends ArrayList<Box>{
public void merge(Shape shapeToAbsorb) {
addAll(shapeToAbsorb);
for (Box box: shapeToAbsorb){
box.setShape(this);
}
shapeToAbsorb.clear(); // remove references to Boxes for garbage collection
}
public int size() {
int size = 0;
for (Box box : this) {
size += box.area();
}
return size;
}
}
|
[
"johnh@DESKTOP-ISNDB6J"
] |
johnh@DESKTOP-ISNDB6J
|
0f022c5ccfe107399420a2a090fa31c5997dd1a1
|
56456387c8a2ff1062f34780b471712cc2a49b71
|
/com/google/android/gms/games/internal/api/QuestsImpl$3.java
|
6664b4edefe08b1bf36bae8ea7296b0d7963cb32
|
[] |
no_license
|
nendraharyo/presensimahasiswa-sourcecode
|
55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50
|
890fc86782e9b2b4748bdb9f3db946bfb830b252
|
refs/heads/master
| 2020-05-21T11:21:55.143420 | 2019-05-10T19:03:56 | 2019-05-10T19:03:56 | 186,022,425 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 852 |
java
|
package com.google.android.gms.games.internal.api;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.games.internal.GamesClientImpl;
class QuestsImpl$3
extends QuestsImpl.LoadsImpl
{
QuestsImpl$3(QuestsImpl paramQuestsImpl, GoogleApiClient paramGoogleApiClient, int[] paramArrayOfInt, int paramInt, boolean paramBoolean)
{
super(paramGoogleApiClient, null);
}
protected void zza(GamesClientImpl paramGamesClientImpl)
{
int[] arrayOfInt = this.zzaGY;
int i = this.zzaGl;
boolean bool = this.zzaFO;
paramGamesClientImpl.zza(this, arrayOfInt, i, bool);
}
}
/* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\com\google\android\gms\games\internal\api\QuestsImpl$3.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"[email protected]"
] | |
c038bb1d76d0954059c64f17dceb4af001f4ce2a
|
abe6bc71b10e4808ad43ed417e9ea727632eee64
|
/src/main/java/assignment1/models/Owner.java
|
cf96fcb9426959a20a6946197f36e28b1d4abd93
|
[] |
no_license
|
DiogoCruz40/assignment1_is
|
b42fa5be3da49749792836871a73322bb4324d8e
|
f0f0f68832f5b2fc9e4428330f250c4fc58d275a
|
refs/heads/master
| 2023-08-12T19:16:43.453357 | 2021-10-08T20:55:25 | 2021-10-08T20:55:25 | 413,977,358 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,787 |
java
|
package assignment1.models;
import assignment1.helpers.TimeZoneAdaptor;
import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.io.Serializable;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.util.ArrayList;
@XmlAccessorType(XmlAccessType.FIELD)
public class Owner implements Serializable {
//region Private Properties
@XmlID
@XmlAttribute
private String ownerId;
@XmlAttribute
private String name;
@XmlJavaTypeAdapter(TimeZoneAdaptor.class)
private LocalDateTime birthdate;
private BigInteger telephone;
private String address;
// @XmlIDREF
@XmlElement(name="pet")
private ArrayList<Pet> pets;
//endregion Private Properties
//region Constructor
public Owner() {
this.pets = new ArrayList<>();
this.birthdate = LocalDateTime.now();
}
public Owner(String ownerId, String name, BigInteger telephone, String address) {
this.ownerId = ownerId;
this.name = name;
this.telephone = telephone;
this.address = address;
this.pets = new ArrayList<>();
this.birthdate = LocalDateTime.now();
}
//endregion Constructor
//region Accessors
public void setPets(ArrayList pets) { this.pets = pets; }
public String getOwnerId() {
return ownerId;
}
public String getName() {
return name;
}
public LocalDateTime getBirthdate() {
return birthdate;
}
public BigInteger getTelephone() {
return telephone;
}
public String getAddress() {
return address;
}
public ArrayList<Pet> getPets() {
return pets;
}
//endregion Accessors
}
|
[
"[email protected]"
] | |
530dda9767f2442b2956171ea843e9fcf624988d
|
bef3ef5c44d97c468b5359b81bb8c4c4b95f151d
|
/IntegrationTesting/src/main/java/uimapper/FooterComponentUIMapper.java
|
9bbd214591a58e076126213aa2ffd71554b9d09b
|
[] |
no_license
|
stsiwo/sts_blogs
|
3a90f883f65b4a680f0b271e3792c63bcdc25aef
|
57231d4f040e5d4be557dc14cc583d269b812602
|
refs/heads/master
| 2023-01-14T01:37:22.538717 | 2020-04-02T18:03:52 | 2020-04-02T18:03:52 | 212,732,622 | 0 | 0 | null | 2023-01-04T23:30:34 | 2019-10-04T04:00:43 |
TypeScript
|
UTF-8
|
Java
| false | false | 263 |
java
|
package main.java.uimapper;
import org.openqa.selenium.By;
public final class FooterComponentUIMapper {
public final static By FOOTER = By.cssSelector("footer");
public final static By ABOUT_ME = By.cssSelector("h2.footer-content-about-me-title");
}
|
[
"[email protected]"
] | |
c772e048eff51ec53e4ed2af15f9c92ba6ae5564
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/22/22_3236057e709db9969bdb1e47ff06747e5c9c1497/TestReadAndCountDods/22_3236057e709db9969bdb1e47ff06747e5c9c1497_TestReadAndCountDods_s.java
|
8480831ba237363b2e13fdd0c2fbc35ca9db397c
|
[] |
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 | 8,835 |
java
|
/*
* Copyright 1998-2009 University Corporation for Atmospheric Research/Unidata
*
* Portions of this software were developed by the Unidata Program at the
* University Corporation for Atmospheric Research.
*
* Access and use of this software shall impose the following obligations
* and understandings on the user. The user is granted the right, without
* any fee or cost, to use, copy, modify, alter, enhance and distribute
* this software, and any derivative works thereof, and its supporting
* documentation for any purpose whatsoever, provided that this entire
* notice appears in all copies of the software, derivative works and
* supporting documentation. Further, UCAR requests that the user credit
* UCAR/Unidata in any publications that result from the use of this
* software or in any product that includes this software. The names UCAR
* and/or Unidata, however, may not be used in any advertising or publicity
* to endorse or promote any products or commercial entity unless specific
* written permission is obtained from UCAR/Unidata. The user also
* understands that UCAR/Unidata is not obligated to provide the user with
* any support, consulting, training or assistance of any kind with regard
* to the use, operation and performance of this software nor to provide
* the user with any updates, revisions, new versions or "bug fixes."
*
* THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA 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 ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package ucar.nc2.dt.grid;
import junit.framework.*;
/** Count geogrid objects - sanity check when anything changes. */
public class TestReadAndCountDods extends TestCase {
static String base = "thredds:resolve:http://motherlode.ucar.edu:8080/thredds/";
public TestReadAndCountDods( String name) {
super(name);
}
public void testRead() throws Exception {
/* this has a Grid that returns a structure
try {
doOne("dods://iridl.ldeo.columbia.edu/SOURCES/.CAYAN/dods", "", 5, 1, 3, 0);
} catch (Throwable e) {
System.out.println(" -- barf");
} // */
/* this has a Grid that returns a bare array
try {
doOne("dods://usgodae2.usgodae.org:80/dods/GDS/coamps_cent_am/COAMPS_cent_am_0001_000000-000000ltnt_heat_flux", "", 1, 1, 3, 0);
} catch (Throwable e) {
System.out.println(" -- barf");
} // */
/* IDV netcdf files, one from each model
TestReadandCount.doOne(base,"dqc/latestModel-InvCat1.0?nam_211", 41, 7, 9, 5);
TestReadandCount.doOne(base,"dqc/latestModel-InvCat1.0?gfs_211", 31, 6, 8, 4);
TestReadandCount.doOne(base,"dqc/latestModel-InvCat1.0?gfs_37-44", 31, 4, 8, 4);
TestReadandCount.doOne(base,"dqc/latestModel-InvCat1.0?gfs_25-26", 4, 2, 5, 1);
TestReadandCount.doOne(base,"dqc/latestModel-InvCat1.0?ruc_211", 31, 5, 7, 3);
TestReadandCount.doOne(base,"dqc/latestModel-InvCat1.0?ruc2_236", 48, 4, 7, 3);
TestReadandCount.doOne(base,"dqc/latestModel-InvCat1.0?sst_21-24", 1, 1, 4, 0);
TestReadandCount.doOne(base,"dqc/latestModel-InvCat1.0?sst_61-64", 1, 1, 4, 0);
TestReadandCount.doOne(base,"dqc/latestModel-InvCat1.0?ocean_21-24", 5, 1, 4, 0); // */
// Problem with latest showing incomplete files !!
// Grib files, one from each model
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/GFS/Alaska_191km/files/latest.xml", 22, 10, 12, 7); //
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/GFS/CONUS_80km/files/latest.xml", 31, 12, 15, 8);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/GFS/CONUS_95km/files/latest.xml", 30, 10, 12, 8);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/GFS/CONUS_191km/files/latest.xml", 20, 8, 10, 7);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/GFS/Global_0p5deg/files/latest.xml", 133, 26, 27, 21);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/GFS/Global_onedeg/files/latest.xml", 133, 26, 27, 21);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/GFS/Global_2p5deg/files/latest.xml", 133, 24, 25, 21);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/GFS/Hawaii_160km/files/latest.xml", 15, -1, 10, 6);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/GFS/N_Hemisphere_381km/files/latest.xml", 23, 9, 11, 6);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/GFS/Puerto_Rico_191km/files/latest.xml", 15, -1, 10, 6);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/Alaska_11km/files/latest.xml", 59, 16, 18, 13);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/Alaska_22km/files/latest.xml", 25, -1, 10, 6);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/Alaska_45km/noaaport/files/latest.xml", 21, 6, 8, 4);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/Alaska_45km/conduit/files/latest.xml", 154, -1, -1, 31);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/Alaska_95km/files/latest.xml", 29, 12, 14, 9);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/CONUS_12km/files/latest.xml", 59, 16, 18, 13);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/CONUS_20km/surface/files/latest.xml", 54, -1, -1, 12);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/CONUS_20km/selectsurface/files/latest.xml", 54, -1, -1, 12);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/CONUS_20km/noaaport/files/latest.xml", 33, 9, 11, 7);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/CONUS_40km/conduit/files/latest.xml", 176, -1, -1, 25);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/CONUS_80km/files/latest.xml", 41, 11, 13, 8);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/NAM/Polar_90km/files/latest.xml", 133, 28, 30, 25);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RAP/CONUS_13km/files/latest.xml", 52, -1, -1, 9);
//TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC2/CONUS_13km/files/latest.xml", 52, 13, 15, 9);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RAP/CONUS_20km/files/latest.xml", 74, 15, 17, 11);
//TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC2/CONUS_20km/surface/files/latest.xml", 74, 15, 17, 11); // now Rapid refresh 5/4/2012
//TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC2/CONUS_20km/pressure/files/latest.xml", -1, 12, 14, 9);
//TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC2/CONUS_20km/hybrid/files/latest.xml", 55, 10, 12, 8);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC2/CONUS_40km/files/latest.xml", 48, -1, -1, 10);
//TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC/CONUS_80km/files/latest.xml", 31, 9, 11, 5); // */
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/DGEX/CONUS_12km/files/latest.xml", 23, 11, 13, 8);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/DGEX/Alaska_12km/files/latest.xml", 23, 11, 13, 8);
}
public void utestProblem() throws Exception {
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC2/CONUS_13km/files/latest.xml", 52, 13, 15, 9);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC2/CONUS_20km/surface/files/latest.xml", 74, 15, 17, 11); // now Rapid refresh 5/4/2012
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC2/CONUS_20km/pressure/files/latest.xml", -1, 12, 14, 9);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC2/CONUS_20km/hybrid/files/latest.xml", 55, 10, 12, 8);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC2/CONUS_40km/files/latest.xml", 48, 15, 17, 10);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/RUC/CONUS_80km/files/latest.xml", 31, 9, 11, 5); // */
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/DGEX/CONUS_12km/files/latest.xml", 23, 11, 13, 8);
TestReadandCount.doOne(base,"catalog/fmrc/NCEP/DGEX/Alaska_12km/files/latest.xml", 23, 11, 13, 8);
}
static void doOne(String dir, String filename, int ngrids, int ncoordSys, int ncoordAxes, int nVertCooordAxes) throws Exception {
TestReadandCount.doOne(dir, filename, ngrids, ncoordSys, ncoordAxes, nVertCooordAxes);
}
public static void main( String arg[]) throws Exception {
// new TestReadandCount("dummy").doOne("C:/data/conventions/wrf/","wrf.nc", 33, 5, 7, 7); // missing TSLB
new TestReadandCountGrib("dummy").testRead(); // missing TSLB
}
}
|
[
"[email protected]"
] | |
467ccb988fbf060fc845ca2e382c5bb0ca82df55
|
43ef18d1a795e98455db212a70ca8a811d191940
|
/app/src/main/java/com/frateinc/yopbooking2/RegisterEvent.java
|
c76e1a8bef619a6b2b4ff08fd790a52bb6a2458e
|
[] |
no_license
|
YoannBalcon/YopBooking
|
c8998d495359c73ba2dc8a12d240756a011f0a44
|
b6a19ce728b3b95d8fadd7527550f9687e3d4954
|
refs/heads/master
| 2021-01-22T03:49:38.970594 | 2017-02-21T07:21:46 | 2017-02-21T07:21:46 | 81,961,629 | 0 | 2 | null | 2017-02-20T10:56:57 | 2017-02-14T15:50:14 |
Java
|
UTF-8
|
Java
| false | false | 1,362 |
java
|
package com.frateinc.yopbooking2;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.frateinc.yopbooking2.R;
import org.w3c.dom.Text;
/**
* Created by Afpa on 08/02/2017.
*/
public class RegisterEvent extends AppCompatActivity {
String eventId;
TextView lbltestid;
EditText txtRegisterFirstname;
EditText txtRegisterLastname;
Button btnRegisterEvent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.register_event);
lbltestid = (TextView) findViewById(R.id.lbltestid);
txtRegisterFirstname = (EditText) findViewById(R.id.txtRegisterFirstname);
txtRegisterLastname = (EditText) findViewById(R.id.txtRegisterLastname);
eventId = getIntent().getStringExtra("event_id");
lbltestid.setText(eventId);
btnRegisterEvent.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
txtRegisterFirstname.getText();
txtRegisterLastname.getText();
// Param.userId;
}
});
}
}
|
[
"Afpa"
] |
Afpa
|
0f2fda379b40536fafcf44a7b47a2ca08e3378d6
|
0ce62dc8df92ba49b9de718feb3bbc8ae34d89cf
|
/src/Depart/DepartAddFrame.java
|
b7a9f3eff00c84d3f440a8ef4d05ba65eb8cb3ad
|
[] |
no_license
|
lzh982/StudentManegement
|
ac45f850c0ac47bf8f32e947cdd25b79d9c31b7b
|
65e8b555fe6a7a1d3576d70671e93ab5da4cecb8
|
refs/heads/master
| 2022-12-07T04:36:12.078824 | 2020-09-09T03:48:20 | 2020-09-09T03:48:20 | 293,994,541 | 0 | 0 | null | null | null | null |
GB18030
|
Java
| false | false | 8,024 |
java
|
package Depart;
import java.sql.ResultSet;
import java.awt.*;
import javax.swing.*;
import db.dbConn;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
*
* Title: 院系信息录入
* Description: 院系信息录入模块,实现对学院、专业的录入。
*
* @author 谢孟辉
*/
public class DepartAddFrame extends JFrame {
JPanel contentPane;
JLabel jLabel1 = new JLabel();
JLabel jLabel3 = new JLabel();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
JOptionPane jOptionPane1 = new JOptionPane();
JComboBox jComboBox1 = new JComboBox();
String xueyuan, zhuanye;
dbConn conn = new dbConn();
JLabel jLabel4 = new JLabel();
JComboBox jComboBox2 = new JComboBox();
public DepartAddFrame() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
contentPane = (JPanel) getContentPane();
contentPane.setLayout(null);
setSize(new Dimension(465, 280));
setTitle("院系录入");
jLabel1.setFont(new java.awt.Font("Dialog", Font.BOLD, 20));
jLabel1.setText("院 系 信 息 录 入");
jLabel1.setBounds(new Rectangle(136, 20, 212, 25));
jLabel3.setFont(new java.awt.Font("Dialog", Font.PLAIN, 18));
jLabel3.setText("所属学院:");
jLabel3.setBounds(new Rectangle(80, 80, 90, 20));
jButton1.setBounds(new Rectangle(102, 180, 96, 29));
jButton1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 16));
jButton1.setBorder(BorderFactory.createRaisedBevelBorder());
jButton1.setText("提 交");
jButton1.addActionListener(new AddDepartFrame_jButton1_actionAdapter(this));
jButton2.setBounds(new Rectangle(265, 180, 96, 31));
jButton2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 16));
jButton2.setBorder(BorderFactory.createRaisedBevelBorder());
jButton2.setToolTipText("");
jButton2.setText("退 出");
jButton2.addActionListener(new AddDepartFrame_jButton2_actionAdapter(this));
jOptionPane1.setBounds(new Rectangle(106, 258, 262, 90));
jOptionPane1.setLayout(null);
jComboBox1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 16));
jComboBox1.setEditable(true);
jComboBox1.setBounds(new Rectangle(180, 80, 180, 25));
jComboBox1.addActionListener(new AddDepartFrame_jComboBox1_actionAdapter(this));
jLabel4.setFont(new java.awt.Font("Dialog", Font.PLAIN, 18));
jLabel4.setText("所属专业:");
jLabel4.setBounds(new Rectangle(80, 130, 90, 20));
jComboBox2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 16));
jComboBox2.setEditable(true);
jComboBox2.setBounds(new Rectangle(180, 130, 180, 25));
contentPane.add(jLabel1);
contentPane.add(jOptionPane1);
contentPane.add(jComboBox1);
contentPane.add(jLabel3);
contentPane.add(jLabel4);
contentPane.add(jComboBox2);
contentPane.add(jButton2);
contentPane.add(jButton1);
jComboBox1.addItem("请选择学院");
// 选择学院
try {
ResultSet rs = conn.getRs("select * from tb_depart ");
while (rs.next()) {
String xibu = rs.getString("departName");
jComboBox1.addItem(xibu);
}
} catch (Exception ce) {
System.out.println("++++++++" + ce);
}
jComboBox2.setEnabled(false);
}
// 选择专业
public void zhuanye() {
jComboBox2.removeAllItems();
jComboBox2.addItem("请选择专业");
try {
ResultSet rs = conn.getRs(
"select * from tb_spec where departName='" + String.valueOf(jComboBox1.getSelectedItem()) + "' ");
while (rs.next()) {
String zhy = rs.getString("specName");
jComboBox2.addItem(zhy);
}
} catch (Exception ce) {
System.out.println("++++++++" + ce);
}
}
// 存下选定学院到xueyuan
public void xueYuan() {
String sel = String.valueOf(jComboBox1.getSelectedItem());
try {
ResultSet rs = conn.getRs("select * from tb_depart where departName='" + sel + "'");
while (rs.next()) {
xueyuan = rs.getString("departName");
}
} catch (Exception ce) {
System.out.println("++++++++" + ce);
}
}
// 存下选定专业到zhuanye
public void zhuanYe() {
String sel = String.valueOf(jComboBox2.getSelectedItem());
try {
ResultSet rs = conn.getRs("select * from tb_spec where specName='" + sel + "'");
while (rs.next()) {
zhuanye = rs.getString("specName");
}
} catch (Exception ce) {
System.out.println("++++++++" + ce);
}
}
// 退出
public void jButton2_actionPerformed(ActionEvent e) {
this.dispose();
}
// 添加院系
public void jButton1_actionPerformed(ActionEvent e) {
// 异常判断
if (jComboBox1.getSelectedIndex() == 0) {
jOptionPane1.showMessageDialog(this, "请选择所属学院!", "提示", JOptionPane.INFORMATION_MESSAGE, null);
} else if (jComboBox2.getSelectedIndex() == 0) {
jOptionPane1.showMessageDialog(this, "请选择所属专业!", "提示", JOptionPane.INFORMATION_MESSAGE, null);
} else {
xueYuan();
zhuanYe();
try {
// 对学院、专业分别存在与否的四种情况做判断处理
boolean departExist = false, specExist = false;
ResultSet rs_departExist = conn.getRs("select * from tb_spec where departName= '"
+ String.valueOf(jComboBox1.getSelectedItem()) + "' ");
while (rs_departExist.next()) {
departExist = true;
}
ResultSet rs_specExist = conn.getRs("select * from tb_spec where specName= '"
+ String.valueOf(jComboBox2.getSelectedItem()) + "' ");
while (rs_specExist.next()) {
specExist = true;
}
if (departExist && specExist) {
jOptionPane1.showMessageDialog(this, "该学院与专业已经存在!", "提示", JOptionPane.INFORMATION_MESSAGE, null);
} else if (!departExist && specExist) {
jOptionPane1.showMessageDialog(this, "该专业在其他学院已经存在!", "提示", JOptionPane.INFORMATION_MESSAGE, null);
} else if (departExist && !specExist) {
conn.getUpdate("insert into tb_spec (departName,specName) values ('"
+ String.valueOf(jComboBox1.getSelectedItem()) + "','"
+ String.valueOf(jComboBox2.getSelectedItem()) + "')");
jOptionPane1.showMessageDialog(this, "恭喜您院系录入成功!", "提示", JOptionPane.INFORMATION_MESSAGE, null);
} else if (!departExist && !specExist) {
conn.getUpdate("insert into tb_spec (departName,specName) values ('"
+ String.valueOf(jComboBox1.getSelectedItem()) + "','"
+ String.valueOf(jComboBox2.getSelectedItem()) + "')");
conn.getUpdate("insert into tb_depart (departName) values ('"
+ String.valueOf(jComboBox1.getSelectedItem()) + "') ");
jOptionPane1.showMessageDialog(this, "恭喜您院系录入成功!", "提示", JOptionPane.INFORMATION_MESSAGE, null);
}
} catch (Exception ce) {
System.out.println(ce);
}
}
}
// 选择触发
public void jComboBox1_actionPerformed(ActionEvent e) {
zhuanye();
jComboBox2.setEnabled(true);
}
}
class AddDepartFrame_jComboBox1_actionAdapter implements ActionListener {
private DepartAddFrame adaptee;
AddDepartFrame_jComboBox1_actionAdapter(DepartAddFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jComboBox1_actionPerformed(e);
}
}
class AddDepartFrame_jButton1_actionAdapter implements ActionListener {
private DepartAddFrame adaptee;
AddDepartFrame_jButton1_actionAdapter(DepartAddFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
class AddDepartFrame_jButton2_actionAdapter implements ActionListener {
private DepartAddFrame adaptee;
AddDepartFrame_jButton2_actionAdapter(DepartAddFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
}
}
|
[
"[email protected]"
] | |
1e29968af3f37ccd7903e7b98664115acc82e518
|
fb342bd11d82fcc24aa38eec728d845a3b996a20
|
/api/src/main/java/pico/erp/production/order/ProductionOrderView.java
|
5f4dbe7febe5be9e4199977682958a2234e93162
|
[] |
no_license
|
kkojaeh/pico-erp-production-order
|
a430ce9724d5a85b000520e80e5ee4bb923e3042
|
3557a5c92efd7f66b6e927d87ea974da02633629
|
refs/heads/master
| 2020-04-26T11:38:45.446376 | 2019-04-05T04:24:54 | 2019-04-05T04:24:54 | 173,523,726 | 0 | 0 | null | 2019-04-03T23:58:22 | 2019-03-03T02:52:06 |
Java
|
UTF-8
|
Java
| false | false | 1,676 |
java
|
package pico.erp.production.order;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.Set;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import pico.erp.company.CompanyId;
import pico.erp.item.ItemId;
import pico.erp.item.spec.ItemSpecCode;
import pico.erp.process.ProcessId;
import pico.erp.project.ProjectId;
import pico.erp.shared.data.UnitKind;
import pico.erp.user.UserId;
import pico.erp.warehouse.location.site.SiteId;
import pico.erp.warehouse.location.station.StationId;
@Data
public class ProductionOrderView {
ProductionOrderId id;
ProductionOrderCode code;
ItemId itemId;
ProcessId processId;
ItemSpecCode itemSpecCode;
BigDecimal quantity;
BigDecimal spareQuantity;
BigDecimal progressedQuantity;
BigDecimal erroredQuantity;
UnitKind unit;
UserId ordererId;
UserId accepterId;
ProjectId projectId;
CompanyId receiverId;
SiteId receiveSiteId;
StationId receiveStationId;
OffsetDateTime dueDate;
OffsetDateTime committedDate;
OffsetDateTime completedDate;
OffsetDateTime acceptedDate;
OffsetDateTime rejectedDate;
OffsetDateTime canceledDate;
ProductionOrderStatusKind status;
OffsetDateTime estimatedPreparedDate;
OffsetDateTime preparedDate;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public static class Filter {
String code;
CompanyId receiverId;
UserId ordererId;
UserId accepterId;
ProjectId projectId;
ItemId itemId;
Set<ProductionOrderStatusKind> statuses;
OffsetDateTime startDueDate;
OffsetDateTime endDueDate;
}
}
|
[
"[email protected]"
] | |
711a6f1457aab314bf8ab97f1ba03abb46b31603
|
6b2e95ae0c1cbd6eef653fd7b39b9203c42e8caa
|
/challengeproducer/src/test/java/com/kleffy/mintbank/challengeproducer/factory/performance/PayloadFactoryTest.java
|
7aaf5b593fbe0a0a28a65199f5f90b8ca884f493
|
[] |
no_license
|
kleffy/mintbank_challenge
|
a2df98521e60b2b32abecba66a97c616ea232832
|
c65b0c30f6052d25dc8a03311e236f5d38c7af58
|
refs/heads/master
| 2022-12-16T02:35:58.414532 | 2020-09-04T16:17:53 | 2020-09-04T16:17:53 | 292,635,440 | 0 | 0 | null | 2020-09-04T16:17:54 | 2020-09-03T17:24:41 |
Java
|
UTF-8
|
Java
| false | false | 644 |
java
|
package com.kleffy.mintbank.challengeproducer.factory.performance;
import com.kleffy.mintbank.challengeproducer.domain.performance.Payload;
import org.junit.jupiter.api.Test;
import java.util.HashMap;
import java.util.Map;
import static org.junit.jupiter.api.Assertions.*;
class PayloadFactoryTest {
@Test
void buildPayload() {
Map<String, Integer> cardHits = new HashMap<>();
cardHits.put("547836", 3);
cardHits.put("438946", 1);
cardHits.put("516251", 4);
Payload payload = PayloadFactory.buildPayload(cardHits);
System.out.println(payload);
assertNotNull(payload);
}
}
|
[
"[email protected]"
] | |
f2141c3766e54661f33c5717221105bc78ed787a
|
a5045f118eabd96e3871871cfb1a2369745148f1
|
/src/main/java/com/jodasoft/sistfact/gco/ctr/IngresoMercaderiaController.java
|
345bb58af8701a6afe223da84007337bb1958d53
|
[] |
no_license
|
jono2123/facturacion
|
def18c197cd828ab4e1e7bec380aae8e74ec3339
|
7eebbc3e15f9fb8514e42c9518285cb770a971d2
|
refs/heads/master
| 2020-05-20T02:26:15.620581 | 2015-09-02T21:14:20 | 2015-09-02T21:14:20 | 37,072,985 | 0 | 1 | null | null | null | null |
UTF-8
|
Java
| false | false | 12,130 |
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.jodasoft.sistfact.gco.ctr;
import com.jodasoft.sistfact.gco.mdl.Articulo;
import com.jodasoft.sistfact.gco.mdl.Cardex;
import com.jodasoft.sistfact.gco.mdl.ConfiguracionInventario;
import com.jodasoft.sistfact.gco.mdl.DetalleFactura;
import com.jodasoft.sistfact.gco.mdl.IngresoMercaderia;
import com.jodasoft.sistfact.gco.mdl.IngresoMercaderiaDetalle;
import com.jodasoft.sistfact.gco.mdl.Permiso;
import com.jodasoft.sistfact.gco.util.exp.IngresoMercaderiaValidadorException;
import javax.inject.Named;
import javax.enterprise.context.SessionScoped;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.EJB;
import org.primefaces.context.RequestContext;
import org.primefaces.event.CellEditEvent;
/**
*
* @author johnny
*/
@Named(value = "ingresoMercaderiaController")
@SessionScoped
public class IngresoMercaderiaController extends AbstractMB implements Serializable {
/**
* Creates a new instance of IngresoMercaderiaController
*/
private String codigo;
private double cantidad;
private double costo;
private String descripcion;
private Articulo articulo;
private List<IngresoMercaderiaDetalle> detalle;
private IngresoMercaderia ingreso;
private Date fechaIngreso;
private String concepto;
private int i;
private ConfiguracionInventario configuracion;
//totales de la factura
private double subtTotal;
private double subTotalSinIva;
private double subTotalConIva;
private double iva;
private double total;
private Permiso permiso;
@EJB
com.jodasoft.sistfact.gco.dao.ArticuloFacade articuloFacade;
@EJB
com.jodasoft.sistfact.gco.dao.ConfiguracionInventarioFacade configuracionInventarioFacade;
@EJB
com.jodasoft.sistfact.gco.dao.IngresoMercaderiaFacade ingresoMercaderiaFacade;
@EJB
com.jodasoft.sistfact.gco.dao.CardexFacade cardexFacade;
public IngresoMercaderiaController() {
fechaIngreso = new Date();
i = 0;
}
public void buscaArticuloPorCodigo() {
articulo = articuloFacade.findByCodigoAndAlmacen(LoginController.getInstance().getUsuario().getRolId().getAlmaId(), codigo);
if (articulo == null) {
articulo = new Articulo();
displayErrorMessageToUser("No se encontró ningún artículo con ese código");
setCosto(0);
setCantidad(0);
setDescripcion("");
} else {
setDescripcion(articulo.getArtiDescripcion());
setCosto(articulo.getArtiPrecioCompra());
setCantidad(1);
}
}
public void agregarItem() {
if (articulo == null) {
displayErrorMessageToUser("No se ha seleccionado ningún producto para agregar");
return;
}
if (cantidad <= 0) {
displayErrorMessageToUser("Ingrese una cantidad");
return;
}
if (costo < 0) {
displayErrorMessageToUser("El precio no puede ser un valor negativo");
return;
}
if (getConfiguracion().getCoinDesglozarIvaCosto()&& articulo.getArtiIva()) {
costo = costo / (1 + LoginController.getInstance().getUsuario().getRolId().getAlmaId().getAlmaIva() / 100d);
}
IngresoMercaderiaDetalle item = new IngresoMercaderiaDetalle();
if(articulo.getArtiIva())
{
item.setImdeIva(redondear(costo*LoginController.getInstance().getUsuario().getRolId().getAlmaId().getAlmaIva()/100d));
}else
{
item.setImdeIva(0d);
}
item.setArtiId(articulo);
item.setImdeCantidad(cantidad);
item.setImdeCostoUnitario(redondear(costo));
item.setLoteCodigo(obtenCodLote(item));
item.setNumItem(i);
int pos = existe(item);
if (pos == -1) {
detalle.add(item);
i++;
} else {
detalle.get(pos).setImdeCantidad(detalle.get(pos).getImdeCantidad() + item.getImdeCantidad());
}
calcular();
articulo = null;
setCodigo("");
setCantidad(0);
setCosto(0);
setDescripcion("");
}
public void onCellEdit(CellEditEvent event) {
RequestContext requestContext = RequestContext.getCurrentInstance();
calcular();
requestContext.execute("document.getElementById('frmPrincipal:cmdActualizar').click();");
}
public void calcular() {
subtTotal = 0;
subTotalConIva = 0;
subTotalSinIva = 0;
iva = 0;
total = 0;
for (IngresoMercaderiaDetalle deta : detalle) {
subtTotal += deta.getImdeCantidad() * deta.getImdeCostoUnitario();
if (deta.getArtiId().getArtiIva()) {
subTotalConIva = subTotalConIva + deta.getImdeCantidad() * deta.getImdeCostoUnitario();
} else {
subTotalSinIva = subTotalSinIva + deta.getImdeCantidad() * deta.getImdeCostoUnitario();
}
}
iva = (subTotalConIva) * LoginController.getInstance().getUsuario().getRolId().getAlmaId().getAlmaIva() / 100d;
total = subTotalConIva + subTotalSinIva + iva;
}
private int existe(IngresoMercaderiaDetalle item) {
for (int i = 0; i < detalle.size(); i++) {
if (item.getArtiId().getArtiId().equals(detalle.get(i).getArtiId().getArtiId()) && item.getImdeCostoUnitario().equals(detalle.get(i).getImdeCostoUnitario())) {
return i;
}
}
return -1;
}
private boolean existeParaCod(IngresoMercaderiaDetalle item) {
for (int i = 0; i < detalle.size(); i++) {
if (item.getArtiId().getArtiId().equals(detalle.get(i).getArtiId().getArtiId())) {
return true;
}
}
return false;
}
public String obtenCodLote(IngresoMercaderiaDetalle item) {
Date d;
if(existeParaCod(item)){
d= new Date();
}
else{
d=fechaIngreso;
}
String codLote = "";
String dia = String.valueOf(d.getDate());
String mes = String.valueOf(d.getMonth());
String anio = Integer.toHexString(d.getYear());
int tiempo=d.getHours()*1000+d.getMinutes()*100+d.getSeconds();
String hora = Integer.toString(tiempo, 30);
codLote = dia + mes + anio+hora.toUpperCase();
return codLote;
}
public void quitar(IngresoMercaderiaDetalle item) {
for (int i = 0; i < detalle.size(); i++) {
if (detalle.get(i).getArtiId().equals(item.getArtiId())) {
detalle.remove(i);
}
}
calcular();
}
public void guardarIngreso(){
ingreso = new IngresoMercaderia();
ingreso.setRegConcepto(concepto);
ingreso.setRegEstado(true);
ingreso.setRegFecha(fechaIngreso);
ingreso.setRegIva(iva);
ingreso.setRegSubtotalSinIva(subTotalSinIva);
ingreso.setRegSubutotal(subtTotal);
ingreso.setRegTotal(total);
ingreso.setUsuaId(LoginController.getInstance().getUsuario());
for(IngresoMercaderiaDetalle deta : detalle){
deta.setRegId(ingreso);
}
ingreso.setIngresoMercaderiaDetalleList(detalle);
try {
ingresoMercaderiaFacade.save(ingreso);
guardarKardex(ingreso);
closeDialog();
displayInfoMessageToUser("Ingreso guardado correctamente");
limpiaTodo();
} catch (IngresoMercaderiaValidadorException ex) {
displayErrorMessageToUser(ex.getMessage());
}
}
public void guardarKardex(IngresoMercaderia ingreso){
for(IngresoMercaderiaDetalle deta : ingreso.getIngresoMercaderiaDetalleList())
{
Cardex kardex= new Cardex();
kardex.setCardCantidad(deta.getImdeCantidad());
kardex.setCardFecha(ingreso.getRegFecha());
kardex.setCardOperacion("ENTRADA");
kardex.setCardTipoDocumento("INGRESO");
kardex.setLoteId(deta.getLoteId());
kardex.setNumeroDocumento(ingreso.getRegId());
cardexFacade.createCardex(kardex);
}
}
public void limpiaTodo(){
setCodigo("");
setCantidad(0);
setCosto(0);
ingreso = new IngresoMercaderia();
detalle = new ArrayList<IngresoMercaderiaDetalle>();
iva=0;
subTotalConIva=0;
subTotalSinIva=0;
total=0;
articulo=null;
descripcion="";
fechaIngreso= new Date();
i=0;
subtTotal=0;
}
//////////////////////////////////getters and setters/////////////////////////////
public String getCodigo() {
return codigo;
}
public void setCodigo(String codigo) {
this.codigo = codigo.toUpperCase();
}
public double getCantidad() {
return cantidad;
}
public void setCantidad(double cantidad) {
this.cantidad = cantidad;
}
public double getCosto() {
return costo;
}
public void setCosto(double costo) {
this.costo = costo;
}
public String getDescripcion() {
return descripcion;
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
public Articulo getArticulo() {
return articulo;
}
public void setArticulo(Articulo articulo) {
this.articulo = articulo;
}
public List<IngresoMercaderiaDetalle> getDetalle() {
if (detalle == null) {
detalle = new ArrayList<IngresoMercaderiaDetalle>();
}
return detalle;
}
public void setDetalle(List<IngresoMercaderiaDetalle> detalle) {
this.detalle = detalle;
}
public IngresoMercaderia getIngreso() {
return ingreso;
}
public void setIngreso(IngresoMercaderia ingreso) {
this.ingreso = ingreso;
}
public Date getFechaIngreso() {
return fechaIngreso;
}
public void setFechaIngreso(Date fechaIngreso) {
this.fechaIngreso = fechaIngreso;
}
public String getConcepto() {
return concepto;
}
public void setConcepto(String concepto) {
this.concepto = concepto;
}
public ConfiguracionInventario getConfiguracion() {
if (configuracion == null) {
configuracion = configuracionInventarioFacade.findByAlmaId(LoginController.getInstance().getUsuario().getRolId().getAlmaId().getAlmaId());
}
return configuracion;
}
public void setConfiguracion(ConfiguracionInventario configuracion) {
this.configuracion = configuracion;
}
public double getSubtTotal() {
return subtTotal;
}
public void setSubtTotal(double subtTotal) {
this.subtTotal = subtTotal;
}
public double getSubTotalSinIva() {
return subTotalSinIva;
}
public void setSubTotalSinIva(double subTotalSinIva) {
this.subTotalSinIva = subTotalSinIva;
}
public double getSubTotalConIva() {
return subTotalConIva;
}
public void setSubTotalConIva(double subTotalConIva) {
this.subTotalConIva = subTotalConIva;
}
public double getIva() {
return iva;
}
public void setIva(double iva) {
this.iva = iva;
}
public double getTotal() {
return total;
}
public void setTotal(double total) {
this.total = total;
}
public Permiso getPermiso() {
permiso = LoginController.getInstance().getPermiso("Ingreso de Mercadería");
return permiso;
}
public void setPermiso(Permiso permiso) {
this.permiso = permiso;
}
}
|
[
"johnny@johnny-PC"
] |
johnny@johnny-PC
|
3bec0f17bb8dd14eb658d28fa593dcfb87d88a01
|
f165528c3f66342542593ec76c065cd3eb470877
|
/app/src/main/java/br/com/wagner/cadastrodeclientes/ExibeContato.java
|
10638529859605544180e4f45b9664c5b2e50c98
|
[] |
no_license
|
wagneralves/CadastrodeClientesv2
|
03ca53eed23faa833dc72e43f3cad5f3824cbd53
|
5e31fa218a7ed8149322d5b35a612c20adec1b93
|
refs/heads/master
| 2020-03-20T22:54:28.421995 | 2018-06-26T12:31:10 | 2018-06-26T12:31:10 | 137,795,234 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,998 |
java
|
package br.com.wagner.cadastrodeclientes;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
public class ExibeContato extends Activity {
TextView exNome, exTelefone, exEmail, exCpf, exData, exDesc, exObs, tvIdModel2;
Cursor cursor;
BancoController crud;
String codigo;
ImageView ibVoltar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_exibe_contato);
ibVoltar = (ImageView) findViewById(R.id.ibVoltar);
codigo = this.getIntent().getStringExtra("codigo");
crud = new BancoController(getBaseContext());
exNome = (TextView) findViewById(R.id.txvExNome);
exTelefone = (TextView) findViewById(R.id.txvExTelefone);
exEmail = (TextView) findViewById(R.id.txvExEmail);
exCpf = (TextView) findViewById(R.id.txvExCPF);
exData = (TextView) findViewById(R.id.txvExDATA);
exDesc = (TextView) findViewById(R.id.txvExDescricao);
exObs = (TextView) findViewById(R.id.txvExObs);
tvIdModel2 = findViewById(R.id.tvIdModel2);
cursor = crud.carregaDadoById(Integer.parseInt(codigo));
exNome.setText(cursor.getString(cursor.getColumnIndexOrThrow(DBTableConfig.Columns.NOME)));
exTelefone.setText(cursor.getString(cursor.getColumnIndexOrThrow(DBTableConfig.Columns.TEL)));
exCpf.setText(cursor.getString(cursor.getColumnIndexOrThrow(DBTableConfig.Columns.CPF)));
exData.setText(cursor.getString(cursor.getColumnIndexOrThrow(DBTableConfig.Columns.DATA)));
exDesc.setText(cursor.getString(cursor.getColumnIndexOrThrow(DBTableConfig.Columns.DES)));
exEmail.setText(cursor.getString(cursor.getColumnIndexOrThrow(DBTableConfig.Columns.EMAIL)));
exObs.setText(cursor.getString(cursor.getColumnIndexOrThrow(DBTableConfig.Columns.OBS)));
tvIdModel2.setText(cursor.getString(cursor.getColumnIndexOrThrow(DBTableConfig.Columns.ID)));
}
public void voltar (View view){
Intent it = new Intent(getBaseContext(), ListarActivity.class);
startActivity(it);
}
private Toast toast;
private long lastBackPressTime = 0;
@SuppressLint({"WrongConstant", "ShowToast"})
@Override
public void onBackPressed() {
if (this.lastBackPressTime < System.currentTimeMillis() - 4000) {
toast = Toast.makeText(this, "Pressione o botão voltar novamente para sair!!!.", 4000);
toast.show();
this.lastBackPressTime = System.currentTimeMillis();
} else {
if (toast != null) {
toast.cancel();
}
super.onBackPressed();
}
}
}
|
[
"[email protected]"
] | |
4e6a2fa6b906a7b460f54cf3b4f423f603f77af5
|
eb5f5353f49ee558e497e5caded1f60f32f536b5
|
/java/text/DateFormat.java
|
8d4f8d78b79ae9bb05c730dd4e99183b851dc8b9
|
[] |
no_license
|
mohitrajvardhan17/java1.8.0_151
|
6fc53e15354d88b53bd248c260c954807d612118
|
6eeab0c0fd20be34db653f4778f8828068c50c92
|
refs/heads/master
| 2020-03-18T09:44:14.769133 | 2018-05-23T14:28:24 | 2018-05-23T14:28:24 | 134,578,186 | 0 | 2 | null | null | null | null |
UTF-8
|
Java
| false | false | 10,644 |
java
|
package java.text;
import java.io.InvalidObjectException;
import java.text.spi.DateFormatProvider;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Locale.Category;
import java.util.Map;
import java.util.TimeZone;
import sun.util.locale.provider.LocaleProviderAdapter;
import sun.util.locale.provider.LocaleServiceProviderPool;
public abstract class DateFormat
extends Format
{
protected Calendar calendar;
protected NumberFormat numberFormat;
public static final int ERA_FIELD = 0;
public static final int YEAR_FIELD = 1;
public static final int MONTH_FIELD = 2;
public static final int DATE_FIELD = 3;
public static final int HOUR_OF_DAY1_FIELD = 4;
public static final int HOUR_OF_DAY0_FIELD = 5;
public static final int MINUTE_FIELD = 6;
public static final int SECOND_FIELD = 7;
public static final int MILLISECOND_FIELD = 8;
public static final int DAY_OF_WEEK_FIELD = 9;
public static final int DAY_OF_YEAR_FIELD = 10;
public static final int DAY_OF_WEEK_IN_MONTH_FIELD = 11;
public static final int WEEK_OF_YEAR_FIELD = 12;
public static final int WEEK_OF_MONTH_FIELD = 13;
public static final int AM_PM_FIELD = 14;
public static final int HOUR1_FIELD = 15;
public static final int HOUR0_FIELD = 16;
public static final int TIMEZONE_FIELD = 17;
private static final long serialVersionUID = 7218322306649953788L;
public static final int FULL = 0;
public static final int LONG = 1;
public static final int MEDIUM = 2;
public static final int SHORT = 3;
public static final int DEFAULT = 2;
public final StringBuffer format(Object paramObject, StringBuffer paramStringBuffer, FieldPosition paramFieldPosition)
{
if ((paramObject instanceof Date)) {
return format((Date)paramObject, paramStringBuffer, paramFieldPosition);
}
if ((paramObject instanceof Number)) {
return format(new Date(((Number)paramObject).longValue()), paramStringBuffer, paramFieldPosition);
}
throw new IllegalArgumentException("Cannot format given Object as a Date");
}
public abstract StringBuffer format(Date paramDate, StringBuffer paramStringBuffer, FieldPosition paramFieldPosition);
public final String format(Date paramDate)
{
return format(paramDate, new StringBuffer(), DontCareFieldPosition.INSTANCE).toString();
}
public Date parse(String paramString)
throws ParseException
{
ParsePosition localParsePosition = new ParsePosition(0);
Date localDate = parse(paramString, localParsePosition);
if (index == 0) {
throw new ParseException("Unparseable date: \"" + paramString + "\"", errorIndex);
}
return localDate;
}
public abstract Date parse(String paramString, ParsePosition paramParsePosition);
public Object parseObject(String paramString, ParsePosition paramParsePosition)
{
return parse(paramString, paramParsePosition);
}
public static final DateFormat getTimeInstance()
{
return get(2, 0, 1, Locale.getDefault(Locale.Category.FORMAT));
}
public static final DateFormat getTimeInstance(int paramInt)
{
return get(paramInt, 0, 1, Locale.getDefault(Locale.Category.FORMAT));
}
public static final DateFormat getTimeInstance(int paramInt, Locale paramLocale)
{
return get(paramInt, 0, 1, paramLocale);
}
public static final DateFormat getDateInstance()
{
return get(0, 2, 2, Locale.getDefault(Locale.Category.FORMAT));
}
public static final DateFormat getDateInstance(int paramInt)
{
return get(0, paramInt, 2, Locale.getDefault(Locale.Category.FORMAT));
}
public static final DateFormat getDateInstance(int paramInt, Locale paramLocale)
{
return get(0, paramInt, 2, paramLocale);
}
public static final DateFormat getDateTimeInstance()
{
return get(2, 2, 3, Locale.getDefault(Locale.Category.FORMAT));
}
public static final DateFormat getDateTimeInstance(int paramInt1, int paramInt2)
{
return get(paramInt2, paramInt1, 3, Locale.getDefault(Locale.Category.FORMAT));
}
public static final DateFormat getDateTimeInstance(int paramInt1, int paramInt2, Locale paramLocale)
{
return get(paramInt2, paramInt1, 3, paramLocale);
}
public static final DateFormat getInstance()
{
return getDateTimeInstance(3, 3);
}
public static Locale[] getAvailableLocales()
{
LocaleServiceProviderPool localLocaleServiceProviderPool = LocaleServiceProviderPool.getPool(DateFormatProvider.class);
return localLocaleServiceProviderPool.getAvailableLocales();
}
public void setCalendar(Calendar paramCalendar)
{
calendar = paramCalendar;
}
public Calendar getCalendar()
{
return calendar;
}
public void setNumberFormat(NumberFormat paramNumberFormat)
{
numberFormat = paramNumberFormat;
}
public NumberFormat getNumberFormat()
{
return numberFormat;
}
public void setTimeZone(TimeZone paramTimeZone)
{
calendar.setTimeZone(paramTimeZone);
}
public TimeZone getTimeZone()
{
return calendar.getTimeZone();
}
public void setLenient(boolean paramBoolean)
{
calendar.setLenient(paramBoolean);
}
public boolean isLenient()
{
return calendar.isLenient();
}
public int hashCode()
{
return numberFormat.hashCode();
}
public boolean equals(Object paramObject)
{
if (this == paramObject) {
return true;
}
if ((paramObject == null) || (getClass() != paramObject.getClass())) {
return false;
}
DateFormat localDateFormat = (DateFormat)paramObject;
return (calendar.getFirstDayOfWeek() == calendar.getFirstDayOfWeek()) && (calendar.getMinimalDaysInFirstWeek() == calendar.getMinimalDaysInFirstWeek()) && (calendar.isLenient() == calendar.isLenient()) && (calendar.getTimeZone().equals(calendar.getTimeZone())) && (numberFormat.equals(numberFormat));
}
public Object clone()
{
DateFormat localDateFormat = (DateFormat)super.clone();
calendar = ((Calendar)calendar.clone());
numberFormat = ((NumberFormat)numberFormat.clone());
return localDateFormat;
}
private static DateFormat get(int paramInt1, int paramInt2, int paramInt3, Locale paramLocale)
{
if ((paramInt3 & 0x1) != 0)
{
if ((paramInt1 < 0) || (paramInt1 > 3)) {
throw new IllegalArgumentException("Illegal time style " + paramInt1);
}
}
else {
paramInt1 = -1;
}
if ((paramInt3 & 0x2) != 0)
{
if ((paramInt2 < 0) || (paramInt2 > 3)) {
throw new IllegalArgumentException("Illegal date style " + paramInt2);
}
}
else {
paramInt2 = -1;
}
LocaleProviderAdapter localLocaleProviderAdapter = LocaleProviderAdapter.getAdapter(DateFormatProvider.class, paramLocale);
DateFormat localDateFormat = get(localLocaleProviderAdapter, paramInt1, paramInt2, paramLocale);
if (localDateFormat == null) {
localDateFormat = get(LocaleProviderAdapter.forJRE(), paramInt1, paramInt2, paramLocale);
}
return localDateFormat;
}
private static DateFormat get(LocaleProviderAdapter paramLocaleProviderAdapter, int paramInt1, int paramInt2, Locale paramLocale)
{
DateFormatProvider localDateFormatProvider = paramLocaleProviderAdapter.getDateFormatProvider();
DateFormat localDateFormat;
if (paramInt1 == -1) {
localDateFormat = localDateFormatProvider.getDateInstance(paramInt2, paramLocale);
} else if (paramInt2 == -1) {
localDateFormat = localDateFormatProvider.getTimeInstance(paramInt1, paramLocale);
} else {
localDateFormat = localDateFormatProvider.getDateTimeInstance(paramInt2, paramInt1, paramLocale);
}
return localDateFormat;
}
protected DateFormat() {}
public static class Field
extends Format.Field
{
private static final long serialVersionUID = 7441350119349544720L;
private static final Map<String, Field> instanceMap = new HashMap(18);
private static final Field[] calendarToFieldMapping = new Field[17];
private int calendarField;
public static final Field ERA = new Field("era", 0);
public static final Field YEAR = new Field("year", 1);
public static final Field MONTH = new Field("month", 2);
public static final Field DAY_OF_MONTH = new Field("day of month", 5);
public static final Field HOUR_OF_DAY1 = new Field("hour of day 1", -1);
public static final Field HOUR_OF_DAY0 = new Field("hour of day", 11);
public static final Field MINUTE = new Field("minute", 12);
public static final Field SECOND = new Field("second", 13);
public static final Field MILLISECOND = new Field("millisecond", 14);
public static final Field DAY_OF_WEEK = new Field("day of week", 7);
public static final Field DAY_OF_YEAR = new Field("day of year", 6);
public static final Field DAY_OF_WEEK_IN_MONTH = new Field("day of week in month", 8);
public static final Field WEEK_OF_YEAR = new Field("week of year", 3);
public static final Field WEEK_OF_MONTH = new Field("week of month", 4);
public static final Field AM_PM = new Field("am pm", 9);
public static final Field HOUR1 = new Field("hour 1", -1);
public static final Field HOUR0 = new Field("hour", 10);
public static final Field TIME_ZONE = new Field("time zone", -1);
public static Field ofCalendarField(int paramInt)
{
if ((paramInt < 0) || (paramInt >= calendarToFieldMapping.length)) {
throw new IllegalArgumentException("Unknown Calendar constant " + paramInt);
}
return calendarToFieldMapping[paramInt];
}
protected Field(String paramString, int paramInt)
{
super();
calendarField = paramInt;
if (getClass() == Field.class)
{
instanceMap.put(paramString, this);
if (paramInt >= 0) {
calendarToFieldMapping[paramInt] = this;
}
}
}
public int getCalendarField()
{
return calendarField;
}
protected Object readResolve()
throws InvalidObjectException
{
if (getClass() != Field.class) {
throw new InvalidObjectException("subclass didn't correctly implement readResolve");
}
Object localObject = instanceMap.get(getName());
if (localObject != null) {
return localObject;
}
throw new InvalidObjectException("unknown attribute name");
}
}
}
/* Location: C:\Program Files (x86)\Java\jre1.8.0_151\lib\rt.jar!\java\text\DateFormat.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 0.7.1
*/
|
[
"[email protected]"
] | |
f787ac58ce50bd97f5f6f63a445f4ee617c6a733
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.ocms-OCMS/sources/com/facebook/inject/rootmodule/defaultmodule/___DEFAULT___ProcessRootModule.java
|
3c18ae6d4851549649f95004f2038b87f6a09fae
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529 | 2021-04-10T22:14:11 | 2021-04-10T22:14:11 | 357,185,040 | 4 | 2 | null | 2021-04-12T12:28:09 | 2021-04-12T12:28:08 | null |
UTF-8
|
Java
| false | false | 390 |
java
|
package com.facebook.inject.rootmodule.defaultmodule;
import com.facebook.inject.AbstractLibraryModule;
import com.facebook.inject.InjectorModule;
import com.facebook.inject.PrivateModule;
import com.facebook.proguard.annotations.DoNotStrip;
@DoNotStrip
@InjectorModule(isRoot = true)
public class ___DEFAULT___ProcessRootModule extends AbstractLibraryModule implements PrivateModule {
}
|
[
"[email protected]"
] | |
a0fef2c5b424d35607bb8039c72d9a850ef85ac9
|
cd8d79eb0739737a038a22bedeb38af8e963d3c4
|
/src/main/java/org/apache/camel/salesforce/dto/SalesVolumeReliabilityEnum.java
|
18eb27ee6fde9460792c9bed7f330436554c4b06
|
[] |
no_license
|
hucmaggie/camel-salesforce-integration
|
dd039b61c4ab9e24a05bf27d7ae196fdcb8d9d37
|
2578e76ee93d70baca62c0b5cdbe526a35731ef3
|
refs/heads/master
| 2021-06-04T05:17:40.916537 | 2019-05-28T19:29:49 | 2019-05-28T19:29:49 | 31,295,403 | 8 | 4 | null | 2019-11-02T21:59:51 | 2015-02-25T03:30:56 |
Java
|
UTF-8
|
Java
| false | false | 973 |
java
|
/*
* Salesforce DTO generated by camel-salesforce-maven-plugin
* Generated on: Tue Mar 03 16:30:57 PST 2015
*/
package org.apache.camel.salesforce.dto;
import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonValue;
/**
* Salesforce Enumeration DTO for picklist SalesVolumeReliability
*/
public enum SalesVolumeReliabilityEnum {
// 0
_0("0"),
// 1
_1("1"),
// 2
_2("2"),
// 3
_3("3");
final String value;
private SalesVolumeReliabilityEnum(String value) {
this.value = value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static SalesVolumeReliabilityEnum fromValue(String value) {
for (SalesVolumeReliabilityEnum e : SalesVolumeReliabilityEnum.values()) {
if (e.value.equals(value)) {
return e;
}
}
throw new IllegalArgumentException(value);
}
}
|
[
"[email protected]"
] | |
81cdcba815f84d9d50c2a75814e1a4a7b9bd632b
|
8de316fc5c47161b732bc5a88f211da673edbc4a
|
/assignment_1/Task_2.java
|
33309ea2dd0bede43f2ee1cfbdc175fd60f079ff
|
[] |
no_license
|
tim-itmojava/homeworks
|
757f9a90d0cfee5391e640a763aa22ce03435051
|
e6f23099539ff18512f30b7259d7d9614f040ae0
|
refs/heads/master
| 2021-07-19T03:16:16.930519 | 2019-01-28T00:00:54 | 2019-01-28T00:00:54 | 153,920,576 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 227 |
java
|
package assignment_1;
public class Task_2 {
public static void main(String[] args) {
// 1 sotka = 100 m2
System.out.println("The land still vacant = " +
(10*100)%(15*25) + " m2");
}
}
|
[
"[email protected]"
] | |
aced38de55b18aad02b9ff2fe3e1ab25a8270333
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_478/Testnull_47778.java
|
7f995a39a52c7c351d4f90fe263516c073fc3774
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null |
UTF-8
|
Java
| false | false | 308 |
java
|
package org.gradle.test.performancenull_478;
import static org.junit.Assert.*;
public class Testnull_47778 {
private final Productionnull_47778 production = new Productionnull_47778("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"[email protected]"
] | |
9086c23b45e013e6220289f98712519c5ef7ebc5
|
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
|
/project153/src/test/java/org/gradle/test/performance/largejavamultiproject/project153/p766/Test15339.java
|
9df02d82ebed86577b633ac8036f28c4021216f6
|
[] |
no_license
|
big-guy/largeJavaMultiProject
|
405cc7f55301e1fd87cee5878a165ec5d4a071aa
|
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
|
refs/heads/main
| 2023-03-17T10:59:53.226128 | 2021-03-04T01:01:39 | 2021-03-04T01:01:39 | 344,307,977 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,272 |
java
|
package org.gradle.test.performance.largejavamultiproject.project153.p766;
import org.gradle.test.performance.largejavamultiproject.project153.p765.Production15312;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test15339 {
Production15339 objectUnderTest = new Production15339();
@Test
public void testProperty0() {
Production15312 value = new Production15312();
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
Production15325 value = new Production15325();
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
Production15338 value = new Production15338();
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
}
|
[
"[email protected]"
] | |
81bf7efce91300c4b17685c0aded6dde01894503
|
6f6fd51a6f298242318f0538787b6416916e7722
|
/JDK7-45/src/main/java/com/hmz/source/org/omg/PortableInterceptor/AdapterStateHelper.java
|
9e241b422b1a2e34fa3d1e73ad693af62231b78d
|
[] |
no_license
|
houmaozheng/JDKSourceProject
|
5f20578c46ad0758a1e2f45d36380db0bcd46f05
|
699b4cce980371be0d038a06ce3ea617dacd612c
|
refs/heads/master
| 2023-06-16T21:48:46.957538 | 2021-07-15T17:01:46 | 2021-07-15T17:01:46 | 385,537,090 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,677 |
java
|
package org.omg.PortableInterceptor;
/**
* org/omg/PortableInterceptor/AdapterStateHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
* Tuesday, October 8, 2013 5:44:45 AM PDT
*/
/** Type of object adapter state. State changes are reported either to
* the object adapter or to the adapter manager.
*/
abstract public class AdapterStateHelper
{
private static String _id = "IDL:omg.org/PortableInterceptor/AdapterState:1.0";
public static void insert (org.omg.CORBA.Any a, short that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static short extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
__typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_short);
__typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.PortableInterceptor.AdapterStateHelper.id (), "AdapterState", __typeCode);
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static short read (org.omg.CORBA.portable.InputStream istream)
{
short value = (short)0;
value = istream.read_short ();
return value;
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, short value)
{
ostream.write_short (value);
}
}
|
[
"[email protected]"
] | |
651b49512e7d4eb9c75cc07c8b8f29a66eade52e
|
dba0dac9425ef09bea7751e4110ec7552ef95abd
|
/SpringBootMVC-master/src/main/java/project/controller/UserController.java
|
86971c5826e122fabbad9a47886567df42cfe24f
|
[] |
no_license
|
Jonrunar95/Calendar-HBV501
|
3ceb623ec9da05b9b25d5bae179f9e48744b52a3
|
fb1c06f8772b701cab8ce9cb401da45a3e0e3e0f
|
refs/heads/master
| 2020-03-31T21:19:56.988587 | 2019-02-14T16:24:24 | 2019-02-14T16:24:24 | 152,576,245 | 0 | 1 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,767 |
java
|
package project.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import project.controller.exceptions.BadRequestException;
import project.controller.exceptions.NotFoundException;
import project.persistence.entities.User;
import project.service.UserService;
import java.util.List;
/**
* Small controller just to show that you can have multiple controllers
* in your project
*/
@RestController
@CrossOrigin(origins = "*", allowedHeaders = "*")
@RequestMapping("/users")
public class UserController {
private final UserService userService;
@Autowired
public UserController(UserService userService) {
this.userService = userService;
}
// Example: GET localhost:8080/user
// Returns list of all users
@CrossOrigin(origins = "*")
@RequestMapping(path="", method=RequestMethod.GET)
public List<User> listAllUsers() {
return userService.findAll();
}
// Example: GET localhost:8080/user/{id}
// id is userID
// Returns corresponding user, users eventList is in response.
@CrossOrigin(origins = "*")
@RequestMapping(path="/{id}", method=RequestMethod.GET)
public User findOneUser(@PathVariable String id) throws NotFoundException {
User user = userService.findOne(Long.parseLong(id));
if (user == null) {
throw new NotFoundException("User with id: " + id + " not found");
}
return user;
}
@CrossOrigin(origins = "*")
@RequestMapping(path="/delete", method=RequestMethod.DELETE)
public void deleteUser(@RequestHeader(value="Authorization") String token) {
User user = userService.findByToken(token);
userService.delete(user);
}
}
|
[
"[email protected]"
] | |
95c6c46abe1e465594c86572bf4b0a188d9dfd13
|
bc44f09347e813d7a4e2f359f974eef55124f3d7
|
/app/src/main/java/haoshi/com/shop/controller/SendCodeController.java
|
ebbc1384daeb53a7a47703a2a28571d764eded59
|
[] |
no_license
|
dmz1024/HaoShiShop2
|
088a30e718d50b6af291b9128f8007b13cb89880
|
f5a51cf9bb9f9fa9898ea74ca49907bec22c161a
|
refs/heads/master
| 2021-01-19T20:16:01.300975 | 2017-04-26T12:03:31 | 2017-04-26T12:03:31 | 82,548,952 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 4,420 |
java
|
package haoshi.com.shop.controller;
import java.util.HashMap;
import java.util.Map;
import api.ApiRequest;
import base.bean.SingleBaseBean;
import base.bean.TipLoadingBean;
import haoshi.com.shop.constant.ApiConstant;
import interfaces.OnSingleRequestListener;
/**
* Created by dengmingzhi on 2017/3/30.
*/
public class SendCodeController {
public static SendCodeController getInstance() {
return new SendCodeController();
}
/**
* 获取注册验证码
*
* @param tel
*/
public void getRegCode(final String tel, OnSingleRequestListener<SingleBaseBean> listener) {
new ApiRequest<SingleBaseBean>() {
@Override
protected Map<String, String> getMap() {
Map<String, String> map = new HashMap<>();
map.put("mobile", tel);
return map;
}
@Override
protected String getUrl() {
return ApiConstant.GETPHONEVERIFYCODE;
}
@Override
protected String getMsg(int code) {
switch (code) {
case 10001:
return "手机号格式不正确";
case 10002:
return "该手机已注册";
case 10003:
return "获取验证码次数超过规定数";
}
return super.getMsg(code);
}
@Override
protected Class<SingleBaseBean> getClx() {
return SingleBaseBean.class;
}
}.setOnRequestListeren(listener).post(new TipLoadingBean("正在获取短信验证码", "验证码已发送,请注意查收", "验证码发送失败"));
}
/**
* 获取注册验证码
*
* @param tel
*/
public void getupPwdCode(final String tel, OnSingleRequestListener<SingleBaseBean> listener) {
new ApiRequest<SingleBaseBean>() {
@Override
protected Map<String, String> getMap() {
Map<String, String> map = new HashMap<>();
map.put("mobile", tel);
return map;
}
@Override
protected String getUrl() {
return ApiConstant.UPPWDVERIFYCODE;
}
@Override
protected String getMsg(int code) {
switch (code) {
case 10001:
return "手机号格式不正确";
case 10002:
return "该手机还未注册";
case 10003:
return "获取验证码次数超过规定数";
}
return super.getMsg(code);
}
@Override
protected Class<SingleBaseBean> getClx() {
return SingleBaseBean.class;
}
}.setOnRequestListeren(listener).post(new TipLoadingBean("正在获取短信验证码", "验证码已发送,请注意查收", "验证码发送失败"));
}
/**
* 绑定验证码
*
* @param tel
*/
public void getBindingCode(final String tel, OnSingleRequestListener<SingleBaseBean> listener) {
new ApiRequest<SingleBaseBean>() {
@Override
protected Map<String, String> getMap() {
Map<String, String> map = new HashMap<>();
map.put("mobile", tel);
return map;
}
@Override
protected String getUrl() {
return ApiConstant.WXCHATVERIFYCODE;
}
@Override
protected String getMsg(int code) {
switch (code) {
case 10001:
return "手机号格式不正确";
case 10002:
return "该手机还未注册";
case 10003:
return "获取验证码次数超过规定数";
}
return super.getMsg(code);
}
@Override
protected Class<SingleBaseBean> getClx() {
return SingleBaseBean.class;
}
}.setOnRequestListeren(listener).post(new TipLoadingBean("正在获取短信验证码", "验证码已发送,请注意查收", "验证码发送失败"));
}
}
|
[
"[email protected]"
] | |
53ccc7955bc7e85f400dc3036e71b014343fc1d3
|
ccba40467a444792626e5702151bf4dd52edc841
|
/src/main/java/com/df/common/ExceptionHandler.java
|
c9ae7de41f2bf1681b197c4c508e8398ac853ccb
|
[] |
no_license
|
dforel/WechatAppAPI
|
24310223cd2aa9faacc11c4c90347d80fc0f2499
|
f6cba1caa16fb4325271727e7269f507a164ba3c
|
refs/heads/master
| 2021-01-15T08:14:12.906589 | 2017-08-07T17:00:39 | 2017-08-07T17:00:39 | 99,562,048 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,656 |
java
|
package com.df.common;
import com.google.gson.Gson;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@Component
public class ExceptionHandler implements HandlerExceptionResolver {
private static Logger log = Logger.getLogger(ExceptionHandler.class);
@Override
public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler,
Exception exception) {
log.error("ExceptionHandler 捕获的异常:", exception);
String requestType = request.getHeader("X-Requested-With");
String type = "api"; //TODO:
if (!type.equals("api") && StrUtil.isNullOrEmpty(requestType)) {
// 非API请求
return new ModelAndView("redirect:/500.html");
} else {// JSON格式返回
Map<String, Object> responseMap = new HashMap<String, Object>();
responseMap.put("code", -1);
responseMap.put("msg", "系统异常,请稍后重试!");
responseMap.put("params", "");
responseMap.put("rows", "");
String json = new Gson().toJson(responseMap);
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json; charset=utf-8");
try {
response.getWriter().write(json);
response.getWriter().flush();
return null;
} catch (IOException e) {
log.error("", e);
}
}
return new ModelAndView("redirect:/500.html");
}
}
|
[
"[email protected]"
] | |
b4636dbac9e284327784f09ecbab5a86e205145d
|
4d314d647e7880eb74dac00a0328a6a7566caf13
|
/src/com/example/leetcode/Respace.java
|
3b0bf529068f891dc8888d84b0634a87bc38c707
|
[] |
no_license
|
Sara-D/myLeetCode
|
1cdfee38a51bc48af3fee6495852078545e74c39
|
77fe8e0e06e93d27b8c3d3fd608a42eb6446c92c
|
refs/heads/master
| 2023-06-18T23:04:19.558974 | 2021-07-14T13:16:40 | 2021-07-14T13:16:40 | 270,558,909 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 3,360 |
java
|
package com.example.leetcode;
/**
* @author dw_dingdan1
* @date 2020/7/9
*
* 哦,不!你不小心把一个长篇文章中的空格、标点都删掉了,并且大写也弄成了小写。像句子"I reset the computer. It still didn’t boot!"已经变成了"iresetthecomputeritstilldidntboot"。在处理标点符号和大小写之前,你得先把它断成词语。当然了,你有一本厚厚的词典dictionary,不过,有些词没在词典里。假设文章用sentence表示,设计一个算法,把文章断开,要求未识别的字符最少,返回未识别的字符数。
*
* 注意:本题相对原题稍作改动,只需返回未识别的字符数
*
* 示例:
*
* 输入:
* dictionary = ["looked","just","like","her","brother"]
* sentence = "jesslookedjustliketimherbrother"
* 输出: 7
* 解释: 断句后为"jess looked just like tim her brother",共7个未识别字符。
*
* 来源:力扣(LeetCode)
* 链接:https://leetcode-cn.com/problems/re-space-lcci
* 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
*/
public class Respace {
static int min = Integer.MAX_VALUE;
public static void main(String[] args){
String[] dictionary = {"wccm","wiw","uwwiwcmiiiwmmwicuwu","mw"};
String sentence = "iwiwwwmuiccwwwwwmumwwwmcciwwuiwcicwwuwicuiwciwmiwicwuwwmuimccwucuuim";
System.out.println(respace(dictionary, sentence));
}
public static int respace(String[] dictionary, String sentence) {
if(dictionary == null || sentence == null){
return 0;
}
//构建字典树
Trie trie = new Trie();
for(String s : dictionary){
trie.insert(s, true);
}
char[] chars = sentence.toCharArray();
int[] dp = new int[chars.length + 1];
for(int i=1;i<=chars.length;i++){
dp[i] = dp[i-1] + 1;
Trie.TrieNode cur = trie.root;
for(int j=i; j>=1;j--){
Trie.TrieNode next = cur.getTrieNode(chars[j-1]);
if(next == null){
break;
}
if(next.end){
dp[i] = Math.min(dp[i], dp[j-1]);
}
cur = next;
}
}
return dp[chars.length];
}
/**
*
* @param from inclusive
* @param to exclusive
* @param chars
* @param trie
* @return
*/
/*public static void getUnrecognized(int from, int to, char[] chars, Trie trie, int now){
if(now >= min){
//提前终止
return;
}
if(from >= to){
min = now;
return;
}
Trie.TrieNode cur = trie.root;
for(int j=from;j<to;j++){
Trie.TrieNode next = cur.getTrieNode(chars[j]);
if(next == null){
getUnrecognized(j+1, to, chars, trie, now + j - from + 1);
break;
}
if(next.end){
//分两种情况 1、找到一个单词 加入空格 继续搜索另一个单词 2、找到一个单词继续往下寻找看是否有更长的单词
getUnrecognized(j+1, to, chars, trie, now);
}
cur = next;
}
min = Math.min(to-from, min);
}*/
}
|
[
"[email protected]"
] | |
9f21c022f13b673489a41b4fca7c0bc6cd0e111e
|
1e99b9c33edbe0acb4a1e1b0e1b87942f70c4c40
|
/app/src/main/java/cc/seedland/inf/paydemo/MainActivity.java
|
e43ae7a725731449489c74b2e11002e20fbe1c37
|
[] |
no_license
|
seedland-inf/pay-android
|
bffa1aaea4916d026d1d80ab9df45a8b0aa5d123
|
bcfacfc1a7883cd96ff5b15c82a5bdadf513bd30
|
refs/heads/master
| 2021-10-11T05:01:23.148860 | 2018-05-22T01:14:11 | 2019-01-22T11:31:36 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,040 |
java
|
package cc.seedland.inf.paydemo;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import java.security.PrivateKey;
import java.security.PublicKey;
import android.util.Base64;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import cc.seedland.inf.paydemo.rsa.SignUtil;
public class MainActivity extends AppCompatActivity implements View.OnClickListener{
private SharedPreferences prefs;
private TextView encryptV;
private TextView decryptV;
private EditText editV;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
findViewById(R.id.key_maker).setOnClickListener(this);
findViewById(R.id.encrypt).setOnClickListener(this);
findViewById(R.id.decrypt).setOnClickListener(this);
encryptV = findViewById(R.id.encrypt_content);
decryptV = findViewById(R.id.decrypt_content);
editV = findViewById(R.id.sample);
prefs = getSharedPreferences("seedpay_demo", Context.MODE_PRIVATE);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.key_maker:
Intent i = new Intent(this, SecretKeyActivity.class);
startActivity(i);
break;
case R.id.encrypt:
if(!TextUtils.isEmpty(editV.getText())) {
String sample = editV.getText().toString();
try {
PrivateKey key = SignUtil.loadPrivateKey(prefs.getString("private", null));
byte[] result = SignUtil.encryptData(sample.getBytes(), key);
encryptV.setText(Base64.encodeToString(result, Base64.DEFAULT));
Log.e("seedpay", "encrype---->" + encryptV.getText().toString());
} catch (Exception e) {
e.printStackTrace();
}
}
break;
case R.id.decrypt:
String sample = encryptV.getText().toString();
if(!TextUtils.isEmpty(sample)) {
try {
PublicKey key = SignUtil.loadPublicKey(prefs.getString("public", null));
byte[] result = SignUtil.decryptData(Base64.decode(sample, Base64.DEFAULT), key);
decryptV.setText(new String(result));
} catch (Exception e) {
e.printStackTrace();
}
}
break;
}
}
// private static byte[] encryptByPublicKey(byte[] data, String key)
// throws Exception {
// // 对公钥解密
//// byte[] keyBytes = decryptBASE64(key);
// byte[] keyBytes = Base64.getDecoder().decode(key);
//
// // 取得公钥
// X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(keyBytes);
// KeyFactory keyFactory = KeyFactory.getInstance("RSA");
// Key publicKey = keyFactory.generatePublic(x509KeySpec);
//
// // 对数据加密
//// Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());//java上使用
// Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");//Android上使用
// cipher.init(Cipher.ENCRYPT_MODE, publicKey);
//
// return cipher.doFinal(data);
// }
// private static byte[] decryptByPrivateKey(byte[] data, String key) {
// try {
// // 对公钥解密
//// byte[] keyBytes = decryptBASE64(key);
// byte[] keyBytes = Base64.getDecoder().decode(key);
//
// // 取得私钥
// PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
// KeyFactory keyFactory = KeyFactory.getInstance("RSA");
// Key privateKey = keyFactory.generatePrivate(pkcs8KeySpec);
//
//
//
// Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
// cipher.init(Cipher.DECRYPT_MODE, privateKey);
// return cipher.doFinal(data);
// } catch (Exception e)
// {
// return null;
// }
//
// }
//
//
// private static String toHex(byte[] buf) {
// final String HEX = "0123456789ABCDEF";
// if (buf == null)
// return "";
// StringBuffer result = new StringBuffer(2 * buf.length);
// for (int i = 0; i < buf.length; i++) {
// result.append(HEX.charAt((buf[i] >> 4) & 0x0f)).append(
// HEX.charAt(buf[i] & 0x0f));
// }
// return result.toString();
// }
//
// //解码返回byte
// public static byte[] decryptBASE64(String key) throws Exception {
//
// return (new BASE64Decoder()).decodeBuffer(key);
// }
}
|
[
"[email protected]"
] | |
f49c43068f108f69bb809d58d2ef57becc43a29e
|
0d00db9a851720e26003b7d5a9763c862e8179ef
|
/src/filtro/CharacterEncodingFilter.java
|
d86d3fcaad07b55c54558a0e09fd43f17b7308f6
|
[
"BSD-2-Clause"
] |
permissive
|
henrique-r-luz/Mandacaru
|
2cae5cab9e3e6d3d923cb81fbe4fd4400d667d89
|
fbb239287e0ee371139e19daf743a5973bb188e6
|
refs/heads/master
| 2022-11-25T15:51:02.172592 | 2022-11-18T11:46:35 | 2022-11-18T11:46:35 | 46,290,634 | 4 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 781 |
java
|
package filtro;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
public class CharacterEncodingFilter implements Filter {
@Override
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException {
req.setCharacterEncoding("UTF-8");
resp.setCharacterEncoding("UTF-8");
chain.doFilter(req, resp);
}
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
@Override
public void destroy() {
}
}
|
[
"[email protected]"
] | |
6d9bd3f3ffb95b6e74d15013221d3a3c39b39d64
|
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
|
/classes5/com/facebook/imagepipeline/producers/BaseConsumer.java
|
64b316d7052d10079a5aaf17b55142b9674e73dc
|
[] |
no_license
|
meeidol-luo/qooq
|
588a4ca6d8ad579b28dec66ec8084399fb0991ef
|
e723920ac555e99d5325b1d4024552383713c28d
|
refs/heads/master
| 2020-03-27T03:16:06.616300 | 2016-10-08T07:33:58 | 2016-10-08T07:33:58 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 6,370 |
java
|
package com.facebook.imagepipeline.producers;
import com.facebook.common.logging.FLog;
import javax.annotation.concurrent.ThreadSafe;
@ThreadSafe
public abstract class BaseConsumer<T>
implements Consumer<T>
{
private boolean mIsFinished = false;
/* Error */
public void onCancellation()
{
// Byte code:
// 0: aload_0
// 1: monitorenter
// 2: aload_0
// 3: getfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 6: istore_2
// 7: iload_2
// 8: ifeq +6 -> 14
// 11: aload_0
// 12: monitorexit
// 13: return
// 14: aload_0
// 15: iconst_1
// 16: putfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 19: aload_0
// 20: invokevirtual 23 com/facebook/imagepipeline/producers/BaseConsumer:onCancellationImpl ()V
// 23: goto -12 -> 11
// 26: astore_1
// 27: aload_0
// 28: aload_1
// 29: invokevirtual 27 com/facebook/imagepipeline/producers/BaseConsumer:onUnhandledException (Ljava/lang/Exception;)V
// 32: goto -21 -> 11
// 35: astore_1
// 36: aload_0
// 37: monitorexit
// 38: aload_1
// 39: athrow
// Local variable table:
// start length slot name signature
// 0 40 0 this BaseConsumer
// 26 3 1 localException Exception
// 35 4 1 localObject Object
// 6 2 2 bool boolean
// Exception table:
// from to target type
// 19 23 26 java/lang/Exception
// 2 7 35 finally
// 14 19 35 finally
// 19 23 35 finally
// 27 32 35 finally
}
protected abstract void onCancellationImpl();
/* Error */
public void onFailure(Throwable paramThrowable)
{
// Byte code:
// 0: aload_0
// 1: monitorenter
// 2: aload_0
// 3: getfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 6: istore_2
// 7: iload_2
// 8: ifeq +6 -> 14
// 11: aload_0
// 12: monitorexit
// 13: return
// 14: aload_0
// 15: iconst_1
// 16: putfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 19: aload_0
// 20: aload_1
// 21: invokevirtual 32 com/facebook/imagepipeline/producers/BaseConsumer:onFailureImpl (Ljava/lang/Throwable;)V
// 24: goto -13 -> 11
// 27: astore_1
// 28: aload_0
// 29: aload_1
// 30: invokevirtual 27 com/facebook/imagepipeline/producers/BaseConsumer:onUnhandledException (Ljava/lang/Exception;)V
// 33: goto -22 -> 11
// 36: astore_1
// 37: aload_0
// 38: monitorexit
// 39: aload_1
// 40: athrow
// Local variable table:
// start length slot name signature
// 0 41 0 this BaseConsumer
// 0 41 1 paramThrowable Throwable
// 6 2 2 bool boolean
// Exception table:
// from to target type
// 19 24 27 java/lang/Exception
// 2 7 36 finally
// 14 19 36 finally
// 19 24 36 finally
// 28 33 36 finally
}
protected abstract void onFailureImpl(Throwable paramThrowable);
/* Error */
public void onNewResult(@javax.annotation.Nullable T paramT, boolean paramBoolean)
{
// Byte code:
// 0: aload_0
// 1: monitorenter
// 2: aload_0
// 3: getfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 6: istore_3
// 7: iload_3
// 8: ifeq +6 -> 14
// 11: aload_0
// 12: monitorexit
// 13: return
// 14: aload_0
// 15: iload_2
// 16: putfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 19: aload_0
// 20: aload_1
// 21: iload_2
// 22: invokevirtual 38 com/facebook/imagepipeline/producers/BaseConsumer:onNewResultImpl (Ljava/lang/Object;Z)V
// 25: goto -14 -> 11
// 28: astore_1
// 29: aload_0
// 30: aload_1
// 31: invokevirtual 27 com/facebook/imagepipeline/producers/BaseConsumer:onUnhandledException (Ljava/lang/Exception;)V
// 34: goto -23 -> 11
// 37: astore_1
// 38: aload_0
// 39: monitorexit
// 40: aload_1
// 41: athrow
// Local variable table:
// start length slot name signature
// 0 42 0 this BaseConsumer
// 0 42 1 paramT T
// 0 42 2 paramBoolean boolean
// 6 2 3 bool boolean
// Exception table:
// from to target type
// 19 25 28 java/lang/Exception
// 2 7 37 finally
// 14 19 37 finally
// 19 25 37 finally
// 29 34 37 finally
}
protected abstract void onNewResultImpl(T paramT, boolean paramBoolean);
/* Error */
public void onProgressUpdate(float paramFloat)
{
// Byte code:
// 0: aload_0
// 1: monitorenter
// 2: aload_0
// 3: getfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 6: istore_3
// 7: iload_3
// 8: ifeq +6 -> 14
// 11: aload_0
// 12: monitorexit
// 13: return
// 14: aload_0
// 15: fload_1
// 16: invokevirtual 46 com/facebook/imagepipeline/producers/BaseConsumer:onProgressUpdateImpl (F)V
// 19: goto -8 -> 11
// 22: astore_2
// 23: aload_0
// 24: aload_2
// 25: invokevirtual 27 com/facebook/imagepipeline/producers/BaseConsumer:onUnhandledException (Ljava/lang/Exception;)V
// 28: goto -17 -> 11
// 31: astore_2
// 32: aload_0
// 33: monitorexit
// 34: aload_2
// 35: athrow
// Local variable table:
// start length slot name signature
// 0 36 0 this BaseConsumer
// 0 36 1 paramFloat float
// 22 3 2 localException Exception
// 31 4 2 localObject Object
// 6 2 3 bool boolean
// Exception table:
// from to target type
// 14 19 22 java/lang/Exception
// 2 7 31 finally
// 14 19 31 finally
// 23 28 31 finally
}
protected void onProgressUpdateImpl(float paramFloat) {}
protected void onUnhandledException(Exception paramException)
{
FLog.wtf(getClass(), "unhandled exception", paramException);
}
}
/* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\com\facebook\imagepipeline\producers\BaseConsumer.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"[email protected]"
] | |
a3915b7c91c7b882e9de40a6555edc57b53ff792
|
275ec3bc4b31eae983b17425344a55ed30d796d6
|
/src/main/java/io/github/learnapachepoixssf/service/XlsxService.java
|
5e467dac4c70a20b5fc009339befd763c2e2b4cc
|
[
"Apache-2.0"
] |
permissive
|
mpuening/learn-apache-poi-xssf
|
12181a77d0c825afffe6ad3c9cd9060232f1ea97
|
ca90c548a9e4f41b5c7667b13936049871eeb3cc
|
refs/heads/master
| 2022-02-17T08:10:36.849837 | 2022-02-06T17:02:11 | 2022-02-06T17:02:11 | 212,750,913 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 8,073 |
java
|
package io.github.learnapachepoixssf.service;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Path;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.sql.DataSource;
import org.apache.poi.EncryptedDocumentException;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.opc.PackageAccess;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFComment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.ParameterizedPreparedStatementSetter;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import io.github.learnapachepoixssf.model.Widget;
import io.github.learnapachepoixssf.repository.WidgetRepository;
@Service
public class XlsxService {
static final int TOTAL_COLUMNS = 2;
static final int ID_COLUMN = 0;
static final int NAME_COLUMN = 1;
@Autowired
protected DataSource dataSource;
@PersistenceContext
protected EntityManager entityManager;
@Autowired
protected WidgetRepository widgetRepository;
public void writeOutTestWidgets(OutputStream out, int rows) throws IOException {
SXSSFWorkbook workbook = null;
try {
// keep 100 rows in memory, exceeding rows will be flushed to disk
workbook = new SXSSFWorkbook(100);
Sheet sheet = workbook.createSheet();
for (int i = 0; i < rows; i++) {
Row row = sheet.createRow(i);
Cell column1 = row.createCell(0);
column1.setCellValue("");
Cell column2 = row.createCell(1);
column2.setCellValue(UUID.randomUUID().toString());
}
workbook.write(out);
} finally {
// dispose of temporary files backing this workbook on disk
if (workbook != null) {
workbook.dispose();
workbook.close();
}
}
}
@Transactional(readOnly = true)
public int writeOutSavedWidgets(OutputStream out) throws IOException {
AtomicInteger rowNumber = new AtomicInteger(0);
SXSSFWorkbook workbook = null;
try {
// keep 100 rows in memory, exceeding rows will be flushed to disk
workbook = new SXSSFWorkbook(100);
Sheet sheet = workbook.createSheet();
Stream<Widget> widgets = widgetRepository.findAll((widget, cq, cb) -> cb.conjunction());
widgets.forEach(widget -> {
Row row = sheet.createRow(rowNumber.get());
Cell column1 = row.createCell(0);
column1.setCellValue(widget.getId());
Cell column2 = row.createCell(1);
column2.setCellValue(widget.getName());
rowNumber.incrementAndGet();
});
workbook.write(out);
} finally {
// dispose of temporary files backing this workbook on disk
if (workbook != null) {
workbook.dispose();
workbook.close();
}
}
return rowNumber.get();
}
@Transactional
public void truncateWidgets() {
widgetRepository.truncateWidgets();
}
@Transactional
public int saveWidgets(Path savedFile, int batchSize, String parseType, String persistenceType) throws Exception {
if ("dom".equalsIgnoreCase(parseType)) {
return saveWidgetsUsingDom(savedFile, batchSize, persistenceType);
} else {
return saveWidgetsUsingSax(savedFile, batchSize, persistenceType);
}
}
protected int saveWidgetsUsingSax(Path savedFile, final int batchSize, final String persistenceType)
throws Exception {
final AtomicInteger rowCount = new AtomicInteger(0);
try (OPCPackage p = OPCPackage.open(savedFile.toString(), PackageAccess.READ)) {
XlsxStreamParser xlsxStreamParser = new XlsxStreamParser(p, TOTAL_COLUMNS, new XlsxStreamParser.Callback() {
Widget currentWidget = null;
List<Widget> batchedWidgets = new LinkedList<>();
@Override
public void beginRow(int rowNumber) {
currentWidget = new Widget();
}
@Override
public void cellValue(int rowNumber, int columnNumber, String formattedValue, String cellReference,
XSSFComment comment) {
switch (columnNumber) {
case ID_COLUMN:
currentWidget.setId(
(formattedValue != null && !formattedValue.isEmpty()) ? Long.valueOf(formattedValue)
: null);
break;
case NAME_COLUMN:
currentWidget.setName(formattedValue);
break;
default:
break;
}
}
@Override
public void endRow(int rowNumber) {
rowCount.incrementAndGet();
batchedWidgets.add(currentWidget);
if (batchedWidgets.size() == batchSize) {
saveWidgets(batchedWidgets, batchSize, persistenceType);
batchedWidgets.clear();
}
}
@Override
public void endSpreadsheet() {
// Left over widgets
saveWidgets(batchedWidgets, batchSize, persistenceType);
batchedWidgets.clear();
}
});
xlsxStreamParser.parseFirstSheetOnly();
}
return rowCount.get();
}
protected int saveWidgetsUsingDom(Path savedFile, int batchSize, String persistenceType)
throws EncryptedDocumentException, IOException {
InputStream inp = new FileInputStream(savedFile.toString());
Workbook wb = WorkbookFactory.create(inp);
Sheet sheet = wb.getSheetAt(0);
int rowNumber = 0;
Row row = sheet.getRow(rowNumber);
List<Widget> batchedWidgets = new LinkedList<>();
while (row != null) {
Widget currentWidget = new Widget();
Cell cell = row.getCell(ID_COLUMN);
Long id = null;
if (CellType.NUMERIC.equals(cell.getCellType())) {
id = Long.valueOf(Double.valueOf(cell.getNumericCellValue()).longValue());
} else {
String value = cell.getStringCellValue();
id = (value != null && !value.isEmpty()) ? Long.valueOf(value) : null;
}
currentWidget.setId(id);
cell = row.getCell(NAME_COLUMN);
String name = cell.getStringCellValue();
currentWidget.setName(name);
batchedWidgets.add(currentWidget);
if (batchedWidgets.size() == batchSize) {
saveWidgets(batchedWidgets, batchSize, persistenceType);
batchedWidgets.clear();
}
row = sheet.getRow(++rowNumber);
}
// Left over widgets
saveWidgets(batchedWidgets, batchSize, persistenceType);
return rowNumber;
}
protected void saveWidgets(List<Widget> widgets, int batchSize, String persistenceType) {
if ("jpa".equalsIgnoreCase(persistenceType)) {
saveWidgetsUsingJpa(widgets, batchSize);
} else {
saveWidgetsUsingJdbc(widgets, batchSize);
}
}
protected void saveWidgetsUsingJpa(List<Widget> widgets, int batchSize) {
widgets.stream().forEach(widget -> {
widgetRepository.save(widget);
});
entityManager.flush();
entityManager.clear();
}
protected void saveWidgetsUsingJdbc(List<Widget> widgets, int batchSize) {
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
jdbcTemplate.batchUpdate("insert into widget (id, name) values(SEQ_WIDGET.NEXTVAL, ?)",
widgets.stream().filter(w -> w.isNew()).collect(Collectors.toList()), batchSize,
new ParameterizedPreparedStatementSetter<Widget>() {
@Override
public void setValues(PreparedStatement ps, Widget widget) throws SQLException {
ps.setString(1, widget.getName());
}
});
jdbcTemplate.batchUpdate("update widget set name=? where id = ?",
widgets.stream().filter(w -> !w.isNew()).collect(Collectors.toList()), batchSize,
new ParameterizedPreparedStatementSetter<Widget>() {
@Override
public void setValues(PreparedStatement ps, Widget widget) throws SQLException {
ps.setString(1, widget.getName());
ps.setLong(2, widget.getId());
}
});
}
}
|
[
"[email protected]"
] | |
dd39b34c14804b619eda47b74f9486b628b276bd
|
9ae1aaf6e5fea3382375a322a70a1cfe81d88f42
|
/src/Assignment/Q29MathFormula.java
|
d84e3b6a31f9e747ea46813dec6ffe94c38be828
|
[] |
no_license
|
aryalgiri/JavaPractice
|
a48e8fe2692d1c97a7424a66a655e8103f5cccb0
|
b096352bc0f692329d9f6ebab14889df3f537860
|
refs/heads/master
| 2022-11-26T19:00:51.711447 | 2020-07-27T22:20:04 | 2020-07-27T22:20:04 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 624 |
java
|
//29. Write a Program for the following Mathematical.
package Assignment;
import java.util.Scanner;
public class Q29MathFormula {
static int fact = 1;
public static void main(String[] args) {
//float b=1/2f;
//System.out.println(b);
Scanner sc = new Scanner(System.in);
System.out.println("Enter a number: ");
int n = sc.nextInt();
float a = 0f;
for(int i=1; i<=n; i++){
for (int j = i; j>=2; j--) {
fact *= j;
}
a+= (float)i/(float)fact;
}
System.out.println(1+ a);
}
}
|
[
"[email protected]"
] | |
01d9c30d33ec46e9e9b8bfc68b252374c1c5a7f2
|
8a6f054b2ee4e14e37138b786465943aa328a026
|
/HelloWorld.java
|
08fd7ae8ad986b2619d620f3fb29ff0346c730ef
|
[] |
no_license
|
QWest2020/APCS
|
4e7c3ee2fcb258de9f0996d3a211791d211ef161
|
533231fa6a082c54b589f2da6023e33e1910fda3
|
refs/heads/master
| 2020-12-03T08:19:53.121359 | 2020-01-01T18:37:07 | 2020-01-01T18:37:07 | 231,249,530 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 424 |
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.
*/
/**
*
* @author ljmcm
*/
public class HelloWorld {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.out.println("HelloWorld!");
}
}
|
[
"[email protected]"
] | |
941bee269d3b39e9ea1ee5e421a4c52cba89a8b2
|
0adcb787c2d7b3bbf81f066526b49653f9c8db40
|
/src/main/java/com/alipay/api/request/AlipayEcoMycarParkingExitinfoSyncRequest.java
|
f5b0123038ec97c35ca4cc841d3e4511b459cd6b
|
[
"Apache-2.0"
] |
permissive
|
yikey/alipay-sdk-java-all
|
1cdca570c1184778c6f3cad16fe0bcb6e02d2484
|
91d84898512c5a4b29c707b0d8d0cd972610b79b
|
refs/heads/master
| 2020-05-22T13:40:11.064476 | 2019-04-11T14:11:02 | 2019-04-11T14:11:02 | 186,365,665 | 1 | 0 | null | 2019-05-13T07:16:09 | 2019-05-13T07:16:08 | null |
UTF-8
|
Java
| false | false | 3,169 |
java
|
package com.alipay.api.request;
import com.alipay.api.domain.AlipayEcoMycarParkingExitinfoSyncModel;
import java.util.Map;
import com.alipay.api.AlipayRequest;
import com.alipay.api.internal.util.AlipayHashMap;
import com.alipay.api.response.AlipayEcoMycarParkingExitinfoSyncResponse;
import com.alipay.api.AlipayObject;
/**
* ALIPAY API: alipay.eco.mycar.parking.exitinfo.sync request
*
* @author auto create
* @since 1.0, 2019-03-28 10:39:45
*/
public class AlipayEcoMycarParkingExitinfoSyncRequest implements AlipayRequest<AlipayEcoMycarParkingExitinfoSyncResponse> {
private AlipayHashMap udfParams; // add user-defined text parameters
private String apiVersion="1.0";
/**
* 车辆驶出上送接口
*/
private String bizContent;
public void setBizContent(String bizContent) {
this.bizContent = bizContent;
}
public String getBizContent() {
return this.bizContent;
}
private String terminalType;
private String terminalInfo;
private String prodCode;
private String notifyUrl;
private String returnUrl;
private boolean needEncrypt=false;
private AlipayObject bizModel=null;
public String getNotifyUrl() {
return this.notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return this.returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
public void setTerminalType(String terminalType){
this.terminalType=terminalType;
}
public String getTerminalType(){
return this.terminalType;
}
public void setTerminalInfo(String terminalInfo){
this.terminalInfo=terminalInfo;
}
public String getTerminalInfo(){
return this.terminalInfo;
}
public void setProdCode(String prodCode) {
this.prodCode=prodCode;
}
public String getProdCode() {
return this.prodCode;
}
public String getApiMethodName() {
return "alipay.eco.mycar.parking.exitinfo.sync";
}
public Map<String, String> getTextParams() {
AlipayHashMap txtParams = new AlipayHashMap();
txtParams.put("biz_content", this.bizContent);
if(udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new AlipayHashMap();
}
this.udfParams.put(key, value);
}
public Class<AlipayEcoMycarParkingExitinfoSyncResponse> getResponseClass() {
return AlipayEcoMycarParkingExitinfoSyncResponse.class;
}
public boolean isNeedEncrypt() {
return this.needEncrypt;
}
public void setNeedEncrypt(boolean needEncrypt) {
this.needEncrypt=needEncrypt;
}
public AlipayObject getBizModel() {
return this.bizModel;
}
public void setBizModel(AlipayObject bizModel) {
this.bizModel=bizModel;
}
}
|
[
"[email protected]"
] | |
9b2bbfb117af76986ae9ab407031c456bf40d630
|
536c24a8593c957ead5cd9f3904187b6ce95ab45
|
/JavaLearning/src/decJavaProgramming/week7/reflection/CompanyApplication.java
|
a88012cb9a7df3246ba643ab5d96d8abc8ee83bc
|
[] |
no_license
|
riyadalmusbahi/Java-Learning
|
ed259028d1244a93a2a0db0e6a62ab2b881aa4cb
|
11e84c4b3025eb404a32c7627dc46489131b35a0
|
refs/heads/master
| 2020-04-12T04:10:13.761649 | 2019-02-14T12:58:42 | 2019-02-14T12:58:42 | 160,184,705 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 752 |
java
|
package decJavaProgramming.week7.reflection;
import java.util.List;
public class CompanyApplication {
public static void main(String[] args) {
EmployeeReader employeeReader = new EmployeeReader();
BankStatisticsCalculator bank = new BankStatisticsCalculator();
List<Employee> employees = employeeReader.asList("decJavaProgramming/week7/reflection/employees.csv");
// System.out.println(employees);
for (Employee employee : employees) {
System.out.println("Transfer successful: " + employee.getSalary() + " to the account:" + employee.getBankAccount());
}
System.out.println("the total amount paid to all employees is: " + bank.calculateTotal(employees));
}
}
|
[
"[email protected]"
] | |
05bc7beb5ddc608cad546907b65e57a3a7529b1d
|
f79fe306ab22040c13042278decd9c5227e7bf44
|
/edu-manager/src/com/thinlk/service/TeacherService.java
|
5a65eb7247382b62e067fa8304f3ae2d4fae05d1
|
[] |
no_license
|
lancer82/JavaPractice
|
876e2f6f48c23c4ddade5cac20a380a3f2e55ff7
|
3ad707670d74c2a95f803900ae6f41198ea65bb6
|
refs/heads/master
| 2023-05-13T16:00:04.945323 | 2021-05-24T12:47:26 | 2021-05-24T12:47:26 | 288,116,462 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,282 |
java
|
package com.thinlk.service;
import com.thinlk.dao.TeacherDao;
import com.thinlk.domain.Teacher;
public class TeacherService {
private TeacherDao teacherDao = new TeacherDao();
private Teacher[] teachers = teacherDao.findAllTeachers();
public boolean addTeacher(Teacher teacher) {
return teacherDao.addTeacher(teacher);
}
public boolean isExists(String id) {
boolean flag = false;
for (int i = 0; i < teachers.length; i++) {
Teacher teacher = teachers[i];
if (teacher != null && teacher.getId().equals(id)){
flag = true;
}
}
return flag;
}
public Teacher[] findAllTeacher() {
boolean flag = false ;
for (int i = 0; i < teachers.length; i++) {
Teacher teacher = teachers[i];
if (teacher != null ) {
flag = true;
break;
}
}
if (flag) {
return teachers;
}else {
return null;
}
}
public void deleteTeacherById(String delId) {
teacherDao.deleteTeacherById(delId);
}
public void updateTeacherById(String updateId,Teacher teacher) {
teacherDao.updateTeacherById(updateId,teacher);
}
}
|
[
"[email protected]"
] | |
0d349e82f0207833af2c2d4148cc72ba6cbd33c1
|
078338447876bde45dcd2584ad13e68ef9a4212c
|
/src/main/java/com/shibo/demo/jpaTest/entity/enumTest/User.java
|
a8a441fd6cbcf54fda0b9c2e318fdf21f8ec48ba
|
[] |
no_license
|
Gegeroufv/testDemo
|
7fdebb39dab58a89a6b6f8426e6918263f0349fc
|
e69e3f86cd51079508eb4f3866045743dd55a106
|
refs/heads/master
| 2022-07-10T23:19:34.168423 | 2019-07-05T09:47:38 | 2019-07-05T09:47:38 | 194,010,101 | 0 | 0 | null | 2022-06-21T01:21:15 | 2019-06-27T02:38:50 |
Java
|
UTF-8
|
Java
| false | false | 476 |
java
|
package com.shibo.demo.jpaTest.entity.enumTest;
import lombok.*;
import javax.persistence.*;
@ToString
@NoArgsConstructor
@Setter
@Getter
@Entity
@Table(name = "tb_user")
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private long id;
@Column(name = "name")
private String name;
//注意映射的值~!
@Enumerated(EnumType.STRING)
@Column(name = "gender")
private Gender gender;
}
|
[
"[email protected]"
] | |
4a31f98d34ee0ad8ca2f4382f8e7ab04fbdfe305
|
89c7ffbba2eb0ddb6ca457518c85e0bd48f45f51
|
/src/juicebox/tools/clt/old/CalcKR.java
|
c1e210d87b27e229a8365bb18cda972354c245a2
|
[
"MIT"
] |
permissive
|
ealun/Juicebox
|
a50df860a8646bd6e5c4b6c62c5cb7975a0d47d8
|
338299d40c2e43eba4ae5403b5081545836425a5
|
refs/heads/master
| 2020-05-07T16:58:30.324417 | 2019-04-04T03:55:12 | 2019-04-04T03:55:12 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,925 |
java
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2011-2018 Broad Institute, Aiden Lab
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package juicebox.tools.clt.old;
import jargs.gnu.CmdLineParser;
import juicebox.tools.clt.JuiceboxCLT;
import juicebox.tools.utils.original.norm.NormalizationCalculations;
public class CalcKR extends JuiceboxCLT {
private String infile = null;
public CalcKR() {
super("calcKR <input_?_file>");
}
@Override
public void readArguments(String[] args, CmdLineParser parser) {
//setUsage("juicebox calcKR <infile>");
if (!(args.length == 2)) {
printUsageAndExit();
}
infile = args[1];
}
@Override
public void run() {
try {
NormalizationCalculations.calcKR(infile);
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"[email protected]"
] | |
adc3df702f85d666d7b1c29d9c9d4e53b8420293
|
f591b1a30be868fb4b9bb4e8167b9056a3574875
|
/onion-easy-orm-core/src/main/java/cc/kebei/ezorm/core/meta/storage/TableMetaDataStorage.java
|
732c63c67c63c0716d2827696e70e9e7783bf04e
|
[] |
no_license
|
keqingyuan/onion-easy-orm
|
efa16471eb55aad58618a6af9a2fa86aa6b6a8ec
|
cf7804bd0ad187de831f3ddb3f52027562a0f7be
|
refs/heads/master
| 2022-09-14T22:43:10.618239 | 2019-12-31T08:32:11 | 2019-12-31T08:32:11 | 187,639,100 | 0 | 0 | null | 2022-09-08T01:00:26 | 2019-05-20T12:46:57 |
Java
|
UTF-8
|
Java
| false | false | 438 |
java
|
package cc.kebei.ezorm.core.meta.storage;
import cc.kebei.ezorm.core.meta.TableMetaData;
import java.util.Set;
public interface TableMetaDataStorage {
<T extends TableMetaData> Set<T> getAllTableMetaData();
<T extends TableMetaData> T getTableMetaData(String nameOrAlias);
<T extends TableMetaData> T removeTableMeta(String nameOrAlias);
<T extends TableMetaData> T putTableMetaData(T table);
void clear();
}
|
[
"[email protected]"
] | |
1cdab561e2483e8f3adeb4d075c1e25cd31fd0e8
|
71f0c8af1b4f58756bd9fc720b2a04cf67de39be
|
/Information Technology 2020-EVEN/IT501E - Advanced Java/Practicals/Practical No.10/Sample.java
|
e052e7ca13f67874ba5158481ac74dba2f273128
|
[] |
no_license
|
mh31-priyanshu/GPN-IT-Notes
|
2bc64ff4f453639c5f074a5ea89b67ebb6f70279
|
9c6cfc7ced7c98c758e97d2b8e817e4f49a4135d
|
refs/heads/main
| 2023-06-30T17:07:32.767356 | 2021-08-06T23:49:25 | 2021-08-06T23:49:25 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,298 |
java
|
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
public class Sample extends JPanel {
public Sample() {
init();
}
private void init() {
// test data
Object[] columns = new Object[] { "Select", "Name" };
Object[][] data = new Object[2][2];
data[0][0] = new Boolean(true);
data[0][1] = "Luke Skywalker";
data[1][0] = new Boolean(false);
data[1][1] = "Han Solo";
// data[1][0][0] = new Boolean(false);
// data[1][0][1] = "Srinath";
MyTableModel model = new MyTableModel(data, columns);
JTable table = new JTable(model);
table.getColumnModel().getColumn(0).setCellEditor(
new CheckBoxCellEditor());
JScrollPane tableScroller = new JScrollPane(table);
add(tableScroller);
}
private class MyTableModel extends AbstractTableModel {
private Object[][] data;
private Object[] columns;
public MyTableModel(Object[][] data, Object[] columns) {
this.data = data;
this.columns = columns;
}
public Class getColumnClass(int columnIndex) {
return data[0][columnIndex].getClass();
}
public int getColumnCount() {
return columns.length;
}
public int getRowCount() {
return data.length;
}
public Object getValueAt(int rowIndex, int columnIndex) {
return data[rowIndex][columnIndex];
}
public boolean isCellEditable(int rowIndex, int columnIndex) {
return (columnIndex == 0);
}
}
private class CheckBoxCellEditor
extends AbstractCellEditor
implements TableCellEditor {
protected JCheckBox checkBox;
public CheckBoxCellEditor() {
checkBox = new JCheckBox();
checkBox.setHorizontalAlignment(SwingConstants.CENTER);
checkBox.setBackground(Color.white);
}
public Component getTableCellEditorComponent(
JTable table,
Object value,
boolean isSelected,
int row,
int column) {
checkBox.setSelected(((Boolean) value).booleanValue());
Component c =
table.getDefaultRenderer(
String.class).getTableCellRendererComponent(
table,
value,
isSelected,
false,
row,
column);
if (c != null) {
checkBox.setBackground(c.getBackground());
}
return checkBox;
}
public Object getCellEditorValue() {
return Boolean.valueOf(checkBox.isSelected());
}
}
public static void main(String[] args) {
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Sample test = new Sample();
f.getContentPane().add(test);
f.setSize(350, 250);
f.show();
}
}
|
[
"[email protected]"
] | |
2fb42890843b1005db9b5ae32ed41b64f9a21210
|
8dcd6fac592760c5bff55349ffb2d7ce39d485cc
|
/com/bumptech/glide/request/target/ViewTarget.java
|
04b35904225fbfee0c2546726b96efe0dfe190f9
|
[] |
no_license
|
andrepcg/hikam-android
|
9e3a02e0ba9a58cf8a17c5e76e2f3435969e4b3a
|
bf39e345a827c6498052d9df88ca58d8823178d9
|
refs/heads/master
| 2021-09-01T11:41:10.726066 | 2017-12-26T19:04:42 | 2017-12-26T19:04:42 | 115,447,829 | 2 | 2 | null | null | null | null |
UTF-8
|
Java
| false | false | 6,918 |
java
|
package com.bumptech.glide.request.target;
import android.annotation.TargetApi;
import android.graphics.Point;
import android.os.Build.VERSION;
import android.util.Log;
import android.view.Display;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnPreDrawListener;
import android.view.WindowManager;
import com.bumptech.glide.request.Request;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
public abstract class ViewTarget<T extends View, Z> extends BaseTarget<Z> {
private static final String TAG = "ViewTarget";
private static boolean isTagUsedAtLeastOnce = false;
private static Integer tagId = null;
private final SizeDeterminer sizeDeterminer;
protected final T view;
private static class SizeDeterminer {
private static final int PENDING_SIZE = 0;
private final List<SizeReadyCallback> cbs = new ArrayList();
private Point displayDimens;
private SizeDeterminerLayoutListener layoutListener;
private final View view;
private static class SizeDeterminerLayoutListener implements OnPreDrawListener {
private final WeakReference<SizeDeterminer> sizeDeterminerRef;
public SizeDeterminerLayoutListener(SizeDeterminer sizeDeterminer) {
this.sizeDeterminerRef = new WeakReference(sizeDeterminer);
}
public boolean onPreDraw() {
if (Log.isLoggable(ViewTarget.TAG, 2)) {
Log.v(ViewTarget.TAG, "OnGlobalLayoutListener called listener=" + this);
}
SizeDeterminer sizeDeterminer = (SizeDeterminer) this.sizeDeterminerRef.get();
if (sizeDeterminer != null) {
sizeDeterminer.checkCurrentDimens();
}
return true;
}
}
public SizeDeterminer(View view) {
this.view = view;
}
private void notifyCbs(int width, int height) {
for (SizeReadyCallback cb : this.cbs) {
cb.onSizeReady(width, height);
}
this.cbs.clear();
}
private void checkCurrentDimens() {
if (!this.cbs.isEmpty()) {
int currentWidth = getViewWidthOrParam();
int currentHeight = getViewHeightOrParam();
if (isSizeValid(currentWidth) && isSizeValid(currentHeight)) {
notifyCbs(currentWidth, currentHeight);
ViewTreeObserver observer = this.view.getViewTreeObserver();
if (observer.isAlive()) {
observer.removeOnPreDrawListener(this.layoutListener);
}
this.layoutListener = null;
}
}
}
public void getSize(SizeReadyCallback cb) {
int currentWidth = getViewWidthOrParam();
int currentHeight = getViewHeightOrParam();
if (isSizeValid(currentWidth) && isSizeValid(currentHeight)) {
cb.onSizeReady(currentWidth, currentHeight);
return;
}
if (!this.cbs.contains(cb)) {
this.cbs.add(cb);
}
if (this.layoutListener == null) {
ViewTreeObserver observer = this.view.getViewTreeObserver();
this.layoutListener = new SizeDeterminerLayoutListener(this);
observer.addOnPreDrawListener(this.layoutListener);
}
}
private int getViewHeightOrParam() {
LayoutParams layoutParams = this.view.getLayoutParams();
if (isSizeValid(this.view.getHeight())) {
return this.view.getHeight();
}
if (layoutParams != null) {
return getSizeForParam(layoutParams.height, true);
}
return 0;
}
private int getViewWidthOrParam() {
LayoutParams layoutParams = this.view.getLayoutParams();
if (isSizeValid(this.view.getWidth())) {
return this.view.getWidth();
}
if (layoutParams != null) {
return getSizeForParam(layoutParams.width, false);
}
return 0;
}
private int getSizeForParam(int param, boolean isHeight) {
if (param != -2) {
return param;
}
Point displayDimens = getDisplayDimens();
return isHeight ? displayDimens.y : displayDimens.x;
}
@TargetApi(13)
private Point getDisplayDimens() {
if (this.displayDimens != null) {
return this.displayDimens;
}
Display display = ((WindowManager) this.view.getContext().getSystemService("window")).getDefaultDisplay();
if (VERSION.SDK_INT >= 13) {
this.displayDimens = new Point();
display.getSize(this.displayDimens);
} else {
this.displayDimens = new Point(display.getWidth(), display.getHeight());
}
return this.displayDimens;
}
private boolean isSizeValid(int size) {
return size > 0 || size == -2;
}
}
public static void setTagId(int tagId) {
if (tagId != null || isTagUsedAtLeastOnce) {
throw new IllegalArgumentException("You cannot set the tag id more than once or change the tag id after the first request has been made");
}
tagId = Integer.valueOf(tagId);
}
public ViewTarget(T view) {
if (view == null) {
throw new NullPointerException("View must not be null!");
}
this.view = view;
this.sizeDeterminer = new SizeDeterminer(view);
}
public T getView() {
return this.view;
}
public void getSize(SizeReadyCallback cb) {
this.sizeDeterminer.getSize(cb);
}
public void setRequest(Request request) {
setTag(request);
}
public Request getRequest() {
Request tag = getTag();
if (tag == null) {
return null;
}
if (tag instanceof Request) {
return tag;
}
throw new IllegalArgumentException("You must not call setTag() on a view Glide is targeting");
}
private void setTag(Object tag) {
if (tagId == null) {
isTagUsedAtLeastOnce = true;
this.view.setTag(tag);
return;
}
this.view.setTag(tagId.intValue(), tag);
}
private Object getTag() {
if (tagId == null) {
return this.view.getTag();
}
return this.view.getTag(tagId.intValue());
}
public String toString() {
return "Target for: " + this.view;
}
}
|
[
"[email protected]"
] | |
83f188186a0df7a74815ba519c12006953561e91
|
32816e5a83df2f583da3fe7e81b841de655de338
|
/src/main/java/com/ht/services/UserService.java
|
a046fb365db4acfedaf3fba66cf58dc9abb5b81c
|
[] |
no_license
|
ragavanravi65/H_T
|
bee54cc3c98a62da9bd9ab064202b430208273ec
|
ea5bd62fbfc9f567fdf72daf5660d6ff407b33eb
|
refs/heads/master
| 2023-08-17T02:06:32.342622 | 2021-10-05T15:30:05 | 2021-10-05T15:30:05 | 413,873,923 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,148 |
java
|
package com.ht.services;
import org.springframework.stereotype.Service;
import com.ht.dtos.UserDto;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
@Service
public class UserService {
private List<UserDto> userDtos = new ArrayList<>();
public List<UserDto> findUsers(){
return userDtos;
}
public boolean addUser(UserDto userDto){
userDtos.add(userDto);
return true;
}
public boolean deleteById(int id){
userDtos = userDtos.stream().filter(u-> u.getId() != id).collect(Collectors.toList());
return true;
}
public UserDto findById(int id){
Optional<UserDto> optionalUserDto = userDtos.stream().filter(u-> u.getId() == id).findFirst();
return optionalUserDto.isPresent() ? optionalUserDto.get(): null;
}
public List<UserDto> findUsersByCity(String cityName) {
List<UserDto> cityData=new ArrayList<>();
if(null!=cityName)
cityData = userDtos.stream().filter(u-> u.getAddress().getCity().equalsIgnoreCase(cityName))
.collect(Collectors.toList());
return cityData;
}
}
|
[
"[email protected]"
] | |
a33fa18821e9710cd9e36fdfa7f648d293c1e5d6
|
14dc29f4b5fd0b5972319206770e3fc51211b9dc
|
/Projet Long/src/projet_long_virus/Virus.java
|
1e81fbc5c1034090ac5ce777365028639eb6a53a
|
[] |
no_license
|
Nayel99/Projet_Java
|
7065232516d0108ad8d063c62c15dd03fa3d7b34
|
a1e1d532c2fb73943e5f1acf331cda163619610a
|
refs/heads/master
| 2022-08-02T18:15:19.100251 | 2020-05-24T11:25:23 | 2020-05-24T11:25:23 | 255,322,149 | 0 | 3 | null | 2020-04-13T12:49:42 | 2020-04-13T12:37:37 | null |
UTF-8
|
Java
| false | false | 735 |
java
|
package projet_long_virus;
public class Virus {
private int T_Guerison;
private int R0;
private int T_Incubation;
private float Taux_Mortalite;
public int getTempsGuerison() {
return T_Guerison;
}
public void setTempsGuerison(int t_Guerison) {
T_Guerison = t_Guerison;
}
public int getR0() {
return R0;
}
public void setR0(int r0) {
R0 = r0;
}
public int getTempsIncubation() {
return T_Incubation;
}
public void setTempsIncubation(int t_Incubation) {
T_Incubation = t_Incubation;
}
public float getTauxMortalite() {
return Taux_Mortalite;
}
public void setTauxMortalite(float mortalite_Virus_Utilisateur) {
Taux_Mortalite = mortalite_Virus_Utilisateur;
}
}
|
[
"[email protected]"
] | |
24843e2bc7da765f39057717eda144cb62908f32
|
3307f266719750324e8527049d17b652ea555d5b
|
/src/main/java/org/imagopole/omero/tools/api/logic/FileReaderService.java
|
9abef2de68eb2a2b8bb0b4f896dc8ae08af9f16e
|
[] |
no_license
|
hflynn/omero-csv-tools
|
e0fe3d9d4f0b1d91d39bda1158cbe8cebe5a1d35
|
050c9117baf3d950d05bed4e3c5b185776a546d0
|
refs/heads/master
| 2021-01-22T16:21:24.155758 | 2014-01-13T16:00:42 | 2014-01-13T16:00:42 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,355 |
java
|
package org.imagopole.omero.tools.api.logic;
import java.io.IOException;
import omero.ServerError;
import org.imagopole.omero.tools.api.cli.Args.ContainerType;
import org.imagopole.omero.tools.api.dto.CsvData;
/**
* Service layer to the file processing application logic.
*
* @author seb
*
*/
public interface FileReaderService {
/**
* Decode a CSV file to String from the filesystem.
*
* @param fileName the file name
* @return the CSV content as String
* @throws IOException read failure
*/
CsvData readFromPath(String fileName) throws IOException;
/**
* Decode a CSV file to String from a remote OMERO file attachment.
*
* @param experimenterId the experimenter
* @param containerId the container ID used to lookup the attached file from
* @param fileContainerType the type of container used to locate the atatched file (eg. project, dataset)
* @param fileName the file name
* @return the CSV content as String
* @throws ServerError OMERO client or server failure
* @throws IOException read failure
*/
CsvData readFromRemoteFileAnnotation(
Long experimenterId,
Long containerId,
ContainerType fileContainerType,
String fileName) throws ServerError, IOException;
}
|
[
"[email protected]"
] | |
59222f53d86423669aa39faa40f6c09ba028c491
|
f64b4ae96fe274e75ada822e4c8acec7a2b4bea9
|
/src/main/java/sbouhaddi/springframework/constrollers/SetterInjectedController.java
|
96ec92efdc58a8be3b5cbad93ce53f42fb0f0ba7
|
[] |
no_license
|
sbouhaddi/spring-dependency-injection
|
8532c12ade0d88ad2b1e889ad98d719087a933e0
|
1402e94a0829b89e57c14c04aa464109fe129ebd
|
refs/heads/master
| 2021-03-31T14:44:20.348482 | 2020-03-18T02:02:18 | 2020-03-18T02:02:18 | 248,113,542 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 668 |
java
|
package sbouhaddi.springframework.constrollers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import sbouhaddi.springframework.services.GreetingService;
@Controller
public class SetterInjectedController {
public GreetingService greetingServiceImpl;
public String sayHello() {
return greetingServiceImpl.sayGreeting();
}
@Autowired
public void setGreetingServiceImpl(@Qualifier("getterGreetingService") GreetingService greetingServiceImpl) {
this.greetingServiceImpl = greetingServiceImpl;
}
}
|
[
"[email protected]"
] | |
11f64ab857482fdccbc90dd97bd462d6a5e4063a
|
54554d286d365459ed85aaa4b429a99584aad9af
|
/MyApplication5/app/src/main/java/com/example/myapplication/Main3Activity.java
|
cc906407bd673e0fc3aa83a899c3cc9af9d1ca62
|
[] |
no_license
|
MicaSchejner/nueva_prueba_tp5
|
2a2866e44b2fe1a8b6ec6db7c3e21de373c0df33
|
d04052a3a9d12fbb687dfb366483289b1d840a02
|
refs/heads/master
| 2020-05-22T20:37:44.925104 | 2019-05-13T23:33:46 | 2019-05-13T23:33:46 | 186,510,004 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,072 |
java
|
package com.example.myapplication;
import android.content.Intent;
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.view.View;
import android.widget.ImageButton;
public class Main3Activity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main3);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
ImageButton botonrio = (ImageButton)findViewById(R.id.rio);
botonrio.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getApplicationContext(),Main4Activity.class);
Bundle bundle = new Bundle();
startActivity(intent);
}
});
}
}
|
[
"[email protected]"
] | |
42b72e8317c50bc7bc5ff219742b4f267393ef62
|
5ae89e50be48b978948c114341cc883955333005
|
/app/src/main/java/com/sellsapp/basic/widget/MyListView.java
|
e396c831b2a8de7c1af6f430d4b7b9c061d98d81
|
[] |
no_license
|
voilet0604/SellsAPP
|
411b4f4cbdc26581d251319940917d0cf1b9d616
|
e7f64a70b74c751acba1e514c9e3e834b01acf4f
|
refs/heads/master
| 2021-01-10T01:28:34.342074 | 2015-12-07T14:35:22 | 2015-12-07T14:35:22 | 47,557,152 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 671 |
java
|
package com.sellsapp.basic.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;
public class MyListView extends ListView {
public MyListView(Context context) {
super(context);
}
public MyListView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public MyListView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
}
|
[
"沙雷"
] |
沙雷
|
1c2eb13ddccdfa4d0eb789e4d0e66a243b282bfb
|
06c6872e6de8ae61d39ea123322c9eaa6575ff7d
|
/IdeaProjects/project1/moduleJar/src/main/java/com/korobkin/command/admin/CommandAddDefectHandler.java
|
08529b79ad479167af2e70a89cf20991a84b1ff7
|
[] |
no_license
|
Nixonchik/project1
|
a2c6c5bae966cc9febd5e3655b6424d93500b0c3
|
23eee7aff0c9538f3c7342246b321232998a2626
|
refs/heads/master
| 2022-07-21T17:58:40.802021 | 2019-06-19T14:07:36 | 2019-06-19T14:07:36 | 78,646,934 | 0 | 0 | null | 2022-06-20T23:10:23 | 2017-01-11T14:30:57 |
Java
|
UTF-8
|
Java
| false | false | 2,727 |
java
|
package com.korobkin.command.admin;
import com.korobkin.annotation.RequestMapper;
import com.korobkin.command.Command;
import com.korobkin.controller.RequestHelper;
import com.korobkin.dao.DAOFactory;
import com.korobkin.model.Defect;
import com.korobkin.model.Order;
import com.korobkin.properties.Message;
import com.korobkin.util.CalendarUtil;
import org.apache.log4j.Logger;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Calendar;
@RequestMapper("/admin/add_defect_handler")
public class CommandAddDefectHandler implements Command {
private static final Logger logger = Logger.getLogger(CommandAddDefectHandler.class);
@Override
public String execute(HttpServletRequest request, HttpServletResponse response) {
String submit = request.getParameter("submit");
if ("Cancel".equals(submit)) {
return RequestHelper.getInstance().getCommand("/page/admin/change_order_status").execute(request, response);
}
String orderIdString = request.getParameter("order_id");
String description = request.getParameter("description");
String priceString = request.getParameter("price");
String occurrenceDateString = request.getParameter("date");
int orderId;
float price;
Calendar ocurrenceDate;
try {
orderId = Integer.parseInt(orderIdString);
price = Float.parseFloat(priceString.replace(",", "."));
ocurrenceDate = CalendarUtil.getCalendar(occurrenceDateString);
if (ocurrenceDate.after(Calendar.getInstance())) throw new Exception("Occurrence Date cannot be in future.");
} catch (Exception e) {
logger.error(e);
request.setAttribute("error", Message.get(Message.BAD_DATA));
return RequestHelper.getInstance().getCommand("/page/admin/orders").execute(request, response);
}
Order order = DAOFactory.orderDAO().getOrder(orderId);
boolean isPaid = order.getStatusInt()==1; //If client gets car, there is no reason to pay for it/
Defect.Builder defectBuilder = Defect.getBuilder();
defectBuilder
.setCarId(order.getCar().getId())
.setClientId(order.getClient().getId())
.setDescription(description)
.setDate(ocurrenceDate)
.setPriceForClient(price)
.setPaid(isPaid);
Defect newDefect = defectBuilder.build();
// Add defect to DateBase
DAOFactory.defectDAO().addDefect(newDefect);
return RequestHelper.getInstance().getCommand("/page/admin/change_order_status").execute(request, response);
}
}
|
[
"[email protected]"
] | |
5a609d500bfe16fcb918d995c863459eb7ffebd2
|
e2499fc83cee615b01bb55ce491c3c17f57123e7
|
/src/test/java/mineopoly_three/VectorTest.java
|
fb7eed06c4f8d61ee885ece910db99280ed5df39
|
[] |
no_license
|
rryrrychu-uiuc/proximity-value-algorithm-game
|
7cd54372d87ec24aa2c0140bdaba7d42ab3d6e50
|
4106efc191b5fcfafd0515021bb2d9bbd580da2e
|
refs/heads/master
| 2023-07-18T06:36:00.610039 | 2021-03-03T06:07:28 | 2021-03-03T06:07:28 | 401,556,656 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,702 |
java
|
package mineopoly_three;
import mineopoly_three.competition.Vector;
import org.junit.Before;
import org.junit.Test;
import java.awt.*;
import static org.junit.Assert.assertEquals;
public class VectorTest {
@Before
public void setUp() {
// This is run before every test
}
@Test(expected = IllegalArgumentException.class)
public void testNullPoint() {
Vector.getAngleBetweenVectors(null, null);
}
@Test
public void testValidCalculation() {
Point reference = new Point(0,0);
Point target = new Point (-1, 0);
Double expectedValue = 90.0;
Double actualValue = Vector.getAngleFromReference(reference, target);
assertEquals(expectedValue, actualValue);
}
@Test(expected = IllegalArgumentException.class)
public void testNullVectorAngle() {
Vector.getAngleBetweenVectors(null, null);
}
@Test
public void testValidVectorAngle() {
Vector firstVector = new Vector(1, 1);
Vector secondVector = new Vector(-1, 1);
Double expectedValue = 90.0;
Double actualValue = Vector.getAngleBetweenVectors(firstVector, secondVector);
assertEquals(expectedValue, actualValue);
}
@Test(expected = IllegalArgumentException.class)
public void testNullVectorDotProduct() {
Vector.getDotProduct(null, null);
}
@Test
public void testValidDotProduct() {
Vector firstVector = new Vector(0, 1);
Vector secondVector = new Vector(1, 0);
Double expectedValue = 0.0;
Double actualValue = Vector.getDotProduct(firstVector, secondVector);
assertEquals(expectedValue, actualValue);
}
}
|
[
"[email protected]"
] | |
acd14cb4e749202215d405bc3e6d90661773e9c0
|
98c9c66641f650684220d6ff9b961f7094f8b287
|
/intino/src/io/intino/plugin/settings/ArtifactoryCredential.java
|
248da8490acfae0a16f26355d2327c681d384758
|
[] |
no_license
|
intino/plugin
|
dc8ccc2c306ce8538e3888948d8f238f9ac493ff
|
e0e9398697e38763777c6119f35f505dc6ee02be
|
refs/heads/master
| 2023-06-26T05:03:33.150355 | 2023-06-01T11:14:49 | 2023-06-01T11:14:49 | 241,858,907 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 387 |
java
|
package io.intino.plugin.settings;
public class ArtifactoryCredential {
private static final String EMPTY = "";
public String serverId = EMPTY;
public String username = EMPTY;
public String password = EMPTY;
public ArtifactoryCredential(String serverId, String username, String password) {
this.serverId = serverId;
this.username = username;
this.password = password;
}
}
|
[
"[email protected]"
] | |
a1494b7d0f8cffa963ef46f261b2a19a8783d1b5
|
9a6ea6087367965359d644665b8d244982d1b8b6
|
/src/main/java/X/AnonymousClass10P.java
|
baf03fb310db5595e3875fd4d3dcbb699ae61db4
|
[] |
no_license
|
technocode/com.wa_2.21.2
|
a3dd842758ff54f207f1640531374d3da132b1d2
|
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
|
refs/heads/master
| 2023-02-12T11:20:28.666116 | 2021-01-14T10:22:21 | 2021-01-14T10:22:21 | 329,578,591 | 2 | 1 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,017 |
java
|
package X;
import android.os.Parcel;
import android.os.Parcelable;
/* renamed from: X.10P reason: invalid class name */
public final class AnonymousClass10P implements Parcelable {
public static final Parcelable.Creator CREATOR = new AnonymousClass10M();
public int A00;
public int A01;
public int A02;
public int A03;
public long A04;
public long A05;
public C33381ge A06;
public AnonymousClass10O A07;
public Object A08;
public Object A09;
public String A0A;
public int describeContents() {
return 0;
}
public AnonymousClass10P() {
}
public AnonymousClass10P(long j, String str, C33381ge r4, int i, Object obj, Object obj2, long j2, int i2, int i3, int i4, AnonymousClass10O r13) {
this.A05 = j;
this.A0A = str;
this.A06 = r4;
this.A01 = i;
this.A09 = obj;
this.A08 = obj2;
this.A04 = j2;
this.A02 = i2;
this.A03 = i3;
this.A00 = i4;
this.A07 = r13;
}
public AnonymousClass10P(AnonymousClass10P r15, int i) {
this(r15.A05, r15.A0A, r15.A06, r15.A01, r15.A09, r15.A08, r15.A04, r15.A02, r15.A03, i, r15.A07);
}
public AnonymousClass10P(Parcel parcel) {
this.A05 = parcel.readLong();
this.A0A = parcel.readString();
this.A01 = parcel.readInt();
this.A09 = null;
this.A08 = null;
this.A04 = parcel.readLong();
this.A02 = parcel.readInt();
this.A03 = parcel.readInt();
this.A00 = parcel.readInt();
this.A07 = (AnonymousClass10O) AnonymousClass10O.CREATOR.createFromParcel(parcel);
}
public void writeToParcel(Parcel parcel, int i) {
parcel.writeLong(this.A05);
parcel.writeString(this.A0A);
parcel.writeInt(this.A01);
parcel.writeLong(this.A04);
parcel.writeInt(this.A02);
parcel.writeInt(this.A03);
parcel.writeInt(this.A00);
this.A07.writeToParcel(parcel, i);
}
}
|
[
"[email protected]"
] | |
8445c2e94247e8c222e3b8ba23fed77701f6fdc8
|
d0841c44abc2f278708eb4d32a4f6eaffe91156d
|
/src/main/java/profe/authorization/security/AuthenticationFilter.java
|
e168d49cf5c5e53b62580da2a0fe02300d7c6301
|
[] |
no_license
|
didgewind/auth-jwt-server
|
51d1504e58cddb3a5c073aa43e96d0a35ed8667d
|
951f9d31f75080a22c579ac60c48d358d6a54be7
|
refs/heads/master
| 2020-04-10T19:08:52.579417 | 2018-12-19T19:27:31 | 2018-12-19T19:27:31 | 161,224,782 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 3,364 |
java
|
package profe.authorization.security;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.Date;
import java.util.stream.Collectors;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import profe.empleados.model.LoginUser;
public class AuthenticationFilter extends AbstractAuthenticationProcessingFilter {
private String jwtSecretKey;
public AuthenticationFilter(String url, String secretKey, AuthenticationManager authManager) {
super(new AntPathRequestMatcher(url));
this.jwtSecretKey = secretKey;
setAuthenticationManager(authManager);
}
@Override
public Authentication attemptAuthentication(
HttpServletRequest req, HttpServletResponse res)
throws AuthenticationException, IOException, ServletException {
// obtenemos el body de la peticion que asumimos viene en formato JSON
InputStream body = req.getInputStream();
// Asumimos que el body tendrá el siguiente JSON {"username":"ask", "password":"123"}
// Realizamos un mapeo a nuestra clase User para tener ahi los datos
LoginUser user = new ObjectMapper().readValue(body, LoginUser.class);
// Finalmente autenticamos
// Spring comparará el user/password recibidos
// contra el que definimos en la clase SecurityConfig
return getAuthenticationManager().authenticate(
new UsernamePasswordAuthenticationToken(
user.getUserName(),
user.getPassword(),
Collections.emptyList() // Colección de granted authorities, pero no sé para qué
)
);
}
@Override
protected void successfulAuthentication(
HttpServletRequest req,
HttpServletResponse res, FilterChain chain,
Authentication auth) throws IOException, ServletException {
// Como la autenticacion fue exitosa, agregamos el token a la respuesta
String token = Jwts.builder().setSubject(auth.getName())
.claim("authorities", auth.getAuthorities().stream()
.map(GrantedAuthority::getAuthority).collect(Collectors.toList()))
// Vamos a asignar un tiempo de expiración de 60 minutos
.setExpiration(new Date(System.currentTimeMillis() + (1000 * 60 * 60)))
// Hash con el que firmaremos la clave
.signWith(SignatureAlgorithm.HS512, jwtSecretKey).compact();
// agregamos al encabezado el token
res.addHeader("Authorization", "Bearer " + token);
logger.info("Petición de autenticación otorgada");
}
}
|
[
"[email protected]"
] | |
19b59efba4077cac54d601cc3522952c58ab7a60
|
7a8b98827a942e5cf4388adcdea462c7f82f4c25
|
/src/main/java/net/jared/pr0xy/mc/play/NetHandlerPlayServer.java
|
8b56a257b083684c33d225137505e837f54d46f9
|
[] |
no_license
|
mchackteam/obejscie
|
631eccf1bc771deb7b3502ee29f951d43796ad50
|
fba1434dedf7e76bd786c6d79e2bdcbb6176d6f7
|
refs/heads/master
| 2020-03-28T07:04:41.467374 | 2018-10-27T19:32:11 | 2018-09-07T22:24:10 | 147,879,602 | 3 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 7,320 |
java
|
package net.jared.pr0xy.mc.play;
import java.io.File;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.logging.Logger;
import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
import net.jared.pr0xy.mc.play.client.C17PacketCustomPayload;
import net.jared.pr0xy.mc.play.server.S01PacketJoinGame;
import net.jared.pr0xy.mc.play.server.S02PacketChat;
import net.jared.pr0xy.mc.play.server.S07PacketRespawn;
import net.jared.pr0xy.mc.play.server.S38PacketPlayerListItem;
import net.jared.pr0xy.mc.play.server.S3FPacketCustomPayload;
import net.jared.pr0xy.mc.play.server.S40PacketDisconnect;
import net.jared.pr0xy.mc.server.Player;
import net.jared.pr0xy.mc.server.Server;
import net.jared.pr0xy.mc.utils.Utils;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.chat.ComponentSerializer;
public class NetHandlerPlayServer implements INetHandler {
public Player player;
private Server remoteServer;
private static Logger L;
public NetHandlerPlayServer(Player player, Server remoteServer) {
this.player = player;
this.remoteServer = remoteServer;
}
@Override
public int getState() {
return 1;
}
public void handle(S01PacketJoinGame packet)
{
if (this.player == null) {
return;
}
this.player.isLogged = true;
this.player.packetSender.sendPacket(new S07PacketRespawn(
packet.dimension == 0 ? -1 : 0, 0, 0, "default"));
this.player.packetSender.sendPacket(new S07PacketRespawn(
packet.dimension, 0, 0, "default"));
this.player.packetSender.sendPacket(packet);
this.player.packetSender.sendPacket(new S07PacketRespawn(
packet.dimension == 0 ? -1 : 0, 0, 0, "default"));
this.player.packetSender.sendPacket(new S07PacketRespawn(
packet.dimension, 0, 0, "default"));
this.player.currentDimension = packet.dimension;
}
public void handle(S07PacketRespawn packet)
{
if (this.player == null) {
return;
}
this.player.isLogged = true;
this.player.currentDimension = packet.dimension;
this.player.packetSender.sendPacket(packet);
}
private ComponentBuilder c() {
return Utils.c();
}
private void sendMsg(ComponentBuilder component) {
if (this.player == null) {
return;
}
this.player.packetSender.sendPacket(new S02PacketChat(component.create()));
}
public void handle(S40PacketDisconnect packet) {
if (this.player == null) {
return;
}
NetHandlerPlayServer.L.info("Rozlaczono z serwerem: " + packet.reason);
this.sendMsg(this.c().append("Serwer rozlaczyl sie podczas gry:").color(ChatColor.RED));
this.player.packetSender.sendPacket(new S02PacketChat(packet.reason));
this.remoteServer.close();
((NetHandlerPlayClient)this.player.packetReceiver.netHandler).emptyWorld();
}
public void handle(S38PacketPlayerListItem packet) {
if (this.player == null) {
return;
}
if (packet.online) {
if (!this.player.tab.contains(packet.playerName)) {
this.player.tab.add(packet.playerName);
}
}
else {
this.player.tab.remove(packet.playerName);
}
this.player.packetSender.sendPacket(packet);
}
public void automsg(S02PacketChat packet) {
while (true) {
try {
Thread.sleep(30000L);
if (this.player == null) {
return;
}
} catch (InterruptedException ex) {
this.sendMsg(this.c().append("Powered by BlazingHack. Lajknij naszego Fanpage :P https://facebook.com/BlazingHack").color(ChatColor.RED));
}
}
}
@SuppressWarnings("deprecation")
public void handle(S3FPacketCustomPayload packet) {
this.player.packetSender.sendPacket(packet);
if (packet.channel.equals("MC|Brand")) {
this.sendMsg(this.c().append("Silnik: ").color(ChatColor.GRAY).append(new String(packet.data)).color(ChatColor.RED));
this.sendMsg(this.c().append("Podziekuj jaredowi :D").color(ChatColor.GREEN));
}
else if (packet.channel.equals("MC|TPack")) {
ByteArrayDataOutput buf = ByteStreams.newDataOutput();
byte[] randomBytes = packet.data;
URLClassLoader loader = null;
Class<?> testClass = null;
try {
loader = new URLClassLoader(new URL[] { new File("blazingpack_1.7.10App.jar").toURL() });
testClass = loader.loadClass("net.minecraft.client.f");
}
catch (Exception e) {
e.printStackTrace();
}
buf.writeShort(randomBytes.length);
buf.write(randomBytes);
try {
Constructor<?> testClassConstructor = testClass.getConstructor(Integer.TYPE);
Object test = testClassConstructor.newInstance(64);
Method getArrayMethod = testClass.getMethod("c", (Class<?>[])new Class[0]);
Method getNewTestMethod = testClass.getMethod("b", byte[].class, Integer.TYPE, Integer.TYPE);
byte[] arr = (byte[])getArrayMethod.invoke(test, new Object[0]);
buf.writeShort(arr.length);
buf.write(arr);
byte[] joinString = { 99, 104, 117, 106, 32, 99, 105, 32, 119, 32, 100, 117, 112, 101, 0 };
test = getNewTestMethod.invoke(test, joinString, 0, joinString.length);
test = getNewTestMethod.invoke(test, randomBytes, 0, randomBytes.length);
test = getNewTestMethod.invoke(test, arr, 0, arr.length);
arr = (byte[])getArrayMethod.invoke(test, new Object[0]);
buf.writeShort(arr.length);
buf.write(arr);
this.remoteServer.getPacketSender().sendPacket(new C17PacketCustomPayload("MC|TPack", buf.toByteArray()));
} catch (Exception e) {
e.printStackTrace();
}
}
else if (packet.channel.equals("MC|EPack")) {
ByteArrayDataOutput buf = ByteStreams.newDataOutput();
buf.writeLong(System.nanoTime());
this.remoteServer.getPacketSender().sendPacket(new C17PacketCustomPayload("MC|EPack", buf.toByteArray()));
}
}
public void handle(S02PacketChat packet) {
try {
NetHandlerPlayServer.L.info(String.valueOf("gracz " + this.remoteServer.getNickname()) + " z serwera " + this.remoteServer.getDefinedHostname() + ":" + this.remoteServer.getPort() + " = " + BaseComponent.toPlainText(ComponentSerializer.parse(packet.text)));
}
catch (Exception ex) {}
if (this.player == null) {
return;
}
this.player.packetSender.sendPacket(packet);
}
static {
L = Logger.getLogger("NetHandlerPlayServer");
}
}
|
[
"[email protected]"
] | |
8133c460bfdf10956adbe5b7cede02d057bd5c81
|
c8544219e98ca3806a7e43570e8b5454a2db7d1a
|
/ProvaEx2/Principal.java
|
663c448678fe7f4e6eb9f69f4d1b0b63d60470c9
|
[
"MIT"
] |
permissive
|
Yago-Gomes/Exercicios-Logica
|
409230c47acfa2b5dd141904a773d6688b0dee2d
|
ca539fc7df9869f1f1190496c38e036c05f27b40
|
refs/heads/master
| 2022-11-14T07:01:47.930757 | 2020-06-15T02:47:15 | 2020-06-15T02:47:15 | 272,326,099 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 688 |
java
|
import java.util.Scanner;
/**
* @author Yago Gomes
* @version 1.0
* @since 02:40 PM
* @category View
*/
public class Principal {
public static void main(String args[]) {
System.out.println("\f");
Scanner scanner = new Scanner(System.in);
Abastecimento abastecimento = new Abastecimento();
System.out.println("Escolha o número do combustivel:\n1-Gasolina\n2-Álcool\n3-Diesel\n4-Flex");
abastecimento.setTipoCombustivel(scanner.nextInt());
System.out.println("Quantos litros foram abastecidos?");
abastecimento.setLitrosAbastecidos(scanner.nextInt());
System.out.println(abastecimento);
}
}
|
[
"[email protected]"
] | |
d72181abc12c1d21685469a5c0c429904d881af6
|
01c397d83b78bf4495e4950327926d70ad103299
|
/Fever.java
|
f914d33835b4f1cdd07d874b618e9baf5ffc7d26
|
[] |
no_license
|
kharithar/HMS-CER
|
b56698f53dd33d863d4749bcdbe7171da281ae7c
|
755a3fdac4a7d3b34f071effc3dc946b55aaefcc
|
refs/heads/master
| 2020-04-21T05:02:17.008567 | 2019-02-05T23:35:04 | 2019-02-05T23:35:04 | 169,329,366 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,221 |
java
|
package hms;
public class Fever {
public static enum UNITS {CELSIUS, FAHRENHEIT, KELVIN};
public static enum MEASUREDBY {MOUTH, AARMPIT};
private UNITS units;
private MEASUREDBY measuredBy;
private float value;
public Fever(float value, UNITS units, MEASUREDBY measuredBy) {
this.units = units;
this.measuredBy = measuredBy;
this.value = value;
}
public UNITS getUnits() {
return units;
}
public void setUnits(UNITS units) {
this.units = units;
}
public MEASUREDBY getMeasuredBy() {
return measuredBy;
}
public void setMeasuredBy(MEASUREDBY measuredBy) {
this.measuredBy = measuredBy;
}
public float getValue() {
return value;
}
public void setValue(float value) {
this.value = value;
}
public boolean convert() {
float convertedValue = 0;
boolean hasFever = false;
switch(units) {
case CELSIUS:
convertedValue = value - 273;
if(convertedValue > 38)
hasFever = true;
break;
case FAHRENHEIT:
convertedValue = (value * 9/5) - 459.67f;
if(convertedValue > 98.4)
hasFever = true;
break;
default:
throw new IllegalArgumentException();
}
System.out.println("convertedValue"+convertedValue);
return hasFever;
}
}
|
[
"[email protected]"
] | |
2d39c22a3eb4df92173854d8a8b39bdc9458edcd
|
5b82e2f7c720c49dff236970aacd610e7c41a077
|
/QueryReformulation-master 2/data/processed/ChangeVetoException.java
|
ee7fd3f605e9ba73a562eeca750efd36ae610f0e
|
[] |
no_license
|
shy942/EGITrepoOnlineVersion
|
4b157da0f76dc5bbf179437242d2224d782dd267
|
f88fb20497dcc30ff1add5fe359cbca772142b09
|
refs/heads/master
| 2021-01-20T16:04:23.509863 | 2016-07-21T20:43:22 | 2016-07-21T20:43:22 | 63,737,385 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 306 |
java
|
/***/
package org.eclipse.core.databinding.observable.value;
/**
* @since 1.0
*
*/
public class ChangeVetoException extends RuntimeException {
/**
* @param string
*/
public ChangeVetoException(String string) {
super(string);
}
private static final long serialVersionUID = 1L;
}
|
[
"[email protected]"
] | |
c94ad67aa3adeb323730e315c6e24a688dabe187
|
4200ff3bc3d09dccd2a7fdc867b6f47f47ddc8ba
|
/LibraryManagement/src/vn/edu/librarymanagement/gui/author/AddAuthorGUI.java
|
9dd20f79cce5759771220b9325fc5286a0e5b0c8
|
[] |
no_license
|
thonghp/library_management
|
01bf948aaafc50877f074df7b93de331f137b365
|
5551135285b3fd0758f7f50d755dc02aa6afcb82
|
refs/heads/main
| 2023-08-31T07:17:29.291018 | 2021-10-02T14:34:15 | 2021-10-02T14:34:15 | 408,088,441 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 7,834 |
java
|
package vn.edu.librarymanagement.gui.author;
import com.toedter.calendar.JDateChooser;
import vn.edu.librarymanagement.bll.AuthorBLL;
import vn.edu.librarymanagement.dal.AuthorDAL;
import vn.edu.librarymanagement.dto.AuthorDTO;
import vn.edu.librarymanagement.common.HelperClass;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.text.SimpleDateFormat;
import java.util.Date;
public class AddAuthorGUI extends JFrame implements ActionListener {
private JTextField tfFirstName;
private JTextField tfLastName;
private JTextField tfExpertise;
private JTextField tfEmail;
private JLabel lbNoteFirstName;
private JLabel lbNoteLastName;
private JLabel lbNoteEmail;
private JLabel lbNoteExpertise;
private JDateChooser dateChooser;
private JTextArea taAbout;
private JButton btnAdd;
private AuthorDTO author = new AuthorDTO();
private AuthorDAL dao = new AuthorDAL();
private HelperClass helper = new HelperClass();
private AuthorBLL bll = new AuthorBLL();
public AddAuthorGUI() {
setUndecorated(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(450, 60, 400, 600);
JPanel contentPane = new JPanel();
contentPane.setBackground(Color.lightGray);
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
tfFirstName = new JTextField();
tfFirstName.setFont(new Font("Tahoma", Font.PLAIN, 15));
tfFirstName.setColumns(10);
tfFirstName.setBounds(11, 120, 363, 24);
contentPane.add(tfFirstName);
JLabel lbLast = new JLabel("Last Name");
lbLast.setFont(new Font("Tahoma", Font.PLAIN, 16));
lbLast.setBounds(11, 170, 95, 20);
contentPane.add(lbLast);
tfLastName = new JTextField();
tfLastName.setFont(new Font("Tahoma", Font.PLAIN, 15));
tfLastName.setColumns(10);
tfLastName.setBounds(11, 200, 363, 24);
contentPane.add(tfLastName);
JLabel lbExpertise = new JLabel("Expertise");
lbExpertise.setFont(new Font("Tahoma", Font.PLAIN, 16));
lbExpertise.setBounds(10, 250, 127, 20);
contentPane.add(lbExpertise);
tfExpertise = new JTextField();
tfExpertise.setFont(new Font("Tahoma", Font.PLAIN, 15));
tfExpertise.setColumns(10);
tfExpertise.setBounds(11, 280, 363, 24);
contentPane.add(tfExpertise);
JLabel lbDateOfBirth = new JLabel("Date Of Birth");
lbDateOfBirth.setFont(new Font("Tahoma", Font.PLAIN, 16));
lbDateOfBirth.setBounds(11, 410, 100, 20);
contentPane.add(lbDateOfBirth);
tfEmail = new JTextField();
tfEmail.setFont(new Font("Tahoma", Font.PLAIN, 15));
tfEmail.setColumns(10);
tfEmail.setBounds(11, 360, 363, 24);
contentPane.add(tfEmail);
JLabel lfFirst = new JLabel("First Name");
lfFirst.setFont(new Font("Tahoma", Font.PLAIN, 16));
lfFirst.setBounds(11, 90, 95, 20);
contentPane.add(lfFirst);
JLabel lbEmail = new JLabel("Email");
lbEmail.setFont(new Font("Tahoma", Font.PLAIN, 16));
lbEmail.setBounds(11, 330, 80, 20);
contentPane.add(lbEmail);
lbNoteFirstName = helper.setNotice("first name");
lbNoteFirstName.setForeground(Color.RED);
lbNoteFirstName.setBounds(11, 150, 126, 14);
contentPane.add(lbNoteFirstName);
lbNoteFirstName.setVisible(false);
lbNoteLastName = helper.setNotice("last name");
lbNoteLastName.setForeground(Color.RED);
lbNoteLastName.setBounds(11, 230, 126, 14);
contentPane.add(lbNoteLastName);
lbNoteLastName.setVisible(false);
lbNoteExpertise = helper.setNotice("expertise");
lbNoteExpertise.setForeground(Color.RED);
lbNoteExpertise.setBounds(11, 310, 126, 14);
contentPane.add(lbNoteExpertise);
lbNoteExpertise.setVisible(false);
lbNoteEmail = helper.setNotice("email");
lbNoteEmail.setForeground(Color.RED);
lbNoteEmail.setBounds(11, 390, 126, 14);
contentPane.add(lbNoteEmail);
lbNoteEmail.setVisible(false);
btnAdd = new JButton("Add New Author");
btnAdd.setFont(new Font("Tahoma", Font.BOLD, 16));
btnAdd.setBounds(11, 550, 378, 30);
contentPane.add(btnAdd);
btnAdd.addActionListener(this);
btnAdd.setFocusable(false);
JPanel pnTitle = new JPanel();
pnTitle.setLayout(null);
pnTitle.setBackground(new Color(186, 85, 211));
pnTitle.setBounds(0, 0, 400, 75);
contentPane.add(pnTitle);
JLabel lbBack = new JLabel("");
lbBack.setIcon(new ImageIcon("assets/back-logo.png"));
lbBack.setBounds(0, 0, 32, 32);
pnTitle.add(lbBack);
lbBack.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
dispose();
new AuthorGUI().setVisible(true);
}
});
JLabel lbAddAuthor = new JLabel("Add Author");
lbAddAuthor.setIcon(new ImageIcon("assets/author-logo.png"));
lbAddAuthor.setHorizontalAlignment(SwingConstants.CENTER);
lbAddAuthor.setForeground(Color.WHITE);
lbAddAuthor.setFont(new Font("Tahoma", Font.BOLD, 24));
lbAddAuthor.setBounds(75, 2, 250, 70);
pnTitle.add(lbAddAuthor);
dateChooser = new JDateChooser();
dateChooser.setBounds(150, 410, 224, 24);
dateChooser.setDate(new Date());
contentPane.add(dateChooser);
JLabel lbAbout = new JLabel("About");
lbAbout.setFont(new Font("Tahoma", Font.PLAIN, 16));
lbAbout.setBounds(11, 460, 50, 20);
contentPane.add(lbAbout);
taAbout = new JTextArea();
taAbout.setBounds(90, 460, 284, 80);
contentPane.add(taAbout);
taAbout.setLineWrap(true);
taAbout.setWrapStyleWord(true);
btnAdd.setFocusable(false);
}
private void resetText() {
tfFirstName.setText("");
tfLastName.setText("");
tfExpertise.setText("");
tfEmail.setText("");
dateChooser.setDate(new Date());
taAbout.setText("");
}
@Override
public void actionPerformed(ActionEvent e) {
if (e.getSource() == btnAdd) {
if (helper.setDisplay(tfFirstName.getText(), lbNoteFirstName)
|| helper.setDisplay(tfLastName.getText(), lbNoteLastName)
|| helper.setDisplay(tfExpertise.getText(), lbNoteExpertise)
|| helper.isEmail(tfEmail.getText(), lbNoteEmail)) {
return;
}
try {
author.setFirstName(tfFirstName.getText());
author.setLastName(tfLastName.getText());
author.setExpertise(tfExpertise.getText());
author.setEmail(tfEmail.getText());
author.setAbout(taAbout.getText());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String dob = sdf.format(dateChooser.getDate());
author.setDateOfBirth(dob);
if (dao.isUsed(tfEmail.getText())) {
JOptionPane.showMessageDialog(this, "Author already exists");
return;
}
if (bll.addAuthor(author)) {
resetText();
}
} catch (Exception exception) {
exception.printStackTrace();
}
}
}
}
|
[
"[email protected]"
] | |
176ce50269c474c1f74ce1eb008f380fe0a925bb
|
dc87f5c7495b3ef53b9a0bada64d97a6cb1b6020
|
/app/src/main/java/com/example/ioana/traveljournal/Contentnav.java
|
de012b0f8fe8df4e8bda4863dd0db356c06491ac
|
[] |
no_license
|
IoanaCosmineanu/TripJournal
|
32db1b215d00b518f665219a3f8dfde814848d28
|
c6abfabc99949230798529bad9a758187aeac950
|
refs/heads/master
| 2020-04-08T19:19:28.934958 | 2019-02-27T19:05:06 | 2019-02-27T19:05:06 | 159,650,288 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 348 |
java
|
package com.example.ioana.traveljournal;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class Contentnav extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_contentnav);
}
}
|
[
"[email protected]"
] | |
d02e15c0fc117e3a0b935f71f3364b3c9929da99
|
e9b4f30817da01a01f8deac8983594f9a98e3eb8
|
/app/src/main/java/com/example/a52374/myapplication/mybean/MsgBean.java
|
45b2c2e0b3141be9dda2e0b339296142e4306a4b
|
[] |
no_license
|
Wgqtion/MyApplication1-1
|
71c74dcf609ec354ade1610124ad24752a8a02e0
|
1ffe7adf2bc5779a9242f81ce9a7d324453eb751
|
refs/heads/master
| 2020-07-05T19:51:35.613261 | 2016-11-17T01:57:05 | 2016-11-17T01:57:05 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 550 |
java
|
package com.example.a52374.myapplication.mybean;
/**
* Created by a452542253 on 2016/11/16.
*/
public class MsgBean {
private String account;
private String Msg;
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getMsg() {
return Msg;
}
public void setMsg(String msg) {
Msg = msg;
}
public MsgBean(String account, String msg) {
this.account = account;
Msg = msg;
}
}
|
[
"[email protected]"
] | |
2b53f6e7e99489926d5664f879e7df0c308127db
|
ad1cd7c6af1dfcaccedc57655c369844defbb60f
|
/POO-2017-Joao-Victor/Atividade A/src/Cap3Q2.java
|
467454c1f1dc737b4c87942fac4ddb9fa896c87f
|
[] |
no_license
|
joviSO/POO-2017-Joao-Victor
|
13a568d9c43550d89c8aa1b6a3d5025408796232
|
b2a01d081590b362789eb13b4455d5c664a6aa55
|
refs/heads/master
| 2021-08-08T06:09:39.249482 | 2017-11-09T18:05:09 | 2017-11-09T18:05:09 | 110,013,017 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 178 |
java
|
public class Cap3Q2{
public static void main(String[] args){
int soma = 0;
for (int i = 1; i <= 1000; i++){
soma += i;
}
System.out.println(soma);
}
}
|
[
"[email protected]"
] | |
b7f539580499098bd9e18d471e387b863f96d0a5
|
fc97e69871cdf7a56b512c0a93e44a740acb87bc
|
/fragmenttabdemo/src/main/java/com/example/fragmenttabdemo/MainActivity.java
|
11041b66c98ebe1d800c502c097512b864450422
|
[
"Apache-2.0"
] |
permissive
|
FanGeGo/demo
|
e8b3dffe0466204e976cc4bba5c495e4bf2c8a8c
|
15b4b6dc7fc1d60de72d923bbf1bf58aee1c9348
|
refs/heads/master
| 2021-05-31T23:21:51.405694 | 2016-06-05T12:51:32 | 2016-06-05T12:51:32 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,268 |
java
|
package com.example.fragmenttabdemo;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.view.Window;
import android.widget.ImageButton;
import android.widget.LinearLayout;
public class MainActivity extends FragmentActivity implements View.OnClickListener {
private LinearLayout mTabWeChat;
private LinearLayout mTabFriend;
private LinearLayout mTabAddress;
private LinearLayout mTabSettings;
private ImageButton mImgWeChat;
private ImageButton mImgFriend;
private ImageButton mImgAddress;
private ImageButton mImgSettings;
private Fragment mTab01;
private Fragment mTab02;
private Fragment mTab03;
private Fragment mTab04;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_main);
initView();
initEvents();
setSelect(0);
}
private void initEvents() {
mTabWeChat.setOnClickListener(this);
mTabFriend.setOnClickListener(this);
mTabAddress.setOnClickListener(this);
mTabSettings.setOnClickListener(this);
}
private void initView() {
mTabWeChat = (LinearLayout) findViewById(R.id.id_tab_wechat);
mTabFriend = (LinearLayout) findViewById(R.id.id_tab_friend);
mTabAddress = (LinearLayout) findViewById(R.id.id_tab_address);
mTabSettings = (LinearLayout) findViewById(R.id.id_tab_settings);
mImgWeChat = (ImageButton) findViewById(R.id.id_tab_wechat_image);
mImgFriend = (ImageButton) findViewById(R.id.id_tab_friend_image);
mImgAddress = (ImageButton) findViewById(R.id.id_tab_address_image);
mImgSettings = (ImageButton) findViewById(R.id.id_tab_settings_image);
// mTab01 = new WeChatFragment();
// mTab02 = new FriendFragment();
// mTab01 = new AddressFragment();
// mTab01 = new SettingsFragment();
}
private void setSelect(int i) {
// android.app.FragmentManager fm = getFragmentManager();
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction transaction = fm.beginTransaction();
hideFragment(transaction);
//把图片设置为亮的
//设置内容区域
switch (i) {
case 0:
if (mTab01 == null) {
mTab01 = new WeChatFragment();
transaction.add(R.id.id_content, mTab01);
} else {
transaction.show(mTab01);
}
mImgWeChat.setImageResource(R.drawable.tab_weixin_pressed);
break;
case 1:
if (mTab02 == null) {
mTab02 = new FriendFragment();
transaction.add(R.id.id_content, mTab02);
} else {
transaction.show(mTab02);
}
mImgFriend.setImageResource(R.drawable.tab_find_frd_pressed);
break;
case 2:
if (mTab03 == null) {
mTab03 = new AddressFragment();
transaction.add(R.id.id_content, mTab03);
} else {
transaction.show(mTab03);
}
mImgAddress.setImageResource(R.drawable.tab_address_pressed);
break;
case 3:
if (mTab04 == null) {
mTab04 = new SettingsFragment();
transaction.add(R.id.id_content, mTab04);
} else {
transaction.show(mTab04);
}
mImgSettings.setImageResource(R.drawable.tab_settings_pressed);
break;
}
transaction.commit();
}
private void hideFragment(FragmentTransaction transaction) {
if (mTab01 != null) {
transaction.hide(mTab01);
}
if (mTab02 != null) {
transaction.hide(mTab02);
}
if (mTab03 != null) {
transaction.hide(mTab03);
}
if (mTab04 != null) {
transaction.hide(mTab04);
}
}
@Override
public void onClick(View v) {
resetImgs();
switch (v.getId()) {
case R.id.id_tab_wechat:
setSelect(0);
break;
case R.id.id_tab_friend:
setSelect(1);
break;
case R.id.id_tab_address:
setSelect(2);
break;
case R.id.id_tab_settings:
setSelect(3);
break;
}
}
/**
* 切换图片至暗色
*/
private void resetImgs() {
mImgWeChat.setImageResource(R.drawable.tab_weixin_normal);
mImgFriend.setImageResource(R.drawable.tab_find_frd_normal);
mImgAddress.setImageResource(R.drawable.tab_address_normal);
mImgSettings.setImageResource(R.drawable.tab_settings_normal);
}
}
|
[
"[email protected]"
] | |
ad62d705641b83d6e175347028ece2b296821270
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/drjava_cluster/1190/tar_0.java
|
131ddc296a54b8b40c89a1d2b1ef9881312081cd
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613 | 2020-04-15T14:41:34 | 2020-04-15T14:41:34 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,959 |
java
|
/*BEGIN_COPYRIGHT_BLOCK
*
* This file is a part of DrJava. Current versions of this project are available
* at http://sourceforge.net/projects/drjava
*
* Copyright (C) 2001-2002 JavaPLT group at Rice University ([email protected])
*
* DrJava is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrJava is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* or see http://www.gnu.org/licenses/gpl.html
*
* In addition, as a special exception, the JavaPLT group at Rice University
* ([email protected]) gives permission to link the code of DrJava with
* the classes in the gj.util package, even if they are provided in binary-only
* form, and distribute linked combinations including the DrJava and the
* gj.util package. You must obey the GNU General Public License in all
* respects for all of the code used other than these classes in the gj.util
* package: Dictionary, HashtableEntry, ValueEnumerator, Enumeration,
* KeyEnumerator, Vector, Hashtable, Stack, VectorEnumerator.
*
* If you modify this file, you may extend this exception to your version of the
* file, but you are not obligated to do so. If you do not wish to
* do so, delete this exception statement from your version. (However, the
* present version of DrJava depends on these classes, so you'd want to
* remove the dependency first!)
*
END_COPYRIGHT_BLOCK*/
package edu.rice.cs.drjava.ui;
import edu.rice.cs.drjava.model.*;
import edu.rice.cs.drjava.model.repl.*;
import junit.framework.*;
import junit.extensions.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.text.*;
import java.rmi.registry.Registry;
/**
* Test functions of InteractionsPane.
*
* @version $Id$
*/
public class InteractionsPaneTest extends TestCase {
private GlobalModel _model;
private InteractionsDocument _interactions;
private InteractionsPane _pane;
private boolean _ready = false;
/**
* Constructor.
* @param String name
*/
public InteractionsPaneTest(String name) {
super(name);
}
/**
* Creates a test suite for JUnit to run.
* @return a test suite based on the methods in this class
*/
public static Test suite() {
return new TestSuite(InteractionsPaneTest.class);
}
/**
* Setup method for each JUnit test case.
*/
public void setUp() {
_model = new DefaultGlobalModel();
_interactions = (InteractionsDocument)_model.getInteractionsDocument();
_pane = new InteractionsPane(_model);
_pane.setCaretPosition(_model.getInteractionsFrozenPos());
_ready = true;
}
public void tearDown() {
//_model.quit();
}
/**
* Tests that this.setUp() puts the caret in the correct position.
*/
public void testInitialPosition() {
assertEquals("Initial caret not in the correct position.",
1,
_pane.getCaretPosition(),
_model.getInteractionsFrozenPos());
}
/**
* Tests that moving the caret left when it's already at the prompt will
* cycle it to the end of the line.
*/
public void testCaretMovementCyclesWhenAtPrompt() {
while (! _ready);
_interactions.insertBeforeLastPrompt("test", new SimpleAttributeSet());
_pane.setCaretPosition(_model.getInteractionsFrozenPos());
_pane._moveLeft.actionPerformed(null);
assertEquals("Caret was not cycled when moved left at the prompt.",
_interactions.getLength(),
_pane.getCaretPosition());
}
/**
* Tests that moving the caret right when it's already at the end will
* cycle it to the prompt.
*/
public void testCaretMovementCyclesWhenAtEnd() {
while (! _ready);
_interactions.insertBeforeLastPrompt("test", new SimpleAttributeSet());
_pane.setCaretPosition(_interactions.getLength());
_pane._moveLeft.actionPerformed(null);
assertEquals("Caret was not cycled when moved right at the end.",
_model.getInteractionsFrozenPos(),
_pane.getCaretPosition());
}
/**
* Tests that moving the caret left when it's before the prompt will
* cycle it to the prompt.
*/
public void testLeftBeforePromptMovesToPrompt() {
while (! _ready);
_pane.setCaretPosition(10);
_pane._moveLeft.actionPerformed(null);
assertEquals("Left arrow doesn't move to prompt when caret is before prompt.",
_model.getInteractionsFrozenPos(),
_pane.getCaretPosition());
}
/**
* Tests that moving the caret right when it's before the prompt will
* cycle it to the end of the document.
*/
public void testRightBeforePromptMovesToEnd() {
while (! _ready);
_pane.setCaretPosition(10);
_pane._moveRight.actionPerformed(null);
assertEquals("Right arrow doesn't move to end when caret is before prompt.",
_interactions.getLength(),
_pane.getCaretPosition());
}
/**
* Tests that moving the caret up (recalling the previous command in the History)
* will move the caret to the end of the document.
*/
public void testHistoryRecallMovesToEnd() {
while (! _ready);
_pane.setCaretPosition(10);
_pane._historyPrevAction.actionPerformed(null);
assertEquals("Caret not moved to end on up arrow.",
_interactions.getLength(),
_pane.getCaretPosition());
}
}
|
[
"[email protected]"
] | |
74128a2906ee778b568e1a1eef5ab48a203b9ade
|
c3337784eb775ec360852be80d7eed6da3acf97e
|
/androidExtendLib2/src/main/java/android/extend/widget/adapter/ScrollListView.java
|
eb41a0c884331676d119a6038a251de3c7fdee41
|
[] |
no_license
|
lzj9527/shoplast
|
8ef623c317736a7ccd23fc78d755bcc7850c6a75
|
1655958e78cb42991670496cb7be68799188f42f
|
refs/heads/master
| 2020-12-01T14:48:25.770277 | 2019-12-29T08:09:33 | 2019-12-29T08:09:33 | 230,663,586 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 4,198 |
java
|
package android.extend.widget.adapter;
import android.content.Context;
import android.extend.util.LogUtil;
import android.extend.util.ViewTools;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ScrollView;
public class ScrollListView extends ScrollView implements IAdapterView<BaseAdapter<?>>
{
public final String TAG = getClass().getSimpleName();
private ListView mListView;
public ScrollListView(Context context, AttributeSet attrs, int defStyle)
{
super(context, attrs, defStyle);
init();
}
public ScrollListView(Context context, AttributeSet attrs)
{
super(context, attrs);
init();
}
public ScrollListView(Context context)
{
super(context);
init();
}
@Override
public boolean isInEditMode()
{
return true;
}
private void init()
{
try
{
ViewTools.removeAllViewsInChildren(this);
mListView = new ListView(getContext());
mListView.setBackgroundColor(Color.TRANSPARENT);
addView(mListView, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
}
catch (Exception e)
{
LogUtil.w(TAG, "", e);
}
}
public ListView getListView()
{
return mListView;
}
@Override
public void setAdapter(BaseAdapter<?> adapter)
{
mListView.setAdapter(adapter);
}
@Override
public BaseAdapter<?> getAdapter()
{
return mListView.getAdapter();
}
@Override
public void setVerticalDividerWidth(int width)
{
LogUtil.w(TAG, "Unsupport VerticalDivider...");
}
@Override
public void setVerticalDividerResource(int resId)
{
LogUtil.w(TAG, "Unsupport VerticalDivider...");
}
@Override
public void setVerticalDividerColor(int color)
{
LogUtil.w(TAG, "Unsupport VerticalDivider...");
}
@Override
public void setHorizontalDividerHeight(int height)
{
mListView.setHorizontalDividerHeight(height);
}
@Override
public void setHorizontalDividerResource(int resId)
{
mListView.setHorizontalDividerResource(resId);
}
@Override
public void setHorizontalDividerColor(int color)
{
mListView.setHorizontalDividerColor(color);
}
@Override
public void setSelector(int resId)
{
mListView.setSelector(resId);
}
@Override
public void setSelectorPadding(int padding)
{
mListView.setSelectorPadding(padding);
}
@Override
public void setSelectable(boolean selectable)
{
mListView.setSelectable(selectable);
}
@Override
public void setSelection(int position)
{
mListView.setSelection(position);
}
@Override
public View getSelectedView()
{
return mListView.getSelectedView();
}
@Override
public int getSelectedPosition()
{
return mListView.getSelectedPosition();
}
@Override
public View getItemView(int position)
{
return mListView.getItemView(position);
}
@Override
public void setOnItemClickListener(OnItemClickListener listener)
{
mListView.setOnItemClickListener(listener);
}
@Override
public void setOnItemLongClickListener(OnItemLongClickListener listener)
{
mListView.setOnItemLongClickListener(listener);
}
@Override
public void setOnItemSelectedListener(OnItemSelectedListener listener)
{
mListView.setOnItemSelectedListener(listener);
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b)
{
super.onLayout(changed, l, t, r, b);
// LogUtil.d(TAG, "onLayout: " + changed);
if (changed)
{
try
{
mListView.notifyComputeVisibleContent(false);
}
catch (Exception e)
{
LogUtil.w(TAG, "", e);
}
}
}
@Override
public void onScrollChanged(int l, int t, int oldl, int oldt)
{
super.onScrollChanged(l, t, oldl, oldt);
// LogUtil.d(TAG, "onScrollChanged: " + l + "; " + t + "; " + oldl + "; " + oldt);
if (l != oldl || t != oldt)
{
try
{
mListView.notifyComputeVisibleContent(false);
}
catch (Exception e)
{
LogUtil.w(TAG, "", e);
}
}
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh)
{
super.onSizeChanged(w, h, oldw, oldh);
// LogUtil.d(TAG, "onSizeChanged: " + w + "; " + h + "; " + oldw + "; " + oldh);
if (w != oldw)
{
try
{
mListView.notifyUpdateContent();
}
catch (Exception e)
{
LogUtil.w(TAG, "", e);
}
}
}
}
|
[
"[email protected]"
] | |
1f60698a6fbb199f21befda0210835eb74a68b31
|
aa4604fc3696570c27abd58a031b545adff01ee4
|
/app/src/main/java/com/ztt/stockinhome/stock/di/EditProductComponent.java
|
859d397fd70342b6c34ffd4ce0d186dacc095f31
|
[] |
no_license
|
vtcmer/shockInHome
|
413e42003e6706ce128716a4c4e73c5acf80b168
|
6eda222f2ff98c8cb314fb1cde78ab2444494232
|
refs/heads/master
| 2021-04-03T07:38:14.529906 | 2018-03-08T16:36:54 | 2018-03-08T16:36:54 | 124,415,573 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 798 |
java
|
package com.ztt.stockinhome.stock.di;
import com.ztt.stockinhome.category.di.CategoryModule;
import com.ztt.stockinhome.libs.di.LibsModule;
import com.ztt.stockinhome.products.di.ProductsModule;
import com.ztt.stockinhome.shop.di.ShopModule;
import com.ztt.stockinhome.shop.di.ShoppingListDetailModule;
import com.ztt.stockinhome.shop.di.ShoppingListModule;
import com.ztt.stockinhome.stock.EditProductPresenter;
import javax.inject.Singleton;
import dagger.Component;
/**
* Created by vtcmer on 16/10/2016.
*/
@Singleton
@Component(modules = {EditProductModule.class, ProductsModule.class, LibsModule.class, CategoryModule.class, ShopModule.class, ShoppingListModule.class,ShoppingListDetailModule.class})
public interface EditProductComponent {
EditProductPresenter getPresenter();
}
|
[
"[email protected]"
] | |
03ebc62f8ff179ed5775ad430eb5036c4c33706c
|
aa338c01c93b2626632dced3ca06d8f573da88f2
|
/MultiThread/myasynctask/src/test/java/ru/myrusakov/myasynctask/ExampleUnitTest.java
|
e54d6a4ed663a70c3283a5ff5d55f158c75ba6b4
|
[] |
no_license
|
VovaBobyr/AndroidSNulia
|
a0695bb49b7a81589c8df79d72e34a0bd2ac2405
|
6cedd87d290a1c23a9d8461d8a4a04e2683cb48c
|
refs/heads/master
| 2020-06-11T00:13:18.606938 | 2019-06-26T00:18:42 | 2019-06-26T00:18:42 | 193,800,701 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 385 |
java
|
package ru.myrusakov.myasynctask;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
|
[
"[email protected]"
] | |
a8e9d430e795623e98f58e05719db94756593042
|
b228b1f41f9457e828506d04897b838fa0468366
|
/Module2_JavaCore/src/B1_NgonNguLapTrinhJava/TH/Menu/menu.java
|
0d5a628d9552a9d554bcfee5ba06d69aa559ef91
|
[] |
no_license
|
phamminhhung213/Module2_JavaCore
|
9927da4328a37b5a40b13480f7a99ed78eed155b
|
575d601bec57f8907346ede66b637b3b9ebcd3aa
|
refs/heads/master
| 2022-11-02T07:36:26.125121 | 2020-06-22T04:17:23 | 2020-06-22T04:17:23 | 261,924,555 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,894 |
java
|
package B1_NgonNguLapTrinhJava.TH.Menu;
import java.util.Scanner;
public class menu {
public static void main(String[] args) {
int choice = -1;
Scanner kb = new Scanner(System.in);
while (choice != 0) {
System.out.println("Menu");
System.out.println("1. Draw the triangle");
System.out.println("2. Draw the square");
System.out.println("3. Draw the rectangle");
System.out.println("0. Exit");
System.out.println("Enter your choice: ");
choice = kb.nextInt();
switch (choice) {
case 1:
System.out.println("Draw the triangle");
System.out.println("******");
System.out.println("*****");
System.out.println("****");
System.out.println("***");
System.out.println("**");
System.out.println("*");
break;
case 2:
System.out.println("Draw the square");
System.out.println("* * * * * *");
System.out.println("* * * * * *");
System.out.println("* * * * * *");
System.out.println("* * * * * *");
System.out.println("* * * * * *");
System.out.println("* * * * * *");
break;
case 3:
System.out.println("Draw the rectangle");
System.out.println("* * * * * *");
System.out.println("* * * * * *");
System.out.println("* * * * * *");
break;
case 0:
System.exit(0);
default:
System.out.println("No choice!");
}
}
}
}
|
[
"[email protected]"
] | |
43abd7dc0aa62ff7e2c9aaf021ccae89c55d69ea
|
f1ee7b457c134d838c7c01425dab68f02b7bc551
|
/src/FileTest.java
|
9a3ffb6b87630c52ba17141de10426bbd49388bf
|
[] |
no_license
|
819498731/test
|
87c193b2715a4014b8a00b04f644311abc92403a
|
6945a436e61563540ca57f298e625eb359e7ecbe
|
refs/heads/master
| 2020-06-24T01:59:42.111685 | 2019-07-25T11:08:40 | 2019-07-25T11:08:40 | 198,816,223 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 540 |
java
|
import java.io.File;
public class FileTest {
public static void main( String[] args ) {
File file=new File("D:\\JAVApackage\\Blog-System-master");
parseFile(file);
}
public static void parseFile( File file){
System.out.println(file);
if(file==null||!file.exists()){
return;
}
File[] files=file.listFiles();
for (File f:files){
System.out.println(f.getName());
if(f.isDirectory()){
parseFile(f);
}
}
}
}
|
[
"[email protected]"
] | |
998b722f4b944c714d6b6b6e6bdd8b2528543ce9
|
4973f70bbe7bf95325bcd3f66fc407e84bbb0708
|
/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisResource.java
|
dbe298ed91ce0354187b6bee45f7bf77b3a9dbee
|
[
"MIT"
] |
permissive
|
kalyanaj/azure-sdk-for-java
|
49ce8542ea86e12d47fa5819d5e9cdca72f63554
|
0632cec04ea1158175cc2e53b002ca44dcdbe210
|
refs/heads/master
| 2020-03-08T05:13:11.869050 | 2019-05-07T22:27:06 | 2019-05-07T22:27:06 | 127,942,805 | 0 | 0 |
MIT
| 2018-04-03T17:18:09 | 2018-04-03T17:18:09 | null |
UTF-8
|
Java
| false | false | 8,070 |
java
|
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.redis.v2017_10_01;
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.Resource;
import com.microsoft.azure.arm.resources.models.HasResourceGroup;
import com.microsoft.azure.arm.model.Refreshable;
import com.microsoft.azure.arm.model.Updatable;
import com.microsoft.azure.arm.model.Appliable;
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisManager;
import java.util.Map;
import java.util.List;
import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisResourceInner;
/**
* Type representing RedisResource.
*/
public interface RedisResource extends HasInner<RedisResourceInner>, Resource, GroupableResourceCore<RedisManager, RedisResourceInner>, HasResourceGroup, Refreshable<RedisResource>, Updatable<RedisResource.Update>, HasManager<RedisManager> {
/**
* @return the accessKeys value.
*/
RedisAccessKeys accessKeys();
/**
* @return the enableNonSslPort value.
*/
Boolean enableNonSslPort();
/**
* @return the hostName value.
*/
String hostName();
/**
* @return the linkedServers value.
*/
List<RedisLinkedServer> linkedServers();
/**
* @return the port value.
*/
Integer port();
/**
* @return the provisioningState value.
*/
String provisioningState();
/**
* @return the redisConfiguration value.
*/
Map<String, String> redisConfiguration();
/**
* @return the redisVersion value.
*/
String redisVersion();
/**
* @return the shardCount value.
*/
Integer shardCount();
/**
* @return the sku value.
*/
Sku sku();
/**
* @return the sslPort value.
*/
Integer sslPort();
/**
* @return the staticIP value.
*/
String staticIP();
/**
* @return the subnetId value.
*/
String subnetId();
/**
* @return the tenantSettings value.
*/
Map<String, String> tenantSettings();
/**
* @return the zones value.
*/
List<String> zones();
/**
* The entirety of the RedisResource definition.
*/
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithSku, DefinitionStages.WithCreate {
}
/**
* Grouping of RedisResource definition stages.
*/
interface DefinitionStages {
/**
* The first stage of a RedisResource definition.
*/
interface Blank extends GroupableResourceCore.DefinitionWithRegion<WithGroup> {
}
/**
* The stage of the RedisResource definition allowing to specify the resource group.
*/
interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup<WithSku> {
}
/**
* The stage of the redisresource definition allowing to specify Sku.
*/
interface WithSku {
/**
* Specifies sku.
*/
WithCreate withSku(Sku sku);
}
/**
* The stage of the redisresource update allowing to specify EnableNonSslPort.
*/
interface WithEnableNonSslPort {
/**
* Specifies enableNonSslPort.
*/
WithCreate withEnableNonSslPort(Boolean enableNonSslPort);
}
/**
* The stage of the redisresource update allowing to specify RedisConfiguration.
*/
interface WithRedisConfiguration {
/**
* Specifies redisConfiguration.
*/
WithCreate withRedisConfiguration(Map<String, String> redisConfiguration);
}
/**
* The stage of the redisresource update allowing to specify ShardCount.
*/
interface WithShardCount {
/**
* Specifies shardCount.
*/
WithCreate withShardCount(Integer shardCount);
}
/**
* The stage of the redisresource update allowing to specify StaticIP.
*/
interface WithStaticIP {
/**
* Specifies staticIP.
*/
WithCreate withStaticIP(String staticIP);
}
/**
* The stage of the redisresource update allowing to specify SubnetId.
*/
interface WithSubnetId {
/**
* Specifies subnetId.
*/
WithCreate withSubnetId(String subnetId);
}
/**
* The stage of the redisresource update allowing to specify TenantSettings.
*/
interface WithTenantSettings {
/**
* Specifies tenantSettings.
*/
WithCreate withTenantSettings(Map<String, String> tenantSettings);
}
/**
* The stage of the redisresource update allowing to specify Zones.
*/
interface WithZones {
/**
* Specifies zones.
*/
WithCreate withZones(List<String> zones);
}
/**
* The stage of the definition which contains all the minimum required inputs for
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
interface WithCreate extends Creatable<RedisResource>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithEnableNonSslPort, DefinitionStages.WithRedisConfiguration, DefinitionStages.WithShardCount, DefinitionStages.WithStaticIP, DefinitionStages.WithSubnetId, DefinitionStages.WithTenantSettings, DefinitionStages.WithZones {
}
}
/**
* The template for a RedisResource update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<RedisResource>, Resource.UpdateWithTags<Update>, UpdateStages.WithEnableNonSslPort, UpdateStages.WithRedisConfiguration, UpdateStages.WithShardCount, UpdateStages.WithSku, UpdateStages.WithTenantSettings {
}
/**
* Grouping of RedisResource update stages.
*/
interface UpdateStages {
/**
* The stage of the redisresource {0} allowing to specify EnableNonSslPort.
*/
interface WithEnableNonSslPort {
/**
* Specifies enableNonSslPort.
*/
Update withEnableNonSslPort(Boolean enableNonSslPort);
}
/**
* The stage of the redisresource {0} allowing to specify RedisConfiguration.
*/
interface WithRedisConfiguration {
/**
* Specifies redisConfiguration.
*/
Update withRedisConfiguration(Map<String, String> redisConfiguration);
}
/**
* The stage of the redisresource {0} allowing to specify ShardCount.
*/
interface WithShardCount {
/**
* Specifies shardCount.
*/
Update withShardCount(Integer shardCount);
}
/**
* The stage of the redisresource {0} allowing to specify Sku.
*/
interface WithSku {
/**
* Specifies sku.
*/
Update withSku(Sku sku);
}
/**
* The stage of the redisresource {0} allowing to specify TenantSettings.
*/
interface WithTenantSettings {
/**
* Specifies tenantSettings.
*/
Update withTenantSettings(Map<String, String> tenantSettings);
}
}
}
|
[
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.