hexsha
stringlengths
40
40
size
int64
3
1.05M
ext
stringclasses
1 value
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
5
1.02k
max_stars_repo_name
stringlengths
4
126
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
list
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
5
1.02k
max_issues_repo_name
stringlengths
4
114
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
list
max_issues_count
float64
1
92.2k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
5
1.02k
max_forks_repo_name
stringlengths
4
136
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
list
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
avg_line_length
float64
2.55
99.9
max_line_length
int64
3
1k
alphanum_fraction
float64
0.25
1
index
int64
0
1M
content
stringlengths
3
1.05M
3e1bf31a9f6545331b28dd3f071db00f0a624d65
2,735
java
Java
src/main/java/com/autobook/core/ClassFieldContext.java
xiaduobao/AirLine-BugFixer
7fb7b6e41cfedbd0a22e722bb1d1cc325a47f2e1
[ "Apache-2.0" ]
null
null
null
src/main/java/com/autobook/core/ClassFieldContext.java
xiaduobao/AirLine-BugFixer
7fb7b6e41cfedbd0a22e722bb1d1cc325a47f2e1
[ "Apache-2.0" ]
null
null
null
src/main/java/com/autobook/core/ClassFieldContext.java
xiaduobao/AirLine-BugFixer
7fb7b6e41cfedbd0a22e722bb1d1cc325a47f2e1
[ "Apache-2.0" ]
null
null
null
29.095745
117
0.62011
11,847
package com.autobook.core; import com.autobook.annotation.CollectField; import com.autobook.bean.AirSegment; import com.autobook.bean.AutoBookInfo; import com.autobook.bean.AutoBookRequest; import com.autobook.bean.Passenger; import com.autobook.config.Configuration; import com.autobook.util.ClassLoaderUtil; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by jiabaowang on 2018/4/12. */ public class ClassFieldContext { private static Map<Integer, FieldBase> fieldBaseMap; private static String pkgName = Configuration.valueOf("autobook.field.collect.pkg"); private static boolean useClassLoaderStyle = "T".equals(Configuration.valueOf("autobook.use.classloader.style")); static { fieldBaseMap = new HashMap<>(); if (useClassLoaderStyle) { initFieldCollectedClass(); }else{ fieldBaseMap.put(1,new FieldBase(AutoBookRequest.class, 1)); fieldBaseMap.put(2,new FieldBase(AirSegment.class, 2)); fieldBaseMap.put(3,new FieldBase(Passenger.class, 3)); fieldBaseMap.put(4,new FieldBase(AutoBookInfo.class, 4)); } } public static int indexOf(String field) { for (Map.Entry<Integer, FieldBase> entry : fieldBaseMap.entrySet()) { if (entry.getValue().getFieldList().contains(field)) { return entry.getKey(); } } return 0; } public static void initFieldCollectedClass() { List<Class> classes = ClassLoaderUtil.loadClassNameFromPkg(pkgName); for (Class clazz : classes) { Annotation annotation = clazz.getAnnotation(CollectField.class); if (annotation != null) { int index = ((CollectField) annotation).contextIndex(); fieldBaseMap.put(index, new FieldBase(clazz, index)); } } } static class FieldBase { private List<String> fieldList = new ArrayList<>(); private Class clazz; private int retVal; public FieldBase(Class clazz, int retVal) { this.clazz = clazz; this.retVal = retVal; init(); } private void init() { Field[] fields = clazz.getDeclaredFields(); for (Field field : fields) { fieldList.add(field.getName()); } } public List<String> getFieldList() { return fieldList; } public Class getClazz() { return clazz; } public int getRetVal() { return retVal; } } }
3e1bf3a17ac8451f8a1ffdb7fe9a6b6f0c44d65d
5,226
java
Java
src/com/opengamma/analytics/financial/forex/definition/ForexOptionVanillaDefinition.java
weltam/idylfin
b55cbab20a931f7d11f863c90201d4bfac13eb43
[ "ECL-2.0", "Apache-2.0" ]
28
2015-01-19T07:12:09.000Z
2021-12-31T14:50:55.000Z
src/com/opengamma/analytics/financial/forex/definition/ForexOptionVanillaDefinition.java
weltam/idylfin
b55cbab20a931f7d11f863c90201d4bfac13eb43
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/com/opengamma/analytics/financial/forex/definition/ForexOptionVanillaDefinition.java
weltam/idylfin
b55cbab20a931f7d11f863c90201d4bfac13eb43
[ "ECL-2.0", "Apache-2.0" ]
25
2015-03-11T18:38:45.000Z
2022-03-19T09:20:56.000Z
32.259259
160
0.699005
11,848
/** * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.analytics.financial.forex.definition; import javax.time.calendar.ZonedDateTime; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.Validate; import com.opengamma.analytics.financial.forex.derivative.Forex; import com.opengamma.analytics.financial.forex.derivative.ForexOptionVanilla; import com.opengamma.analytics.financial.instrument.InstrumentDefinition; import com.opengamma.analytics.financial.instrument.InstrumentDefinitionVisitor; import com.opengamma.analytics.financial.interestrate.InstrumentDerivative; import com.opengamma.analytics.util.time.TimeCalculator; /** * Class describing a vanilla foreign exchange European option. When the option is a call, the option holder has the right to enter into the Forex transaction; * if the option is a put, the option holder has the right to enter into a Forex transaction equal to the underlying but with opposite signs. * A Call on a Forex EUR 1.00 / USD -1.41 is thus the right to call 1.00 EUR and put 1.41 USD. A put on a Forex EUR -1.00 / USD 1.41 is the right to * exchange -(-1.00) EUR = 1.00 EUR and -1.41 EUR; it is thus also the right to call 1.00 EUR and put 1.41 USD. A put on a Forex USD 1.41 / EUR -1.00 is * also the right to call 1.00 EUR and put 1.41 USD. */ public class ForexOptionVanillaDefinition implements InstrumentDefinition<InstrumentDerivative> { /** * The underlying Forex transaction (the one entered into in case of exercise). */ private final ForexDefinition _underlyingForex; /** * The expiration date (and time) of the option. */ private final ZonedDateTime _expirationDate; /** * The call (true) / put (false) flag. */ private final boolean _isCall; /** * The long (true) / short (false) flag. */ private final boolean _isLong; /** * Constructor from the details. * @param forex The underlying Forex transaction. * @param expirationDate The expiration date (and time) of the option. * @param isCall The call (true) / put (false) flag. * @param isLong The long (true) / short (false) flag. */ public ForexOptionVanillaDefinition(final ForexDefinition forex, final ZonedDateTime expirationDate, final boolean isCall, boolean isLong) { Validate.notNull(forex, "Underlying forex"); Validate.notNull(expirationDate, "Expiration date"); Validate.isTrue(!expirationDate.isAfter(forex.getExchangeDate()), "Expiration should be before payment."); this._underlyingForex = forex; this._expirationDate = expirationDate; this._isCall = isCall; _isLong = isLong; } /** * Gets the underlying Forex transaction. * @return The underlying Forex transaction. */ public ForexDefinition getUnderlyingForex() { return _underlyingForex; } /** * Gets the expiration date (and time) of the option. * @return The expiration date. */ public ZonedDateTime getExpirationDate() { return _expirationDate; } /** * Gets the call (true) / put (false) flag. * @return The call / put flag. */ public boolean isCall() { return _isCall; } /** * Gets the long (true) / short (false) flag. * @return The long / short flag. */ public boolean isLong() { return _isLong; } /** * {@inheritDoc} */ @Override public ForexOptionVanilla toDerivative(final ZonedDateTime date, final String... yieldCurveNames) { Validate.notNull(date, "date"); Validate.notNull(yieldCurveNames, "yieldCurveNames"); final Forex fx = _underlyingForex.toDerivative(date, yieldCurveNames); final double expirationTime = TimeCalculator.getTimeBetween(date, _expirationDate); return new ForexOptionVanilla(fx, expirationTime, _isCall, _isLong); } /** * {@inheritDoc} */ @Override public <U, V> V accept(final InstrumentDefinitionVisitor<U, V> visitor, final U data) { return visitor.visitForexOptionVanillaDefinition(this, data); } /** * {@inheritDoc} */ @Override public <V> V accept(final InstrumentDefinitionVisitor<?, V> visitor) { return visitor.visitForexOptionVanillaDefinition(this); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _expirationDate.hashCode(); result = prime * result + (_isCall ? 1231 : 1237); result = prime * result + (_isLong ? 1231 : 1237); result = prime * result + _underlyingForex.hashCode(); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } ForexOptionVanillaDefinition other = (ForexOptionVanillaDefinition) obj; if (!ObjectUtils.equals(_expirationDate, other._expirationDate)) { return false; } if (_isCall != other._isCall) { return false; } if (_isLong != other._isLong) { return false; } if (!ObjectUtils.equals(_underlyingForex, other._underlyingForex)) { return false; } return true; } }
3e1bf4d67a03678b6cce80f372f960338eedae14
1,942
java
Java
restli-int-test-server/src/main/java/com/linkedin/restli/examples/greetings/server/ComplexKeysSubResource.java
sangm/rest.li
e2b59e19d7e845f0047c7640344be97960bcd6bf
[ "Apache-2.0" ]
1,682
2015-01-07T03:29:42.000Z
2022-03-30T22:50:53.000Z
restli-int-test-server/src/main/java/com/linkedin/restli/examples/greetings/server/ComplexKeysSubResource.java
sangm/rest.li
e2b59e19d7e845f0047c7640344be97960bcd6bf
[ "Apache-2.0" ]
312
2015-01-26T18:27:08.000Z
2022-03-28T16:23:12.000Z
restli-int-test-server/src/main/java/com/linkedin/restli/examples/greetings/server/ComplexKeysSubResource.java
sangm/rest.li
e2b59e19d7e845f0047c7640344be97960bcd6bf
[ "Apache-2.0" ]
441
2015-01-07T09:17:41.000Z
2022-03-26T23:14:12.000Z
30.825397
90
0.747683
11,849
/* Copyright (c) 2012 LinkedIn Corp. 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. */ /** * $Id: $ */ package com.linkedin.restli.examples.greetings.server; import com.linkedin.restli.common.ComplexResourceKey; import com.linkedin.restli.examples.greetings.api.TwoPartKey; import com.linkedin.restli.server.PathKeys; import com.linkedin.restli.server.annotations.RestLiCollection; import com.linkedin.restli.server.annotations.RestMethod; import com.linkedin.restli.server.resources.CollectionResourceTemplate; /** * @author Moira Tagle * @version $Revision: $ */ @RestLiCollection( parent = ComplexKeysResource.class, name = "complexKeysSub", namespace = "com.linkedin.restli.examples.greetings.client", keyName = "subKey" ) public class ComplexKeysSubResource extends CollectionResourceTemplate<String, TwoPartKey> { @RestMethod.Get public TwoPartKey get(String key) { PathKeys pathKeys = getContext().getPathKeys(); ComplexResourceKey<TwoPartKey, TwoPartKey> keys = pathKeys.get("keys"); return convert(keys); } private TwoPartKey convert(ComplexResourceKey<TwoPartKey, TwoPartKey> key) { TwoPartKey keyKey = key.getKey(); TwoPartKey keyParam = key.getParams(); TwoPartKey response = new TwoPartKey(); response.setMajor(keyKey.getMajor() + "AND" + keyParam.getMajor()); response.setMinor(keyKey.getMinor() + "AND" + keyParam.getMinor()); return response; } }
3e1bf4ffb005eb163922715a4007ae13a0afc1f7
1,580
java
Java
Mage.Sets/src/mage/cards/a/AetherTheorist.java
dsenginr/mage
94e9aeedc20dcb74264e58fd198f46215828ef5c
[ "MIT" ]
1,444
2015-01-02T00:25:38.000Z
2022-03-31T13:57:18.000Z
Mage.Sets/src/mage/cards/a/AetherTheorist.java
dsenginr/mage
94e9aeedc20dcb74264e58fd198f46215828ef5c
[ "MIT" ]
6,180
2015-01-02T19:10:09.000Z
2022-03-31T21:10:44.000Z
Mage.Sets/src/mage/cards/a/AetherTheorist.java
dsenginr/mage
94e9aeedc20dcb74264e58fd198f46215828ef5c
[ "MIT" ]
1,001
2015-01-01T01:15:20.000Z
2022-03-30T20:23:04.000Z
31.6
111
0.732278
11,850
package mage.cards.a; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.PayEnergyCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; /** * * @author LevelX2 */ public final class AetherTheorist extends CardImpl { public AetherTheorist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); this.subtype.add(SubType.VEDALKEN); this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(3); // When Aether Theorist enters the battlefield, you get {E}{E}{E}. this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(3))); // Tap, Pay {E}: Scry 1. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1), new TapSourceCost()); ability.addCost(new PayEnergyCost(1)); this.addAbility(ability); } private AetherTheorist(final AetherTheorist card) { super(card); } @Override public AetherTheorist copy() { return new AetherTheorist(this); } }
3e1bf5002fbcd662a2a1e6235dfe6c18fc339e73
1,468
java
Java
Blatt-03/tutor-solution/geometry/CubicBezier.java
MartinThoma/prog-ws1213
c82a2fb81bac774f8d3214a25c33124a9f512ef0
[ "MIT" ]
1
2017-08-10T13:12:03.000Z
2017-08-10T13:12:03.000Z
Blatt-03/tutor-solution/geometry/CubicBezier.java
siviaseason/prog-ws1213
c82a2fb81bac774f8d3214a25c33124a9f512ef0
[ "MIT" ]
null
null
null
Blatt-03/tutor-solution/geometry/CubicBezier.java
siviaseason/prog-ws1213
c82a2fb81bac774f8d3214a25c33124a9f512ef0
[ "MIT" ]
2
2016-06-08T20:56:04.000Z
2022-03-11T20:12:37.000Z
29.36
69
0.593324
11,851
package geometry; public class CubicBezier { Line first; Line second; public CubicBezier(Point start, Point control1, Point control2, Point end) { first = new Line(start, control1); second = new Line(control2, end); } public Point getStartPoint() { return first.getStartPoint(); } public Point getFirstControlPoint() { return first.getEndPoint(); } public Point getSecondControlPoint() { return second.getStartPoint(); } public Point getEndPoint() { return second.getEndPoint(); } public Point interpolate(double t) { return new QuadraticBezier(first.interpolate(t), new Line( first.getEndPoint(), second.getStartPoint()) .interpolate(t), second.interpolate(t)) .interpolate(t); } public CubicBezier mirrorAt(Point point) { return new CubicBezier(first.getStartPoint().mirrorAt(point), first.getEndPoint().mirrorAt(point), second .getStartPoint().mirrorAt(point), second .getEndPoint().mirrorAt(point)); } public CubicBezier mirrorAt(Line line) { return new CubicBezier(first.getStartPoint().mirrorAt(line), first.getEndPoint().mirrorAt(line), second .getStartPoint().mirrorAt(line), second .getEndPoint().mirrorAt(line)); } }
3e1bf56e9e190fa7b52b4a5e911d8db64578068a
5,502
java
Java
src/QLearning.java
AlexPelaez/Artificial-Intelligence-Reinforcement-Learning-Racetrack
b2a4797b329035fd83b36ebb7435154ae1b45218
[ "MIT" ]
null
null
null
src/QLearning.java
AlexPelaez/Artificial-Intelligence-Reinforcement-Learning-Racetrack
b2a4797b329035fd83b36ebb7435154ae1b45218
[ "MIT" ]
null
null
null
src/QLearning.java
AlexPelaez/Artificial-Intelligence-Reinforcement-Learning-Racetrack
b2a4797b329035fd83b36ebb7435154ae1b45218
[ "MIT" ]
null
null
null
39.869565
125
0.502363
11,852
import java.util.ArrayList; /** * Created by Alex on 4/25/20. */ public class QLearning extends LearningBase { private char[][] track; private double[][][][][] q; private Action[] actions; double learningRate = .3; double dr = .85; int reward = -1; int maxSteps = 500; int wallMode = 0; int numberOfCompletions = 0; /** * Parameters: * char[][] track: data structure representing the track * * loadEvidence: Loads evidence into the Q-Learning algorithm * */ public void loadTrack(char[][] track){ this.track = track; } /** * Parameters: * int numberOfEpisodes: How many times the learning process should iterate * int wallMode: if colliding with a wall sends the agent back to the start * * startLearning: begins Q-Learning process * */ public void startLearning(int numberOfEpisodes, int wallMode){ q = new double[track.length][track[0].length][11][11][9]; ArrayList<int[]> startIndexes = findStartIndices(track); ArrayList<int[]> finishIndexes = findFinishIndices(track); q = initializeQ(track, q); actions = initializeActions(); for (int e = 0; e < numberOfEpisodes; e++) { // run the number of episodes boolean crossedFinish = false; int randomStart = (int)(Math.random()*startIndexes.size()); QCar car = new QCar(startIndexes.get(randomStart)[0], startIndexes.get(randomStart)[1], track); int steps = 0; while(crossedFinish == false){ // keep going until car hits finish line steps++; if(steps == maxSteps){ System.out.println("Failed"); break; } int currentCarI = car.getI(); int currentCarJ = car.getJ(); int currentCarIVel = car.getiVel(); int currentCarJVel = car.getjVel(); if(currentCarIVel < 0){ currentCarIVel = (-1)*currentCarIVel+5; } if(currentCarJVel < 0){ currentCarJVel = (-1)*currentCarJVel+5; } // grab the best action int actionToTake = findBestAction(q, currentCarI, currentCarJ, currentCarIVel, currentCarJVel); double probability = Math.random(); if(probability >= 0.7){ actionToTake = (int)(Math.random()*9); } int taken = car.takeAction(actions[actionToTake]); // if move was not taken because if(taken != 0){ q[currentCarI][currentCarJ][currentCarIVel][currentCarIVel][actionToTake] = 0; } if(taken == -1 && wallMode == -1) { // 33 if (e > 10000){ car.setI(9); car.setJ(20); } else if (e > 50000){ car.setI(startIndexes.get(randomStart)[0]); car.setJ(startIndexes.get(randomStart)[1]); } else { car.setI(9); car.setJ(27); } car.setIVel(0); car.setJVel(0); q[currentCarI][currentCarJ][currentCarIVel][currentCarIVel][actionToTake] = 0; } else if (taken == -1) { car.setIVel(0); car.setJVel(0); q[currentCarI][currentCarJ][currentCarIVel][currentCarIVel][actionToTake] = 0; } else { int tempCurrentCarIVel = car.getiVel(); int tempCurrentCarJVel = car.getjVel(); if(tempCurrentCarIVel < 0){ tempCurrentCarIVel = (-1)*tempCurrentCarIVel+5; } if(tempCurrentCarJVel < 0){ tempCurrentCarJVel = (-1)*tempCurrentCarJVel+5; } q[currentCarI][currentCarJ][currentCarIVel][currentCarIVel][actionToTake] = ((1-learningRate)*q[currentCarI][currentCarJ][currentCarIVel] [currentCarIVel][actionToTake])+ learningRate*(reward + dr*(q[car.getI()] [car.getJ()][tempCurrentCarIVel][tempCurrentCarJVel] [findBestAction(q, car.getI(), car.getJ(), tempCurrentCarIVel, tempCurrentCarJVel)])); // System.out.println("here "+ q[currentCarI][currentCarJ][currentCarIVel][currentCarIVel][actionToTake]); } // System.out.println("VelocityI: "+car.getiVel()); // System.out.println("VelocityJ: "+car.getjVel()); // printTrack(car.getI(), car.getJ()); if(track[car.getI()][car.getJ()] == 'F') { // printTrack(track, car.getI(), car.getJ()); crossedFinish = true; System.out.println("were finished!"); numberOfCompletions++; } } } System.out.println("We completed the track # of times : " + numberOfCompletions); } /** * * getModel: Returns the learned model * * Returns: * double[][][][][]: the model Q */ public double[][][][][] getModel(){ return q; } }
3e1bf5ab8746b0e43354cef20aaba4322ded1e7c
388
java
Java
apsaras/src/main/java/org/apsarasmc/apsaras/event/EventHandler.java
ApsarasMC/Apsaras
8cb6bd2b4f668b8a0d413521f52f050d7bf34274
[ "MIT" ]
2
2021-07-16T08:12:32.000Z
2021-07-30T23:12:20.000Z
apsaras/src/main/java/org/apsarasmc/apsaras/event/EventHandler.java
ApsarasMC/Apsaras
8cb6bd2b4f668b8a0d413521f52f050d7bf34274
[ "MIT" ]
null
null
null
apsaras/src/main/java/org/apsarasmc/apsaras/event/EventHandler.java
ApsarasMC/Apsaras
8cb6bd2b4f668b8a0d413521f52f050d7bf34274
[ "MIT" ]
null
null
null
25.866667
46
0.814433
11,853
package org.apsarasmc.apsaras.event; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention (RetentionPolicy.RUNTIME) @Target (ElementType.METHOD) public @interface EventHandler { Order order() default Order.DEFAULT; boolean beforeModifications() default false; }
3e1bf5f3457e4f32399cfee9d841781382ab7f27
2,804
java
Java
src/main/java/de/feffi/jnumber/ValidationException.java
feffi/jNumber
15bd80ff29825f7e3fc27607b5a08dc898a5401d
[ "MIT" ]
null
null
null
src/main/java/de/feffi/jnumber/ValidationException.java
feffi/jNumber
15bd80ff29825f7e3fc27607b5a08dc898a5401d
[ "MIT" ]
null
null
null
src/main/java/de/feffi/jnumber/ValidationException.java
feffi/jNumber
15bd80ff29825f7e3fc27607b5a08dc898a5401d
[ "MIT" ]
null
null
null
26.942308
134
0.714133
11,854
package de.feffi.jnumber; import java.util.ArrayList; import java.util.List; /** * Exception any errors regarding the syntax or semantic. * * @author feffi <upchh@example.com> */ public class ValidationException extends Exception { /** * Default serial version ID. */ private static final long serialVersionUID = 1L; /** * The occured validation errors */ private List<ValidationException> validationErrors = new ArrayList<>(); /** * Default constructor. */ public ValidationException() { super(); } /** * Default constructor. * * @param validationErrors The validation exceptions causes. */ public ValidationException(final List<ValidationException> validationErrors) { super(); this.validationErrors = validationErrors; } /** * @param exceptionMessage The message of the failed validation. */ public ValidationException(final String exceptionMessage) { super(exceptionMessage); } /** * @param exceptionMessage The message of the failed validation. * @param validationErrors The validation exceptions causes. */ public ValidationException(final String exceptionMessage, final List<ValidationException> validationErrors) { super(exceptionMessage); this.validationErrors = validationErrors; } /** * @param exceptionMessage The message of the failed validation. * @param cause The validation exceptions cause. */ public ValidationException(final String exceptionMessage, final Throwable cause) { super(exceptionMessage, cause); } /** * @param exceptionMessage The message of the failed validation. * @param cause The validation exceptions cause. * @param validationErrors The validation exceptions causes. */ public ValidationException(final String exceptionMessage, final Throwable cause, final List<ValidationException> validationErrors) { super(exceptionMessage, cause); this.validationErrors = validationErrors; } /** * @param cause The validation exceptions cause. */ public ValidationException(final Throwable cause) { super(cause); } /** * @param cause The validation exceptions cause. * @param validationErrors The validation exceptions causes. */ public ValidationException(final Throwable cause, final List<ValidationException> validationErrors) { super(cause); this.validationErrors = validationErrors; } /** * @return The validation errors. */ public List<ValidationException> getValidationErrors() { return this.validationErrors; } /** * @param validationErrors The validation errors to set. */ public void setValidationErrors(final List<ValidationException> validationErrors) { this.validationErrors = validationErrors; } }
3e1bf5fe976a2b34af46fbc174ff1bb73bffd41c
1,253
java
Java
pulse-plugin-event-api/src/main/java/com/microfocus/adm/pulse/pluginapi/event/PulseChainRunServiceAware.java
mfrauenhoffer/pulse-java-sdk
603f480be64c1d33ee73146f3a2eab0ec04d272a
[ "MIT" ]
4
2019-03-19T14:32:25.000Z
2020-05-17T09:45:20.000Z
pulse-plugin-event-api/src/main/java/com/microfocus/adm/pulse/pluginapi/event/PulseChainRunServiceAware.java
mfrauenhoffer/pulse-java-sdk
603f480be64c1d33ee73146f3a2eab0ec04d272a
[ "MIT" ]
null
null
null
pulse-plugin-event-api/src/main/java/com/microfocus/adm/pulse/pluginapi/event/PulseChainRunServiceAware.java
mfrauenhoffer/pulse-java-sdk
603f480be64c1d33ee73146f3a2eab0ec04d272a
[ "MIT" ]
3
2019-06-10T11:24:26.000Z
2021-01-24T18:36:48.000Z
30.560976
116
0.681564
11,855
/* * MIT License * * Copyright (c) 2019 Micro Focus or one of its affiliates. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * 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.microfocus.adm.pulse.pluginapi.event; /** * <p> * Plugins implement this interface if they want to be able to get information about Pulse chain runs. * </p> * * @since 19.1.1 */ public interface PulseChainRunServiceAware { /** * <p> * Sets the {@link PulseChainRunService} to use to get information about Pulse chain runs. * </p> * * @param pulseChainRunService * Service that can provide information about Pulse chain runs. * @since 19.1.1 */ void setPulseChainRunService(PulseChainRunService pulseChainRunService); }
3e1bf65e644645af82dc3db0562db534dbd2514e
2,704
java
Java
src/main/java/seedu/address/logic/commands/AddCommand.java
JinHao-L/nuudle
67b8bb543437ea64c4b5c8bb1bdac93fff72620e
[ "MIT" ]
1
2020-09-12T14:14:31.000Z
2020-09-12T14:14:31.000Z
src/main/java/seedu/address/logic/commands/AddCommand.java
JinHao-L/nuudle
67b8bb543437ea64c4b5c8bb1bdac93fff72620e
[ "MIT" ]
148
2020-09-05T14:37:01.000Z
2021-03-03T03:27:08.000Z
src/main/java/seedu/address/logic/commands/AddCommand.java
JinHao-L/tp
67b8bb543437ea64c4b5c8bb1bdac93fff72620e
[ "MIT" ]
5
2020-09-09T15:42:37.000Z
2020-09-19T15:33:42.000Z
36.540541
109
0.667899
11,856
package seedu.address.logic.commands; import static java.util.Objects.requireNonNull; import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS; import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; import static seedu.address.logic.parser.CliSyntax.PREFIX_NRIC; import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE; import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK; import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG; import seedu.address.logic.commands.exceptions.CommandException; import seedu.address.model.Model; import seedu.address.model.patient.Patient; /** * Adds a patient to the patient book. */ public class AddCommand extends Command { public static final String COMMAND_WORD = "add"; public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a patient to the patient book. " + "Parameters: " + PREFIX_NAME + "NAME " + PREFIX_PHONE + "PHONE " + PREFIX_NRIC + "NRIC " + PREFIX_ADDRESS + "ADDRESS " + "[" + PREFIX_REMARK + "REMARK]" + "[" + PREFIX_TAG + "TAG]...\n" + "Example: " + COMMAND_WORD + " " + PREFIX_NAME + "John Doe " + PREFIX_NRIC + "S1234567G " + PREFIX_PHONE + "98765432 " + PREFIX_ADDRESS + "311, Clementi Ave 2, #02-25 " + PREFIX_TAG + "friends " + PREFIX_TAG + "owesMoney"; public static final String MESSAGE_SUCCESS = "New patient added: %1$s"; public static final String MESSAGE_DUPLICATE_PATIENT = "This patient already exists in the patient book"; private final Patient toAdd; /** * Creates an AddCommand to add the specified {@code Patient} */ public AddCommand(Patient patient) { requireNonNull(patient); toAdd = patient; } @Override public CommandResult execute(Model model) throws CommandException { requireNonNull(model); if (model.hasPatient(toAdd)) { throw new CommandException(MESSAGE_DUPLICATE_PATIENT); } model.addPatient(toAdd); model.updateFilteredPatientList(Model.PREDICATE_SHOW_ALL_PATIENTS); model.updateFilteredAppointmentList(Model.PREDICATE_SHOW_ALL_APPOINTMENTS); model.commitPatientBook(); model.commitAppointmentBook(); return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd)); } @Override public boolean equals(Object other) { return other == this // short circuit if same object || (other instanceof AddCommand // instanceof handles nulls && toAdd.equals(((AddCommand) other).toAdd)); } }
3e1bf67c5bdf1f992ac8e22c49f78fc4c72629fb
5,170
java
Java
VLBusTracker/src/main/java/ru/vlbustracker/models/Comment.java
alexsheyko/VL-BusTracker-Android
788aca690e11d21117ffdc5419fd6b31e10c93d8
[ "Apache-2.0" ]
1
2017-05-11T10:04:58.000Z
2017-05-11T10:04:58.000Z
VLBusTracker/src/main/java/ru/vlbustracker/models/Comment.java
alexsheyko/VL-BusTracker-Android
788aca690e11d21117ffdc5419fd6b31e10c93d8
[ "Apache-2.0" ]
null
null
null
VLBusTracker/src/main/java/ru/vlbustracker/models/Comment.java
alexsheyko/VL-BusTracker-Android
788aca690e11d21117ffdc5419fd6b31e10c93d8
[ "Apache-2.0" ]
null
null
null
29.044944
140
0.586847
11,857
package ru.vlbustracker.models; import android.location.Location; import android.util.Log; import com.google.android.gms.maps.model.LatLng; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Comparator; import java.util.Date; import java.util.List; import ru.vlbustracker.activities.MainActivity; import ru.vlbustracker.helpers.BusManager; public class Comment { public static final Comparator<Comment> compare = new Comparator<Comment>() { @Override public int compare(Comment com1, Comment com2) { if (com1.timestamp > com2.timestamp){ return 1; }else if (com1.timestamp < com2.timestamp){ return -1; }else { return 0; } } }; String id; String text; String busId; String busTitle; String busBody; String route; String date; long timestamp; LatLng loc; boolean favorite; boolean hidden; //private long lastUpdateTime; public Comment(String mID, String mText, String mLat, String mLng) { text = cleanName(mText); //loc = new LatLng(Double.parseDouble(mLat), Double.parseDouble(mLng)); id = mID; //routesString = mRoutes; //times = new ArrayList<Time>(); //routes = new ArrayList<Route>(); //otherRoute = ""; //childStops = new ArrayList<Comment>(); } public static String cleanName(String name) { name = name.replaceAll("at", "@"); return name; } public static void parseJSON(JSONObject Json) throws JSONException { JSONArray jComent = new JSONArray(); BusManager sharedManager = BusManager.getBusManager(); if (Json != null) jComent = Json.getJSONArray("comments"); if (MainActivity.LOCAL_LOGV) Log.v(MainActivity.REFACTOR_LOG_TAG, "Parsing # comments: " + jComent.length()); for (int i = 0; i < jComent.length(); i++) { //JSONObject stopObject = jStops.getJSONObject(i); JSONArray item = jComent.getJSONArray(i); if (item.length()>6) { String ID = item.getString(0); String idbus = item.getString(1); String title = item.getString(2); String body = item.getString(3); String route = item.getString(4); String loc = item.getString(5); String time = item.getString(6); String text = item.getString(7); //String stopLat = stopObject.getString(3); //String stopLng = stopObject.getString(2); Comment s = sharedManager.getComment(ID, text, time); s.setValues(ID,text,idbus,title,body,route,loc,time); //Comment s = new Comment(ID, Name, "", ""); } //if (MainActivity.LOCAL_LOGV) Log.v(MainActivity.REFACTOR_LOG_TAG, "Number of stops in manager: " + sharedManager.numStops()); //if (MainActivity.LOCAL_LOGV) Log.v(MainActivity.REFACTOR_LOG_TAG, "___after adding " + s.name); } } public boolean isHidden() { return hidden; } public void setHidden(boolean hidden) { this.hidden = hidden; } public void setValues(String mID, String mText, String midbus, String mtitle, String mbody, String mroute, String mloc, String mtime ) { //if (name.equals("")) name = cleanName(mName); //if (loc == null) loc = new LatLng(Double.parseDouble(mLat), Double.parseDouble(mLng)); id = mID; text = mText; busId = midbus; busTitle = mtitle; busBody = mbody; route = mroute; //loc = mloc; !!need str2loc timestamp = Long.parseLong(mtime); //["5710239819104256","280","49","С043КТ","155","lat/lng: (43.1174487312232,131.882848364423)","1412914794768760","рпч пятница1"], } public LatLng getLocation() { return loc; } public String toString() { return text; } public String getID() { return id; } public String getBusId() { return busId; } public String getText() { return text; } public String getDateStr(){ //141 293 9116-578-090 String str = Long.toString(timestamp); if (str.length()>=16) { str = str.substring(0, str.length() - 3); Date mdate = new Date(Long.parseLong(str)); //return mdate.toString(); return new SimpleDateFormat("HH:mm dd-MM-yyyy").format(mdate); } return new Date().toString(); } public String getBusTxt() { return "" + busTitle + " " + busBody; } public void setName(String name) { this.text = name; } public void setLastUpdateTime(Long time) { //this.lastUpdateTime = time; } /* public Boolean notExpireTime() { //if((System.currentTimeMillis()-lastUpdateTime)>1000*60){ // return false; //}else return true; } */ }
3e1bf68841d8186c62cf25841a215da651feaa23
316
java
Java
storage/src/main/java/org/fkjava/oa/storage/dao/FileDao.java
fkjava/oa
d10e609fa509fadc45368a069ebd79a4f3df54c2
[ "Apache-2.0" ]
null
null
null
storage/src/main/java/org/fkjava/oa/storage/dao/FileDao.java
fkjava/oa
d10e609fa509fadc45368a069ebd79a4f3df54c2
[ "Apache-2.0" ]
null
null
null
storage/src/main/java/org/fkjava/oa/storage/dao/FileDao.java
fkjava/oa
d10e609fa509fadc45368a069ebd79a4f3df54c2
[ "Apache-2.0" ]
null
null
null
19.75
87
0.78481
11,858
package org.fkjava.oa.storage.dao; import java.io.File; import java.io.InputStream; import org.fkjava.oa.storage.domain.FileInfo; public interface FileDao { String save(String name, String contentType, long contentLength, InputStream content); File getFile(FileInfo info); void delete(FileInfo fileInfo); }
3e1bf8c231b157d33d9f5e6e669c37e864d34eed
114
java
Java
JasonXu-BeautyScan/app/src/main/java/com/jasonxu/beautyscan/presenter/BasePresenter.java
ZhebaoXu/JasonXu-BeautyScan
f9a62f531879f00476d4c35d864b016ab1e8254b
[ "Apache-2.0" ]
null
null
null
JasonXu-BeautyScan/app/src/main/java/com/jasonxu/beautyscan/presenter/BasePresenter.java
ZhebaoXu/JasonXu-BeautyScan
f9a62f531879f00476d4c35d864b016ab1e8254b
[ "Apache-2.0" ]
null
null
null
JasonXu-BeautyScan/app/src/main/java/com/jasonxu/beautyscan/presenter/BasePresenter.java
ZhebaoXu/JasonXu-BeautyScan
f9a62f531879f00476d4c35d864b016ab1e8254b
[ "Apache-2.0" ]
null
null
null
14.25
41
0.710526
11,859
package com.jasonxu.beautyscan.presenter; /** * Created by t_xuz on 6/26/16. */ public class BasePresenter { }
3e1bf8c6b6846a4693eb6a8a35a13419e90b3653
830
java
Java
gui/src/main/java/org/jemiahlabs/skrls/view/main/MainViewController.java
NetKVN-Reversing/SKRLS
e5f23b5957c36f66bc05656a59904da3cb6f2693
[ "Apache-2.0" ]
null
null
null
gui/src/main/java/org/jemiahlabs/skrls/view/main/MainViewController.java
NetKVN-Reversing/SKRLS
e5f23b5957c36f66bc05656a59904da3cb6f2693
[ "Apache-2.0" ]
1
2019-05-25T18:46:48.000Z
2019-05-25T18:46:48.000Z
gui/src/main/java/org/jemiahlabs/skrls/view/main/MainViewController.java
jemiah-labs/SKRLS
e5f23b5957c36f66bc05656a59904da3cb6f2693
[ "Apache-2.0" ]
null
null
null
34.583333
78
0.822892
11,860
package org.jemiahlabs.skrls.view.main; import java.util.List; import java.util.Queue; import org.jemiahlabs.skrls.context.Plugin; import org.jemiahlabs.skrls.view.main.context.Configuration; import org.jemiahlabs.skrls.view.base.PrincipalWindow; import org.jemiahlabs.skrls.view.base.javafxwindows.StageController; public interface MainViewController extends StageController, PrincipalWindow { void showMessage(String title, String text, Runnable action); void showProgress(); void hiddenProgress(); void updateInfoMessages(String title, String message); void updateWarningMessages(String title, String message); void appendMessageToConsole(String topic, String newMessage); void clearConsole(); void loadLastConfiguration(Queue<Configuration> configurations); void updateTargetLanguages(List<Plugin> plugins); }
3e1bfa4a02e1acbf4fdf00b74cccaa3945c56af5
744
java
Java
app/src/main/java/com/apollo29/ahoy/repository/CSVRepository.java
tdascoli/ahoy
be976ef10b2428c9a9ee3ff0c64cc88dd9bc26e4
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/apollo29/ahoy/repository/CSVRepository.java
tdascoli/ahoy
be976ef10b2428c9a9ee3ff0c64cc88dd9bc26e4
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/apollo29/ahoy/repository/CSVRepository.java
tdascoli/ahoy
be976ef10b2428c9a9ee3ff0c64cc88dd9bc26e4
[ "Apache-2.0" ]
null
null
null
28.615385
114
0.681452
11,861
package com.apollo29.ahoy.repository; import com.opencsv.CSVWriter; import com.orhanobut.logger.Logger; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import java.util.List; public class CSVRepository { private final static String[] FOOTER = new String[]{"List generated by Ahoy! App -"}; // todo add link to app public static void csv(OutputStream file, String[] header, List<String[]> data) throws IOException { Logger.d("csv output"); Logger.d(data); CSVWriter writer=null; writer = new CSVWriter(new PrintWriter(file), ','); writer.writeNext(header); writer.writeAll(data); writer.writeNext(FOOTER); writer.close(); } }
3e1bfa56c0e5b87a9161b11edb122b5e9b0652ab
1,086
java
Java
euphoria-core/src/main/java/cz/seznam/euphoria/core/client/operator/WindowingRequiredException.java
seznam/euphoria
deaa8c80e05a58cc3cd28103c24d65088e5d30bc
[ "ECL-2.0", "Apache-2.0" ]
85
2017-01-31T12:03:20.000Z
2022-02-24T14:23:48.000Z
euphoria-core/src/main/java/cz/seznam/euphoria/core/client/operator/WindowingRequiredException.java
seznam/euphoria
deaa8c80e05a58cc3cd28103c24d65088e5d30bc
[ "ECL-2.0", "Apache-2.0" ]
191
2017-01-31T13:49:32.000Z
2020-09-01T11:58:23.000Z
euphoria-core/src/main/java/cz/seznam/euphoria/core/client/operator/WindowingRequiredException.java
seznam/euphoria
deaa8c80e05a58cc3cd28103c24d65088e5d30bc
[ "ECL-2.0", "Apache-2.0" ]
18
2017-02-03T17:30:41.000Z
2021-01-29T23:25:05.000Z
36.2
87
0.760589
11,862
/* * Copyright 2016-2020 Seznam.cz, a.s. * * 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 cz.seznam.euphoria.core.client.operator; import cz.seznam.euphoria.core.annotation.audience.Audience; /** * Thrown by executors at flow submission time when an invalid flow set up is detected, * requiring the user to explicitly provide a windowing strategy to a certain operator. */ @Audience(Audience.Type.EXECUTOR) public class WindowingRequiredException extends IllegalStateException { public WindowingRequiredException(String message) { super(message); } }
3e1bfa7d2bfdca8facf09310f22d06906284ce31
3,272
java
Java
src/main/java/xyz/deszaras/grounds/command/actor/GetActorCommand.java
bhavanki/grounds
13958d843c5052d036290b4fe0dfd5a07e6a8b97
[ "MIT" ]
3
2021-05-05T07:11:43.000Z
2022-03-27T01:56:36.000Z
src/main/java/xyz/deszaras/grounds/command/actor/GetActorCommand.java
bhavanki/grounds
13958d843c5052d036290b4fe0dfd5a07e6a8b97
[ "MIT" ]
32
2020-05-24T23:29:34.000Z
2022-01-15T19:38:52.000Z
src/main/java/xyz/deszaras/grounds/command/actor/GetActorCommand.java
bhavanki/grounds
13958d843c5052d036290b4fe0dfd5a07e6a8b97
[ "MIT" ]
null
null
null
35.956044
81
0.679707
11,863
package xyz.deszaras.grounds.command.actor; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.UUID; import org.fusesource.jansi.Ansi; import xyz.deszaras.grounds.auth.Role; import xyz.deszaras.grounds.command.Actor; import xyz.deszaras.grounds.command.ActorCommand; import xyz.deszaras.grounds.command.Command; import xyz.deszaras.grounds.command.CommandException; import xyz.deszaras.grounds.command.CommandFactoryException; import xyz.deszaras.grounds.command.PermittedRoles; import xyz.deszaras.grounds.model.Player; import xyz.deszaras.grounds.model.Universe; import xyz.deszaras.grounds.server.ActorDatabase; import xyz.deszaras.grounds.server.ActorDatabase.ActorRecord; import xyz.deszaras.grounds.util.AnsiUtils; /** * Gets an existing actor.<p> * * Arguments: username */ @PermittedRoles(roles = { Role.ADEPT, Role.THAUMATURGE }) public class GetActorCommand extends Command<String> { private final String username; public GetActorCommand(Actor actor, Player player, String username) { super(actor, player); this.username = Objects.requireNonNull(username); } @Override protected String executeImpl() throws CommandException { ActorCommand.checkIfRoot(player, username); Optional<ActorRecord> actorRecord = ActorDatabase.INSTANCE.getActorRecord(username); if (actorRecord.isPresent()) { return formatDetails(actorRecord.get()); } else { throw new CommandException("I could not find the actor named " + username); } } private static String formatDetails(ActorRecord r) { StringBuilder b = new StringBuilder(); b.append(AnsiUtils.color("Username: ", Ansi.Color.CYAN, false)) .append(r.getUsername()).append("\n"); b.append(AnsiUtils.color("Players:\n", Ansi.Color.CYAN, false)); for (UUID id : r.getPlayers()) { Optional<Player> p = Universe.getCurrent().getThing(id, Player.class); if (p.isPresent()) { b.append(" ").append(AnsiUtils.listing(p.get(), true)).append("\n"); } else { b.append(" ??? [").append(id.toString()).append("]\n"); } } b.append(AnsiUtils.color("Last IP: ", Ansi.Color.CYAN, false)) .append(r.getMostRecentIPAddress()).append("\n"); b.append(AnsiUtils.color("Last login time: ", Ansi.Color.CYAN, false)) .append(r.getLastLoginTime()).append("\n"); if (r.getLockedUntil() == null) { b.append(AnsiUtils.color("Unlocked\n", Ansi.Color.GREEN, false)); } else { b.append(AnsiUtils.color("Locked until: ", Ansi.Color.RED, false)) .append(r.getLockedUntil()).append("\n"); } if (r.getPreferences().size() > 0) { b.append(AnsiUtils.color("Preferences:", Ansi.Color.CYAN, false)); for (Map.Entry<String, String> e : r.getPreferences().entrySet()) { b.append("\n ").append(e.getKey()).append(" = ").append(e.getValue()) .append("\n"); } } return b.toString(); } public static GetActorCommand newCommand(Actor actor, Player player, List<String> commandArgs) throws CommandFactoryException { return new GetActorCommand(actor, player, commandArgs.get(0)); } }
3e1bfb078ee0b41dde4d89057749454ae2e0f576
2,614
java
Java
presto-hive/src/main/java/com/facebook/presto/hive/PartitionStatistics.java
kkorir/prestodb
e3fb5dcd3eecff93eb49f3fe44c6741c1cd6b793
[ "Apache-2.0" ]
6
2018-07-14T15:22:37.000Z
2021-08-10T18:54:14.000Z
presto-hive/src/main/java/com/facebook/presto/hive/PartitionStatistics.java
kkorir/prestodb
e3fb5dcd3eecff93eb49f3fe44c6741c1cd6b793
[ "Apache-2.0" ]
4
2017-07-03T08:24:45.000Z
2022-02-16T01:12:39.000Z
presto-hive/src/main/java/com/facebook/presto/hive/PartitionStatistics.java
kkorir/prestodb
e3fb5dcd3eecff93eb49f3fe44c6741c1cd6b793
[ "Apache-2.0" ]
15
2018-06-30T06:08:19.000Z
2021-09-07T06:55:38.000Z
30.752941
141
0.693956
11,864
/* * 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.facebook.presto.hive; import com.facebook.presto.hive.metastore.HiveColumnStatistics; import com.google.common.collect.ImmutableMap; import java.util.Map; import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; public class PartitionStatistics { private static final PartitionStatistics EMPTY = new PartitionStatistics(HiveBasicStatistics.createEmptyStatistics(), ImmutableMap.of()); private final HiveBasicStatistics basicStatistics; private final Map<String, HiveColumnStatistics> columnStatistics; public static PartitionStatistics empty() { return EMPTY; } public PartitionStatistics( HiveBasicStatistics basicStatistics, Map<String, HiveColumnStatistics> columnStatistics) { this.basicStatistics = requireNonNull(basicStatistics, "basicStatistics is null"); this.columnStatistics = ImmutableMap.copyOf(requireNonNull(columnStatistics, "columnStatistics can not be null")); } public HiveBasicStatistics getBasicStatistics() { return basicStatistics; } public Map<String, HiveColumnStatistics> getColumnStatistics() { return columnStatistics; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PartitionStatistics that = (PartitionStatistics) o; return Objects.equals(basicStatistics, that.basicStatistics) && Objects.equals(columnStatistics, that.columnStatistics); } @Override public int hashCode() { return Objects.hash(basicStatistics, columnStatistics); } @Override public String toString() { return toStringHelper(this) .add("basicStatistics", basicStatistics) .add("columnStatistics", columnStatistics) .toString(); } }
3e1bfbefbca0150b0fcf25e5cca046a35281b31f
156
java
Java
src/main/java/jibe/tools/bdd/api/ExecutionsHolder.java
joachimbjorklund/jibe-tools-bdd
36eda99753226d14f28ebf7f979adc69a5325b5d
[ "Apache-2.0" ]
null
null
null
src/main/java/jibe/tools/bdd/api/ExecutionsHolder.java
joachimbjorklund/jibe-tools-bdd
36eda99753226d14f28ebf7f979adc69a5325b5d
[ "Apache-2.0" ]
null
null
null
src/main/java/jibe/tools/bdd/api/ExecutionsHolder.java
joachimbjorklund/jibe-tools-bdd
36eda99753226d14f28ebf7f979adc69a5325b5d
[ "Apache-2.0" ]
null
null
null
14.181818
55
0.717949
11,865
package jibe.tools.bdd.api; import java.util.List; /** * */ public interface ExecutionsHolder extends Descriptive { List<Execution> executions(); }
3e1bfc180ad7d54b8bdbcb25db887a0f0ffab5e1
1,377
java
Java
Exercice11/app/src/main/java/com/poec/exercice11/model/Data.java
pierreduchemin/poec-android-03-2017
aa77c1c13996ac4c6f0cebdbb9e95e698bebbb00
[ "Apache-2.0" ]
1
2017-03-10T08:06:58.000Z
2017-03-10T08:06:58.000Z
Exercice11/app/src/main/java/com/poec/exercice11/model/Data.java
pierreduchemin/poec-android-03-2017
aa77c1c13996ac4c6f0cebdbb9e95e698bebbb00
[ "Apache-2.0" ]
null
null
null
Exercice11/app/src/main/java/com/poec/exercice11/model/Data.java
pierreduchemin/poec-android-03-2017
aa77c1c13996ac4c6f0cebdbb9e95e698bebbb00
[ "Apache-2.0" ]
null
null
null
18.863014
62
0.602033
11,866
package com.poec.exercice11.model; public class Data { private String location; private String temperature; private String skytext; private String humidity; private String wind; private String date; private String day; public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public String getTemperature() { return temperature; } public void setTemperature(String temperature) { this.temperature = temperature; } public String getSkytext() { return skytext; } public void setSkytext(String skytext) { this.skytext = skytext; } public String getHumidity() { return humidity; } public void setHumidity(String humidity) { this.humidity = humidity; } public String getWind() { return wind; } public void setWind(String wind) { this.wind = wind; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getDay() { return day; } public void setDay(String day) { this.day = day; } public double getCelciusTemperature() { return (Integer.valueOf(getTemperature()) - 32) / 1.8; } }
3e1bfc797502a20f42fdd676aa9003bc165e8e95
2,272
java
Java
FormApp/src/java/package1/MyFilter.java
riteshkukreja/Spring-Training
c55823926baae0b0b88ecf6d4afc942705931430
[ "MIT" ]
null
null
null
FormApp/src/java/package1/MyFilter.java
riteshkukreja/Spring-Training
c55823926baae0b0b88ecf6d4afc942705931430
[ "MIT" ]
null
null
null
FormApp/src/java/package1/MyFilter.java
riteshkukreja/Spring-Training
c55823926baae0b0b88ecf6d4afc942705931430
[ "MIT" ]
null
null
null
31.555556
138
0.704665
11,867
/* * 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 package1; import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; import java.io.StringWriter; import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Map; import java.util.Set; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; /** * * @author admin */ public class MyFilter implements Filter { private static final boolean debug = false; // The filter configuration object we are associated with. If // this value is null, this filter instance is not currently // configured. public MyFilter() { } /** * * @param request The servlet request we are processing * @param response The servlet response we are creating * @param chain The filter chain we are processing * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { request.setAttribute("message", "Filter tested!"); chain.doFilter(request, response); } @Override public void init(FilterConfig filterConfig) throws ServletException { //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } @Override public void destroy() { //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } }
3e1bfd0938d76411047406b7b0a55eecb5b4f2ed
3,011
java
Java
iti-iha-project/iti-iha-oauth2/src/test/java/org/lan/iti/iha/oauth2/AccessTokenHelperTest.java
crazy6995/iTi-Framework
6adb8b1c38de6a47998feabc02a6d7ca9806968d
[ "Apache-2.0" ]
null
null
null
iti-iha-project/iti-iha-oauth2/src/test/java/org/lan/iti/iha/oauth2/AccessTokenHelperTest.java
crazy6995/iTi-Framework
6adb8b1c38de6a47998feabc02a6d7ca9806968d
[ "Apache-2.0" ]
null
null
null
iti-iha-project/iti-iha-oauth2/src/test/java/org/lan/iti/iha/oauth2/AccessTokenHelperTest.java
crazy6995/iTi-Framework
6adb8b1c38de6a47998feabc02a6d7ca9806968d
[ "Apache-2.0" ]
null
null
null
42.408451
512
0.648622
11,868
/* * * * Copyright (c) [2019-2021] [NorthLan](efpyi@example.com) * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * */ package org.lan.iti.iha.oauth2; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.lan.iti.iha.oauth2.token.AccessToken; import org.lan.iti.iha.oauth2.token.AccessTokenHelper; import java.util.HashMap; import java.util.Map; /** * @author NorthLan * @date 2021/8/16 * @url https://blog.noahlan.com */ public class AccessTokenHelperTest { private AccessToken accessToken; private Map<String, Object> accessTokenMap; private String accessTokenStr = "{\"access_token\":\"accessToken\",\"refresh_token\":\"refreshToken\",\"id_token\":\"idToken\",\"token_type\":\"tokenType\",\"expires_in\":12,\"refresh_token_expires_in\":12,\"id_token_expires_in\":12,\"scope\":\"openid\",\"uid\":\"123123\",\"user_id\":null,\"open_id\":null,\"access_code\":null,\"union_id\":null,\"mac_algorithm\":null,\"mac_key\":null,\"code\":null,\"oauth_token\":null,\"oauth_token_secret\":null,\"screen_name\":null,\"oauth_callback_confirmed\":false}"; @BeforeEach public void setUp() { accessToken = AccessToken.builder() .accessToken("accessToken") .refreshToken("refreshToken") .idToken("idToken") .tokenType("tokenType") .expiresIn(12L) .refreshTokenExpiresIn(12L) .idTokenExpiresIn(12L) .scope("openid") .build(); accessTokenMap = new HashMap<>(); accessTokenMap.put("access_token", "accessToken"); accessTokenMap.put("refresh_token", "refreshToken"); accessTokenMap.put("id_token", "idToken"); accessTokenMap.put("token_type", "tokenType"); accessTokenMap.put("expires_in", 12L); accessTokenMap.put("refresh_token_expires_in", 12L); accessTokenMap.put("id_token_expires_in", 12L); accessTokenMap.put("scope", "openid"); accessTokenMap.put("uid", "123123"); } @Test public void test() { System.out.println(AccessTokenHelper.toMap(accessToken)); System.out.println(AccessTokenHelper.toJsonString(accessToken)); System.out.println(AccessTokenHelper.toAccessToken(accessTokenMap)); System.out.println(AccessTokenHelper.toAccessToken(accessTokenStr)); } }
3e1bfd2c2a2327f75625c1d7d3a5e1f69717fc42
902
java
Java
src/test/java/pageObjects/pages/DashboardPageObjects.java
ryallurkar/SumUp
2846267a27bc181079f071099beae188d611a56b
[ "Apache-2.0" ]
null
null
null
src/test/java/pageObjects/pages/DashboardPageObjects.java
ryallurkar/SumUp
2846267a27bc181079f071099beae188d611a56b
[ "Apache-2.0" ]
null
null
null
src/test/java/pageObjects/pages/DashboardPageObjects.java
ryallurkar/SumUp
2846267a27bc181079f071099beae188d611a56b
[ "Apache-2.0" ]
null
null
null
29.096774
88
0.796009
11,869
package pageObjects.pages; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import io.qameta.allure.Step; import pageObjects.initializePageObjects.PageFactoryInitializer; import utils.ExplicitWaiting; public class DashboardPageObjects extends PageFactoryInitializer { @FindBy(css = "a[title=\"Transactions\"]") private WebElement transactions; @FindBy(xpath = "//h2[text()=\"We couldn’t find anything that matches your search.\"]") private WebElement noTransaction; @Step("Click Transaction") public void clickTransactions() throws Exception { ExplicitWaiting.explicitWaitElementToBeClickable(transactions, 30); ExplicitWaiting.explicitWaitVisibilityOfElement(transactions, 30); transactions.click(); } @Step("Verify no transactions available ") public boolean verifyNoTransactions() throws Exception { return noTransaction.isDisplayed(); } }
3e1bfd399a8b1dc52688fa83efcbee336d1e78ef
500
java
Java
cloud-reactor-api/src/main/java/com/sequenceiq/cloudbreak/cloud/event/credential/InitCodeGrantFlowRequest.java
drorke/cloudbreak
8a1d4749fe9d1d683f5bec3102e8b86f59928f67
[ "Apache-2.0" ]
174
2017-07-14T03:20:42.000Z
2022-03-25T05:03:18.000Z
cloud-reactor-api/src/main/java/com/sequenceiq/cloudbreak/cloud/event/credential/InitCodeGrantFlowRequest.java
drorke/cloudbreak
8a1d4749fe9d1d683f5bec3102e8b86f59928f67
[ "Apache-2.0" ]
2,242
2017-07-12T05:52:01.000Z
2022-03-31T15:50:08.000Z
cloud-reactor-api/src/main/java/com/sequenceiq/cloudbreak/cloud/event/credential/InitCodeGrantFlowRequest.java
drorke/cloudbreak
8a1d4749fe9d1d683f5bec3102e8b86f59928f67
[ "Apache-2.0" ]
172
2017-07-12T08:53:48.000Z
2022-03-24T12:16:33.000Z
38.461538
97
0.838
11,870
package com.sequenceiq.cloudbreak.cloud.event.credential; import com.sequenceiq.cloudbreak.cloud.context.CloudContext; import com.sequenceiq.cloudbreak.cloud.event.CloudPlatformRequest; import com.sequenceiq.cloudbreak.cloud.model.CloudCredential; public class InitCodeGrantFlowRequest extends CloudPlatformRequest<InitCodeGrantFlowResponse> { public InitCodeGrantFlowRequest(CloudContext cloudContext, CloudCredential cloudCredential) { super(cloudContext, cloudCredential); } }
3e1bfe27fa7322e7ef755705172f85dff111d2e7
9,518
java
Java
aws-java-sdk-backup/src/main/java/com/amazonaws/services/backup/model/ListRecoveryPointsByResourceRequest.java
phambryan/aws-sdk-for-java
0f75a8096efdb4831da8c6793390759d97a25019
[ "Apache-2.0" ]
3,372
2015-01-03T00:35:43.000Z
2022-03-31T15:56:24.000Z
aws-java-sdk-backup/src/main/java/com/amazonaws/services/backup/model/ListRecoveryPointsByResourceRequest.java
phambryan/aws-sdk-for-java
0f75a8096efdb4831da8c6793390759d97a25019
[ "Apache-2.0" ]
2,391
2015-01-01T12:55:24.000Z
2022-03-31T08:01:50.000Z
aws-java-sdk-backup/src/main/java/com/amazonaws/services/backup/model/ListRecoveryPointsByResourceRequest.java
phambryan/aws-sdk-for-java
0f75a8096efdb4831da8c6793390759d97a25019
[ "Apache-2.0" ]
2,876
2015-01-01T14:38:37.000Z
2022-03-29T19:53:10.000Z
34.737226
131
0.619983
11,871
/* * Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.backup.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByResource" * target="_top">AWS API Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ListRecoveryPointsByResourceRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** * <p> * An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type. * </p> */ private String resourceArn; /** * <p> * The next item following a partial list of returned items. For example, if a request is made to return * <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list * starting at the location pointed to by the next token. * </p> */ private String nextToken; /** * <p> * The maximum number of items to be returned. * </p> * <note> * <p> * Amazon RDS requires a value of at least 20. * </p> * </note> */ private Integer maxResults; /** * <p> * An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type. * </p> * * @param resourceArn * An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type. */ public void setResourceArn(String resourceArn) { this.resourceArn = resourceArn; } /** * <p> * An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type. * </p> * * @return An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type. */ public String getResourceArn() { return this.resourceArn; } /** * <p> * An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type. * </p> * * @param resourceArn * An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type. * @return Returns a reference to this object so that method calls can be chained together. */ public ListRecoveryPointsByResourceRequest withResourceArn(String resourceArn) { setResourceArn(resourceArn); return this; } /** * <p> * The next item following a partial list of returned items. For example, if a request is made to return * <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list * starting at the location pointed to by the next token. * </p> * * @param nextToken * The next item following a partial list of returned items. For example, if a request is made to return * <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your * list starting at the location pointed to by the next token. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** * <p> * The next item following a partial list of returned items. For example, if a request is made to return * <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list * starting at the location pointed to by the next token. * </p> * * @return The next item following a partial list of returned items. For example, if a request is made to return * <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your * list starting at the location pointed to by the next token. */ public String getNextToken() { return this.nextToken; } /** * <p> * The next item following a partial list of returned items. For example, if a request is made to return * <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list * starting at the location pointed to by the next token. * </p> * * @param nextToken * The next item following a partial list of returned items. For example, if a request is made to return * <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your * list starting at the location pointed to by the next token. * @return Returns a reference to this object so that method calls can be chained together. */ public ListRecoveryPointsByResourceRequest withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** * <p> * The maximum number of items to be returned. * </p> * <note> * <p> * Amazon RDS requires a value of at least 20. * </p> * </note> * * @param maxResults * The maximum number of items to be returned.</p> <note> * <p> * Amazon RDS requires a value of at least 20. * </p> */ public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } /** * <p> * The maximum number of items to be returned. * </p> * <note> * <p> * Amazon RDS requires a value of at least 20. * </p> * </note> * * @return The maximum number of items to be returned.</p> <note> * <p> * Amazon RDS requires a value of at least 20. * </p> */ public Integer getMaxResults() { return this.maxResults; } /** * <p> * The maximum number of items to be returned. * </p> * <note> * <p> * Amazon RDS requires a value of at least 20. * </p> * </note> * * @param maxResults * The maximum number of items to be returned.</p> <note> * <p> * Amazon RDS requires a value of at least 20. * </p> * @return Returns a reference to this object so that method calls can be chained together. */ public ListRecoveryPointsByResourceRequest withMaxResults(Integer maxResults) { setMaxResults(maxResults); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getResourceArn() != null) sb.append("ResourceArn: ").append(getResourceArn()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getMaxResults() != null) sb.append("MaxResults: ").append(getMaxResults()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListRecoveryPointsByResourceRequest == false) return false; ListRecoveryPointsByResourceRequest other = (ListRecoveryPointsByResourceRequest) obj; if (other.getResourceArn() == null ^ this.getResourceArn() == null) return false; if (other.getResourceArn() != null && other.getResourceArn().equals(this.getResourceArn()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getMaxResults() == null ^ this.getMaxResults() == null) return false; if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceArn() == null) ? 0 : getResourceArn().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); return hashCode; } @Override public ListRecoveryPointsByResourceRequest clone() { return (ListRecoveryPointsByResourceRequest) super.clone(); } }
3e1bfe28dd268848d894240861e51936b1861128
1,033
java
Java
app/src/main/java/pl/brightinventions/slf4android/MessageValueSupplier.java
bright/slf4android
d44662bb7f103c65ffb21eca5f8a0c2f8aa7a9c5
[ "MIT" ]
58
2015-01-16T12:15:15.000Z
2022-03-15T09:29:36.000Z
app/src/main/java/pl/brightinventions/slf4android/MessageValueSupplier.java
bright/slf4android
d44662bb7f103c65ffb21eca5f8a0c2f8aa7a9c5
[ "MIT" ]
12
2015-03-06T21:52:46.000Z
2019-11-02T15:32:16.000Z
app/src/main/java/pl/brightinventions/slf4android/MessageValueSupplier.java
bright/slf4android
d44662bb7f103c65ffb21eca5f8a0c2f8aa7a9c5
[ "MIT" ]
13
2015-07-01T05:02:36.000Z
2021-06-21T09:07:36.000Z
35.62069
116
0.696031
11,872
package pl.brightinventions.slf4android; import org.slf4j.helpers.FormattingTuple; import org.slf4j.helpers.MessageFormatter; import java.io.PrintWriter; import java.io.StringWriter; public class MessageValueSupplier implements LoggerPatternValueSupplier { @SuppressWarnings("ThrowableResultOfMethodCallIgnored") @Override public void append(LogRecord record, StringBuilder builder) { FormattingTuple formattingTuple = MessageFormatter.arrayFormat(record.getMessage(), record.getParameters()); String message = formattingTuple.getMessage(); Throwable throwable = formattingTuple.getThrowable(); if (throwable != null) { StringWriter writer = new StringWriter(100); PrintWriter printWriter = new PrintWriter(writer); throwable.printStackTrace(printWriter); printWriter.flush(); printWriter.close(); writer.flush(); message += " " + writer.toString(); } builder.append(message); } }
3e1bfedeeabd9e4e69b33e3e3d2728fb506f1c3b
950
java
Java
example/src/test/java/com/capgemini/mrchecker/selenium/projectX/navigationbar/NavigationBarTest.java
jambulud/devonfw-testing
8a38fb5c2d0904bdf0ec71e4686b3b4746714b27
[ "Apache-2.0" ]
null
null
null
example/src/test/java/com/capgemini/mrchecker/selenium/projectX/navigationbar/NavigationBarTest.java
jambulud/devonfw-testing
8a38fb5c2d0904bdf0ec71e4686b3b4746714b27
[ "Apache-2.0" ]
null
null
null
example/src/test/java/com/capgemini/mrchecker/selenium/projectX/navigationbar/NavigationBarTest.java
jambulud/devonfw-testing
8a38fb5c2d0904bdf0ec71e4686b3b4746714b27
[ "Apache-2.0" ]
null
null
null
23.75
85
0.758947
11,873
package com.capgemini.mrchecker.selenium.projectX.navigationbar; import com.capgemini.mrchecker.selenium.pages.projectX.MainPage; import com.capgemini.mrchecker.selenium.pages.projectX.navigationbar.home.NavBarHome; import com.capgemini.mrchecker.test.core.BaseTest; import com.capgemini.mrchecker.test.core.logger.BFLogger; import org.junit.Test; import static org.junit.Assert.assertTrue; public class NavigationBarTest extends BaseTest { @Test public void test() { BFLogger.logInfo("[Step 1] Open main page"); MainPage mainPage = new MainPage(); BFLogger.logInfo("[Step 2] Click navigation bar - Home"); mainPage.getNavigationBar() .clickNavBarHome(); BFLogger.logInfo("[Step 3] Verify if main page is opened"); assertTrue(new NavBarHome(mainPage).isLoaded()); } @Override public void setUp() { // TODO Auto-generated method stub } @Override public void tearDown() { // TODO Auto-generated method stub } }
3e1c0136f8c226cc458de8f63db63a4e929c96b1
947
java
Java
container/openejb-core/src/main/java/org/apache/openejb/core/cmp/KeyGenerator.java
gerwinjansen/tomee
4763c8131acffbc7f212d4944d9dea044ab14375
[ "Apache-2.0" ]
378
2015-01-14T09:51:24.000Z
2022-03-26T05:26:01.000Z
container/openejb-core/src/main/java/org/apache/openejb/core/cmp/KeyGenerator.java
gerwinjansen/tomee
4763c8131acffbc7f212d4944d9dea044ab14375
[ "Apache-2.0" ]
393
2015-11-16T08:44:15.000Z
2022-03-31T07:05:40.000Z
container/openejb-core/src/main/java/org/apache/openejb/core/cmp/KeyGenerator.java
gerwinjansen/tomee
4763c8131acffbc7f212d4944d9dea044ab14375
[ "Apache-2.0" ]
767
2015-01-02T19:38:49.000Z
2022-03-28T16:59:10.000Z
39.458333
75
0.761352
11,874
/* * 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.openejb.core.cmp; import javax.ejb.EntityBean; public interface KeyGenerator { Object getPrimaryKey(EntityBean bean); }
3e1c01905cd33f50ca7801f97b4365f50ade1226
1,148
java
Java
app/src/main/java/com/demo/widget/meis/MeiRoseActivity.java
GAndroidProject/MeiWidgetView
8173d956f2750282ae501c5688603d8fdff2a846
[ "Apache-2.0" ]
2,092
2018-04-28T07:42:38.000Z
2022-03-29T02:04:57.000Z
app/src/main/java/com/demo/widget/meis/MeiRoseActivity.java
yuanchenghao/MeiWidgetView
8173d956f2750282ae501c5688603d8fdff2a846
[ "Apache-2.0" ]
15
2018-05-24T07:37:05.000Z
2020-12-02T08:09:09.000Z
app/src/main/java/com/demo/widget/meis/MeiRoseActivity.java
yuanchenghao/MeiWidgetView
8173d956f2750282ae501c5688603d8fdff2a846
[ "Apache-2.0" ]
321
2018-04-30T17:33:41.000Z
2022-03-29T02:05:01.000Z
26.697674
74
0.704704
11,875
package com.demo.widget.meis; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import com.demo.widget.R; import com.meis.widget.rose.RoseGiftSurfaceView; /** * Created by wenshi on 2018/6/26. * Description */ public class MeiRoseActivity extends AppCompatActivity { private Toolbar mToolbar; private RoseGiftSurfaceView mRoseGiftSurfaceView; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mei_rose_activity); mToolbar = findViewById(R.id.toolbar); mToolbar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); mRoseGiftSurfaceView = findViewById(R.id.rose); } @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); mRoseGiftSurfaceView.startAnimation(); } }
3e1c01f2327989ae1ad72008f017623de3b1ade9
11,587
java
Java
src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java
balabit-deps/balabit-os-6-fop
f8c78089942a4ffce681e5ee2c98102853998700
[ "Apache-2.0" ]
null
null
null
src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java
balabit-deps/balabit-os-6-fop
f8c78089942a4ffce681e5ee2c98102853998700
[ "Apache-2.0" ]
null
null
null
src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java
balabit-deps/balabit-os-6-fop
f8c78089942a4ffce681e5ee2c98102853998700
[ "Apache-2.0" ]
null
null
null
36.437107
100
0.581341
11,876
/* * 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. */ /* $Id: ColumnSetup.java 1610839 2014-07-15 20:25:58Z vhennebert $ */ package org.apache.fop.layoutmgr.table; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.fop.datatypes.Length; import org.apache.fop.datatypes.PercentBaseContext; import org.apache.fop.fo.FONode; import org.apache.fop.fo.expr.RelativeNumericProperty; import org.apache.fop.fo.flow.table.Table; import org.apache.fop.fo.flow.table.TableColumn; import org.apache.fop.fo.properties.TableColLength; import org.apache.fop.traits.Direction; import org.apache.fop.traits.WritingModeTraits; import org.apache.fop.traits.WritingModeTraitsGetter; /** * Class holding a number of columns making up the column setup of a row. */ public class ColumnSetup { /** Logger **/ private static Log log = LogFactory.getLog(ColumnSetup.class); private Table table; private WritingModeTraitsGetter wmTraits; private List columns = new java.util.ArrayList(); private List colWidths = new java.util.ArrayList(); private int maxColIndexReferenced; /** * Main Constructor. * @param table the table to construct this column setup for */ public ColumnSetup(Table table) { assert table != null; this.table = table; this.wmTraits = WritingModeTraits.getWritingModeTraitsGetter(table); prepareColumns(); initializeColumnWidths(); } private void prepareColumns() { List rawCols = table.getColumns(); if (rawCols != null) { int colnum = 1; ListIterator iter = rawCols.listIterator(); while (iter.hasNext()) { TableColumn col = (TableColumn)iter.next(); if (col == null) { continue; } colnum = col.getColumnNumber(); for (int i = 0; i < col.getNumberColumnsRepeated(); i++) { while (colnum > columns.size()) { columns.add(null); } columns.set(colnum - 1, col); colnum++; } } //Post-processing the list (looking for gaps) //TODO The following block could possibly be removed int pos = 1; ListIterator ppIter = columns.listIterator(); while (ppIter.hasNext()) { TableColumn col = (TableColumn)ppIter.next(); if (col == null) { assert false; //Gaps are filled earlier by fo.flow.table.Table.finalizeColumns() //log.error("Found a gap in the table-columns at position " + pos); } pos++; } } } /** * Returns a column. If the index of the column is bigger than the number of explicitly * defined columns the last column is returned. * @param index index of the column (1 is the first column) * @return the requested column */ public TableColumn getColumn(int index) { int size = columns.size(); if (index > size) { if (index > maxColIndexReferenced) { maxColIndexReferenced = index; TableColumn col = getColumn(1); if (!(size == 1 && col.isImplicitColumn())) { assert false; //TODO Seems to be removable as this is now done in the FO tree log.warn(FONode.decorateWithContextInfo( "There are fewer table-columns than are needed. " + "Column " + index + " was accessed, but only " + size + " columns have been defined. " + "The last defined column will be reused." , table)); if (!table.isAutoLayout()) { log.warn("Please note that according XSL-FO 1.0 (7.26.9) says that " + "the 'column-width' property must be specified for every " + "column, unless the automatic table layout is used."); } } } return (TableColumn) columns.get(size - 1); } else { return (TableColumn) columns.get(index - 1); } } /** {@inheritDoc} */ public String toString() { return columns.toString(); } /** @return the number of columns in the setup. */ public int getColumnCount() { if (maxColIndexReferenced > columns.size()) { return maxColIndexReferenced; } else { return columns.size(); } } /** @return an Iterator over all columns */ public Iterator iterator() { return this.columns.iterator(); } /* private void createColumnsFromFirstRow() { //TODO Create oldColumns from first row here //--> rule 2 in "fixed table layout", see CSS2, 17.5.2 //Alternative: extend oldColumns on-the-fly, but in this case we need the //new property evaluation context so proportional-column-width() works //correctly. if (columns.size() == 0) { this.columns.add(table.getDefaultColumn()); } } */ /** * Initializes the column's widths * */ private void initializeColumnWidths() { TableColumn col; Length colWidth; for (int i = columns.size(); --i >= 0;) { if (columns.get(i) != null) { col = (TableColumn) columns.get(i); colWidth = col.getColumnWidth(); colWidths.add(0, colWidth); } } colWidths.add(0, null); } /** * Works out the base unit for resolving proportional-column-width() * [p-c-w(x) = x * base_unit_ipd] * * @param tlm the TableLayoutManager * @return the computed base unit (in millipoint) */ protected double computeTableUnit(TableLayoutManager tlm) { return computeTableUnit(tlm, tlm.getContentAreaIPD()); } /** * Works out the base unit for resolving proportional-column-width() * [p-c-w(x) = x * base_unit_ipd] * * @param percentBaseContext the percent base context for relative values * @param contentAreaIPD the IPD of the available content area * @return the computed base unit (in millipoints) */ public float computeTableUnit(PercentBaseContext percentBaseContext, int contentAreaIPD) { int sumCols = 0; float factors = 0; float unit = 0; /* calculate the total width (specified absolute/percentages), * and work out the total number of factors to use to distribute * the remaining space (if any) */ for (Iterator i = colWidths.iterator(); i.hasNext();) { Length colWidth = (Length) i.next(); if (colWidth != null) { sumCols += colWidth.getValue(percentBaseContext); if (colWidth instanceof RelativeNumericProperty) { factors += ((RelativeNumericProperty) colWidth).getTableUnits(); } else if (colWidth instanceof TableColLength) { factors += ((TableColLength) colWidth).getTableUnits(); } } } /* distribute the remaining space over the accumulated * factors (if any) */ if (factors > 0) { if (sumCols < contentAreaIPD) { unit = (contentAreaIPD - sumCols) / factors; } else { log.warn("No space remaining to distribute over columns."); } } return unit; } /** * Determine the X offset of the indicated column, where this * offset denotes the left edge of the column irrespective of writing * mode. If writing mode's column progression direction is right-to-left, * then the first column is the right-most column and the last column is * the left-most column; otherwise, the first column is the left-most * column. * @param col column index (1 is first column) * @param nrColSpan number columns spanned (for calculating offset in rtl mode) * @param context the context for percentage based calculations * @return the X offset of the requested column */ public int getXOffset(int col, int nrColSpan, PercentBaseContext context) { // TODO handle vertical WMs [GA] if ((wmTraits != null) && (wmTraits.getColumnProgressionDirection() == Direction.RL)) { return getXOffsetRTL(col, nrColSpan, context); } else { return getXOffsetLTR(col, context); } } /* * Determine x offset by summing widths of columns to left of specified * column; i.e., those columns whose column numbers are greater than the * specified column number. */ private int getXOffsetRTL(int col, int nrColSpan, PercentBaseContext context) { int xoffset = 0; for (int i = (col + nrColSpan - 1), nc = colWidths.size(); ++i < nc;) { int effCol = i; if (colWidths.get(effCol) != null) { xoffset += ((Length) colWidths.get(effCol)).getValue(context); } } return xoffset; } /* * Determine x offset by summing widths of columns to left of specified * column; i.e., those columns whose column numbers are less than the * specified column number. */ private int getXOffsetLTR(int col, PercentBaseContext context) { int xoffset = 0; for (int i = col; --i >= 0;) { int effCol; if (i < colWidths.size()) { effCol = i; } else { effCol = colWidths.size() - 1; } if (colWidths.get(effCol) != null) { xoffset += ((Length) colWidths.get(effCol)).getValue(context); } } return xoffset; } /** * Calculates the sum of all column widths. * @param context the context for percentage based calculations * @return the requested sum in millipoints */ public int getSumOfColumnWidths(PercentBaseContext context) { int sum = 0; for (int i = 1, c = getColumnCount(); i <= c; i++) { int effIndex = i; if (i >= colWidths.size()) { effIndex = colWidths.size() - 1; } if (colWidths.get(effIndex) != null) { sum += ((Length) colWidths.get(effIndex)).getValue(context); } } return sum; } }
3e1c0237a1b91a32b075f65b61ac81534f88a352
426
java
Java
source/com/neuron/app/tonto/TaskStatus.java
stewartoallen/tonto
be1657a50dec084be4e736be08d8ca980be46cc5
[ "ClArtistic" ]
7
2015-01-17T15:45:58.000Z
2022-01-30T10:33:54.000Z
source/com/neuron/app/tonto/TaskStatus.java
stewartoallen/tonto
be1657a50dec084be4e736be08d8ca980be46cc5
[ "ClArtistic" ]
2
2015-03-12T14:18:02.000Z
2022-01-30T10:50:22.000Z
source/com/neuron/app/tonto/TaskStatus.java
stewartoallen/tonto
be1657a50dec084be4e736be08d8ca980be46cc5
[ "ClArtistic" ]
4
2015-03-12T13:45:46.000Z
2021-02-05T10:55:39.000Z
15.814815
64
0.702576
11,877
/* * Copyright 2002 Stewart Allen <envkt@example.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the Artistic License. */ package com.neuron.app.tonto; // ---( imports )--- public class TaskStatus implements ITaskStatus { public void taskStatus(int pct, String value) { } public void taskError(Throwable t) { } public void taskNotify(Object val) { } }
3e1c0264db93a0f4986caf917ff4f53de5a68004
885
java
Java
src/test/java/com/shau/mocap/domain/MoCapSceneTest.java
shausoftware/MoCapParser
14c55e04782028e99677c5159b5616512a467be4
[ "CC0-1.0" ]
1
2021-09-11T13:40:39.000Z
2021-09-11T13:40:39.000Z
src/test/java/com/shau/mocap/domain/MoCapSceneTest.java
shausoftware/MoCapParser
14c55e04782028e99677c5159b5616512a467be4
[ "CC0-1.0" ]
null
null
null
src/test/java/com/shau/mocap/domain/MoCapSceneTest.java
shausoftware/MoCapParser
14c55e04782028e99677c5159b5616512a467be4
[ "CC0-1.0" ]
null
null
null
29.5
81
0.725424
11,878
package com.shau.mocap.domain; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; public class MoCapSceneTest { private static final String TEST_FILE_NAME = "testFileName"; private MoCapScene testMoCapScene; @Before public void initTests() { testMoCapScene = new MoCapScene(TEST_FILE_NAME, new ArrayList<Frame>()); } @Test public void testInitialisedState() { assertThat(testMoCapScene.getFilePath(), is(TEST_FILE_NAME + ".mcd")); assertThat(testMoCapScene.getPlayState(), is(nullValue())); SpatialOffset spatialOffset = testMoCapScene.getSpatialOffset(); assertThat(spatialOffset, is(notNullValue())); assertThat(spatialOffset.getOffsetMode(), is(SpatialOffset.OFFSET_NONE)); } }
3e1c02bd1458c754bd102fe20bb38ccfb81be09f
3,441
java
Java
src/main/java/org/ev3dev/hardware/lcd/dev/VirtualLCD.java
scltc/ev3dev-lang-java
19a5e89f04da9e4afa2b1d242426c6e3ec9778e6
[ "MIT" ]
null
null
null
src/main/java/org/ev3dev/hardware/lcd/dev/VirtualLCD.java
scltc/ev3dev-lang-java
19a5e89f04da9e4afa2b1d242426c6e3ec9778e6
[ "MIT" ]
null
null
null
src/main/java/org/ev3dev/hardware/lcd/dev/VirtualLCD.java
scltc/ev3dev-lang-java
19a5e89f04da9e4afa2b1d242426c6e3ec9778e6
[ "MIT" ]
null
null
null
29.161017
103
0.64923
11,879
/******************************************************************************* * Any modification, copies of sections of this file must be attached with this * license and shown clearly in the developer's project. The code can be used * as long as you state clearly you do not own it. Any violation might result in * a take-down. * * MIT License * * Copyright (c) 2016, 2017 Anthony Law * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. *******************************************************************************/ package org.ev3dev.hardware.lcd.dev; import java.awt.Color; import java.awt.Graphics; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.io.IOException; import javax.imageio.ImageIO; import org.ev3dev.hardware.lcd.LCD; /** * Provides an interface for developers to emulate the LCD in ev3 * @author Anthony * */ public class VirtualLCD extends LCD{ private BufferedImage image; private byte[] lastbuf = null; /** * Creates a new virtual LCD instance */ public VirtualLCD(){ //image = new BufferedImage(SCREEN_WIDTH, SCREEN_HEIGHT, BufferedImage.TYPE_INT_ARGB); try { image = ImageIO.read(VirtualLCD.class.getResource("/org/ev3dev/hardware/defaultvirtuallcd.fw.png")); } catch (IOException e) { } } /** * Returns the image drawn * @return BufferedImage */ public BufferedImage getImage(){ return image; } /** * Starts up an UI showing the virtual LCD */ public void showVLCD(){ VLCDFrame frame = new VLCDFrame(this); frame.setVisible(true); frame.setTitle(this.hashCode() + " - VirtualLCD"); } /** * This function overrides the original draw() function to draw directly into a BufferedImage */ @Override public void draw(byte[] data){ if (data == null){ System.out.println("Null data"); return; } Graphics g = image.getGraphics(); int bitPos; for (int i = 0; i < 128; i++){ bitPos = 0; for (int j = 0; j < 178; j++){ if (bitPos > 7){ bitPos = 0; } //System.out.println("(" + j + ", " + i + ")"); byte bit = (byte) ((data[i * 24 + j / 8] >> bitPos) & 1); if ((bit & 0xff) == 0){ //System.out.println("White"); g.setColor(Color.WHITE); g.drawLine(j, i, j, i); } else { //System.out.println("Black"); g.setColor(Color.BLACK); g.drawLine(j, i, j, i); } bitPos++; } } g.dispose(); } }
3e1c0461381991cfce38610ed5c6cd0367f1f84b
3,342
java
Java
form/wicket/src/test/java/org/opensingular/form/wicket/mapper/attachment/upload/FileUploadProcessorTest.java
opensingular/singular-core
ecaf7eafc5de0354f422a4c5d19be6887c86adc0
[ "Apache-2.0" ]
5
2016-10-07T16:43:05.000Z
2018-09-20T22:12:29.000Z
form/wicket/src/test/java/org/opensingular/form/wicket/mapper/attachment/upload/FileUploadProcessorTest.java
opensingular/singular-core
ecaf7eafc5de0354f422a4c5d19be6887c86adc0
[ "Apache-2.0" ]
2
2016-12-04T20:58:51.000Z
2016-12-14T14:06:33.000Z
form/wicket/src/test/java/org/opensingular/form/wicket/mapper/attachment/upload/FileUploadProcessorTest.java
opensingular/singular-core
ecaf7eafc5de0354f422a4c5d19be6887c86adc0
[ "Apache-2.0" ]
null
null
null
35.553191
114
0.733992
11,880
/* * Copyright (C) 2016 Singular Studios (a.k.a Atom Tecnologia) - www.opensingular.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opensingular.form.wicket.mapper.attachment.upload; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.opensingular.form.type.core.attachment.IAttachmentRef; import org.opensingular.form.wicket.mapper.attachment.upload.info.FileUploadInfo; import org.opensingular.form.wicket.mapper.attachment.upload.info.UploadInfo; import org.opensingular.form.wicket.mapper.attachment.upload.info.UploadResponseInfo; import java.io.InputStream; import java.util.List; import static org.mockito.Mockito.*; @RunWith(MockitoJUnitRunner.class) public class FileUploadProcessorTest { @Mock private UploadInfo uploadInfo; @Mock private FileUploadManager manager; @Mock private FileUploadItem fileItem; @InjectMocks private FileUploadProcessor processor; @Test public void testProcesessWithSizeEquals0() throws Exception { when(fileItem.getSize()).thenReturn(0L); List<UploadResponseInfo> response = processor.process(fileItem, uploadInfo, manager); Assert.assertEquals(1L, response.size()); Assert.assertEquals(UploadResponseInfo.FILE_MUST_NOT_HAVE_LENGTH_ZERO, response.get(0).getErrorMessage()); } @Test public void testProcesessWithNotAllowedFileType() throws Exception { when(fileItem.getSize()).thenReturn(10L); List<UploadResponseInfo> response = processor.process(fileItem, uploadInfo, manager); Assert.assertEquals(1L, response.size()); Assert.assertEquals(UploadResponseInfo.FILE_TYPE_NOT_ALLOWED, response.get(0).getErrorMessage()); } @Test public void testProcessCallingManagerCreteFile() throws Exception { InputStream stream = mock(InputStream.class); FileUploadInfo info = mock(FileUploadInfo.class); IAttachmentRef ref = mock(IAttachmentRef.class); String name = "document.pdf"; when(fileItem.getSize()).thenReturn(10L); when(fileItem.getName()).thenReturn(name); when(fileItem.getInputStream()).thenReturn(stream); when(uploadInfo.isFileTypeAllowed(eq("pdf"))).thenReturn(true); when(manager.createFile(eq(uploadInfo), eq(name), eq(stream))).thenReturn(info); when(info.getAttachmentRef()).thenReturn(ref); List<UploadResponseInfo> response = processor.process(fileItem, uploadInfo, manager); Assert.assertEquals(1L, response.size()); Assert.assertNull(response.get(0).getErrorMessage()); verify(manager).createFile(eq(uploadInfo), eq(name), eq(stream)); } }
3e1c04fa7bcbbdc5f38de7c52d4f25a5c6e77859
4,494
java
Java
remoting/src/test/java/org/apache/rocketmq/remoting/RemotingHttp2InvokingTest.java
oushuix217925/rocketmq
33868dc3e95ecb5f5e91e4bd56fce0f39149edf2
[ "Apache-2.0" ]
null
null
null
remoting/src/test/java/org/apache/rocketmq/remoting/RemotingHttp2InvokingTest.java
oushuix217925/rocketmq
33868dc3e95ecb5f5e91e4bd56fce0f39149edf2
[ "Apache-2.0" ]
null
null
null
remoting/src/test/java/org/apache/rocketmq/remoting/RemotingHttp2InvokingTest.java
oushuix217925/rocketmq
33868dc3e95ecb5f5e91e4bd56fce0f39149edf2
[ "Apache-2.0" ]
null
null
null
37.140496
149
0.719181
11,881
/* * 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.rocketmq.remoting; import java.util.concurrent.Executors; import org.apache.rocketmq.remoting.annotation.CFNullable; import org.apache.rocketmq.remoting.common.RemotingUtil; import org.apache.rocketmq.remoting.exception.RemotingCommandException; import org.apache.rocketmq.remoting.exception.RemotingConnectException; import org.apache.rocketmq.remoting.exception.RemotingSendRequestException; import org.apache.rocketmq.remoting.exception.RemotingTimeoutException; import org.apache.rocketmq.remoting.protocol.RemotingCommand; import org.apache.rocketmq.remoting.serialize.LanguageCode; import org.junit.After; import org.junit.Before; import org.junit.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertTrue; public class RemotingHttp2InvokingTest { private RemotingServer remotingHttp2Server; private RemotingClient remotingHttp2Client; private int defaultRequestCode = 0; public RemotingServer createHttp2RemotingServer() throws InterruptedException { RemotingServer remotingServer = RemotingServerFactory.getInstance().createRemotingServer(RemotingUtil.HTTP2_PROTOCOL).init(new ServerConfig() ,null); remotingServer.registerProcessor(defaultRequestCode, new RequestProcessor() { @Override public RemotingCommand processRequest(RemotingChannel ctx, RemotingCommand request) { request.setRemark("Hi " + ctx.remoteAddress()); return request; } @Override public boolean rejectRequest() { return false; } }, Executors.newSingleThreadExecutor()); remotingServer.start(); return remotingServer; } public RemotingClient createHttp2RemotingClient() { RemotingClient client = RemotingClientFactory.getInstance().createRemotingClient(RemotingUtil.HTTP2_PROTOCOL).init(new ClientConfig(), null); client.start(); return client; } @Before public void setup() throws InterruptedException { remotingHttp2Server = createHttp2RemotingServer(); remotingHttp2Client = createHttp2RemotingClient(); } @After public void destroy() { remotingHttp2Client.shutdown(); remotingHttp2Server.shutdown(); } @Test public void testHttp2InvokeSync() throws InterruptedException, RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException { Http2RequestHeader http2RequestHeader = new Http2RequestHeader(); http2RequestHeader.setCount(1); http2RequestHeader.setMessageTitle("Welcome"); RemotingCommand request = RemotingCommand.createRequestCommand(0, http2RequestHeader); RemotingCommand response = remotingHttp2Client.invokeSync("localhost:8888", request, 1000 * 5); assertTrue(response != null); assertThat(response.getLanguage()).isEqualTo(LanguageCode.JAVA); assertThat(response.getExtFields()).hasSize(2); } class Http2RequestHeader implements CommandCustomHeader { @CFNullable private Integer count; @CFNullable private String messageTitle; @Override public void checkFields() throws RemotingCommandException { } public Integer getCount() { return count; } public void setCount(Integer count) { this.count = count; } public String getMessageTitle() { return messageTitle; } public void setMessageTitle(String messageTitle) { this.messageTitle = messageTitle; } } }
3e1c069e7ebc31a10fbc5fe64bfa0a3ea1d24ce0
1,487
java
Java
src/main/java/com/coolspy3/csshortcommands/HelpCommand.java
CoolSpy3/CSShortCommands
24b9d25344f971111d3e5ea395f0196dbbd5e7c0
[ "MIT" ]
null
null
null
src/main/java/com/coolspy3/csshortcommands/HelpCommand.java
CoolSpy3/CSShortCommands
24b9d25344f971111d3e5ea395f0196dbbd5e7c0
[ "MIT" ]
null
null
null
src/main/java/com/coolspy3/csshortcommands/HelpCommand.java
CoolSpy3/CSShortCommands
24b9d25344f971111d3e5ea395f0196dbbd5e7c0
[ "MIT" ]
null
null
null
39.131579
96
0.62004
11,882
package com.coolspy3.csshortcommands; import com.coolspy3.csmodloader.network.SubscribeToPacketStream; import com.coolspy3.cspackets.datatypes.MCColor; import com.coolspy3.cspackets.packets.ClientChatSendPacket; import com.coolspy3.util.ModUtil; public class HelpCommand { public static final String justABunchOfDashes = "-----------------------------"; @SubscribeToPacketStream public boolean register(ClientChatSendPacket event) { if (event.msg.matches("/schelp( .*)?")) { ModUtil.sendMessage(MCColor.BLUE + justABunchOfDashes); ModUtil.sendMessage(MCColor.YELLOW + "/sc set <trigger> <command>" + MCColor.AQUA + " - Sets the message \"<trigger>\" to instead type \"<command>\""); ModUtil.sendMessage(MCColor.YELLOW + "/sc remove <trigger>" + MCColor.AQUA + " - Removes the specified trigger from the command list"); ModUtil.sendMessage(MCColor.YELLOW + "/sc list" + MCColor.AQUA + " - Lists the current triggers and their respective commands"); ModUtil.sendMessage( MCColor.YELLOW + "/sc help" + MCColor.AQUA + " - Prints this help message"); ModUtil.sendMessage( MCColor.YELLOW + "/schelp" + MCColor.AQUA + " - Prints this help message"); ModUtil.sendMessage(MCColor.BLUE + justABunchOfDashes); return true; } return false; } }
3e1c076d427d078aa24fe616e9412b3915ce2091
6,843
java
Java
agent/src/main/java/io/perfmark/agent/PerfMarkTransformer.java
carl-mastrangelo/perfmark
7f53b749c3effc2587fbedcb7309556576636e06
[ "Apache-2.0" ]
null
null
null
agent/src/main/java/io/perfmark/agent/PerfMarkTransformer.java
carl-mastrangelo/perfmark
7f53b749c3effc2587fbedcb7309556576636e06
[ "Apache-2.0" ]
28
2020-09-23T07:44:19.000Z
2022-03-16T03:55:51.000Z
agent/src/main/java/io/perfmark/agent/PerfMarkTransformer.java
carl-mastrangelo/perfmark
7f53b749c3effc2587fbedcb7309556576636e06
[ "Apache-2.0" ]
null
null
null
32.585714
111
0.66769
11,883
/* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.perfmark.agent; import io.perfmark.PerfMark; import io.perfmark.TaskCloseable; import java.lang.instrument.ClassFileTransformer; import java.security.ProtectionDomain; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Set; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.Label; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; final class PerfMarkTransformer implements ClassFileTransformer { private static final String SRC_OWNER = "io/perfmark/PerfMark"; /** * Methods that should be tagged with a marker after they have been invoked. */ private static final Set<String> POST_TAG = Collections.unmodifiableSet(new HashSet<>(Arrays.asList("startTask", "traceTask"))); /** * Methods that should be tagged with a marker before they have been invoked. */ private static final Set<String> PRE_TAG = Collections.unmodifiableSet(new HashSet<>(Collections.singletonList("stopTask"))); @Override public byte[] transform( ClassLoader loader, final String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) { try (TaskCloseable ignored = PerfMark.traceTask("PerfMarkTransformer.transform")) { PerfMark.attachTag("classname", className); PerfMark.attachTag("size", classfileBuffer.length); return transformInternal(loader, className, classBeingRedefined, protectionDomain, classfileBuffer); } } byte[] transformInternal( ClassLoader loader, final String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) { return transform(className, classfileBuffer); } private static byte[] transform(String className, byte[] classfileBuffer) { ClassReader cr = new ClassReader(classfileBuffer); ChangedState changed = new ChangedState(); int api = Opcodes.ASM8; cr.accept( new PerfMarkRewriter(changed, false, api, null, className), ClassReader.SKIP_FRAMES | ClassReader.SKIP_DEBUG); if (changed.changed) { ClassWriter cw = new ClassWriter(cr, ClassWriter.COMPUTE_MAXS) { @Override protected String getCommonSuperClass(String type1, String type2) { throw new UnsupportedOperationException("can't reflectively look up classes"); } }; cr.accept(new PerfMarkRewriter(changed, true, api, cw, className), 0); return cw.toByteArray(); } return null; } static final class PerfMarkRewriter extends ClassVisitor { private final String className; final ChangedState changed; final boolean keepGoing; String fileName; PerfMarkRewriter(ChangedState changed, boolean keepGoing, int api, ClassVisitor writer, String className) { super(api, writer); this.className = className; this.fileName = deriveFileName(className); this.changed = changed; this.keepGoing = keepGoing; } @Override public void visitSource(String sourceFileName, String debug) { this.fileName = sourceFileName; super.visitSource(sourceFileName, debug); } @Override public MethodVisitor visitMethod( int access, String name, String descriptor, String signature, String[] exceptions) { if (changed.changed && !keepGoing) { return null; } return new PerfMarkMethodVisitor( name, super.visitMethod(access, name, descriptor, signature, exceptions)); } private final class PerfMarkMethodVisitor extends MethodVisitor { private final String methodName; private int lineNumber = -1; PerfMarkMethodVisitor(String methodName, MethodVisitor delegate) { super(PerfMarkRewriter.this.api, delegate); this.methodName = methodName; } @Override public void visitLineNumber(int line, Label start) { this.lineNumber = line; super.visitLineNumber(line, start); } @Override public void visitMethodInsn( int opcode, String owner, String name, String descriptor, boolean isInterface) { if (changed.changed && !keepGoing) { return; } if ((owner.equals(SRC_OWNER) && PRE_TAG.contains(name)) || (owner.equals("io/perfmark/TaskCloseable") && name.equals("close"))) { String tag = new StackTraceElement(className, methodName, fileName, lineNumber).toString(); visitLdcInsn("PerfMark.stopCallSite"); visitLdcInsn(tag); super.visitMethodInsn( Opcodes.INVOKESTATIC, SRC_OWNER, "attachTag", "(Ljava/lang/String;Ljava/lang/String;)V", false); changed.changed = true; } super.visitMethodInsn(opcode, owner, name, descriptor, isInterface); if (owner.equals(SRC_OWNER) && POST_TAG.contains(name)) { String tag = new StackTraceElement(className, methodName, fileName, lineNumber).toString(); visitLdcInsn("PerfMark.startCallSite"); visitLdcInsn(tag); super.visitMethodInsn( Opcodes.INVOKESTATIC, SRC_OWNER, "attachTag", "(Ljava/lang/String;Ljava/lang/String;)V", false); changed.changed = true; } } } } static String deriveFileName(String className) { String clzName = className.replace('/', '.'); int dollar = clzName.indexOf('$'); String fileName; if (dollar == -1) { fileName = clzName; } else { fileName = clzName.substring(0, dollar); } if (!fileName.isEmpty()) { int dot = fileName.lastIndexOf('.'); if (dot != -1) { fileName = fileName.substring(dot + 1); } } // TODO: this is broken for private top level classes. if (!fileName.isEmpty()) { fileName += ".java"; } else { fileName = null; } return fileName; } private static final class ChangedState { boolean changed; } PerfMarkTransformer() {} }
3e1c078bb70863c2131235eef9c7494ed549b9d0
3,129
java
Java
app/src/main/java/com/xuexiang/xuidemo/fragment/components/dialog/BottomSheetFragment.java
liuxiaoqiang1018/XUI
7a8787177b8ce3ef195c6d2c88129e1a649ad57f
[ "Apache-2.0" ]
3,986
2019-01-08T06:18:34.000Z
2022-03-30T13:22:43.000Z
app/src/main/java/com/xuexiang/xuidemo/fragment/components/dialog/BottomSheetFragment.java
liuxiaoqiang1018/XUI
7a8787177b8ce3ef195c6d2c88129e1a649ad57f
[ "Apache-2.0" ]
116
2019-01-16T09:00:21.000Z
2022-03-01T03:22:16.000Z
app/src/main/java/com/xuexiang/xuidemo/fragment/components/dialog/BottomSheetFragment.java
blue-tears/XUI
dbb235ce1281ac538f75eca0eeb8ba4b10b1b944
[ "Apache-2.0" ]
730
2019-01-07T08:34:52.000Z
2022-03-28T06:42:41.000Z
35.556818
151
0.60914
11,884
package com.xuexiang.xuidemo.fragment.components.dialog; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.widget.dialog.bottomsheet.BottomSheet; import com.xuexiang.xuidemo.R; import com.xuexiang.xuidemo.base.BaseSimpleListFragment; import com.xuexiang.xuidemo.utils.XToastUtils; import java.util.List; /** * @author xuexiang * @since 2018/11/30 下午3:18 */ @Page(name = "BottomSheetDialog\n底部弹出窗") public class BottomSheetFragment extends BaseSimpleListFragment { /** * 初始化例子 * * @param lists * @return */ @Override protected List<String> initSimpleData(List<String> lists) { lists.add("BottomSheet List"); lists.add("BottomSheet Grid"); return lists; } /** * 条目点击 * * @param position */ @Override protected void onItemClick(int position) { switch(position) { case 0: showSimpleBottomSheetList(); break; case 1: showSimpleBottomSheetGrid(); break; default: break; } } // ================================ 生成不同类型的BottomSheet private void showSimpleBottomSheetList() { new BottomSheet.BottomListSheetBuilder(getActivity()) .setTitle("标题") .addItem("Item 1") .addItem("Item 2") .addItem("Item 3") .setIsCenter(true) .setOnSheetItemClickListener((dialog, itemView, position, tag) -> { dialog.dismiss(); XToastUtils.toast("Item " + (position + 1)); }) .build() .show(); } private void showSimpleBottomSheetGrid() { final int TAG_SHARE_WECHAT_FRIEND = 0; final int TAG_SHARE_WECHAT_MOMENT = 1; final int TAG_SHARE_WEIBO = 2; final int TAG_SHARE_CHAT = 3; final int TAG_SHARE_LOCAL = 4; BottomSheet.BottomGridSheetBuilder builder = new BottomSheet.BottomGridSheetBuilder(getActivity()); builder .addItem(R.drawable.icon_more_operation_share_friend, "分享到微信", TAG_SHARE_WECHAT_FRIEND, BottomSheet.BottomGridSheetBuilder.FIRST_LINE) .addItem(R.drawable.icon_more_operation_share_moment, "分享到朋友圈", TAG_SHARE_WECHAT_MOMENT, BottomSheet.BottomGridSheetBuilder.FIRST_LINE) .addItem(R.drawable.icon_more_operation_share_weibo, "分享到微博", TAG_SHARE_WEIBO, BottomSheet.BottomGridSheetBuilder.FIRST_LINE) .addItem(R.drawable.icon_more_operation_share_chat, "分享到私信", TAG_SHARE_CHAT, BottomSheet.BottomGridSheetBuilder.FIRST_LINE) .addItem(R.drawable.icon_more_operation_save, "保存到本地", TAG_SHARE_LOCAL, BottomSheet.BottomGridSheetBuilder.SECOND_LINE) .setOnSheetItemClickListener((dialog, itemView) -> { dialog.dismiss(); int tag = (int) itemView.getTag(); XToastUtils.toast("tag:" + tag + ", content:" + itemView.toString()); }).build().show(); } }
3e1c080990a660ef24f387c23110499d3d898c3f
2,926
java
Java
opensrp-eusm/src/main/java/org/smartregister/eusm/processor/AppClientProcessor.java
OpenSRP/opensrp-client-eusm
56ec0f71295337fbc7773e8a74a38f12771c34b1
[ "Apache-2.0" ]
null
null
null
opensrp-eusm/src/main/java/org/smartregister/eusm/processor/AppClientProcessor.java
OpenSRP/opensrp-client-eusm
56ec0f71295337fbc7773e8a74a38f12771c34b1
[ "Apache-2.0" ]
65
2020-10-09T16:00:17.000Z
2021-04-13T08:37:21.000Z
opensrp-eusm/src/main/java/org/smartregister/eusm/processor/AppClientProcessor.java
opensrp/opensrp-client-eusm
56ec0f71295337fbc7773e8a74a38f12771c34b1
[ "Apache-2.0" ]
1
2021-01-27T13:05:23.000Z
2021-01-27T13:05:23.000Z
36.123457
129
0.654135
11,885
package org.smartregister.eusm.processor; import android.content.Context; import android.content.Intent; import androidx.localbroadcastmanager.content.LocalBroadcastManager; import org.smartregister.CoreLibrary; import org.smartregister.domain.Client; import org.smartregister.domain.Event; import org.smartregister.domain.db.EventClient; import org.smartregister.domain.jsonmapping.ClientClassification; import org.smartregister.eusm.util.AppConstants; import org.smartregister.sync.ClientProcessorForJava; import java.util.List; import timber.log.Timber; /** * Created by samuelgithengi on 12/7/18. */ public class AppClientProcessor extends ClientProcessorForJava { private static AppClientProcessor instance; public AppClientProcessor(Context context) { super(context); } public static AppClientProcessor getInstance(Context context) { if (instance == null) { instance = new AppClientProcessor(context); } return instance; } // @Override // public synchronized void processClient(List<EventClient> eventClientList) { // processClient(eventClientList, false); // } // public void processClient(List<EventClient> eventClients, boolean localSubmission) { ClientClassification clientClassification = assetJsonToJava("ec_client_classification.json", ClientClassification.class); if (clientClassification == null) { return; } boolean hasSyncedEventsInTarget = false; if (!eventClients.isEmpty()) { for (EventClient eventClient : eventClients) { Event event = eventClient.getEvent(); if (event != null && event.getEventType() != null) { try { processEvent(event, new Client(event.getBaseEntityId()), clientClassification); } catch (Exception e) { Timber.e(e); } // if (!hasSyncedEventsInTarget && operationalAreaLocationId != null && // operationalAreaLocationId.equals(operationalAreaId)) { // hasSyncedEventsInTarget = true; // } } if (localSubmission && CoreLibrary.getInstance().getSyncConfiguration().runPlanEvaluationOnClientProcessing()) { processPlanEvaluation(eventClient); } } } if (hasSyncedEventsInTarget) { Intent intent = new Intent(AppConstants.Action.STRUCTURE_TASK_SYNCED); intent.putExtra(AppConstants.CONFIGURATION.LOCAL_SYNC_DONE, localSubmission); LocalBroadcastManager.getInstance(getContext()).sendBroadcast(intent); } } @Override protected void updateRegisterCount(String entityId) { //do nothing. Save performance on unrequired functionality } }
3e1c08514f5b1f6923b2b38ea21efbf0f47a6ccd
527
java
Java
mybatis-plus-sample-resultmap/src/main/java/com/baomidou/mybatisplus/samples/resultmap/entity/Man.java
Mumu-myDev/-mp-
9700a42503e807ee5b2a2f371fb68cc67bc5054f
[ "Apache-2.0" ]
1,895
2018-07-25T07:15:29.000Z
2022-03-30T08:12:48.000Z
mybatis-plus-sample-resultmap/src/main/java/com/baomidou/mybatisplus/samples/resultmap/entity/Man.java
ThunderboltLei/mybatis-plus-samples
d2ae861f4c7b4825e9c3bf58eeac6c34f5743752
[ "Apache-2.0" ]
54
2018-09-10T02:59:34.000Z
2022-01-06T17:05:50.000Z
mybatis-plus-sample-resultmap/src/main/java/com/baomidou/mybatisplus/samples/resultmap/entity/Man.java
ThunderboltLei/mybatis-plus-samples
d2ae861f4c7b4825e9c3bf58eeac6c34f5743752
[ "Apache-2.0" ]
1,972
2018-08-03T06:35:56.000Z
2022-03-31T06:33:22.000Z
17.566667
58
0.717268
11,886
package com.baomidou.mybatisplus.samples.resultmap.entity; import java.util.List; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; /** * @author miemie * @since 2019-11-27 */ @Data @TableName(resultMap = "m_b") // 对应xml里的 id public class Man { private Long id; private String name; private Long laoPoId; @TableField(exist = false) private Woman laoPo; @TableField(exist = false) private List<Child> waWa; }
3e1c090ba6ffeb214d001fdea9ece27153cac6aa
1,399
java
Java
src/main/java/com/berry/oss/common/exceptions/xml/SignatureDoesNotMatch.java
HarLin97/oss-backend
72cde03d17795b32ad2e59e11b03da21cb63ac84
[ "MIT" ]
45
2019-06-30T10:08:16.000Z
2022-01-25T04:13:03.000Z
src/main/java/com/berry/oss/common/exceptions/xml/SignatureDoesNotMatch.java
HarLin97/oss-backend
72cde03d17795b32ad2e59e11b03da21cb63ac84
[ "MIT" ]
3
2019-12-04T11:01:22.000Z
2021-04-27T00:10:43.000Z
src/main/java/com/berry/oss/common/exceptions/xml/SignatureDoesNotMatch.java
HarLin97/oss-backend
72cde03d17795b32ad2e59e11b03da21cb63ac84
[ "MIT" ]
23
2019-11-27T02:00:21.000Z
2021-12-22T09:15:39.000Z
32.534884
145
0.769121
11,887
package com.berry.oss.common.exceptions.xml; import com.berry.oss.common.constant.XmlErrorInfo; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import lombok.Data; import lombok.experimental.Accessors; /** * Created with IntelliJ IDEA. * * @author Berry_Cooper. * @date 2019-06-22 23:46 * fileName:SignatureDoesNotMatch * Use: */ @Data @Accessors(chain = true) @JacksonXmlRootElement(localName = "response") public class SignatureDoesNotMatch implements XmlErrorInfo { @JacksonXmlProperty(localName = "Code") private String code = "SignatureDoesNotMatch"; @JacksonXmlProperty(localName = "Message") private String message = "The request signature we calculated does not match the signature you provided. Check your key and signing method."; @JacksonXmlProperty(localName = "OSSAccessKeyId") private String ossAccessKeyId; @JacksonXmlProperty(localName = "SignatureProvided") private String signatureProvided; @JacksonXmlProperty(localName = "StringToSign") private String stringToSign; public SignatureDoesNotMatch(String ossAccessKeyId, String signatureProvided, String stringToSign) { this.ossAccessKeyId = ossAccessKeyId; this.signatureProvided = signatureProvided; this.stringToSign = stringToSign; } }
3e1c0a9ff46c537fbd994248cfd59aa5c79b31cd
6,564
java
Java
src/main/java/com/web/settings/service/internal/CategorySettingImpl.java
fuyuanxiu/xk_logistics
17c4e5eadcaa130740eaf8a5ef1810ec3055d72b
[ "MIT" ]
null
null
null
src/main/java/com/web/settings/service/internal/CategorySettingImpl.java
fuyuanxiu/xk_logistics
17c4e5eadcaa130740eaf8a5ef1810ec3055d72b
[ "MIT" ]
null
null
null
src/main/java/com/web/settings/service/internal/CategorySettingImpl.java
fuyuanxiu/xk_logistics
17c4e5eadcaa130740eaf8a5ef1810ec3055d72b
[ "MIT" ]
null
null
null
37.508571
175
0.660878
11,888
package com.web.settings.service.internal; import com.app.base.data.ApiResponseResult; import com.app.base.data.DataGrid; import com.system.user.entity.SysUser; import com.utils.BaseService; import com.utils.SearchFilter; import com.utils.UserUtil; import com.utils.enumeration.BasicStateEnum; import com.web.settings.dao.CategorySettingDao; import com.web.settings.entity.CategorySetting; import com.web.settings.service.CategorySettingService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Date; import java.util.List; /** * 物料类别筛选设置(质量文件) */ @Service(value = "CategorySettingService") @Transactional(propagation = Propagation.REQUIRED) public class CategorySettingImpl implements CategorySettingService { @Autowired private CategorySettingDao categorySettingDao; @Override @Transactional public ApiResponseResult add(String bsName, String bsCode, Integer bsStatus) throws Exception { if(StringUtils.isEmpty(bsName)){ return ApiResponseResult.failure("物料类别名称不能为空!"); } if(StringUtils.isEmpty(bsCode)){ return ApiResponseResult.failure("筛选编码不能为空!"); } //判断名称是否存在 List<CategorySetting> list = categorySettingDao.findByIsDelAndBsName(0, bsName.trim()); if(list.size() > 0){ return ApiResponseResult.failure("物料类别已存在,无法添加!"); } SysUser currUser = UserUtil.getCurrUser(); //获取当前用户 CategorySetting setting = new CategorySetting(); setting.setCreatedTime(new Date()); setting.setPkCreatedBy(currUser != null ? currUser.getId() : null); setting.setBsName(bsName.trim()); setting.setBsCode(bsCode.trim()); setting.setBsStatus(bsStatus); categorySettingDao.save(setting); return ApiResponseResult.success("新增成功!"); } @Override @Transactional public ApiResponseResult edit(Long id, String bsName, String bsCode, Integer bsStatus) throws Exception { if(id == null){ return ApiResponseResult.failure("记录ID不能为空!"); } if(StringUtils.isEmpty(bsName)){ return ApiResponseResult.failure("物料类别名称不能为空!"); } if(StringUtils.isEmpty(bsCode)){ return ApiResponseResult.failure("筛选编码不能为空!"); } SysUser currUser = UserUtil.getCurrUser(); //获取当前用户 //1.获取数据 CategorySetting o = categorySettingDao.findById((long) id); if(o == null){ return ApiResponseResult.failure("该设置记录不存在!"); } //2.判断名称是否相同,相同则不修改;不同则判断新的名称是否存在 if(StringUtils.equals(o.getBsName().trim(), bsName.trim())){ }else{ List<CategorySetting> list = categorySettingDao.findByIsDelAndBsName(0, bsName.trim()); if(list.size() > 0){ return ApiResponseResult.failure("物料类别已存在,无法添加!"); } o.setBsName(bsName.trim());//名称 } o.setModifiedTime(new Date()); o.setPkModifiedBy(currUser != null ? currUser.getId() : null); o.setBsCode(bsCode.trim()); o.setBsStatus(bsStatus); categorySettingDao.save(o); return ApiResponseResult.success("编辑成功!"); } @Override @Transactional public ApiResponseResult delete(Long id) throws Exception { if(id == null){ return ApiResponseResult.failure("记录ID不能为空!"); } SysUser currUser = UserUtil.getCurrUser(); //获取当前用户 //获取数据 CategorySetting o = categorySettingDao.findById((long) id); if(o == null){ return ApiResponseResult.failure("该设置记录不存在!"); } o.setModifiedTime(new Date()); o.setPkModifiedBy(currUser != null ? currUser.getId() : null); o.setIsDel(1); categorySettingDao.save(o); return ApiResponseResult.success("删除成功!"); } @Override @Transactional(readOnly = true) public ApiResponseResult getlist(String keyword, Integer bsStatus, PageRequest pageRequest) throws Exception { //查询条件1 List<SearchFilter> filters = new ArrayList<SearchFilter>(); filters.add(new SearchFilter("isDel", SearchFilter.Operator.EQ, BasicStateEnum.FALSE.intValue())); if(bsStatus != null){ filters.add(new SearchFilter("bsStatus", SearchFilter.Operator.EQ, bsStatus)); } //查询条件2 List<SearchFilter> filters1 = new ArrayList<SearchFilter>(); if(StringUtils.isNotEmpty(keyword)){ filters1.add(new SearchFilter("bsName", SearchFilter.Operator.LIKE, keyword)); filters1.add(new SearchFilter("bsCode", SearchFilter.Operator.LIKE, keyword)); } Specification<CategorySetting> spec = Specification.where(BaseService.and(filters, CategorySetting.class)); Specification<CategorySetting> spec1 = spec.and(BaseService.or(filters1, CategorySetting.class)); Page<CategorySetting> page = categorySettingDao.findAll(spec1, pageRequest); return ApiResponseResult.success().data(DataGrid.create(page.getContent(), (int) page.getTotalElements(), pageRequest.getPageNumber() + 1, pageRequest.getPageSize())); } /** * 修改筛选状态 * @param idsArray * @param bsStatus * @return * @throws Exception */ @Override @Transactional public ApiResponseResult updateStatus(Long[] idsArray, Integer bsStatus) throws Exception{ if(idsArray == null ||idsArray.length == 0){ return ApiResponseResult.failure("记录ID不能为空!"); } if(bsStatus == null){ return ApiResponseResult.failure("状态不能为空!"); } SysUser currUser = UserUtil.getCurrUser(); //获取当前用户 for(int i = 0; i < idsArray.length; i++){ if(idsArray[i] != null){ CategorySetting o = categorySettingDao.findById((long) idsArray[i]); o.setModifiedTime(new Date()); o.setPkModifiedBy(currUser!=null ? currUser.getId() : null); o.setBsStatus(bsStatus); categorySettingDao.save(o); } } return ApiResponseResult.success("修改成功!"); } }
3e1c0b0315c8695152d51a67ae984ec4c3c2051b
577
java
Java
his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/bms/BmsSettlementCatParam.java
yuzoe/his
3ee8c1a1ad1660b8011978334e8c5b7570fbd584
[ "Apache-2.0" ]
631
2019-07-11T15:28:49.000Z
2022-03-30T07:40:12.000Z
his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/bms/BmsSettlementCatParam.java
zhennann/HIS
7ebfbeee7553b66991b24296a2e9a1b8f53be6ec
[ "Apache-2.0" ]
30
2019-10-09T04:18:06.000Z
2022-03-04T01:34:05.000Z
his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/bms/BmsSettlementCatParam.java
zhennann/HIS
7ebfbeee7553b66991b24296a2e9a1b8f53be6ec
[ "Apache-2.0" ]
337
2019-07-13T00:28:37.000Z
2022-03-29T03:46:41.000Z
21.37037
61
0.741768
11,889
package com.neu.his.cloud.zuul.dto.bms; import io.swagger.annotations.ApiModelProperty; import lombok.Getter; import lombok.Setter; import lombok.ToString; import java.io.Serializable; import java.math.BigDecimal; @Setter @Getter @ToString public class BmsSettlementCatParam implements Serializable { @ApiModelProperty(value = "结算类别名") private String name; @ApiModelProperty(value = "比例") private BigDecimal ratio; @ApiModelProperty(value = "状态:0->无效;1->有效") private Integer status; @ApiModelProperty(value = "编码") private String code; }
3e1c0b4025be71b202ef1c03159d584e8febbd8b
3,606
java
Java
src/main/java/org/hydev/veracross/sdk/model/CourseV3.java
HyDevelop/VeracrossAnalyzer.SDK
bb88c5f632fff252322ab718d146b335307f765d
[ "MIT" ]
1
2019-08-31T02:44:19.000Z
2019-08-31T02:44:19.000Z
src/main/java/org/hydev/veracross/sdk/model/CourseV3.java
HyDevelop/VeracrossAnalyzer.SDK
bb88c5f632fff252322ab718d146b335307f765d
[ "MIT" ]
null
null
null
src/main/java/org/hydev/veracross/sdk/model/CourseV3.java
HyDevelop/VeracrossAnalyzer.SDK
bb88c5f632fff252322ab718d146b335307f765d
[ "MIT" ]
null
null
null
24.364865
59
0.687465
11,890
package org.hydev.veracross.sdk.model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; /** * Course data model for Veracross Portal V3 * <p> * Class created by the HyDEV Team on 2019-09-23! * * @author HyDEV Team (https://github.com/HyDevelop) * @author Hykilpikonna (https://github.com/hykilpikonna) * @author Vanilla (https://github.com/VergeDX) * @since 2019-09-23 18:33 */ @Data @NoArgsConstructor @AllArgsConstructor public class CourseV3 { @SerializedName("enrollment_pk") @Expose private Integer enrollmentPk; @SerializedName("class_pk") @Expose private Integer id; @SerializedName("class_id") @Expose private String nameId; @SerializedName("class_name") @Expose private String name; @SerializedName("description") @Expose private String description; @SerializedName("teacher_full_name") @Expose private String teacherName; @SerializedName("course_type") @Expose private Integer courseType; @SerializedName("status") @Expose private String status; @SerializedName("type") @Expose private String type; @SerializedName("meets_today") @Expose private Integer meetsToday; @SerializedName("todays_times") @Expose private String todaysTimes; @SerializedName("todays_start_time") @Expose private String todaysStartTime; @SerializedName("todays_blocks") @Expose private String todaysBlocks; @SerializedName("ptd_grade") @Expose private Double numericGrade; @SerializedName("ptd_letter_grade") @Expose private String letterGrade; @SerializedName("display_assignments") @Expose private Integer displayAssignments; @SerializedName("display_notifications") @Expose private Integer displayNotifications; @SerializedName("notifications_count") @Expose private Integer notificationsCount; @SerializedName("class_configuration") @Expose private String classConfiguration; @SerializedName("status_sort_key") @Expose private Integer statusSortKey; @SerializedName("type_sort_key") @Expose private Integer typeSortKey; @SerializedName("subject_sort_key") @Expose private Integer subjectSortKey; @SerializedName("course_sort_key") @Expose private Integer courseSortKey; /** * Copy constructor * * @param o Other course */ public CourseV3(CourseV3 o) { this.enrollmentPk = o.enrollmentPk; this.id = o.id; this.nameId = o.nameId; this.name = o.name; this.description = o.description; this.teacherName = o.teacherName; this.courseType = o.courseType; this.status = o.status; this.type = o.type; this.meetsToday = o.meetsToday; this.todaysTimes = o.todaysTimes; this.todaysStartTime = o.todaysStartTime; this.todaysBlocks = o.todaysBlocks; this.numericGrade = o.numericGrade; this.letterGrade = o.letterGrade; this.displayAssignments = o.displayAssignments; this.displayNotifications = o.displayNotifications; this.notificationsCount = o.notificationsCount; this.classConfiguration = o.classConfiguration; this.statusSortKey = o.statusSortKey; this.typeSortKey = o.typeSortKey; this.subjectSortKey = o.subjectSortKey; this.courseSortKey = o.courseSortKey; } }
3e1c0bb0d7c6c0a7030899712098b25e158c3f4e
7,620
java
Java
aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/DescribeComplianceByConfigRuleResult.java
iterate-ch/aws-sdk-java
ef20f951d59a5412e0b483729f81722e4ad2bf53
[ "Apache-2.0" ]
1
2019-02-08T15:23:02.000Z
2019-02-08T15:23:02.000Z
aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/DescribeComplianceByConfigRuleResult.java
iterate-ch/aws-sdk-java
ef20f951d59a5412e0b483729f81722e4ad2bf53
[ "Apache-2.0" ]
null
null
null
aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/DescribeComplianceByConfigRuleResult.java
iterate-ch/aws-sdk-java
ef20f951d59a5412e0b483729f81722e4ad2bf53
[ "Apache-2.0" ]
1
2022-03-22T05:35:12.000Z
2022-03-22T05:35:12.000Z
36.634615
151
0.65958
11,891
/* * Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.config.model; import java.io.Serializable; /** * <p/> */ public class DescribeComplianceByConfigRuleResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable { /** * <p> * Indicates whether each of the specified AWS Config rules is compliant. * </p> */ private com.amazonaws.internal.SdkInternalList<ComplianceByConfigRule> complianceByConfigRules; /** * <p> * The string that you use in a subsequent request to get the next page of results in a paginated response. * </p> */ private String nextToken; /** * <p> * Indicates whether each of the specified AWS Config rules is compliant. * </p> * * @return Indicates whether each of the specified AWS Config rules is compliant. */ public java.util.List<ComplianceByConfigRule> getComplianceByConfigRules() { if (complianceByConfigRules == null) { complianceByConfigRules = new com.amazonaws.internal.SdkInternalList<ComplianceByConfigRule>(); } return complianceByConfigRules; } /** * <p> * Indicates whether each of the specified AWS Config rules is compliant. * </p> * * @param complianceByConfigRules * Indicates whether each of the specified AWS Config rules is compliant. */ public void setComplianceByConfigRules(java.util.Collection<ComplianceByConfigRule> complianceByConfigRules) { if (complianceByConfigRules == null) { this.complianceByConfigRules = null; return; } this.complianceByConfigRules = new com.amazonaws.internal.SdkInternalList<ComplianceByConfigRule>(complianceByConfigRules); } /** * <p> * Indicates whether each of the specified AWS Config rules is compliant. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setComplianceByConfigRules(java.util.Collection)} or * {@link #withComplianceByConfigRules(java.util.Collection)} if you want to override the existing values. * </p> * * @param complianceByConfigRules * Indicates whether each of the specified AWS Config rules is compliant. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeComplianceByConfigRuleResult withComplianceByConfigRules(ComplianceByConfigRule... complianceByConfigRules) { if (this.complianceByConfigRules == null) { setComplianceByConfigRules(new com.amazonaws.internal.SdkInternalList<ComplianceByConfigRule>(complianceByConfigRules.length)); } for (ComplianceByConfigRule ele : complianceByConfigRules) { this.complianceByConfigRules.add(ele); } return this; } /** * <p> * Indicates whether each of the specified AWS Config rules is compliant. * </p> * * @param complianceByConfigRules * Indicates whether each of the specified AWS Config rules is compliant. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeComplianceByConfigRuleResult withComplianceByConfigRules(java.util.Collection<ComplianceByConfigRule> complianceByConfigRules) { setComplianceByConfigRules(complianceByConfigRules); return this; } /** * <p> * The string that you use in a subsequent request to get the next page of results in a paginated response. * </p> * * @param nextToken * The string that you use in a subsequent request to get the next page of results in a paginated response. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** * <p> * The string that you use in a subsequent request to get the next page of results in a paginated response. * </p> * * @return The string that you use in a subsequent request to get the next page of results in a paginated response. */ public String getNextToken() { return this.nextToken; } /** * <p> * The string that you use in a subsequent request to get the next page of results in a paginated response. * </p> * * @param nextToken * The string that you use in a subsequent request to get the next page of results in a paginated response. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeComplianceByConfigRuleResult withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getComplianceByConfigRules() != null) sb.append("ComplianceByConfigRules: " + getComplianceByConfigRules() + ","); if (getNextToken() != null) sb.append("NextToken: " + getNextToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeComplianceByConfigRuleResult == false) return false; DescribeComplianceByConfigRuleResult other = (DescribeComplianceByConfigRuleResult) obj; if (other.getComplianceByConfigRules() == null ^ this.getComplianceByConfigRules() == null) return false; if (other.getComplianceByConfigRules() != null && other.getComplianceByConfigRules().equals(this.getComplianceByConfigRules()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getComplianceByConfigRules() == null) ? 0 : getComplianceByConfigRules().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public DescribeComplianceByConfigRuleResult clone() { try { return (DescribeComplianceByConfigRuleResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }
3e1c0bb2633ee1ecc8203e9aa6b995dee03a7564
2,333
java
Java
plugins/au.gov.ga.earthsci.model.tests/src/au/gov/ga/earthsci/model/data/ModelDataBuilderTest.java
rooby/earthsci
e134d08d4501006cb8c6b8f47f1016510d0f52be
[ "Apache-2.0" ]
45
2015-01-28T17:20:47.000Z
2022-02-03T13:08:14.000Z
plugins/au.gov.ga.earthsci.model.tests/src/au/gov/ga/earthsci/model/data/ModelDataBuilderTest.java
rooby/earthsci
e134d08d4501006cb8c6b8f47f1016510d0f52be
[ "Apache-2.0" ]
28
2015-01-08T23:52:21.000Z
2018-10-24T02:04:48.000Z
plugins/au.gov.ga.earthsci.model.tests/src/au/gov/ga/earthsci/model/data/ModelDataBuilderTest.java
rooby/earthsci
e134d08d4501006cb8c6b8f47f1016510d0f52be
[ "Apache-2.0" ]
29
2015-01-28T17:21:05.000Z
2022-03-30T06:23:38.000Z
27.494118
102
0.746684
11,892
package au.gov.ga.earthsci.model.data; import static org.junit.Assert.*; import java.nio.ByteBuffer; import javax.measure.unit.SI; import org.junit.Test; import au.gov.ga.earthsci.common.buffer.BufferType; /** * Unit tests for the {@link ModelDataBuilder} class * * @author James Navin (anpch@example.com) */ public class ModelDataBuilderTest { @Test(expected = IllegalArgumentException.class) public void testBuildWithNullBuffer() { ByteBuffer buffer = null; ModelDataBuilder.createFromBuffer(buffer).build(); } @Test(expected = IllegalArgumentException.class) public void testBuildWithNoBufferType() { ByteBuffer buffer = ByteBuffer.wrap(new byte[12]); ModelDataBuilder.createFromBuffer(buffer).build(); } @Test public void testBuildWithMinimalValid() { ByteBuffer buffer = ByteBuffer.wrap(new byte[12]); IModelData data = ModelDataBuilder.createFromBuffer(buffer).ofType(BufferType.BYTE).build(); assertNotNull(data.getId()); assertNull(data.getName()); assertNull(data.getDescription()); assertEquals(buffer, data.getSource()); assertNull(data.getNoDataValue()); assertFalse(data.hasUnits()); assertNull(data.getUnits()); assertEquals(1, data.getGroupSize()); assertEquals(12, data.getNumberOfValues()); assertEquals(12, data.getNumberOfGroups()); } @Test public void testBuildWithCompleteValid() { ByteBuffer buffer = ByteBuffer.wrap(new byte[12]); IModelData data = ModelDataBuilder.createFromBuffer(buffer).ofType(BufferType.BYTE).withId("dataId").named("myData") .describedAs("some data").withNodata((byte) 1).withUnits(SI.SECOND).withGroupSize(3).build(); assertEquals("dataId", data.getId()); assertEquals("myData", data.getName()); assertEquals("some data", data.getDescription()); assertEquals(buffer, data.getSource()); assertEquals((byte) 1, data.getNoDataValue()); assertTrue(data.hasUnits()); assertEquals(SI.SECOND, data.getUnits()); assertEquals(3, data.getGroupSize()); assertEquals(12, data.getNumberOfValues()); assertEquals(4, data.getNumberOfGroups()); } @Test(expected = IllegalArgumentException.class) public void testBuildWithInvalidGroupSize() { ByteBuffer buffer = ByteBuffer.wrap(new byte[12]); ModelDataBuilder.createFromBuffer(buffer).ofType(BufferType.BYTE).withGroupSize(0).build(); } }
3e1c0bcd5529f8ebb1b391ad92c5416e2f71bf71
552
java
Java
LACCPlus/Cloudstack/2201_1.java
sgholamian/log-aware-clone-detection
9993cb081c420413c231d1807bfff342c39aa69a
[ "MIT" ]
null
null
null
LACCPlus/Cloudstack/2201_1.java
sgholamian/log-aware-clone-detection
9993cb081c420413c231d1807bfff342c39aa69a
[ "MIT" ]
null
null
null
LACCPlus/Cloudstack/2201_1.java
sgholamian/log-aware-clone-detection
9993cb081c420413c231d1807bfff342c39aa69a
[ "MIT" ]
null
null
null
30.666667
95
0.730072
11,893
//,temp,GetVolumeiScsiNameCmd.java,55,67,temp,GetVolumeSnapshotDetailsCmd.java,59,72 //,3 public class xxx { @Override public void execute() { LOGGER.info("'GetVolumeiScsiNameCmd.execute' method invoked"); String volume_iScsiName = _util.getVolume_iScsiName(volumeUuid); ApiVolumeiScsiNameResponse response = new ApiVolumeiScsiNameResponse(volume_iScsiName); response.setResponseName(getCommandName()); response.setObjectName("apivolumeiscsiname"); this.setResponseObject(response); } };
3e1c0beea1895f6f9202ce1478a657e72a980870
634
java
Java
src/main/java/com/chris/bulleyeadmin/common/entity/Constants.java
zhouhongxing16/bulleyeAdmin
160d1b29700065d8f56ba8408600854ef643fb37
[ "Apache-2.0" ]
7
2018-12-11T13:50:40.000Z
2022-03-02T01:24:18.000Z
src/main/java/com/chris/bulleyeadmin/common/entity/Constants.java
zhouhongxing16/bulleyeAdmin
160d1b29700065d8f56ba8408600854ef643fb37
[ "Apache-2.0" ]
1
2022-01-07T10:29:36.000Z
2022-01-07T10:29:36.000Z
src/main/java/com/chris/bulleyeadmin/common/entity/Constants.java
zhouhongxing16/bulleyeAdmin
160d1b29700065d8f56ba8408600854ef643fb37
[ "Apache-2.0" ]
1
2021-01-13T02:04:27.000Z
2021-01-13T02:04:27.000Z
14.744186
60
0.556782
11,894
package com.chris.bulleyeadmin.common.entity; /** * TODO * * @author Administrator * @date 2018/2/7. */ public class Constants { /** * 组织ID */ public static String ORGANIZATION_ID = "organizationId"; /** * 人员ID */ public static String STAFF_ID = "staffId"; /** * 部门ID */ public static String DEPARTMENT_ID = "departmentId"; /** * 组织权限 */ public static String ORGANIZATION = "organization"; /** * 个人权限 */ public static String PERSONAL = "personal"; /** * 科室权限 */ public static String DEPARTMENT = "department"; }
3e1c0ce4f0233072b07beae8835ac0d49b61ab64
907
java
Java
src/test/java/com/softb/system/json/JsonTests.java
marcuslacerda/needs
c0f80217738e948f64aeb960b560edae4a48e301
[ "Apache-2.0" ]
null
null
null
src/test/java/com/softb/system/json/JsonTests.java
marcuslacerda/needs
c0f80217738e948f64aeb960b560edae4a48e301
[ "Apache-2.0" ]
null
null
null
src/test/java/com/softb/system/json/JsonTests.java
marcuslacerda/needs
c0f80217738e948f64aeb960b560edae4a48e301
[ "Apache-2.0" ]
null
null
null
32.392857
80
0.798236
11,895
package com.softb.system.json; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.fasterxml.jackson.databind.ObjectMapper; import com.softb.system.config.ServiceConfig; import com.softb.system.json.mock.MockEntity; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = ServiceConfig.class) public class JsonTests { @Test public void whenUsingIgnoreEmptyString_thenReturnNullField() throws Exception { MockEntity mockEntity = new MockEntity(10, ""); ObjectMapper mapper = new ObjectMapper(); String mockJSon = mapper.writeValueAsString(mockEntity); mockEntity = mapper.readValue(mockJSon, MockEntity.class); Assert.assertTrue(mockEntity.getNome() == null); } }
3e1c0dc69d9a89bf791d1e11c2929c9250bba453
397
java
Java
zuul/src/main/java/com/vector/cloud/service/zuul/ZuulApplication.java
vectoryoungo/vector-cloud-service-zuul
f88220d236c91676786cb70b57347abe75df1ed6
[ "Apache-2.0" ]
1
2019-10-12T09:52:45.000Z
2019-10-12T09:52:45.000Z
zuul/src/main/java/com/vector/cloud/service/zuul/ZuulApplication.java
vectoryoungo/vector-cloud-service-zuul
f88220d236c91676786cb70b57347abe75df1ed6
[ "Apache-2.0" ]
null
null
null
zuul/src/main/java/com/vector/cloud/service/zuul/ZuulApplication.java
vectoryoungo/vector-cloud-service-zuul
f88220d236c91676786cb70b57347abe75df1ed6
[ "Apache-2.0" ]
null
null
null
26.466667
68
0.831234
11,896
package com.vector.cloud.service.zuul; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.zuul.EnableZuulProxy; @SpringBootApplication @EnableZuulProxy public class ZuulApplication { public static void main(String[] args) { SpringApplication.run(ZuulApplication.class, args); } }
3e1c0f22c3f4eeb26f42c002cdb6fad47f8f0658
2,750
java
Java
common/src/main/java/com/kumuluz/ee/common/config/MailServiceConfig.java
ArtificialPB/kumuluzee
f2c884386097d62ce7734445205674312b83597a
[ "MIT" ]
162
2017-03-22T14:58:31.000Z
2022-02-13T11:38:33.000Z
common/src/main/java/com/kumuluz/ee/common/config/MailServiceConfig.java
ArtificialPB/kumuluzee
f2c884386097d62ce7734445205674312b83597a
[ "MIT" ]
110
2017-04-21T19:56:42.000Z
2022-02-09T10:32:14.000Z
common/src/main/java/com/kumuluz/ee/common/config/MailServiceConfig.java
acidburn0zzz/kumuluzee
37e80a12319afa770961ca27a5eec070945ea848
[ "MIT" ]
58
2017-04-03T15:37:27.000Z
2021-11-06T13:46:47.000Z
23.706897
74
0.589091
11,897
package com.kumuluz.ee.common.config; public class MailServiceConfig { public static class Builder { private String protocol; private String host; private Integer port; private Boolean starttls; private String username; private String password; private Long connectionTimeout; private Long timeout; public Builder protocol(String protocol) { this.protocol = protocol; return this; } public Builder host(String host) { this.host = host; return this; } public Builder port(Integer port) { this.port = port; return this; } public Builder starttls(Boolean starttls) { this.starttls = starttls; return this; } public Builder username(String username) { this.username = username; return this; } public Builder password(String password) { this.password = password; return this; } public Builder connectionTimeout(Long connectionTimeout) { this.connectionTimeout = connectionTimeout; return this; } public Builder timeout(Long timeout) { this.timeout = timeout; return this; } public MailServiceConfig build() { MailServiceConfig mailServiceConfig = new MailServiceConfig(); mailServiceConfig.protocol = protocol; mailServiceConfig.host = host; mailServiceConfig.port = port; mailServiceConfig.starttls = starttls; mailServiceConfig.username = username; mailServiceConfig.password = password; mailServiceConfig.connectionTimeout = connectionTimeout; mailServiceConfig.timeout = timeout; return mailServiceConfig; } } private String protocol; private String host; private Integer port; private Boolean starttls; private String username; private String password; private Long connectionTimeout; private Long timeout; private MailServiceConfig(){ } public String getProtocol() { return protocol; } public String getHost() { return host; } public Integer getPort() { return port; } public Boolean getStarttls() { return starttls; } public String getUsername() { return username; } public String getPassword() { return password; } public Long getConnectionTimeout() { return connectionTimeout; } public Long getTimeout() { return timeout; } }
3e1c10aaee4359d9391526c4d523b3d2e0b17588
3,132
java
Java
integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java
keep-sunshine/cxf
039e1dec778efffd6af4523f88d8638732afb637
[ "Apache-2.0" ]
839
2015-01-01T15:33:21.000Z
2022-03-31T02:40:34.000Z
integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java
keep-sunshine/cxf
039e1dec778efffd6af4523f88d8638732afb637
[ "Apache-2.0" ]
399
2015-01-07T19:59:38.000Z
2022-03-30T21:56:27.000Z
integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java
keep-sunshine/cxf
039e1dec778efffd6af4523f88d8638732afb637
[ "Apache-2.0" ]
1,581
2015-01-01T02:22:05.000Z
2022-03-31T13:29:27.000Z
34.417582
103
0.699553
11,898
/** * 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.cxf.jca.cxf.handlers; import java.lang.reflect.Proxy; import org.apache.cxf.jca.cxf.CXFInvocationHandler; import org.apache.cxf.jca.cxf.CXFInvocationHandlerData; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class InvokingInvocationHandlerTest extends AbstractInvocationHandlerTest { TestInterface test; TestInterface test2; TestTarget target; CXFInvocationHandler handler; CXFInvocationHandlerData data; public InvokingInvocationHandlerTest() { super(); } @Before public void setUp() { super.setUp(); target = new TestTarget(); data = new CXFInvocationHandlerDataImpl(); data.setTarget(target); handler = new InvokingInvocationHandler(data); Class<?>[] interfaces = {TestInterface.class}; test = (TestInterface)Proxy.newProxyInstance(TestInterface.class.getClassLoader(), interfaces, handler); handler.getData().setTarget(target); CXFInvocationHandlerData data2 = new CXFInvocationHandlerDataImpl(); CXFInvocationHandler handler2 = new InvokingInvocationHandler(data2); test2 = (TestInterface)Proxy.newProxyInstance(TestInterface.class.getClassLoader(), interfaces, handler2); handler2.getData().setTarget(target); } /** * override this test - this handler is alway the last in the chain and is * responsible for delegating the invocation to the target object */ @Test public void testHandlerInvokesNext() throws Throwable { assertFalse("target method must not have be called", target.methodInvoked); handler.invoke(target, testMethod, new Object[0]); assertTrue("target method must be called", target.methodInvoked); } @Test public void testInvocationThroughProxy() throws IllegalArgumentException { assertFalse("target object must not have been invoked", target.methodInvoked); test.testMethod(); assertTrue("target object must be invoked", target.methodInvoked); } protected CXFInvocationHandler getHandler() { return handler; } }
3e1c117b90e23a44011c872d6bb2c276c3b10966
2,551
java
Java
Cosmos-Android/app/src/main/java/wannabit/io/cosmostaion/base/BaseDB.java
YANGHONGEUN/cosmostation-mobile
8f0e3adbbf99730222eff3327c0c5f42d305c0cc
[ "MIT" ]
1
2022-03-19T04:15:19.000Z
2022-03-19T04:15:19.000Z
Cosmos-Android/app/src/main/java/wannabit/io/cosmostaion/base/BaseDB.java
YANGHONGEUN/cosmostation-mobile
8f0e3adbbf99730222eff3327c0c5f42d305c0cc
[ "MIT" ]
null
null
null
Cosmos-Android/app/src/main/java/wannabit/io/cosmostaion/base/BaseDB.java
YANGHONGEUN/cosmostation-mobile
8f0e3adbbf99730222eff3327c0c5f42d305c0cc
[ "MIT" ]
null
null
null
47.240741
163
0.676205
11,899
package wannabit.io.cosmostaion.base; import android.content.Context; import net.sqlcipher.database.SQLiteDatabase; import net.sqlcipher.database.SQLiteOpenHelper; public class BaseDB extends SQLiteOpenHelper { private static BaseDB instance; static public synchronized BaseDB getInstance(Context context) { if (instance == null) { instance = new BaseDB(context, BaseConstant.DB_NAME, null, BaseConstant.DB_VERSION); } return instance; } public BaseDB(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) { super(context, name, factory, version); } @Override public void onCreate(SQLiteDatabase sqLiteDatabase) { sqLiteDatabase.execSQL("CREATE TABLE [" + BaseConstant.DB_TABLE_PASSWORD + "] ([id] INTEGER PRIMARY KEY AUTOINCREMENT, [resource] TEXT, [spec] TEXT)"); // sqLiteDatabase.execSQL("CREATE TABLE [" + BaseConstant.DB_TABLE_MNEMONIC + // "] ([id] INTEGER PRIMARY KEY AUTOINCREMENT, [uuid] TEXT, [resource] TEXT, [spec] TEXT, [dpMasterKey] TEXT, [typeSize] INTEGER)"); sqLiteDatabase.execSQL("CREATE TABLE [" + BaseConstant.DB_TABLE_ACCOUNT + "] ([id] INTEGER PRIMARY KEY AUTOINCREMENT, [uuid] TEXT, [nickName] TEXT, [isFavo] INTEGER DEFAULT 0, [address] TEXT, [baseChain] INTEGER, " + "[hasPrivateKey] INTEGER DEFAULT 0, [resource] TEXT, [spec] TEXT, [fromMnemonic] INTEGER DEFAULT 0, [path] TEXT, " + "[isValidator] INTEGER DEFAULT 0, [sequenceNumber] INTEGER, [accountNumber] INTEGER, [fetchTime] INTEGER, [msize] INTEGER, [importTime] INTEGER)"); sqLiteDatabase.execSQL("CREATE TABLE [" + BaseConstant.DB_TABLE_BALANCE + "] ([id] INTEGER PRIMARY KEY AUTOINCREMENT, [accountId] INTEGER, [symbol] TEXT, [balance] TEXT, [fetchTime] INTEGER)"); sqLiteDatabase.execSQL("CREATE TABLE [" + BaseConstant.DB_TABLE_BONDING + "] ([id] INTEGER PRIMARY KEY AUTOINCREMENT, [accountId] INTEGER, [validatorAddress] TEXT, [shares] TEXT, [fetchTime] INTEGER)"); sqLiteDatabase.execSQL("CREATE TABLE [" + BaseConstant.DB_TABLE_UNBONDING + "] ([id] INTEGER PRIMARY KEY AUTOINCREMENT, [accountId] INTEGER, [validatorAddress] TEXT, [creationHeight] TEXT, [completionTime] INTEGER, " + "[initialBalance] TEXT, [balance] TEXT, [fetchTime] INTEGER)"); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { } }
3e1c11f13927aa5c2781257aebaff5eb2ac0da56
450
java
Java
Java/src/No191.java
hxz1998/funny_leetcode
1d2c425af09b57a030fc018ddc1e1a5ffb966cd0
[ "Apache-2.0" ]
null
null
null
Java/src/No191.java
hxz1998/funny_leetcode
1d2c425af09b57a030fc018ddc1e1a5ffb966cd0
[ "Apache-2.0" ]
null
null
null
Java/src/No191.java
hxz1998/funny_leetcode
1d2c425af09b57a030fc018ddc1e1a5ffb966cd0
[ "Apache-2.0" ]
null
null
null
23.684211
64
0.555556
11,900
/* * Copyright (c) 2021, HuXiaozhong. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */ public class No191 { public int hammingWeight(int n) { int ans = 0, index = 0; while (index <= 31) { if ((n & (1 << index++)) != 0) ++ans; } return ans; } public static void main(String[] args) { System.out.println(new No191().hammingWeight(11)); } }
3e1c12581db94f2e747f03c9641a350f464aea12
956
java
Java
src/com/deskbill/domain/QueryForm.java
LIAILU526214/deskbill
d822d3ccf82367c1332834d34f0a983deecb794b
[ "Apache-2.0" ]
1
2020-07-16T15:37:50.000Z
2020-07-16T15:37:50.000Z
src/com/deskbill/domain/QueryForm.java
LIAILU/deskbill
d822d3ccf82367c1332834d34f0a983deecb794b
[ "Apache-2.0" ]
null
null
null
src/com/deskbill/domain/QueryForm.java
LIAILU/deskbill
d822d3ccf82367c1332834d34f0a983deecb794b
[ "Apache-2.0" ]
1
2020-07-16T15:37:54.000Z
2020-07-16T15:37:54.000Z
19.510204
74
0.660042
11,901
package com.deskbill.domain; /* * 将账务的查询条件,封装成对象 */ public class QueryForm { private String begin; private String end; private String parent; private String sname; public String getBegin() { return begin; } public void setBegin(String begin) { this.begin = begin; } public String getEnd() { return end; } public void setEnd(String end) { this.end = end; } public String getParent() { return parent; } public void setParent(String parent) { this.parent = parent; } public String getSname() { return sname; } public void setSname(String sname) { this.sname = sname; } public QueryForm(){} public QueryForm(String begin, String end, String parent, String sname) { super(); this.begin = begin; this.end = end; this.parent = parent; this.sname = sname; } @Override public String toString() { return "QueryForm [begin=" + begin + ", end=" + end + ", parent=" + parent + ", sname=" + sname + "]"; } }
3e1c125d7ea543b2b33aff39a1fe1c9bf3fcb66f
439
java
Java
com/bridgelabz/util/PrintThreeNames.java
aashishogale/BridgeLabz-Programs
383fb0333c4d114afcad1010af5ac439717032e6
[ "MIT" ]
null
null
null
com/bridgelabz/util/PrintThreeNames.java
aashishogale/BridgeLabz-Programs
383fb0333c4d114afcad1010af5ac439717032e6
[ "MIT" ]
null
null
null
com/bridgelabz/util/PrintThreeNames.java
aashishogale/BridgeLabz-Programs
383fb0333c4d114afcad1010af5ac439717032e6
[ "MIT" ]
null
null
null
27.4375
77
0.425968
11,902
/*************************************************************************** * Purpose : to Print three names in reverse order * *@author : Aashish *@version : 1.8.0 *@since : 08-08-2017 ****************************************************************************/ package com.bridgelabz.util; public class PrintThreeNames { public static void main(String args[]) { System.out.println("Hi "+args[2]+" "+args[1]+" "+args[0]); } }
3e1c1329c738d85fa6f1db037d7dc24c8e06354b
51,418
java
Java
aws-lib/src/test/java/com/streamsets/pipeline/stage/origin/s3/TestAmazonS3Source.java
Spantree/datacollector
db15ee0b9cceed954a1592e08b602224ad6c064d
[ "Apache-2.0" ]
1
2018-06-28T10:02:12.000Z
2018-06-28T10:02:12.000Z
aws-lib/src/test/java/com/streamsets/pipeline/stage/origin/s3/TestAmazonS3Source.java
Spantree/datacollector
db15ee0b9cceed954a1592e08b602224ad6c064d
[ "Apache-2.0" ]
null
null
null
aws-lib/src/test/java/com/streamsets/pipeline/stage/origin/s3/TestAmazonS3Source.java
Spantree/datacollector
db15ee0b9cceed954a1592e08b602224ad6c064d
[ "Apache-2.0" ]
1
2021-07-19T23:40:51.000Z
2021-07-19T23:40:51.000Z
45.139207
194
0.745516
11,903
/* * Copyright 2017 StreamSets Inc. * * 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.streamsets.pipeline.stage.origin.s3; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.client.builder.AwsClientBuilder; import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.AmazonS3ClientBuilder; import com.amazonaws.services.s3.iterable.S3Objects; import com.amazonaws.services.s3.model.ObjectMetadata; import com.amazonaws.services.s3.model.PutObjectRequest; import com.amazonaws.services.s3.model.S3ObjectSummary; import com.streamsets.pipeline.api.BatchMaker; import com.streamsets.pipeline.api.EventRecord; import com.streamsets.pipeline.api.Field; import com.streamsets.pipeline.api.OnRecordError; import com.streamsets.pipeline.api.Record; import com.streamsets.pipeline.api.Stage; import com.streamsets.pipeline.api.StageException; import com.streamsets.pipeline.config.CsvHeader; import com.streamsets.pipeline.config.DataFormat; import com.streamsets.pipeline.config.LogMode; import com.streamsets.pipeline.config.PostProcessingOptions; import com.streamsets.pipeline.lib.io.fileref.FileRefUtil; import com.streamsets.pipeline.sdk.SourceRunner; import com.streamsets.pipeline.sdk.StageRunner; import com.streamsets.pipeline.stage.common.AmazonS3TestSuite; import com.streamsets.pipeline.stage.common.HeaderAttributeConstants; import com.streamsets.pipeline.stage.common.TestUtil; import com.streamsets.pipeline.stage.lib.aws.AWSConfig; import com.streamsets.pipeline.stage.lib.aws.AWSRegions; import com.streamsets.pipeline.stage.lib.aws.AWSUtil; import com.streamsets.pipeline.stage.lib.aws.ProxyConfig; import com.streamsets.pipeline.stage.origin.lib.BasicConfig; import com.streamsets.pipeline.stage.origin.lib.DataParserFormatConfig; import org.apache.commons.lang3.tuple.Pair; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.List; import java.util.Map; public class TestAmazonS3Source extends AmazonS3TestSuite { private static AmazonS3 s3client; private static final String BUCKET_NAME = "mybucket"; private static final String PREFIX_NAME = "myprefix"; private static final String POSTPROCESS_BUCKET = "post-process-bucket"; private static final String POSTPROCESS_PREFIX = "post-process-prefix"; private static final String ERROR_BUCKET = "error-bucket"; private static final String ERROR_PREFIX = "error-prefix"; @BeforeClass public static void setUpClass() throws Exception { setupS3(); populateFakes3(); } @AfterClass public static void tearDownClass() { teardownS3(); } private static void populateFakes3() throws IOException, InterruptedException { BasicAWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); s3client = AmazonS3ClientBuilder .standard() .withCredentials(new AWSStaticCredentialsProvider(credentials)) .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("http://localhost:" + port, null)) .withPathStyleAccessEnabled(true) .withChunkedEncodingDisabled(true) .build(); TestUtil.createBucket(s3client, BUCKET_NAME); TestUtil.createBucket(s3client, POSTPROCESS_BUCKET); TestUtil.createBucket(s3client, ERROR_BUCKET); //create directory structure // mybucket/NorthAmerica/USA // mybucket/NorthAmerica/Canada // mybucket/folder //write 3 files each under myBucket, myBucket/NorthAmerica, mybucket/NorthAmerica/USA, mybucket/NorthAmerica/Canada //mybuckert/folder //15 files in total InputStream in = new ByteArrayInputStream("Hello World".getBytes()); PutObjectRequest putObjectRequest = new PutObjectRequest(BUCKET_NAME, "file1.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); in = new ByteArrayInputStream("Hello World".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "file2.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); in = new ByteArrayInputStream("Hello World".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "file3.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); in = new ByteArrayInputStream("Hello World".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "NorthAmerica/file4.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); in = new ByteArrayInputStream("Hello World".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "NorthAmerica/file5.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); in = new ByteArrayInputStream("Hello World".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "NorthAmerica/file6.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); //make sure files will have different timestamps. Thread.sleep(1000); in = new ByteArrayInputStream("Hello World".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "NorthAmerica/USA/file7.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); in = new ByteArrayInputStream("Hello World".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "NorthAmerica/USA/file8.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); in = new ByteArrayInputStream("Hello World".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "NorthAmerica/USA/file9.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); //make sure files will have different timestamps. Thread.sleep(1000); in = new ByteArrayInputStream("Hello World".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "NorthAmerica/Canada/file10.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); in = new ByteArrayInputStream("Hello World".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "NorthAmerica/Canada/file11.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); in = new ByteArrayInputStream("Hello World".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "NorthAmerica/Canada/file12.log", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); // CSV files in = new ByteArrayInputStream("A,B\n1,2,3\n4,5".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "csv/file0.csv", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); //Some txt files for whole file test in = new ByteArrayInputStream("Sample Text 1".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "folder/file1.txt", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); in = new ByteArrayInputStream("Sample Text 2".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "folder/file2.txt", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); in = new ByteArrayInputStream("Sample Text 3".getBytes()); putObjectRequest = new PutObjectRequest(BUCKET_NAME, "folder/file3.txt", in, new ObjectMetadata()); s3client.putObject(putObjectRequest); int count = 0; if(s3client.doesBucketExist(BUCKET_NAME)) { for(S3ObjectSummary s : S3Objects.withPrefix(s3client, BUCKET_NAME, "")) { System.out.println(s.getKey()); count++; } } Assert.assertEquals(16, count); // 16 files + 4 dirs } @Test public void testProduceFullFile() throws Exception { AmazonS3Source source = createSource(); SourceRunner runner = new SourceRunner.Builder(AmazonS3DSource.class, source).addOutputLane("lane").build(); runner.runInit(); try { BatchMaker batchMaker = SourceRunner.createTestBatchMaker("lane"); String offset = source.produce(null, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file1.log::-1::")); StageRunner.Output output = SourceRunner.getOutput(batchMaker); List<Record> records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); //produce records from next file batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file2.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); //produce records from next file batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file3.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file3.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(0, records.size()); } finally { runner.runDestroy(); } } @Test public void testNoMoreDataEvent() throws Exception { AmazonS3Source source = createSource(); SourceRunner runner = new SourceRunner.Builder(AmazonS3DSource.class, source).addOutputLane("lane").build(); runner.runInit(); try { BatchMaker batchMaker = SourceRunner.createTestBatchMaker("lane"); String offset = source.produce(null, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file1.log::-1::")); StageRunner.Output output = SourceRunner.getOutput(batchMaker); List<Record> records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); Assert.assertEquals(0, runner.getEventRecords().size()); //produce records from next file batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file2.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); Assert.assertEquals(0, runner.getEventRecords().size()); //produce records from next file batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file3.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); Assert.assertEquals(0, runner.getEventRecords().size()); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file3.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(0, records.size()); Assert.assertEquals(1, runner.getEventRecords().size()); EventRecord eventRecord = runner.getEventRecords().get(0); Assert.assertEquals("no-more-data", eventRecord.getEventType()); Assert.assertEquals("3", eventRecord.get("/file-count").getValueAsString()); Assert.assertEquals("3", eventRecord.get("/record-count").getValueAsString()); Assert.assertEquals("0", eventRecord.get("/error-count").getValueAsString()); } finally { runner.runDestroy(); } } @Test public void testProduceDelimitedFileWithRecoverableException() throws Exception { AmazonS3Source source = createSourceWithDelimited(); SourceRunner runner = new SourceRunner.Builder(AmazonS3DSource.class, source) .addOutputLane("lane") .setOnRecordError(OnRecordError.TO_ERROR) .build(); runner.runInit(); try { StageRunner.Output output = runner.runProduce(null, 60000); // Verify proper record List<Record> records = output.getRecords().get("lane"); Assert.assertNotNull(records); Assert.assertEquals(1, records.size()); // And error record records = runner.getErrorRecords(); Assert.assertEquals(1, records.size()); } finally { runner.runDestroy(); } } @Test public void testLexicographicalOrdering() throws Exception { AmazonS3Source source = createSourceWithLexicographicalOrdering(); SourceRunner runner = new SourceRunner.Builder(AmazonS3DSource.class, source).addOutputLane("lane").build(); runner.runInit(); try { //In lexicographical order, Canada/file*.log -> USA/file*.log -> file*.log are expected. BatchMaker batchMaker = SourceRunner.createTestBatchMaker("lane"); String offset = source.produce(null, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("Canada/file10.log::-1::")); StageRunner.Output output = SourceRunner.getOutput(batchMaker); List<Record> records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("Canada/file11.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("Canada/file12.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("USA/file7.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("USA/file8.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("USA/file9.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(null, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file4.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(null, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file5.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(null, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file6.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); } finally { runner.runDestroy(); } } @Test public void testProducePostProcessArchiveDiffBucket() throws Exception { AmazonS3Source source = createSourceArchiveDiffBucket(); SourceRunner runner = new SourceRunner.Builder(AmazonS3DSource.class, source).addOutputLane("lane").build(); runner.runInit(); try { int objectsInBucket = getObjectCount(s3client, BUCKET_NAME); int objectsInPostProcessBucket = getObjectCount(s3client, POSTPROCESS_BUCKET); Assert.assertEquals(0, objectsInPostProcessBucket); BatchMaker batchMaker = SourceRunner.createTestBatchMaker("lane"); String offset = source.produce(null, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file1.log::-1::")); StageRunner.Output output = SourceRunner.getOutput(batchMaker); List<Record> records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); //produce records from next file batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file2.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); //make sure the file is moved to post processing dir //files get moved when source requests new object from spooler. hence the check after the second call to produce Assert.assertEquals(objectsInBucket - 1, getObjectCount(s3client, BUCKET_NAME)); Assert.assertEquals(objectsInPostProcessBucket + 1, getObjectCount(s3client, POSTPROCESS_BUCKET)); //produce records from next file batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file3.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); //make sure the file is moved to post processing dir Assert.assertEquals(objectsInBucket - 2, getObjectCount(s3client, BUCKET_NAME)); Assert.assertEquals(objectsInPostProcessBucket + 2, getObjectCount(s3client, POSTPROCESS_BUCKET)); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file3.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(0, records.size()); Assert.assertEquals(objectsInBucket - 3, getObjectCount(s3client, BUCKET_NAME)); Assert.assertEquals(objectsInPostProcessBucket + 3, getObjectCount(s3client, POSTPROCESS_BUCKET)); } finally { runner.runDestroy(); } } @Test public void testProducePostProcessArchiveDiffPrefix() throws Exception { AmazonS3Source source = createSourceArchiveDiffPrefix(); SourceRunner runner = new SourceRunner.Builder(AmazonS3DSource.class, source).addOutputLane("lane").build(); runner.runInit(); try { int objectsInPrefix = getObjectCount(s3client, BUCKET_NAME, "NorthAmerica/USA"); int objectsInPostProcessPrefix = getObjectCount(s3client, BUCKET_NAME, POSTPROCESS_PREFIX); Assert.assertEquals(0, objectsInPostProcessPrefix); BatchMaker batchMaker = SourceRunner.createTestBatchMaker("lane"); String offset = source.produce(null, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file7.log::-1::")); StageRunner.Output output = SourceRunner.getOutput(batchMaker); List<Record> records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); //produce records from next file batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file8.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); //make sure the file is moved to post processing dir //files get moved when source requests new object from spooler. hence the check after the second call to produce Assert.assertEquals(objectsInPrefix - 1, getObjectCount(s3client, BUCKET_NAME, "NorthAmerica/USA")); Assert.assertEquals(objectsInPostProcessPrefix + 1, getObjectCount(s3client, BUCKET_NAME, POSTPROCESS_PREFIX)); //produce records from next file batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file9.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); //make sure the file is moved to post processing dir Assert.assertEquals(objectsInPrefix - 2, getObjectCount(s3client, BUCKET_NAME, "NorthAmerica/USA")); Assert.assertEquals(objectsInPostProcessPrefix + 2, getObjectCount(s3client, BUCKET_NAME, POSTPROCESS_PREFIX)); batchMaker = SourceRunner.createTestBatchMaker("lane"); offset = source.produce(offset, 60000, batchMaker); Assert.assertNotNull(offset); Assert.assertTrue(offset.contains("file9.log::-1::")); output = SourceRunner.getOutput(batchMaker); records = output.getRecords().get("lane"); Assert.assertEquals(0, records.size()); Assert.assertEquals(objectsInPrefix - 3, getObjectCount(s3client, BUCKET_NAME, "NorthAmerica/USA")); Assert.assertEquals(objectsInPostProcessPrefix + 3, getObjectCount(s3client, BUCKET_NAME, POSTPROCESS_PREFIX)); } finally { runner.runDestroy(); } } @Test public void testInvalidConfig() throws StageException { AmazonS3Source source = createSourceWithSameBucketsAndPrefix(); SourceRunner runner = new SourceRunner.Builder(AmazonS3DSource.class, source).addOutputLane("lane").build(); List<Stage.ConfigIssue> configIssues = runner.runValidateConfigs(); Assert.assertEquals(2, configIssues.size()); } @Test public void testInvalidErrorHandlingConfig() throws StageException { AmazonS3Source source = createSourceWithWrongErrorHandlingPostProcessing(); SourceRunner runner = new SourceRunner.Builder(AmazonS3DSource.class, source).addOutputLane("lane").build(); List<Stage.ConfigIssue> configIssues = runner.runValidateConfigs(); Assert.assertEquals(1, configIssues.size()); } @Test public void testValidConfig1() throws StageException { AmazonS3Source source = createSourceWithSameBucketDiffPrefix(); SourceRunner runner = new SourceRunner.Builder(AmazonS3DSource.class, source).addOutputLane("lane").build(); List<Stage.ConfigIssue> configIssues = runner.runValidateConfigs(); Assert.assertEquals(0, configIssues.size()); } @Test public void testValidConfig2() throws StageException { AmazonS3Source source = createSourceWithDiffBucketSamePrefix(); SourceRunner runner = new SourceRunner.Builder(AmazonS3DSource.class, source).addOutputLane("lane").build(); List<Stage.ConfigIssue> configIssues = runner.runValidateConfigs(); Assert.assertEquals(0, configIssues.size()); } @Test public void testNormalizePrefix() { String prefix = "/"; String delimiter = "/"; prefix = AWSUtil.normalizePrefix(prefix, delimiter); Assert.assertEquals("", prefix); prefix = "/foo"; delimiter = "/"; prefix = AWSUtil.normalizePrefix(prefix, delimiter); Assert.assertEquals("foo/", prefix); } @Test public void testWholeFile() throws Exception { AmazonS3Source source = createSourceWithWholeFile(); SourceRunner runner = new SourceRunner.Builder(AmazonS3DSource.class, source).addOutputLane("lane").build(); runner.runInit(); String lastOffset = null; try { Map<Pair<String, String>, S3ObjectSummary> s3ObjectSummaryMap = getObjectSummaries(s3client, BUCKET_NAME, "folder"); for (int i = 0; i < s3ObjectSummaryMap.size(); i++) { BatchMaker batchMaker = SourceRunner.createTestBatchMaker("lane"); lastOffset = source.produce(lastOffset, 1000, batchMaker); Assert.assertNotNull(lastOffset); StageRunner.Output output = SourceRunner.getOutput(batchMaker); List<Record> records = output.getRecords().get("lane"); Assert.assertEquals(1, records.size()); Record record = records.get(0); Assert.assertTrue(record.has(FileRefUtil.FILE_INFO_FIELD_PATH)); Assert.assertTrue(record.has(FileRefUtil.FILE_REF_FIELD_PATH)); Assert.assertTrue(record.has(FileRefUtil.FILE_INFO_FIELD_PATH + "/bucket")); Assert.assertTrue(record.has(FileRefUtil.FILE_INFO_FIELD_PATH + "/objectKey")); String objectKey = record.get(FileRefUtil.FILE_INFO_FIELD_PATH + "/objectKey").getValueAsString(); S3ObjectSummary objectSummary = s3ObjectSummaryMap.get(Pair.of(BUCKET_NAME, objectKey)); Record.Header header = record.getHeader(); Map<String, Object> metadata = AmazonS3Util.getMetaData( AmazonS3Util.getObject( s3client, objectSummary.getBucketName(), objectSummary.getKey(), false, () -> "", () -> "" ) ); for (Map.Entry<String, Object> metadataEntry : metadata.entrySet()) { if (!metadataEntry.getKey().equals("Content-Length")) { Assert.assertNotNull(header.getAttribute(metadataEntry.getKey())); String value = metadataEntry.getValue() != null ? metadataEntry.getValue().toString() : ""; Assert.assertEquals("Mismatch in header: " + metadataEntry.getKey(), value, header.getAttribute(metadataEntry.getKey())); Assert.assertTrue(record.has(FileRefUtil.FILE_INFO_FIELD_PATH + "/" + metadataEntry.getKey())); Field expectedValue = FileRefUtil.createFieldForMetadata(metadataEntry.getValue()); Assert.assertEquals("Mismatch in Field: " + metadataEntry.getKey(), expectedValue.getValue(), record.get(FileRefUtil.FILE_INFO_FIELD_PATH + "/" + metadataEntry.getKey()).getValue()); } } Assert.assertEquals(objectSummary.getKey(), header.getAttribute("Name")); Assert.assertTrue(record.has(FileRefUtil.FILE_INFO_FIELD_PATH + "/size")); Assert.assertTrue(record.has(FileRefUtil.FILE_INFO_FIELD_PATH + "/filename")); Assert.assertEquals(objectSummary.getSize(), record.get(FileRefUtil.FILE_INFO_FIELD_PATH + "/size").getValueAsLong()); Assert.assertEquals(objectSummary.getKey(), record.get(FileRefUtil.FILE_INFO_FIELD_PATH + "/" + HeaderAttributeConstants.FILE_NAME).getValueAsString()); } } finally { runner.runDestroy(); } } private AmazonS3Source createSource() { S3ConfigBean s3ConfigBean = new S3ConfigBean(); s3ConfigBean.basicConfig = new BasicConfig(); s3ConfigBean.basicConfig.maxWaitTime = 1000; s3ConfigBean.basicConfig.maxBatchSize = 60000; s3ConfigBean.sseConfig = new S3SSEConfigBean(); s3ConfigBean.sseConfig.useCustomerSSEKey = false; s3ConfigBean.dataFormatConfig = new DataParserFormatConfig(); s3ConfigBean.dataFormat = DataFormat.TEXT; s3ConfigBean.dataFormatConfig.charset = "UTF-8"; s3ConfigBean.dataFormatConfig.textMaxLineLen = 1024; s3ConfigBean.errorConfig = new S3ErrorConfig(); s3ConfigBean.errorConfig.errorHandlingOption = PostProcessingOptions.NONE; s3ConfigBean.errorConfig.errorPrefix = ERROR_PREFIX; s3ConfigBean.errorConfig.errorBucket = ERROR_BUCKET; s3ConfigBean.postProcessingConfig = new S3PostProcessingConfig(); s3ConfigBean.postProcessingConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.postProcessingConfig.postProcessing = PostProcessingOptions.NONE; s3ConfigBean.postProcessingConfig.postProcessBucket = POSTPROCESS_BUCKET; s3ConfigBean.postProcessingConfig.postProcessPrefix = POSTPROCESS_PREFIX; s3ConfigBean.s3FileConfig = new S3FileConfig(); s3ConfigBean.s3FileConfig.overrunLimit = 65; s3ConfigBean.s3FileConfig.prefixPattern = "*.log"; s3ConfigBean.s3FileConfig.objectOrdering = ObjectOrdering.TIMESTAMP; s3ConfigBean.s3Config = new S3ConnectionSourceConfig(); s3ConfigBean.s3Config.region = AWSRegions.OTHER; s3ConfigBean.s3Config.endpoint = "http://localhost:" + port; s3ConfigBean.s3Config.bucket = BUCKET_NAME; s3ConfigBean.s3Config.awsConfig = new AWSConfig(); s3ConfigBean.s3Config.awsConfig.awsAccessKeyId = () -> "foo"; s3ConfigBean.s3Config.awsConfig.awsSecretAccessKey = () -> "bar"; s3ConfigBean.s3Config.awsConfig.disableChunkedEncoding = true; s3ConfigBean.s3Config.commonPrefix = ""; s3ConfigBean.s3Config.delimiter = "/"; s3ConfigBean.proxyConfig = new ProxyConfig(); return new AmazonS3Source(s3ConfigBean); } private AmazonS3Source createSourceWithDelimited() { S3ConfigBean s3ConfigBean = new S3ConfigBean(); s3ConfigBean.basicConfig = new BasicConfig(); s3ConfigBean.basicConfig.maxWaitTime = 1000; s3ConfigBean.basicConfig.maxBatchSize = 60000; s3ConfigBean.sseConfig = new S3SSEConfigBean(); s3ConfigBean.sseConfig.useCustomerSSEKey = false; s3ConfigBean.dataFormatConfig = new DataParserFormatConfig(); s3ConfigBean.dataFormat = DataFormat.DELIMITED; s3ConfigBean.dataFormatConfig.charset = "UTF-8"; s3ConfigBean.dataFormatConfig.csvHeader = CsvHeader.WITH_HEADER; s3ConfigBean.errorConfig = new S3ErrorConfig(); s3ConfigBean.errorConfig.errorHandlingOption = PostProcessingOptions.NONE; s3ConfigBean.errorConfig.errorPrefix = ERROR_PREFIX; s3ConfigBean.errorConfig.errorBucket = ERROR_BUCKET; s3ConfigBean.postProcessingConfig = new S3PostProcessingConfig(); s3ConfigBean.postProcessingConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.postProcessingConfig.postProcessing = PostProcessingOptions.NONE; s3ConfigBean.postProcessingConfig.postProcessBucket = POSTPROCESS_BUCKET; s3ConfigBean.postProcessingConfig.postProcessPrefix = POSTPROCESS_PREFIX; s3ConfigBean.s3FileConfig = new S3FileConfig(); s3ConfigBean.s3FileConfig.overrunLimit = 65; s3ConfigBean.s3FileConfig.prefixPattern = "*.csv"; s3ConfigBean.s3FileConfig.objectOrdering = ObjectOrdering.TIMESTAMP; s3ConfigBean.s3Config = new S3ConnectionSourceConfig(); s3ConfigBean.s3Config.region = AWSRegions.OTHER; s3ConfigBean.s3Config.endpoint = "http://localhost:" + port; s3ConfigBean.s3Config.bucket = BUCKET_NAME; s3ConfigBean.s3Config.awsConfig = new AWSConfig(); s3ConfigBean.s3Config.awsConfig.awsAccessKeyId = () -> "foo"; s3ConfigBean.s3Config.awsConfig.awsSecretAccessKey = () -> "bar"; s3ConfigBean.s3Config.awsConfig.disableChunkedEncoding = true; s3ConfigBean.s3Config.commonPrefix = "csv"; s3ConfigBean.s3Config.delimiter = "/"; s3ConfigBean.proxyConfig = new ProxyConfig(); return new AmazonS3Source(s3ConfigBean); } private AmazonS3Source createSourceWithLexicographicalOrdering() { S3ConfigBean s3ConfigBean = new S3ConfigBean(); s3ConfigBean.basicConfig = new BasicConfig(); s3ConfigBean.basicConfig.maxWaitTime = 1000; s3ConfigBean.basicConfig.maxBatchSize = 60000; s3ConfigBean.sseConfig = new S3SSEConfigBean(); s3ConfigBean.sseConfig.useCustomerSSEKey = false; s3ConfigBean.dataFormatConfig = new DataParserFormatConfig(); s3ConfigBean.dataFormat = DataFormat.TEXT; s3ConfigBean.dataFormatConfig.charset = "UTF-8"; s3ConfigBean.dataFormatConfig.textMaxLineLen = 1024; s3ConfigBean.errorConfig = new S3ErrorConfig(); s3ConfigBean.errorConfig.errorHandlingOption = PostProcessingOptions.NONE; s3ConfigBean.errorConfig.errorPrefix = ERROR_PREFIX; s3ConfigBean.errorConfig.errorBucket = ERROR_BUCKET; s3ConfigBean.postProcessingConfig = new S3PostProcessingConfig(); s3ConfigBean.postProcessingConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.postProcessingConfig.postProcessing = PostProcessingOptions.NONE; s3ConfigBean.postProcessingConfig.postProcessBucket = POSTPROCESS_BUCKET; s3ConfigBean.postProcessingConfig.postProcessPrefix = POSTPROCESS_PREFIX; s3ConfigBean.s3FileConfig = new S3FileConfig(); s3ConfigBean.s3FileConfig.overrunLimit = 65; s3ConfigBean.s3FileConfig.prefixPattern = "**/*.log"; s3ConfigBean.s3FileConfig.objectOrdering = ObjectOrdering.LEXICOGRAPHICAL; s3ConfigBean.s3Config = new S3ConnectionSourceConfig(); s3ConfigBean.s3Config.region = AWSRegions.OTHER; s3ConfigBean.s3Config.endpoint = "http://localhost:" + port; s3ConfigBean.s3Config.bucket = BUCKET_NAME; s3ConfigBean.s3Config.awsConfig = new AWSConfig(); s3ConfigBean.s3Config.awsConfig.awsAccessKeyId = () -> "foo"; s3ConfigBean.s3Config.awsConfig.awsSecretAccessKey = () -> "bar"; s3ConfigBean.s3Config.awsConfig.disableChunkedEncoding = true; s3ConfigBean.s3Config.commonPrefix = "NorthAmerica"; s3ConfigBean.s3Config.delimiter = "/"; s3ConfigBean.proxyConfig = new ProxyConfig(); return new AmazonS3Source(s3ConfigBean); } private AmazonS3Source createSourceArchiveDiffBucket() { S3ConfigBean s3ConfigBean = new S3ConfigBean(); s3ConfigBean.basicConfig = new BasicConfig(); s3ConfigBean.basicConfig.maxWaitTime = 1000; s3ConfigBean.basicConfig.maxBatchSize = 60000; s3ConfigBean.sseConfig = new S3SSEConfigBean(); s3ConfigBean.sseConfig.useCustomerSSEKey = false; s3ConfigBean.dataFormatConfig = new DataParserFormatConfig(); s3ConfigBean.dataFormat = DataFormat.TEXT; s3ConfigBean.dataFormatConfig.charset = "UTF-8"; s3ConfigBean.dataFormatConfig.textMaxLineLen = 1024; s3ConfigBean.errorConfig = new S3ErrorConfig(); s3ConfigBean.errorConfig.errorHandlingOption = PostProcessingOptions.ARCHIVE; s3ConfigBean.errorConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.errorConfig.errorPrefix = ERROR_PREFIX; s3ConfigBean.errorConfig.errorBucket = ERROR_BUCKET; s3ConfigBean.postProcessingConfig = new S3PostProcessingConfig(); s3ConfigBean.postProcessingConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.postProcessingConfig.postProcessing = PostProcessingOptions.ARCHIVE; s3ConfigBean.postProcessingConfig.postProcessBucket = POSTPROCESS_BUCKET; s3ConfigBean.postProcessingConfig.postProcessPrefix = POSTPROCESS_PREFIX; s3ConfigBean.s3FileConfig = new S3FileConfig(); s3ConfigBean.s3FileConfig.overrunLimit = 65; s3ConfigBean.s3FileConfig.prefixPattern = "*.log"; s3ConfigBean.s3FileConfig.objectOrdering = ObjectOrdering.TIMESTAMP; s3ConfigBean.s3Config = new S3ConnectionSourceConfig(); s3ConfigBean.s3Config.region = AWSRegions.OTHER; s3ConfigBean.s3Config.endpoint = "http://localhost:" + port; s3ConfigBean.s3Config.bucket = BUCKET_NAME; s3ConfigBean.s3Config.awsConfig = new AWSConfig(); s3ConfigBean.s3Config.awsConfig.awsAccessKeyId = () -> "foo"; s3ConfigBean.s3Config.awsConfig.awsSecretAccessKey = () -> "bar"; s3ConfigBean.s3Config.awsConfig.disableChunkedEncoding = true; s3ConfigBean.s3Config.commonPrefix = ""; s3ConfigBean.s3Config.delimiter = "/"; s3ConfigBean.proxyConfig = new ProxyConfig(); return new AmazonS3Source(s3ConfigBean); } private AmazonS3Source createSourceArchiveDiffPrefix() { S3ConfigBean s3ConfigBean = new S3ConfigBean(); s3ConfigBean.basicConfig = new BasicConfig(); s3ConfigBean.basicConfig.maxWaitTime = 1000; s3ConfigBean.basicConfig.maxBatchSize = 60000; s3ConfigBean.sseConfig = new S3SSEConfigBean(); s3ConfigBean.sseConfig.useCustomerSSEKey = false; s3ConfigBean.dataFormatConfig = new DataParserFormatConfig(); s3ConfigBean.dataFormat = DataFormat.TEXT; s3ConfigBean.dataFormatConfig.charset = "UTF-8"; s3ConfigBean.dataFormatConfig.textMaxLineLen = 1024; s3ConfigBean.errorConfig = new S3ErrorConfig(); s3ConfigBean.errorConfig.errorHandlingOption = PostProcessingOptions.ARCHIVE; s3ConfigBean.errorConfig.archivingOption = S3ArchivingOption.MOVE_TO_PREFIX; s3ConfigBean.errorConfig.errorPrefix = ERROR_PREFIX; s3ConfigBean.postProcessingConfig = new S3PostProcessingConfig(); s3ConfigBean.postProcessingConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.postProcessingConfig.postProcessing = PostProcessingOptions.ARCHIVE; s3ConfigBean.postProcessingConfig.postProcessBucket = BUCKET_NAME; s3ConfigBean.postProcessingConfig.postProcessPrefix = POSTPROCESS_PREFIX; s3ConfigBean.s3FileConfig = new S3FileConfig(); s3ConfigBean.s3FileConfig.overrunLimit = 65; s3ConfigBean.s3FileConfig.prefixPattern = "*.log"; s3ConfigBean.s3FileConfig.objectOrdering = ObjectOrdering.TIMESTAMP; s3ConfigBean.s3Config = new S3ConnectionSourceConfig(); s3ConfigBean.s3Config.region = AWSRegions.OTHER; s3ConfigBean.s3Config.endpoint = "http://localhost:" + port; s3ConfigBean.s3Config.bucket = BUCKET_NAME; s3ConfigBean.s3Config.awsConfig = new AWSConfig(); s3ConfigBean.s3Config.awsConfig.awsAccessKeyId = () -> "foo"; s3ConfigBean.s3Config.awsConfig.awsSecretAccessKey = () -> "bar"; s3ConfigBean.s3Config.awsConfig.disableChunkedEncoding = true; s3ConfigBean.s3Config.commonPrefix = "NorthAmerica/USA/"; s3ConfigBean.s3Config.delimiter = "/"; s3ConfigBean.proxyConfig = new ProxyConfig(); return new AmazonS3Source(s3ConfigBean); } private AmazonS3Source createSourceWithSameBucketsAndPrefix() { S3ConfigBean s3ConfigBean = new S3ConfigBean(); s3ConfigBean.basicConfig = new BasicConfig(); s3ConfigBean.basicConfig.maxWaitTime = 1000; s3ConfigBean.basicConfig.maxBatchSize = 60000; s3ConfigBean.sseConfig = new S3SSEConfigBean(); s3ConfigBean.sseConfig.useCustomerSSEKey = false; s3ConfigBean.dataFormatConfig = new DataParserFormatConfig(); s3ConfigBean.dataFormat = DataFormat.LOG; s3ConfigBean.dataFormatConfig.charset = "UTF-8"; s3ConfigBean.dataFormatConfig.logMode = LogMode.COMMON_LOG_FORMAT; s3ConfigBean.dataFormatConfig.logMaxObjectLen = 1024; s3ConfigBean.errorConfig = new S3ErrorConfig(); s3ConfigBean.errorConfig.errorHandlingOption = PostProcessingOptions.ARCHIVE; s3ConfigBean.errorConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.errorConfig.errorPrefix = PREFIX_NAME; s3ConfigBean.errorConfig.errorBucket = BUCKET_NAME; s3ConfigBean.postProcessingConfig = new S3PostProcessingConfig(); s3ConfigBean.postProcessingConfig.postProcessing = PostProcessingOptions.ARCHIVE; s3ConfigBean.postProcessingConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.postProcessingConfig.postProcessBucket = BUCKET_NAME; s3ConfigBean.postProcessingConfig.postProcessPrefix = PREFIX_NAME; s3ConfigBean.s3FileConfig = new S3FileConfig(); s3ConfigBean.s3FileConfig.overrunLimit = 65; s3ConfigBean.s3FileConfig.prefixPattern = "*.log"; s3ConfigBean.s3FileConfig.objectOrdering = ObjectOrdering.TIMESTAMP; s3ConfigBean.s3Config = new S3ConnectionSourceConfig(); s3ConfigBean.s3Config.region = AWSRegions.OTHER; s3ConfigBean.s3Config.endpoint = "http://localhost:" + port; s3ConfigBean.s3Config.bucket = BUCKET_NAME; s3ConfigBean.s3Config.awsConfig = new AWSConfig(); s3ConfigBean.s3Config.awsConfig.awsAccessKeyId = () -> "vqbpgud2ghvjgm1n5hdgjnn5818fzsf2"; s3ConfigBean.s3Config.awsConfig.awsSecretAccessKey = () -> "vqbpgud2ghvjgm1n5hdgjnn5818fzsf2 vqbpgud2ghvjgm1n5hdgjnn5818fzsf2"; s3ConfigBean.s3Config.awsConfig.disableChunkedEncoding = true; s3ConfigBean.s3Config.commonPrefix = PREFIX_NAME; s3ConfigBean.s3Config.delimiter = "/"; s3ConfigBean.proxyConfig = new ProxyConfig(); return new AmazonS3Source(s3ConfigBean); } private AmazonS3Source createSourceWithSameBucketDiffPrefix() { S3ConfigBean s3ConfigBean = new S3ConfigBean(); s3ConfigBean.basicConfig = new BasicConfig(); s3ConfigBean.basicConfig.maxWaitTime = 1000; s3ConfigBean.basicConfig.maxBatchSize = 60000; s3ConfigBean.sseConfig = new S3SSEConfigBean(); s3ConfigBean.sseConfig.useCustomerSSEKey = false; s3ConfigBean.dataFormatConfig = new DataParserFormatConfig(); s3ConfigBean.dataFormat = DataFormat.LOG; s3ConfigBean.dataFormatConfig.charset = "UTF-8"; s3ConfigBean.dataFormatConfig.logMode = LogMode.COMMON_LOG_FORMAT; s3ConfigBean.dataFormatConfig.logMaxObjectLen = 1024; s3ConfigBean.errorConfig = new S3ErrorConfig(); s3ConfigBean.errorConfig.errorHandlingOption = PostProcessingOptions.ARCHIVE; s3ConfigBean.errorConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.errorConfig.errorPrefix = "test-error-prefix1/"; s3ConfigBean.errorConfig.errorBucket = BUCKET_NAME; s3ConfigBean.postProcessingConfig = new S3PostProcessingConfig(); s3ConfigBean.postProcessingConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.postProcessingConfig.postProcessing = PostProcessingOptions.ARCHIVE; s3ConfigBean.postProcessingConfig.postProcessBucket = BUCKET_NAME; s3ConfigBean.postProcessingConfig.postProcessPrefix = "test-error-prefix2/"; s3ConfigBean.s3FileConfig = new S3FileConfig(); s3ConfigBean.s3FileConfig.overrunLimit = 65; s3ConfigBean.s3FileConfig.prefixPattern = "*.log"; s3ConfigBean.s3FileConfig.objectOrdering = ObjectOrdering.TIMESTAMP; s3ConfigBean.s3Config = new S3ConnectionSourceConfig(); s3ConfigBean.s3Config.region = AWSRegions.OTHER; s3ConfigBean.s3Config.endpoint = "http://localhost:" + port; s3ConfigBean.s3Config.bucket = BUCKET_NAME; s3ConfigBean.s3Config.awsConfig = new AWSConfig(); s3ConfigBean.s3Config.awsConfig.awsAccessKeyId = () -> "vqbpgud2ghvjgm1n5hdgjnn5818fzsf2"; s3ConfigBean.s3Config.awsConfig.awsSecretAccessKey = () -> "vqbpgud2ghvjgm1n5hdgjnn5818fzsf2 vqbpgud2ghvjgm1n5hdgjnn5818fzsf2"; s3ConfigBean.s3Config.awsConfig.disableChunkedEncoding = true; s3ConfigBean.s3Config.commonPrefix = "test-error-prefix3/"; s3ConfigBean.s3Config.delimiter = "/"; s3ConfigBean.proxyConfig = new ProxyConfig(); return new AmazonS3Source(s3ConfigBean); } private AmazonS3Source createSourceWithDiffBucketSamePrefix() { S3ConfigBean s3ConfigBean = new S3ConfigBean(); s3ConfigBean.basicConfig = new BasicConfig(); s3ConfigBean.basicConfig.maxWaitTime = 1000; s3ConfigBean.basicConfig.maxBatchSize = 60000; s3ConfigBean.sseConfig = new S3SSEConfigBean(); s3ConfigBean.sseConfig.useCustomerSSEKey = false; s3ConfigBean.dataFormatConfig = new DataParserFormatConfig(); s3ConfigBean.dataFormat = DataFormat.LOG; s3ConfigBean.dataFormatConfig.charset = "UTF-8"; s3ConfigBean.dataFormatConfig.logMode = LogMode.COMMON_LOG_FORMAT; s3ConfigBean.dataFormatConfig.logMaxObjectLen = 1024; s3ConfigBean.errorConfig = new S3ErrorConfig(); s3ConfigBean.errorConfig.errorHandlingOption = PostProcessingOptions.ARCHIVE; s3ConfigBean.errorConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.errorConfig.errorPrefix = PREFIX_NAME; s3ConfigBean.errorConfig.errorBucket = ERROR_BUCKET; s3ConfigBean.postProcessingConfig = new S3PostProcessingConfig(); s3ConfigBean.postProcessingConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.postProcessingConfig.postProcessing = PostProcessingOptions.ARCHIVE; s3ConfigBean.postProcessingConfig.postProcessBucket = POSTPROCESS_BUCKET; s3ConfigBean.postProcessingConfig.postProcessPrefix = PREFIX_NAME; s3ConfigBean.s3FileConfig = new S3FileConfig(); s3ConfigBean.s3FileConfig.overrunLimit = 65; s3ConfigBean.s3FileConfig.prefixPattern = "*.log"; s3ConfigBean.s3FileConfig.objectOrdering = ObjectOrdering.TIMESTAMP; s3ConfigBean.s3Config = new S3ConnectionSourceConfig(); s3ConfigBean.s3Config.region = AWSRegions.OTHER; s3ConfigBean.s3Config.endpoint = "http://localhost:" + port; s3ConfigBean.s3Config.bucket = BUCKET_NAME; s3ConfigBean.s3Config.awsConfig = new AWSConfig(); s3ConfigBean.s3Config.awsConfig.awsAccessKeyId = () -> "vqbpgud2ghvjgm1n5hdgjnn5818fzsf2"; s3ConfigBean.s3Config.awsConfig.awsSecretAccessKey = () -> "vqbpgud2ghvjgm1n5hdgjnn5818fzsf2 vqbpgud2ghvjgm1n5hdgjnn5818fzsf2"; s3ConfigBean.s3Config.awsConfig.disableChunkedEncoding = true; s3ConfigBean.s3Config.commonPrefix = PREFIX_NAME; s3ConfigBean.s3Config.delimiter = "/"; s3ConfigBean.proxyConfig = new ProxyConfig(); return new AmazonS3Source(s3ConfigBean); } private AmazonS3Source createSourceWithWrongErrorHandlingPostProcessing() { S3ConfigBean s3ConfigBean = new S3ConfigBean(); s3ConfigBean.basicConfig = new BasicConfig(); s3ConfigBean.basicConfig.maxWaitTime = 1000; s3ConfigBean.basicConfig.maxBatchSize = 60000; s3ConfigBean.sseConfig = new S3SSEConfigBean(); s3ConfigBean.sseConfig.useCustomerSSEKey = false; s3ConfigBean.dataFormatConfig = new DataParserFormatConfig(); s3ConfigBean.dataFormat = DataFormat.LOG; s3ConfigBean.dataFormatConfig.charset = "UTF-8"; s3ConfigBean.dataFormatConfig.logMode = LogMode.COMMON_LOG_FORMAT; s3ConfigBean.dataFormatConfig.logMaxObjectLen = 1024; s3ConfigBean.errorConfig = new S3ErrorConfig(); s3ConfigBean.errorConfig.errorHandlingOption = PostProcessingOptions.NONE; s3ConfigBean.postProcessingConfig = new S3PostProcessingConfig(); s3ConfigBean.postProcessingConfig.postProcessing = PostProcessingOptions.ARCHIVE; s3ConfigBean.postProcessingConfig.archivingOption = S3ArchivingOption.MOVE_TO_BUCKET; s3ConfigBean.postProcessingConfig.postProcessBucket = BUCKET_NAME; s3ConfigBean.postProcessingConfig.postProcessPrefix = POSTPROCESS_PREFIX; s3ConfigBean.s3FileConfig = new S3FileConfig(); s3ConfigBean.s3FileConfig.overrunLimit = 65; s3ConfigBean.s3FileConfig.prefixPattern = "*.log"; s3ConfigBean.s3FileConfig.objectOrdering = ObjectOrdering.TIMESTAMP; s3ConfigBean.s3Config = new S3ConnectionSourceConfig(); s3ConfigBean.s3Config.region = AWSRegions.OTHER; s3ConfigBean.s3Config.endpoint = "http://localhost:" + port; s3ConfigBean.s3Config.bucket = BUCKET_NAME; s3ConfigBean.s3Config.awsConfig = new AWSConfig(); s3ConfigBean.s3Config.awsConfig.awsAccessKeyId = () -> "vqbpgud2ghvjgm1n5hdgjnn5818fzsf2"; s3ConfigBean.s3Config.awsConfig.awsSecretAccessKey = () -> "vqbpgud2ghvjgm1n5hdgjnn5818fzsf2 vqbpgud2ghvjgm1n5hdgjnn5818fzsf2"; s3ConfigBean.s3Config.awsConfig.disableChunkedEncoding = true; s3ConfigBean.s3Config.commonPrefix = PREFIX_NAME; s3ConfigBean.s3Config.delimiter = "/"; s3ConfigBean.proxyConfig = new ProxyConfig(); return new AmazonS3Source(s3ConfigBean); } private AmazonS3Source createSourceWithWholeFile() { S3ConfigBean s3ConfigBean = new S3ConfigBean(); s3ConfigBean.basicConfig = new BasicConfig(); s3ConfigBean.basicConfig.maxWaitTime = 1000; s3ConfigBean.basicConfig.maxBatchSize = 60000; s3ConfigBean.sseConfig = new S3SSEConfigBean(); s3ConfigBean.sseConfig.useCustomerSSEKey = false; //include metadata in header. s3ConfigBean.enableMetaData = true; s3ConfigBean.dataFormatConfig = new DataParserFormatConfig(); //whole file s3ConfigBean.dataFormat = DataFormat.WHOLE_FILE; s3ConfigBean.dataFormatConfig.wholeFileMaxObjectLen = 2000; s3ConfigBean.errorConfig = new S3ErrorConfig(); s3ConfigBean.errorConfig.errorHandlingOption = PostProcessingOptions.NONE; s3ConfigBean.postProcessingConfig = new S3PostProcessingConfig(); s3ConfigBean.postProcessingConfig.postProcessing = PostProcessingOptions.NONE; s3ConfigBean.s3FileConfig = new S3FileConfig(); s3ConfigBean.s3FileConfig.overrunLimit = 65; s3ConfigBean.s3FileConfig.prefixPattern = "*.txt"; s3ConfigBean.s3FileConfig.objectOrdering = ObjectOrdering.TIMESTAMP; s3ConfigBean.s3Config = new S3ConnectionSourceConfig(); s3ConfigBean.s3Config.region = AWSRegions.OTHER; s3ConfigBean.s3Config.endpoint = "http://localhost:" + port; s3ConfigBean.s3Config.bucket = BUCKET_NAME; s3ConfigBean.s3Config.awsConfig = new AWSConfig(); s3ConfigBean.s3Config.awsConfig.awsAccessKeyId = () -> "vqbpgud2ghvjgm1n5hdgjnn5818fzsf2"; s3ConfigBean.s3Config.awsConfig.awsSecretAccessKey = () -> "vqbpgud2ghvjgm1n5hdgjnn5818fzsf2 vqbpgud2ghvjgm1n5hdgjnn5818fzsf2"; s3ConfigBean.s3Config.awsConfig.disableChunkedEncoding = true; s3ConfigBean.s3Config.commonPrefix = "folder"; s3ConfigBean.s3Config.delimiter = "/"; s3ConfigBean.proxyConfig = new ProxyConfig(); return new AmazonS3Source(s3ConfigBean); } private int getObjectCount(AmazonS3 s3Client, String bucket) { int count = 0; for(S3ObjectSummary ignored : S3Objects.inBucket(s3Client, bucket)) { count++; } return count; } private Map<Pair<String, String>, S3ObjectSummary> getObjectSummaries(AmazonS3 s3Client, String bucket, String prefix) { Map<Pair<String, String>, S3ObjectSummary> s3ObjectSummaries = new HashMap<>(); for(S3ObjectSummary s : S3Objects.withPrefix(s3Client, bucket, prefix)) { s3ObjectSummaries.put(Pair.of(bucket, s.getKey()), s); } return s3ObjectSummaries; } private int getObjectCount(AmazonS3 s3Client, String bucket, String prefix) { int count = 0; for(S3ObjectSummary ignored : S3Objects.withPrefix(s3Client, bucket, prefix)) { count++; } return count; } }
3e1c138a2140882beaff6b70c3b6b98049694360
6,432
java
Java
jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/ddl/schema/Runner.java
Pandrex247/patched-src-eclipselink
10bbc58df62fb4f4f7ac3d8cc531263d374f0d72
[ "BSD-3-Clause" ]
null
null
null
jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/ddl/schema/Runner.java
Pandrex247/patched-src-eclipselink
10bbc58df62fb4f4f7ac3d8cc531263d374f0d72
[ "BSD-3-Clause" ]
2
2021-03-24T17:58:46.000Z
2021-12-14T20:59:52.000Z
jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/ddl/schema/Runner.java
Pandrex247/patched-src-eclipselink
10bbc58df62fb4f4f7ac3d8cc531263d374f0d72
[ "BSD-3-Clause" ]
null
null
null
32.816327
97
0.684235
11,904
/******************************************************************************* * Copyright (c) 2013, 2017 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html * and the Eclipse Distribution License is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * 02/04/2013-2.5 Guy Pelletier * - 389090: JPA 2.1 DDL Generation Support ******************************************************************************/ package org.eclipse.persistence.testing.models.jpa22.advanced.ddl.schema; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.persistence.CollectionTable; import javax.persistence.Column; import javax.persistence.Convert; import javax.persistence.Converts; import javax.persistence.ElementCollection; import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.ForeignKey; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.MapKeyColumn; import javax.persistence.MapKeyJoinColumn; import javax.persistence.OneToMany; import javax.persistence.Table; import org.eclipse.persistence.testing.models.jpa22.advanced.converters.AccomplishmentConverter; import org.eclipse.persistence.testing.models.jpa22.advanced.converters.AgeConverter; import org.eclipse.persistence.testing.models.jpa22.advanced.converters.DateConverter; import org.eclipse.persistence.testing.models.jpa22.advanced.converters.DistanceConverter; import org.eclipse.persistence.testing.models.jpa22.advanced.converters.GenderConverter; import org.eclipse.persistence.testing.models.jpa22.advanced.converters.HealthConverter; import org.eclipse.persistence.testing.models.jpa22.advanced.converters.LevelConverter; import org.eclipse.persistence.testing.models.jpa22.advanced.converters.RunningStatusConverter; import org.eclipse.persistence.testing.models.jpa22.advanced.converters.TimeConverter; import org.eclipse.persistence.testing.models.jpa22.advanced.enums.Gender; import static javax.persistence.InheritanceType.JOINED; @Entity @Inheritance(strategy=JOINED) @Table(name="JPA22_DDL_RUNNER", schema="RUNNER") @Convert(attributeName = "accomplishments.key", converter = AccomplishmentConverter.class) @Convert(attributeName = "accomplishments", converter = DateConverter.class) @Convert(attributeName = "age", converter = AgeConverter.class) public class Runner extends Athlete { @Id @GeneratedValue protected Integer id; @Convert(converter=GenderConverter.class) protected Gender gender; @Embedded @Convert(attributeName = "level", converter = LevelConverter.class) @Convert(attributeName = "health", converter = HealthConverter.class) @Convert(attributeName = "status.runningStatus", converter = RunningStatusConverter.class) protected RunnerInfo info; @OneToMany(mappedBy="runner") @MapKeyJoinColumn( name="TAG_ID", foreignKey=@ForeignKey( name="Runner_ShoeTag_Foreign_Key", foreignKeyDefinition="FOREIGN KEY (TAG_ID) REFERENCES JPA22_DDL_SHOE_TAG (ID)" ) ) protected Map<ShoeTag, Shoe> shoes; @ManyToMany @JoinTable( name="JPA22_DDL_RUNNERS_RACES", schema="RUNNER", joinColumns=@JoinColumn( name="RUNNER_ID", referencedColumnName="ID", foreignKey=@ForeignKey( name="Runners_Races_Foreign_Key", foreignKeyDefinition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_DDL_RUNNER (ID)" ) ), inverseJoinColumns=@JoinColumn( name="RACE_ID", referencedColumnName="ID", foreignKey=@ForeignKey( name="Runners_Races_Inverse_Foreign_Key", foreignKeyDefinition="FOREIGN KEY (RACE_ID) REFERENCES JPA22_DDL_RACE (ID)" ) ) ) protected List<Race> races; @ElementCollection @Column(name="TIME") @MapKeyColumn(name="DISTANCE") @CollectionTable( name="JPA22_DDL_RUNNER_PBS", schema="RUNNER", joinColumns=@JoinColumn( name="RUNNER_ID", foreignKey=@ForeignKey( name="Runner_PBS_Foreign_Key", foreignKeyDefinition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_DDL_RUNNER (ID)" )) ) @Convert(attributeName="key", converter = DistanceConverter.class) @Convert(converter = TimeConverter.class) protected Map<String, String> personalBests; public Runner() { races = new ArrayList<>(); personalBests = new HashMap<>(); } public void addPersonalBest(String distance, String time) { personalBests.put(distance, time); } public void addRace(Race race) { races.add(race); } public Gender getGender() { return gender; } public Integer getId() { return id; } public RunnerInfo getInfo() { return info; } public Map<String, String> getPersonalBests() { return personalBests; } public List<Race> getRaces() { return races; } public Map<ShoeTag, Shoe> getShoes() { return shoes; } public boolean isFemale() { return gender.equals(Gender.Female); } public boolean isMale() { return gender.equals(Gender.Male); } public void setGender(Gender gender) { this.gender = gender; } public void setInfo(RunnerInfo info) { this.info = info; } public void setIsFemale() { this.gender = Gender.Female; } public void setIsMale() { this.gender = Gender.Male; } public void setPersonalBests(Map<String, String> personalBests) { this.personalBests = personalBests; } public void setRaces(List<Race> races) { this.races = races; } public void setShoes(Map<ShoeTag, Shoe> shoes) { this.shoes = shoes; } }
3e1c14062d77ab1c4ea9c93721d505af402df804
2,969
java
Java
software/cab2bAdmin/src/java/edu/wustl/cab2b/admin/searchdata/action/InterModelMatching.java
NCIP/cab2b
f4d8df98d0ccbf59dee026342096698053f25213
[ "BSD-3-Clause" ]
1
2021-04-28T22:08:40.000Z
2021-04-28T22:08:40.000Z
software/cab2bAdmin/src/java/edu/wustl/cab2b/admin/searchdata/action/InterModelMatching.java
NCIP/cab2b
f4d8df98d0ccbf59dee026342096698053f25213
[ "BSD-3-Clause" ]
null
null
null
software/cab2bAdmin/src/java/edu/wustl/cab2b/admin/searchdata/action/InterModelMatching.java
NCIP/cab2b
f4d8df98d0ccbf59dee026342096698053f25213
[ "BSD-3-Clause" ]
1
2018-03-27T00:53:31.000Z
2018-03-27T00:53:31.000Z
31.924731
79
0.749411
11,905
/*L * Copyright Georgetown University, Washington University. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/cab2b/LICENSE.txt for details. */ /** * */ package edu.wustl.cab2b.admin.searchdata.action; import static edu.wustl.cab2b.admin.util.AdminConstants.ATTRIBUTE_LIST1; import static edu.wustl.cab2b.admin.util.AdminConstants.ATTRIBUTE_LIST2; import static edu.wustl.cab2b.admin.util.AdminConstants.ATTRIBUTE_PAIR_SET; import static edu.wustl.cab2b.admin.util.AdminConstants.ENTITY1; import static edu.wustl.cab2b.admin.util.AdminConstants.ENTITY2; import static edu.wustl.cab2b.admin.util.AdminConstants.SOURCE_CLASS_ID; import static edu.wustl.cab2b.admin.util.AdminConstants.TARGET_CLASS_ID; import java.io.IOException; import java.util.Set; import edu.common.dynamicextensions.domaininterface.EntityInterface; import edu.wustl.cab2b.admin.action.BaseAction; import edu.wustl.cab2b.admin.util.AttributePair; import edu.wustl.cab2b.admin.util.InterModelConnectionsUtil; import edu.wustl.cab2b.common.cache.AbstractEntityCache; import edu.wustl.cab2b.common.util.Utility; /** * This class retrieves the matching attribute pairs of the selected entities. * * @author chetan_patil * */ public class InterModelMatching extends BaseAction { private static final long serialVersionUID = 1L; /* * (non-Javadoc) * * @see com.opensymphony.xwork2.ActionSupport#execute() */ /** * Main method gets called from Ajax call * * @return * @throws IOException */ public String execute() throws IOException { if (request.getParameter("newWindow") != null) { return SUCCESS; } AbstractEntityCache entityCache = AbstractEntityCache.getCache(); String sourceEntityId = ((Long) session.get(SOURCE_CLASS_ID)) .toString(); EntityInterface sourceEntity = entityCache.getEntityById(Long .valueOf(sourceEntityId)); String targetEntityId = ((Long) session.get(TARGET_CLASS_ID)) .toString(); EntityInterface targetEntity = entityCache.getEntityById(Long .valueOf(targetEntityId)); String returnAction = SUCCESS; try { Set<AttributePair> attributePairSet = InterModelConnectionsUtil .determineConnections(sourceEntity, targetEntity); session.put(ATTRIBUTE_PAIR_SET, attributePairSet); session.put(ATTRIBUTE_LIST1, sourceEntity.getAttributeCollection()); session.put(ATTRIBUTE_LIST2, targetEntity.getAttributeCollection()); String sourceEntityName = Utility.getDisplayName(sourceEntity); String targetEntityName = Utility.getDisplayName(targetEntity); session.put(ENTITY1, sourceEntityName); session.put(ENTITY2, targetEntityName); } catch (IllegalArgumentException e) { e.printStackTrace(); returnAction = e.getMessage(); } response.setContentType("text/html"); response.getWriter().write(returnAction); return null; } }
3e1c145b552a3b8055bc41e5eebf0a0097645982
3,248
java
Java
src/main/java/com/oxchains/bitcoin/util/JSON.java
investdigital/wallet-server
743f8f27222e39355dcba5b4669d9105af445ab4
[ "MIT" ]
3
2018-01-27T14:09:58.000Z
2018-06-06T08:35:35.000Z
src/main/java/com/oxchains/bitcoin/util/JSON.java
investdigital/wallet-server
743f8f27222e39355dcba5b4669d9105af445ab4
[ "MIT" ]
null
null
null
src/main/java/com/oxchains/bitcoin/util/JSON.java
investdigital/wallet-server
743f8f27222e39355dcba5b4669d9105af445ab4
[ "MIT" ]
2
2018-01-24T08:36:11.000Z
2021-02-18T08:32:16.000Z
26.193548
65
0.410714
11,906
package com.oxchains.bitcoin.util; import java.util.Date; import java.util.Map; /** * @author oxchains * @time 2017-10-30 9:51 * @nameJSON * @desc: */ public class JSON { public static String stringify(Object o) { if (o == null) { return "null"; } if ((o instanceof Number) || (o instanceof Boolean)) { return String.valueOf(o); } if (o instanceof Date) { return "new Date(" + ((Date) o).getTime() + ")"; } if (o instanceof Map) { return stringify((Map) o); } if (o instanceof Iterable) { return stringify((Iterable) o); } if (o instanceof Object[]) { return stringify((Object[]) o); } return stringify(String.valueOf(o)); } public static String stringify(Map m) { StringBuilder b = new StringBuilder(); b.append('{'); boolean first = true; for (Map.Entry e : ((Map<Object, Object>)m).entrySet()) { if (first) { first = false; }else { b.append(","); } b.append(stringify(e.getKey().toString())); b.append(':'); b.append(stringify(e.getValue())); } b.append('}'); return b.toString(); } public static String stringify(Iterable c) { StringBuilder b = new StringBuilder(); b.append('['); boolean first = true; for (Object o : c) { if (first) { first = false; }else { b.append(","); } b.append(stringify(o)); } b.append(']'); return b.toString(); } public static String stringify(Object[] c) { StringBuilder b = new StringBuilder(); b.append('['); boolean first = true; for (Object o : c) { if (first) { first = false; }else { b.append(","); } b.append(stringify(o)); } b.append(']'); return b.toString(); } public static String stringify(String s) { StringBuilder b = new StringBuilder(s.length() + 2); b.append('"'); for(; !s.isEmpty(); s = s.substring(1)) { char c = s.charAt(0); switch (c) { case '\t': b.append("\\t"); break; case '\r': b.append("\\r"); break; case '\n': b.append("\\n"); break; case '\f': b.append("\\f"); break; case '\b': b.append("\\b"); break; case '"': case '\\': b.append("\\"); b.append(c); break; default: b.append(c); } } b.append('"'); return b.toString(); } public static Object parse(String s) { return CrippledJavaScriptParser.parseJSExpr(s); } }
3e1c1464e44dcacc7535909169c096e2d26826a7
2,486
java
Java
chapter_004/ISP/src/main/java/ru/nivanov/MenuUnit.java
Piterski72/git_test
69a553860892613e22c16509b49876ad226e3d0e
[ "Apache-2.0" ]
9
2017-03-30T22:22:19.000Z
2018-09-02T09:59:39.000Z
chapter_004/ISP/src/main/java/ru/nivanov/MenuUnit.java
Piterski72/Java-a-to-z
69a553860892613e22c16509b49876ad226e3d0e
[ "Apache-2.0" ]
null
null
null
chapter_004/ISP/src/main/java/ru/nivanov/MenuUnit.java
Piterski72/Java-a-to-z
69a553860892613e22c16509b49876ad226e3d0e
[ "Apache-2.0" ]
null
null
null
20.048387
92
0.525744
11,907
package ru.nivanov; /** * Created by Nikolay Ivanov on 09.03.2017. */ public class MenuUnit implements MenuInfo, MenuAction { private String name; private String id; private MenuUnit prevUnit = null; private MenuUnit nextUnit = null; private MenuUnit subUnit = null; private MenuUnit superUnit = null; /** * Constructor for root element. * @param name .. * @param id .. */ MenuUnit(String id, String name) { this.name = name; this.id = id; } /** * Constructor for first element. * @param superUnit .. * @param id .. * @param name .. */ MenuUnit(MenuUnit superUnit, MenuUnit prev, String id, String name) { this.id = id; this.name = name; this.superUnit = superUnit; this.superUnit.subUnit = this; this.prevUnit = prev; } /** * Constructor for current element. * @param prev .. * @param id .. * @param name .. */ MenuUnit(MenuUnit prev, String id, String name) { this.id = id; this.name = name; this.prevUnit = prev; this.prevUnit.nextUnit = this; } /** * Name getter. * @return .. */ String getName() { return name; } /** * Previous member getter. * @return .. */ MenuUnit getPrevUnit() { return prevUnit; } /** * Next member getter. * @return .. */ MenuUnit getNextUnit() { return nextUnit; } /** * Sub member getter. * @return .. */ MenuUnit getSubUnit() { return subUnit; } /** * Super member getter. * @return .. */ MenuUnit getSuperUnit() { return superUnit; } @Override public void showInfo() { System.out.println(String.format("%s%s %s", decorateInfo(key()), getName(), key())); } @Override public String key() { return this.id; } @Override public void execute() { System.out.println(String.format("menu item: %s executing action ...", key())); } /** * Method for decorating info with "-" symbols. * @param input .. * @return .. */ private String decorateInfo(String input) { StringBuilder decorate = new StringBuilder(""); for (int i = 0; i < (input.length() - 2); i++) { decorate.append("-"); } return decorate.toString(); } }
3e1c15fbea34d6d47227307a45b55f2a3d9dd6de
13,610
java
Java
app/src/main/java/com/dese/diario/MyPublication.java
Dereckz/diarioPedagogico
c6a0f0da274b99ab21cdfb62ea1a8a11ea5d7edd
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/dese/diario/MyPublication.java
Dereckz/diarioPedagogico
c6a0f0da274b99ab21cdfb62ea1a8a11ea5d7edd
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/dese/diario/MyPublication.java
Dereckz/diarioPedagogico
c6a0f0da274b99ab21cdfb62ea1a8a11ea5d7edd
[ "Apache-2.0" ]
null
null
null
36.684636
139
0.543057
11,908
package com.dese.diario; import android.content.Context; import android.content.SharedPreferences; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.util.Log; import android.util.TypedValue; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import com.android.volley.AuthFailureError; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import com.dese.diario.Adapter.Adapter_File; import com.dese.diario.Adapter.Adapter_MyPubication; import com.dese.diario.POJOS.VariablesLogin; import com.dese.diario.Utils.Urls; import com.squareup.picasso.Picasso; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import de.hdodenhof.circleimageview.CircleImageView; public class MyPublication extends AppCompatActivity implements SwipeRefreshLayout.OnRefreshListener { //Theme SharedPreferences sharedPreferences; SharedPreferences.Editor editor; int theme; final String idpublicacion= "idpublicacion"; final String nombre= "nombre"; final String fecha="fecha"; final String titulo= "titulo"; final String idusuario= "idusuario"; final String padre= "padre"; final String foto= "foto"; final String observaciones="observaciones"; final String setimientos="sentimiento"; final String analisis="analisis"; final String evaluacion="evaluacion"; final String conclusiones="conclusion"; final String plan="planaccion"; ArrayList listpublicaciones; Adapter_MyPubication adapter; RecyclerView recyclerView; private SwipeRefreshLayout swipeContainer; LinearLayoutManager linearLayoutManager; CircleImageView imProfileMyPub; TextView tvUserMyPub; //Files private ArrayList<String> filename = new ArrayList<>(); private RecyclerView rcItems; private Adapter_File ia; private LinearLayout lyContentImagenDetail; String idepublicacion; @Override protected void onCreate(Bundle savedInstanceState) { theme(); super.onCreate(savedInstanceState); setContentView(R.layout.activity_my_publication); iniToolbar(); iniView(); initRecyclerView(); }//EndCreate private void iniToolbar() { Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); TypedValue typedValueColorPrimaryDark = new TypedValue(); MyPublication.this.getTheme().resolveAttribute(R.attr.colorPrimaryDark, typedValueColorPrimaryDark, true); final int colorPrimaryDark = typedValueColorPrimaryDark.data; if (Build.VERSION.SDK_INT >= 21) { getWindow().setStatusBarColor(colorPrimaryDark); } } private void iniView() { FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Snackbar.make(view, "Se cargo", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); listMyPublications(); //listarFile(idepublicacion); tvUserMyPub= (TextView) findViewById(R.id.tvUserMyPub); imProfileMyPub= (CircleImageView)findViewById(R.id.imProfileMyPub); //tvUserMyPub.setText(listpublicaciones.get(2).toString()); VariablesLogin variablesLogin= new VariablesLogin(); Picasso.with(MyPublication.this) .load(Urls.download+variablesLogin.getFoto()) .resize(200, 200) .centerCrop() .into( imProfileMyPub); } private void initRecyclerView() { swipeContainer = (SwipeRefreshLayout) findViewById(R.id.swlMyPublication); recyclerView = (RecyclerView)findViewById(R.id.rvMyPublication); linearLayoutManager= new LinearLayoutManager(this); recyclerView.setLayoutManager(linearLayoutManager); swipeContainer.setOnRefreshListener(this); swipeContainer.setColorSchemeResources(android.R.color.holo_blue_bright, android.R.color.holo_green_light, android.R.color.holo_orange_light, android.R.color.holo_red_light); } @Override public void onRefresh() { new Handler().postDelayed(new Runnable() { @Override public void run() { listMyPublications(); } }, 1000); } public void listMyPublications(){ VariablesLogin vl= new VariablesLogin(); final String id=vl.getIdusuario().toString(); RequestQueue queue = Volley.newRequestQueue(this); StringRequest stringRequest = new StringRequest(Request.Method.GET, Urls.listxiduser, new Response.Listener<String>() { @Override public void onResponse(String response) { //JSONArray jsonArray = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { try{ listpublicaciones = new ArrayList<>(); JSONArray jsonarray = new JSONArray(response); for (int i = 0; i < jsonarray.length(); i++) { JSONObject jsonobject = jsonarray.getJSONObject(i); // System.out.println(jsonobject); VariablesLogin varllogin=new VariablesLogin(); listpublicaciones.add(new com.dese.diario.Objects.MyPublication( jsonobject.getString(idpublicacion), jsonobject.getString(idusuario), jsonobject.getString(nombre), jsonobject.getString(foto), jsonobject.getString(fecha), jsonobject.getString(titulo), jsonobject.getString("cuenta"), jsonobject.getString(observaciones), jsonobject.getString(setimientos), jsonobject.getString(evaluacion), jsonobject.getString(analisis), jsonobject.getString(conclusiones), jsonobject.getString(plan), jsonobject.getString(padre))); adapter=new Adapter_MyPubication(listpublicaciones, MyPublication.this); recyclerView.setAdapter(adapter); tvUserMyPub.setText(jsonobject.getString(nombre)); idepublicacion= jsonobject.getString(idpublicacion); Picasso.with(MyPublication.this) .load(Urls.download+ jsonobject.getString(foto)) .resize(200, 200) .centerCrop() .into( imProfileMyPub); // listarFile(idepublicacion); } } catch (JSONException e){ Log.e(getString(R.string.UUUps), getString(R.string.Error)+e); } } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.e(getString(R.string.carita),getString(R.string.message_ocurrio_error)); } }){ /** * Passing some request headers */ @Override public Map<String, String> getHeaders() throws AuthFailureError { HashMap<String, String> headers = new HashMap<String, String>(); headers.put(idusuario, id); headers.put("Content-Type", "application/x-www-form-urlencoded"); return headers; } }; queue.add(stringRequest); // swipeContainer.setRefreshing(false); }// Fin conectionPublication public void listarFile( final String ide){ RequestQueue queue = Volley.newRequestQueue(MyPublication.this); StringRequest stringRequest = new StringRequest(Request.Method.GET, Urls.obtenerdetallepublicacion, new Response.Listener<String>() { @Override public void onResponse(String response) { //JSONArray jsonArray = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { try { // paths = new ArrayList<>(); JSONArray jsonarray = new JSONArray(response); for (int i = 0; i < jsonarray.length(); i++) { JSONObject jsonobject = jsonarray.getJSONObject(i); String file=jsonobject.getString("descripcion"); filename.add(file); if(file!=" "){ ia = new Adapter_File(filename, MyPublication.this); rcItems.setAdapter(ia); //rcItems.setItemAnimator(new DefaultItemAnimator()); //rcItems.setLayoutManager(new LinearLayoutManager(DetailPublication.this)); lyContentImagenDetail.setVisibility(View.VISIBLE); // rcItems.setItemAnimator(new DefaultItemAnimator()); //rcItems.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL)); // System.out.println(paths); } } } catch (JSONException e) { Log.e("Detail Publicacion", "Problema con" + e); } } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.e("Horror", "Response--->"+error); } } ) { /** * Passing some request headers */ @Override public Map<String, String> getHeaders() throws AuthFailureError { HashMap<String, String> headers = new HashMap<String, String>(); headers.put("idpublicacion", ide); //headers.put("Content-Type", "application/x-www-form-urlencoded"); return headers; } }; queue.add(stringRequest); } /*------------Theme choose by user--------------------*/ private void theme() { sharedPreferences = getSharedPreferences(getString(R.string.values), Context.MODE_PRIVATE); theme = sharedPreferences.getInt(getString(R.string.theme), 0); settingTheme(theme); } public void settingTheme(int theme) { switch (theme) { case 1: setTheme(R.style.AppTheme11); break; case 2: setTheme(R.style.AppTheme2); break; case 3: setTheme(R.style.AppTheme3); break; case 4: setTheme(R.style.AppTheme4); break; case 5: setTheme(R.style.AppTheme5); break; case 6: setTheme(R.style.AppTheme6); break; case 7: setTheme(R.style.AppTheme7); break; case 8: setTheme(R.style.AppTheme8); break; case 9: setTheme(R.style.AppTheme9); break; case 10: setTheme(R.style.AppTheme10); break; case 11: setTheme(R.style.AppTheme); break; default: setTheme(R.style.AppTheme); break; } } }
3e1c168b22b4c589585e0d27759c7581f9f8185a
387
java
Java
src/main/java/br/com/zupacademy/gabrielamartins/ecommerce/config/security/TokenResponse.java
gabrielamartinszup/orange-talents-07-template-ecommerce
baeaa51a31a00cd158014885fefd94cf01e2469b
[ "Apache-2.0" ]
null
null
null
src/main/java/br/com/zupacademy/gabrielamartins/ecommerce/config/security/TokenResponse.java
gabrielamartinszup/orange-talents-07-template-ecommerce
baeaa51a31a00cd158014885fefd94cf01e2469b
[ "Apache-2.0" ]
null
null
null
src/main/java/br/com/zupacademy/gabrielamartins/ecommerce/config/security/TokenResponse.java
gabrielamartinszup/orange-talents-07-template-ecommerce
baeaa51a31a00cd158014885fefd94cf01e2469b
[ "Apache-2.0" ]
null
null
null
17.590909
68
0.633075
11,909
package br.com.zupacademy.gabrielamartins.ecommerce.config.security; public class TokenResponse { private String token; private String tipo; public TokenResponse(String token, String tipo) { this.token = token; this.tipo = tipo; } public String getTipo() { return tipo; } public String getToken() { return token; } }
3e1c16f7526ecebe6a70d3542c628249ba0afd8b
3,595
java
Java
src/main/java/com/farmafene/commons/j2ee/tools/jca/geronimo3/GeronimoXAWorkFromIXAWorkAdapter.java
venanciolm/commons-j2ee-tools
36e76e994123c931da28d135aa8b0e70125bb8ef
[ "MIT" ]
null
null
null
src/main/java/com/farmafene/commons/j2ee/tools/jca/geronimo3/GeronimoXAWorkFromIXAWorkAdapter.java
venanciolm/commons-j2ee-tools
36e76e994123c931da28d135aa8b0e70125bb8ef
[ "MIT" ]
2
2021-09-11T14:54:44.000Z
2021-09-11T14:55:02.000Z
src/main/java/com/farmafene/commons/j2ee/tools/jca/geronimo3/GeronimoXAWorkFromIXAWorkAdapter.java
venanciolm/commons-j2ee-tools
36e76e994123c931da28d135aa8b0e70125bb8ef
[ "MIT" ]
null
null
null
32.981651
122
0.720445
11,910
/* * Copyright (c) 2009-2015 farmafene.com * All rights reserved. * * 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 com.farmafene.commons.j2ee.tools.jca.geronimo3; import javax.transaction.InvalidTransactionException; import javax.transaction.SystemException; import javax.transaction.xa.XAException; import javax.transaction.xa.Xid; import org.apache.geronimo.transaction.manager.ImportedTransactionActiveException; import org.apache.geronimo.transaction.manager.XAWork; import org.springframework.beans.factory.InitializingBean; import org.springframework.util.Assert; import com.farmafene.commons.j2ee.tools.jca.wm.IXAWorkAdapter; public class GeronimoXAWorkFromIXAWorkAdapter implements XAWork, InitializingBean { private IXAWorkAdapter iXAWorkAdapter = null; public GeronimoXAWorkFromIXAWorkAdapter() { } /** * {@inheritDoc} * * @see java.lang.Object#toString() */ @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()).append("={"); sb.append("}"); return sb.toString(); } /** * {@inheritDoc} * * @see org.apache.geronimo.transaction.manager.XAWork#begin(javax.transaction.xa.Xid, * long) */ @Override public void begin(final Xid xid, final long txTimeout) throws XAException, InvalidTransactionException, SystemException, ImportedTransactionActiveException { this.iXAWorkAdapter.begin(xid, txTimeout); } /** * {@inheritDoc} * * @see org.apache.geronimo.transaction.manager.XAWork#end(javax.transaction.xa.Xid) */ @Override public void end(final Xid xid) throws XAException, SystemException { this.iXAWorkAdapter.end(xid); } /** * {@inheritDoc} * * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ @Override public void afterPropertiesSet() throws Exception { Assert.notNull(this.iXAWorkAdapter, "Debe establecerse Un IXAWorkAdapter"); } /** * Devuelve el valor de la propiedad 'iXAWorkAdapter' * * @return Propiedad iXAWorkAdapter */ public IXAWorkAdapter getIXAWorkAdapter() { return this.iXAWorkAdapter; } /** * Asigna el valor de la propiedad 'iXAWorkAdapter' * @param iXAWorkAdapter valor que se le quiere dar a la propiedad * 'iXAWorkAdapter' */ public void setIXAWorkAdapter(final IXAWorkAdapter iXAWorkAdapter) { this.iXAWorkAdapter = iXAWorkAdapter; } }
3e1c17756163de7f5f01aa98519f048606e63b02
2,514
java
Java
webcurator-core/src/main/java/org/webcurator/auth/dbms/DebugDaoAuthenticationProvider.java
mbreemhaar/webcurator
bcf2dde1b2697fb0f46f246abfea0fb879d426e2
[ "Apache-2.0" ]
4
2020-11-12T21:09:38.000Z
2022-03-17T13:24:17.000Z
webcurator-core/src/main/java/org/webcurator/auth/dbms/DebugDaoAuthenticationProvider.java
mbreemhaar/webcurator
bcf2dde1b2697fb0f46f246abfea0fb879d426e2
[ "Apache-2.0" ]
47
2020-06-18T10:08:46.000Z
2022-03-31T17:57:32.000Z
webcurator-core/src/main/java/org/webcurator/auth/dbms/DebugDaoAuthenticationProvider.java
mbreemhaar/webcurator
bcf2dde1b2697fb0f46f246abfea0fb879d426e2
[ "Apache-2.0" ]
3
2020-12-07T13:45:16.000Z
2022-02-21T18:53:18.000Z
45.709091
120
0.735879
11,911
/* * Copyright 2006 The National Library of New Zealand * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.webcurator.auth.dbms; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.userdetails.UserDetails; /** * This is a test authentication provider and must NOT be used in production. * The authentication provider authenticates the user against the WCT datbase tables * and then prints out a set of debug information to the console. * This information will include the username and password in clear text. * @author bprice */ public class DebugDaoAuthenticationProvider extends DaoAuthenticationProvider { @Override protected void additionalAuthenticationChecks(UserDetails userDetails, UsernamePasswordAuthenticationToken authentication) throws AuthenticationException { System.out.println("User pwd: "+userDetails.getPassword()); System.out.println("Auth pwd raw: "+authentication.getCredentials().toString()); System.out.println("Auth pwd: "+getPasswordEncoder().encode(authentication.getCredentials().toString().trim())); System.out.println("Encoder: "+getPasswordEncoder()); String presentedPassword = authentication.getCredentials().toString(); if (!getPasswordEncoder().matches(presentedPassword, userDetails.getPassword())) { System.out.println("Authentication failed: password does not match stored value"); throw new BadCredentialsException(messages.getMessage( "AbstractUserDetailsAuthenticationProvider.badCredentials", "Bad credentials")); } } }
3e1c179605a0b6b51be2b813e46e08bc57612b3f
3,013
java
Java
src/main/java/com/ipincloud/iotbj/srv/service/impl/AlgorithmServiceImpl.java
qiangshuang/iotplatjava
e74a737bf54b6047a9efe8208c0fef17553fca7f
[ "Apache-2.0" ]
1
2020-07-31T02:48:00.000Z
2020-07-31T02:48:00.000Z
src/main/java/com/ipincloud/iotbj/srv/service/impl/AlgorithmServiceImpl.java
qiangshuang/iotplatjava
e74a737bf54b6047a9efe8208c0fef17553fca7f
[ "Apache-2.0" ]
2
2021-09-20T21:00:30.000Z
2022-02-09T22:27:41.000Z
src/main/java/com/ipincloud/iotbj/srv/service/impl/AlgorithmServiceImpl.java
qiangshuang/iotplatjava
e74a737bf54b6047a9efe8208c0fef17553fca7f
[ "Apache-2.0" ]
1
2020-08-04T05:35:50.000Z
2020-08-04T05:35:50.000Z
38.139241
299
0.727514
11,912
package com.ipincloud.iotbj.srv.service.impl; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import com.alibaba.fastjson.JSONObject; import com.ipincloud.iotbj.srv.domain.Algorithm; import com.ipincloud.iotbj.srv.dao.*; import com.ipincloud.iotbj.srv.service.AlgorithmService; import com.ipincloud.iotbj.utils.ParaUtils; //(Algorithm)算法 服务实现类 //generate by redcloud,2020-07-24 19:59:20 @Service("AlgorithmService") public class AlgorithmServiceImpl implements AlgorithmService { @Resource private AlgorithmDao algorithmDao; //@param id 主键 //@return 实例对象Algorithm @Override public Algorithm queryById(Long id){ return this.algorithmDao.queryById(id); } //@param jsonObj 过滤条件等 //@return 对象查询Algorithm 分页 @Override public Map algorithmList(JSONObject jsonObj){ int totalRec = this.algorithmDao.countAlgorithmList(jsonObj); jsonObj = ParaUtils.checkStartIndex(jsonObj,totalRec); List<Map> pageData = this.algorithmDao.algorithmList(jsonObj); Map retMap = new HashMap(); retMap.put("pageData",pageData); retMap.put("totalRec",totalRec); retMap.put("cp",jsonObj.get("cp")); retMap.put("rop",jsonObj.get("rop")); return retMap; } //@param jsonObj 调用参数 //@return 影响记录数 @Override @Transactional(isolation = Isolation.REPEATABLE_READ,propagation = Propagation.REQUIRED,rollbackFor = Exception.class) public Integer deletesAlgorithmInst(JSONObject jsonObj){ Integer delNum1 = this.algorithmDao.deletesInst(jsonObj); return delNum1; } //@param jsonObj 调用参数 //@return 实例对象Algorithm @Override public JSONObject addInst( JSONObject jsonObj){ jsonObj = ParaUtils.removeSurplusCol(jsonObj,"id,camera_id,algorithm_id,pushtime_start,pushtime_end,algorithm_title,camera_title,border,direction,distinguish,state,framerate,resolution,videoa,codec,algorithm_url,user_ids,user_titles,opentime"); this.algorithmDao.addInst(jsonObj); // jsonObj.put("id",genId); return jsonObj; } //@param jsonObj 调用参数 //@return 影响记录数Algorithm @Override public void updateInst(JSONObject jsonObj){ jsonObj = ParaUtils.removeSurplusCol(jsonObj,"id,camera_id,algorithm_id,pushtime_start,pushtime_end,algorithm_title,camera_title,border,direction,distinguish,state,framerate,resolution,videoa,codec,algorithm_url,user_ids,user_titles,opentime"); this.algorithmDao.updateInst(jsonObj); } //设备相关接口,参看api接口/algorithmopen //设备相关接口,参看api接口/algorithmclose //设备相关接口,参看api接口/algorithmrestart }
3e1c18e208df0ce1e4ad1217e0c91bb6c0e9ed6b
3,373
java
Java
src/main/java/de/adito/util/weak/MixedReferences.java
jboesl/weak
e3ba2eb5052a1e381975617775626c51f46c8b01
[ "MIT" ]
2
2017-03-10T17:21:08.000Z
2017-03-13T09:42:21.000Z
src/main/java/de/adito/util/weak/MixedReferences.java
jboesl/weak
e3ba2eb5052a1e381975617775626c51f46c8b01
[ "MIT" ]
null
null
null
src/main/java/de/adito/util/weak/MixedReferences.java
jboesl/weak
e3ba2eb5052a1e381975617775626c51f46c8b01
[ "MIT" ]
null
null
null
23.423611
120
0.622591
11,913
package de.adito.util.weak; import javax.annotation.*; import java.lang.ref.*; import java.util.*; /** * A bag that holds WeakReferences as well as plain Objects and notifies when there are elements available or when there * are no longer elements available. * * @author j.boesl, 08.11.16 */ public class MixedReferences<T> extends AbstractBag<T> { private final Set set; public MixedReferences() { set = new LinkedHashSet<>(); } public boolean isEmpty() { boolean empty; synchronized (set) { empty = set.isEmpty(); } return empty; } /** * Adds a Object to this Bag. The Object is stored weakly. * * @param pObject the Object to be added to this bag. */ public void addWeak(@Nonnull T pObject) { Objects.requireNonNull(pObject); boolean wasEmpty; synchronized (set) { wasEmpty = set.isEmpty(); set.add(WeakReferenceFactory.get().create(pObject, this::remove)); } if (wasEmpty) availabilityChanged(true); } /** * Adds a Object to this Bag. The Object is stored strongly. * * @param pObject the Object to be added to this bag. */ public void addStrong(@Nonnull T pObject) { Objects.requireNonNull(pObject); if (pObject instanceof WeakReference) throw new IllegalArgumentException("Weak references can't be added as strong ones."); boolean wasEmpty; synchronized (set) { wasEmpty = set.isEmpty(); set.add(pObject); } if (wasEmpty) availabilityChanged(true); } /** * @param pObject the Object to be removed. This Object can be the value of a WeakReference that is stored in this * bag or the object itself. */ public boolean remove(@Nonnull Object pObject) { boolean wasEmpty; boolean wasRemoved; boolean isEmpty; synchronized (set) { wasEmpty = set.isEmpty(); wasRemoved = set.remove(pObject); if (!wasRemoved) { Reference<T> reference = findReference(pObject); if (reference != null) wasRemoved = set.remove(reference); } isEmpty = set.isEmpty(); } if (!wasEmpty && isEmpty) availabilityChanged(false); return wasRemoved; } public void clear() { boolean wasEmpty; synchronized (set) { wasEmpty = set.isEmpty(); set.clear(); } if (!wasEmpty) availabilityChanged(false); } /** * Returns the reference that holds the given value. * * @param pObject the value. * @return the reference or null in case it was not found. */ @Nullable protected Reference<T> findReference(@Nonnull Object pObject) { Objects.requireNonNull(pObject); synchronized (set) { for (Object o : set) { if (o instanceof WeakReference && pObject.equals(((WeakReference) o).get())) return (Reference<T>) o; } } return null; } /** * @return a List of all Objects this bag contains. No WeakReferences are returned but just the plain objects. */ @Nonnull protected List<T> getObjects() { List<T> objects; synchronized (set) { objects = new ArrayList<>(set.size()); for (Object o : set) { if (o instanceof WeakReference) o = ((WeakReference) o).get(); if (o != null) objects.add((T) o); } } return objects; } }
3e1c19e8ea2c9516f4bc6048f2441fddf370c8cc
552
java
Java
src/main/java/com/mauriciotogneri/jsonschema/attributes/MaxPropertiesAttribute.java
vndly/json-schema
ce5d4739e5bb1ace6530c595cf9db6467b6c0577
[ "MIT" ]
null
null
null
src/main/java/com/mauriciotogneri/jsonschema/attributes/MaxPropertiesAttribute.java
vndly/json-schema
ce5d4739e5bb1ace6530c595cf9db6467b6c0577
[ "MIT" ]
null
null
null
src/main/java/com/mauriciotogneri/jsonschema/attributes/MaxPropertiesAttribute.java
vndly/json-schema
ce5d4739e5bb1ace6530c595cf9db6467b6c0577
[ "MIT" ]
null
null
null
26.285714
72
0.762681
11,914
package com.mauriciotogneri.jsonschema.attributes; import com.mauriciotogneri.jsonschema.json.JsonField; import com.mauriciotogneri.jsonschema.json.JsonPrimitive; import com.mauriciotogneri.jsonschema.support.PositiveNumber; public class MaxPropertiesAttribute implements Attribute { private final PositiveNumber value; public MaxPropertiesAttribute(PositiveNumber value) { this.value = value; } @Override public JsonField json() { return new JsonField("maxProperties", new JsonPrimitive(value)); } }
3e1c1a0a4db38c38d39d96404d550fa9f37d8041
1,875
java
Java
src/org/pikater/core/agents/system/manager/parser/ComputationOutputBuffer.java
school-engagements/pikater
eaeba78b49c73622fa2643d550d0a6f20e75282f
[ "Apache-2.0" ]
null
null
null
src/org/pikater/core/agents/system/manager/parser/ComputationOutputBuffer.java
school-engagements/pikater
eaeba78b49c73622fa2643d550d0a6f20e75282f
[ "Apache-2.0" ]
null
null
null
src/org/pikater/core/agents/system/manager/parser/ComputationOutputBuffer.java
school-engagements/pikater
eaeba78b49c73622fa2643d550d0a6f20e75282f
[ "Apache-2.0" ]
null
null
null
20.380435
90
0.590933
11,915
package org.pikater.core.agents.system.manager.parser; import org.pikater.core.agents.system.manager.graph.ComputationNode; /** * Interface for queues in computation graph * User: Kuba * Date: 10.5.2014 * Time: 12:03 */ public interface ComputationOutputBuffer<E> { /** * Has queue at least one element * @return True if has next element */ public boolean hasNext(); /** * Insert to queue * @param element Element to insert */ public void insert(E element); /** * Get next element * @return Next element */ public E getNext(); /** * Size of the queue * @return Elements in queue */ public int size(); /** * Gets source node of the queue (will insert elements) * @return Source of the queue */ public ComputationNode getSource(); /** * Sets source node * @param source Source node */ public void setSource(ComputationNode source); /** * Gets target node (will consume elements) * @return Target node */ public ComputationNode getTarget(); /** * Sets target node (will consume elements) */ public void setTarget(ComputationNode target); /** * Gets name of target input * @return Name of target input */ public String getTargetInput(); /** * Gets if queue is blocked - will not be registered by target - one hsot options etc. * @return True if blocked */ public boolean isBlocked(); /** * Sets blocked to true */ public void block(); /** * Sets block to false */ public void unblock(); /** * Gets isdata flag * @return True if isdata */ public boolean isData(); /** * Sets isData flag * @param data IsData flag */ public void setData(boolean data); }
3e1c1a0ae2f14f1a2a0f6b2bdd9691e1b8537779
793
java
Java
src/simulation/types/hierarchy/AbstractSequentialSimulation.java
rachelbransom/Cell-Society
2f2ba98bd86d7ef291a8b1dbedeb1aecac055807
[ "MIT" ]
null
null
null
src/simulation/types/hierarchy/AbstractSequentialSimulation.java
rachelbransom/Cell-Society
2f2ba98bd86d7ef291a8b1dbedeb1aecac055807
[ "MIT" ]
1
2016-10-13T16:29:20.000Z
2016-10-13T16:29:20.000Z
src/simulation/types/hierarchy/AbstractSequentialSimulation.java
rachelbransom/Cell-Society
2f2ba98bd86d7ef291a8b1dbedeb1aecac055807
[ "MIT" ]
null
null
null
24.030303
78
0.70744
11,916
package simulation.types.hierarchy; import java.util.HashSet; import java.util.Set; import cell.Actor; import cell.Cell; import grid.Grid; public abstract class AbstractSequentialSimulation extends AbstractSimulation{ private Set<Actor> myVisitedActors; public AbstractSequentialSimulation(Grid inputGrid) { super(inputGrid); myVisitedActors = new HashSet<>(); } @Override protected void updateGrid(){ // Update each cell, instead of in parrallel for (int i = 0; i < getSize(); i++) { for (int j = 0; j < getSize(); j++) { Cell currCell = getCurrGrid().getCell(i, j); if(!myVisitedActors.contains(currCell.getActor())) updateCell(getCurrGrid().getCell(i, j)); myVisitedActors.add(currCell.getActor()); } } myVisitedActors = new HashSet<>(); } }
3e1c1a0db974502db57df25c7182a5a67d0b0e53
1,297
java
Java
app/src/main/java/com/zjzy/morebit/pojo/number/NumberGoods.java
naojiangzhalie666/morebit-android-app
c889f6c3efdc3b96fbff48a23b0d01a65d6b8aa5
[ "Apache-2.0" ]
1
2021-12-19T14:38:16.000Z
2021-12-19T14:38:16.000Z
app/src/main/java/com/zjzy/morebit/pojo/number/NumberGoods.java
naojiangzhalie666/morebit-android-app
c889f6c3efdc3b96fbff48a23b0d01a65d6b8aa5
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/zjzy/morebit/pojo/number/NumberGoods.java
naojiangzhalie666/morebit-android-app
c889f6c3efdc3b96fbff48a23b0d01a65d6b8aa5
[ "Apache-2.0" ]
1
2021-12-19T14:38:18.000Z
2021-12-19T14:38:18.000Z
16.012346
67
0.563608
11,917
package com.zjzy.morebit.pojo.number; import com.chad.library.adapter.base.entity.MultiItemEntity; import java.io.Serializable; /** * 列表中会员商品item * Created by haiping.liu on 2019-12-11. */ public class NumberGoods implements Serializable, MultiItemEntity { /** * 商品Id */ private int id; /** * */ private String name; /** * 商品图片 */ private String picUrl; /** * 商品描述 */ private String brief; /** * 商品销售价格 */ private String retailPrice; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPicUrl() { return picUrl; } public void setPicUrl(String picUrl) { this.picUrl = picUrl; } public String getBrief() { return brief; } public void setBrief(String brief) { this.brief = brief; } public String getRetailPrice() { return retailPrice; } public void setRetailPrice(String retailPrice) { this.retailPrice = retailPrice; } @Override public int getItemType() { return 0; } }
3e1c1a7d4817e0e692601651570cdd583808502f
523
java
Java
src/nb/barmie/exceptions/BaRMIeIllegalArgumentException.java
wdahlenburg/BaRMIe
41f2f0b587ed2fe008271e1f7b5ddec82ac0a0af
[ "MIT" ]
623
2017-09-25T00:43:30.000Z
2022-03-31T02:39:33.000Z
src/nb/barmie/exceptions/BaRMIeIllegalArgumentException.java
wdahlenburg/BaRMIe
41f2f0b587ed2fe008271e1f7b5ddec82ac0a0af
[ "MIT" ]
4
2018-10-31T00:54:36.000Z
2021-11-07T18:45:21.000Z
src/nb/barmie/exceptions/BaRMIeIllegalArgumentException.java
wdahlenburg/BaRMIe
41f2f0b587ed2fe008271e1f7b5ddec82ac0a0af
[ "MIT" ]
97
2017-09-25T08:34:03.000Z
2022-03-20T14:55:50.000Z
29.055556
73
0.596558
11,918
package nb.barmie.exceptions; /*********************************************************** * Exception thrown if invalid command line arguments are * passed in. * * Written by Nicky Bloor (@NickstaDB). **********************************************************/ public class BaRMIeIllegalArgumentException extends BaRMIeException { public BaRMIeIllegalArgumentException(String message) { super(message); } public BaRMIeIllegalArgumentException(String message, Throwable cause) { super(message, cause); } }
3e1c1b0c65cc77c6eca79bdc18fd1a187cf15b38
3,249
java
Java
src/main/java/com/ikkiking/service/SettingsService.java
IkkiKing/SkillboxDiplom
4163e90d05993300f1d03f6941edfb9f7e1220a0
[ "Unlicense" ]
null
null
null
src/main/java/com/ikkiking/service/SettingsService.java
IkkiKing/SkillboxDiplom
4163e90d05993300f1d03f6941edfb9f7e1220a0
[ "Unlicense" ]
2
2020-11-17T15:01:36.000Z
2021-01-16T08:17:27.000Z
src/main/java/com/ikkiking/service/SettingsService.java
IkkiKing/SkillboxDiplom
4163e90d05993300f1d03f6941edfb9f7e1220a0
[ "Unlicense" ]
null
null
null
35.703297
93
0.620191
11,919
package com.ikkiking.service; import com.ikkiking.api.request.SettingsRequest; import com.ikkiking.api.response.SettingsResponse; import com.ikkiking.model.GlobalSettings; import com.ikkiking.repository.GlobalSettingsRepository; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.Optional; @Service @Slf4j public class SettingsService { @Autowired private GlobalSettingsRepository globalSettingsRepository; /** * Глобальные настройки блога. */ public ResponseEntity<SettingsResponse> globalSettings() { SettingsResponse settingsResponse = new SettingsResponse(); List<GlobalSettings> globalSettingsList = globalSettingsRepository.findAll(); globalSettingsList.forEach(setting -> { switch (setting.getCode()) { case "MULTIUSER_MODE": settingsResponse.setMultiUserMode(setting.getValue().equals("YES")); break; case "POST_PREMODERATION": settingsResponse.setPostPremoderation(setting.getValue().equals("YES")); break; case "STATISTICS_IS_PUBLIC": settingsResponse.setStatisticsIsPublic(setting.getValue().equals("YES")); break; default: log.warn("UNKNOWN SETTING: " + setting.getCode()); } }); return ResponseEntity.ok(settingsResponse); } /** * Вспомогательный метод получения настройки из БД. */ public static boolean getSettingsValue(GlobalSettingsRepository globalSettingsRepository, String code) { boolean value = false; Optional<GlobalSettings> valueDb = globalSettingsRepository.findByCode(code); if (valueDb.isPresent()) { if (valueDb.get().getValue().equals("YES")) { value = true; } } return value; } /** * Управление настройками блога. */ @Transactional public void settings(@RequestBody SettingsRequest settingsRequest) { List<GlobalSettings> globalSettings = globalSettingsRepository.findAll(); globalSettings.forEach(setting -> { switch (setting.getCode()) { case "MULTIUSER_MODE": setting.setValue(settingsRequest.isMultiUserMode() ? "YES" : "NO"); break; case "POST_PREMODERATION": setting.setValue(settingsRequest.isPostPreModeration() ? "YES" : "NO"); break; case "STATISTICS_IS_PUBLIC": setting.setValue(settingsRequest.isStatisticIsPublic() ? "YES" : "NO"); break; default: log.warn("UNKNOWN SETTING: " + setting.getCode()); } }); globalSettingsRepository.saveAll(globalSettings); } }
3e1c1dd1b4f0c1a3deb6165fb23f350f05657bbe
727
java
Java
src/test/java/seedu/flashnotes/logic/commands/HelpCommandTest.java
rachel170/tp
1433f3588d2cccb36b04b7cc5da794691aef92aa
[ "MIT" ]
null
null
null
src/test/java/seedu/flashnotes/logic/commands/HelpCommandTest.java
rachel170/tp
1433f3588d2cccb36b04b7cc5da794691aef92aa
[ "MIT" ]
177
2020-09-20T10:40:04.000Z
2020-11-08T15:47:36.000Z
src/test/java/seedu/flashnotes/logic/commands/HelpCommandTest.java
rachel170/tp
1433f3588d2cccb36b04b7cc5da794691aef92aa
[ "MIT" ]
3
2020-09-16T08:42:05.000Z
2020-09-18T13:33:26.000Z
34.619048
116
0.788171
11,920
package seedu.flashnotes.logic.commands; import static seedu.flashnotes.logic.commands.CommandTestUtil.assertCommandSuccess; import static seedu.flashnotes.logic.commands.HelpCommand.SHOWING_HELP_MESSAGE; import org.junit.jupiter.api.Test; import seedu.flashnotes.model.Model; import seedu.flashnotes.model.ModelManager; public class HelpCommandTest { private Model model = new ModelManager(); private Model expectedModel = new ModelManager(); @Test public void execute_help_success() { CommandResult expectedCommandResult = new CommandResult(SHOWING_HELP_MESSAGE, true, false, false, false, 0); assertCommandSuccess(new HelpCommand(), model, expectedCommandResult, expectedModel); } }
3e1c1f2ab2fecca0adfe76956079f9c28fb2134f
14,363
java
Java
src/main/java/com/microsoft/bingads/v13/internal/bulk/CsvHeaders.java
vtabel7403/BingAds-Java-SDK
8034545104888c147ca73b63d93fcf99b79f9fdf
[ "MIT" ]
null
null
null
src/main/java/com/microsoft/bingads/v13/internal/bulk/CsvHeaders.java
vtabel7403/BingAds-Java-SDK
8034545104888c147ca73b63d93fcf99b79f9fdf
[ "MIT" ]
null
null
null
src/main/java/com/microsoft/bingads/v13/internal/bulk/CsvHeaders.java
vtabel7403/BingAds-Java-SDK
8034545104888c147ca73b63d93fcf99b79f9fdf
[ "MIT" ]
null
null
null
32.71754
119
0.590058
11,921
package com.microsoft.bingads.v13.internal.bulk; import java.util.HashMap; import java.util.Map; /** * Creates and provides a column name to positional index mapping */ public class CsvHeaders { public final static String[] HiddenHeaders = {}; public final static String[] Headers = new String[]{ // common StringTable.Type, StringTable.Status, StringTable.Id, StringTable.ParentId, StringTable.SubType, StringTable.Campaign, StringTable.AdGroup, StringTable.Website, StringTable.SyncTime, StringTable.ClientId, StringTable.LastModifiedTime, // campaign StringTable.TimeZone, StringTable.BudgetId, StringTable.BudgetName, StringTable.Budget, StringTable.BudgetType, // Ad Group StringTable.StartDate, StringTable.EndDate, StringTable.NetworkDistribution, StringTable.AdRotation, StringTable.CpcBid, StringTable.ContentBid, StringTable.Language, StringTable.PrivacyStatus, StringTable.AdGroupType, // Ads StringTable.Title, StringTable.Text, StringTable.DisplayUrl, StringTable.DestinationUrl, StringTable.BusinessName, StringTable.PhoneNumber, StringTable.PromotionalText, StringTable.EditorialStatus, StringTable.EditorialLocation, StringTable.EditorialTerm, StringTable.EditorialReasonCode, StringTable.EditorialAppealStatus, StringTable.DevicePreference, // Keywords StringTable.Keyword, StringTable.MatchType, StringTable.Bid, StringTable.Param1, StringTable.Param2, StringTable.Param3, // location target StringTable.Target, StringTable.TargetAll, StringTable.BidAdjustment, StringTable.RadiusTargetId, StringTable.Name, StringTable.OsNames, StringTable.Radius, StringTable.Unit, StringTable.BusinessId, // DayTime target StringTable.FromHour, StringTable.FromMinute, StringTable.ToHour, StringTable.ToMinute, // Profile Criterion StringTable.Profile, StringTable.ProfileId, // AdExtensions common StringTable.Version, StringTable.AdSchedule, // Use Searcher Time Zone StringTable.UseSearcherTimeZone, StringTable.AdScheduleUseSearcherTimeZone, // Action ad extension StringTable.ActionType, StringTable.ActionText, // Site link ad extensions StringTable.SiteLinkExtensionOrder, StringTable.SiteLinkDisplayText, StringTable.SiteLinkDestinationUrl, StringTable.SiteLinkDescription1, StringTable.SiteLinkDescription2, // Location ad extensions StringTable.GeoCodeStatus, StringTable.IconMediaId, StringTable.ImageMediaId, StringTable.AddressLine1, StringTable.AddressLine2, StringTable.PostalCode, StringTable.City, StringTable.StateOrProvince, StringTable.ProvinceName, StringTable.Latitude, StringTable.Longitude, // Call ad extensions StringTable.CountryCode, StringTable.IsCallOnly, StringTable.IsCallTrackingEnabled, StringTable.RequireTollFreeTrackingNumber, // Image ad extension StringTable.AltText, StringTable.MediaIds, // Flyer ad extension StringTable.FlyerName, StringTable.MediaUrls, // Editorial rejection reasons StringTable.PublisherCountries, StringTable.Layouts, StringTable.DisplayText, // Filter link ad extension StringTable.AdExtensionHeaderType, StringTable.Texts, // Product target StringTable.MerchantCenterId, StringTable.ProductCondition1, StringTable.ProductValue1, StringTable.ProductCondition2, StringTable.ProductValue2, StringTable.ProductCondition3, StringTable.ProductValue3, StringTable.ProductCondition4, StringTable.ProductValue4, StringTable.ProductCondition5, StringTable.ProductValue5, StringTable.ProductCondition6, StringTable.ProductValue6, StringTable.ProductCondition7, StringTable.ProductValue7, StringTable.ProductCondition8, StringTable.ProductValue8, // BI StringTable.Spend, StringTable.Impressions, StringTable.Clicks, StringTable.CTR, StringTable.AvgCPC, StringTable.AvgCPM, StringTable.AvgPosition, StringTable.Conversions, StringTable.CPA, StringTable.QualityScore, StringTable.KeywordRelevance, StringTable.LandingPageRelevance, StringTable.LandingPageUserExperience, // App Ad Extension StringTable.AppPlatform, StringTable.AppStoreId, StringTable.IsTrackingEnabled, StringTable.Error, StringTable.ErrorNumber, StringTable.FieldPath, // Bing Shopping Campaigns StringTable.IsExcluded, StringTable.ParentAdGroupCriterionId, StringTable.CampaignType, StringTable.CampaignPriority, StringTable.LocalInventoryAdsEnabled, // experiment StringTable.TrafficSplitPercent, StringTable.BaseCampaignId, StringTable.ExperimentCampaignId, StringTable.ExperimentId, StringTable.ExperimentType, // CoOp StringTable.BidOption, StringTable.BidBoostValue, StringTable.MaximumBid, //Upgrade Url StringTable.FinalUrl, StringTable.FinalMobileUrl, StringTable.TrackingTemplate, StringTable.CustomParameter, // Review Ad Extension StringTable.IsExact, StringTable.Source, StringTable.Url, // Price Ad Extension StringTable.PriceExtensionType, StringTable.CurrencyCode1, StringTable.CurrencyCode2, StringTable.CurrencyCode3, StringTable.CurrencyCode4, StringTable.CurrencyCode5, StringTable.CurrencyCode6, StringTable.CurrencyCode7, StringTable.CurrencyCode8, StringTable.PriceDescription1, StringTable.PriceDescription2, StringTable.PriceDescription3, StringTable.PriceDescription4, StringTable.PriceDescription5, StringTable.PriceDescription6, StringTable.PriceDescription7, StringTable.PriceDescription8, StringTable.Header1, StringTable.Header2, StringTable.Header3, StringTable.Header4, StringTable.Header5, StringTable.Header6, StringTable.Header7, StringTable.Header8, StringTable.FinalMobileUrl1, StringTable.FinalMobileUrl2, StringTable.FinalMobileUrl3, StringTable.FinalMobileUrl4, StringTable.FinalMobileUrl5, StringTable.FinalMobileUrl6, StringTable.FinalMobileUrl7, StringTable.FinalMobileUrl8, StringTable.FinalUrl1, StringTable.FinalUrl2, StringTable.FinalUrl3, StringTable.FinalUrl4, StringTable.FinalUrl5, StringTable.FinalUrl6, StringTable.FinalUrl7, StringTable.FinalUrl8, StringTable.Price1, StringTable.Price2, StringTable.Price3, StringTable.Price4, StringTable.Price5, StringTable.Price6, StringTable.Price7, StringTable.Price8, StringTable.PriceQualifier1, StringTable.PriceQualifier2, StringTable.PriceQualifier3, StringTable.PriceQualifier4, StringTable.PriceQualifier5, StringTable.PriceQualifier6, StringTable.PriceQualifier7, StringTable.PriceQualifier8, StringTable.PriceUnit1, StringTable.PriceUnit2, StringTable.PriceUnit3, StringTable.PriceUnit4, StringTable.PriceUnit5, StringTable.PriceUnit6, StringTable.PriceUnit7, StringTable.PriceUnit8, // Image StringTable.Height, StringTable.Width, // Callout Ad Extension StringTable.CalloutText, // AutoBidding StringTable.BidStrategyType, StringTable.BidStrategyMaxCpc, StringTable.BidStrategyTargetCpa, StringTable.BidStrategyTargetRoas, StringTable.InheritedBidStrategyType, StringTable.BidStrategyTargetAdPosition, StringTable.BidStrategyTargetImpressionShare, // Native Preference StringTable.AdFormatPreference, // Remarketing StringTable.Audience, StringTable.AudienceId, StringTable.Description, StringTable.MembershipDuration, StringTable.Scope, StringTable.TagId, StringTable.SourceId, StringTable.TargetSetting, StringTable.RemarketingRule, StringTable.AudienceSearchSize, StringTable.AudienceNetworkSize, StringTable.SupportedCampaignTypes, StringTable.ProductAudienceType, StringTable.CombinationRule, // Structured Snippet Ad Extension StringTable.StructuredSnippetHeader, StringTable.StructuredSnippetValues, // Promotion Ad Extension StringTable.PromotionTarget, StringTable.DiscountModifier, StringTable.PercentOff, StringTable.MoneyAmountOff, StringTable.PromotionCode, StringTable.OrdersOverAmount, StringTable.Occasion, StringTable.PromotionStart, StringTable.PromotionEnd, StringTable.CurrencyCode, // Expanded Text Ad StringTable.TitlePart1, StringTable.TitlePart2, StringTable.TitlePart3, StringTable.TextPart2, StringTable.Path1, StringTable.Path2, StringTable.Domain, // Responsive Ad StringTable.CallToAction, StringTable.Headline, StringTable.Images, StringTable.LandscapeImageMediaId, StringTable.LandscapeLogoMediaId, StringTable.LongHeadline, StringTable.SquareImageMediaId, StringTable.SquareLogoMediaId, StringTable.ImpressionTrackingUrls, // Dynamic Search Ad StringTable.DomainLanguage, StringTable.DynamicAdTargetCondition1, StringTable.DynamicAdTargetCondition2, StringTable.DynamicAdTargetCondition3, StringTable.DynamicAdTargetValue1, StringTable.DynamicAdTargetValue2, StringTable.DynamicAdTargetValue3, StringTable.PageFeedIds, // Labels StringTable.ColorCode, StringTable.Label, // Offline Conversions StringTable.ConversionCurrencyCode, StringTable.ConversionName, StringTable.ConversionTime, StringTable.ConversionValue, StringTable.MicrosoftClickId, StringTable.AdjustmentValue, StringTable.AdjustmentTime, StringTable.AdjustmentCurrencyCode, StringTable.AdjustmentType, StringTable.ExternalAttributionCredit, StringTable.ExternalAttributionModel, // Account StringTable.MSCLKIDAutoTaggingEnabled, StringTable.IncludeViewThroughConversions, StringTable.ProfileExpansionEnabled, StringTable.FinalUrlSuffix, // Feeds StringTable.CustomAttributes, StringTable.FeedName, StringTable.PhysicalIntent, StringTable.TargetAdGroupId, StringTable.TargetCampaignId, }; private static final Map<String, Integer> columnIndexMap = initializeMap(); public static Map<String, Integer> getMappings() { return columnIndexMap; } /** * Get index for a given column name * * @param columnName * @return the index */ public static int GetColumnIndex(String columnName) { if (!columnIndexMap.containsKey(columnName)) { throw new IllegalArgumentException(String.format("Column name %s is not present in headers.", columnName)); } Integer index = columnIndexMap.get(columnName); return index.intValue(); } /** * maps column name into its positional index * * @return a map to positional indices */ private static Map<String, Integer> initializeMap() { Map<String, Integer> mapping = new HashMap<String, Integer>(); for (int i = 0; i < CsvHeaders.Headers.length; i++) { mapping.put(CsvHeaders.Headers[i], new Integer(i)); } return mapping; } }
3e1c1fa02d76a29fb5d2607eae6d4a0ad00d8871
237
java
Java
Codeforces/archive/unsorted/2017.09/2017.09.05 - Codeforces Round #431 (Div. 2)/TaskC.java
ezradiniz/algorithm-practice
b4785a7532b31d64f2f2d866f9b1f52ddd25c42a
[ "MIT" ]
null
null
null
Codeforces/archive/unsorted/2017.09/2017.09.05 - Codeforces Round #431 (Div. 2)/TaskC.java
ezradiniz/algorithm-practice
b4785a7532b31d64f2f2d866f9b1f52ddd25c42a
[ "MIT" ]
null
null
null
Codeforces/archive/unsorted/2017.09/2017.09.05 - Codeforces Round #431 (Div. 2)/TaskC.java
ezradiniz/algorithm-practice
b4785a7532b31d64f2f2d866f9b1f52ddd25c42a
[ "MIT" ]
null
null
null
18.230769
70
0.654008
11,922
package solutions; import util.FastInput; import java.io.PrintWriter; public class TaskC { public void solve(int testNumber, FastInput in, PrintWriter out) { int k = in.nextInt(); int[] cost = new int[26]; } }
3e1c213a56cbae1e7a99d18e53f166343b34eeae
44,623
java
Java
generated-tests/rmosa/tests/s1022/107_weka/evosuite-tests/weka/core/stemmers/LovinsStemmer_ESTest.java
blindsubmissions/icse19replication
42a7c172efa86d7d01f7e74b58612cc255c6eb0f
[ "MIT" ]
null
null
null
generated-tests/rmosa/tests/s1022/107_weka/evosuite-tests/weka/core/stemmers/LovinsStemmer_ESTest.java
blindsubmissions/icse19replication
42a7c172efa86d7d01f7e74b58612cc255c6eb0f
[ "MIT" ]
null
null
null
generated-tests/rmosa/tests/s1022/107_weka/evosuite-tests/weka/core/stemmers/LovinsStemmer_ESTest.java
blindsubmissions/icse19replication
42a7c172efa86d7d01f7e74b58612cc255c6eb0f
[ "MIT" ]
null
null
null
37.880306
345
0.678103
11,923
/* * This file was automatically generated by EvoSuite * Thu Aug 23 15:34:28 GMT 2018 */ package weka.core.stemmers; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import weka.core.stemmers.LovinsStemmer; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class LovinsStemmer_ESTest extends LovinsStemmer_ESTest_scaffolding { /** //Test case number: 0 /*Coverage entropy=0.8420227150574621 */ @Test(timeout = 4000) public void test00() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("ariser"); lovinsStemmer0.stem("z}IIoNcm_{b` Sx"); String string0 = lovinsStemmer0.stem("T]7{$x Jxm9f\"Vt,1xA"); assertEquals("t]7{$x jxm9f\"vt,1x", string0); String string1 = lovinsStemmer0.globalInfo(); assertEquals("A stemmer based on the Lovins stemmer, described here:\n\nJulie Beth Lovins (1968). Development of a stemming algorithm. Mechanical Translation and Computational Linguistics. 11:22-31.", string1); String string2 = lovinsStemmer0.stem(" Tddron"); assertEquals(" tddr", string2); } /** //Test case number: 1 /*Coverage entropy=0.8420227150574621 */ @Test(timeout = 4000) public void test01() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("eously"); assertEquals("eous", string0); lovinsStemmer0.toString(); lovinsStemmer0.stem("ariser"); lovinsStemmer0.stem("z}IIoNcm_{b` Sx"); String string1 = lovinsStemmer0.stem("T]7{$x Jxm9f\"Vt,1xA"); assertEquals("t]7{$x jxm9f\"vt,1x", string1); String string2 = lovinsStemmer0.stem(" Tddron"); assertEquals(" tddr", string2); } /** //Test case number: 2 /*Coverage entropy=0.799644564299344 */ @Test(timeout = 4000) public void test02() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("z}IIoNcm_{b` Sx"); String string0 = lovinsStemmer0.stemString("z}IIoNcm_{b` Sx"); assertEquals("z}iioncm_{b` sx", string0); String string1 = lovinsStemmer0.stem("T]7{$x Jxm9f\"Vt,1xA"); assertEquals("t]7{$x jxm9f\"vt,1x", string1); String string2 = lovinsStemmer0.stem(" Tddron"); assertEquals(" tddr", string2); } /** //Test case number: 3 /*Coverage entropy=0.8420227150574621 */ @Test(timeout = 4000) public void test03() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.toString(); String string0 = lovinsStemmer0.stemString("weka.core.stemmers.LovinsStemmer"); assertEquals("wek.cor.stemmer.lovinsstemmer", string0); lovinsStemmer0.stem("z}IIoNcm_{b` Sx"); lovinsStemmer0.stem("T]7{$x Jxm9f\"Vt,1xA"); String string1 = lovinsStemmer0.stem(" Tddron"); assertEquals(" tddr", string1); } /** //Test case number: 4 /*Coverage entropy=1.0507172152702489 */ @Test(timeout = 4000) public void test04() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.globalInfo(); assertEquals("A stemmer based on the Lovins stemmer, described here:\n\nJulie Beth Lovins (1968). Development of a stemming algorithm. Mechanical Translation and Computational Linguistics. 11:22-31.", string0); String string1 = lovinsStemmer0.stemString("A stemmer based on the Lovins stemmer, described here:\n\nJulie Beth Lovins (1968). Development of a stemming algorithm. Mechanical Translation and Computational Linguistics. 11:22-31."); assertEquals("a stemmer bas on th lovin stemmer, describ hes:\n\njuli beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31.", string1); String string2 = lovinsStemmer0.stemString("F|WX'"); assertEquals("f|wx'", string2); lovinsStemmer0.stemString("a stemmer bas on th lovin stemmer, describ hes:\n\njuli beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31."); String string3 = lovinsStemmer0.stemString("a stemmer ba on th lovin stemmer, describ he:\n\njl beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31."); assertEquals("a stemmer ba on th lovin stemmer, describ he:\n\njl beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31.", string3); } /** //Test case number: 5 /*Coverage entropy=0.799644564299344 */ @Test(timeout = 4000) public void test05() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("z}IIoNcm_{b` Sx"); lovinsStemmer0.stemString("ward"); String string0 = lovinsStemmer0.stemString("ation"); assertEquals("ation", string0); String string1 = lovinsStemmer0.stem("T]7{$x Jxm9f\"Vt,1xA"); assertEquals("t]7{$x jxm9f\"vt,1x", string1); String string2 = lovinsStemmer0.stem(" Tddron"); assertEquals(" tddr", string2); } /** //Test case number: 6 /*Coverage entropy=1.0616917288592445 */ @Test(timeout = 4000) public void test06() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("tt"); lovinsStemmer0.getTechnicalInformation(); lovinsStemmer0.getTechnicalInformation(); lovinsStemmer0.getRevision(); String string0 = lovinsStemmer0.stemString("The name of a series or set of books. When citing an entire book, the the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published."); assertEquals("th nam of a ser or ses of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-volum ses in which th book is publ.", string0); String string1 = lovinsStemmer0.stemString("th nam of a ser or ses of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-volum ses in which th book is publ."); assertEquals("th nam of a ser or se of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-vol se in which th book is publ.", string1); String string2 = lovinsStemmer0.stemString("tt"); assertEquals("tt", string2); } /** //Test case number: 7 /*Coverage entropy=1.0912584817625037 */ @Test(timeout = 4000) public void test07() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.globalInfo(); assertEquals("A stemmer based on the Lovins stemmer, described here:\n\nJulie Beth Lovins (1968). Development of a stemming algorithm. Mechanical Translation and Computational Linguistics. 11:22-31.", string0); lovinsStemmer0.getTechnicalInformation(); String string1 = lovinsStemmer0.stemString("mit"); assertEquals("mis", string1); lovinsStemmer0.stemString("eoAus"); String string2 = lovinsStemmer0.stemString("NX-34"); assertEquals("nx-34", string2); } /** //Test case number: 8 /*Coverage entropy=1.0468189622729827 */ @Test(timeout = 4000) public void test08() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.globalInfo(); assertEquals("A stemmer based on the Lovins stemmer, described here:\n\nJulie Beth Lovins (1968). Development of a stemming algorithm. Mechanical Translation and Computational Linguistics. 11:22-31.", string0); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); String string1 = lovinsStemmer1.stemString("A stemmer based on the Lovins stemmer, described here:\n\nJulie Beth Lovins (1968). Development of a stemming algorithm. Mechanical Translation and Computational Linguistics. 11:22-31."); assertEquals("a stemmer bas on th lovin stemmer, describ hes:\n\njuli beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31.", string1); lovinsStemmer1.getTechnicalInformation(); LovinsStemmer lovinsStemmer2 = new LovinsStemmer(); lovinsStemmer2.getTechnicalInformation(); lovinsStemmer2.stem("#T4yJar"); String string2 = lovinsStemmer0.stemString("e:send"); assertEquals("e:sens", string2); } /** //Test case number: 9 /*Coverage entropy=1.0779108063156595 */ @Test(timeout = 4000) public void test09() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.getRevision(); String string0 = lovinsStemmer0.stem("The publisher's name."); assertEquals("the publisher's name.", string0); lovinsStemmer0.getTechnicalInformation(); String string1 = lovinsStemmer0.stemString("the publisher's name."); assertEquals("th publishes nam.", string1); String string2 = lovinsStemmer0.stemString("probToLogOdds: probability must be in [0,1] "); assertEquals("probtologod: prob must be in [0,1] ", string2); } /** //Test case number: 10 /*Coverage entropy=0.9829120388005288 */ @Test(timeout = 4000) public void test10() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stemString("vad"); lovinsStemmer0.stemString("ery"); lovinsStemmer0.stemString("vad"); String string0 = lovinsStemmer0.stemString("vad"); assertEquals("vas", string0); String string1 = lovinsStemmer0.stemString("Z6YwuM X9q3d"); assertEquals("z6ywum x9q3d", string1); } /** //Test case number: 11 /*Coverage entropy=1.0858436592153922 */ @Test(timeout = 4000) public void test11() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String[] stringArray0 = new String[3]; stringArray0[0] = "pex"; stringArray0[1] = "Q?q]$kyQy"; stringArray0[2] = "YXbF\"!! 5P/"; LovinsStemmer.main(stringArray0); String string0 = lovinsStemmer0.globalInfo(); assertEquals("A stemmer based on the Lovins stemmer, described here:\n\nJulie Beth Lovins (1968). Development of a stemming algorithm. Mechanical Translation and Computational Linguistics. 11:22-31.", string0); String string1 = lovinsStemmer0.getRevision(); assertEquals("8034", string1); lovinsStemmer0.stemString("Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the book or collection in which the reference appears."); lovinsStemmer0.toString(); lovinsStemmer0.stem("A stemmer based on the Lovins stemmer, described here:\n\nJulie Beth Lovins (1968). Development of a stemming algorithm. Mechanical Translation and Computational Linguistics. 11:22-31."); String string2 = lovinsStemmer0.stemString("nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th book or collect in which th refer appear."); assertEquals("nam(s) of edit(s), typ as ind in th lat book. if ther is al an author field, then th edit field giv th edit of th book or collect in which th refer appear.", string2); } /** //Test case number: 12 /*Coverage entropy=0.9829120388005288 */ @Test(timeout = 4000) public void test12() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("?z30!!clux"); assertEquals("?z30!!cluc", string0); lovinsStemmer0.stemString("vad"); String string1 = lovinsStemmer0.stemString("vad"); assertEquals("vas", string1); String string2 = lovinsStemmer0.stemString("Z6YwuM X9q3d"); assertEquals("z6ywum x9q3d", string2); } /** //Test case number: 13 /*Coverage entropy=0.9181779937263919 */ @Test(timeout = 4000) public void test13() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stemString("aries"); lovinsStemmer0.stem("ar"); lovinsStemmer0.stemString("ywddrondax"); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); lovinsStemmer1.stemString("ert"); lovinsStemmer1.stem("ywddrond"); String string0 = lovinsStemmer1.stem("ywddrond"); assertEquals("ywddrons", string0); String string1 = lovinsStemmer1.stemString("idine"); assertEquals("id", string1); } /** //Test case number: 14 /*Coverage entropy=0.808037042108934 */ @Test(timeout = 4000) public void test14() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("Jj"); lovinsStemmer0.stem("herensend"); lovinsStemmer0.getTechnicalInformation(); lovinsStemmer0.stem("ehtoh 9-pv8ond"); String string0 = lovinsStemmer0.stem("ymhex"); assertEquals("ymhec", string0); } /** //Test case number: 15 /*Coverage entropy=1.3862943611198906 */ @Test(timeout = 4000) public void test15() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stem("T]7{$x 'Jxm9f\"Vt,1xA"); assertEquals("t]7{$x 'jxm9f\"vt,1x", string0); String string1 = lovinsStemmer0.stem("bex"); assertEquals("bic", string1); } /** //Test case number: 16 /*Coverage entropy=0.8656959638937138 */ @Test(timeout = 4000) public void test16() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String[] stringArray0 = new String[5]; stringArray0[0] = "mit"; stringArray0[1] = " <classname>\n"; stringArray0[2] = " option."; stringArray0[3] = "erid"; stringArray0[4] = "-"; LovinsStemmer.main(stringArray0); String string0 = lovinsStemmer0.stem("dyk8lnBF!;xEodd"); assertEquals("dyk8lnbf!;xeod", string0); lovinsStemmer0.stem("herensend"); lovinsStemmer0.getTechnicalInformation(); String string1 = lovinsStemmer0.stem("ymhex"); assertEquals("ymhec", string1); } /** //Test case number: 17 /*Coverage entropy=0.9829120388005288 */ @Test(timeout = 4000) public void test17() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stemString("vad"); lovinsStemmer0.stemString("cid"); String string0 = lovinsStemmer0.stemString("vad"); assertEquals("vas", string0); String string1 = lovinsStemmer0.stemString("Z6YwuM X9q3d"); assertEquals("z6ywum x9q3d", string1); } /** //Test case number: 18 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test18() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("ite"); assertEquals("it", string0); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); lovinsStemmer1.stem(" is not assignable from "); String string1 = lovinsStemmer1.stemString("Can't construct a path to file relative to user dir."); assertEquals("can't construc a path to fil rel to user dir.", string1); } /** //Test case number: 19 /*Coverage entropy=1.0641682339798832 */ @Test(timeout = 4000) public void test19() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("eodus"); String[] stringArray0 = new String[8]; stringArray0[0] = "eodus"; stringArray0[1] = "eodus"; stringArray0[2] = "eodus"; stringArray0[3] = "eodus"; stringArray0[4] = "eodus"; stringArray0[5] = "eodus"; String string0 = lovinsStemmer0.stem("atdlud"); assertEquals("atdlus", string0); stringArray0[6] = "eodus"; stringArray0[7] = "eodus"; LovinsStemmer.main(stringArray0); lovinsStemmer0.stem("eodus"); String string1 = lovinsStemmer0.stemString("=w(. vW,N]VJ"); assertEquals("=w(. vw,n]vj", string1); String string2 = lovinsStemmer0.stemString("eodus"); assertEquals("eodus", string2); } /** //Test case number: 20 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test20() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("eous"); String string0 = lovinsStemmer0.stem("eous"); assertEquals("eous", string0); lovinsStemmer0.stem("(9%35"); String string1 = lovinsStemmer0.stemString("ilees"); assertEquals("ilee", string1); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); String string2 = lovinsStemmer1.stemString("(9%35"); assertEquals("(9%35", string2); LovinsStemmer lovinsStemmer2 = new LovinsStemmer(); String string3 = lovinsStemmer2.stemString("ible"); assertEquals("ibl", string3); } /** //Test case number: 21 /*Coverage entropy=0.9829120388005288 */ @Test(timeout = 4000) public void test21() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stemString("vad"); String string0 = lovinsStemmer0.stem("ialize"); assertEquals("ial", string0); String string1 = lovinsStemmer0.stemString("vad"); assertEquals("vas", string1); String string2 = lovinsStemmer0.stemString("Z6YwuM X9q3d"); assertEquals("z6ywum x9q3d", string2); } /** //Test case number: 22 /*Coverage entropy=1.0651812234828877 */ @Test(timeout = 4000) public void test22() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.getRevision(); assertEquals("8034", string0); String string1 = lovinsStemmer0.stemString("8.lgyl~7:t#3r"); assertEquals("8.lgyl~7:t#3r", string1); } /** //Test case number: 23 /*Coverage entropy=1.013176687201774 */ @Test(timeout = 4000) public void test23() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.globalInfo(); assertEquals("A stemmer based on the Lovins stemmer, described here:\n\nJulie Beth Lovins (1968). Development of a stemming algorithm. Mechanical Translation and Computational Linguistics. 11:22-31.", string0); lovinsStemmer0.stemString("eous"); lovinsStemmer0.stem("eous"); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); String string1 = lovinsStemmer1.stem("pand"); assertEquals("pans", string1); String string2 = lovinsStemmer1.stemString("eous"); assertEquals("eous", string2); String[] stringArray0 = new String[8]; stringArray0[0] = "eous"; stringArray0[1] = "eous"; stringArray0[2] = "eous"; stringArray0[3] = "YEAR"; stringArray0[4] = "vaslid"; stringArray0[5] = "eous"; stringArray0[6] = "eous"; stringArray0[7] = "eous"; LovinsStemmer.main(stringArray0); String string3 = lovinsStemmer1.stem("L]'^9~D}1[bG>HUm"); assertEquals("l]'^9~d}1[bg>hum", string3); } /** //Test case number: 24 /*Coverage entropy=1.106191323563367 */ @Test(timeout = 4000) public void test24() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("Get position of flag -f: "); assertEquals("ges posit of flag -f: ", string0); String string1 = lovinsStemmer0.globalInfo(); assertEquals("A stemmer based on the Lovins stemmer, described here:\n\nJulie Beth Lovins (1968). Development of a stemming algorithm. Mechanical Translation and Computational Linguistics. 11:22-31.", string1); lovinsStemmer0.stem("piclud"); lovinsStemmer0.toString(); lovinsStemmer0.stem("piclus"); lovinsStemmer0.stem("Get position of flag -f: "); String string2 = lovinsStemmer0.stemString("rud"); assertEquals("rus", string2); } /** //Test case number: 25 /*Coverage entropy=1.3862943611198906 */ @Test(timeout = 4000) public void test25() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("Bl_sux7'|r&QGH%,tW"); String string0 = lovinsStemmer0.stem("ond"); assertEquals("ons", string0); String string1 = lovinsStemmer0.stem("rdex"); assertEquals("rdic", string1); } /** //Test case number: 26 /*Coverage entropy=0.9829120388005288 */ @Test(timeout = 4000) public void test26() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("lessness"); assertEquals("les", string0); lovinsStemmer0.stemString("vad"); String string1 = lovinsStemmer0.stemString("vad"); assertEquals("vas", string1); String string2 = lovinsStemmer0.stemString("Z6YwuM X9q3d"); assertEquals("z6ywum x9q3d", string2); } /** //Test case number: 27 /*Coverage entropy=0.9992173531757648 */ @Test(timeout = 4000) public void test27() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("erid"); assertEquals("eris", string0); lovinsStemmer0.stemString("NX-34"); String string1 = lovinsStemmer0.stemString("C4.5: Programs for Machine Learning"); assertEquals("c4.5: program for mach learn", string1); } /** //Test case number: 28 /*Coverage entropy=0.8420227150574622 */ @Test(timeout = 4000) public void test28() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("ariser"); lovinsStemmer0.stem("z}IIoNcm_{b` Sx"); String string0 = lovinsStemmer0.getRevision(); assertEquals("8034", string0); String string1 = lovinsStemmer0.stem("ariseryz"); assertEquals("ariserys", string1); lovinsStemmer0.toString(); String string2 = lovinsStemmer0.stem("T]7{$x Jxm9f\"Vt,1xA"); assertEquals("t]7{$x jxm9f\"vt,1x", string2); String string3 = lovinsStemmer0.stem(" Tddron"); assertEquals(" tddr", string3); } /** //Test case number: 29 /*Coverage entropy=0.8816590963273683 */ @Test(timeout = 4000) public void test29() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.getRevision(); lovinsStemmer0.getTechnicalInformation(); String string0 = lovinsStemmer0.stem("herend"); assertEquals("herens", string0); } /** //Test case number: 30 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test30() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("erid"); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); String string0 = lovinsStemmer1.stemString("Used for alphabetizing, cross referencing, and creating a label when the ``author'' information is missing. This field should not be confuscd with the key that appears in the cite command and at the beginning of the database entry."); assertEquals("us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confuscd with th key that appear in th cit command and at th begin of th databas entr.", string0); } /** //Test case number: 31 /*Coverage entropy=1.0253582635920284 */ @Test(timeout = 4000) public void test31() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("lovinsstemmeret"); assertEquals("lovinsstemmeres", string0); lovinsStemmer0.getRevision(); String[] stringArray0 = new String[3]; LovinsStemmer.main(stringArray0); stringArray0[0] = "EdS"; stringArray0[1] = "anadex"; stringArray0[2] = "$8DuTgd*_iA"; LovinsStemmer.main(stringArray0); String string1 = lovinsStemmer0.stemString("The alternating decision tree learning algorthm"); assertEquals("th altern decis tre learn algorthm", string1); } /** //Test case number: 32 /*Coverage entropy=1.0101565205503757 */ @Test(timeout = 4000) public void test32() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); lovinsStemmer0.getRevision(); lovinsStemmer0.getRevision(); String string0 = lovinsStemmer0.stemString("es"); assertEquals("es", string0); String string1 = lovinsStemmer0.stemString("Any additional information that can help the reader. The first word should be capitalized."); assertEquals("any addit inform that can help th reader. th first word should be capital.", string1); String string2 = lovinsStemmer1.stemString("any addit inform that can help th reader. th first word should be capital."); assertEquals("any addit inform that can help th reader. th first word should be capit.", string2); } /** //Test case number: 33 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test33() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("lux"); assertEquals("luc", string0); String string1 = lovinsStemmer1.stemString("volumyt"); assertEquals("volumys", string1); } /** //Test case number: 34 /*Coverage entropy=1.3862943611198906 */ @Test(timeout = 4000) public void test34() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String[] stringArray0 = new String[3]; stringArray0[0] = "pex"; stringArray0[1] = "Q?q]$kyQy"; String string0 = lovinsStemmer0.stem("allic"); assertEquals("al", string0); lovinsStemmer0.stem("pex"); String string1 = lovinsStemmer0.stem("article"); assertEquals("articl", string1); } /** //Test case number: 35 /*Coverage entropy=1.1011559092542735 */ @Test(timeout = 4000) public void test35() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.globalInfo(); lovinsStemmer0.getRevision(); lovinsStemmer0.stemString("ional"); lovinsStemmer0.getTechnicalInformation(); lovinsStemmer0.stem("ion"); lovinsStemmer0.getRevision(); String string0 = lovinsStemmer0.stemString("r8dnuad"); lovinsStemmer0.stem("r8dnuas"); lovinsStemmer0.getTechnicalInformation(); lovinsStemmer0.globalInfo(); lovinsStemmer0.stem("ion"); lovinsStemmer0.getTechnicalInformation(); lovinsStemmer0.globalInfo(); lovinsStemmer0.stem("r8dnher"); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); lovinsStemmer1.stemString("U}t"); lovinsStemmer1.getTechnicalInformation(); lovinsStemmer1.stemString("The year of publication or, for an unpublished work, the year it was written. Generally it should consist of four numerals, such as 1984, although the standard styles can handle any year whose last four nonpunctuation characters are numerals, such as `hbox{(about 1984)}'."); String string1 = lovinsStemmer0.toString(); assertFalse(string1.equals((Object)string0)); } /** //Test case number: 36 /*Coverage entropy=1.1165810658985555 */ @Test(timeout = 4000) public void test36() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.getTechnicalInformation(); String string0 = lovinsStemmer0.getRevision(); assertEquals("8034", string0); String string1 = lovinsStemmer0.stemString("meplix"); assertEquals("meplic", string1); lovinsStemmer0.getTechnicalInformation(); String string2 = lovinsStemmer0.stemString("mePUL/"); assertEquals("mepl/", string2); } /** //Test case number: 37 /*Coverage entropy=0.9992173531757648 */ @Test(timeout = 4000) public void test37() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stemString("NX-34"); String string0 = lovinsStemmer0.stem("0/!RA7EmW*1IHsRPP"); assertEquals("0/!ra7emw*1ihsrp", string0); String string1 = lovinsStemmer0.stemString("C4.5: Programs for Machine Learning"); assertEquals("c4.5: program for mach learn", string1); } /** //Test case number: 38 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test38() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("String should not finish with "); assertEquals("string should not finish with ", string0); String string1 = lovinsStemmer0.stemString("ism"); assertEquals("ism", string1); } /** //Test case number: 39 /*Coverage entropy=1.0113704857069947 */ @Test(timeout = 4000) public void test39() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.getTechnicalInformation(); String string0 = lovinsStemmer0.getRevision(); assertEquals("8034", string0); lovinsStemmer0.stem("9,\u0002b"); lovinsStemmer0.getTechnicalInformation(); String string1 = lovinsStemmer0.stemString("The number of a journal, magazine, technical report, or of a work in a series. An issue of a journal or magazine is usually identified by its volume and number; the organization that issues a technical report usually gives it a number; and sometimes books are given numbers in a named series."); assertEquals("th number of a journ, magaz, techn report, or of a work in a ser. an issu of a journ or magaz is usu identif by it volum and number; th organ that issu a techn report usu giv it a number; and sometim book ar giv number in a nam ser.", string1); } /** //Test case number: 40 /*Coverage entropy=1.3862943611198906 */ @Test(timeout = 4000) public void test40() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("enet"); String string0 = lovinsStemmer0.stem("o2y:1U6|AA"); assertEquals("o2y:1u6|a", string0); lovinsStemmer0.stem("ZHs0&*3E:PFMoY,2"); String string1 = lovinsStemmer0.stem("enlid"); assertEquals("enlis", string1); } /** //Test case number: 41 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test41() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stemString("olv"); String string0 = lovinsStemmer0.stem("olv"); assertEquals("olut", string0); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); String string1 = lovinsStemmer1.stemString("idine"); assertEquals("id", string1); } /** //Test case number: 42 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test42() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("y]s$3y%Sua<~r9>mXal"); assertEquals("y]s$3y%su<~r9>mxal", string0); lovinsStemmer0.stem("ert"); String string1 = lovinsStemmer0.stemString("ert"); assertEquals("ers", string1); } /** //Test case number: 43 /*Coverage entropy=1.0994663206995445 */ @Test(timeout = 4000) public void test43() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.getTechnicalInformation(); String string0 = lovinsStemmer0.stemString("O.#mfT|ztt:d"); assertEquals("o.#mft|zt:d", string0); lovinsStemmer0.stemString("e:usend"); String string1 = lovinsStemmer0.stemString("e:usend"); assertEquals("e:usens", string1); } /** //Test case number: 44 /*Coverage entropy=1.0671967811777232 */ @Test(timeout = 4000) public void test44() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("end"); lovinsStemmer0.stemString("end"); String string0 = lovinsStemmer0.stemString("l]'^9~d}1[bg>humuad"); assertEquals("l]'^9~d}1[bg>humuas", string0); lovinsStemmer0.stem("pex"); lovinsStemmer0.toString(); String string1 = lovinsStemmer0.stemString("vnt{.7|+\"*H|F*M&CULs"); assertEquals("vnt{.7|+\"*h|f*m&cl", string1); String string2 = lovinsStemmer0.stemString("vnt{.7|+\"*h|f*m&cl"); assertEquals("vnt{.7|+\"*h|f*m&cl", string2); } /** //Test case number: 45 /*Coverage entropy=1.0438840842326071 */ @Test(timeout = 4000) public void test45() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("ywdronax"); assertEquals("ywdronac", string0); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); lovinsStemmer1.stemString("lily"); lovinsStemmer1.getTechnicalInformation(); String string1 = lovinsStemmer1.stemString("lily"); assertEquals("lil", string1); lovinsStemmer0.stem("lil"); String string2 = lovinsStemmer0.stemString("KB=g<l+EBJgaR;"); assertEquals("kb=g<l+ebjgar;", string2); } /** //Test case number: 46 /*Coverage entropy=1.0713758816023813 */ @Test(timeout = 4000) public void test46() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("A#7 evaR)V J; -I[8"); assertEquals("a#7 evar)v j; -i[8", string0); lovinsStemmer0.toString(); lovinsStemmer0.stemString("The database key of the entry being cross referenced. Any fields that are missing from the current record are inherited from the field being cross referenced."); lovinsStemmer0.stem("The database key of the entry being cross referenced. Any fields that are missing from the current record are inherited from the field being cross referenced."); String[] stringArray0 = new String[6]; stringArray0[0] = "th databas key of th entr being cros refer. any field that ar mis from th cur record ar inherit from th field being cros refer."; stringArray0[1] = "th databas key of th entr being cros refer. any field that ar mis from th cur record ar inherit from th field being cros refer."; stringArray0[2] = "th databas key of th entr being cros refer. any field that ar mis from th cur record ar inherit from th field being cros refer."; stringArray0[3] = "The database key of the entry being cross referenced. Any fields that are missing from the current record are inherited from the field being cross referenced."; stringArray0[4] = "the database key of the entry being cross referenced. any fields that are missing from the current record are inherited from the field being cross referenced."; stringArray0[5] = "the database key of the entry being cross referenced. any fields that are missing from the current record are inherited from the field being cross referenced."; LovinsStemmer.main(stringArray0); lovinsStemmer0.getTechnicalInformation(); lovinsStemmer0.getTechnicalInformation(); String string1 = lovinsStemmer0.stemString("The database key of the entry being cross referenced. Any fields that are missing from the current record are inherited from the field being cross referenced."); assertEquals("th databas key of th entr being cros refer. any field that ar mis from th cur record ar inherit from th field being cros refer.", string1); } /** //Test case number: 47 /*Coverage entropy=1.3862943611198906 */ @Test(timeout = 4000) public void test47() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stem("metr"); assertEquals("meter", string0); } /** //Test case number: 48 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test48() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("1nyl^oe?vR<Nv|"); assertEquals("1n^oe?vr<nv|", string0); } /** //Test case number: 49 /*Coverage entropy=0.9690738342030527 */ @Test(timeout = 4000) public void test49() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("eous"); String string0 = lovinsStemmer0.stem("eous"); assertEquals("eous", string0); lovinsStemmer0.stem("(9%35"); String string1 = lovinsStemmer0.stemString("RgT@\"{M"); assertEquals("rgt@\"{m", string1); lovinsStemmer0.getRevision(); String string2 = lovinsStemmer0.stemString("otide"); assertEquals("ot", string2); } /** //Test case number: 50 /*Coverage entropy=1.3862943611198906 */ @Test(timeout = 4000) public void test50() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stem("rpt"); assertEquals("rb", string0); lovinsStemmer0.stem("rb"); String string1 = lovinsStemmer0.stem("rb"); assertTrue(string1.equals((Object)string0)); } /** //Test case number: 51 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test51() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("y{icHgG"); assertEquals("y{ichg", string0); } /** //Test case number: 52 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test52() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("ancies"); assertEquals("anci", string0); } /** //Test case number: 53 /*Coverage entropy=0.9992173531757648 */ @Test(timeout = 4000) public void test53() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("jbb&"); assertEquals("jb&", string0); lovinsStemmer0.stemString("NX-34"); String string1 = lovinsStemmer0.stemString("C4.5: Programs for Machine Learning"); assertEquals("c4.5: program for mach learn", string1); } /** //Test case number: 54 /*Coverage entropy=1.945910149055313 */ @Test(timeout = 4000) public void test54() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.toString(); lovinsStemmer0.stem("ymheEn"); lovinsStemmer0.getTechnicalInformation(); String string0 = lovinsStemmer0.stemString("ymheen"); assertEquals("ymheen", string0); } /** //Test case number: 55 /*Coverage entropy=1.3862943611198906 */ @Test(timeout = 4000) public void test55() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stem("T]7{$x Jxm9f\"Vt,1xA"); assertEquals("t]7{$x jxm9f\"vt,1x", string0); String string1 = lovinsStemmer0.stem("umpt"); assertEquals("um", string1); } /** //Test case number: 56 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test56() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stemString("ax"); String string0 = lovinsStemmer0.stemString("ax"); assertEquals("ax", string0); lovinsStemmer0.stem("ax"); String string1 = lovinsStemmer0.stemString("istr"); assertEquals("ister", string1); } /** //Test case number: 57 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test57() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("ywdronax"); assertEquals("ywdronac", string0); String string1 = lovinsStemmer0.stemString("lily"); assertEquals("lil", string1); String string2 = lovinsStemmer0.stemString("typher"); assertEquals("typher", string2); } /** //Test case number: 58 /*Coverage entropy=1.7917594692280547 */ @Test(timeout = 4000) public void test58() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.getRevision(); assertEquals("8034", string0); String string1 = lovinsStemmer0.stemString("$ully"); assertEquals("$l", string1); } /** //Test case number: 59 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test59() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); lovinsStemmer1.stemString("vad"); String string0 = lovinsStemmer1.stemString("vas"); assertEquals("va", string0); String string1 = lovinsStemmer1.stemString("iev"); assertEquals("ief", string1); } /** //Test case number: 60 /*Coverage entropy=1.7917594692280547 */ @Test(timeout = 4000) public void test60() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stemString("0H"); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); LovinsStemmer lovinsStemmer2 = new LovinsStemmer(); lovinsStemmer2.stem("0H"); lovinsStemmer1.getTechnicalInformation(); lovinsStemmer1.stem("2@0<3KfEKblAr"); LovinsStemmer lovinsStemmer3 = new LovinsStemmer(); assertFalse(lovinsStemmer3.equals((Object)lovinsStemmer2)); } /** //Test case number: 61 /*Coverage entropy=1.7917594692280547 */ @Test(timeout = 4000) public void test61() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.stem("eTous"); lovinsStemmer0.stem("eTous"); lovinsStemmer0.getRevision(); String string0 = lovinsStemmer0.stemString("eTous"); assertEquals("es", string0); } /** //Test case number: 62 /*Coverage entropy=1.067285493028481 */ @Test(timeout = 4000) public void test62() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.toString(); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); lovinsStemmer1.getTechnicalInformation(); lovinsStemmer1.toString(); String string0 = lovinsStemmer1.stemString("weka.core.stemmers.LovinsStemmer"); assertEquals("wek.cor.stemmer.lovinsstemmer", string0); String string1 = lovinsStemmer0.stemString("C4.5: Programs for Macine Learnng"); assertEquals("c4.5: program for macin learnng", string1); } /** //Test case number: 63 /*Coverage entropy=1.6094379124341005 */ @Test(timeout = 4000) public void test63() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.getTechnicalInformation(); String string0 = lovinsStemmer0.stem(" TdEron"); assertEquals(" tderon", string0); } /** //Test case number: 64 /*Coverage entropy=2.0794415416798357 */ @Test(timeout = 4000) public void test64() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); lovinsStemmer0.getTechnicalInformation(); lovinsStemmer0.getTechnicalInformation(); lovinsStemmer0.toString(); LovinsStemmer lovinsStemmer1 = new LovinsStemmer(); lovinsStemmer1.toString(); lovinsStemmer0.getRevision(); lovinsStemmer0.stem("8034"); lovinsStemmer1.stemString("{d64uMo&E`/@{L8a"); String string0 = lovinsStemmer0.stemString("C4.5: Programs for Maine Learnng"); assertEquals("c4.5: program for main learnng", string0); } }
3e1c232f11b37d3f55570b9a266a5de85b0d52d7
6,084
java
Java
src/main/java/com/guonl/cache/LRULocalCache.java
guonl/springboot-dbmanager
d04ffa76d9c9a91db63e65c28b4660dee88dec35
[ "Apache-2.0" ]
null
null
null
src/main/java/com/guonl/cache/LRULocalCache.java
guonl/springboot-dbmanager
d04ffa76d9c9a91db63e65c28b4660dee88dec35
[ "Apache-2.0" ]
null
null
null
src/main/java/com/guonl/cache/LRULocalCache.java
guonl/springboot-dbmanager
d04ffa76d9c9a91db63e65c28b4660dee88dec35
[ "Apache-2.0" ]
null
null
null
20.145695
87
0.4857
11,924
package com.guonl.cache; import java.util.*; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; /** * Created by guonl * Date 2018/11/22 10:48 AM * Description: LinkedHashMap实现LRU策略的本地缓存 */ public class LRULocalCache { /** * 默认有效时长,单位:秒 */ private static final int DEFUALT_TIMEOUT = 3600; private static final long SECOND_TIME = 1000; private static final Map<String, Object> map; private static final Timer timer; /** * 初始化 */ static { timer = new Timer(); map = new LRUMap<>(); } /** * 私有构造函数,工具类不允许实例化 */ private LRULocalCache() { } /** * 基于LRU策略的map * * @param <K> * @param <V> */ static class LRUMap<K, V> extends LinkedHashMap<K, V> { /** * 读写锁 */ private final ReadWriteLock readWriteLock = new ReentrantReadWriteLock(); private final Lock rLock = readWriteLock.readLock(); private final Lock wLock = readWriteLock.writeLock(); /** * 默认缓存容量 */ private static final int DEFAULT_INITIAL_CAPACITY = 1 << 4; /** * 默认最大缓存容量 */ private static final int DEFAULT_MAX_CAPACITY = 1 << 30; /** * 加载因子 */ private static final float DEFAULT_LOAD_FACTOR = 0.75f; public LRUMap() { super(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR); } public LRUMap(int initialCapacity) { super(initialCapacity, DEFAULT_LOAD_FACTOR); } public V get(String k) { rLock.lock(); try { return super.get(k); } finally { rLock.unlock(); } } public V put(K k, V v) { wLock.lock(); try { return super.put(k, v); } finally { wLock.unlock(); } } public void putAll(Map<? extends K, ? extends V> m) { wLock.lock(); try { super.putAll(m); } finally { wLock.unlock(); } } public V remove(Object k) { wLock.lock(); try { return super.remove(k); } finally { wLock.unlock(); } } public boolean containKey(K k) { rLock.lock(); try { return super.containsKey(k); } finally { rLock.unlock(); } } public int size() { rLock.lock(); try { return super.size(); } finally { rLock.unlock(); } } public void clear() { wLock.lock(); try { super.clear(); } finally { wLock.unlock(); } } /** * 重写LinkedHashMap中removeEldestEntry方法; * 新增元素的时候,会判断当前map大小是否超过DEFAULT_MAX_CAPACITY,超过则移除map中最老的节点; * * @param eldest * @return */ protected boolean removeEldestEntry(Map.Entry<K, V> eldest) { return size() > DEFAULT_MAX_CAPACITY; } } /** * 清除缓存任务类 */ static class CleanWorkerTask extends TimerTask { private String key; public CleanWorkerTask(String key) { this.key = key; } public void run() { LocalCache.remove(key); } } /** * 增加缓存 * * @param key * @param value */ public static void add(String key, Object value) { map.put(key, value); timer.schedule(new LocalCache.CleanWorkerTask(key), DEFUALT_TIMEOUT); } /** * 增加缓存 * * @param key * @param value * @param timeout 有效时长 */ public static void put(String key, Object value, int timeout) { map.put(key, value); timer.schedule(new LocalCache.CleanWorkerTask(key), timeout * SECOND_TIME); } /** * 增加缓存 * * @param key * @param value * @param expireTime 过期时间 */ public static void put(String key, Object value, Date expireTime) { map.put(key, value); timer.schedule(new LocalCache.CleanWorkerTask(key), expireTime); } /** * 批量增加缓存 * * @param m */ public static void putAll(Map<String, Object> m) { map.putAll(m); for (String key : m.keySet()) { timer.schedule(new LocalCache.CleanWorkerTask(key), DEFUALT_TIMEOUT); } } /** * 批量增加缓存 * * @param m */ public static void putAll(Map<String, Object> m, int timeout) { map.putAll(m); for (String key : m.keySet()) { timer.schedule(new LocalCache.CleanWorkerTask(key), timeout * SECOND_TIME); } } /** * 批量增加缓存 * * @param m */ public static void putAll(Map<String, Object> m, Date expireTime) { map.putAll(m); for (String key : m.keySet()) { timer.schedule(new LocalCache.CleanWorkerTask(key), expireTime); } } /** * 获取缓存 * * @param key * @return */ public static Object get(String key) { return map.get(key); } /** * 查询缓存是否包含key * * @param key * @return */ public static boolean containsKey(String key) { return map.containsKey(key); } /** * 删除缓存 * * @param key */ public static void remove(String key) { map.remove(key); } /** * 返回缓存大小 * * @return */ public static int size() { return map.size(); } /** * 清除所有缓存 * * @return */ public static void clear() { if (size() > 0) { map.clear(); } timer.cancel(); } }
3e1c2376c1b839b59eba5bfd66b706eddaf9afbd
1,322
java
Java
core/src/com/turnbasedgdx/game/gameplay/MovableSprite.java
Deadvard/SRPG-libgdx
818679cbf29dc2649244c4f96abc72eee503e830
[ "MIT" ]
null
null
null
core/src/com/turnbasedgdx/game/gameplay/MovableSprite.java
Deadvard/SRPG-libgdx
818679cbf29dc2649244c4f96abc72eee503e830
[ "MIT" ]
null
null
null
core/src/com/turnbasedgdx/game/gameplay/MovableSprite.java
Deadvard/SRPG-libgdx
818679cbf29dc2649244c4f96abc72eee503e830
[ "MIT" ]
null
null
null
24.943396
109
0.6059
11,925
package com.turnbasedgdx.game.gameplay; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.math.Vector2; import com.turnbasedgdx.game.TurnBasedGdxGame; import java.io.Serializable; /** * Created by Deadvard on 2017-02-24. */ public class MovableSprite extends Sprite implements Serializable{ public static final int size = TurnBasedGdxGame.WIDTH/10; public MovableSprite(Texture texture){ super(texture); this.setSize(size,size); } public MovableSprite(){ super(); } public void changeFrame(int x, int y){ this.setRegion(this.size * x, this.size * y, this.size, this.size); } public boolean isPosition(int x, int y){ boolean result = false; if((int)(this.getX()/size) == x && (int)((TurnBasedGdxGame.HEIGHT - this.getY() - size)/size) == y){ result = true; } return result; } public void setPos(int x, int y){ this.setPosition(x * size, (TurnBasedGdxGame.HEIGHT - (y * size) - size)); } public int xCord(){ return (int) (this.getX()/size); } public int yCord(){ return (int) ((TurnBasedGdxGame.HEIGHT - this.getY() - size)/size); } }
3e1c248a41f81f3ad4d0b0530333c888d1e4da86
226
java
Java
graphql-service-app/src/main/java/com/bookmyshow/exceptions/MovieAlreadyExistsException.java
soundarrajan-t/graphql-test
e2d9f26ce62062a2ccc9ff2606c2290d404daa68
[ "Apache-2.0" ]
null
null
null
graphql-service-app/src/main/java/com/bookmyshow/exceptions/MovieAlreadyExistsException.java
soundarrajan-t/graphql-test
e2d9f26ce62062a2ccc9ff2606c2290d404daa68
[ "Apache-2.0" ]
null
null
null
graphql-service-app/src/main/java/com/bookmyshow/exceptions/MovieAlreadyExistsException.java
soundarrajan-t/graphql-test
e2d9f26ce62062a2ccc9ff2606c2290d404daa68
[ "Apache-2.0" ]
null
null
null
22.6
64
0.778761
11,926
package com.bookmyshow.exceptions; public class MovieAlreadyExistsException extends BaseException { public MovieAlreadyExistsException(String message) { super(message, "MOVIE_WITH_NAME_ALREADY_EXISTS"); } }
3e1c24a60eea60d21710cf7ca83ce37c2a4b0dbc
2,265
java
Java
gulimall-product/src/main/java/com/chinasoft/product/controller/SpuInfoDescController.java
chen-wangsheng/gulimall
27933904b137d6c0c70c3511384e38dafec71563
[ "Apache-2.0" ]
null
null
null
gulimall-product/src/main/java/com/chinasoft/product/controller/SpuInfoDescController.java
chen-wangsheng/gulimall
27933904b137d6c0c70c3511384e38dafec71563
[ "Apache-2.0" ]
null
null
null
gulimall-product/src/main/java/com/chinasoft/product/controller/SpuInfoDescController.java
chen-wangsheng/gulimall
27933904b137d6c0c70c3511384e38dafec71563
[ "Apache-2.0" ]
null
null
null
25.233333
68
0.703214
11,927
package com.chinasoft.product.controller; import java.util.Arrays; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.chinasoft.product.entity.SpuInfoDescEntity; import com.chinasoft.product.service.SpuInfoDescService; import com.chinasoft.common.utils.PageUtils; import com.chinasoft.common.utils.R; /** * spu信息介绍 * * @author vanceChen * @email efpyi@example.com * @date 2021-07-19 11:19:03 */ @RestController @RequestMapping("product/spuinfodesc") public class SpuInfoDescController { @Autowired private SpuInfoDescService spuInfoDescService; /** * 列表 */ @RequestMapping("/list") // @RequiresPermissions("product:spuinfodesc:list") public R list(@RequestParam Map<String, Object> params){ PageUtils page = spuInfoDescService.queryPage(params); return R.ok().put("page", page); } /** * 信息 */ @RequestMapping("/info/{spuId}") // @RequiresPermissions("product:spuinfodesc:info") public R info(@PathVariable("spuId") Long spuId){ SpuInfoDescEntity spuInfoDesc = spuInfoDescService.getById(spuId); return R.ok().put("spuInfoDesc", spuInfoDesc); } /** * 保存 */ @RequestMapping("/save") // @RequiresPermissions("product:spuinfodesc:save") public R save(@RequestBody SpuInfoDescEntity spuInfoDesc){ spuInfoDescService.save(spuInfoDesc); return R.ok(); } /** * 修改 */ @RequestMapping("/update") // @RequiresPermissions("product:spuinfodesc:update") public R update(@RequestBody SpuInfoDescEntity spuInfoDesc){ spuInfoDescService.updateById(spuInfoDesc); return R.ok(); } /** * 删除 */ @RequestMapping("/delete") // @RequiresPermissions("product:spuinfodesc:delete") public R delete(@RequestBody Long[] spuIds){ spuInfoDescService.removeByIds(Arrays.asList(spuIds)); return R.ok(); } }
3e1c24dad35118ca466c56a3cfed211699b92a85
15,065
java
Java
src/main/java/ru/betterend/recipe/CraftingRecipes.java
codehz/BetterEnd
a3e781b40176f2db9b78b735f129a162d4c11834
[ "MIT" ]
null
null
null
src/main/java/ru/betterend/recipe/CraftingRecipes.java
codehz/BetterEnd
a3e781b40176f2db9b78b735f129a162d4c11834
[ "MIT" ]
null
null
null
src/main/java/ru/betterend/recipe/CraftingRecipes.java
codehz/BetterEnd
a3e781b40176f2db9b78b735f129a162d4c11834
[ "MIT" ]
null
null
null
59.781746
243
0.719681
11,928
package ru.betterend.recipe; import net.minecraft.tags.ItemTags; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.item.alchemy.PotionUtils; import net.minecraft.world.item.alchemy.Potions; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import ru.bclib.api.TagAPI; import ru.betterend.BetterEnd; import ru.betterend.item.GuideBookItem; import ru.betterend.recipe.builders.GridRecipe; import ru.betterend.registry.EndBlocks; import ru.betterend.registry.EndItems; public class CraftingRecipes { public static void register() { if (BetterEnd.hasGuideBook()) { GridRecipe.make("guide_book", GuideBookItem.GUIDE_BOOK) .setShape("D", "B", "C") .addMaterial('D', EndItems.ENDER_DUST) .addMaterial('B', Items.BOOK) .addMaterial('C', EndItems.CRYSTAL_SHARDS) .build(); } GridRecipe.make("ender_perl_to_block", EndBlocks.ENDER_BLOCK) .setShape("OO", "OO") .addMaterial('O', Items.ENDER_PEARL) .build(); GridRecipe.make("ender_block_to_perl", Items.ENDER_PEARL) .addMaterial('#', EndBlocks.ENDER_BLOCK) .setOutputCount(4) .setList("#") .build(); GridRecipe.make("end_stone_smelter", EndBlocks.END_STONE_SMELTER) .setShape("T#T", "V V", "T#T") .addMaterial('#', Blocks.END_STONE_BRICKS) .addMaterial('T', EndBlocks.THALLASIUM.ingot) .addMaterial('V', TagAPI.FURNACES) .build(); registerPedestal("andesite_pedestal", EndBlocks.ANDESITE_PEDESTAL, Blocks.POLISHED_ANDESITE_SLAB, Blocks.POLISHED_ANDESITE); registerPedestal("diorite_pedestal", EndBlocks.DIORITE_PEDESTAL, Blocks.POLISHED_DIORITE_SLAB, Blocks.POLISHED_DIORITE); registerPedestal("granite_pedestal", EndBlocks.GRANITE_PEDESTAL, Blocks.POLISHED_GRANITE_SLAB, Blocks.POLISHED_GRANITE); registerPedestal("quartz_pedestal", EndBlocks.QUARTZ_PEDESTAL, Blocks.QUARTZ_SLAB, Blocks.QUARTZ_PILLAR); registerPedestal("purpur_pedestal", EndBlocks.PURPUR_PEDESTAL, Blocks.PURPUR_SLAB, Blocks.PURPUR_PILLAR); GridRecipe.make("infusion_pedestal", EndBlocks.INFUSION_PEDESTAL) .setShape(" Y ", "O#O", " # ") .addMaterial('O', Items.ENDER_PEARL) .addMaterial('Y', Items.ENDER_EYE) .addMaterial('#', Blocks.OBSIDIAN) .build(); String material = "aeternium"; GridRecipe.make(material + "_block", EndBlocks.AETERNIUM_BLOCK) .setShape("III", "III", "III") .addMaterial('I', EndItems.AETERNIUM_INGOT) .build(); GridRecipe.make(material + "_block_to_ingot", EndItems.AETERNIUM_INGOT) .addMaterial('#', EndBlocks.AETERNIUM_BLOCK) .setOutputCount(9) .setList("#") .build(); GridRecipe.make("blue_vine_seed_dye", Items.BLUE_DYE).setList("#").addMaterial('#', EndBlocks.BLUE_VINE_SEED).build(); GridRecipe.make("creeping_moss_dye", Items.CYAN_DYE).setList("#").addMaterial('#', EndBlocks.CREEPING_MOSS).build(); GridRecipe.make("umbrella_moss_dye", Items.YELLOW_DYE).setList("#").addMaterial('#', EndBlocks.UMBRELLA_MOSS).build(); GridRecipe.make("umbrella_moss_tall_dye", Items.YELLOW_DYE).setOutputCount(2).setList("#").addMaterial('#', EndBlocks.UMBRELLA_MOSS_TALL).build(); GridRecipe.make("shadow_plant_dye", Items.BLACK_DYE).setList("#").addMaterial('#', EndBlocks.SHADOW_PLANT).build(); GridRecipe.make("paper", Items.PAPER).setShape("###").addMaterial('#', EndItems.END_LILY_LEAF_DRIED).setOutputCount(3).build(); GridRecipe.make("aurora_block", EndBlocks.AURORA_CRYSTAL).setShape("##", "##").addMaterial('#', EndItems.CRYSTAL_SHARDS).build(); GridRecipe.make("lotus_block", EndBlocks.END_LOTUS.log).setShape("##", "##").addMaterial('#', EndBlocks.END_LOTUS_STEM).build(); GridRecipe.make("needlegrass_stick", Items.STICK).setList("#").setOutputCount(2).addMaterial('#', EndBlocks.NEEDLEGRASS).build(); GridRecipe.make("shadow_berry_seeds", EndBlocks.SHADOW_BERRY).setList("#").setOutputCount(4).addMaterial('#', EndItems.SHADOW_BERRY_RAW).build(); GridRecipe.make("purple_polypore_dye", Items.PURPLE_DYE).setList("#").addMaterial('#', EndBlocks.PURPLE_POLYPORE).build(); registerLantern("end_stone_lantern", EndBlocks.END_STONE_LANTERN, Blocks.END_STONE_BRICK_SLAB); registerLantern("andesite_lantern", EndBlocks.ANDESITE_LANTERN, Blocks.ANDESITE_SLAB); registerLantern("diorite_lantern", EndBlocks.DIORITE_LANTERN, Blocks.DIORITE_SLAB); registerLantern("granite_lantern", EndBlocks.GRANITE_LANTERN, Blocks.GRANITE_SLAB); registerLantern("quartz_lantern", EndBlocks.QUARTZ_LANTERN, Blocks.QUARTZ_SLAB); registerLantern("purpur_lantern", EndBlocks.PURPUR_LANTERN, Blocks.PURPUR_SLAB); registerLantern("blackstone_lantern", EndBlocks.BLACKSTONE_LANTERN, Blocks.BLACKSTONE_SLAB); GridRecipe.make("amber_gem", EndItems.AMBER_GEM).setShape("##", "##").addMaterial('#', EndItems.RAW_AMBER).build(); GridRecipe.make("amber_block", EndBlocks.AMBER_BLOCK).setShape("##", "##").addMaterial('#', EndItems.AMBER_GEM).build(); GridRecipe.make("amber_gem_block", EndItems.AMBER_GEM).setOutputCount(4).setList("#").addMaterial('#', EndBlocks.AMBER_BLOCK).build(); GridRecipe.make("iron_bulb_lantern", EndBlocks.IRON_BULB_LANTERN).setShape("C", "I", "#").addMaterial('C', Items.CHAIN).addMaterial('I', Items.IRON_INGOT).addMaterial('#', EndItems.GLOWING_BULB).build(); GridRecipe.make("twisted_moss_dye", Items.PINK_DYE).setList("#").addMaterial('#', EndBlocks.TWISTED_MOSS).build(); GridRecipe.make("byshy_grass_dye", Items.MAGENTA_DYE).setList("#").addMaterial('#', EndBlocks.BUSHY_GRASS).build(); GridRecipe.make("tail_moss_dye", Items.GRAY_DYE).setList("#").addMaterial('#', EndBlocks.TAIL_MOSS).build(); GridRecipe.make("petal_block", EndBlocks.HYDRALUX_PETAL_BLOCK).setShape("##", "##").addMaterial('#', EndItems.HYDRALUX_PETAL).build(); GridRecipe.make("petal_white_dye", Items.WHITE_DYE).setList("#").addMaterial('#', EndItems.HYDRALUX_PETAL).build(); GridRecipe.make("sweet_berry_jelly", EndItems.SWEET_BERRY_JELLY) .setList("JWSB") .addMaterial('J', EndItems.GELATINE) .addMaterial('W', PotionUtils.setPotion(new ItemStack(Items.POTION), Potions.WATER)) .addMaterial('S', Items.SUGAR).addMaterial('B', Items.SWEET_BERRIES) .build(); GridRecipe.make("shadow_berry_jelly", EndItems.SHADOW_BERRY_JELLY) .setList("JWSB") .addMaterial('J', EndItems.GELATINE) .addMaterial('W', PotionUtils.setPotion(new ItemStack(Items.POTION), Potions.WATER)) .addMaterial('S', Items.SUGAR) .addMaterial('B', EndItems.SHADOW_BERRY_COOKED) .build(); GridRecipe.make("shadow_berry_jelly", EndItems.BLOSSOM_BERRY_JELLY) .setList("JWSB") .addMaterial('J', EndItems.GELATINE) .addMaterial('W', PotionUtils.setPotion(new ItemStack(Items.POTION), Potions.WATER)) .addMaterial('S', Items.SUGAR) .addMaterial('B', EndItems.BLOSSOM_BERRY) .build(); GridRecipe.make("sulphur_gunpowder", Items.GUNPOWDER).setList("SCB").addMaterial('S', EndItems.CRYSTALLINE_SULPHUR).addMaterial('C', Items.COAL, Items.CHARCOAL).addMaterial('B', Items.BONE_MEAL).build(); GridRecipe.make("dense_emerald_ice", EndBlocks.DENSE_EMERALD_ICE).setShape("##", "##").addMaterial('#', EndBlocks.EMERALD_ICE).build(); GridRecipe.make("ancient_emerald_ice", EndBlocks.ANCIENT_EMERALD_ICE).setShape("###", "###", "###").addMaterial('#', EndBlocks.DENSE_EMERALD_ICE).build(); GridRecipe.make("charnia_cyan_dye", Items.CYAN_DYE).setList("#").addMaterial('#', EndBlocks.CHARNIA_CYAN).build(); GridRecipe.make("charnia_green_dye", Items.GREEN_DYE).setList("#").addMaterial('#', EndBlocks.CHARNIA_GREEN).build(); GridRecipe.make("charnia_light_blue_dye", Items.LIGHT_BLUE_DYE).setList("#").addMaterial('#', EndBlocks.CHARNIA_LIGHT_BLUE).build(); GridRecipe.make("charnia_orange_dye", Items.ORANGE_DYE).setList("#").addMaterial('#', EndBlocks.CHARNIA_ORANGE).build(); GridRecipe.make("charnia_purple_dye", Items.PURPLE_DYE).setList("#").addMaterial('#', EndBlocks.CHARNIA_PURPLE).build(); GridRecipe.make("charnia_red_dye", Items.RED_DYE).setList("#").addMaterial('#', EndBlocks.CHARNIA_RED).build(); GridRecipe.make("respawn_obelisk", EndBlocks.RESPAWN_OBELISK) .setShape("CSC", "CSC", "AAA") .addMaterial('C', EndBlocks.AURORA_CRYSTAL) .addMaterial('S', EndItems.ETERNAL_CRYSTAL) .addMaterial('A', EndBlocks.AMBER_BLOCK) .build(); GridRecipe.make("hopper", Blocks.HOPPER) .setShape("I I", "ICI", " I ") .addMaterial('I', Items.IRON_INGOT) .addMaterial('C', TagAPI.ITEM_CHEST) .build(); GridRecipe.make("shulker_box", Blocks.SHULKER_BOX) .setShape("S", "C", "S") .addMaterial('S', Items.SHULKER_SHELL) .addMaterial('C', TagAPI.ITEM_CHEST) .build(); GridRecipe.make("twisted_umbrella_moss_dye", Items.PURPLE_DYE).setList("#").addMaterial('#', EndBlocks.TWISTED_UMBRELLA_MOSS).build(); GridRecipe.make("twisted_umbrella_moss_dye_tall", Items.PURPLE_DYE).setOutputCount(2).setList("#").addMaterial('#', EndBlocks.TWISTED_UMBRELLA_MOSS_TALL).build(); GridRecipe.make("leather_to_stripes", EndItems.LEATHER_STRIPE) .setList("L") .addMaterial('L', Items.LEATHER) .setOutputCount(3) .build(); GridRecipe.make("stripes_to_leather", Items.LEATHER) .setList("SSS") .addMaterial('S', EndItems.LEATHER_STRIPE) .build(); GridRecipe.make("leather_wrapped_stick", EndItems.LEATHER_WRAPPED_STICK) .setList("SL") .addMaterial('S', Items.STICK) .addMaterial('L', EndItems.LEATHER_STRIPE) .build(); GridRecipe.make("fiber_string", Items.STRING).setOutputCount(6).setShape("#", "#", "#").addMaterial('#', EndItems.SILK_FIBER).build(); GridRecipe.make("ender_eye_amber", Items.ENDER_EYE) .setShape("SAS", "APA", "SAS") .addMaterial('S', EndItems.CRYSTAL_SHARDS) .addMaterial('A', EndItems.AMBER_GEM) .addMaterial('P', Items.ENDER_PEARL) .build(); GridRecipe.make("iron_chandelier", EndBlocks.IRON_CHANDELIER).setShape("I#I", " # ").addMaterial('#', Items.IRON_INGOT).addMaterial('I', EndItems.LUMECORN_ROD).setGroup("end_metal_chandelier").build(); GridRecipe.make("gold_chandelier", EndBlocks.GOLD_CHANDELIER).setShape("I#I", " # ").addMaterial('#', Items.GOLD_INGOT).addMaterial('I', EndItems.LUMECORN_ROD).setGroup("end_metal_chandelier").build(); GridRecipe.make("missing_tile", EndBlocks.MISSING_TILE) .setOutputCount(4) .setShape("#P", "P#") .addMaterial('#', EndBlocks.VIOLECITE.stone, EndBlocks.VIOLECITE.bricks, EndBlocks.VIOLECITE.tiles) .addMaterial('P', Blocks.PURPUR_BLOCK) .build(); registerHammer("iron", Items.IRON_INGOT, EndItems.IRON_HAMMER); registerHammer("golden", Items.GOLD_INGOT, EndItems.GOLDEN_HAMMER); registerHammer("diamond", Items.DIAMOND, EndItems.DIAMOND_HAMMER); GridRecipe.make("charcoal_block", EndBlocks.CHARCOAL_BLOCK).setShape("###", "###", "###").addMaterial('#', Items.CHARCOAL).build(); GridRecipe.make("charcoal_from_block", Items.CHARCOAL).setOutputCount(9).setList("#").addMaterial('#', EndBlocks.CHARCOAL_BLOCK).build(); GridRecipe.make("end_stone_furnace", EndBlocks.END_STONE_FURNACE).setShape("###", "# #", "###").addMaterial('#', Blocks.END_STONE).build(); GridRecipe.make("filalux_lantern", EndBlocks.FILALUX_LANTERN).setShape("###", "###", "###").addMaterial('#', EndBlocks.FILALUX).build(); GridRecipe.make("silk_moth_hive", EndBlocks.SILK_MOTH_HIVE).setShape("#L#", "LML", "#L#").addMaterial('#', EndBlocks.TENANEA.planks).addMaterial('L', EndBlocks.TENANEA_LEAVES).addMaterial('M', EndItems.SILK_MOTH_MATRIX).build(); GridRecipe.make("cave_pumpkin_pie", EndItems.CAVE_PUMPKIN_PIE).setShape("SBS", "BPB", "SBS").addMaterial('P', EndBlocks.CAVE_PUMPKIN).addMaterial('B', EndItems.BLOSSOM_BERRY, EndItems.SHADOW_BERRY_RAW).addMaterial('S', Items.SUGAR).build(); GridRecipe.make("cave_pumpkin_seeds", EndBlocks.CAVE_PUMPKIN_SEED).setOutputCount(4).setList("#").addMaterial('#', EndBlocks.CAVE_PUMPKIN).build(); GridRecipe.make("neon_cactus_block", EndBlocks.NEON_CACTUS_BLOCK).setShape("##", "##").addMaterial('#', EndBlocks.NEON_CACTUS).build(); GridRecipe.make("neon_cactus_block_slab", EndBlocks.NEON_CACTUS_BLOCK_SLAB).setShape("###").setOutputCount(6).addMaterial('#', EndBlocks.NEON_CACTUS_BLOCK).build(); GridRecipe.make("neon_cactus_block_stairs", EndBlocks.NEON_CACTUS_BLOCK_STAIRS).setShape("# ", "## ", "###").setOutputCount(4).addMaterial('#', EndBlocks.NEON_CACTUS_BLOCK).build(); GridRecipe.make("tag_smith_table", Blocks.SMITHING_TABLE).setShape("II", "##", "##").addMaterial('#', ItemTags.PLANKS).addMaterial('I', TagAPI.IRON_INGOTS).build(); GridRecipe.make("tag_cauldron", Blocks.CAULDRON).setShape("I I", "I I", "III").addMaterial('I', TagAPI.IRON_INGOTS).build(); GridRecipe.make("tag_hopper", Blocks.HOPPER).setShape("I I", "ICI", " I ").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('C', TagAPI.ITEM_CHEST).build(); GridRecipe.make("tag_piston", Blocks.PISTON).setShape("WWW", "CIC", "CDC").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('D', Items.REDSTONE).addMaterial('C', Items.COBBLESTONE).addMaterial('W', ItemTags.PLANKS).build(); GridRecipe.make("tag_rail", Blocks.RAIL).setShape("I I", "ISI", "I I").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('S', Items.STICK).build(); GridRecipe.make("tag_stonecutter", Blocks.STONECUTTER).setShape(" I ", "SSS").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('S', Items.STONE).build(); GridRecipe.make("tag_bucket", Items.BUCKET).setShape("I I", " I ").addMaterial('I', TagAPI.IRON_INGOTS).build(); GridRecipe.make("tag_compass", Items.COMPASS).setShape(" I ", "IDI", " I ").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('D', Items.REDSTONE).build(); GridRecipe.make("tag_minecart", Items.MINECART).setShape("I I", "III").addMaterial('I', TagAPI.IRON_INGOTS).build(); GridRecipe.make("tag_shield", Items.SHIELD).setShape("WIW", "WWW", " W ").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('W', ItemTags.PLANKS).build(); GridRecipe.make("sugar_from_root", Items.SUGAR).setList("###").addMaterial('#', EndItems.AMBER_ROOT_RAW).build(); } private static void registerLantern(String name, Block lantern, Block slab) { GridRecipe.make(name, lantern) .setShape("S", "#", "S") .addMaterial('#', EndItems.CRYSTAL_SHARDS) .addMaterial('S', slab) .setGroup("end_stone_lanterns") .build(); } public static void registerPedestal(String name, Block pedestal, Block slab, Block pillar) { GridRecipe.make(name, pedestal) .setShape("S", "#", "S") .addMaterial('S', slab) .addMaterial('#', pillar) .setOutputCount(2) .build(); } private static void registerHammer(String name, Item material, Item result) { GridRecipe.make(name + "_hammer", result) .setShape("I I", "I#I", " # ") .addMaterial('I', material) .addMaterial('#', Items.STICK) .build(); } }
3e1c24dafc31f7f39c7d559d05df6b534bba2848
377
java
Java
gulimall-order/src/main/java/com/criminal/gulimall/order/dao/OrderItemDao.java
criminal016/gulimall
da50a19336a68c75e392329b70616b2f1feac7c5
[ "Apache-2.0" ]
null
null
null
gulimall-order/src/main/java/com/criminal/gulimall/order/dao/OrderItemDao.java
criminal016/gulimall
da50a19336a68c75e392329b70616b2f1feac7c5
[ "Apache-2.0" ]
null
null
null
gulimall-order/src/main/java/com/criminal/gulimall/order/dao/OrderItemDao.java
criminal016/gulimall
da50a19336a68c75e392329b70616b2f1feac7c5
[ "Apache-2.0" ]
null
null
null
20.777778
67
0.764706
11,929
package com.criminal.gulimall.order.dao; import com.criminal.gulimall.order.entity.OrderItemEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; /** * 订单项信息 * * @author lifg * @email efpyi@example.com * @date 2021-05-05 14:59:32 */ @Mapper public interface OrderItemDao extends BaseMapper<OrderItemEntity> { }
3e1c2628d19996bd3f28d2dab3c605e3dc73b92e
859
java
Java
ontolib-io/src/main/java/com/github/phenomics/ontolib/io/obo/TrailingModifierBuilder.java
Phenomics/ontolib
71867157c31ca045fc21004d3ff9443ce14b5583
[ "BSD-3-Clause" ]
9
2017-07-23T09:07:53.000Z
2020-10-08T11:53:58.000Z
ontolib-io/src/main/java/com/github/phenomics/ontolib/io/obo/TrailingModifierBuilder.java
Phenomics/ontolib
71867157c31ca045fc21004d3ff9443ce14b5583
[ "BSD-3-Clause" ]
38
2017-07-23T09:14:24.000Z
2018-01-19T09:25:43.000Z
ontolib-io/src/main/java/com/github/phenomics/ontolib/io/obo/TrailingModifierBuilder.java
Phenomics/ontolib
71867157c31ca045fc21004d3ff9443ce14b5583
[ "BSD-3-Clause" ]
5
2017-07-23T13:14:08.000Z
2018-05-09T19:54:18.000Z
24.166667
77
0.696552
11,930
package com.github.phenomics.ontolib.io.obo; import java.util.ArrayList; import java.util.List; // TODO: make immutable, use immutable list, implement builder /** * Builder class for {@link TrailingModifier}. * * @author <a href="mailto:anpch@example.com">Manuel Holtgrewe</a> */ public final class TrailingModifierBuilder { /** A list of key/value entries. */ private final List<TrailingModifier.KeyValue> keyValue = new ArrayList<>(); /** * Add key value pair. * * @param key The key of the pair. * @param value The value of the pair. */ public void addKeyValue(String key, String value) { keyValue.add(new TrailingModifier.KeyValue(key, value)); } /** * @return Construct and return new {@link TrailingModifier} object. */ public TrailingModifier build() { return new TrailingModifier(keyValue); } }
3e1c265f91b8da9583061924bcd5532db8a3c09c
1,874
java
Java
Magic/src/main/java/com/elmakers/mine/bukkit/spell/builtin/CushionSpell.java
qsefthuopq/MagicPlugin
795a2ab6c952e1b189567b7ea8fd0cacd0c4c647
[ "MIT" ]
203
2015-03-11T17:28:57.000Z
2022-03-31T09:26:43.000Z
Magic/src/main/java/com/elmakers/mine/bukkit/spell/builtin/CushionSpell.java
qsefthuopq/MagicPlugin
795a2ab6c952e1b189567b7ea8fd0cacd0c4c647
[ "MIT" ]
991
2015-01-15T18:46:19.000Z
2022-03-29T21:49:30.000Z
Magic/src/main/java/com/elmakers/mine/bukkit/spell/builtin/CushionSpell.java
qsefthuopq/MagicPlugin
795a2ab6c952e1b189567b7ea8fd0cacd0c4c647
[ "MIT" ]
249
2015-01-15T17:52:04.000Z
2022-03-28T11:50:31.000Z
31.762712
92
0.57524
11,931
package com.elmakers.mine.bukkit.spell.builtin; import org.bukkit.Material; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.configuration.ConfigurationSection; import com.elmakers.mine.bukkit.api.spell.SpellResult; import com.elmakers.mine.bukkit.spell.BlockSpell; @Deprecated public class CushionSpell extends BlockSpell { private static final int DEFAULT_CUSHION_WIDTH = 3; private static final int DEFAULT_CUSHION_HEIGHT = 4; @Override public SpellResult onCast(ConfigurationSection parameters) { World world = getWorld(); Block targetFace = getTargetBlock(); if (targetFace == null) { return SpellResult.NO_TARGET; } if (!hasBuildPermission(targetFace)) { return SpellResult.INSUFFICIENT_PERMISSION; } int cushionWidth = parameters.getInt("width", DEFAULT_CUSHION_WIDTH); int cushionHeight = parameters.getInt("height", DEFAULT_CUSHION_HEIGHT); int bubbleStart = -cushionWidth / 2; int bubbleEnd = cushionWidth / 2; for (int dx = bubbleStart; dx < bubbleEnd; dx++) { for (int dz = bubbleStart; dz < bubbleEnd; dz++) { for (int dy = 0; dy < cushionHeight; dy++) { int x = targetFace.getX() + dx; int y = targetFace.getY() + dy; int z = targetFace.getZ() + dz; Block block = world.getBlockAt(x, y, z); if (block.getType() == Material.AIR || block.getType() == Material.FIRE) { registerForUndo(block); block.setType(Material.WATER); } } } } registerForUndo(); return SpellResult.CAST; } }
3e1c284a65800ba0aa709c27ad815974b8943f13
421
java
Java
TennisShop/Server/src/main/java/kl/tennisshop/services/LoggerService.java
kostadinlambov/Tennis-Shop
c81ce9168860265addbb021499f2126a830e8753
[ "MIT" ]
1
2019-04-07T23:23:49.000Z
2019-04-07T23:23:49.000Z
TennisShop/Server/src/main/java/kl/tennisshop/services/LoggerService.java
kostadinlambov/Tennis-Shop
c81ce9168860265addbb021499f2126a830e8753
[ "MIT" ]
null
null
null
TennisShop/Server/src/main/java/kl/tennisshop/services/LoggerService.java
kostadinlambov/Tennis-Shop
c81ce9168860265addbb021499f2126a830e8753
[ "MIT" ]
null
null
null
21.05
68
0.781473
11,932
package kl.tennisshop.services; import kl.tennisshop.domain.entities.Logger; import kl.tennisshop.domain.models.serviceModels.LoggerServiceModel; import java.util.List; public interface LoggerService { void saveLog(Logger logger); List<LoggerServiceModel> getAllLogs(); List<LoggerServiceModel> getLogsByUsername(String username); boolean deleteAll(); boolean deleteByName(String username); }
3e1c293aae6a41f35fd70ee5fff6c025b8d1f0e1
681
java
Java
hitool-crypto/src/test/java/hitool/crypto/RIPEMDCryptoTest.java
hiwepy/hitool
51c89bf914343686ef479bc2f2998c9b01d07a22
[ "Apache-2.0", "MIT" ]
null
null
null
hitool-crypto/src/test/java/hitool/crypto/RIPEMDCryptoTest.java
hiwepy/hitool
51c89bf914343686ef479bc2f2998c9b01d07a22
[ "Apache-2.0", "MIT" ]
8
2020-11-16T20:45:21.000Z
2021-04-03T08:47:25.000Z
hitool-crypto/src/test/java/hitool/crypto/RIPEMDCryptoTest.java
hiwepy/hitool
51c89bf914343686ef479bc2f2998c9b01d07a22
[ "Apache-2.0", "MIT" ]
null
null
null
32.428571
80
0.740088
11,933
/* * Copyright (c) 2018, vindell (https://github.com/vindell). * * 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 hitool.crypto; public class RIPEMDCryptoTest { }
3e1c2975e329bab1486626f924d61c66d61e6199
374,336
java
Java
tests/time/mosa/tests/s1022/110_firebird/evosuite-tests/org/firebirdsql/gds/impl/wire/AbstractJavaGDSImpl_ESTest.java
sealuzh/termite-replication
1636b1973c8692ed6a818e323cd1dd826cabbad3
[ "MIT" ]
null
null
null
tests/time/mosa/tests/s1022/110_firebird/evosuite-tests/org/firebirdsql/gds/impl/wire/AbstractJavaGDSImpl_ESTest.java
sealuzh/termite-replication
1636b1973c8692ed6a818e323cd1dd826cabbad3
[ "MIT" ]
3
2020-11-16T20:40:56.000Z
2021-03-23T00:18:04.000Z
tests/time/mosa/tests/s1022/110_firebird/evosuite-tests/org/firebirdsql/gds/impl/wire/AbstractJavaGDSImpl_ESTest.java
sealuzh/termite-replication
1636b1973c8692ed6a818e323cd1dd826cabbad3
[ "MIT" ]
null
null
null
39.412087
219
0.697734
11,934
/* * This file was automatically generated by EvoSuite * Sat Nov 28 04:49:51 GMT 2020 */ package org.firebirdsql.gds.impl.wire; 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.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.EOFException; import java.io.FileDescriptor; import java.io.IOException; import java.io.InputStream; import java.io.SequenceInputStream; import java.util.Enumeration; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.evosuite.runtime.mock.java.io.MockFileInputStream; import org.evosuite.runtime.mock.java.io.MockPrintStream; import org.firebirdsql.gds.BlobParameterBuffer; import org.firebirdsql.gds.DatabaseParameterBuffer; import org.firebirdsql.gds.EventHandle; import org.firebirdsql.gds.EventHandler; import org.firebirdsql.gds.IscBlobHandle; import org.firebirdsql.gds.IscDbHandle; import org.firebirdsql.gds.IscStmtHandle; import org.firebirdsql.gds.IscSvcHandle; import org.firebirdsql.gds.IscTrHandle; import org.firebirdsql.gds.ServiceParameterBuffer; import org.firebirdsql.gds.ServiceRequestBuffer; import org.firebirdsql.gds.TransactionParameterBuffer; import org.firebirdsql.gds.XSQLDA; import org.firebirdsql.gds.impl.AbstractIscTrHandle; import org.firebirdsql.gds.impl.DbAttachInfo; import org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl; import org.firebirdsql.gds.impl.wire.BlobParameterBufferImp; import org.firebirdsql.gds.impl.wire.DatabaseParameterBufferImp; import org.firebirdsql.gds.impl.wire.EventHandleImp; import org.firebirdsql.gds.impl.wire.JavaGDSImpl; import org.firebirdsql.gds.impl.wire.ServiceParameterBufferImp; import org.firebirdsql.gds.impl.wire.ServiceRequestBufferImp; import org.firebirdsql.gds.impl.wire.WireXdrInputStream; import org.firebirdsql.gds.impl.wire.XdrInputStream; import org.firebirdsql.gds.impl.wire.XdrOutputStream; import org.firebirdsql.gds.impl.wire.isc_blob_handle_impl; import org.firebirdsql.gds.impl.wire.isc_db_handle_impl; import org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl; import org.firebirdsql.gds.impl.wire.isc_svc_handle_impl; import org.firebirdsql.gds.impl.wire.isc_tr_handle_impl; import org.firebirdsql.jca.FBConnectionRequestInfo; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class AbstractJavaGDSImpl_ESTest extends AbstractJavaGDSImpl_ESTest_scaffolding { /** //Test case number: 0 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test000() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = XdrInputStream.pad; assertNotNull(byteArray0); assertEquals(8, byteArray0.length); assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); int int0 = javaGDSImpl0.iscVaxInteger(byteArray0, 1, 6); assertEquals(0, int0); assertEquals(8, byteArray0.length); assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); } /** //Test case number: 1 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test001() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); // Undeclared exception! try { javaGDSImpl0.getSqlPrepareInfo(isc_stmt_handle_impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 2 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test002() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[5]; byteArray0[0] = (byte)17; ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0); assertNotNull(byteArrayInputStream0); assertEquals(5, byteArrayInputStream0.available()); assertEquals(5, byteArray0.length); assertArrayEquals(new byte[] {(byte)17, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); XdrInputStream xdrInputStream0 = new XdrInputStream(byteArrayInputStream0); assertNotNull(xdrInputStream0); assertEquals(5, byteArrayInputStream0.available()); assertEquals(5, byteArray0.length); assertArrayEquals(new byte[] {(byte)17, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); int int0 = javaGDSImpl0.nextOperation(xdrInputStream0); assertEquals(285212672, int0); assertEquals(0, byteArrayInputStream0.available()); assertEquals(5, byteArray0.length); assertArrayEquals(new byte[] {(byte)17, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); } /** //Test case number: 3 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test003() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[6]; byteArray0[0] = (byte) (-53); ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0); assertNotNull(byteArrayInputStream0); assertEquals(6, byteArrayInputStream0.available()); assertEquals(6, byteArray0.length); assertArrayEquals(new byte[] {(byte) (-53), (byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); SequenceInputStream sequenceInputStream0 = new SequenceInputStream(byteArrayInputStream0, byteArrayInputStream0); assertNotNull(sequenceInputStream0); assertEquals(6, byteArrayInputStream0.available()); assertEquals(6, byteArray0.length); assertArrayEquals(new byte[] {(byte) (-53), (byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); XdrInputStream xdrInputStream0 = new XdrInputStream(sequenceInputStream0); assertNotNull(xdrInputStream0); assertEquals(6, byteArrayInputStream0.available()); assertEquals(6, byteArray0.length); assertArrayEquals(new byte[] {(byte) (-53), (byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); int int0 = javaGDSImpl0.nextOperation(xdrInputStream0); assertEquals((-889192448), int0); assertEquals(0, byteArrayInputStream0.available()); assertEquals(6, byteArray0.length); assertArrayEquals(new byte[] {(byte) (-53), (byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); } /** //Test case number: 4 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test004() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[5]; byteArray0[2] = (byte)16; int int0 = javaGDSImpl0.iscInteger(byteArray0, 2, 5); assertEquals(1048576, int0); assertEquals(5, byteArray0.length); assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)16, (byte)0, (byte)0}, byteArray0); } /** //Test case number: 5 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test005() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.sendConnectPacket((XdrOutputStream) null, (XdrInputStream) null, (String) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 6 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test006() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertTrue(isc_db_handle_impl0.isValid()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.sendConnectPacket(isc_db_handle_impl0.out, isc_db_handle_impl0.in, ""); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 7 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test007() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.sendConnectPacket((XdrOutputStream) null, (XdrInputStream) null, "PURE_JAVA"); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 8 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test008() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); javaGDSImpl0.receiveResponse((isc_svc_handle_impl) null, 540); } /** //Test case number: 9 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test009() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.openSocket((isc_db_handle_impl) null, (DbAttachInfo) null, true, 805, 0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 10 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test010() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); Integer integer0 = new Integer(586); assertNotNull(integer0); assertEquals(586, (int)integer0); DbAttachInfo dbAttachInfo0 = new DbAttachInfo((String) null, integer0, "op_reconnect "); assertNotNull(dbAttachInfo0); assertEquals("localhost", dbAttachInfo0.getServer()); assertEquals("op_reconnect ", dbAttachInfo0.getFileName()); assertEquals(586, dbAttachInfo0.getPort()); try { javaGDSImpl0.openSocket(isc_db_handle_impl0, dbAttachInfo0, false, 586, 141); fail("Expecting exception: IOException"); } catch(IOException e) { // // Remote address/port is not opened: org.evosuite.runtime.vnet.EndPointInfo@944debc8 // verifyException("org.evosuite.runtime.vnet.VirtualNetwork", e); } } /** //Test case number: 11 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test011() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertTrue(isc_db_handle_impl0.isValid()); try { javaGDSImpl0.isc_dsql_alloc_statement2(isc_db_handle_impl0, (IscStmtHandle) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // feature is not supported // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 12 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test012() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); int int0 = javaGDSImpl0.iscVaxInteger((byte[]) null, 448, (-471)); assertEquals(0, int0); } /** //Test case number: 13 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test013() throws Throwable { isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); byte[] byteArray0 = AbstractJavaGDSImpl.describe_bind_info15; assertNotNull(byteArray0); assertEquals(13, byteArray0.length); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscTransactionInformation(isc_tr_handle_impl0, byteArray0, 0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 14 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test014() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscTransactionInformation(isc_tr_handle_impl0, (byte[]) null, (-1136)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 15 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test015() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = (isc_tr_handle_impl)javaGDSImpl0.createIscTrHandle(); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscTransactionInformation(isc_tr_handle_impl0, byteArray0, (byte)81); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 16 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test016() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_svc_handle_impl isc_svc_handle_impl0 = (isc_svc_handle_impl)javaGDSImpl0.createIscSvcHandle(); assertNotNull(isc_svc_handle_impl0); assertEquals(0, isc_svc_handle_impl0.getResp_object()); assertFalse(isc_svc_handle_impl0.isValid()); assertTrue(isc_svc_handle_impl0.isNotValid()); assertEquals(0L, isc_svc_handle_impl0.getResp_blob_id()); try { javaGDSImpl0.iscServiceStart(isc_svc_handle_impl0, (ServiceRequestBuffer) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid service handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 17 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test017() throws Throwable { byte[] byteArray0 = new byte[3]; isc_svc_handle_impl isc_svc_handle_impl0 = new isc_svc_handle_impl(); assertNotNull(isc_svc_handle_impl0); assertTrue(isc_svc_handle_impl0.isNotValid()); assertEquals(0L, isc_svc_handle_impl0.getResp_blob_id()); assertEquals(0, isc_svc_handle_impl0.getResp_object()); assertFalse(isc_svc_handle_impl0.isValid()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); ServiceRequestBufferImp serviceRequestBufferImp0 = (ServiceRequestBufferImp)javaGDSImpl0.createServiceRequestBuffer(53); assertNotNull(serviceRequestBufferImp0); assertEquals(53, serviceRequestBufferImp0.getTaskIdentifier()); ServiceParameterBufferImp serviceParameterBufferImp0 = (ServiceParameterBufferImp)javaGDSImpl0.createServiceParameterBuffer(); assertNotNull(serviceParameterBufferImp0); try { javaGDSImpl0.iscServiceQuery(isc_svc_handle_impl0, serviceParameterBufferImp0, serviceRequestBufferImp0, byteArray0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid service handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 18 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test018() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_svc_handle_impl isc_svc_handle_impl0 = new isc_svc_handle_impl(); assertNotNull(isc_svc_handle_impl0); assertEquals(0L, isc_svc_handle_impl0.getResp_blob_id()); assertTrue(isc_svc_handle_impl0.isNotValid()); assertEquals(0, isc_svc_handle_impl0.getResp_object()); assertFalse(isc_svc_handle_impl0.isValid()); ServiceRequestBufferImp serviceRequestBufferImp0 = new ServiceRequestBufferImp((-322)); assertNotNull(serviceRequestBufferImp0); assertEquals((-322), serviceRequestBufferImp0.getTaskIdentifier()); byte[] byteArray0 = new byte[0]; try { javaGDSImpl0.iscServiceQuery(isc_svc_handle_impl0, (ServiceParameterBuffer) null, serviceRequestBufferImp0, byteArray0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid service handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 19 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test019() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_blob_handle_impl isc_blob_handle_impl0 = new isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); // Undeclared exception! try { javaGDSImpl0.iscSeekBlob(isc_blob_handle_impl0, (-1036), 0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 20 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test020() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_blob_handle_impl isc_blob_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertEquals(0, isc_blob_handle_impl0.getRblId()); assertFalse(isc_blob_handle_impl0.isEof()); // Undeclared exception! try { javaGDSImpl0.iscSeekBlob(isc_blob_handle_impl0, (-499), (-499)); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_blob_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_blob_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 21 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test021() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_blob_handle_impl isc_blob_handle_impl0 = new isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertEquals(0, isc_blob_handle_impl0.getPosition()); // Undeclared exception! try { javaGDSImpl0.iscSeekBlob(isc_blob_handle_impl0, (-2315), 841); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 22 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test022() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscReconnectTransaction((IscTrHandle) null, (IscDbHandle) null, 0L); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 23 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test023() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); EventHandler eventHandler0 = mock(EventHandler.class, new ViolatedAssumptionAnswer()); try { javaGDSImpl0.iscQueueEvents((IscDbHandle) null, (EventHandle) null, eventHandler0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 24 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test024() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_blob_handle_impl isc_blob_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0, isc_blob_handle_impl0.getRblId()); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscPutSegment(isc_blob_handle_impl0, byteArray0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_blob_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_blob_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 25 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test025() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscPrepareTransaction2(isc_tr_handle_impl0, byteArray0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 26 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test026() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_blob_handle_impl isc_blob_handle_impl0 = new isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0, isc_blob_handle_impl0.getPosition()); org.firebirdsql.gds.impl.jni.BlobParameterBufferImp blobParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.BlobParameterBufferImp(); assertNotNull(blobParameterBufferImp0); try { javaGDSImpl0.iscOpenBlob2((IscDbHandle) null, (IscTrHandle) null, isc_blob_handle_impl0, blobParameterBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 27 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test027() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); int int0 = javaGDSImpl0.iscInteger((byte[]) null, (-1470), (-1470)); assertEquals(0, int0); } /** //Test case number: 28 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test028() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscInteger(byteArray0, (-1102062856), 0); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // -1102062856 // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 29 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test029() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_blob_handle_impl isc_blob_handle_impl0 = (isc_blob_handle_impl)javaGDSImpl0.createIscBlobHandle(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertFalse(isc_blob_handle_impl0.isEof()); try { javaGDSImpl0.iscGetSegment(isc_blob_handle_impl0, 2664); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 30 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test030() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); Object[] objectArray0 = new Object[9]; byte[] byteArray0 = javaGDSImpl0.iscExpandDpb((byte[]) null, (-854), (-854), objectArray0); assertNull(byteArray0); assertEquals(9, objectArray0.length); } /** //Test case number: 31 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test031() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = javaGDSImpl0.iscExpandDpb((byte[]) null, 0, 128, (Object[]) null); assertNull(byteArray0); } /** //Test case number: 32 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test032() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[3]; Object[] objectArray0 = new Object[2]; byte[] byteArray1 = javaGDSImpl0.iscExpandDpb(byteArray0, (byte)1, (byte)1, objectArray0); assertNotNull(byteArray1); assertSame(byteArray0, byteArray1); assertSame(byteArray1, byteArray0); assertEquals(3, byteArray0.length); assertEquals(2, objectArray0.length); assertEquals(3, byteArray1.length); assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0}, byteArray0); assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0}, byteArray1); } /** //Test case number: 33 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test033() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.EventHandleImp eventHandleImp0 = new org.firebirdsql.gds.impl.jni.EventHandleImp(); assertNotNull(eventHandleImp0); assertEquals((-1), eventHandleImp0.getEventId()); assertEquals((-1), eventHandleImp0.getSize()); assertEquals((-1), eventHandleImp0.getEventCount()); assertNull(eventHandleImp0.getEventName()); assertFalse(eventHandleImp0.isValid()); assertFalse(eventHandleImp0.isCancelled()); assertEquals((-1), eventHandleImp0.getEventStructHandle()); javaGDSImpl0.iscEventBlock(eventHandleImp0); assertEquals((-1), eventHandleImp0.getEventId()); assertEquals((-1), eventHandleImp0.getSize()); assertEquals((-1), eventHandleImp0.getEventCount()); assertNull(eventHandleImp0.getEventName()); assertFalse(eventHandleImp0.isValid()); assertFalse(eventHandleImp0.isCancelled()); assertEquals((-1), eventHandleImp0.getEventStructHandle()); } /** //Test case number: 34 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test034() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscDsqlSqlInfo(isc_stmt_handle_impl0, byteArray0, (-1448319532)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 35 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test035() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscDsqlSqlInfo(isc_stmt_handle_impl0, byteArray0, 56); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 36 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test036() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[1]; // Undeclared exception! try { javaGDSImpl0.iscDsqlSqlInfo((IscStmtHandle) null, byteArray0, 5); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 37 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test037() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); // Undeclared exception! try { javaGDSImpl0.iscDsqlSetCursorName(isc_stmt_handle_impl0, "PURE_JAVA", 0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 38 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test038() throws Throwable { isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.size()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscDsqlSetCursorName(isc_stmt_handle_impl0, (String) null, (-11)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 39 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test039() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlSetCursorName(isc_stmt_handle_impl0, "", (-3237)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 40 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test040() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) null, (IscStmtHandle) isc_stmt_handle_impl0, (byte[]) null, (-413)); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 41 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test041() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) null, (IscStmtHandle) null, (byte[]) null, 4); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 42 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test042() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) null, (IscStmtHandle) isc_stmt_handle_impl0, "}*:clqHOSc^Bp6}", (String) null, 0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 43 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test043() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.size()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) isc_tr_handle_impl0, (IscStmtHandle) isc_stmt_handle_impl0, (String) null, (String) null, (-748)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 44 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test044() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) isc_tr_handle_impl0, (IscStmtHandle) isc_stmt_handle_impl0, "`j$DJYsf", 0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 45 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test045() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.size()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) isc_tr_handle_impl0, (IscStmtHandle) isc_stmt_handle_impl0, "", 5); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 46 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test046() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlFreeStatement(isc_stmt_handle_impl0, 0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 47 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test047() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertNotNull(xSQLDA0); try { javaGDSImpl0.iscDsqlFetch(isc_stmt_handle_impl0, (-2050356697), xSQLDA0, 0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 48 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test048() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) null, byteArray0, 3, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 49 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test049() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); XSQLDA xSQLDA0 = isc_stmt_handle_impl0.getOutSqlda(); assertNull(xSQLDA0); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); } /** //Test case number: 50 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test050() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) isc_tr_handle_impl0, (String) null, (String) null, (-281), (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 51 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test051() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertNotNull(xSQLDA0); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) null, "(#:%X(N;", "", 78, xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 52 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test052() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_object()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) isc_tr_handle_impl0, (String) null, 5, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 53 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test053() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertTrue(isc_db_handle_impl0.isValid()); isc_tr_handle_impl isc_tr_handle_impl0 = (isc_tr_handle_impl)javaGDSImpl0.createIscTrHandle(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertNotNull(xSQLDA0); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) isc_tr_handle_impl0, "c=k>Lq|#/@(d{", (-4083), xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 54 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test054() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) null, "", 4, xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 55 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test055() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecute2(isc_tr_handle_impl0, isc_stmt_handle_impl0, (-752), (XSQLDA) null, (XSQLDA) null); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 56 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test056() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecute2(isc_tr_handle_impl0, (IscStmtHandle) null, 448, (XSQLDA) null, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 57 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test057() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecute((IscTrHandle) null, isc_stmt_handle_impl0, 0, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 58 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test058() throws Throwable { isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isValid()); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertNotNull(xSQLDA0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecute(isc_tr_handle_impl0, isc_stmt_handle_impl0, (-699), xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 59 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test059() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecute((IscTrHandle) null, (IscStmtHandle) null, 4844, xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 60 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test060() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = (isc_tr_handle_impl)javaGDSImpl0.createIscTrHandle(); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); byte[] byteArray0 = new byte[2]; // Undeclared exception! try { javaGDSImpl0.iscDsqlExecImmed2((IscDbHandle) null, (IscTrHandle) isc_tr_handle_impl0, byteArray0, (-1152), (XSQLDA) null, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 61 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test061() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscDsqlExecImmed2((IscDbHandle) null, (IscTrHandle) null, byteArray0, 3, (XSQLDA) null, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 62 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test062() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecImmed2((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) null, "org.firebirdsql.gds.impl.AbstractGDS", "org.firebirdsql.gds.impl.AbstractGDS", (-1994770628), (XSQLDA) null, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 63 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test063() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqln); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertNotNull(xSQLDA0); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecImmed2((IscDbHandle) null, (IscTrHandle) isc_tr_handle_impl0, "s`f.!Q1NN $(L=Gz`AK", (-1937), xSQLDA0, xSQLDA0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 64 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test064() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlDescribeBind(isc_stmt_handle_impl0, 0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 65 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test065() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscDsqlDescribeBind((IscStmtHandle) null, 12); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 66 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test066() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscDsqlDescribe((IscStmtHandle) null, (-1404)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 67 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test067() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); // Undeclared exception! try { javaGDSImpl0.iscDatabaseInfo(isc_db_handle_impl0, (byte[]) null, 0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 68 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test068() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); DatabaseParameterBuffer databaseParameterBuffer0 = javaGDSImpl0.createDatabaseParameterBuffer(); assertNotNull(databaseParameterBuffer0); try { javaGDSImpl0.iscCreateDatabase((String) null, (IscDbHandle) null, databaseParameterBuffer0); fail("Expecting exception: Exception"); } catch(Exception e) { // // Connection string missing // verifyException("org.firebirdsql.gds.impl.DbAttachInfo", e); } } /** //Test case number: 69 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test069() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_blob_handle_impl isc_blob_handle_impl0 = (isc_blob_handle_impl)javaGDSImpl0.createIscBlobHandle(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); // Undeclared exception! try { javaGDSImpl0.iscBlobInfo(isc_blob_handle_impl0, (byte[]) null, 0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 70 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test070() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_blob_handle_impl isc_blob_handle_impl0 = new isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscBlobInfo(isc_blob_handle_impl0, byteArray0, (byte) (-27)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 71 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test071() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); DatabaseParameterBufferImp databaseParameterBufferImp0 = new DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); try { javaGDSImpl0.iscAttachDatabase((String) null, isc_db_handle_impl0, databaseParameterBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // Connection string missing // verifyException("org.firebirdsql.gds.impl.DbAttachInfo", e); } } /** //Test case number: 72 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test072() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); DatabaseParameterBufferImp databaseParameterBufferImp0 = new DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); try { javaGDSImpl0.iscAttachDatabase("", (IscDbHandle) null, databaseParameterBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // Bad connection string: ':' at beginning or end of:335544323 // verifyException("org.firebirdsql.gds.impl.DbAttachInfo", e); } } /** //Test case number: 73 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test073() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); DbAttachInfo dbAttachInfo0 = new DbAttachInfo("org.firebirdsql.gds.impl.wire.isc_svc_handle_impl"); assertNotNull(dbAttachInfo0); assertEquals(3050, dbAttachInfo0.getPort()); assertEquals("localhost", dbAttachInfo0.getServer()); assertEquals("org.firebirdsql.gds.impl.wire.isc_svc_handle_impl", dbAttachInfo0.getFileName()); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_object()); // Undeclared exception! try { javaGDSImpl0.internalAttachDatabase(dbAttachInfo0, (IscDbHandle) isc_db_handle_impl0, (DatabaseParameterBuffer) null, false); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 74 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test074() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertTrue(isc_db_handle_impl0.isValid()); try { javaGDSImpl0.internalAttachDatabase((String) null, (Integer) 0, (String) null, isc_db_handle_impl0, (DatabaseParameterBuffer) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // null or empty filename in DbAttachInfo // verifyException("org.firebirdsql.gds.impl.DbAttachInfo", e); } } /** //Test case number: 75 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test075() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertNotNull(xSQLDA0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertTrue(isc_db_handle_impl0.isValid()); org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp databaseParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); try { javaGDSImpl0.internalAttachDatabase("A~o6r\b@d6", (Integer) xSQLDA0.sqld, "", isc_db_handle_impl0, databaseParameterBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // null or empty filename in DbAttachInfo // verifyException("org.firebirdsql.gds.impl.DbAttachInfo", e); } } /** //Test case number: 76 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test076() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp databaseParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); try { javaGDSImpl0.internalAttachDatabase("", (Integer) xSQLDA0.sqln, "user.name", (IscDbHandle) null, databaseParameterBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 77 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test077() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.getSqlCounts((IscStmtHandle) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 78 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test078() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.getDescribeSelectInfo((IscStmtHandle) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 79 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test079() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.getDescribeBindInfo((IscStmtHandle) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 80 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test080() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); ServiceRequestBufferImp serviceRequestBufferImp0 = (ServiceRequestBufferImp)javaGDSImpl0.createServiceRequestBuffer(0); assertNotNull(serviceRequestBufferImp0); assertEquals(0, serviceRequestBufferImp0.getTaskIdentifier()); } /** //Test case number: 81 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test081() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); ServiceRequestBufferImp serviceRequestBufferImp0 = (ServiceRequestBufferImp)javaGDSImpl0.createServiceRequestBuffer((-1560)); assertNotNull(serviceRequestBufferImp0); assertEquals((-1560), serviceRequestBufferImp0.getTaskIdentifier()); } /** //Test case number: 82 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test082() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); EventHandleImp eventHandleImp0 = (EventHandleImp)javaGDSImpl0.createEventHandle(""); assertNotNull(eventHandleImp0); assertEquals("", eventHandleImp0.getEventName()); assertEquals((-1), eventHandleImp0.getLocalId()); assertEquals((-1), eventHandleImp0.getEventCount()); assertEquals((-1), eventHandleImp0.getEventId()); } /** //Test case number: 83 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test083() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); DbAttachInfo dbAttachInfo0 = new DbAttachInfo("Specified GDS type "); assertNotNull(dbAttachInfo0); assertEquals("Specified GDS type", dbAttachInfo0.getFileName()); assertEquals(3050, dbAttachInfo0.getPort()); assertEquals("localhost", dbAttachInfo0.getServer()); // Undeclared exception! try { javaGDSImpl0.connect((isc_db_handle_impl) null, dbAttachInfo0, (DatabaseParameterBuffer) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 84 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test084() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); DatabaseParameterBufferImp databaseParameterBufferImp0 = new DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); try { javaGDSImpl0.connect(isc_db_handle_impl0, "83%Vhe-^t$M?GO(.0", (Integer) 0, "", databaseParameterBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // null or empty filename in DbAttachInfo // verifyException("org.firebirdsql.gds.impl.DbAttachInfo", e); } } /** //Test case number: 85 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test085() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); DatabaseParameterBufferImp databaseParameterBufferImp0 = new DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); try { javaGDSImpl0.connect(isc_db_handle_impl0, (String) null, (Integer) 1, (String) null, databaseParameterBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // null or empty filename in DbAttachInfo // verifyException("org.firebirdsql.gds.impl.DbAttachInfo", e); } } /** //Test case number: 86 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test086() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.size()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); XSQLDA xSQLDA0 = isc_stmt_handle_impl0.getInSqlda(); assertNull(xSQLDA0); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.size()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp databaseParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); } /** //Test case number: 87 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test087() throws Throwable { // Undeclared exception! try { AbstractJavaGDSImpl.calculateIOLength((XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 88 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test088() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); javaGDSImpl0.addProcessName((DatabaseParameterBuffer) null); } /** //Test case number: 89 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test089() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); javaGDSImpl0.addProcessId((DatabaseParameterBuffer) null); } /** //Test case number: 90 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test090() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); MockPrintStream mockPrintStream0 = new MockPrintStream("Cp1250"); assertNotNull(mockPrintStream0); XdrOutputStream xdrOutputStream0 = new XdrOutputStream(mockPrintStream0); assertNotNull(xdrOutputStream0); WireXdrInputStream wireXdrInputStream0 = new WireXdrInputStream(); assertNotNull(wireXdrInputStream0); Enumeration<BufferedInputStream> enumeration0 = (Enumeration<BufferedInputStream>) mock(Enumeration.class, new ViolatedAssumptionAnswer()); doReturn(false).when(enumeration0).hasMoreElements(); SequenceInputStream sequenceInputStream0 = new SequenceInputStream(enumeration0); assertNotNull(sequenceInputStream0); wireXdrInputStream0.in = (InputStream) sequenceInputStream0; try { javaGDSImpl0.sendConnectPacket(xdrOutputStream0, wireXdrInputStream0, "PURE_JAVA"); fail("Expecting exception: EOFException"); } catch(EOFException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.XdrInputStream", e); } } /** //Test case number: 91 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test091() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); // Undeclared exception! try { javaGDSImpl0.openSocket(isc_db_handle_impl0, (DbAttachInfo) null, true, (-4), (-4)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 92 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test092() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); Integer integer0 = new Integer((-560)); assertNotNull(integer0); assertEquals((-560), (int)integer0); DbAttachInfo dbAttachInfo0 = new DbAttachInfo("PURE_JAVA", integer0, "7gG("); assertNotNull(dbAttachInfo0); assertEquals("7gG(", dbAttachInfo0.getFileName()); assertEquals((-560), dbAttachInfo0.getPort()); assertEquals("PURE_JAVA", dbAttachInfo0.getServer()); // Undeclared exception! try { javaGDSImpl0.openSocket((isc_db_handle_impl) null, dbAttachInfo0, true, 4, 2876); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // port out of range:-560 // verifyException("java.net.InetSocketAddress", e); } } /** //Test case number: 93 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test093() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); DbAttachInfo dbAttachInfo0 = new DbAttachInfo("`tX", (Integer) 4, "PURE_JAVA"); assertNotNull(dbAttachInfo0); assertEquals(4, dbAttachInfo0.getPort()); assertEquals("PURE_JAVA", dbAttachInfo0.getFileName()); assertEquals("`tX", dbAttachInfo0.getServer()); try { javaGDSImpl0.openSocket((isc_db_handle_impl) null, dbAttachInfo0, true, 0, 4); fail("Expecting exception: IOException"); } catch(IOException e) { // // Remote address/port is not opened: org.evosuite.runtime.vnet.EndPointInfo@944da54e // verifyException("org.evosuite.runtime.vnet.VirtualNetwork", e); } } /** //Test case number: 94 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test094() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.nextOperation((XdrInputStream) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 95 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test095() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[9]; ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0, 57, 2869); assertNotNull(byteArrayInputStream0); assertEquals((-48), byteArrayInputStream0.available()); assertEquals(9, byteArray0.length); assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); XdrInputStream xdrInputStream0 = new XdrInputStream(byteArrayInputStream0); assertNotNull(xdrInputStream0); assertEquals((-48), byteArrayInputStream0.available()); assertEquals(9, byteArray0.length); assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); xdrInputStream0.pos = (-2412); assertEquals((-48), byteArrayInputStream0.available()); // Undeclared exception! try { javaGDSImpl0.nextOperation(xdrInputStream0); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // -2412 // verifyException("org.firebirdsql.gds.impl.wire.XdrInputStream", e); } } /** //Test case number: 96 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test096() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); FileDescriptor fileDescriptor0 = new FileDescriptor(); assertNotNull(fileDescriptor0); assertFalse(fileDescriptor0.valid()); MockFileInputStream mockFileInputStream0 = new MockFileInputStream(fileDescriptor0); assertNotNull(mockFileInputStream0); WireXdrInputStream wireXdrInputStream0 = new WireXdrInputStream(mockFileInputStream0); assertNotNull(wireXdrInputStream0); assertFalse(fileDescriptor0.valid()); try { javaGDSImpl0.nextOperation(wireXdrInputStream0); fail("Expecting exception: IOException"); } catch(IOException e) { // // no message in exception (getMessage() returned null) // verifyException("org.evosuite.runtime.mock.java.io.NativeMockedIO", e); } } /** //Test case number: 97 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test097() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); Enumeration<BufferedInputStream> enumeration0 = (Enumeration<BufferedInputStream>) mock(Enumeration.class, new ViolatedAssumptionAnswer()); doReturn(false).when(enumeration0).hasMoreElements(); SequenceInputStream sequenceInputStream0 = new SequenceInputStream(enumeration0); assertNotNull(sequenceInputStream0); XdrInputStream xdrInputStream0 = new XdrInputStream(sequenceInputStream0); assertNotNull(xdrInputStream0); try { javaGDSImpl0.nextOperation(xdrInputStream0); fail("Expecting exception: EOFException"); } catch(EOFException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.XdrInputStream", e); } } /** //Test case number: 98 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test098() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscVaxInteger(byteArray0, 25, (byte)75); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // 25 // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 99 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test099() throws Throwable { XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertNotNull(xSQLDA0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscTransactionInformation(isc_tr_handle_impl0, xSQLDA0.blr, 5); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 100 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test100() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); org.firebirdsql.gds.impl.jni.TransactionParameterBufferImpl transactionParameterBufferImpl0 = new org.firebirdsql.gds.impl.jni.TransactionParameterBufferImpl(); assertNotNull(transactionParameterBufferImpl0); // Undeclared exception! try { javaGDSImpl0.iscStartTransaction(isc_tr_handle_impl0, (IscDbHandle) null, transactionParameterBufferImpl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 101 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test101() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_svc_handle_impl isc_svc_handle_impl0 = new isc_svc_handle_impl(); assertNotNull(isc_svc_handle_impl0); assertFalse(isc_svc_handle_impl0.isValid()); assertEquals(0L, isc_svc_handle_impl0.getResp_blob_id()); assertEquals(0, isc_svc_handle_impl0.getResp_object()); assertTrue(isc_svc_handle_impl0.isNotValid()); // Undeclared exception! try { javaGDSImpl0.iscServiceAttach((String) null, isc_svc_handle_impl0, (ServiceParameterBuffer) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 102 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test102() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscSeekBlob((IscBlobHandle) null, 70, 70); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 103 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test103() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_blob_handle_impl isc_blob_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getRblId()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); // Undeclared exception! try { javaGDSImpl0.iscSeekBlob(isc_blob_handle_impl0, 0, 335544583); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_blob_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_blob_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 104 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test104() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscRollbackTransaction(isc_tr_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 105 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test105() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscRollbackRetaining(isc_tr_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 106 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test106() throws Throwable { org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertEquals(0, isc_db_handle_impl0.getProtocol()); // Undeclared exception! try { javaGDSImpl0.iscReconnectTransaction(isc_tr_handle_impl0, isc_db_handle_impl0, 2831L); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 107 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test107() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); EventHandleImp eventHandleImp0 = (EventHandleImp)javaGDSImpl0.createEventHandle("org.firebirdsql.gds.XSQLVAR"); assertNotNull(eventHandleImp0); assertEquals((-1), eventHandleImp0.getEventId()); assertEquals((-1), eventHandleImp0.getEventCount()); assertEquals("org.firebirdsql.gds.XSQLVAR", eventHandleImp0.getEventName()); assertEquals((-1), eventHandleImp0.getLocalId()); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); // Undeclared exception! try { javaGDSImpl0.iscQueueEvents(isc_db_handle_impl0, eventHandleImp0, (EventHandler) null); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 108 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test108() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[1]; // Undeclared exception! try { javaGDSImpl0.iscPutSegment((IscBlobHandle) null, byteArray0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 109 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test109() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscPrepareTransaction2(isc_tr_handle_impl0, (byte[]) null); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 110 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test110() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscPrepareTransaction(isc_tr_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 111 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test111() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); org.firebirdsql.gds.impl.jni.isc_blob_handle_impl isc_blob_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0, isc_blob_handle_impl0.getRblId()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); // Undeclared exception! try { javaGDSImpl0.iscOpenBlob2(isc_db_handle_impl0, isc_tr_handle_impl0, isc_blob_handle_impl0, (BlobParameterBuffer) null); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_blob_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_blob_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 112 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test112() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscInteger((byte[]) null, 0, 1); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 113 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test113() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_blob_handle_impl isc_blob_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertEquals(0, isc_blob_handle_impl0.getRblId()); assertFalse(isc_blob_handle_impl0.isEof()); // Undeclared exception! try { javaGDSImpl0.iscGetSegment(isc_blob_handle_impl0, (-294)); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_blob_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_blob_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 114 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test114() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscEventCounts((EventHandle) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 115 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test115() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.EventHandleImp eventHandleImp0 = new org.firebirdsql.gds.impl.jni.EventHandleImp("PURE_JAVA"); assertNotNull(eventHandleImp0); assertEquals((-1), eventHandleImp0.getEventId()); assertEquals((-1), eventHandleImp0.getSize()); assertEquals((-1), eventHandleImp0.getEventCount()); assertFalse(eventHandleImp0.isValid()); assertFalse(eventHandleImp0.isCancelled()); assertEquals((-1), eventHandleImp0.getEventStructHandle()); assertEquals("PURE_JAVA", eventHandleImp0.getEventName()); // Undeclared exception! try { javaGDSImpl0.iscEventCounts(eventHandleImp0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.EventHandleImp cannot be cast to org.firebirdsql.gds.impl.wire.EventHandleImp // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 116 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test116() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); byte[] byteArray0 = new byte[1]; // Undeclared exception! try { javaGDSImpl0.iscDsqlSqlInfo(isc_stmt_handle_impl0, byteArray0, (byte)0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 117 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test117() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlSqlInfo(isc_stmt_handle_impl0, (byte[]) null, 3); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 118 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test118() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); // Undeclared exception! try { javaGDSImpl0.iscDsqlSetCursorName(isc_stmt_handle_impl0, "m%#! jck$qX6Vk{", 1881); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 119 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test119() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); byte[] byteArray0 = new byte[1]; try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) null, (IscStmtHandle) isc_stmt_handle_impl0, byteArray0, 5); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 120 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test120() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) isc_tr_handle_impl0, (IscStmtHandle) isc_stmt_handle_impl0, byteArray0, 4); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 121 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test121() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) isc_tr_handle_impl0, (IscStmtHandle) isc_stmt_handle_impl0, (byte[]) null, 0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 122 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test122() throws Throwable { isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isValid()); // Undeclared exception! try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) isc_tr_handle_impl0, (IscStmtHandle) isc_stmt_handle_impl0, "", "", 6); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 123 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test123() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) isc_tr_handle_impl0, (IscStmtHandle) isc_stmt_handle_impl0, "@$r/JC`Qj?3d!C", "s-;Z-c|y`NM[d|<", 143); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 124 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test124() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.size()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); // Undeclared exception! try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) null, (IscStmtHandle) isc_stmt_handle_impl0, (String) null, 436); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 125 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test125() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlFreeStatement(isc_stmt_handle_impl0, 1); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 126 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test126() throws Throwable { XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertNotNull(xSQLDA0); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); // Undeclared exception! try { javaGDSImpl0.iscDsqlFetch(isc_stmt_handle_impl0, 0, xSQLDA0, 0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 127 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test127() throws Throwable { byte[] byteArray0 = new byte[3]; JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) null, (IscTrHandle) isc_tr_handle_impl0, byteArray0, 5, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 128 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test128() throws Throwable { org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) null, (IscTrHandle) isc_tr_handle_impl0, (byte[]) null, (-622), (XSQLDA) null); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 129 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test129() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) null, (IscTrHandle) null, "", "org.apache.log4j.Category", 3, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 130 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test130() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) isc_tr_handle_impl0, "VP8", "VP8", 0, (XSQLDA) null); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 131 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test131() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertNotNull(xSQLDA0); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) null, (IscTrHandle) null, (String) null, 1851, xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 132 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test132() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) isc_tr_handle_impl0, "N# w'{HJ9~+xsQ8", 5, xSQLDA0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 133 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test133() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertNotNull(xSQLDA0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecute2(isc_tr_handle_impl0, isc_stmt_handle_impl0, 4, xSQLDA0, xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 134 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test134() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.size()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); XSQLDA xSQLDA0 = new XSQLDA(30); assertEquals(30, xSQLDA0.sqld); assertEquals(30, xSQLDA0.sqln); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecute2((IscTrHandle) null, isc_stmt_handle_impl0, 4, xSQLDA0, xSQLDA0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 135 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test135() throws Throwable { XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertEquals(0, isc_stmt_handle_impl0.size()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecute((IscTrHandle) null, isc_stmt_handle_impl0, 2, xSQLDA0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 136 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test136() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecImmed2((IscDbHandle) null, (IscTrHandle) null, (byte[]) null, 0, (XSQLDA) null, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 137 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test137() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); isc_tr_handle_impl isc_tr_handle_impl0 = (isc_tr_handle_impl)javaGDSImpl0.createIscTrHandle(); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecImmed2((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) isc_tr_handle_impl0, (byte[]) null, 4, (XSQLDA) null, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 138 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test138() throws Throwable { XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertNotNull(xSQLDA0); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecImmed2((IscDbHandle) null, (IscTrHandle) isc_tr_handle_impl0, (byte[]) null, 514, xSQLDA0, xSQLDA0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 139 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test139() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecImmed2((IscDbHandle) null, (IscTrHandle) isc_tr_handle_impl0, (String) null, "", 1, (XSQLDA) null, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 140 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test140() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertTrue(isc_db_handle_impl0.isValid()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecImmed2((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) isc_tr_handle_impl0, (String) null, 68, (XSQLDA) null, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 141 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test141() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqln); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertNotNull(xSQLDA0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertTrue(isc_db_handle_impl0.isValid()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecImmed2((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) null, "org.firebirdsql.gds.impl.jni.ServiceRequestBufferImp", 0, xSQLDA0, xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 142 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test142() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlDescribe(isc_stmt_handle_impl0, 510); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 143 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test143() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); // Undeclared exception! try { javaGDSImpl0.iscDsqlAllocateStatement(isc_db_handle_impl0, isc_stmt_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 144 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test144() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); // Undeclared exception! try { javaGDSImpl0.iscDropDatabase(isc_db_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 145 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test145() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertTrue(isc_db_handle_impl0.isValid()); // Undeclared exception! try { javaGDSImpl0.iscDetachDatabase(isc_db_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 146 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test146() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[1]; // Undeclared exception! try { javaGDSImpl0.iscDatabaseInfo((IscDbHandle) null, byteArray0, (byte) (-23)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 147 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test147() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); // Undeclared exception! try { javaGDSImpl0.iscDatabaseInfo(isc_db_handle_impl0, (byte[]) null, 2); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 148 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test148() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscCreateDatabase("PURE_JAVA", (IscDbHandle) null, (DatabaseParameterBuffer) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 149 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test149() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp databaseParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); // Undeclared exception! try { javaGDSImpl0.iscCreateDatabase("PURE_JAVA", isc_db_handle_impl0, databaseParameterBufferImp0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 150 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test150() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertTrue(isc_db_handle_impl0.isValid()); isc_blob_handle_impl isc_blob_handle_impl0 = new isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); isc_tr_handle_impl isc_tr_handle_impl0 = (isc_tr_handle_impl)javaGDSImpl0.createIscTrHandle(); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); BlobParameterBufferImp blobParameterBufferImp0 = (BlobParameterBufferImp)javaGDSImpl0.createBlobParameterBuffer(); assertNotNull(blobParameterBufferImp0); // Undeclared exception! try { javaGDSImpl0.iscCreateBlob2(isc_db_handle_impl0, isc_tr_handle_impl0, isc_blob_handle_impl0, blobParameterBufferImp0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 151 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test151() throws Throwable { isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_blob_handle_impl isc_blob_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertEquals(0, isc_blob_handle_impl0.getRblId()); assertFalse(isc_blob_handle_impl0.isEof()); BlobParameterBufferImp blobParameterBufferImp0 = new BlobParameterBufferImp(); assertNotNull(blobParameterBufferImp0); // Undeclared exception! try { javaGDSImpl0.iscCreateBlob2((IscDbHandle) null, isc_tr_handle_impl0, isc_blob_handle_impl0, blobParameterBufferImp0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_blob_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_blob_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 152 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test152() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscCommitTransaction(isc_tr_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 153 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test153() throws Throwable { org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscCommitRetaining(isc_tr_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 154 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test154() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscCloseBlob((IscBlobHandle) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 155 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test155() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_blob_handle_impl isc_blob_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertEquals(0, isc_blob_handle_impl0.getRblId()); assertFalse(isc_blob_handle_impl0.isEof()); // Undeclared exception! try { javaGDSImpl0.iscCloseBlob(isc_blob_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_blob_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_blob_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 156 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test156() throws Throwable { org.firebirdsql.gds.impl.jni.EventHandleImp eventHandleImp0 = new org.firebirdsql.gds.impl.jni.EventHandleImp(); assertNotNull(eventHandleImp0); assertFalse(eventHandleImp0.isCancelled()); assertFalse(eventHandleImp0.isValid()); assertEquals((-1), eventHandleImp0.getEventId()); assertEquals((-1), eventHandleImp0.getEventCount()); assertEquals((-1), eventHandleImp0.getSize()); assertNull(eventHandleImp0.getEventName()); assertEquals((-1), eventHandleImp0.getEventStructHandle()); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscCancelEvents(isc_db_handle_impl0, eventHandleImp0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.EventHandleImp cannot be cast to org.firebirdsql.gds.impl.wire.EventHandleImp // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 157 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test157() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[1]; // Undeclared exception! try { javaGDSImpl0.iscBlobInfo((IscBlobHandle) null, byteArray0, (-4404)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 158 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test158() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_blob_handle_impl isc_blob_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertEquals(0, isc_blob_handle_impl0.getRblId()); assertFalse(isc_blob_handle_impl0.isEof()); // Undeclared exception! try { javaGDSImpl0.iscBlobInfo(isc_blob_handle_impl0, (byte[]) null, 3434); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_blob_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_blob_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 159 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test159() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); DatabaseParameterBufferImp databaseParameterBufferImp0 = new DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); FBConnectionRequestInfo fBConnectionRequestInfo0 = new FBConnectionRequestInfo(databaseParameterBufferImp0); assertNotNull(fBConnectionRequestInfo0); // Undeclared exception! try { javaGDSImpl0.iscAttachDatabase("NZph4nV(Q/A:]$", isc_db_handle_impl0, fBConnectionRequestInfo0); fail("Expecting exception: NumberFormatException"); } catch(NumberFormatException e) { // // For input string: \"A\" // verifyException("java.lang.NumberFormatException", e); } } /** //Test case number: 160 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test160() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertTrue(isc_db_handle_impl0.isValid()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscAttachDatabase("PURE_JAVA", isc_db_handle_impl0, (DatabaseParameterBuffer) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 161 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test161() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp databaseParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); // Undeclared exception! try { javaGDSImpl0.iscAttachDatabase("PURE_JAVA", isc_db_handle_impl0, databaseParameterBufferImp0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 162 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test162() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); DatabaseParameterBufferImp databaseParameterBufferImp0 = new DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); // Undeclared exception! try { javaGDSImpl0.internalAttachDatabase((DbAttachInfo) null, (IscDbHandle) isc_db_handle_impl0, (DatabaseParameterBuffer) databaseParameterBufferImp0, true); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 163 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test163() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp databaseParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); try { javaGDSImpl0.internalAttachDatabase((String) null, (Integer) 0, "pwm", isc_db_handle_impl0, databaseParameterBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // Unable to complete network request to host \"localhost\". // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 164 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test164() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); Integer integer0 = new Integer(12); assertNotNull(integer0); assertEquals(12, (int)integer0); // Undeclared exception! try { javaGDSImpl0.internalAttachDatabase("\"iPyD'ncuJ:29", integer0, "\"iPyD'ncuJ:29", isc_db_handle_impl0, (DatabaseParameterBuffer) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 165 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test165() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_object()); org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp databaseParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); Integer integer0 = new Integer((-876)); assertNotNull(integer0); assertEquals((-876), (int)integer0); // Undeclared exception! try { javaGDSImpl0.internalAttachDatabase("<", integer0, "<9c|", isc_db_handle_impl0, databaseParameterBufferImp0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // port out of range:-876 // verifyException("java.net.InetSocketAddress", e); } } /** //Test case number: 166 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test166() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.getSqlPrepareInfo((IscStmtHandle) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 167 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test167() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertEquals(0, isc_stmt_handle_impl0.size()); // Undeclared exception! try { javaGDSImpl0.getSqlCounts(isc_stmt_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 168 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test168() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); // Undeclared exception! try { javaGDSImpl0.getDescribeSelectInfo(isc_stmt_handle_impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 169 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test169() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); // Undeclared exception! try { javaGDSImpl0.getDescribeSelectInfo(isc_stmt_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 170 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test170() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); // Undeclared exception! try { javaGDSImpl0.getDescribeBindInfo(isc_stmt_handle_impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 171 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test171() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); // Undeclared exception! try { javaGDSImpl0.getDescribeBindInfo(isc_stmt_handle_impl0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 172 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test172() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getProtocol()); // Undeclared exception! try { javaGDSImpl0.fbCancelOperation(isc_db_handle_impl0, 1608); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 173 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test173() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.disconnect((isc_db_handle_impl) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 174 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test174() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getDialect()); // Undeclared exception! try { javaGDSImpl0.disconnect(isc_db_handle_impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.isc_db_handle_impl", e); } } /** //Test case number: 175 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test175() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.createEventHandle((String) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.EventHandleImp", e); } } /** //Test case number: 176 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test176() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); DbAttachInfo dbAttachInfo0 = new DbAttachInfo("isc_info_sql_scale "); assertNotNull(dbAttachInfo0); assertEquals("isc_info_sql_scale", dbAttachInfo0.getFileName()); assertEquals(3050, dbAttachInfo0.getPort()); assertEquals("localhost", dbAttachInfo0.getServer()); DatabaseParameterBuffer databaseParameterBuffer0 = javaGDSImpl0.createDatabaseParameterBuffer(); assertNotNull(databaseParameterBuffer0); FBConnectionRequestInfo fBConnectionRequestInfo0 = new FBConnectionRequestInfo(databaseParameterBuffer0); assertNotNull(fBConnectionRequestInfo0); try { javaGDSImpl0.connect(isc_db_handle_impl0, dbAttachInfo0, (DatabaseParameterBuffer) fBConnectionRequestInfo0); fail("Expecting exception: Exception"); } catch(Exception e) { // // Unable to complete network request to host \"localhost\". // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 177 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test177() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); DatabaseParameterBufferImp databaseParameterBufferImp0 = new DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); // Undeclared exception! try { javaGDSImpl0.connect((isc_db_handle_impl) null, (DbAttachInfo) null, (DatabaseParameterBuffer) databaseParameterBufferImp0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 178 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test178() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertTrue(isc_db_handle_impl0.isValid()); Integer integer0 = new Integer((-114)); assertNotNull(integer0); assertEquals((-114), (int)integer0); DbAttachInfo dbAttachInfo0 = new DbAttachInfo("H!0", integer0, "H!0"); assertNotNull(dbAttachInfo0); assertEquals("H!0", dbAttachInfo0.getServer()); assertEquals("H!0", dbAttachInfo0.getFileName()); assertEquals((-114), dbAttachInfo0.getPort()); DatabaseParameterBuffer databaseParameterBuffer0 = javaGDSImpl0.createDatabaseParameterBuffer(); assertNotNull(databaseParameterBuffer0); // Undeclared exception! try { javaGDSImpl0.connect(isc_db_handle_impl0, dbAttachInfo0, databaseParameterBuffer0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // port out of range:-114 // verifyException("java.net.InetSocketAddress", e); } } /** //Test case number: 179 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test179() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); DatabaseParameterBufferImp databaseParameterBufferImp0 = new DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); try { javaGDSImpl0.connect(isc_db_handle_impl0, "PURE_JAVA", (Integer) 0, "PURE_JAVA", databaseParameterBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // Unable to complete network request to host \"PURE_JAVA\". // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 180 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test180() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); // Undeclared exception! try { javaGDSImpl0.connect(isc_db_handle_impl0, "PURE_JAVA", (Integer) xSQLDA0.sqld, "nc-", (DatabaseParameterBuffer) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 181 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test181() throws Throwable { XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertNotNull(xSQLDA0); xSQLDA0.sqld = (-221); // Undeclared exception! try { AbstractJavaGDSImpl.calculateIOLength(xSQLDA0); fail("Expecting exception: NegativeArraySizeException"); } catch(NegativeArraySizeException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 182 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test182() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.fbCancelOperation((IscDbHandle) null, (-2084553455)); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 183 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test183() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); // Undeclared exception! try { javaGDSImpl0.fbCancelOperation(isc_db_handle_impl0, 0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 184 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test184() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscCancelEvents((IscDbHandle) null, (EventHandle) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 185 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test185() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); javaGDSImpl0.iscCancelEvents(isc_db_handle_impl0, (EventHandle) null); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); } /** //Test case number: 186 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test186() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); EventHandleImp eventHandleImp0 = new EventHandleImp("PURE_JAVA"); assertNotNull(eventHandleImp0); assertEquals((-1), eventHandleImp0.getEventId()); assertEquals((-1), eventHandleImp0.getLocalId()); assertEquals("PURE_JAVA", eventHandleImp0.getEventName()); assertEquals((-1), eventHandleImp0.getEventCount()); // Undeclared exception! try { javaGDSImpl0.iscQueueEvents(isc_db_handle_impl0, eventHandleImp0, (EventHandler) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 187 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test187() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); ServiceParameterBuffer serviceParameterBuffer0 = javaGDSImpl0.createServiceParameterBuffer(); assertNotNull(serviceParameterBuffer0); ServiceRequestBufferImp serviceRequestBufferImp0 = new ServiceRequestBufferImp((-1940)); assertNotNull(serviceRequestBufferImp0); assertEquals((-1940), serviceRequestBufferImp0.getTaskIdentifier()); byte[] byteArray0 = new byte[0]; try { javaGDSImpl0.iscServiceQuery((IscSvcHandle) null, serviceParameterBuffer0, serviceRequestBufferImp0, byteArray0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid service handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 188 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test188() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_svc_handle_impl isc_svc_handle_impl0 = new isc_svc_handle_impl(); assertNotNull(isc_svc_handle_impl0); assertTrue(isc_svc_handle_impl0.isNotValid()); assertEquals(0, isc_svc_handle_impl0.getResp_object()); assertFalse(isc_svc_handle_impl0.isValid()); assertEquals(0L, isc_svc_handle_impl0.getResp_blob_id()); ServiceRequestBufferImp serviceRequestBufferImp0 = new ServiceRequestBufferImp(335544726); assertNotNull(serviceRequestBufferImp0); assertEquals(335544726, serviceRequestBufferImp0.getTaskIdentifier()); try { javaGDSImpl0.iscServiceStart(isc_svc_handle_impl0, serviceRequestBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid service handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 189 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test189() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); ServiceRequestBufferImp serviceRequestBufferImp0 = new ServiceRequestBufferImp(768); assertNotNull(serviceRequestBufferImp0); assertEquals(768, serviceRequestBufferImp0.getTaskIdentifier()); try { javaGDSImpl0.iscServiceStart((IscSvcHandle) null, serviceRequestBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid service handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 190 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test190() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_svc_handle_impl isc_svc_handle_impl0 = (isc_svc_handle_impl)javaGDSImpl0.createIscSvcHandle(); assertNotNull(isc_svc_handle_impl0); assertEquals(0L, isc_svc_handle_impl0.getResp_blob_id()); assertTrue(isc_svc_handle_impl0.isNotValid()); assertEquals(0, isc_svc_handle_impl0.getResp_object()); assertFalse(isc_svc_handle_impl0.isValid()); try { javaGDSImpl0.iscServiceDetach(isc_svc_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid service handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 191 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test191() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscServiceDetach((IscSvcHandle) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid service handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 192 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test192() throws Throwable { isc_svc_handle_impl isc_svc_handle_impl0 = new isc_svc_handle_impl(); assertNotNull(isc_svc_handle_impl0); assertTrue(isc_svc_handle_impl0.isNotValid()); assertEquals(0L, isc_svc_handle_impl0.getResp_blob_id()); assertEquals(0, isc_svc_handle_impl0.getResp_object()); assertFalse(isc_svc_handle_impl0.isValid()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.receiveResponse(isc_svc_handle_impl0, (int) (byte)9); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 193 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test193() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_svc_handle_impl isc_svc_handle_impl0 = new isc_svc_handle_impl(); assertNotNull(isc_svc_handle_impl0); assertEquals(0, isc_svc_handle_impl0.getResp_object()); assertEquals(0L, isc_svc_handle_impl0.getResp_blob_id()); assertFalse(isc_svc_handle_impl0.isValid()); assertTrue(isc_svc_handle_impl0.isNotValid()); // Undeclared exception! try { javaGDSImpl0.receiveResponse(isc_svc_handle_impl0, (-1)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 194 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test194() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_svc_handle_impl isc_svc_handle_impl0 = new isc_svc_handle_impl(); assertNotNull(isc_svc_handle_impl0); assertEquals(0, isc_svc_handle_impl0.getResp_object()); assertEquals(0L, isc_svc_handle_impl0.getResp_blob_id()); assertFalse(isc_svc_handle_impl0.isValid()); assertTrue(isc_svc_handle_impl0.isNotValid()); javaGDSImpl0.receiveResponse(isc_svc_handle_impl0, 0); assertEquals(0, isc_svc_handle_impl0.getResp_object()); assertEquals(0L, isc_svc_handle_impl0.getResp_blob_id()); assertFalse(isc_svc_handle_impl0.isValid()); assertTrue(isc_svc_handle_impl0.isNotValid()); } /** //Test case number: 195 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test195() throws Throwable { XSQLDA xSQLDA0 = new XSQLDA(1681); assertEquals(1681, xSQLDA0.sqld); assertEquals(1681, xSQLDA0.sqln); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); // Undeclared exception! try { AbstractJavaGDSImpl.calculateBLR(xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 196 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test196() throws Throwable { XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); AbstractJavaGDSImpl.calculateBLR(xSQLDA0); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertEquals(1, xSQLDA0.version); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); int int0 = javaGDSImpl0.iscVaxInteger(xSQLDA0.blr, (-1771), 0); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertEquals(1, xSQLDA0.version); assertEquals(0, int0); } /** //Test case number: 197 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test197() throws Throwable { AbstractJavaGDSImpl.calculateBLR((XSQLDA) null); } /** //Test case number: 198 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test198() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[5]; ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0); assertNotNull(byteArrayInputStream0); assertEquals(5, byteArrayInputStream0.available()); assertEquals(5, byteArray0.length); assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); XdrInputStream xdrInputStream0 = new XdrInputStream(byteArrayInputStream0); assertNotNull(xdrInputStream0); assertEquals(5, byteArrayInputStream0.available()); assertEquals(5, byteArray0.length); assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); int int0 = javaGDSImpl0.nextOperation(xdrInputStream0); assertEquals(0, int0); assertEquals(0, byteArrayInputStream0.available()); assertEquals(5, byteArray0.length); assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray0); } /** //Test case number: 199 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test199() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.receiveResponse((isc_db_handle_impl) null, (int) (byte)9); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 200 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test200() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.receiveResponse((isc_db_handle_impl) null, (-1)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 201 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test201() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getProtocol()); javaGDSImpl0.receiveResponse(isc_db_handle_impl0, 0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getProtocol()); } /** //Test case number: 202 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test202() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); DatabaseParameterBufferImp databaseParameterBufferImp0 = new DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); databaseParameterBufferImp0.addArgument(141, "'^3yc3y~/VmD+~S"); // Undeclared exception! try { javaGDSImpl0.connect(isc_db_handle_impl0, "'^3yc3y~/VmD+~S", (Integer) xSQLDA0.version, "'^3yc3y~/VmD+~S", databaseParameterBufferImp0); fail("Expecting exception: NumberFormatException"); } catch(NumberFormatException e) { // // For input string: \"'^3yc3y~/VmD+~S\" // verifyException("java.lang.NumberFormatException", e); } } /** //Test case number: 203 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test203() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertNotNull(xSQLDA0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecImmed2((IscDbHandle) null, (IscTrHandle) isc_tr_handle_impl0, "PURE_JAVA", (String) null, 0, xSQLDA0, xSQLDA0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_tr_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_tr_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 204 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test204() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_blob_handle_impl isc_blob_handle_impl0 = (isc_blob_handle_impl)javaGDSImpl0.createIscBlobHandle(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); try { javaGDSImpl0.iscCloseBlob(isc_blob_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 205 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test205() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertTrue(isc_db_handle_impl0.isValid()); isc_blob_handle_impl isc_blob_handle_impl0 = new isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); isc_blob_handle_impl0.setDb(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); try { javaGDSImpl0.iscCloseBlob(isc_blob_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 206 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test206() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_blob_handle_impl isc_blob_handle_impl0 = new isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); try { javaGDSImpl0.iscPutSegment(isc_blob_handle_impl0, (byte[]) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 207 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test207() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_blob_handle_impl isc_blob_handle_impl0 = (isc_blob_handle_impl)javaGDSImpl0.createIscBlobHandle(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertFalse(isc_blob_handle_impl0.isEof()); try { javaGDSImpl0.iscGetSegment(isc_blob_handle_impl0, 0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 208 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test208() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscGetSegment((IscBlobHandle) null, 0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 209 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test209() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertTrue(isc_db_handle_impl0.isValid()); org.firebirdsql.gds.impl.jni.BlobParameterBufferImp blobParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.BlobParameterBufferImp(); assertNotNull(blobParameterBufferImp0); try { javaGDSImpl0.iscOpenBlob2(isc_db_handle_impl0, isc_tr_handle_impl0, (IscBlobHandle) null, blobParameterBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid BLOB handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 210 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test210() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); isc_blob_handle_impl isc_blob_handle_impl0 = new isc_blob_handle_impl(); assertNotNull(isc_blob_handle_impl0); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertFalse(isc_blob_handle_impl0.isEof()); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); try { javaGDSImpl0.iscCreateBlob2(isc_db_handle_impl0, (IscTrHandle) null, isc_blob_handle_impl0, (BlobParameterBuffer) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 211 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test211() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); BlobParameterBufferImp blobParameterBufferImp0 = new BlobParameterBufferImp(); assertNotNull(blobParameterBufferImp0); try { javaGDSImpl0.iscCreateBlob2((IscDbHandle) null, isc_tr_handle_impl0, (IscBlobHandle) null, blobParameterBufferImp0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 212 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test212() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscVaxInteger((byte[]) null, 0, 449); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 213 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test213() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); // Undeclared exception! try { javaGDSImpl0.getSqlCounts(isc_stmt_handle_impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 214 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test214() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscDsqlSetCursorName((IscStmtHandle) null, "'^3yc3y~/VmD+~S", 35); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid request handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 215 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test215() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.isc_tr_handle_impl isc_tr_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_tr_handle_impl(); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) isc_tr_handle_impl0, (IscStmtHandle) null, "PURE_JAVA", 1); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid request handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 216 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test216() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) null, (IscStmtHandle) null, "bf0iR>Z;9#B0w", "bf0iR>Z;9#B0w", (-127)); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 217 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test217() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); isc_stmt_handle_impl0.setRsr_rdb(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertTrue(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlFreeStatement(isc_stmt_handle_impl0, 2665); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 218 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test218() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); isc_stmt_handle_impl0.setSingletonResult(true); assertTrue(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlFreeStatement(isc_stmt_handle_impl0, (-380)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 219 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test219() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); isc_stmt_handle_impl0.setSingletonResult(true); assertTrue(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); javaGDSImpl0.iscDsqlFreeStatement(isc_stmt_handle_impl0, 1); assertTrue(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); } /** //Test case number: 220 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test220() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscDsqlFreeStatement((IscStmtHandle) null, 3909); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid request handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 221 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test221() throws Throwable { XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertNotNull(xSQLDA0); xSQLDA0.sqld = 103; // Undeclared exception! try { AbstractJavaGDSImpl.calculateIOLength(xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 222 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test222() throws Throwable { XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqln); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertNotNull(xSQLDA0); AbstractJavaGDSImpl.calculateIOLength(xSQLDA0); assertEquals(0, xSQLDA0.sqln); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); } /** //Test case number: 223 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test223() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.size()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); try { javaGDSImpl0.iscDsqlFetch(isc_stmt_handle_impl0, 5, (XSQLDA) null, 3); fail("Expecting exception: Exception"); } catch(Exception e) { // // SQLDA missing or incorrect version, or incorrect number/type of variables // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 224 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test224() throws Throwable { XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscDsqlFetch((IscStmtHandle) null, 0, xSQLDA0, 5); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid request handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 225 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test225() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); try { javaGDSImpl0.iscDsqlFetch(isc_stmt_handle_impl0, 4, xSQLDA0, (-1666)); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 226 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test226() throws Throwable { XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertEquals(1, xSQLDA0.version); assertNotNull(xSQLDA0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); isc_stmt_handle_impl0.setRsr_rdb(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertTrue(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecute((IscTrHandle) null, isc_stmt_handle_impl0, 4844, xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 227 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test227() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertTrue(isc_db_handle_impl0.isValid()); try { javaGDSImpl0.iscDsqlAllocateStatement(isc_db_handle_impl0, (IscStmtHandle) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid request handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 228 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test228() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.isValid()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); try { javaGDSImpl0.iscDsqlAllocateStatement((IscDbHandle) null, isc_stmt_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 229 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test229() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); isc_stmt_handle_impl isc_stmt_handle_impl0 = new isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.size()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlAllocateStatement(isc_db_handle_impl0, isc_stmt_handle_impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 230 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test230() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_tr_handle_impl0.setDbHandle(isc_db_handle_impl0); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_tr_handle_impl0.getState()); byte[] byteArray0 = AbstractJavaGDSImpl.describe_bind_info15; assertNotNull(byteArray0); assertEquals(13, byteArray0.length); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscTransactionInformation(isc_tr_handle_impl0, byteArray0, 1); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 231 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test231() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscTransactionInformation((IscTrHandle) null, (byte[]) null, 669); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 232 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test232() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_tr_handle_impl0.setDbHandle(isc_db_handle_impl0); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscRollbackRetaining(isc_tr_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // transaction is // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 233 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test233() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscRollbackRetaining((IscTrHandle) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 234 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test234() throws Throwable { isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscRollbackRetaining(isc_tr_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 235 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test235() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_object()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_tr_handle_impl0.setDbHandle(isc_db_handle_impl0); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_tr_handle_impl0.getState()); isc_tr_handle_impl0.setState(1); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscRollbackTransaction(isc_tr_handle_impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 236 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test236() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_tr_handle_impl0.setDbHandle(isc_db_handle_impl0); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_tr_handle_impl0.getState()); try { javaGDSImpl0.iscRollbackTransaction(isc_tr_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // transaction is // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 237 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test237() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscRollbackTransaction((IscTrHandle) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 238 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test238() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); try { javaGDSImpl0.iscRollbackTransaction(isc_tr_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // no message (getMessage() has thrown an exception) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 239 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test239() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_tr_handle_impl0.setDbHandle(isc_db_handle_impl0); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_tr_handle_impl0.getState()); byte[] byteArray0 = AbstractJavaGDSImpl.describe_bind_info15; assertNotNull(byteArray0); assertEquals(13, byteArray0.length); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscPrepareTransaction2(isc_tr_handle_impl0, byteArray0); fail("Expecting exception: Exception"); } catch(Exception e) { // // transaction is // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 240 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test240() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[5]; try { javaGDSImpl0.iscPrepareTransaction2((IscTrHandle) null, byteArray0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 241 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test241() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_tr_handle_impl0.setDbHandle(isc_db_handle_impl0); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscPrepareTransaction(isc_tr_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // transaction is // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 242 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test242() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscPrepareTransaction(isc_tr_handle_impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 243 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test243() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscPrepareTransaction((IscTrHandle) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 244 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test244() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertTrue(isc_db_handle_impl0.isValid()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_tr_handle_impl0.setDbHandle(isc_db_handle_impl0); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscCommitRetaining(isc_tr_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // transaction is // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 245 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test245() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscCommitRetaining((IscTrHandle) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 246 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test246() throws Throwable { isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscCommitRetaining(isc_tr_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 247 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test247() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_tr_handle_impl0.setDbHandle(isc_db_handle_impl0); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscCommitTransaction(isc_tr_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // transaction is // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 248 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test248() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscCommitTransaction((IscTrHandle) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 249 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test249() throws Throwable { isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscCommitTransaction(isc_tr_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 250 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test250() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertTrue(isc_db_handle_impl0.isValid()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_tr_handle_impl0.setState((byte)9); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(9, isc_tr_handle_impl0.getState()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscReconnectTransaction(isc_tr_handle_impl0, isc_db_handle_impl0, 5); fail("Expecting exception: Exception"); } catch(Exception e) { // // transaction is // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 251 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test251() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); try { javaGDSImpl0.iscReconnectTransaction(isc_tr_handle_impl0, (IscDbHandle) null, 3); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 252 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test252() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertTrue(isc_db_handle_impl0.isValid()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscReconnectTransaction(isc_tr_handle_impl0, isc_db_handle_impl0, (-1L)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 253 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test253() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); try { javaGDSImpl0.iscStartTransaction(isc_tr_handle_impl0, (IscDbHandle) null, (TransactionParameterBuffer) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 254 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test254() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscStartTransaction(isc_tr_handle_impl0, isc_db_handle_impl0, (TransactionParameterBuffer) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 255 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test255() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertTrue(isc_db_handle_impl0.isValid()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscDropDatabase(isc_db_handle_impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 256 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test256() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscDropDatabase((IscDbHandle) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 257 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test257() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); try { javaGDSImpl0.iscDetachDatabase((IscDbHandle) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 258 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test258() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); // Undeclared exception! try { javaGDSImpl0.iscDetachDatabase(isc_db_handle_impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.isc_db_handle_impl", e); } } /** //Test case number: 259 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test259() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); byte[] byteArray0 = new byte[0]; // Undeclared exception! try { javaGDSImpl0.iscDatabaseInfo(isc_db_handle_impl0, byteArray0, (-3287)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 260 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test260() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); DatabaseParameterBufferImp databaseParameterBufferImp0 = new DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); javaGDSImpl0.addProcessId(databaseParameterBufferImp0); } /** //Test case number: 261 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test261() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); DatabaseParameterBufferImp databaseParameterBufferImp0 = new DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); Integer integer0 = new Integer(66); assertNotNull(integer0); assertEquals(66, (int)integer0); DbAttachInfo dbAttachInfo0 = new DbAttachInfo("PURE_JAVA", integer0, "j}wI6{!90y!Fi"); assertNotNull(dbAttachInfo0); assertEquals("j}wI6{!90y!Fi", dbAttachInfo0.getFileName()); assertEquals("PURE_JAVA", dbAttachInfo0.getServer()); assertEquals(66, dbAttachInfo0.getPort()); try { javaGDSImpl0.internalAttachDatabase(dbAttachInfo0, (IscDbHandle) null, (DatabaseParameterBuffer) databaseParameterBufferImp0, false); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid database handle (no active connection) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 262 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test262() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); TransactionParameterBuffer transactionParameterBuffer0 = javaGDSImpl0.newTransactionParameterBuffer(); assertNotNull(transactionParameterBuffer0); try { javaGDSImpl0.iscStartTransaction((IscTrHandle) null, (IscDbHandle) null, transactionParameterBuffer0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid transaction handle (expecting explicit transaction start) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 263 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test263() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertFalse(isc_stmt_handle_impl0.isValid()); // Undeclared exception! try { javaGDSImpl0.iscDsqlDescribe(isc_stmt_handle_impl0, 0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 264 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test264() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) isc_tr_handle_impl0, "ISO8859_5", "ISO8859_5", 2, (XSQLDA) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 265 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test265() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); ServiceParameterBuffer serviceParameterBuffer0 = javaGDSImpl0.createServiceParameterBuffer(); assertNotNull(serviceParameterBuffer0); try { javaGDSImpl0.iscServiceAttach("IOException closing event connection", (IscSvcHandle) null, serviceParameterBuffer0); fail("Expecting exception: Exception"); } catch(Exception e) { // // invalid service handle // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 266 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test266() throws Throwable { isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); // Undeclared exception! try { javaGDSImpl0.iscCreateDatabase("6\"<", isc_db_handle_impl0, (DatabaseParameterBuffer) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 267 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test267() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); try { javaGDSImpl0.isc_dsql_alloc_statement2((IscDbHandle) null, isc_stmt_handle_impl0); fail("Expecting exception: Exception"); } catch(Exception e) { // // feature is not supported // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 268 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test268() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_stmt_handle_impl isc_stmt_handle_impl0 = (isc_stmt_handle_impl)javaGDSImpl0.createIscStmtHandle(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.size()); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlDescribeBind(isc_stmt_handle_impl0, (-610)); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 269 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test269() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); byte[] byteArray0 = new byte[0]; Object[] objectArray0 = new Object[4]; byte[] byteArray1 = javaGDSImpl0.iscExpandDpb(byteArray0, 15, 17, objectArray0); assertNotNull(byteArray1); assertSame(byteArray0, byteArray1); assertSame(byteArray1, byteArray0); assertEquals(0, byteArray0.length); assertEquals(4, objectArray0.length); assertEquals(0, byteArray1.length); assertArrayEquals(new byte[] {}, byteArray0); assertArrayEquals(new byte[] {}, byteArray1); } /** //Test case number: 270 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test270() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_object()); isc_tr_handle_impl isc_tr_handle_impl0 = (isc_tr_handle_impl)javaGDSImpl0.createIscTrHandle(); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqln); assertEquals(0, xSQLDA0.sqld); assertNotNull(xSQLDA0); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) isc_tr_handle_impl0, "c=k>Lq|#/@(d{", 0, xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 271 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test271() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); javaGDSImpl0.iscEventBlock((EventHandle) null); } /** //Test case number: 272 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test272() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); Integer integer0 = new Integer(2147483645); assertNotNull(integer0); assertEquals(2147483645, (int)integer0); org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp databaseParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); // Undeclared exception! try { javaGDSImpl0.connect((isc_db_handle_impl) null, "vIX:]ej(,galu$o^-C ", integer0, "vIX:]ej(,galu$o^-C ", databaseParameterBufferImp0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // port out of range:2147483645 // verifyException("java.net.InetSocketAddress", e); } } /** //Test case number: 273 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test273() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_blob_handle_impl isc_blob_handle_impl0 = (isc_blob_handle_impl)javaGDSImpl0.createIscBlobHandle(); assertNotNull(isc_blob_handle_impl0); assertEquals(0L, isc_blob_handle_impl0.getBlobId()); assertEquals(0, isc_blob_handle_impl0.getPosition()); assertEquals(0, isc_blob_handle_impl0.getRbl_id()); assertFalse(isc_blob_handle_impl0.isEof()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertTrue(isc_db_handle_impl0.isValid()); // Undeclared exception! try { javaGDSImpl0.iscOpenBlob2(isc_db_handle_impl0, isc_tr_handle_impl0, isc_blob_handle_impl0, (BlobParameterBuffer) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 274 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test274() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); XSQLDA xSQLDA0 = new XSQLDA(); assertEquals(1, xSQLDA0.version); assertEquals(0, xSQLDA0.sqld); assertEquals(0, xSQLDA0.sqln); assertNotNull(xSQLDA0); isc_db_handle_impl isc_db_handle_impl0 = new isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getResp_data_len()); assertEquals(0, isc_db_handle_impl0.getResp_object()); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); isc_tr_handle_impl isc_tr_handle_impl0 = new isc_tr_handle_impl(); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); // Undeclared exception! try { javaGDSImpl0.iscDsqlExecuteImmediate((IscDbHandle) isc_db_handle_impl0, (IscTrHandle) isc_tr_handle_impl0, (byte[]) null, 0, xSQLDA0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 275 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test275() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); DatabaseParameterBuffer databaseParameterBuffer0 = javaGDSImpl0.createDatabaseParameterBuffer(); assertNotNull(databaseParameterBuffer0); try { javaGDSImpl0.iscCreateDatabase("", (IscDbHandle) null, databaseParameterBuffer0); fail("Expecting exception: Exception"); } catch(Exception e) { // // Bad connection string: ':' at beginning or end of:335544323 // verifyException("org.firebirdsql.gds.impl.DbAttachInfo", e); } } /** //Test case number: 276 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test276() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_tr_handle_impl isc_tr_handle_impl0 = (isc_tr_handle_impl)javaGDSImpl0.createIscTrHandle(); assertEquals(2, AbstractIscTrHandle.TRANSACTIONSTARTED); assertEquals(4, AbstractIscTrHandle.TRANSACTIONPREPARED); assertEquals(1, AbstractIscTrHandle.TRANSACTIONSTARTING); assertEquals(3, AbstractIscTrHandle.TRANSACTIONPREPARING); assertEquals(6, AbstractIscTrHandle.TRANSACTIONROLLINGBACK); assertEquals(5, AbstractIscTrHandle.TRANSACTIONCOMMITTING); assertEquals(0, AbstractIscTrHandle.NOTRANSACTION); assertNotNull(isc_tr_handle_impl0); assertEquals(0, isc_tr_handle_impl0.getState()); org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl isc_stmt_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl(); assertNotNull(isc_stmt_handle_impl0); assertFalse(isc_stmt_handle_impl0.isSingletonResult()); assertFalse(isc_stmt_handle_impl0.isAllRowsFetched()); assertEquals(0, isc_stmt_handle_impl0.getDeleteCount()); assertFalse(isc_stmt_handle_impl0.isValid()); assertEquals(0, isc_stmt_handle_impl0.getRsrId()); assertEquals(0, isc_stmt_handle_impl0.getRsr_id_ptr()); assertNull(isc_stmt_handle_impl0.getExecutionPlan()); assertEquals(0, isc_stmt_handle_impl0.size()); assertEquals(0, isc_stmt_handle_impl0.getUpdateCount()); assertEquals(0, isc_stmt_handle_impl0.getStatementType()); assertFalse(isc_stmt_handle_impl0.hasOpenResultSet()); assertEquals(0, isc_stmt_handle_impl0.getInsertCount()); assertEquals(0, isc_stmt_handle_impl0.getSelectCount()); // Undeclared exception! try { javaGDSImpl0.iscDsqlPrepare((IscTrHandle) isc_tr_handle_impl0, (IscStmtHandle) isc_stmt_handle_impl0, "PURE_JAVA", (-2011)); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_stmt_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_stmt_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 277 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test277() throws Throwable { org.firebirdsql.gds.impl.jni.isc_db_handle_impl isc_db_handle_impl0 = new org.firebirdsql.gds.impl.jni.isc_db_handle_impl(); assertNotNull(isc_db_handle_impl0); assertEquals(0L, isc_db_handle_impl0.getResp_blob_id()); assertEquals(0, isc_db_handle_impl0.getODSMinorVersion()); assertEquals(0, isc_db_handle_impl0.getRdb_id_ptr()); assertEquals(0, isc_db_handle_impl0.getDialect()); assertEquals(0, isc_db_handle_impl0.getODSMajorVersion()); assertTrue(isc_db_handle_impl0.isValid()); assertEquals(0, isc_db_handle_impl0.getProtocol()); assertEquals(0, isc_db_handle_impl0.getResp_object()); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp databaseParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); // Undeclared exception! try { javaGDSImpl0.internalAttachDatabase("org.firebirdsql.jdbc.pid", (Integer) 0, "org.firebirdsql.jdbc.pid", isc_db_handle_impl0, databaseParameterBufferImp0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.firebirdsql.gds.impl.jni.isc_db_handle_impl cannot be cast to org.firebirdsql.gds.impl.wire.isc_db_handle_impl // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 278 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test278() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); EventHandleImp eventHandleImp0 = (EventHandleImp)javaGDSImpl0.createEventHandle("2<-zK9|F^c%Jq~kx"); assertNotNull(eventHandleImp0); assertEquals("2<-zK9|F^c%Jq~kx", eventHandleImp0.getEventName()); assertEquals((-1), eventHandleImp0.getLocalId()); assertEquals((-1), eventHandleImp0.getEventCount()); assertEquals((-1), eventHandleImp0.getEventId()); javaGDSImpl0.iscEventCounts(eventHandleImp0); assertEquals(0, eventHandleImp0.getEventCount()); assertEquals("2<-zK9|F^c%Jq~kx", eventHandleImp0.getEventName()); assertEquals((-1), eventHandleImp0.getLocalId()); assertEquals((-1), eventHandleImp0.getEventId()); } /** //Test case number: 279 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test279() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_svc_handle_impl isc_svc_handle_impl0 = (isc_svc_handle_impl)javaGDSImpl0.createIscSvcHandle(); assertNotNull(isc_svc_handle_impl0); assertFalse(isc_svc_handle_impl0.isValid()); assertEquals(0L, isc_svc_handle_impl0.getResp_blob_id()); assertEquals(0, isc_svc_handle_impl0.getResp_object()); assertTrue(isc_svc_handle_impl0.isNotValid()); try { javaGDSImpl0.iscServiceAttach("", isc_svc_handle_impl0, (ServiceParameterBuffer) null); fail("Expecting exception: Exception"); } catch(Exception e) { // // service is not defined // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl", e); } } /** //Test case number: 280 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test280() throws Throwable { org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp databaseParameterBufferImp0 = new org.firebirdsql.gds.impl.jni.DatabaseParameterBufferImp(); assertNotNull(databaseParameterBufferImp0); JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); javaGDSImpl0.addProcessName(databaseParameterBufferImp0); } /** //Test case number: 281 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test281() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); AbstractJavaGDSImpl.EventCoordinatorImp abstractJavaGDSImpl_EventCoordinatorImp0 = null; try { abstractJavaGDSImpl_EventCoordinatorImp0 = javaGDSImpl0.new EventCoordinatorImp(1638, "PURE_JAVA", 1638); fail("Expecting exception: Exception"); } catch(Throwable e) { // // Unable to complete network request to host \"PURE_JAVA\". // verifyException("org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl$EventCoordinatorImp", e); } } /** //Test case number: 282 /*Coverage entropy=NaN */ @Test(timeout = 4000) public void test282() throws Throwable { EventHandler eventHandler0 = mock(EventHandler.class, new ViolatedAssumptionAnswer()); EventHandleImp eventHandleImp0 = new EventHandleImp("*ne@"); assertNotNull(eventHandleImp0); assertEquals((-1), eventHandleImp0.getEventCount()); assertEquals("*ne@", eventHandleImp0.getEventName()); assertEquals((-1), eventHandleImp0.getLocalId()); assertEquals((-1), eventHandleImp0.getEventId()); AbstractJavaGDSImpl.EventGlob abstractJavaGDSImpl_EventGlob0 = new AbstractJavaGDSImpl.EventGlob(eventHandler0, eventHandleImp0); assertNotNull(abstractJavaGDSImpl_EventGlob0); assertEquals((-1), eventHandleImp0.getEventCount()); assertEquals("*ne@", eventHandleImp0.getEventName()); assertEquals((-1), eventHandleImp0.getLocalId()); assertEquals((-1), eventHandleImp0.getEventId()); EventHandler eventHandler1 = abstractJavaGDSImpl_EventGlob0.getEventHandler(); assertNotNull(eventHandler1); assertSame(eventHandler1, eventHandler0); assertEquals((-1), eventHandleImp0.getEventCount()); assertEquals("*ne@", eventHandleImp0.getEventName()); assertEquals((-1), eventHandleImp0.getLocalId()); assertEquals((-1), eventHandleImp0.getEventId()); } }
3e1c29d84ae44818b3702bd537ea0a5d3e3d0acd
1,214
java
Java
framework/src/de/tu_darmstadt/sse/frameworkevents/broadcastevents/SMSReceivedEvent.java
srasthofer/FuzzDroid
458ef857a3ade883cada1cf80cb7ed0585fd8271
[ "Apache-2.0" ]
24
2017-02-16T09:06:58.000Z
2021-06-17T07:04:06.000Z
framework/src/de/tu_darmstadt/sse/frameworkevents/broadcastevents/SMSReceivedEvent.java
srasthofer/FuzzDroid
458ef857a3ade883cada1cf80cb7ed0585fd8271
[ "Apache-2.0" ]
1
2019-02-16T14:20:07.000Z
2019-02-16T14:20:07.000Z
framework/src/de/tu_darmstadt/sse/frameworkevents/broadcastevents/SMSReceivedEvent.java
srasthofer/FuzzDroid
458ef857a3ade883cada1cf80cb7ed0585fd8271
[ "Apache-2.0" ]
10
2017-03-07T18:07:17.000Z
2020-04-01T07:32:10.000Z
29.609756
143
0.758649
11,935
package de.tu_darmstadt.sse.frameworkevents.broadcastevents; import java.util.UUID; import java.util.concurrent.ThreadLocalRandom; import com.android.ddmlib.EmulatorConsole; import com.android.ddmlib.IDevice; import de.tu_darmstadt.sse.commandlinelogger.LoggerHelper; import de.tu_darmstadt.sse.commandlinelogger.MyLevel; import de.tu_darmstadt.sse.frameworkevents.FrameworkEvent; public class SMSReceivedEvent extends FrameworkEvent{ @Override public Object onEventReceived(IDevice device) { String senderNumber = ""; for(int i = 0; i < 8; i++) senderNumber += ThreadLocalRandom.current().nextInt(0, 9 + 1); String message = UUID.randomUUID().toString().replace("-", ""); EmulatorConsole emulatorConsole = EmulatorConsole.getConsole(device); if (emulatorConsole == null) { LoggerHelper.logEvent(MyLevel.ADB_EVENT, adbEventFormat(toString(),"ERROR: Could not send SMS")); return null; } emulatorConsole.sendSms(senderNumber, message); LoggerHelper.logEvent(MyLevel.ADB_EVENT, adbEventFormat(toString(), String.format("SMS received: Nr: %s | Msg: %s", senderNumber, message))); return null; } @Override public String toString() { return "SMSReceivedEvent"; } }
3e1c2a022a41ee889ce9be0cce68fd8925138827
2,378
java
Java
commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetShippingRateInputActionImpl.java
pintomau/commercetools-sdk-java-v2
503a767d35b1495b2740f96082a235cd2d82409f
[ "Apache-2.0" ]
17
2020-09-23T10:01:29.000Z
2022-03-21T05:58:32.000Z
commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetShippingRateInputActionImpl.java
pintomau/commercetools-sdk-java-v2
503a767d35b1495b2740f96082a235cd2d82409f
[ "Apache-2.0" ]
130
2020-08-25T08:16:38.000Z
2022-03-31T10:19:58.000Z
commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetShippingRateInputActionImpl.java
pintomau/commercetools-sdk-java-v2
503a767d35b1495b2740f96082a235cd2d82409f
[ "Apache-2.0" ]
6
2021-06-17T08:42:53.000Z
2022-03-09T13:16:20.000Z
32.575342
130
0.722876
11,936
package com.commercetools.api.models.cart; import java.time.*; import java.util.*; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.*; import io.vrap.rmf.base.client.utils.Generated; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; @Generated(value = "io.vrap.rmf.codegen.rendring.CoreCodeGenerator", comments = "https://github.com/vrapio/rmf-codegen") public class CartSetShippingRateInputActionImpl implements CartSetShippingRateInputAction { private String action; private com.commercetools.api.models.cart.ShippingRateInputDraft shippingRateInput; @JsonCreator CartSetShippingRateInputActionImpl( @JsonProperty("shippingRateInput") final com.commercetools.api.models.cart.ShippingRateInputDraft shippingRateInput) { this.shippingRateInput = shippingRateInput; this.action = SET_SHIPPING_RATE_INPUT; } public CartSetShippingRateInputActionImpl() { this.action = SET_SHIPPING_RATE_INPUT; } public String getAction() { return this.action; } /** * <p>Based on the definition of ShippingRateInputType. * If CartClassification is defined, it must be ClassificationShippingRateInput. * If CartScore is defined, it must be ScoreShippingRateInput. * Otherwise it can not bet set.</p> */ public com.commercetools.api.models.cart.ShippingRateInputDraft getShippingRateInput() { return this.shippingRateInput; } public void setShippingRateInput(final com.commercetools.api.models.cart.ShippingRateInputDraft shippingRateInput) { this.shippingRateInput = shippingRateInput; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CartSetShippingRateInputActionImpl that = (CartSetShippingRateInputActionImpl) o; return new EqualsBuilder().append(action, that.action) .append(shippingRateInput, that.shippingRateInput) .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder(17, 37).append(action).append(shippingRateInput).toHashCode(); } }
3e1c2a1c5e8308f108879caba51de4c74d29fa89
16,261
java
Java
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/UnSubscribeProcessor.java
Shoothzj/incubator-eventmesh
2b3e8614554721d32015055e4e6bcd4b5c955f8f
[ "Apache-2.0" ]
337
2021-04-19T04:05:58.000Z
2022-03-31T02:43:42.000Z
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/UnSubscribeProcessor.java
jonyangx/incubator-eventmesh
9f12ebb66560ba8728a9c3d94a32374541333dae
[ "Apache-2.0" ]
383
2021-04-15T06:26:01.000Z
2022-03-31T12:44:39.000Z
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/UnSubscribeProcessor.java
jonyangx/incubator-eventmesh
9f12ebb66560ba8728a9c3d94a32374541333dae
[ "Apache-2.0" ]
122
2021-04-15T04:05:16.000Z
2022-03-24T08:14:11.000Z
52.11859
106
0.591784
11,937
/* * 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.eventmesh.runtime.core.protocol.http.processor; import org.apache.eventmesh.common.protocol.http.HttpCommand; import org.apache.eventmesh.common.protocol.http.body.client.UnSubscribeRequestBody; import org.apache.eventmesh.common.protocol.http.body.client.UnSubscribeResponseBody; import org.apache.eventmesh.common.protocol.http.common.EventMeshRetCode; import org.apache.eventmesh.common.protocol.http.common.RequestCode; import org.apache.eventmesh.common.protocol.http.header.client.UnSubscribeRequestHeader; import org.apache.eventmesh.common.protocol.http.header.client.UnSubscribeResponseHeader; import org.apache.eventmesh.common.utils.IPUtils; import org.apache.eventmesh.common.utils.JsonUtils; import org.apache.eventmesh.runtime.boot.EventMeshHTTPServer; import org.apache.eventmesh.runtime.constants.EventMeshConstants; import org.apache.eventmesh.runtime.core.consumergroup.ConsumerGroupConf; import org.apache.eventmesh.runtime.core.consumergroup.ConsumerGroupTopicConf; import org.apache.eventmesh.runtime.core.protocol.http.async.AsyncContext; import org.apache.eventmesh.runtime.core.protocol.http.async.CompleteHandler; import org.apache.eventmesh.runtime.core.protocol.http.processor.inf.Client; import org.apache.eventmesh.runtime.core.protocol.http.processor.inf.HttpRequestProcessor; import org.apache.eventmesh.runtime.util.EventMeshUtil; import org.apache.eventmesh.runtime.util.RemotingHelper; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.netty.channel.ChannelHandlerContext; public class UnSubscribeProcessor implements HttpRequestProcessor { public Logger httpLogger = LoggerFactory.getLogger("http"); private EventMeshHTTPServer eventMeshHTTPServer; public UnSubscribeProcessor(EventMeshHTTPServer eventMeshHTTPServer) { this.eventMeshHTTPServer = eventMeshHTTPServer; } @Override public void processRequest(ChannelHandlerContext ctx, AsyncContext<HttpCommand> asyncContext) throws Exception { HttpCommand responseEventMeshCommand; httpLogger.info("cmd={}|{}|client2eventMesh|from={}|to={}", RequestCode.get(Integer.valueOf(asyncContext.getRequest().getRequestCode())), EventMeshConstants.PROTOCOL_HTTP, RemotingHelper.parseChannelRemoteAddr(ctx.channel()), IPUtils.getLocalAddress()); UnSubscribeRequestHeader unSubscribeRequestHeader = (UnSubscribeRequestHeader) asyncContext.getRequest().getHeader(); UnSubscribeRequestBody unSubscribeRequestBody = (UnSubscribeRequestBody) asyncContext.getRequest().getBody(); UnSubscribeResponseHeader unSubscribeResponseHeader = UnSubscribeResponseHeader .buildHeader(Integer.valueOf(asyncContext.getRequest().getRequestCode()), eventMeshHTTPServer.getEventMeshHttpConfiguration().eventMeshCluster, IPUtils.getLocalAddress(), eventMeshHTTPServer.getEventMeshHttpConfiguration().eventMeshEnv, eventMeshHTTPServer.getEventMeshHttpConfiguration().eventMeshIDC); //validate header if (StringUtils.isBlank(unSubscribeRequestHeader.getIdc()) || StringUtils.isBlank(unSubscribeRequestHeader.getPid()) || !StringUtils.isNumeric(unSubscribeRequestHeader.getPid()) || StringUtils.isBlank(unSubscribeRequestHeader.getSys())) { responseEventMeshCommand = asyncContext.getRequest().createHttpCommandResponse( unSubscribeResponseHeader, UnSubscribeResponseBody .buildBody(EventMeshRetCode.EVENTMESH_PROTOCOL_HEADER_ERR.getRetCode(), EventMeshRetCode.EVENTMESH_PROTOCOL_HEADER_ERR.getErrMsg())); asyncContext.onComplete(responseEventMeshCommand); return; } //validate body if (StringUtils.isBlank(unSubscribeRequestBody.getUrl()) || CollectionUtils.isEmpty(unSubscribeRequestBody.getTopics()) || StringUtils.isBlank(unSubscribeRequestBody.getConsumerGroup())) { responseEventMeshCommand = asyncContext.getRequest().createHttpCommandResponse( unSubscribeResponseHeader, UnSubscribeResponseBody .buildBody(EventMeshRetCode.EVENTMESH_PROTOCOL_BODY_ERR.getRetCode(), EventMeshRetCode.EVENTMESH_PROTOCOL_BODY_ERR.getErrMsg())); asyncContext.onComplete(responseEventMeshCommand); return; } String env = unSubscribeRequestHeader.getEnv(); String idc = unSubscribeRequestHeader.getIdc(); String sys = unSubscribeRequestHeader.getSys(); String ip = unSubscribeRequestHeader.getIp(); String pid = unSubscribeRequestHeader.getPid(); String consumerGroup = unSubscribeRequestBody.getConsumerGroup(); String unSubscribeUrl = unSubscribeRequestBody.getUrl(); List<String> unSubTopicList = unSubscribeRequestBody.getTopics(); final CompleteHandler<HttpCommand> handler = new CompleteHandler<HttpCommand>() { @Override public void onResponse(HttpCommand httpCommand) { try { if (httpLogger.isDebugEnabled()) { httpLogger.debug("{}", httpCommand); } eventMeshHTTPServer.sendResponse(ctx, httpCommand.httpResponse()); eventMeshHTTPServer.metrics.summaryMetrics.recordHTTPReqResTimeCost( System.currentTimeMillis() - asyncContext.getRequest().getReqTime()); } catch (Exception ex) { // ignore } } }; synchronized (eventMeshHTTPServer.localClientInfoMapping) { boolean isChange = true; registerClient(unSubscribeRequestHeader, consumerGroup, unSubTopicList, unSubscribeUrl); for (String unSubTopic : unSubTopicList) { List<Client> groupTopicClients = eventMeshHTTPServer.localClientInfoMapping .get(consumerGroup + "@" + unSubTopic); Iterator<Client> clientIterator = groupTopicClients.iterator(); while (clientIterator.hasNext()) { Client client = clientIterator.next(); if (StringUtils.equals(client.pid, pid) && StringUtils.equals(client.url, unSubscribeUrl)) { httpLogger.warn("client {} start unsubscribe", JsonUtils.serialize(client)); clientIterator.remove(); } } if (groupTopicClients.size() > 0) { //change url Map<String, List<String>> idcUrls = new HashMap<>(); Set<String> clientUrls = new HashSet<>(); for (Client client : groupTopicClients) { // remove subscribed url if (!StringUtils.equals(unSubscribeUrl, client.url)) { clientUrls.add(client.url); if (idcUrls.containsKey(client.idc)) { idcUrls.get(client.idc) .add(StringUtils.deleteWhitespace(client.url)); } else { List<String> urls = new ArrayList<>(); urls.add(client.url); idcUrls.put(client.idc, urls); } } } synchronized (eventMeshHTTPServer.localConsumerGroupMapping) { ConsumerGroupConf consumerGroupConf = eventMeshHTTPServer.localConsumerGroupMapping.get(consumerGroup); Map<String, ConsumerGroupTopicConf> map = consumerGroupConf.getConsumerGroupTopicConf(); for (String topicKey : map.keySet()) { // only modify the topic to subscribe if (StringUtils.equals(unSubTopic, topicKey)) { ConsumerGroupTopicConf latestTopicConf = new ConsumerGroupTopicConf(); latestTopicConf.setConsumerGroup(consumerGroup); latestTopicConf.setTopic(unSubTopic); latestTopicConf .setSubscriptionItem(map.get(topicKey).getSubscriptionItem()); latestTopicConf.setUrls(clientUrls); latestTopicConf.setIdcUrls(idcUrls); map.put(unSubTopic, latestTopicConf); } } eventMeshHTTPServer.localConsumerGroupMapping .put(consumerGroup, consumerGroupConf); } } else { isChange = false; break; } } long startTime = System.currentTimeMillis(); if (isChange) { try { eventMeshHTTPServer.getConsumerManager().notifyConsumerManager(consumerGroup, eventMeshHTTPServer.localConsumerGroupMapping.get(consumerGroup)); responseEventMeshCommand = asyncContext.getRequest().createHttpCommandResponse(EventMeshRetCode.SUCCESS); asyncContext.onComplete(responseEventMeshCommand, handler); } catch (Exception e) { HttpCommand err = asyncContext.getRequest().createHttpCommandResponse( unSubscribeResponseHeader, UnSubscribeResponseBody .buildBody(EventMeshRetCode.EVENTMESH_UNSUBSCRIBE_ERR.getRetCode(), EventMeshRetCode.EVENTMESH_UNSUBSCRIBE_ERR.getErrMsg() + EventMeshUtil.stackTrace(e, 2))); asyncContext.onComplete(err); long endTime = System.currentTimeMillis(); httpLogger.error( "message|eventMesh2mq|REQ|ASYNC|send2MQCost={}ms" + "|topic={}|bizSeqNo={}|uniqueId={}", endTime - startTime, JsonUtils.serialize(unSubscribeRequestBody.getTopics()), unSubscribeRequestBody.getUrl(), e); eventMeshHTTPServer.metrics.summaryMetrics.recordSendMsgFailed(); eventMeshHTTPServer.metrics.summaryMetrics .recordSendMsgCost(endTime - startTime); } } else { //remove try { eventMeshHTTPServer.getConsumerManager() .notifyConsumerManager(consumerGroup, null); responseEventMeshCommand = asyncContext.getRequest().createHttpCommandResponse(EventMeshRetCode.SUCCESS); asyncContext.onComplete(responseEventMeshCommand, handler); // clean ClientInfo eventMeshHTTPServer.localClientInfoMapping.keySet() .removeIf(s -> StringUtils.contains(s, consumerGroup)); // clean ConsumerGroupInfo eventMeshHTTPServer.localConsumerGroupMapping.keySet() .removeIf(s -> StringUtils.equals(consumerGroup, s)); } catch (Exception e) { HttpCommand err = asyncContext.getRequest().createHttpCommandResponse( unSubscribeResponseHeader, UnSubscribeResponseBody .buildBody(EventMeshRetCode.EVENTMESH_UNSUBSCRIBE_ERR.getRetCode(), EventMeshRetCode.EVENTMESH_UNSUBSCRIBE_ERR.getErrMsg() + EventMeshUtil.stackTrace(e, 2))); asyncContext.onComplete(err); long endTime = System.currentTimeMillis(); httpLogger.error( "message|eventMesh2mq|REQ|ASYNC|send2MQCost={}ms" + "|topic={}|bizSeqNo={}|uniqueId={}", endTime - startTime, JsonUtils.serialize(unSubscribeRequestBody.getTopics()), unSubscribeRequestBody.getUrl(), e); eventMeshHTTPServer.metrics.summaryMetrics.recordSendMsgFailed(); eventMeshHTTPServer.metrics.summaryMetrics .recordSendMsgCost(endTime - startTime); } } } } @Override public boolean rejectRequest() { return false; } private void registerClient(UnSubscribeRequestHeader unSubscribeRequestHeader, String consumerGroup, List<String> topicList, String url) { for (String topic : topicList) { Client client = new Client(); client.env = unSubscribeRequestHeader.getEnv(); client.idc = unSubscribeRequestHeader.getIdc(); client.sys = unSubscribeRequestHeader.getSys(); client.ip = unSubscribeRequestHeader.getIp(); client.pid = unSubscribeRequestHeader.getPid(); client.consumerGroup = consumerGroup; client.topic = topic; client.url = url; client.lastUpTime = new Date(); String groupTopicKey = client.consumerGroup + "@" + client.topic; if (eventMeshHTTPServer.localClientInfoMapping.containsKey(groupTopicKey)) { List<Client> localClients = eventMeshHTTPServer.localClientInfoMapping.get(groupTopicKey); boolean isContains = false; for (Client localClient : localClients) { if (StringUtils.equals(localClient.url, client.url)) { isContains = true; localClient.lastUpTime = client.lastUpTime; break; } } if (!isContains) { localClients.add(client); } } else { List<Client> clients = new ArrayList<>(); clients.add(client); eventMeshHTTPServer.localClientInfoMapping.put(groupTopicKey, clients); } } } }
3e1c2a55d7a32eb16915a30c188fa49d63f6b5b5
1,208
java
Java
java/src/main/java/com/me/JUC/c_024_FromVectorToQueue/TicketSeller3.java
zzzzzzzs/Java-project
9a6405bf47ad62e45105a85d511bca6d4c5048ea
[ "MIT" ]
null
null
null
java/src/main/java/com/me/JUC/c_024_FromVectorToQueue/TicketSeller3.java
zzzzzzzs/Java-project
9a6405bf47ad62e45105a85d511bca6d4c5048ea
[ "MIT" ]
1
2022-01-27T06:56:28.000Z
2022-02-21T04:01:44.000Z
java/src/main/java/com/me/JUC/c_024_FromVectorToQueue/TicketSeller3.java
zzzzzzzs/Java-project
9a6405bf47ad62e45105a85d511bca6d4c5048ea
[ "MIT" ]
null
null
null
23.686275
73
0.49255
11,938
package com.me.JUC.c_024_FromVectorToQueue; import java.util.LinkedList; import java.util.List; import java.util.concurrent.TimeUnit; /** * 有N张火车票,每张票都有一个编号 * 同时有10个窗口对外售票 * 请写一个模拟程序 * <p> * 分析下面的程序可能会产生哪些问题 * <p> * 使用Vector或者Collections.synchronizedXXX * 分析一下,能解决问题吗? * * 就算操作A和B都是同步的,但A和B组成的复合操作也未必是同步的,仍然需要自己进行同步 * 就像这个程序,判断size和进行remove必须是一整个的原子操作 * * @author Pang */ public class TicketSeller3 { static List<String> tickets = new LinkedList<>(); static { for (int i = 0; i < 1000; i++) { tickets.add("票编号: " + i); } } public static void main(String[] args) { for (int i = 0; i < 10; i++) { new Thread(() -> { while (true) { synchronized (tickets) { if (tickets.size() <= 0) break; try { TimeUnit.MILLISECONDS.sleep(10); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("销售了---" + tickets.remove(0)); } } }).start(); } } }
3e1c2b21f61728f0c8aa9b9a0d9d28eabcb34600
4,581
java
Java
src/gui/LeftPanel.java
livarion/airline-cms
b07275a42ff4c7db79b9da1342d27c9967b679fe
[ "Apache-2.0" ]
null
null
null
src/gui/LeftPanel.java
livarion/airline-cms
b07275a42ff4c7db79b9da1342d27c9967b679fe
[ "Apache-2.0" ]
null
null
null
src/gui/LeftPanel.java
livarion/airline-cms
b07275a42ff4c7db79b9da1342d27c9967b679fe
[ "Apache-2.0" ]
null
null
null
31.593103
112
0.727134
11,939
package gui; import javafx.event.EventHandler; import javafx.scene.input.MouseEvent; import javafx.scene.layout.VBox; /** * This contains the navigation menu.<br> * Navigation will be different, based on * what rank has the logged in user, or if it is just a guest. * @author M&F */ public class LeftPanel extends VBox { public LeftPanel(final Main main, String rank) { // Sets panel style. this.setStyle("-fx-border-color: gray;" + "-fx-border-width: 0 0.2 0 0;" + "-fx-background-color: white;"); // Makes sure the label list is empty when we create the new ones. NavigationLabel.clearLabelList(); // Shows the guest navigation by default showGuestNavigation(main); if (rank.equals("client")) { showClientNavigation(main); } // Shows the staff nevigation if rank is "staff" or "admin" if (rank.equals("staff") || rank.equals("admin")) { showStaffNavigation(main); } // Shows the admin navigation if rank is "admin" if (rank.equals("admin")) { showAdminNavigation(main); } } /** * Creates and adds to panel the navigation for "guest" rank. * @param main */ private void showGuestNavigation(final Main main) { final NavigationLabel homeNL = new NavigationLabel("Search flights", "resources/search_14x14.gif"); homeNL.setOnMouseClicked(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent me) { main.showPanel("WelcomePanel"); NavigationLabel.showMouseClickEffect(homeNL); } }); this.getChildren().addAll(homeNL); } /** * Creates and adds to panel the navigation for "client" rank. * @param main */ private void showClientNavigation(final Main main) { final NavigationLabel clientReservationsNL = new NavigationLabel("My bookings", "resources/ticket_14x12.png"); clientReservationsNL.setOnMouseClicked(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent me) { main.showPanel("ReservationManagementPanel"); NavigationLabel.showMouseClickEffect(clientReservationsNL); } }); this.getChildren().add(clientReservationsNL); } /** * Creates and adds to panel the extra navigation for "staff" rank. * @param main */ private void showStaffNavigation(final Main main) { final NavigationLabel allReservationsNL = new NavigationLabel("Reservations", "resources/ticket_14x12.png"); allReservationsNL.setOnMouseClicked(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent me) { main.showPanel("ReservationManagementPanel"); NavigationLabel.showMouseClickEffect(allReservationsNL); } }); final NavigationLabel flightClassesNL = new NavigationLabel("Flight classes", "resources/sprocket_14x14.gif"); flightClassesNL.setOnMouseClicked(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent me) { main.showPanel("FCManagementPanel"); NavigationLabel.showMouseClickEffect(flightClassesNL); } }); final NavigationLabel planesNL = new NavigationLabel("Planes", "resources/airplane_14x14.gif"); planesNL.setOnMouseClicked(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent me) { main.showPanel("PlaneManagementPanel"); NavigationLabel.showMouseClickEffect(planesNL); } }); final NavigationLabel schedulesNL = new NavigationLabel("Schedules", "resources/calendar_14x14.gif"); schedulesNL.setOnMouseClicked(new EventHandler<MouseEvent>(){ @Override public void handle(MouseEvent e){ main.showPanel("FSManagementPanel"); NavigationLabel.showMouseClickEffect(schedulesNL); } }); this.getChildren().addAll(allReservationsNL, flightClassesNL, planesNL, schedulesNL); } /** * Creates and adds to panel the extra navigation for "admin" rank. * @param main */ private void showAdminNavigation(final Main main) { final NavigationLabel usersNL = new NavigationLabel("Users", "resources/user_14x14.gif"); usersNL.setOnMouseClicked(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent me) { main.showPanel("UserManagementPanel"); NavigationLabel.showMouseClickEffect(usersNL); } }); final NavigationLabel incomeReportNL = new NavigationLabel("Income report", "resources/money_14x14.gif"); incomeReportNL.setOnMouseClicked(new EventHandler<MouseEvent>(){ @Override public void handle(MouseEvent e){ main.showPanel("IncomeReportPanel"); NavigationLabel.showMouseClickEffect(incomeReportNL); } }); this.getChildren().addAll(usersNL, incomeReportNL); } }
3e1c2d6c764133e151c9e86bcee9cf8debe54152
327
java
Java
mediaservice/src/main/java/com/bsoft/mediaservice/MediaserviceApplication.java
satinder-singh-bamrah/Spring-Services
7d5d7501bb1e65ae9312fc5aa74d0330072601e7
[ "Apache-2.0" ]
null
null
null
mediaservice/src/main/java/com/bsoft/mediaservice/MediaserviceApplication.java
satinder-singh-bamrah/Spring-Services
7d5d7501bb1e65ae9312fc5aa74d0330072601e7
[ "Apache-2.0" ]
null
null
null
mediaservice/src/main/java/com/bsoft/mediaservice/MediaserviceApplication.java
satinder-singh-bamrah/Spring-Services
7d5d7501bb1e65ae9312fc5aa74d0330072601e7
[ "Apache-2.0" ]
null
null
null
23.357143
68
0.828746
11,940
package com.bsoft.mediaservice; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class MediaserviceApplication { public static void main(String[] args) { SpringApplication.run(MediaserviceApplication.class, args); } }
3e1c2dc89d91452e5a1383507a8f13c554db1536
6,107
java
Java
tools/daisybuild-maven-plugin/src/main/java/org/outerj/daisy/maven/genscript/GenScriptMojo.java
stevekaeser/daisycms
5f94f39f01e0a51c77812a62baef36caa7435024
[ "Apache-2.0" ]
null
null
null
tools/daisybuild-maven-plugin/src/main/java/org/outerj/daisy/maven/genscript/GenScriptMojo.java
stevekaeser/daisycms
5f94f39f01e0a51c77812a62baef36caa7435024
[ "Apache-2.0" ]
8
2021-02-03T19:38:14.000Z
2022-01-27T16:24:28.000Z
tools/daisybuild-maven-plugin/src/main/java/org/outerj/daisy/maven/genscript/GenScriptMojo.java
stevekaeser/daisycms
5f94f39f01e0a51c77812a62baef36caa7435024
[ "Apache-2.0" ]
null
null
null
39.4
159
0.669887
11,941
/* * Copyright 2004 Outerthought bvba and Schaubroeck nv * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.outerj.daisy.maven.genscript; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout; import org.apache.maven.artifact.repository.layout.LegacyRepositoryLayout; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.project.MavenProject; import org.apache.maven.settings.Settings; /** * @requiresDependencyResolution * @goal genscript */ public class GenScriptMojo extends AbstractMojo { /** * @parameter */ private List<Script> scripts; /** * @parameter default-value="${project.build.directory}" */ private File outputDirectory; /** * @parameter default-value="${settings}" * @readonly * @required */ private Settings settings; /** * @parameter expression="${project}" * @readonly * @required */ private MavenProject project; private ArtifactRepositoryLayout m1layout = new LegacyRepositoryLayout(); private ArtifactRepositoryLayout m2layout = new DefaultRepositoryLayout(); public void execute() throws MojoExecutionException, MojoFailureException { try { for (Script script: scripts) { generateScripts(script); } } catch (IOException ioe) { throw new MojoFailureException("Failed to generate script ", ioe); } } private void generateScripts(Script script) throws IOException { outputDirectory.mkdirs(); File win = new File(outputDirectory, script.getBasename().concat(".bat")); File winDev = new File(outputDirectory, script.getBasename().concat("-dev.bat")); File unix = new File(outputDirectory, script.getBasename()); File unixDev = new File(outputDirectory, script.getBasename().concat("-dev")); String win_cp = generateClassPath(false, "\\", ";", "%", "%"); String win_dev_cp = generateClassPath(true, "/", ";", "%", "%"); String unix_cp = generateClassPath(false, "/", ":", "$", ""); String unix_dev_cp = generateClassPath(true, "/", ":", "$", ""); generateScript(win, "windows.template", script.getMainClass(), win_cp); generateScript(winDev, "windows-dev.template", script.getMainClass(), win_dev_cp); generateScript(unix, "unix.template", script.getMainClass(), unix_cp); generateScript(unixDev, "unix-dev.template", script.getMainClass(), unix_dev_cp); if (new File("/bin/chmod").exists()) { Runtime.getRuntime().exec("/bin/chmod a+x " + unix.getAbsolutePath()); Runtime.getRuntime().exec("/bin/chmod a+x " + unixDev.getAbsolutePath()); } } private void generateScript(File outputFile, String template, String mainClass, String classPath) throws IOException { String sourceHome = project.getBasedir().getParentFile().getAbsolutePath(); InputStream is = getClass().getResourceAsStream("/org/outerj/daisy/maven/genscript/".concat(template)); String result = streamToString(is); String separator = "$$$"; result = result.replaceAll(Pattern.quote(separator.concat("CLASSPATH").concat(separator)), Matcher.quoteReplacement(classPath)) .replaceAll(Pattern.quote(separator.concat("MAINCLASS").concat(separator)), Matcher.quoteReplacement(mainClass)) .replaceAll(Pattern.quote(separator.concat("SOURCEHOME").concat(separator)), Matcher.quoteReplacement(sourceHome)); BufferedWriter writer = new BufferedWriter(new FileWriter(outputFile)); writer.write(result); writer.close(); } private String streamToString(InputStream in) throws IOException { StringBuffer out = new StringBuffer(); byte[] b = new byte[4096]; for (int n; (n = in.read(b)) != -1;) { out.append(new String(b, 0, n)); } return out.toString(); } private String generateClassPath(boolean isDevelopment, String fileSeparator, String pathSeparator, String envPrefix, String envSuffix) { StringBuilder result = new StringBuilder(); ArtifactRepositoryLayout layout = m2layout; String basePath = isDevelopment ? settings.getLocalRepository() : envPrefix.concat("DAISY_HOME").concat(envSuffix).concat(fileSeparator).concat("lib"); for (Artifact artifact: (List<Artifact>)project.getCompileArtifacts()) { result.append(basePath).append(fileSeparator).append(layout.pathOf(artifact)); result.append(pathSeparator); } if (isDevelopment) { result.append(project.getBuild().getOutputDirectory()); } else { result.append(basePath).append(fileSeparator).append(layout.pathOf(project.getArtifact())); } result.append(pathSeparator); result.append(envPrefix).append("DAISY_CLI_CLASSPATH").append(envSuffix); return result.toString(); } }
3e1c2e8216d1bb6adb5032ecd9ef34f39038584e
2,371
java
Java
app/src/main/java/com/example/uemcar/Camera.java
hugo19941994/infrac-coche
96b19c8f0493dcd60b0fe2c0c4f12285076b26c0
[ "MIT" ]
null
null
null
app/src/main/java/com/example/uemcar/Camera.java
hugo19941994/infrac-coche
96b19c8f0493dcd60b0fe2c0c4f12285076b26c0
[ "MIT" ]
null
null
null
app/src/main/java/com/example/uemcar/Camera.java
hugo19941994/infrac-coche
96b19c8f0493dcd60b0fe2c0c4f12285076b26c0
[ "MIT" ]
null
null
null
27.894118
86
0.684521
11,942
/** * UEM 2015 - Sistema de Detección, Alerta y Registro de Infracciones de Tráfico * Nourdine Aliane * Mario Mata * Hugo Ferrando Seage */ package com.example.uemcar; import android.app.Activity; import android.view.WindowManager; import org.opencv.android.CameraBridgeViewBase; import org.opencv.android.JavaCameraView; import org.opencv.core.CvType; import org.opencv.core.Mat; import org.opencv.imgcodecs.Imgcodecs; import org.opencv.imgproc.Imgproc; public class Camera implements CameraBridgeViewBase.CvCameraViewListener2 { private Mat mRgba, cameraFrame; private CameraBridgeViewBase mOpenCvCameraView; public int cameraMode; Activity activity; public Camera(Activity act) { activity = act; } @Override public void onCameraViewStarted(int width, int height) { mRgba = new Mat(height, width, CvType.CV_8UC4); cameraFrame = new Mat(height, width, CvType.CV_8UC4); } @Override public void onCameraViewStopped() { mRgba.release(); cameraFrame.release(); } /** * Guarda una foto en una carpeta de la tarjeta SD */ public void storePhoto(String name) { Imgcodecs.imwrite("/sdcard/infracciones/" + name + ".jpg", cameraFrame); } @Override public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) { mRgba = inputFrame.rgba(); Imgproc.cvtColor(mRgba,cameraFrame,Imgproc.COLOR_RGB2BGR); // Pasar a GPS las señales encontradas ((MainActivity) activity).infraccion.signs = FindFeatures(mRgba.getNativeObjAddr(), cameraMode); return mRgba; // Frame de camera en formato seleccionado } public native int[] FindFeatures(long frame, int mode); public void onDestroy() { if (mOpenCvCameraView != null) mOpenCvCameraView.disableView(); } public void onPause() { if (mOpenCvCameraView != null) mOpenCvCameraView.disableView(); } public void onResume() { mOpenCvCameraView.enableView(); } public void onCreate() { activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); mOpenCvCameraView = (JavaCameraView) activity.findViewById(R.id.cameraView); mOpenCvCameraView.setCvCameraViewListener(this); cameraMode = 0; } }
3e1c2ea106d984e64226927ff3576297541c2081
1,976
java
Java
inge_validation/src/main/java/de/mpg/mpdl/inge/inge_validation/validator/OLDyearbook/SourcesPublisherAndPlaceRequiredValidator.java
MPDL/INGe
0df50701dd5ed3d12e63ad859a38a83dbe5f3d5a
[ "Apache-2.0" ]
5
2018-01-24T15:57:58.000Z
2022-03-31T13:27:10.000Z
inge_validation/src/main/java/de/mpg/mpdl/inge/inge_validation/validator/OLDyearbook/SourcesPublisherAndPlaceRequiredValidator.java
MPDL-Collections/INGe
d4281410835fdaf5a2f388d15bdfc77b5d4ecae1
[ "Apache-2.0" ]
21
2018-04-26T07:44:52.000Z
2022-02-16T00:54:31.000Z
inge_validation/src/main/java/de/mpg/mpdl/inge/inge_validation/validator/OLDyearbook/SourcesPublisherAndPlaceRequiredValidator.java
MPDL-Collections/INGe
d4281410835fdaf5a2f388d15bdfc77b5d4ecae1
[ "Apache-2.0" ]
1
2021-01-06T13:32:15.000Z
2021-01-06T13:32:15.000Z
30.4
134
0.702429
11,943
package de.mpg.mpdl.inge.inge_validation.validator.OLDyearbook; import java.util.List; import com.baidu.unbiz.fluentvalidator.ValidationError; import com.baidu.unbiz.fluentvalidator.Validator; import com.baidu.unbiz.fluentvalidator.ValidatorContext; import com.baidu.unbiz.fluentvalidator.ValidatorHandler; import de.mpg.mpdl.inge.inge_validation.util.ErrorMessages; import de.mpg.mpdl.inge.inge_validation.util.ValidationTools; import de.mpg.mpdl.inge.model.valueobjects.metadata.PublishingInfoVO; import de.mpg.mpdl.inge.model.valueobjects.metadata.SourceVO; public class SourcesPublisherAndPlaceRequiredValidator extends ValidatorHandler<List<SourceVO>> implements Validator<List<SourceVO>> { @Override public boolean validate(ValidatorContext context, List<SourceVO> sources) { boolean ok = true; if (ValidationTools.isNotEmpty(sources)) { int i = 1; for (final SourceVO sourceVO : sources) { if (sourceVO != null) { PublishingInfoVO p = sourceVO.getPublishingInfo(); if (p == null || ValidationTools.isEmpty(p.getPublisher())) { context.addError(ValidationError.create(ErrorMessages.PUBLISHER_NOT_PROVIDED).setField("source[" + i + "]") .setErrorCode(ErrorMessages.WARNING)); ok = false; } // if if (p == null || ValidationTools.isEmpty(p.getPlace())) { context.addError(ValidationError.create(ErrorMessages.PUBLISHER_PLACE_NOT_PROVIDED).setField("source[" + i + "]") .setErrorCode(ErrorMessages.WARNING)); ok = false; } // if } // if i++; } // for } else { context.addError(ValidationError.create(ErrorMessages.PUBLISHER_NOT_PROVIDED).setErrorCode(ErrorMessages.WARNING)); context.addError(ValidationError.create(ErrorMessages.PUBLISHER_PLACE_NOT_PROVIDED).setErrorCode(ErrorMessages.WARNING)); ok = false; } // if return ok; } }
3e1c2f1d981b03e15d0cca99ac2c5992d6261b37
1,569
java
Java
ruoyi/src/main/java/com/ruoyi/project/elective/open/mapper/ElectiveOpenSelectMapper.java
Nevercomes/ruoyi-vue-elective
d27d6afc448495e9785b7fbccc3f4eaff5e08ef7
[ "MIT" ]
6
2021-03-27T12:00:23.000Z
2022-01-21T12:38:20.000Z
ruoyi/src/main/java/com/ruoyi/project/elective/open/mapper/ElectiveOpenSelectMapper.java
Nevercomes/ruoyi-vue-elective
d27d6afc448495e9785b7fbccc3f4eaff5e08ef7
[ "MIT" ]
1
2021-05-26T14:02:20.000Z
2021-05-31T08:12:37.000Z
ruoyi/src/main/java/com/ruoyi/project/elective/open/mapper/ElectiveOpenSelectMapper.java
Nevercomes/ruoyi-vue-elective
d27d6afc448495e9785b7fbccc3f4eaff5e08ef7
[ "MIT" ]
3
2020-04-15T03:45:55.000Z
2021-11-05T11:07:08.000Z
20.644737
104
0.643722
11,944
package com.ruoyi.project.elective.open.mapper; import com.ruoyi.project.elective.open.domain.ElectiveOpenSelect; import java.util.List; /** * 开放选课Mapper接口 * * @author Sunss * @date 2020-02-15 */ public interface ElectiveOpenSelectMapper { /** * 查询开放选课 * * @param id 开放选课ID * @return 开放选课 */ public ElectiveOpenSelect selectElectiveOpenSelectById(Long id); /** * 查询开放选课列表 * * @param electiveOpenSelect 开放选课 * @return 开放选课集合 */ public List<ElectiveOpenSelect> selectElectiveOpenSelectList(ElectiveOpenSelect electiveOpenSelect); /** * 新增开放选课 * * @param electiveOpenSelect 开放选课 * @return 结果 */ public int insertElectiveOpenSelect(ElectiveOpenSelect electiveOpenSelect); /** * 修改开放选课 * * @param electiveOpenSelect 开放选课 * @return 结果 */ public int updateElectiveOpenSelect(ElectiveOpenSelect electiveOpenSelect); /** * 删除开放选课 * * @param id 开放选课ID * @return 结果 */ public int deleteElectiveOpenSelectById(Long id); /** * 批量删除开放选课 * * @param ids 需要删除的数据ID * @return 结果 */ public int deleteElectiveOpenSelectByIds(Long[] ids); /** * 获取当前开放的选课 * @param electiveOpenSelect * @return */ public ElectiveOpenSelect selectForUse(ElectiveOpenSelect electiveOpenSelect); /** * 获取学生选课可以进入的选课 * @param electiveOpenSelect * @return */ List<ElectiveOpenSelect> selectStudentOpen(ElectiveOpenSelect electiveOpenSelect); }
3e1c2fc2c9cad86ba225ac870ce0959d9492464f
1,007
java
Java
product-ms/src/main/java/com/miget/hxb/service/CimBusinessService.java
wuhanligong110/migetMarket
9e67f2c873662e3229a706b44721608688569ce0
[ "MIT" ]
null
null
null
product-ms/src/main/java/com/miget/hxb/service/CimBusinessService.java
wuhanligong110/migetMarket
9e67f2c873662e3229a706b44721608688569ce0
[ "MIT" ]
null
null
null
product-ms/src/main/java/com/miget/hxb/service/CimBusinessService.java
wuhanligong110/migetMarket
9e67f2c873662e3229a706b44721608688569ce0
[ "MIT" ]
null
null
null
29.617647
91
0.776564
11,945
package com.miget.hxb.service; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.miget.hxb.domain.CimBusiness; import com.miget.hxb.model.request.PageRequest; import com.miget.hxb.persistence.CimBusinessMapper; import com.miget.hxb.persistence.CrudMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * @author hxb */ @Service public class CimBusinessService extends CrudServiceImpl<CimBusiness>{ private static final Logger LOGGER = LoggerFactory.getLogger(CimBusinessService.class); @Autowired private CimBusinessMapper mapper; @Autowired public CimBusinessService(CrudMapper<CimBusiness> mapper) { super(mapper); } public Page<CimBusiness> findRecommend(PageRequest request) { PageHelper.startPage(request.getPageNo(), request.getPageSize()); return mapper.findRecommend(); } }
3e1c302b6b26664c021a849a74f74dca64477850
406
java
Java
LACCPlus/Cloudstack/729_1.java
sgholamian/log-aware-clone-detection
9993cb081c420413c231d1807bfff342c39aa69a
[ "MIT" ]
null
null
null
LACCPlus/Cloudstack/729_1.java
sgholamian/log-aware-clone-detection
9993cb081c420413c231d1807bfff342c39aa69a
[ "MIT" ]
null
null
null
LACCPlus/Cloudstack/729_1.java
sgholamian/log-aware-clone-detection
9993cb081c420413c231d1807bfff342c39aa69a
[ "MIT" ]
null
null
null
36.909091
150
0.773399
11,946
//,temp,ContrailElementImpl.java,297,302,temp,ContrailElementImpl.java,260,264 //,2 public class xxx { @Override public boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException { s_logger.debug("NetworkElement shutdown ProviderInstances"); return true; } };