buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void playCard(com.gamble.unopp.model.game.Turn turn) {
this.getActualGameRound().doTurn(turn);
this.viewManager.updateView();
this.broadcastTurn(turn);
if (this.getLocalPlayer().hasToChooseColor()) {
chooseColorDialogFragment.show(getFragmentManager(), "chooseColor");
}
if (this.... | private void playCard(com.gamble.unopp.model.game.Turn turn) {
this.getActualGameRound().doTurn(turn);
this.viewManager.updateView();
this.broadcastTurn(turn);
if (this.getLocalPlayer().hasToChooseColor()) {
chooseColorDialogFragment.show(getFragmentManager(), "chooseColor");
}else {
... |
com.epam.ta.reportportal.demo_data.DemoDataRs generate(com.epam.ta.reportportal.demo_data.DemoDataRq rq, java.lang.String project, java.lang.String user) {
com.epam.ta.reportportal.demo_data.DemoDataRs demoDataRs = new com.epam.ta.reportportal.demo_data.DemoDataRs();
final java.util.List<java.lang.String> launc... | com.epam.ta.reportportal.demo_data.DemoDataRs generate(com.epam.ta.reportportal.demo_data.DemoDataRq rq, java.lang.String project, java.lang.String user) {
com.epam.ta.reportportal.demo_data.DemoDataRs demoDataRs = new com.epam.ta.reportportal.demo_data.DemoDataRs();
final java.util.List<java.lang.String> launc... |
public void addRule(com.sixsq.slipstream.acl.TypePrincipalRight rule) {
com.sixsq.slipstream.acl.TypePrincipal.PrincipalType type = rule.getType();
java.lang.String principal = rule.getPrincipal();
boolean duplicate = false;
for (com.sixsq.slipstream.acl.TypePrincipalRight r : rules) {
if (((r.g... | public void addRule(com.sixsq.slipstream.acl.TypePrincipalRight rule) {
com.sixsq.slipstream.acl.TypePrincipal.PrincipalType type = rule.getType();
java.lang.String principal = rule.getPrincipal();
boolean duplicate = false;
for (com.sixsq.slipstream.acl.TypePrincipalRight r : rules) {
if (((r.g... |
public void validate(final java.lang.Object value) {
try {
if (isNoOfGroupsOrTargetFilterEmpty()) {
uiNotification.displayValidationError(i18n.get("message.rollout.noofgroups.or.targetfilter.missing"));
}else {
if (value != null) {
final int groupSize = getGro... | public void validate(final java.lang.Object value) {
if (isNoOfGroupsOrTargetFilterEmpty()) {
uiNotification.displayValidationError(i18n.get("message.rollout.noofgroups.or.targetfilter.missing"));
}else {
if (value != null) {
final int groupSize = getGroupSize();
new com.... |
public void setColumns(java.util.List<java.lang.String> columns) {
this.columns = columns;
writeTo(columns.get(0));
for (int i = 1; i < (columns.size()); ++i) {
writeTo(("\t" + (columns.get(i))));
}
writeTo("\n");
flushAll();
} | public void setColumns(java.util.List<java.lang.String> columns) {
if ((columns != null) && ((columns.size()) > 0)) {
this.columns = columns;
writeTo(columns.get(0));
for (int i = 1; i < (columns.size()); ++i) {
writeTo(("\t" + (columns.get(i))));
}
writeTo("\n");... |
private taskey.logic.ProcessedObject updateToDeadline(taskey.logic.ProcessedObject processed, java.lang.String newDateRaw, java.lang.String newTaskName) {
long epochTime;
taskey.logic.Task changedTask = new taskey.logic.Task(newTaskName);
changedTask.setTaskType("DEADLINE");
if (!(specialDays.containsKe... | private taskey.logic.ProcessedObject updateToDeadline(taskey.logic.ProcessedObject processed, java.lang.String newDateRaw) {
long epochTime;
taskey.logic.Task changedTask = new taskey.logic.Task();
changedTask.setTaskType("DEADLINE");
if (!(specialDays.containsKey(newDateRaw.toLowerCase()))) {
t... |
public void loadStreamConfNullOverrides() throws java.lang.Exception {
org.apache.distributedlog.DistributedLogConfiguration conf = new org.apache.distributedlog.DistributedLogConfiguration();
org.apache.distributedlog.DistributedLogConfiguration confClone = ((org.apache.distributedlog.DistributedLogConfigurati... | public void loadStreamConfNullOverrides() throws java.lang.Exception {
org.apache.distributedlog.DistributedLogConfiguration conf = new org.apache.distributedlog.DistributedLogConfiguration();
org.apache.distributedlog.DistributedLogConfiguration confClone = new org.apache.distributedlog.DistributedLogConfigura... |
private void triggerBeforeHostParentChanged(org.zkoss.zk.ui.Component parent) {
java.util.List<org.zkoss.zk.ui.ShadowElement> shadowRoots = getShadowRoots();
if (!(shadowRoots.isEmpty())) {
try {
initIndexCacheMap();
for (org.zkoss.zk.ui.ShadowElement se : getShadowRoots()) {
... | private void triggerBeforeHostParentChanged(org.zkoss.zk.ui.Component parent) {
java.util.List<org.zkoss.zk.ui.ShadowElement> shadowRoots = getShadowRoots();
if (!(shadowRoots.isEmpty())) {
try {
initIndexCacheMap();
for (org.zkoss.zk.ui.ShadowElement se : new java.util.LinkedLis... |
public final void endDocument() {
isParsing = false;
if ((configuration.Configuration.internal_event_threads) > 1)
internalEventThreadPool.join(Configuration.internal_event_threads);
if ((configuration.Configuration.satisfied_position_record_threads) > 1)
satisfiedPositionRecordThreadPo... | public final void endDocument() {
isParsing = false;
if ((configuration.Configuration.internal_event_threads) > 1)
internalEventThreadPool.join(Configuration.internal_event_threads);
if ((configuration.Configuration.satisfied_position_record_threads) > 1)
satisfiedPositionRecordThreadPo... |
private static java.lang.String getPort(final java.lang.String port, final java.lang.String enableTls) {
if (("0".equals(port)) || (org.apache.commons.lang.StringUtils.isBlank(port))) {
return org.apache.commons.lang.StringUtils.equals("yes", enableTls) ? "465" : "25";
}else {
return port;
}... | public static java.lang.String getPort(final java.lang.String port, final java.lang.String enableTls) {
if (("0".equals(port)) || (org.apache.commons.lang.StringUtils.isBlank(port))) {
return org.apache.commons.lang.StringUtils.equals("yes", enableTls) ? "465" : "25";
}else {
return port;
}
... |
public void saveInternalsMolecules(final java.io.File file, java.util.List<nl.esciencecenter.e3dchem.knime.molviewer.server.api.Molecule> molecules) throws java.io.IOException {
java.io.ObjectOutputStream out = null;
try {
out = new java.io.ObjectOutputStream(new java.util.zip.GZIPOutputStream(new java.... | public void saveInternalsMolecules(final java.io.File file, java.util.List<nl.esciencecenter.e3dchem.knime.molviewer.server.api.Molecule> molecules) throws java.io.IOException {
java.io.ObjectOutputStream out = null;
try {
out = new java.io.ObjectOutputStream(new java.util.zip.GZIPOutputStream(new java.... |
private void performControllerChange(final com.bluelinelabs.conductor.Controller to, final com.bluelinelabs.conductor.Controller from, boolean isPush, @android.support.annotation.NonNull
com.bluelinelabs.conductor.ControllerChangeHandler changeHandler) {
if (to != null) {
setControllerRouter(to);
}else
... | private void performControllerChange(final com.bluelinelabs.conductor.Controller to, final com.bluelinelabs.conductor.Controller from, boolean isPush, @android.support.annotation.NonNull
com.bluelinelabs.conductor.ControllerChangeHandler changeHandler) {
if (to != null) {
setControllerRouter(to);
}else
... |
protected void onPreExecute() {
super.onPreExecute();
if (PreferencesPresetsFragment.onlineRequestIsRunning) {
cancel(true);
}
PreferencesPresetsFragment.onlineRequestIsRunning = true;
PreferencesPresetsFragment.onlineList.startAnimation(de.NeonSoft.neopowermenu.helpers.AnimationUtils.loadAn... | protected void onPreExecute() {
if (PreferencesPresetsFragment.onlineRequestIsRunning) {
cancel(true);
return ;
}
PreferencesPresetsFragment.onlineRequestIsRunning = true;
PreferencesPresetsFragment.onlineList.startAnimation(de.NeonSoft.neopowermenu.helpers.AnimationUtils.loadAnimation(P... |
public com.github.zhongl.ipage.Chunk<T> grow() throws java.io.IOException {
long beginPosition = (chunks.isEmpty()) ? 0L : (last().endPosition()) + 1;
java.io.File file = new java.io.File(baseDir, java.lang.Long.toString(beginPosition));
convertLastRecentlyUsedChunkToReadOnly();
com.github.zhongl.ipage.... | public com.github.zhongl.ipage.Chunk<T> grow() throws java.io.IOException {
long beginPosition = (chunks.isEmpty()) ? 0L : (last().endPosition()) + 1;
java.io.File file = new java.io.File(baseDir, java.lang.Long.toString(beginPosition));
com.github.zhongl.ipage.Chunk<T> chunk = com.github.zhongl.ipage.Chunk... |
public static java.lang.Object[] data() {
java.util.HashMap<java.lang.Integer, java.lang.Integer> hm = new java.util.HashMap<>();
java.util.WeakHashMap<java.lang.Integer, java.lang.Integer> whm = new java.util.WeakHashMap<>();
java.util.IdentityHashMap<java.lang.Integer, java.lang.Integer> ihm = new java.ut... | public static java.lang.Object[] data() {
java.util.HashMap<java.lang.Integer, java.lang.Integer> hm = new java.util.HashMap<>();
java.util.WeakHashMap<java.lang.Integer, java.lang.Integer> whm = new java.util.WeakHashMap<>();
java.util.IdentityHashMap<java.lang.Integer, java.lang.Integer> ihm = new java.ut... |
public void onClick(android.view.View v) {
switch (v.getId()) {
case R.id.user_info_update :
uplaodImage(mImagePath);
break;
case R.id.user_icon_image :
mBmpFactory.OpenGallery();
break;
case R.id.user_location_rl :
android.content.... | public void onClick(android.view.View v) {
switch (v.getId()) {
case R.id.user_info_update :
uplaodImage(mImagePath);
break;
case R.id.user_icon_image :
mBmpFactory.OpenGallery();
break;
case R.id.user_location_rl :
android.content.... |
private void visitMethodParameters(com.puppycrawl.tools.checkstyle.api.DetailAST ast) {
com.puppycrawl.tools.checkstyle.api.DetailAST parameterDefAST = ast.findFirstToken(TokenTypes.PARAMETER_DEF);
for (; parameterDefAST != null; parameterDefAST = parameterDefAST.getNextSibling()) {
if ((parameterDefAST... | private void visitMethodParameters(com.puppycrawl.tools.checkstyle.api.DetailAST ast) {
com.puppycrawl.tools.checkstyle.api.DetailAST parameterDefAST = ast.findFirstToken(TokenTypes.PARAMETER_DEF);
while (parameterDefAST != null) {
if ((parameterDefAST.getType()) == (com.puppycrawl.tools.checkstyle.api.... |
public boolean checkEmailUnique(java.lang.String email) throws java.sql.SQLException {
java.lang.String query = "SELECT COUNT(1) FROM users" + (" WHERE email = ?" + " LIMIT 1");
java.sql.PreparedStatement stmt = conn.prepareStatement(query);
stmt.setString(1, email);
java.sql.ResultSet results = stmt.ex... | public boolean checkEmailUnique(java.lang.String email) throws java.sql.SQLException {
java.lang.String query = "SELECT COUNT(1) FROM users" + (" WHERE email = ?" + " LIMIT 1");
java.sql.PreparedStatement stmt = conn.prepareStatement(query);
stmt.setString(1, email);
java.sql.ResultSet results = stmt.ex... |
private static void update() {
com.github.kamys.managerProduct.data.managers.Manager<com.github.kamys.managerProduct.logic.layout.Layout> manager = new com.github.kamys.managerProduct.data.managers.ManagerLayout();
com.github.kamys.managerProduct.logic.layout.Layout layoutForFind = new com.github.kamys.managerP... | private static void update() {
com.github.kamys.managerProduct.logic.layout.Layout layoutForFind = new com.github.kamys.managerProduct.logic.layout.Layout();
layoutForFind.setName("Молоко");
com.github.kamys.managerProduct.data.managers.criteria.Parameters oldParameters = com.github.kamys.managerProduct.dat... |
private void savePath(java.lang.String path) {
java.util.Set<java.lang.String> stringSet = new java.util.HashSet<>();
stringSet.addAll(sharedPreferences.getStringSet("paths", new java.util.HashSet<java.lang.String>() {
{
add(dk.aau.sw802f15.tempoplayer.Settings.SettingsFragment.DEFAULT_DIREC... | private void savePath(java.lang.String path) {
java.util.Set<java.lang.String> stringSet = new java.util.HashSet<>();
stringSet.addAll(sharedPreferences.getStringSet("paths", new java.util.HashSet<java.lang.String>() {
{
add(dk.aau.sw802f15.tempoplayer.Settings.SettingsFragment.DEFAULT_DIREC... |
public void setMonitorAudio(decoder.SinkAudio s, boolean m, int position) throws java.lang.IllegalArgumentException, javax.sound.sampled.LineUnavailableException {
sink = s;
if ((sink) != null) {
monitorAudio = m;
if (!(monitorAudio))
sink.closeOutput();
else {
si... | public void setMonitorAudio(decoder.SinkAudio s, boolean m, int position) throws java.lang.IllegalArgumentException, javax.sound.sampled.LineUnavailableException {
if ((sink) == null) {
sink = s;
monitorAudio = m;
if (monitorAudio) {
sink.setDevice(position);
}
}else ... |
private static java.lang.String chainString(java.util.Set<org.codejargon.feather.Key> chain, org.codejargon.feather.Key lastKey) {
java.util.List<org.codejargon.feather.Key> keys = new java.util.ArrayList(chain);
keys.add(lastKey);
java.lang.StringBuilder chainString = new java.lang.StringBuilder();
for... | private static java.lang.String chainString(java.util.Set<org.codejargon.feather.Key> chain, org.codejargon.feather.Key lastKey) {
java.lang.StringBuilder chainString = new java.lang.StringBuilder();
for (org.codejargon.feather.Key key : chain) {
chainString.append(key.toString()).append(" -> ");
}
... |
public void actionPerformed(java.awt.event.ActionEvent e) {
if (0 != (selectedValuesList.size())) {
for (java.lang.String tmp : selectedValuesList) {
java.lang.String[] splited = tmp.split("\\s+");
pipeLock.lock();
try {
writeProc.write(((servergui.ServerF... | public void actionPerformed(java.awt.event.ActionEvent e) {
if (0 != (selectedValuesList.size())) {
for (java.lang.String tmp : selectedValuesList) {
java.lang.String[] splited = tmp.split("\\s+");
pipeLock.lock();
try {
writeProc.write(((servergui.ServerF... |
static double calcRadAngle(Vector a, Vector b) {
double c = (((a.dx) * (b.dx)) + ((a.dy) * (b.dy))) / ((a.length) * (b.length));
c = Tool.correctDouble(c);
if ((c > 1) && ((c - 1) < 1.0E-4))
c = 1.0;
return Tool.correctDouble(java.lang.Math.acos(c));
} | static double calcRadAngle(Vector a, Vector b) {
double c = (((a.dx) * (b.dx)) + ((a.dy) * (b.dy))) / ((a.length) * (b.length));
c = Tool.correctDouble(c);
return Tool.correctDouble(java.lang.Math.acos(c));
} |
private void addStudents() {
vo.Student student = new vo.Student();
student.setAge(10);
student.setHeight(120.0123);
student.setName("shfq");
student.setNo(10);
students = new java.util.ArrayList<vo.Student>();
students.add(student);
} | private void addStudents() {
vo.Student student = new vo.Student();
student.setAge(10);
student.setHeight(120.0123);
student.setName("shfq");
student.setNo(10);
students = new java.util.ArrayList<vo.Student>();
students.add(student);
students.add(student);
students.add(student);
} |
public synchronized void detachCallback(final int id, final com.milanix.example.downloader.data.dao.Download.DownloadListener callback) {
if (com.milanix.example.downloader.service.DownloadService.attachedCallbacks.containsKey(id)) {
if (!(com.milanix.example.downloader.service.DownloadService.attachedCallb... | public synchronized void detachCallback(final int id, final com.milanix.example.downloader.data.dao.Download.DownloadListener callback) {
if (com.milanix.example.downloader.service.DownloadService.attachedCallbacks.containsKey(id)) {
if (com.milanix.example.downloader.service.DownloadService.attachedCallbac... |
public java.util.Collection<fr.istic.iodeman.model.Unavailability> makeAvailable(@org.springframework.web.bind.annotation.PathVariable(value = "id")
java.lang.Integer id, @org.springframework.web.bind.annotation.RequestParam(value = "person")
java.lang.String uidperson, @org.springframework.web.bind.annotation.RequestP... | public java.util.Collection<fr.istic.iodeman.model.Unavailability> makeAvailable(@org.springframework.web.bind.annotation.PathVariable(value = "id")
java.lang.Integer id, @org.springframework.web.bind.annotation.RequestParam(value = "person")
java.lang.String uidperson, @org.springframework.web.bind.annotation.RequestP... |
public java.lang.String getFilePathAt(int positionLastPort) {
java.util.Iterator iterator = mImportFiles.entrySet().iterator();
int count = 0;
while (iterator.hasNext()) {
if (count == positionLastPort) {
java.util.Map.Entry<java.lang.String, java.lang.String> entry = ((java.util.Map.Ent... | public java.lang.String getFilePathAt(int positionLastPort) {
java.util.Iterator iterator = mImportFiles.entrySet().iterator();
int count = 0;
while (iterator.hasNext()) {
java.util.Map.Entry<java.lang.String, java.lang.String> entry = ((java.util.Map.Entry<java.lang.String, java.lang.String>) (iter... |
public void clone(bean.CommandeItem commandeItemSource, bean.CommandeItem commandeItemDestination) {
commandeItemDestination.setCommande(commandeItemSource.getCommande());
commandeItemDestination.setId(commandeItemSource.getId());
commandeItemDestination.setPlatMenu(commandeItemSource.getPlatMenu());
co... | public void clone(bean.CommandeItem commandeItemSource, bean.CommandeItem commandeItemDestination) {
commandeItemDestination.setCommande(commandeItemSource.getCommande());
commandeItemDestination.setId(commandeItemSource.getId());
commandeItemDestination.setPlatMenu(commandeItemSource.getPlatMenu());
co... |
private void moveElements(final int index) {
for (int i = (size()) - 1; i >= index; --i) {
E moveElement = this.get(i);
putIn(moveElement, (index + 1));
}
} | private void moveElements(final int index) {
for (int i = (size()) - 1; i >= index; --i) {
E moveElement = this.get(i);
putIn(moveElement, (i + 1));
}
} |
public void onClick(android.view.View v) {
if (v.getTag().equals(com.roughike.bottombar.BottomBar.TAG_BOTTOM_BAR_VIEW_INACTIVE)) {
android.view.View oldTab = findViewWithTag(com.roughike.bottombar.BottomBar.TAG_BOTTOM_BAR_VIEW_ACTIVE);
unselectTab(oldTab, true);
selectTab(v, true);
s... | public void onClick(android.view.View v) {
if (v.getTag().equals(com.roughike.bottombar.BottomBar.TAG_BOTTOM_BAR_VIEW_INACTIVE)) {
android.view.View oldTab = findViewWithTag(com.roughike.bottombar.BottomBar.TAG_BOTTOM_BAR_VIEW_ACTIVE);
unselectTab(oldTab, true);
selectTab(v, true);
s... |
public void load() {
langFolder = new java.io.File(HPS.getDataFolder(), "Locale");
if (!(langFolder.exists())) {
langFolder.mkdir();
}
this.registerLang(com.hpspells.core.Localisation.Language.ENGLISH, new java.io.File(langFolder, "us-english.properties"));
this.registerLang(com.hpspells.cor... | public void load() {
langFolder = new java.io.File(HPS.getDataFolder(), "Locale");
if (!(langFolder.exists())) {
langFolder.mkdir();
}
this.registerLang(com.hpspells.core.Localisation.Language.ENGLISH, new java.io.File(langFolder, "us-english.properties"));
this.registerLang(com.hpspells.cor... |
public void updateBaugruppeBaugruppe(int id, int anzahl) {
java.sql.Connection con = de.hdm.it04.server.db.DbConnection.connection();
try {
java.sql.Statement stmt = con.createStatement();
java.util.Date date = new java.util.Date();
new java.sql.Timestamp(date.getTime());
stmt.ex... | public void updateBaugruppeBaugruppe(int id, int anzahl) {
java.sql.Connection con = de.hdm.it04.server.db.DbConnection.connection();
try {
java.sql.Statement stmt = con.createStatement();
stmt.executeUpdate((((("UPDATE baugruppeBaugruppe SET anzahl = '" + anzahl) + "' ") + " WHERE id=") + id));... |
public static double mapMeanValue(java.util.Map<java.lang.String, java.lang.Integer> map) {
double mean = 0;
for (java.util.Map.Entry<java.lang.String, java.lang.Integer> entry : map.entrySet()) {
mean = mean + (entry.getValue().doubleValue());
}
return mean / (map.size());
} | public static double mapMeanValue(java.util.Map<java.lang.String, java.lang.Integer> map) {
int mean = 0;
for (java.util.Map.Entry<java.lang.String, java.lang.Integer> entry : map.entrySet()) {
mean = mean + (entry.getValue());
}
return ((double) (mean)) / (map.size());
} |
protected java.lang.Object unsolvableMethod(org.apache.commons.jexl3.parser.JexlNode node, java.lang.String method) {
if (isStrictEngine()) {
if (isSilent()) {
logger.warn(org.apache.commons.jexl3.JexlException.methodError(node, method));
}else {
throw new org.apache.commons.... | protected java.lang.Object unsolvableMethod(org.apache.commons.jexl3.parser.JexlNode node, java.lang.String method) {
if (isStrictEngine()) {
throw new org.apache.commons.jexl3.JexlException.Method(node, method);
}else
if (logger.isDebugEnabled()) {
logger.debug(org.apache.commons.je... |
public void execute(antgameproject.Board gameBoard, antgameproject.Ant currentAnt) {
if (currentAnt.getCarryingFood()) {
antgameproject.Pos antPosition = currentAnt.getBoardPosition();
gameBoard.setFoodAt(antPosition, ((gameBoard.numberOfFoodAt(antPosition)) - 1));
currentAnt.setCarryingFood... | public void execute(antgameproject.Board gameBoard, antgameproject.Ant currentAnt) {
if (currentAnt.getCarryingFood()) {
antgameproject.Pos antPosition = currentAnt.getBoardPosition();
gameBoard.setFoodAt(antPosition, ((gameBoard.numberOfFoodAt(antPosition)) + 1));
currentAnt.setCarryingFood... |
public boolean equals(java.lang.Object other) {
if (other == null)
return false;
if (other == (this))
return true;
if (!(other instanceof model.Tag))
return false;
if ((((model.Chapter) (other)).getId()) == 0)
return false;
if ((((model.Chapter) (o... | public boolean equals(java.lang.Object other) {
if (other == null)
return false;
if (other == (this))
return true;
if (!(other instanceof model.Chapter))
return false;
if ((((model.Chapter) (other)).getId()) == 0)
return false;
if ((((model.Chapter... |
public com.couchbase.lite.ReplicatorConfiguration copy() {
return new com.couchbase.lite.ReplicatorConfiguration(database, target, replicatorType, continuous, conflictResolver, authenticator, java.util.Arrays.copyOf(pinnedServerCertificate, pinnedServerCertificate.length), new java.util.ArrayList<>(channels), new j... | public com.couchbase.lite.ReplicatorConfiguration copy() {
return new com.couchbase.lite.ReplicatorConfiguration(database, target, replicatorType, continuous, conflictResolver, authenticator, ((pinnedServerCertificate) != null ? java.util.Arrays.copyOf(pinnedServerCertificate, pinnedServerCertificate.length) : null... |
private tablesaw.DependencyAnnotations createDependencyAnnotations(java.lang.Class ruleClass) {
tablesaw.DependencyAnnotations da = new tablesaw.DependencyAnnotations();
for (java.lang.reflect.Method m : ruleClass.getMethods()) {
tablesaw.annotation.Consumes consumes = m.getAnnotation(tablesaw.annotatio... | private tablesaw.DependencyAnnotations createDependencyAnnotations(java.lang.Class ruleClass) {
tablesaw.DependencyAnnotations da = new tablesaw.DependencyAnnotations();
for (java.lang.reflect.Method m : ruleClass.getMethods()) {
tablesaw.annotation.Consumes consumes = m.getAnnotation(tablesaw.annotatio... |
public java.lang.reflect.Field getAccessibleDeclaredFiled() {
try {
java.lang.reflect.Field field = this.getContainer().getDeclaredField(((java.lang.String) (this.getName())));
field.setAccessible(true);
return field;
} catch (java.lang.NoSuchFieldException e) {
throw new java.la... | public java.lang.reflect.Field getAccessibleDeclaredFiled(java.lang.String fieldName) {
try {
java.lang.reflect.Field field = this.getContainer().getDeclaredField(fieldName);
field.setAccessible(true);
return field;
} catch (java.lang.NoSuchFieldException e) {
throw new java.lang... |
public void deployTemplate(co.cask.cdap.proto.Id.Namespace namespace, java.lang.String templateName) throws co.cask.cdap.common.exception.NotFoundException, java.io.IOException, java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException {
co.cask.cdap.internal.app... | public void deployTemplate(co.cask.cdap.proto.Id.Namespace namespace, java.lang.String templateName) throws co.cask.cdap.common.exception.NotFoundException, java.io.IOException, java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException {
co.cask.cdap.internal.app... |
public void reportState(int id) {
logToScreen("Report state ...");
if ((node.state) == (TPCNode.SlaveState.READY)) {
node.state = TPCNode.SlaveState.ABORTED;
}
node.setMaster(id);
util.Message stateReport = new util.Message(util.Constants.STATE_REP, "", "", node.state.name());
node.unica... | public void reportState(int id) {
logToScreen("Report state ...");
node.setMaster(id);
util.Message stateReport = new util.Message(util.Constants.STATE_REP, "", "", node.state.name());
node.unicast(node.getMaster(), stateReport);
} |
private void updateValidVerticalPositionsMap(main.java.Ship newShip) {
main.java.ShipDimensions newShipDimension = newShip.getDimension();
switch (newShip.getOrientation()) {
case HORIZONTAL :
for (main.java.ShipDimensions key : this.validVerticalPositionsMap.keySet()) {
this... | private void updateValidVerticalPositionsMap(main.java.Ship newShip) {
main.java.ShipDimensions newShipDimension = newShip.getDimension();
switch (newShip.getOrientation()) {
case HORIZONTAL :
for (main.java.ShipDimensions key : this.validVerticalPositionsMap.keySet()) {
this... |
public void onLayoutChange(android.view.View view, int i, int i1, int i2, int i3, int i4, int i5, int i6, int i7) {
if ((profileImageView.getDrawable()) != null) {
android.graphics.Bitmap bitmap = ((android.graphics.drawable.BitmapDrawable) (profileImageView.getDrawable())).getBitmap();
profileBackg... | public void onLayoutChange(android.view.View view, int i, int i1, int i2, int i3, int i4, int i5, int i6, int i7) {
if ((profileImageView.getDrawable()) != null) {
android.graphics.Bitmap bitmap = ((android.graphics.drawable.BitmapDrawable) (profileImageView.getDrawable())).getBitmap();
if (bitmap !... |
public void run() {
byte[] msg = new byte[100];
java.net.DatagramPacket receivePacket = new java.net.DatagramPacket(msg, msg.length);
while (true) {
java.lang.System.out.println("SERVER: waiting..\n");
try {
receiveSocket.receive(receivePacket);
} catch (java.io.IOExcepti... | public void run() {
byte[] msg;
java.net.DatagramPacket receivePacket;
while (true) {
java.lang.System.out.println("SERVER: waiting..\n");
msg = new byte[100];
receivePacket = new java.net.DatagramPacket(msg, msg.length);
try {
receiveSocket.receive(receivePacket)... |
protected final com.unboundid.ldap.sdk.BindResult sendBindRequest(final com.unboundid.ldap.sdk.LDAPConnection connection, final java.lang.String bindDN, final com.unboundid.asn1.ASN1OctetString saslCredentials, final com.unboundid.ldap.sdk.Control[] controls, final long timeoutMillis) throws com.unboundid.ldap.sdk.LDAP... | protected final com.unboundid.ldap.sdk.BindResult sendBindRequest(final com.unboundid.ldap.sdk.LDAPConnection connection, final java.lang.String bindDN, final com.unboundid.asn1.ASN1OctetString saslCredentials, final com.unboundid.ldap.sdk.Control[] controls, final long timeoutMillis) throws com.unboundid.ldap.sdk.LDAP... |
public java.util.List<com.netflix.imflibrary.st0377.HeaderPartition.EssenceTypeEnum> getEssenceTypes() {
java.util.List<com.netflix.imflibrary.st0377.HeaderPartition.EssenceTypeEnum> essenceTypes = new java.util.ArrayList<>();
if ((this.hasCDCIPictureEssenceDescriptor()) || (this.hasRGBAPictureEssenceDescriptor... | public java.util.List<com.netflix.imflibrary.st0377.HeaderPartition.EssenceTypeEnum> getEssenceTypes() {
java.util.List<com.netflix.imflibrary.st0377.HeaderPartition.EssenceTypeEnum> essenceTypes = new java.util.ArrayList<>();
if ((this.hasCDCIPictureEssenceDescriptor()) || (this.hasRGBAPictureEssenceDescriptor... |
private void saveCurrentTextures() throws java.io.FileNotFoundException {
javaxt.io.Directory srcDic = new javaxt.io.Directory(((minecraftFolder.getAbsolutePath()) + (STUDENT1_DIR)));
javaxt.io.Directory texturesDic = new javaxt.io.Directory(((minecraftFolder.getAbsolutePath()) + (STUDENT_TEXTURES_DIR)));
j... | private void saveCurrentTextures() throws java.io.FileNotFoundException {
javaxt.io.Directory srcDic = new javaxt.io.Directory(((minecraftFolder.getAbsolutePath()) + (STUDENT1_DIR)));
javaxt.io.Directory texturesDic = new javaxt.io.Directory(((minecraftFolder.getAbsolutePath()) + (STUDENT_TEXTURES_DIR)));
j... |
public void init(org.newdawn.slick.GameContainer gc, org.newdawn.slick.state.StateBasedGame s) throws org.newdawn.slick.SlickException {
loadImages();
loadEnemyUnits();
initializeCharacters();
preboss = false;
inplace = false;
postboss = false;
endlevel = false;
assemble = false;
tim... | public void init(org.newdawn.slick.GameContainer gc, org.newdawn.slick.state.StateBasedGame s) throws org.newdawn.slick.SlickException {
loadImages();
loadEnemyUnits();
initializeCharacters();
preboss = false;
inplace = false;
postboss = false;
endlevel = false;
assemble = false;
tim... |
private int lineEnd(int index) {
char c = this.text.charAt((index - 1));
switch (c) {
case '\n' :
if ((this.text.charAt((index - 2))) == '\r') {
return index - 2;
}
case '\r' :
return index - 1;
}
return index;
} | private int lineEnd(int index) {
if (index <= 0) {
return 0;
}
switch (this.text.charAt((index - 1))) {
case '\n' :
if ((index > 1) && ((this.text.charAt((index - 2))) == '\r')) {
return index - 2;
}
case '\r' :
return index - 1;
... |
public static void update(boolean fillNextBuffer) {
if (!(kuusisto.tinysound.TinySound.inited)) {
java.lang.System.err.println("TinySound not initialized!");
return ;
}
if ((kuusisto.tinysound.TinySound.numBytesRead) <= 0) {
kuusisto.tinysound.TinySound.fillAudioBuffer();
}
i... | public static void update(boolean fillNextBuffer) {
if (!(kuusisto.tinysound.TinySound.inited)) {
java.lang.System.err.println("TinySound not initialized!");
return ;
}
if (((kuusisto.tinysound.TinySound.numBytesRead) <= 0) && (!fillNextBuffer)) {
kuusisto.tinysound.TinySound.fillAud... |
public int nextIntRange(int i1, int i2) {
int min = java.lang.Math.min(i1, i2);
int max = java.lang.Math.max(i1, i2);
int diff = max - min;
if (diff <= 0) {
return min;
}
return min + (nextInt(diff));
} | public int nextIntRange(int i1, int i2) {
int min = java.lang.Math.min(i1, i2);
int max = java.lang.Math.max(i1, i2);
int diff = java.lang.Math.abs((max - min));
return min + (nextInt(diff));
} |
public java.lang.Object visitEPackage(final eu.modelwriter.core.alloyinecore.recognizer.AlloyInEcoreParser.EPackageContext ctx) {
final org.eclipse.emf.ecore.EPackage ePackage = eu.modelwriter.core.alloyinecore.ui.cs2as.mapping.EPackageCreator.factory.createEPackage();
ePackage.setEFactoryInstance(eu.modelwrite... | public java.lang.Object visitEPackage(final eu.modelwriter.core.alloyinecore.recognizer.AlloyInEcoreParser.EPackageContext ctx) {
final org.eclipse.emf.ecore.EPackage ePackage = eu.modelwriter.core.alloyinecore.ui.cs2as.mapping.EPackageCreator.factory.createEPackage();
final java.lang.String name = ctx.name.get... |
public <E2> E2[] toArray(E2[] a) {
int size = wrappedSet.size();
java.lang.Class<E2> componentType = org.eclipse.core.internal.databinding.beans.Util.getComponentType(a);
E2[] result = a;
if ((a.length) < size) {
result = org.eclipse.core.internal.databinding.beans.Util.createArrayInstance(compo... | public <E2> E2[] toArray(E2[] a) {
int size = wrappedSet.size();
java.lang.Class<E2> componentType = org.eclipse.core.internal.databinding.beans.Util.getComponentType(a);
E2[] result = a;
if ((a.length) < size) {
result = org.eclipse.core.internal.databinding.beans.Util.createArrayInstance(compo... |
public void setImage(java.lang.String filename) {
java.io.File imagePath = new java.io.File(filename);
java.lang.System.out.println(imagePath.toURI().toString());
java.lang.System.out.println(filename);
try {
imageBuffer = javax.imageio.ImageIO.read(imagePath);
} catch (java.io.IOException e... | public void setImage(java.lang.String filename) {
java.io.File imagePath = new java.io.File(filename);
try {
imageBuffer = javax.imageio.ImageIO.read(imagePath);
} catch (java.io.IOException e) {
image = null;
imageBuffer = null;
return ;
}
java.lang.System.out.printl... |
public boolean EmptyArea(int AreaIndex) {
if ((this.ListArea.get((AreaIndex - 1)).GetTrollCount()) > 0) {
return false;
}else
if ((this.ListArea.get((AreaIndex - 1)).GetDemonCount()) > 0) {
return false;
}else
if ((this.ListArea.get((AreaIndex - 1)).GetMinionCount... | public boolean EmptyArea(int AreaIndex) {
if ((this.ListArea.get((AreaIndex - 1)).GetTrollCount()) > 0) {
return false;
}else
if ((this.ListArea.get((AreaIndex - 1)).GetDemonCount()) > 0) {
return false;
}else
if ((this.ListArea.get((AreaIndex - 1)).GetMinionCount... |
pl.sutkowski.api.FileLocationHolder resolveAbsolutePath(pl.sutkowski.api.FileLocationHolder url) {
if (url == null) {
throw pl.sutkowski.api.exception.FileStorageException.pathNotFound();
}
if ((url.getPath().startsWith("\\")) || (url.getPath().startsWith("/"))) {
return new pl.sutkowski.api... | pl.sutkowski.api.FileLocationHolder resolveAbsolutePath(pl.sutkowski.api.FileLocationHolder url) {
if (url == null) {
throw pl.sutkowski.api.exception.FileStorageException.pathNotFound();
}
if ((url.getPath().startsWith("\\")) || (url.getPath().startsWith("/"))) {
return new pl.sutkowski.api... |
private void reset() {
proxy.onComplete();
request.reset();
response.reset();
proxyHandler.setBufferSize(com.xqbase.tuna.proxy.MAX_BUFFER_SIZE);
if ((logLevel) >= (com.xqbase.tuna.proxy.ClientConnection.LOG_VERBOSE)) {
com.xqbase.util.Log.v((((((proxy.getClientMap(secure).get(host)) == null ... | private void reset() {
proxy.onComplete();
proxyHandler.setBufferSize(com.xqbase.tuna.proxy.MAX_BUFFER_SIZE);
if ((logLevel) >= (com.xqbase.tuna.proxy.ClientConnection.LOG_VERBOSE)) {
com.xqbase.util.Log.v((((((proxy.getClientMap(secure).get(host)) == null ? "Client Closed" : "Client Kept Alive") + ... |
public void storeSalt(byte[] salt) {
this.salt = salt;
android.util.Log.d("stored salt", de.pinyto.ctSESAM.Hextools.bytesToHex(this.salt));
android.content.SharedPreferences.Editor savedDomainsEditor = this.savedDomains.edit();
savedDomainsEditor.putString("salt", android.util.Base64.encodeToString(salt... | public void storeSalt(byte[] salt) {
this.salt = salt;
android.content.SharedPreferences.Editor savedDomainsEditor = this.savedDomains.edit();
savedDomainsEditor.putString("salt", android.util.Base64.encodeToString(salt, Base64.DEFAULT));
savedDomainsEditor.apply();
} |
public void viewItemReportButtonClicked() {
final org.give2peer.karma.Application app = this.app;
android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(this);
builder.setMessage(getString(R.string.view_item_report_confirm)).setPositiveButton(R.string.dialog_item... | public void viewItemReportButtonClicked() {
android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(this);
builder.setMessage(getString(R.string.view_item_report_confirm)).setPositiveButton(R.string.dialog_item_report_positive, new android.content.DialogInterface.OnCl... |
public void useCamera() {
org.lwjgl.opengl.GL11.glLoadIdentity();
org.lwjgl.opengl.GL11.glMatrixMode(GL11.GL_PROJECTION);
org.lwjgl.opengl.GL11.glRotatef(rot.x, 1, 0, 0);
org.lwjgl.opengl.GL11.glRotatef(rot.y, 0, 1, 0);
org.lwjgl.opengl.GL11.glRotatef(rot.z, 0, 0, 1);
org.lwjgl.opengl.GL11.glTra... | public void useCamera() {
org.lwjgl.opengl.GL11.glMatrixMode(GL11.GL_PROJECTION);
{
org.lwjgl.opengl.GL11.glRotatef(rot.x, 1, 0, 0);
org.lwjgl.opengl.GL11.glRotatef(rot.y, 0, 1, 0);
org.lwjgl.opengl.GL11.glRotatef(rot.z, 0, 0, 1);
org.lwjgl.opengl.GL11.glTranslatef(loc.x, loc.y, ... |
public java.lang.String toString() {
return (((((("rgb[0]=" + (loci.common.lut.ij.LUT.colorToString(new java.awt.Color(getRGB(0))))) + ", rgb[255]=") + (loci.common.lut.ij.LUT.colorToString(new java.awt.Color(getRGB(255))))) + ", min=") + (java.lang.String.format("%.4f", min))) + ", max=") + (java.lang.String.forma... | public java.lang.String toString() {
return (((((("rgb[0]=" + (loci.common.lut.ij.LUT.colorToString(new java.awt.Color(getRGB(0))))) + ", rgb[255]=") + (loci.common.lut.ij.LUT.colorToString(new java.awt.Color(getRGB(255))))) + ", min=") + (java.lang.String.format("%.4f", min))) + ", max=") + (java.lang.String.forma... |
public void removeAssignment(int cell, int val) {
for (int j = (satisfyingAssignments.size()) - 1; j >= 0; j--) {
if (satisfyingAssignments.get(j).get(cell).equals(new java.lang.Integer(val))) {
java.lang.System.out.println((("cell j " + cell) + j));
java.lang.System.out.println(((("... | public void removeAssignment(int cell, int val) {
for (int j = (satisfyingAssignments.size()) - 1; j >= 0; j--) {
if (satisfyingAssignments.get(j).get(cell).equals(new java.lang.Integer(val))) {
satisfyingAssignments.remove(j);
}
}
} |
public org.springframework.web.servlet.ModelAndView taskTree(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) {
int companyId = edu.nju.software.util.CoUtils.getRequestIntValue(request, "companyId", true);
java.util.HashMap<java.lang.String, java.lang.Object> model... | public org.springframework.web.servlet.ModelAndView taskTree(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) {
int companyId = edu.nju.software.util.CoUtils.getRequestIntValue(request, "companyId", true);
java.util.HashMap<java.lang.String, java.lang.Object> model... |
public void start() {
for (com.meme.jordan.messagetest1.Server.Connection c : connections) {
if (c.isInterrupted())
connections.remove(c);
}
com.meme.jordan.messagetest1.Server.Connection t = new com.meme.jordan.messagetest1.Server.Connection(this);
t.start();
connection... | public void start() {
for (com.meme.jordan.messagetest1.Server.Connection c : connections) {
if (c.isInterrupted())
connections.remove(c);
}
com.meme.jordan.messagetest1.Server.Connection t = new com.meme.jordan.messagetest1.Server.Connection();
t.start();
connections.ad... |
public void onBindViewHolder(com.loyalium.cpuloyal.tipcalc.adapters.TipAdapter.TipViewHolder holder, int position) {
com.loyalium.cpuloyal.tipcalc.models.TipRecord element = dataset.get(position);
java.lang.String strTip = java.lang.String.format(context.getString(R.string.global_message_tip), element.getTip())... | public void onBindViewHolder(com.loyalium.cpuloyal.tipcalc.adapters.TipAdapter.TipViewHolder holder, int position) {
com.loyalium.cpuloyal.tipcalc.models.TipRecord element = dataset.get(position);
java.lang.String strTip = java.lang.String.format(context.getString(R.string.global_message_tip), element.getTip())... |
private void readFont(chatprogramm.cll.gui.data.Person user, java.lang.String friend) {
java.awt.Font f = chatprogramm.cll.storage.Fontinfo.getFont(user, friend);
java.lang.System.out.println(("readFont " + f));
if (f == null) {
map_f.put(friend, chatprogramm.cll.gui.data.DataProvider.STD_FONT);
... | private void readFont(chatprogramm.cll.gui.data.Person user, java.lang.String friend) {
java.awt.Font f = chatprogramm.cll.storage.Fontinfo.getFont(user, friend);
if (f == null) {
map_f.put(friend, chatprogramm.cll.gui.data.DataProvider.STD_FONT);
}else {
map_f.put(friend, chatprogramm.cll.s... |
public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.iotdm.onem2m.rev150105.onem2m.resource.tree.onem2m.parent.child.list.Onem2mParentChild> retrieveParentChildList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.iotdm.onem2m.rev150105.onem2m.resource.tree.Onem2mParent... | public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.iotdm.onem2m.rev150105.onem2m.resource.tree.onem2m.parent.child.list.Onem2mParentChild> retrieveParentChildList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.iotdm.onem2m.rev150105.onem2m.resource.tree.Onem2mParent... |
public java.util.List<com.sampson.pojo.Site> getSites() {
org.apache.ibatis.session.SqlSession sqlSession = com.sampson.utils.MyBatisUtil.getSqlSessionFactory().openSession();
if (sqlSession == null) {
com.sampson.dao.SiteDao.logger.error("obtain SqlSession failure...");
}
try {
com.samp... | public java.util.List<com.sampson.pojo.Site> getSites() {
org.apache.ibatis.session.SqlSession sqlSession = com.sampson.utils.MyBatisUtil.getSqlSessionFactory().openSession();
if (sqlSession == null) {
com.sampson.dao.SiteDao.logger.error("obtain SqlSession failure...");
}
try {
com.samp... |
public void getContents(java.io.OutputStream receiver) {
java.io.FileInputStream fis = null;
try {
fis = new java.io.FileInputStream(this.getTrackedFile());
org.apache.commons.io.IOUtils.copy(fis, receiver);
} catch (java.io.FileNotFoundException e) {
throw new java.lang.RuntimeExcep... | public void getContents(java.io.OutputStream receiver) {
java.io.FileInputStream fis = null;
try {
fis = new java.io.FileInputStream(this.getTrackedFile());
org.apache.commons.io.IOUtils.copy(fis, receiver);
} catch (java.io.FileNotFoundException e) {
throw new java.lang.RuntimeExcep... |
public void process() {
java.lang.String game_id = app.getGameID();
java.lang.String xmlString = (((xml.Message.requestHeader()) + "<showGameStateRequest gameId='") + game_id) + "'/></request>";
xml.Message m = new xml.Message(xmlString);
app.getServerAccess().sendRequest(m);
} | public void process() {
java.lang.String game_id = app.getGameID();
if (game_id != null) {
java.lang.String xmlString = (((xml.Message.requestHeader()) + "<showGameStateRequest gameId='") + game_id) + "'/></request>";
xml.Message m = new xml.Message(xmlString);
app.getServerAccess().send... |
public void savePage(com.gargoylesoftware.htmlunit.html.HtmlPage page, java.lang.String filepath) throws java.io.IOException {
org.sakaiproject.util.archiver.PageSaver pageSaver = new org.sakaiproject.util.archiver.PageSaver(getArchiver());
pageSaver.save(page, filepath);
getArchiver().msg(((("Saved '" + (p... | public void savePage(com.gargoylesoftware.htmlunit.html.HtmlPage page, java.lang.String filepath) throws java.io.IOException {
org.sakaiproject.util.archiver.PageSaver pageSaver = new org.sakaiproject.util.archiver.PageSaver(getArchiver());
pageSaver.save(page, filepath);
msg(((("Saved '" + (page.getTitleTe... |
public org.lemurproject.galago.utility.Parameters toJSON() {
org.lemurproject.galago.utility.Parameters p = org.lemurproject.galago.utility.Parameters.create();
p.put("sentenceId", sentenceId);
p.put("tokenId", tokenId);
p.put("terms", org.lemurproject.galago.utility.Parameters.wrap(terms));
p.put("... | public org.lemurproject.galago.utility.Parameters toJSON() {
org.lemurproject.galago.utility.Parameters p = org.lemurproject.galago.utility.Parameters.create();
p.put("sentenceId", sentenceId);
p.put("tokenId", tokenId);
p.put("terms", org.lemurproject.galago.utility.Parameters.wrap(terms));
return ... |
public javafx.collections.ObservableList<com.nexus.simplify.database.GenericTask> getObservable() {
int maxNumTasksToAdd;
if (isEmpty()) {
if ((taskArray.size()) > (numOfDisplayItems)) {
maxNumTasksToAdd = numOfDisplayItems;
}else {
maxNumTasksToAdd = taskArray.size();
... | public javafx.collections.ObservableList<com.nexus.simplify.database.GenericTask> getObservable() {
int maxNumTasksToAdd;
if (!(isEmpty())) {
if ((taskArray.size()) > (numOfDisplayItems)) {
maxNumTasksToAdd = numOfDisplayItems;
}else {
maxNumTasksToAdd = taskArray.size();... |
private static int inputint(java.lang.String message, java.lang.String defaultAnswer) {
int a = java.lang.Integer.parseInt(javax.swing.JOptionPane.showInputDialog(message, defaultAnswer));
int b = ((int) ((java.lang.Math.random()) * 100));
int c = a - b;
return c;
} | private static int inputint(java.lang.String message, java.lang.String defaultAnswer) {
int a = java.lang.Integer.parseInt(javax.swing.JOptionPane.showInputDialog(message, defaultAnswer));
int b = java.lang.Integer.parseInt(javax.swing.JOptionPane.showInputDialog(message, defaultAnswer));
int c = a - b;
... |
public void shouldReturnFalseForIsInSimulationEnvironmentAndIsInDevelopmentEnvironment() {
tds.session.ExternalSessionConfiguration externalSessionConfiguration = new tds.session.ExternalSessionConfiguration("UNIT_TEST", "Production", 0, 0);
org.assertj.core.api.Assertions.assertThat(externalSessionConfiguratio... | public void shouldReturnFalseForIsInSimulationEnvironmentAndIsInDevelopmentEnvironment() {
tds.session.ExternalSessionConfiguration externalSessionConfiguration = new tds.session.ExternalSessionConfiguration("UNIT_TEST", "Production", 0, 0, 0, 0);
org.assertj.core.api.Assertions.assertThat(externalSessionConfig... |
private void setField(com.mozzandroidutils.sqlite.Model t, java.lang.String fieldName, java.lang.Object value) throws java.lang.IllegalArgumentException {
if (((value instanceof java.lang.Number) || (value instanceof java.lang.String)) || (value instanceof byte[]))
t.set(fieldName, value);
else
... | private void setField(com.mozzandroidutils.sqlite.Model t, java.lang.String fieldName, java.lang.Object value) throws java.lang.IllegalArgumentException {
if (value == null)
return ;
if (((value instanceof java.lang.Number) || (value instanceof java.lang.String)) || (value instanceof byte[]))
... |
private javax.swing.JTextField createProblematicRangeField(java.lang.String text) {
javax.swing.JTextField sumRange = new javax.swing.JTextField(text, 30);
sumRange.setEditable(false);
if ((parentFrame) instanceof com.kanji.window.BaseWindow) {
com.kanji.window.BaseWindow b = ((com.kanji.window.Base... | private javax.swing.JTextField createProblematicRangeField(java.lang.String text) {
javax.swing.JTextField sumRange = new javax.swing.JTextField(text, 30);
sumRange.setEditable(false);
if ((parentFrame) instanceof com.kanji.window.BaseWindow) {
com.kanji.window.BaseWindow b = ((com.kanji.window.Base... |
private java.io.File createImageFile() throws java.io.IOException {
java.lang.String timeStamp = new java.text.SimpleDateFormat("yyyyMMdd_HHmmss").format(new java.util.Date());
java.lang.String imageFileName = ("JPEG_" + timeStamp) + "_";
java.io.File storageDir = android.os.Environment.getExternalStoragePu... | private java.io.File createImageFile() throws java.io.IOException {
java.lang.String timeStamp = new java.text.SimpleDateFormat("yyyyMMdd_HHmmss").format(new java.util.Date());
java.lang.String imageFileName = ("JPEG_" + timeStamp) + "_";
java.io.File storageDir = android.os.Environment.getExternalStoragePu... |
public static <I1, I2, O> boolean compatible(final net.imglib2.IterableInterval<I1> a, final net.imglib2.RandomAccessibleInterval<I2> b, final net.imglib2.RandomAccessibleInterval<O> c) {
return (net.imglib2.util.Intervals.equalDimensions(a, b)) && (net.imglib2.util.Intervals.equalDimensions(a, c));
} | public static <I1, I2, O> boolean compatible(final net.imglib2.IterableInterval<I1> a, final net.imglib2.RandomAccessibleInterval<I2> b, final net.imglib2.RandomAccessibleInterval<O> c) {
return (net.imglib2.util.Intervals.contains(b, a)) && (net.imglib2.util.Intervals.contains(c, a));
} |
private static java.lang.reflect.Field findField(java.lang.Class classType, java.lang.String fieldName, java.lang.Class fieldType) {
for (java.lang.reflect.Field field : classType.getDeclaredFields()) {
if ((field.getName().equals(fieldName)) && (((fieldType != null) && (field.getType().isAssignableFrom(fie... | private static java.lang.reflect.Field findField(java.lang.Class classType, java.lang.String fieldName, java.lang.Class fieldType) {
for (java.lang.reflect.Field field : classType.getDeclaredFields()) {
if (field.getName().equals(fieldName)) {
if (((fieldType != null) && (field.getType().isAssig... |
public static heavyinternetindustries.mephesto.cards.Card isPair(heavyinternetindustries.mephesto.cards.Card... params) {
heavyinternetindustries.mephesto.cards.Card ret = null;
for (heavyinternetindustries.mephesto.cards.Card card : params)
card.setAceHigh();
for (heavyinternetindustries.mephe... | public static heavyinternetindustries.mephesto.cards.Card isPair(heavyinternetindustries.mephesto.cards.Card... params) {
heavyinternetindustries.mephesto.cards.Card ret = null;
for (heavyinternetindustries.mephesto.cards.Card card : params)
card.setAceHigh();
for (heavyinternetindustries.mephe... |
public void onCreate(android.database.sqlite.SQLiteDatabase db) {
java.lang.String SQL_CREATE_ENTRIES = ((((((((((((((("CREATE TABLE " + (com.example.android.myinventory.Data.ProductContract.ProductEntry.TABLE_NAME)) + " (") + (com.example.android.myinventory.Data.ProductContract.ProductEntry._ID)) + " INTEGER PRIM... | public void onCreate(android.database.sqlite.SQLiteDatabase db) {
java.lang.String SQL_CREATE_ENTRIES = ((((((((((((((("CREATE TABLE " + (com.example.android.myinventory.Data.ProductContract.ProductEntry.TABLE_NAME)) + " (") + (com.example.android.myinventory.Data.ProductContract.ProductEntry._ID)) + " INTEGER PRIM... |
public static auto.CommandList boilerBlue() {
auto.CommandList CL = new auto.CommandList();
comms.SmartWriter.putS("AutoList", "Boilerblue", DebugMode.COMPETITION);
CL.addCommand(new auto.commands.DriveCommand(new auto.stopConditions.DistanceStopCondition(null, babbage.BabbageAutoLists.distanceFromWall), ba... | public static auto.CommandList boilerBlue() {
auto.CommandList CL = new auto.CommandList();
comms.SmartWriter.putS("AutoList", "Boilerblue", DebugMode.COMPETITION);
CL.addCommand(new auto.commands.DriveCommand(new auto.stopConditions.DistanceStopCondition(null, babbage.BabbageAutoLists.distanceFromWall), ba... |
public void draw() {
update();
spriteBatch.begin();
if (returnButton.isVisible()) {
returnButton.draw(spriteBatch, 1);
}
if (startWaveButton.isVisible()) {
startWaveButton.draw(spriteBatch, 1);
}
spriteBatch.end();
} | public void draw() {
spriteBatch.begin();
if (returnButton.isVisible()) {
returnButton.draw(spriteBatch, 1);
}
if (startWaveButton.isVisible()) {
startWaveButton.draw(spriteBatch, 1);
}
spriteBatch.end();
} |
public void run() {
try {
com.selab.model.Entity.NativeAd nativeAd = this.getNativeAd();
java.lang.Long adId = null;
try {
adId = this.saveAd(nativeAd);
} catch (com.selab.model.exception.AssetErrorException e) {
e.printStackTrace();
}
this.sav... | public void run() {
try {
com.selab.model.Entity.NativeAd nativeAd = this.getNativeAd();
if ((nativeAd.getNative()) != null) {
java.lang.Long adId = this.saveAd(nativeAd);
this.saveUrl(nativeAd.getNative(), adId);
}
} catch (com.selab.model.exception.AssetErrorExc... |
public rx.Observable addPrinterDetails(com.nairbspace.octoandroid.domain.model.AddPrinter addPrinter) {
long id = mDiskManager.getActivePrinterId();
rx.Observable entityObs = rx.Observable.create(mMapperHelper.mapAddPrinterToPrinterDbEntity(addPrinter)).map(mDiskManager.putPrinterInDb());
rx.Observable veri... | public rx.Observable addPrinterDetails(com.nairbspace.octoandroid.domain.model.AddPrinter addPrinter) {
rx.Observable entityObs = rx.Observable.create(mMapperHelper.mapAddPrinterToPrinterDbEntity(addPrinter)).map(mDiskManager.putPrinterInDb());
long id = mDiskManager.getActivePrinterId();
rx.Observable veri... |
public boolean onCreateOptionsMenu(android.view.Menu menu) {
getMenuInflater().inflate(R.menu.launcher_menu, menu);
mSearchMenu = menu.findItem(R.id.action_search);
mSetLocationMenu = menu.findItem(R.id.action_set_location);
mSearchView = ((android.support.v7.widget.SearchView) (mSearchMenu.getActionVie... | public boolean onCreateOptionsMenu(android.view.Menu menu) {
getMenuInflater().inflate(R.menu.launcher_menu, menu);
mSearchMenu = menu.findItem(R.id.action_search);
mSetLocationMenu = menu.findItem(R.id.action_set_location);
mSearchView = ((android.support.v7.widget.SearchView) (mSearchMenu.getActionVie... |
public se.sensorship.Direction nextDirection() {
int currentIndexOnPath = getClosestPointOnPathIndex();
int directionPointIndex = 0;
for (; directionPointIndex < (turnDirectionOnPathIndex.size()); directionPointIndex++) {
if ((turnDirectionOnPathIndex.get(directionPointIndex)) > currentIndexOnPath) ... | public se.sensorship.Direction nextDirection() {
int currentIndexOnPath = getClosestPointOnPathIndex();
int directionPointIndex = 0;
for (; directionPointIndex < (turnDirectionOnPathIndex.size()); directionPointIndex++) {
if ((turnDirectionOnPathIndex.get(directionPointIndex)) >= currentIndexOnPath)... |
public void onUploadCompleted() {
java.lang.System.out.println(("deleting from sync_Report --------- " + (data.id)));
db.execSQL((("delete from sync_report where id = " + (data.id)) + ""));
cursor.close();
closeDB();
android.widget.Toast.makeText(this, "Report posted successfully!", Toast.LENGTH_SHO... | public void onUploadCompleted() {
java.lang.System.out.println(("deleting from sync_Report --------- " + (data.id)));
db.execSQL((("delete from sync_report where id = " + (data.id)) + ""));
android.widget.Toast.makeText(this, "Report posted successfully!", Toast.LENGTH_SHORT).show();
} |
public java.util.List<com.policat.cat.temp_containers.QuestionResponse> getCorrectResponses(com.policat.cat.temp_containers.OngoingQuiz ongoingQuiz) {
java.util.List<com.policat.cat.temp_containers.QuestionResponse> correctResponses = new java.util.ArrayList<>();
java.util.List<com.policat.cat.temp_containers.Q... | public java.util.List<com.policat.cat.temp_containers.QuestionResponse> getCorrectResponses(com.policat.cat.temp_containers.OngoingQuiz ongoingQuiz) {
java.util.List<com.policat.cat.temp_containers.QuestionResponse> correctResponses = new java.util.ArrayList<>();
java.util.List<com.policat.cat.temp_containers.Q... |
protected void onListItemClick(android.widget.ListView l, android.view.View v, int position, long id) {
android.content.Intent showOrario = new android.content.Intent(this, it.sasabz.android.sasabus.ShowOrariActivity.class);
showOrario.putExtra("linea", linea);
showOrario.putExtra("destinazione", destinazio... | protected void onListItemClick(android.widget.ListView l, android.view.View v, int position, long id) {
android.content.Intent showOrario = new android.content.Intent(this, it.sasabz.android.sasabus.ShowOrariActivity.class);
showOrario.putExtra("linea", linea);
showOrario.putExtra("destinazione", destinazio... |
for (int i = 0; i < 52; i++) {
if ((deckk[i].nIndex) == x) {
deckk[i] = null;
nDeckNum -= 1;
}
}
} | for (int i = 0; i < 52; i++) {
if (((deckk[i]) != null) && ((deckk[i].nIndex) == x)) {
deckk[i] = null;
nDeckNum -= 1;
break;
}
}
} |
public com.asc_ii.bangnote.bangnote.NoteItemAdapter.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType) {
if ((mContext) == null) {
mContext = parent.getContext();
}
android.view.View view = android.view.LayoutInflater.from(mContext).inflate(R.layout.note_item, parent, false);... | public com.asc_ii.bangnote.bangnote.NoteItemAdapter.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType) {
if ((mContext) == null) {
mContext = parent.getContext();
}
android.view.View view = android.view.LayoutInflater.from(mContext).inflate(R.layout.note_item, parent, false);... |
public void testDuplicateNameFullNameMapper() throws java.lang.Exception {
org.apache.ignite.internal.binary.BinaryMarshaller marsh = binaryMarshaller(new org.apache.ignite.binary.BinaryBasicNameMapper(false), new org.apache.ignite.binary.BinaryBasicIdMapper(false), null, null);
org.apache.ignite.internal.binar... | public void testDuplicateNameFullNameMapper() throws java.lang.Exception {
org.apache.ignite.internal.binary.BinaryMarshaller marsh = binaryMarshaller(new org.apache.ignite.binary.BinaryBasicNameMapper(false), new org.apache.ignite.binary.BinaryBasicIdMapper(false), null, null, null);
org.apache.ignite.internal... |
public static java.util.Properties getProperties(java.io.File propertiesFile) {
java.util.Properties properties = new java.util.Properties();
try {
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.FileReader(propertiesFile));
properties.load(reader);
reader.close();... | public static java.util.Properties getProperties(java.io.File propertiesFile) {
java.util.Properties properties = new java.util.Properties();
try {
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.FileReader(propertiesFile));
properties.load(reader);
reader.close();... |
public void save() {
if (!(file.delete())) {
}
try {
if (!(file.createNewFile())) {
}
} catch (java.io.IOException e) {
e.printStackTrace();
}
try (java.io.ObjectOutputStream output = new java.io.ObjectOutputStream(new java.io.FileOutputStream(file))) {
output.wri... | public void save() {
if (!(file.delete())) {
}
try {
if (!(file.createNewFile())) {
}
} catch (java.io.IOException e) {
e.printStackTrace();
}
try (java.io.ObjectOutputStream output = new java.io.ObjectOutputStream(new java.io.FileOutputStream(file))) {
output.wri... |
private void setPedagogicalUsesTreeRoot(eu.ueb.acem.domain.beans.jaune.ResourceCategory resourceCategory) {
eu.ueb.acem.web.controllers.MyToolsController.logger.debug("Entering setPedagogicalUsesTreeRoot");
pedagogicalUsesTreeBean = pedagogicalAdviceTreeGenerator.createNeedAndAnswersTree(null);
java.util.Se... | private void setPedagogicalUsesTreeRoot(eu.ueb.acem.domain.beans.jaune.ResourceCategory resourceCategory) {
eu.ueb.acem.web.controllers.MyToolsController.logger.debug("Entering setPedagogicalUsesTreeRoot");
pedagogicalUsesTreeBean = pedagogicalAdviceTreeGenerator.createNeedAndAnswersTree(null);
java.util.Se... |
public org.json.JSONObject toJSON() throws java.lang.Exception {
org.json.JSONObject json = new org.json.JSONObject();
json.put("id", mId);
json.put("teacher", mTeacher);
json.put("exam", mExam);
json.put("status", mPending.ordinal());
json.put("requestText", mRequestText);
json.put("duratio... | public org.json.JSONObject toJSON() throws java.lang.Exception {
org.json.JSONObject json = new org.json.JSONObject();
json.put("id", mId);
json.put("teacher", mTeacher.toJSON());
json.put("exam", mExam.toJSON());
json.put("status", mPending.ordinal());
json.put("requestText", mRequestText);
... |
public void testSetReadyStatus_GameAlreadyStarted() throws java.lang.Exception {
catan.domain.model.user.UserBean user = new catan.domain.model.user.UserBean(catan.services.impl.GameServiceImplTest.USER_NAME1, catan.services.impl.GameServiceImplTest.PASSWORD1);
catan.domain.model.game.GameBean game = new catan.... | public void testSetReadyStatus_GameAlreadyStarted() throws java.lang.Exception {
catan.domain.model.user.UserBean user = new catan.domain.model.user.UserBean(catan.services.impl.GameServiceImplTest.USER_NAME1, catan.services.impl.GameServiceImplTest.PASSWORD1);
catan.domain.model.game.GameBean game = new catan.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.