buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void testCreatItem2() throws java.lang.Exception {
de.escidoc.core.resources.om.item.Item item = de.fiz.escidoc.factory.EscidocObjects.createItem("invalid-context-id", "invalid-content-model-id");
java.lang.String xml = itemMarshaller.marshalDocument(item);
org.junit.Assert.assertNotNull(xml);
or... | public void testCreatItem2() throws java.lang.Exception {
de.escidoc.core.resources.om.item.Item item = de.fiz.escidoc.factory.EscidocObjects.createItem("invalid-context-id", "invalid-content-model-id");
java.lang.String xml = itemMarshaller.marshalDocument(item);
assertNotNull(xml);
assertTrue(((xml.le... |
private void addEntryToDatabase(int chapterNum, java.lang.String personName, int diaryResource, int month, int date, java.lang.String type) {
if ((com.jensen.draculadaybyday.Entries.EntryListActivity.fragmentEntryHandler) != null) {
java.util.Calendar calendar = java.util.Calendar.getInstance();
cal... | private void addEntryToDatabase(int chapterNum, java.lang.String personName, int diaryResource, int month, int date, java.lang.String type) {
if ((com.jensen.draculadaybyday.Entries.EntryListActivity.fragmentEntryHandler) != null) {
java.util.Calendar calendar = java.util.Calendar.getInstance();
cal... |
public eu.europa.ec.fisheries.uvms.rules.service.constants.FishingGearTypeCode retrieveFishingGearTypeCode(eu.europa.ec.fisheries.uvms.rules.service.business.fact.CodeType fishingGearTypeCode) {
if ((fishingGearTypeCode == null) || (org.apache.commons.lang3.StringUtils.isBlank(fishingGearTypeCode.getValue()))) {
... | public eu.europa.ec.fisheries.uvms.rules.service.constants.FishingGearTypeCode retrieveFishingGearTypeCode(eu.europa.ec.fisheries.uvms.rules.service.business.fact.CodeType fishingGearTypeCode) {
if ((fishingGearTypeCode == null) || (org.apache.commons.lang3.StringUtils.isBlank(fishingGearTypeCode.getValue()))) {
... |
static boolean IsIsogram(java.lang.String vastaus) {
vastaus = vastaus.toLowerCase();
int len = vastaus.length();
char[] arr = vastaus.toCharArray();
java.util.Arrays.sort(arr);
for (int i = 0; i < (len - 1); i++) {
if ((arr[i]) == (arr[(i + 1)]))
return true;
}
... | static boolean IsIsogram(java.lang.String answer) {
answer = answer.toLowerCase();
int len = answer.length();
char[] arr = answer.toCharArray();
java.util.Arrays.sort(arr);
for (int i = 0; i < (len - 1); i++) {
if ((arr[i]) == (arr[(i + 1)]))
return true;
}
retur... |
private void add(final int position, @android.support.annotation.NonNull
final com.dexafree.materialList.card.Card card, final boolean scroll) {
mCardList.add(position, card);
card.getProvider().addObserver(this);
mItemAnimation.onAddItem(position, scroll);
notifyItemInserted(position);
} | public void add(final int position, @android.support.annotation.NonNull
final com.dexafree.materialList.card.Card card, final boolean scroll) {
mCardList.add(position, card);
card.getProvider().addObserver(this);
mItemAnimation.onAddItem(position, scroll);
notifyItemInserted(position);
} |
public net.mostlyoriginal.api.io.network.common.SnapshotEncoder appendEntities(com.artemis.utils.IntBag entities) {
final int[] data = entities.getData();
for (int i = 0, s = entities.size(); s > i; i++) {
final net.mostlyoriginal.api.io.network.common.NetworkMetadata metadata = mNetworkMetadata.getSafe... | public net.mostlyoriginal.api.io.network.common.SnapshotEncoder appendEntities(com.artemis.utils.IntBag entities) {
final int[] data = entities.getData();
for (int i = 0, s = entities.size(); s > i; i++) {
appendEntity(data[i]);
}
return this;
} |
double heuristics(leastplanningdstar.State a, leastplanningdstar.State b) {
double temp;
double min = java.lang.Math.abs(((a.getX()) - (b.getX())));
double max = java.lang.Math.abs(((a.getY()) - (a.getY())));
if (min > max) {
temp = min;
min = max;
max = temp;
}
return ma... | double heuristics(leastplanningdstar.State a, leastplanningdstar.State b) {
double temp;
double min = java.lang.Math.abs(((a.getX()) - (b.getX())));
double max = java.lang.Math.abs(((a.getY()) - (b.getY())));
if (min > max) {
temp = min;
min = max;
max = temp;
}
return ma... |
public int getCountData(int category) {
org.hibernate.Session session = this.getSessionFactory().getCurrentSession();
java.lang.String hql = "select count(*) from ChineseCharacter where category=:category";
if (category == 0) {
hql = "select count(*) from ChineseCharacter ";
}
org.hibernate.... | public int getCountData(int category) {
org.hibernate.Session session = this.getSessionFactory().getCurrentSession();
java.lang.String hql = "select count(*) from ChineseCharacter where category=:category";
if (category == 0) {
hql = "select count(*) from ChineseCharacter ";
}
org.hibernate.... |
public void testInvalidAttachedDiskCreateSpecs(com.vmware.photon.controller.api.AttachedDiskCreateSpec spec, java.lang.String errorMsg) {
com.google.common.collect.ImmutableList<java.lang.String> violations = validator.validate(spec);
org.hamcrest.MatcherAssert.assertThat(violations.size(), org.hamcrest.Matcher... | public void testInvalidAttachedDiskCreateSpecs(com.vmware.photon.controller.api.AttachedDiskCreateSpec spec, java.lang.String errorMsg) {
com.google.common.collect.ImmutableList<java.lang.String> violations = validator.validate(spec);
org.hamcrest.MatcherAssert.assertThat(violations.size(), org.hamcrest.Matcher... |
public void run() {
while ((ackCount.get()) < (max)) {
java.util.List<java.lang.Long> list = new java.util.ArrayList<>();
list.add(((long) (ackCount.incrementAndGet())));
newBitmap.ackOffset(list, Ack.SUCCESS);
}
} | public void run() {
while ((ackCount.get()) < (max)) {
java.util.List<java.lang.Long> list = new java.util.ArrayList<>();
list.add(((long) (ackCount.incrementAndGet())));
newBitmap.ackOffset(list.iterator(), Ack.SUCCESS);
}
} |
private int tryParseIndex(java.lang.String argIndex) throws java.lang.IllegalArgumentException, java.lang.NullPointerException {
java.util.Optional<java.lang.Integer> index = parseIndex(argIndex);
if (!(index.isPresent())) {
java.lang.System.out.println("invalid index");
throw new java.lang.Ille... | private int tryParseIndex(java.lang.String argIndex) throws java.lang.IllegalArgumentException, java.lang.NullPointerException {
java.util.Optional<java.lang.Integer> index = parseIndex(argIndex);
if (!(index.isPresent())) {
throw new java.lang.IllegalArgumentException();
}
return index.get();
} |
public static org.infinity.resource.graphics.PvrDecoder loadPvr(java.lang.String fileName) {
if (fileName == null) {
throw new java.lang.NullPointerException();
}
try {
java.lang.String key = fileName.toUpperCase(java.util.Locale.ENGLISH);
org.infinity.resource.graphics.PvrDecoder de... | public static org.infinity.resource.graphics.PvrDecoder loadPvr(java.lang.String fileName) {
if (fileName == null) {
throw new java.lang.NullPointerException();
}
try {
java.lang.String key = fileName;
org.infinity.resource.graphics.PvrDecoder decoder = org.infinity.resource.graphics... |
private void updateSubtitle() {
com.csci448.npohl.criminalintent.CrimeLab crimeLab = com.csci448.npohl.criminalintent.CrimeLab.get(getActivity());
int crimeCount = crimeLab.getCrimes().size();
java.lang.String subtitle = getString(R.string.subtitle_format);
if (!(mSubtitleVisible)) {
subtitle = ... | private void updateSubtitle() {
com.csci448.npohl.criminalintent.CrimeLab crimeLab = com.csci448.npohl.criminalintent.CrimeLab.get(getActivity());
int crimeCount = crimeLab.getCrimes().size();
java.lang.String subtitle = getString(R.string.subtitle_format, crimeCount);
if (!(mSubtitleVisible)) {
... |
public freenet.support.io.DelayedFree[] grabBucketsToFree() {
synchronized(this) {
if (bucketsToFree.isEmpty())
return null;
freenet.support.io.DelayedFreeBucket[] buckets = bucketsToFree.toArray(new freenet.support.io.DelayedFreeBucket[bucketsToFree.size()]);
bucketsToF... | public freenet.support.io.DelayedFree[] grabBucketsToFree() {
synchronized(this) {
if (bucketsToFree.isEmpty())
return null;
freenet.support.io.DelayedFree[] buckets = bucketsToFree.toArray(new freenet.support.io.DelayedFree[bucketsToFree.size()]);
bucketsToFree.clear();... |
protected nl.ramondevaan.visualization.mesh.Mesh read() throws java.io.IOException {
java.lang.System.out.println("MESH READ");
java.lang.String ext = org.apache.commons.io.FilenameUtils.getExtension(path);
if (!(ext.equals(lastExt))) {
reader = factory.getMeshReaderByExtensionImpl(ext);
}
l... | protected nl.ramondevaan.visualization.mesh.Mesh read() throws java.io.IOException {
java.lang.String ext = org.apache.commons.io.FilenameUtils.getExtension(path);
if (!(ext.equals(lastExt))) {
reader = factory.getMeshReaderByExtensionImpl(ext);
}
lastExt = ext;
if ((reader) == null) {
... |
public void memeConnectCallback(boolean status) {
if ((cordova.getActivity()) == null) {
return false;
}
cordova.getActivity().runOnUiThread(new java.lang.Runnable() {
@java.lang.Override
public void run() {
debug(((("Connected to " + address) + ", isConnected = ") + (mMe... | public void memeConnectCallback(boolean status) {
if (!(cordova.getActivity())) {
return false;
}
cordova.getActivity().runOnUiThread(new java.lang.Runnable() {
@java.lang.Override
public void run() {
debug(((("Connected to " + address) + ", isConnected = ") + (mMemeLib.i... |
private void NotifyError() {
theguywith3thumbs.kahanho.Notifier notifier = new theguywith3thumbs.kahanho.Notifier(activityContext);
notifier.SendNotification("Location not found", "Enable location sharing from Android Settings");
com.google.android.gms.analytics.Tracker mTracker = ((theguywith3thumbs.kahanh... | private void NotifyError(java.lang.String error) {
theguywith3thumbs.kahanho.Notifier notifier = new theguywith3thumbs.kahanho.Notifier(activityContext);
notifier.SendNotification("Location not found", "Enable location sharing from Android Settings");
com.google.android.gms.analytics.Tracker mTracker = ((th... |
public static void store(java.lang.Object o, java.io.OutputStream fout, java.lang.String encoding) throws java.io.IOException, java.io.UnsupportedEncodingException {
java.lang.String s;
if (o == null)
s = "";
else
s = o.toString();
try {
fout.write(s.getBytes(encoding));
... | public static void store(java.lang.Object o, java.io.OutputStream fout, java.lang.String encoding) throws java.io.IOException {
try {
java.lang.String s = (o == null) ? "" : o.toString();
fout.write(s.getBytes(encoding));
} finally {
fout.close();
}
} |
public static com.yahoo.sql4d.Program compileSql(java.lang.String query) {
try {
org.antlr.runtime.ANTLRStringStream in = new org.antlr.runtime.ANTLRStringStream(query);
com.yahoo.sql4d.converter.druidGLexer lexer = new com.yahoo.sql4d.converter.druidGLexer(in);
org.antlr.runtime.CommonToken... | public static com.yahoo.sql4d.Program compileSql(java.lang.String query) {
try {
org.antlr.runtime.ANTLRStringStream in = new org.antlr.runtime.ANTLRStringStream(query);
com.yahoo.sql4d.converter.druidGLexer lexer = new com.yahoo.sql4d.converter.druidGLexer(in);
org.antlr.runtime.CommonToken... |
public void updateElapsedTime(boolean isRemoving) {
long now = dateUtils.currentTimeMillis();
if ((fulfilledTime) != 0)
this.elapsedTime = now - (fulfilledTime);
if (isRemoving)
fulfilledTime = 0;
this.xOCCIAtt.put(OrderAttribute.ELAPSED_TIME.getValue(), java.lang.String.valueO... | public void updateElapsedTime(boolean isRemoving) {
long now = dateUtils.currentTimeMillis();
if ((fulfilledTime) != 0)
this.elapsedTime += now - (fulfilledTime);
if (isRemoving)
fulfilledTime = 0;
this.xOCCIAtt.put(OrderAttribute.ELAPSED_TIME.getValue(), java.lang.String.value... |
final com.microsoft.sqlserver.jdbc.SQLServerConnection.PreparedStatementHandle getOrRegisterCachedPreparedStatementHandle(com.microsoft.sqlserver.jdbc.SQLServerConnection.Sha1HashKey key) {
if (!(isStatementPoolingEnabled()))
return null;
com.microsoft.sqlserver.jdbc.SQLServerConnection.PreparedSta... | final com.microsoft.sqlserver.jdbc.SQLServerConnection.PreparedStatementHandle getOrRegisterCachedPreparedStatementHandle(com.microsoft.sqlserver.jdbc.SQLServerConnection.Sha1HashKey key) {
if (!(isStatementPoolingEnabled()))
return null;
com.microsoft.sqlserver.jdbc.SQLServerConnection.PreparedSta... |
private void setAirplaneMode1(int flag) {
android.util.Log.e("CQW", ("setAirplaneMode1 = " + flag));
java.util.List<java.lang.String> cmds = new java.util.ArrayList<java.lang.String>();
cmds.clear();
cmds.add(("settings put global airplane_mode_on " + flag));
try {
doCmds(cmds);
} catch ... | private void setAirplaneMode1(int flag) {
java.util.List<java.lang.String> cmds = new java.util.ArrayList<java.lang.String>();
cmds.clear();
cmds.add(("settings put global airplane_mode_on " + flag));
try {
doCmds(cmds);
} catch (java.lang.Exception e) {
e.printStackTrace();
}
} |
private static com.codepath.apps.MySimpleTweets.models.Tweet saveIfNewTweet(com.codepath.apps.MySimpleTweets.models.Tweet tweet) {
com.codepath.apps.MySimpleTweets.models.Tweet existingTweet = new com.activeandroid.query.Select().from(com.codepath.apps.MySimpleTweets.models.Tweet.class).where("uid= ?", tweet.uid).e... | private static com.codepath.apps.MySimpleTweets.models.Tweet saveIfNewTweet(com.codepath.apps.MySimpleTweets.models.Tweet tweet) {
com.codepath.apps.MySimpleTweets.models.Tweet existingTweet = new com.activeandroid.query.Select().from(com.codepath.apps.MySimpleTweets.models.Tweet.class).where("uid= ?", tweet.uid).e... |
private void updateDesiredPreviewSize() {
if ((mCameraDevice) == null) {
return ;
}
mCameraSettings = mCameraDevice.getSettings();
android.graphics.Point desiredPreviewSize = com.android.camera.VideoModule.getDesiredPreviewSize(mAppController.getAndroidContext(), mCameraSettings, mCameraCapabili... | private void updateDesiredPreviewSize() {
if ((mCameraDevice) == null) {
return ;
}
mCameraSettings = mCameraDevice.getSettings();
android.graphics.Point desiredPreviewSize = getDesiredPreviewSize(mAppController.getAndroidContext(), mCameraSettings, mCameraCapabilities, mProfile, mUI.getPreviewS... |
public void run() {
while (true) {
try {
java.lang.String input = _input.take();
synchronized(this) {
if (input.equals(aya.Aya.QUIT)) {
notify();
break;
}
long startTime = java.lang.System.current... | public void run() {
while (true) {
try {
java.lang.String input = _input.take();
synchronized(this) {
if (input.equals(aya.Aya.QUIT)) {
break;
}
long startTime = java.lang.System.currentTimeMillis();
... |
public int readMem(int address) {
if ((readSwitchStatus) == null) {
keyboard.toggleKeyQueue(false);
int ret = ((keyboard) == null) ? 0 : keyboard.getHeldKeyCode();
return ret;
}else
return readSwitchStatus.getState() ? 128 | (keyboard.getHeldKeyCode()) : 127 & (keyboard.getHeldKe... | public int readMem(int address) {
if ((keyboard) == null)
return 0;
if ((readSwitchStatus) == null) {
keyboard.toggleKeyQueue(false);
int ret = keyboard.getHeldKeyCode();
return ret;
}else
return readSwitchStatus.getState() ? 128 | (keyboard.getHeldKeyCode()) : 1... |
if ((((duration > 0) && (hasSimCard)) && (receiver.hasSimCard)) && ((simMobileNumber) != (receiver.simMobileNumber))) {
outgoingCallsDuration += duration;
lastOutgoingCall = new Call();
lastOutgoingCall.caller = simMobileNumber;
lastOutgoingCall.receiver = receiver.simMobileNumber;
... | if ((((duration > 0) && (hasSimCard)) && (receiver.hasSimCard)) && (!(simMobileNumber.equals(receiver.simMobileNumber)))) {
outgoingCallsDuration += duration;
lastOutgoingCall = new Call();
lastOutgoingCall.caller = simMobileNumber;
lastOutgoingCall.receiver = receiver.simMobileNumbe... |
public java.util.List<org.dungeon.achievements.UnlockedAchievement> getUnlockedAchievements(java.util.Comparator<org.dungeon.achievements.UnlockedAchievement> comparator) {
if (comparator == null) {
throw new java.lang.IllegalArgumentException("comparator is null.");
}
java.util.List<org.dungeon.ach... | public java.util.List<org.dungeon.achievements.UnlockedAchievement> getUnlockedAchievements(java.util.Comparator<org.dungeon.achievements.UnlockedAchievement> comparator) {
if (comparator == null) {
throw new java.lang.IllegalArgumentException("comparator is null.");
}
java.util.List<org.dungeon.ach... |
public boolean computeDependencies(org.jahia.data.templates.JahiaTemplatesPackage pack) {
pack.resetDependencies();
computeResourceBundleHierarchy(pack);
for (org.jahia.data.templates.JahiaTemplatesPackage aPackage : packagesById.values()) {
if ((aPackage.getDepends().contains(pack.getId())) || (aPa... | public boolean computeDependencies(org.jahia.data.templates.JahiaTemplatesPackage pack) {
pack.resetDependencies();
if (computeDependencies(pack, pack)) {
computeResourceBundleHierarchy(pack);
for (org.jahia.data.templates.JahiaTemplatesPackage aPackage : packagesById.values()) {
if ... |
public static org.newdawn.slick.Image getIconImage(int id) {
if ((id < 0) || (id >= (itdelatrisu.opsu.user.UserButton.getIconCount())))
return null;
return GameImage.USER.getImages()[id].getScaledCopy(itdelatrisu.opsu.user.UserButton.iconSize, itdelatrisu.opsu.user.UserButton.iconSize);
} | public static org.newdawn.slick.Image getIconImage(int id) {
int i = ((id < 0) || (id >= (itdelatrisu.opsu.user.UserButton.getIconCount()))) ? 0 : id;
return GameImage.USER.getImages()[i].getScaledCopy(itdelatrisu.opsu.user.UserButton.iconSize, itdelatrisu.opsu.user.UserButton.iconSize);
} |
public void load() {
org.zanata.ApplicationConfiguration.log.info("Reloading configuration");
this.loadLoginModuleNames();
this.applyLoggingConfiguration();
this.loadJaasConfig();
authenticatedSessionTimeoutMinutes = sysPropConfigStore.get("authenticatedSessionTimeoutMinutes", 180);
enforceMatch... | public void load() {
org.zanata.ApplicationConfiguration.log.info("Reloading configuration");
this.loadLoginModuleNames();
this.loadJaasConfig();
authenticatedSessionTimeoutMinutes = sysPropConfigStore.get("authenticatedSessionTimeoutMinutes", 180);
enforceMatchingUsernames = java.lang.Boolean.parse... |
public boolean setName(java.lang.String name) {
if (!(file.exists()))
return false;
java.lang.String parent = file.getParent();
java.io.File newFile = new java.io.File(parent, name);
if (newFile.exists()) {
java.lang.System.out.println("ERROR: File already exists 111 FileReaderWrite... | public boolean setName(java.lang.String name) {
if (!(file.exists()))
return false;
java.lang.String parent = file.getParent();
java.io.File newFile = new java.io.File(parent, name);
if (!(file.renameTo(newFile))) {
java.lang.System.out.println("ERROR: file not able to rename 116 Fi... |
private void doStop() {
mCurrentDeviceName = "";
mCurrentTime = 0;
if ((mTV) != null) {
mTV.disconnect();
mTV = null;
}
mMediaPlayer = null;
mMediaControl = null;
mVolumeControl = null;
mLaunchSession = null;
if ((mStatusChangeListener) != null) {
mStatusChang... | private void doStop() {
mCurrentDeviceName = "";
mCurrentTime = 0;
if ((mTV) != null) {
mTV.disconnect();
mTV = null;
}
mMediaPlayer = null;
mMediaControl = null;
mVolumeControl = null;
if ((mStatusChangeListener) != null) {
mStatusChangeListener.onApplicationDisc... |
public void onResume() {
super.onResume();
net.kourlas.voipms_sms.activities.App.getInstance().setCurrentActivity(this);
conversationsListViewAdapter.refresh();
if (!(net.kourlas.voipms_sms.activities.Preferences.getInstance(getApplicationContext()).getFirstRun())) {
net.kourlas.voipms_sms.activ... | public void onResume() {
super.onResume();
net.kourlas.voipms_sms.activities.App.getInstance().setCurrentActivity(this);
conversationsListViewAdapter.refresh();
if (!(net.kourlas.voipms_sms.activities.Preferences.getInstance(getApplicationContext()).getFirstRun())) {
net.kourlas.voipms_sms.activ... |
public java.lang.Iterable<org.wikiup.core.inf.Document> getChildren() {
final java.lang.Iterable<org.wikiup.database.orm.inf.Relatives> iterable = org.wikiup.core.util.Interfaces.cast(java.lang.Iterable.class, relatives);
if (iterable == null)
return org.wikiup.core.impl.Null.getInstance();
ret... | public java.lang.Iterable<org.wikiup.core.inf.Document> getChildren() {
if ((iterable) == null)
return org.wikiup.core.impl.Null.getInstance();
return new java.lang.Iterable<org.wikiup.core.inf.Document>() {
@java.lang.Override
public java.util.Iterator<org.wikiup.core.inf.Document>... |
private boolean checkIFLastBracketIsInNewLine(java.lang.StringBuilder tmpWikiText, int i) {
if ((tmpWikiText.charAt((i - 1))) != '\n') {
return true;
}
if (((tmpWikiText.charAt((i - 1))) != '\n') && ((tmpWikiText.charAt((i - 2))) != '\n')) {
return true;
}
return false;
} | private boolean checkIFLastBracketIsInNewLine(java.lang.StringBuilder tmpWikiText, int i) {
return ((tmpWikiText.charAt((i - 1))) != '\n') || (((tmpWikiText.charAt((i - 1))) != '\n') && ((tmpWikiText.charAt((i - 2))) != '\n'));
} |
public static char getCurrentKey() {
char key = 0;
input.KeyboardInput.actionPrev = input.KeyboardInput.actionNow;
input.KeyboardInput.actionNow = engine.Engine.keyAction;
if (((input.KeyboardInput.actionPrev) == 0) && ((input.KeyboardInput.actionNow) == 1))
key = ((char) (engine.Engine.keyInput... | public static char getCurrentKey() {
char key = 0;
input.KeyboardInput.actionNow = engine.Engine.keyAction;
if (((input.KeyboardInput.actionPrev) == 0) && ((input.KeyboardInput.actionNow) == 1))
key = ((char) (engine.Engine.keyInput));
else
key = 0;
input.KeyboardInput.actionPre... |
public com.bendb.thrifty.protocol.MapMetadata readMapBegin() throws java.io.IOException {
byte keyTypeId = readByte();
byte valueTypeId = readByte();
int size = readI32();
if (size > (containerLengthLimit))
throw new java.net.ProtocolException("Container size limit exceeded");
return ne... | public com.bendb.thrifty.protocol.MapMetadata readMapBegin() throws java.io.IOException {
byte keyTypeId = readByte();
byte valueTypeId = readByte();
int size = readI32();
if (((containerLengthLimit) != (-1)) && (size > (containerLengthLimit))) {
throw new java.net.ProtocolException("Container s... |
private void putWifiResults(java.util.List<android.net.wifi.ScanResult> results) {
if ((mBundle) == null) {
return ;
}
java.util.Map<java.lang.String, android.net.wifi.ScanResult> currentWifiData = mBundle.getWifiData();
for (android.net.wifi.ScanResult result : results) {
if ((currentWi... | private void putWifiResults(java.util.List<android.net.wifi.ScanResult> results) {
if ((mBundle) == null) {
return ;
}
java.util.Map<java.lang.String, android.net.wifi.ScanResult> currentWifiData = mBundle.getWifiData();
for (android.net.wifi.ScanResult result : results) {
if ((currentWi... |
private com.adobe.granite.ui.clientlibs.LibraryType getLibraryType(@javax.annotation.Nonnull
final java.lang.String path) throws com.dal.fingerprinting.service.IncompatibleResourceTypeException {
if (org.apache.commons.lang3.StringUtils.endsWith(path, LibraryType.CSS.extension)) {
return com.adobe.granite.u... | private static com.adobe.granite.ui.clientlibs.LibraryType getLibraryType(@javax.annotation.Nonnull
final java.lang.String path) throws com.dal.fingerprinting.service.IncompatibleResourceTypeException {
if (org.apache.commons.lang3.StringUtils.endsWith(path, LibraryType.CSS.extension)) {
return com.adobe.gr... |
public net.alexblass.chess.models.Piece getKing(int color) {
net.alexblass.chess.models.Piece king = null;
java.util.List<net.alexblass.chess.models.Piece> playerPieces;
if (color == (net.alexblass.chess.models.Piece.WHITE)) {
playerPieces = mWhitePieces;
}else {
playerPieces = mBlackPie... | public net.alexblass.chess.models.Piece getKing(int color) {
net.alexblass.chess.models.Piece king = null;
java.util.List<net.alexblass.chess.models.Piece> playerPieces;
if (color == (net.alexblass.chess.models.Piece.WHITE)) {
playerPieces = mWhitePieces;
}else {
playerPieces = mBlackPie... |
private void computeEntryCMPForFootstep(us.ihmc.robotics.geometry.FramePoint entryCMPToPack, us.ihmc.humanoidRobotics.footstep.Footstep footstep, us.ihmc.robotics.geometry.FramePoint2d centroidInSoleFrameOfPreviousSupportFoot, us.ihmc.robotics.math.frames.YoFramePoint previousExitCMP) {
us.ihmc.robotics.referenceFr... | private void computeEntryCMPForFootstep(us.ihmc.robotics.geometry.FramePoint entryCMPToPack, us.ihmc.humanoidRobotics.footstep.Footstep footstep, us.ihmc.robotics.geometry.FramePoint2d centroidInSoleFrameOfPreviousSupportFoot, us.ihmc.robotics.math.frames.YoFramePoint previousExitCMP) {
us.ihmc.robotics.referenceFr... |
public static java.util.List<com.intel.jndn.management.types.RibEntry> getRouteList(final net.named_data.jndn.Face face) throws com.intel.jndn.management.ManagementException {
try {
java.util.List<net.named_data.jndn.Data> segments = com.intel.jndn.management.helpers.FetchHelper.getSegmentedData(face, new n... | public static java.util.List<com.intel.jndn.management.types.RibEntry> getRouteList(final net.named_data.jndn.Face face) throws com.intel.jndn.management.ManagementException {
try {
java.util.List<net.named_data.jndn.Data> segments = com.intel.jndn.management.helpers.FetchHelper.getSegmentedData(face, new n... |
public void setItem(fr.pasteque.client.models.interfaces.Item item) {
if (item.hasImage()) {
this.setBackgroundResource(R.color.product_item_inner_bg);
this.setImageResource(android.R.color.transparent);
switch (item.getType()) {
case Category :
new fr.pasteque.cl... | public void setItem(fr.pasteque.client.models.interfaces.Item item) {
this.item = item;
if (this.item.hasImage()) {
this.setBackgroundResource(R.color.product_item_inner_bg);
this.setImageResource(android.R.color.transparent);
switch (item.getType()) {
case Category :
... |
public void onStartup(ServletContext servletContext) throws ServletException {
if ((env.getActiveProfiles().length) != 0) {
log.info("Web application configuration, using profiles: {}", java.util.Arrays.toString(env.getActiveProfiles()));
}
java.util.EnumSet<DispatcherType> disps = java.util.EnumSet... | public void onStartup(ServletContext servletContext) throws ServletException {
if ((env.getActiveProfiles().length) != 0) {
log.info("Web application configuration, using profiles: {}", ((java.lang.Object[]) (env.getActiveProfiles())));
}
java.util.EnumSet<DispatcherType> disps = java.util.EnumSet.o... |
public static java.util.List<introsde.rest.ehealth.model.Person> getAll() {
java.lang.System.out.println("--> Initializing Entity manager...");
introsde.rest.ehealth.model.EntityManager em = LifeCoachDao.instance.createEntityManager();
java.lang.System.out.println("--> Querying the database for all the peop... | public static java.util.List<introsde.rest.ehealth.model.Person> getAll() {
introsde.rest.ehealth.model.EntityManager em = LifeCoachDao.instance.createEntityManager();
java.util.List<introsde.rest.ehealth.model.Person> list = em.createNamedQuery("Person.findAll", introsde.rest.ehealth.model.Person.class).getRes... |
public static void validateTemplateGroup(org.wso2.carbon.business.rules.core.internal.bean.TemplateGroup templateGroup) throws org.wso2.carbon.business.rules.core.internal.exceptions.TemplateManagerException {
try {
if ((templateGroup.getName()) == null) {
throw new org.wso2.carbon.business.rule... | public static void validateTemplateGroup(org.wso2.carbon.business.rules.core.internal.bean.TemplateGroup templateGroup) throws org.wso2.carbon.business.rules.core.internal.exceptions.TemplateManagerException {
try {
if ((templateGroup.getName()) == null) {
throw new org.wso2.carbon.business.rule... |
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
super.onActivityResult(requestCode, resultCode, data);
java.io.File file = getTempFile(getBaseContext());
android.content.Intent intent = new android.content.Intent(getBaseContext(), niclam.banana_scaler_alpha.Dr... | protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
super.onActivityResult(requestCode, resultCode, data);
java.io.File file = getTempFile(getBaseContext());
android.content.Intent intent = new android.content.Intent(getBaseContext(), niclam.banana_scaler_alpha.Dr... |
public rx.Observable<java.util.List<com.chenyu.monster.rxretrofithttprequest.Entity.Subject>> call(com.chenyu.monster.rxretrofithttprequest.framework.HttpResult<java.util.List<com.chenyu.monster.rxretrofithttprequest.Entity.Subject>> httpResult) {
if ((httpResult.getCount()) != 0) {
return rx.Observable.err... | public rx.Observable<java.util.List<com.chenyu.monster.rxretrofithttprequest.Entity.Subject>> call(com.chenyu.monster.rxretrofithttprequest.framework.HttpResult<java.util.List<com.chenyu.monster.rxretrofithttprequest.Entity.Subject>> httpResult) {
if ((httpResult.getCount()) == 0) {
return rx.Observable.err... |
private java.util.List<com.emc.vipr.model.catalog.AssetOption> getContinuousCopyOptionsForProject(com.emc.sa.asset.AssetOptionsContext ctx, java.net.URI project, java.net.URI volumeId, com.emc.vipr.client.core.filters.ResourceFilter<com.emc.storageos.model.block.BlockMirrorRestRep> filter) {
com.emc.vipr.client.ViP... | private java.util.List<com.emc.vipr.model.catalog.AssetOption> getContinuousCopyOptionsForProject(com.emc.sa.asset.AssetOptionsContext ctx, java.net.URI project, java.net.URI volumeId, com.emc.vipr.client.core.filters.ResourceFilter<com.emc.storageos.model.block.BlockMirrorRestRep> filter) {
com.emc.vipr.client.ViP... |
public void refresh(java.util.List<?> pojos, long timestamp, double smoothingWindow) {
if (refreshable) {
for (java.lang.Object pojo : pojos) {
java.util.List<?> currentList = ((java.util.List<?>) (fetcher.fetchFrom(pojo)));
for (java.lang.Object element : currentList) {
... | public void refresh(java.util.List<?> pojos, long timestamp, double smoothingWindow) {
if (refreshable) {
for (java.lang.Object pojo : pojos) {
java.util.List<?> currentList = ((java.util.List<?>) (fetcher.fetchFrom(pojo)));
if (currentList != null) {
for (java.lang.O... |
public static final long readUnsignedInt(java.io.InputStream inputStream) throws java.io.IOException {
int[] octets = de.ralleytn.utils.IOUtils.read(inputStream, 4);
return de.ralleytn.utils.BinaryUtils.getUnsignedInteger(octets[0], octets[1], octets[2], octets[3]);
} | public static final long readUnsignedInt(java.io.InputStream inputStream) throws java.io.IOException {
int[] octets = de.ralleytn.utils.IOUtils.read(inputStream, 4);
return de.ralleytn.utils.BinaryUtils.getUnsignedInteger(octets[3], octets[2], octets[1], octets[0]);
} |
public java.util.List<cc.creativecomputing.math.CCLine3> edges() {
if ((_myEdges) != null)
return _myEdges;
_myEdges = new java.util.ArrayList<>();
for (cc.creativecomputing.geometry.hemesh.CCVoronoi.CCVoronoiEdge myEdge : _myGraphEdges) {
_myEdges.add(new cc.creativecomputing.math.CCLi... | public java.util.List<cc.creativecomputing.math.CCLine3> edges() {
if ((_myEdges) != null)
return _myEdges;
_myEdges = new java.util.ArrayList<>();
if ((_myGraphEdges) == null)
return _myEdges;
for (cc.creativecomputing.geometry.hemesh.CCVoronoi.CCVoronoiEdge myEdge : _myGraphE... |
public void onOtherButtonClick(com.baoyz.actionsheet.ActionSheet actionSheet, int index) {
switch (index) {
case 0 :
android.content.Intent intent = new android.content.Intent(getApplicationContext(), jp.co.efusion.aninstantreply.HomeActivity.class);
intent.addFlags(Intent.FLAG_ACTIV... | public void onOtherButtonClick(com.baoyz.actionsheet.ActionSheet actionSheet, int index) {
switch (index) {
case 0 :
android.content.Intent intent = new android.content.Intent(getApplicationContext(), jp.co.efusion.aninstantreply.HomeActivity.class);
intent.addFlags(Intent.FLAG_ACTIV... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
((android.widget.Button) (findViewById(R.id.button))).setOnClickListener(new android.view.View.OnClickListener() {
@java.lang.Override
public void onCli... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
((android.widget.Button) (findViewById(R.id.button))).setOnClickListener(new android.view.View.OnClickListener() {
@java.lang.Override
public void onCli... |
protected java.lang.String doInBackground(java.lang.String... path) {
main.runOnUiThread(new java.lang.Runnable() {
@java.lang.Override
public void run() {
bar.setVisibility(View.VISIBLE);
}
});
try {
com.gabapps.student.FTP.downloadSingleFile(path[0], path[1]);
... | protected java.lang.String doInBackground(java.lang.String... path) {
try {
com.gabapps.student.FTP.downloadSingleFile(path[0], path[1]);
android.util.Log.d("FTP", "File Downloaded");
return path[1];
} catch (java.io.IOException e) {
android.util.Log.e("FTP", "Can't download file... |
public com.cidic.sdx.hpgl.model.ResultModel getFeedbackVipName(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, @org.springframework.web.bind.annotation.RequestParam
int userId, @org.springframework.web.bind.annotation.RequestParam
java.lang.String matchlistIds) {
com.... | public com.cidic.sdx.hpgl.model.ResultModel getFeedbackVipName(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, @org.springframework.web.bind.annotation.RequestParam
int userId, @org.springframework.web.bind.annotation.RequestParam
java.lang.String matchlistIds) {
com.... |
private void roundComplete() {
if ((getQuestion().getDifficulty()) == (Question.Difficulty.HARD)) {
game.setDisplayPanel(game.SUBJECT_SCREEN);
game.SUBJECT_SCREEN.setDisabledSubject(getQuestion().getSubject());
game.SUBJECT_SCREEN.init(true);
}else {
game.setDisplayPanel(game.CON... | private void roundComplete() {
if ((getQuestion().getDifficulty()) == (Question.Difficulty.HARD)) {
game.setDisplayPanel(game.SUBJECT_SCREEN);
game.SUBJECT_SCREEN.init(true);
game.SUBJECT_SCREEN.setDisabledSubject(getQuestion().getSubject());
}else {
game.setDisplayPanel(game.CON... |
private void close() {
if (!(connected)) {
return ;
}
connected = false;
if ((socketChannel) != null) {
try {
socketChannel.close();
} catch (java.io.IOException e) {
e.printStackTrace();
}
}
server.removeClient(this);
de.jackwhite20.ja... | private void close() {
if (!(connected)) {
return ;
}
connected = false;
server.removeClient(this);
if ((socketChannel) != null) {
try {
socketChannel.close();
} catch (java.io.IOException e) {
e.printStackTrace();
}
}
de.jackwhite20.ja... |
public void setWindow(javafx.stage.Window window) {
this.window = window;
mapScrollPane.setVmax(0);
mapScrollPane.setHmax(0);
window.heightProperty().addListener(( e) -> {
mapRootPane.updateCanvasSize(mapContainer.getWidth(), mapContainer.getHeight());
});
window.widthProperty().addListe... | public void setWindow(javafx.stage.Window window) {
this.window = window;
mapScrollPane.setVmax(0);
mapScrollPane.setHmax(0);
mapContainer.heightProperty().addListener(( e) -> {
mapRootPane.updateCanvasSize(mapContainer.getWidth(), mapContainer.getHeight());
});
mapContainer.widthPropert... |
private int find(int col, @javax.annotation.Nullable
java.lang.Object o) {
for (int i = 0; i <= (elements); i++) {
java.lang.Object c = get(col, i);
if (((o == null) && (c == null)) || ((o != null) && (o.equals(c)))) {
return i;
}
}
return -1;
} | private int find(int col, @javax.annotation.Nullable
java.lang.Object o) {
for (int i = 0; i < (elements); i++) {
java.lang.Object c = get(col, i);
if (((o == null) && (c == null)) || ((o != null) && (o.equals(c)))) {
return i;
}
}
return -1;
} |
protected void setUpStep(int stepNumber) {
android.widget.LinearLayout stepLayout = createStepLayout(stepNumber);
if (stepNumber < (numberOfSteps)) {
android.widget.RelativeLayout stepContent = ((android.widget.RelativeLayout) (stepLayout.findViewById(R.id.step_content)));
stepContent.addView(st... | protected void setUpStep(int stepNumber) {
android.widget.LinearLayout stepLayout = createStepLayout(stepNumber);
if (stepNumber < (numberOfSteps)) {
android.widget.RelativeLayout stepContent = ((android.widget.RelativeLayout) (stepLayout.findViewById(R.id.step_content)));
stepContent.addView(st... |
public java.util.List<java.util.Map<java.lang.String, victor.santiago.model.simulation.TeamPerformance>> simulate(int n) {
java.util.List<java.util.Map<java.lang.String, victor.santiago.model.simulation.TeamPerformance>> simulations = new java.util.ArrayList<>();
while (n > 0)
simulations.add(simulate()... | public java.util.List<java.util.Map<java.lang.String, victor.santiago.model.simulation.TeamPerformance>> simulate(int n) {
java.util.List<java.util.Map<java.lang.String, victor.santiago.model.simulation.TeamPerformance>> simulations = new java.util.ArrayList<>();
while (n > 0) {
simulations.add(simulate... |
public void testGets() throws java.lang.Exception {
com.paypal.selion.utils.ConfigParser config = com.paypal.selion.utils.ConfigParser.parse();
int i = config.getInt("Key1");
java.lang.String s = config.getString("Key2");
long l = config.getLong("Key3");
assertEquals(i, 1000);
assertEquals(s, "S... | public void testGets() throws java.lang.Exception {
com.paypal.selion.utils.ConfigParser config = com.paypal.selion.utils.ConfigParser.parse();
int i = config.getInt("Key1");
java.lang.String s = config.getString("Key2");
long l = config.getLong("Key3");
org.testng.Assert.assertEquals(i, 1000);
... |
public java.lang.String getMessage() {
java.lang.StringBuffer sb = new java.lang.StringBuffer("Undefined variables in instance: ");
boolean first = true;
for (java.lang.String var : undefined) {
if (!first) {
sb.append(", ");
first = false;
}
sb.append(var.toS... | public java.lang.String getMessage() {
java.lang.StringBuffer sb = new java.lang.StringBuffer("Undefined variables in instance: ");
boolean first = true;
for (java.lang.String var : undefined) {
if (!first)
sb.append(", ");
sb.append(var.toString());
first = fals... |
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
try {
java.lang.String[] listId = request.getParameterValues("selection");
for (java.lang.String id : listId) {
... | protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
try {
java.lang.String[] listId = request.getParameterValues("selection");
java.lang.System.out.println(listId);
... |
private void oCREngineComboBoxStateChanged(richtercloud.document.scanner.ifaces.OCREngineConf cREngineConf) {
richtercloud.document.scanner.ocr.OCREngineConfPanel<?> cREngineConfPanel = this.oCREngineConfPanelMap.get(cREngineConf);
this.oCRDialogPanel.removeAll();
this.oCRDialogPanel.add(cREngineConfPanel);... | private void oCREngineComboBoxStateChanged(richtercloud.document.scanner.ifaces.OCREngineConf cREngineConf) {
richtercloud.document.scanner.ocr.OCREngineConfPanel<?> cREngineConfPanel = this.oCREngineConfPanelMap.get(cREngineConf.getClass());
this.oCRDialogPanel.removeAll();
this.oCRDialogPanel.add(cREngine... |
public java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLException {
java.lang.String validatedPath = validateResourcePath(path);
if (validatedPath == null) {
throw new java.net.MalformedURLException(org.apache.catalina.core.ApplicationContext.sm.getString("applicationContext.r... | public java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLException {
java.lang.String validatedPath = validateResourcePath(path, false);
if (validatedPath == null) {
throw new java.net.MalformedURLException(org.apache.catalina.core.ApplicationContext.sm.getString("applicationCo... |
private void calculateKlScores() {
int totalNumberOfTermsInCollection = ((int) (searcher.getNumberOfTermsInCollection()));
org.elasticsearch.plugin.TermData[] calculatedKlScores = new org.elasticsearch.plugin.TermData[searchHits.length];
int index = 0;
for (org.elasticsearch.plugin.TermData termData : t... | private void calculateKlScores() {
int totalNumberOfTermsInCollection = ((int) (searcher.getNumberOfTermsInCollection()));
org.elasticsearch.plugin.TermData[] calculatedKlScores = new org.elasticsearch.plugin.TermData[terms.size()];
int index = 0;
for (org.elasticsearch.plugin.TermData termData : terms.... |
public cn.gov.baiyin.court.core.entity.User findByUserName(java.lang.String username) {
java.util.List<cn.gov.baiyin.court.core.entity.User> users = jdbcTemplate.query("select * from user where username=?", new org.springframework.jdbc.core.BeanPropertyRowMapper<cn.gov.baiyin.court.core.entity.User>(cn.gov.baiyin.c... | public cn.gov.baiyin.court.core.entity.User findByUserName(java.lang.String username) {
java.util.List<cn.gov.baiyin.court.core.entity.User> users = jdbcTemplate.query("select * from user where username=?", new org.springframework.jdbc.core.BeanPropertyRowMapper(cn.gov.baiyin.court.core.entity.User.class), username... |
public void spielerHinzufuegen(classes.Spieler spieler) {
if (!(spielHatBegonnen)) {
if (spieler == null)
throw new java.lang.RuntimeException("Spieler existiert nicht!");
for (int i = 0; i < (this.spieler.size()); i++) {
if ((this.spieler.get(i).getFarbe()) == (spie... | public void spielerHinzufuegen(classes.Spieler spieler) {
if (!(spielHatBegonnen)) {
if (spieler == null)
throw new java.lang.RuntimeException("Spieler existiert nicht!");
for (int i = 0; i < (this.spieler.size()); i++) {
if ((this.spieler.get(i).getFarbe()) == (spie... |
public boolean checaTipo(loo1.plp.orientadaObjetos1.memoria.AmbienteCompilacaoOO1 ambiente) throws loo1.plp.orientadaObjetos1.excecao.declaracao.ClasseNaoDeclaradaException {
return (tipo.eValido(ambiente)) && ((!((parametro) instanceof loo1.plp.orientadaObjetos1.declaracao.procedimento.ParametroOpcional)) || (tipo... | public boolean checaTipo(loo1.plp.orientadaObjetos1.memoria.AmbienteCompilacaoOO1 ambiente) throws loo1.plp.orientadaObjetos1.excecao.declaracao.ClasseNaoDeclaradaException {
return (tipo.eValido(ambiente)) && ((!((parametro) instanceof loo1.plp.orientadaObjetos1.declaracao.procedimento.ParametroOpcional)) || ((tip... |
private int checkNumberOfDivisors(final long number) {
if (number < 1) {
return 0;
}
int divisors = 2;
long sqrt = ((long) (java.lang.Math.sqrt(number)));
for (int i = 2; i < sqrt; i++) {
if ((number % i) == 0) {
divisors += 2;
}
}
if ((sqrt * sqrt) == num... | private int checkNumberOfDivisors(final long number) {
if (number < 1) {
return 0;
}
int divisors = 0;
long sqrt = ((long) (java.lang.Math.sqrt(number)));
for (int i = 1; i <= sqrt; i++) {
if ((number % i) == 0) {
divisors += 2;
}
}
if ((sqrt * sqrt) == nu... |
public java.lang.Object clone() {
try {
org.leplus.util.IdentityHashSet<E> newSet = ((org.leplus.util.IdentityHashSet<E>) (super.clone()));
newSet.map = ((java.util.IdentityHashMap<E, java.lang.Object>) (map.clone()));
return newSet;
} catch (java.lang.CloneNotSupportedException e) {
... | public java.lang.Object clone() {
try {
org.leplus.util.IdentityHashSet<E> newSet = ((org.leplus.util.IdentityHashSet<E>) (super.clone()));
newSet.map = ((java.util.IdentityHashMap<E, java.lang.Object>) (map.clone()));
return newSet;
} catch (java.lang.CloneNotSupportedException e) {
... |
private com.example.shoha.avalon.Charecter pickCharecter() {
java.util.Random r = new java.util.Random(java.lang.System.nanoTime());
int index = r.nextInt(charecters.size());
com.example.shoha.avalon.Charecter c = charecters.get(index);
charecters.remove(index);
return c;
} | private com.example.shoha.avalon.Charecter pickCharecter() {
java.util.Random r = new java.util.Random(java.lang.System.nanoTime());
java.lang.System.out.println(charecters.size());
int index = r.nextInt(charecters.size());
com.example.shoha.avalon.Charecter c = charecters.get(index);
charecters.rem... |
private void acceptVideo(byte[] src, byte[] dst) {
int directionFlag = ((currentCamera) == (Camera.CameraInfo.CAMERA_FACING_BACK)) ? resCoreParameters.backCameraDirectionMode : resCoreParameters.frontCameraDirectionMode;
long a = java.lang.System.currentTimeMillis();
me.lake.librestreaming.core.ColorHelper.... | private void acceptVideo(byte[] src, byte[] dst) {
int directionFlag = ((currentCamera) == (Camera.CameraInfo.CAMERA_FACING_BACK)) ? resCoreParameters.backCameraDirectionMode : resCoreParameters.frontCameraDirectionMode;
long a = java.lang.System.currentTimeMillis();
me.lake.librestreaming.core.ColorHelper.... |
public static void startBot() {
bot.Config cfg = new bot.Config();
boolean isReaded = cfg.readFromConfigFile("config.cfg");
if (isReaded) {
bot.wrk.JDA.WrkJDA bot = new bot.wrk.JDA.WrkJDA(cfg.getToken(), cfg.getOwnerId(), cfg.getServerId(), cfg.getTextChannelId(), cfg.getVoiceChannelId(), cfg.getPre... | public static void startBot() {
bot.Config cfg = new bot.Config();
boolean isReaded = cfg.readFromConfigFile("config.cfg");
if (isReaded) {
bot.wrk.JDA.WrkJDA bot = new bot.wrk.JDA.WrkJDA(cfg.getToken(), cfg.getOwnerId(), cfg.getServerId(), cfg.getTextChannelId(), cfg.getVoiceChannelId(), cfg.getPre... |
public static void lessOrEqual(java.lang.String message, double lhs, double rhs, double margin) {
com.johnuckele.vtest.Tester.checkScope();
java.lang.System.out.println(((((((("\t\t" + message) + ": ") + lhs) + " <= ") + rhs) + " ± ") + margin));
double difference = lhs - rhs;
com.johnuckele.vtest.Teste... | public static void lessOrEqual(java.lang.String message, double lhs, double rhs, double margin) {
com.johnuckele.vtest.Tester.checkScope();
java.lang.System.out.println(((((((("\t\t" + message) + ": ") + lhs) + " <= ") + rhs) + " ± ") + margin));
com.johnuckele.vtest.Tester.test((lhs <= (rhs - (java.lang.Ma... |
private java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency> dataImportMongoDependencies() {
java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency> deps = new java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency>();
deps.a... | private java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency> dataImportMongoDependencies() {
java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency> deps = new java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency>();
deps.a... |
public java.io.File getDiskFile(csns.model.core.File file, boolean followReference) {
java.io.File diskFile = new java.io.File(fileDir, file.getId().toString());
return ((diskFile.exists()) || (!followReference)) || ((file.getReference()) == null) ? diskFile : new java.io.File(fileDir, file.getReference().getId... | public java.io.File getDiskFile(csns.model.core.File file, boolean followReference) {
java.io.File diskFile = new java.io.File(fileDir, file.getId().toString());
return ((diskFile.exists()) || (!followReference)) || ((file.getReference()) == null) ? diskFile : getDiskFile(file.getReference(), true);
} |
protected void onPostExecute(android.graphics.Bitmap bitmap) {
if (bitmap == null) {
android.util.Log.e(com.google.maps.android.kml.KmlRenderer.LOG_TAG, ("Image at this URL could not be found " + (mIconUrl)));
}
mImagesCache.put(mIconUrl, bitmap);
if (mLayerVisible) {
addIconToMarkers(mI... | protected void onPostExecute(android.graphics.Bitmap bitmap) {
if (bitmap == null) {
android.util.Log.e(com.google.maps.android.kml.KmlRenderer.LOG_TAG, ("Image at this URL could not be found " + (mIconUrl)));
}else {
mImagesCache.put(mIconUrl, bitmap);
if (mLayerVisible) {
a... |
public void updateAStar() {
Room.aStarMap = new int[aStarMapHeight][aStarMapWidth];
for (Enemy e : getGameWorld().getCurrentRoom().getEnemyList()) {
addObstruction(e.getBoundingBox());
}
for (Item i : getGameWorld().getCurrentRoom().getItemList()) {
addObstruction(i.getBoundingBox());
... | public void updateAStar() {
Room.aStarMap = new int[aStarMapHeight][aStarMapWidth];
for (Enemy e : getGameWorld().getCurrentRoom().getEnemyList()) {
addObstruction(e.getBoundingBox());
}
for (Item i : getGameWorld().getCurrentRoom().getItemList()) {
addObstruction(i.getBoundingBox());
... |
public java.util.Map<java.lang.String, java.lang.Object> getAsMapWithStringKeys() {
java.util.Map<java.lang.String, java.lang.Object> stringMap = new java.util.HashMap<>();
for (java.util.Map.Entry<com.floragunn.searchguard.auditlog.impl.AuditMessage.AuditMessageKey, java.lang.Object> entry : this.auditInfo.ent... | public java.util.Map<java.lang.String, java.lang.Object> getAsMapWithStringKeys() {
java.util.Map<java.lang.String, java.lang.Object> stringMap = new java.util.HashMap<>(this.auditInfo.size());
for (java.util.Map.Entry<com.floragunn.searchguard.auditlog.impl.AuditMessage.AuditMessageKey, java.lang.Object> entry... |
protected <K, V> com.hazelcast.config.CacheConfig<K, V> findConfig(java.lang.String cacheName, java.lang.String simpleCacheName, boolean createAlsoOnOthers, boolean syncCreate) {
com.hazelcast.config.CacheConfig<K, V> config = configs.get(cacheName);
if (config == null) {
if (config == null) {
... | protected <K, V> com.hazelcast.config.CacheConfig<K, V> findConfig(java.lang.String cacheName, java.lang.String simpleCacheName, boolean createAlsoOnOthers, boolean syncCreate) {
com.hazelcast.config.CacheConfig<K, V> config = configs.get(cacheName);
if (config == null) {
config = getCacheConfigFromPart... |
public static void main(java.lang.String[] args) {
com.util.DatabaseManager dbc = new com.util.DatabaseManager();
implementations.PersonDatabase pdb = new implementations.PersonDatabase();
com.util.TableManager tbm = new com.util.TableManager();
tbm.makeQuery("Test", "SELECT id, first_name, last_name FR... | public static void main(java.lang.String[] args) {
com.util.TableCreator tblc = new com.util.TableCreator();
tblc.createTables("prosjekt");
com.util.DatabaseManager dbc = new com.util.DatabaseManager();
implementations.PersonDatabase pdb = new implementations.PersonDatabase();
com.util.TableManager ... |
public void The_response_should_contain_a_user_not_having_role(java.lang.String username, java.lang.String expectedRole) throws java.lang.Throwable {
alien4cloud.rest.model.RestResponse<alien4cloud.security.model.User> restResponse = alien4cloud.rest.utils.JsonUtil.read(alien4cloud.it.Context.getInstance().getRestR... | public void The_response_should_contain_a_user_not_having_role(java.lang.String username, java.lang.String expectedRole) throws java.lang.Throwable {
alien4cloud.rest.model.RestResponse<alien4cloud.security.model.User> restResponse = alien4cloud.rest.utils.JsonUtil.read(alien4cloud.it.Context.getInstance().getRestR... |
protected void setOthersVisible(boolean visible) {
if ((linearLayoutBall) != null) {
linearLayoutBall.setVisibility((visible ? android.view.View.VISIBLE : android.view.View.INVISIBLE));
}
if ((gridViewPrize) != null) {
gridViewPrize.setVisibility((visible ? android.view.View.VISIBLE : androi... | protected void setOthersVisible(boolean visible) {
if ((linearLayoutBall) != null) {
linearLayoutBall.setVisibility((visible ? android.view.View.VISIBLE : android.view.View.INVISIBLE));
}
if ((gridViewPrize) != null) {
gridViewPrize.setVisibility((visible ? android.view.View.VISIBLE : androi... |
private void checkSingleCollapseMode(int currCollapsedParentPosition) {
if ((mExpandCollapseMode.mode) != (com.github.huajianjiang.expandablerecyclerview.widget.ExpandableAdapter.ExpandCollapseMode.MODE_SINGLE_COLLAPSE))
return ;
final int lastCollapsedPosition = mExpandCollapseMode.lastCollapsedPo... | private void checkSingleCollapseMode(int currCollapsedParentPosition) {
if ((mExpandCollapseMode.mode) != (com.github.huajianjiang.expandablerecyclerview.widget.ExpandableAdapter.ExpandCollapseMode.MODE_SINGLE_COLLAPSE))
return ;
final int lastCollapsedPosition = mExpandCollapseMode.lastCollapsedPo... |
private void prepareChunk() {
bufferSize = java.lang.Math.min(BUFFER_SIZE, ((fileLength) - 1));
try {
final java.nio.ByteBuffer byteBuffer = channel.map(java.nio.channels.FileChannel.MapMode.READ_ONLY, 0, bufferSize);
chunkChrBuf = textReader.TextReaderImpl.CHARSET.decode(byteBuffer);
} catc... | private void prepareChunk() {
bufferSize = java.lang.Math.min(BUFFER_SIZE, fileLength);
try {
final java.nio.ByteBuffer byteBuffer = channel.map(java.nio.channels.FileChannel.MapMode.READ_ONLY, 0, bufferSize);
chunkChrBuf = textReader.TextReaderImpl.CHARSET.decode(byteBuffer);
} catch (java.... |
public com.insframe.server.model.Task findTaskById(java.lang.String assignmentId, java.lang.String taskId, java.lang.Boolean addAttachmentDetails) throws com.insframe.server.error.AssignmentAccessException, com.insframe.server.error.AssignmentStorageException, com.insframe.server.error.UserAccessException {
com.ins... | public com.insframe.server.model.Task findTaskById(java.lang.String assignmentId, java.lang.String taskId, java.lang.Boolean addAttachmentDetails) throws com.insframe.server.error.AssignmentAccessException, com.insframe.server.error.AssignmentStorageException, com.insframe.server.error.UserAccessException {
com.ins... |
private java.util.Map<no.uio.ifi.qure.Block, no.uio.ifi.qure.Block> getSplitBlocks(no.uio.ifi.qure.Block b) {
java.util.Map<no.uio.ifi.qure.Block, no.uio.ifi.qure.Block> m = new java.util.HashMap<no.uio.ifi.qure.Block, no.uio.ifi.qure.Block>();
int n = evenSplits.size();
for (no.uio.ifi.qure.Block block : e... | private java.util.Map<no.uio.ifi.qure.Block, no.uio.ifi.qure.Block> getSplitBlocks(no.uio.ifi.qure.Block b) {
java.util.Map<no.uio.ifi.qure.Block, no.uio.ifi.qure.Block> m = new java.util.HashMap<no.uio.ifi.qure.Block, no.uio.ifi.qure.Block>();
for (no.uio.ifi.qure.Block block : evenSplits.keySet()) {
i... |
public static void addRecipe(minetweaker.api.item.IItemStack output, minetweaker.api.item.IIngredient input1, int ticktime, int euTick) {
net.minecraft.item.ItemStack oInput1 = ((net.minecraft.item.ItemStack) (techreborn.compat.minetweaker.MinetweakerCompat.toObject(input1)));
techreborn.api.recipe.machines.Pla... | public static void addRecipe(minetweaker.api.item.IItemStack output, minetweaker.api.item.IIngredient input1, int ticktime, int euTick) {
net.minecraft.item.ItemStack oInput1 = ((net.minecraft.item.ItemStack) (techreborn.compat.minetweaker.MinetweakerCompat.toObject(input1)));
techreborn.api.recipe.machines.Pla... |
public java.lang.String getFilm(java.lang.String title) {
java.util.ArrayList<java.util.Map<java.lang.String, java.lang.Object>> result;
try {
result = sqlManager.callStoredProcedure((("get_film_by_title(" + title) + ")"));
} catch (java.sql.SQLException e) {
java.lang.System.err.println(e.g... | public java.lang.String getFilm(java.lang.String title) {
java.util.ArrayList<java.util.Map<java.lang.String, java.lang.Object>> result = null;
try {
result = sqlManager.callStoredProcedure((("get_film_by_title(" + title) + ")"));
java.util.Map<java.lang.String, java.lang.Object> filmMap = resul... |
private void resizeImages() {
org.wordpress.android.ui.reader.utils.ReaderHtmlUtils.HtmlScannerListener imageListener = new org.wordpress.android.ui.reader.utils.ReaderHtmlUtils.HtmlScannerListener() {
@java.lang.Override
public void onTagFound(java.lang.String imageTag, java.lang.String imageUrl) {... | private void resizeImages(java.lang.String content) {
org.wordpress.android.ui.reader.utils.ReaderHtmlUtils.HtmlScannerListener imageListener = new org.wordpress.android.ui.reader.utils.ReaderHtmlUtils.HtmlScannerListener() {
@java.lang.Override
public void onTagFound(java.lang.String imageTag, java... |
public com.speearth.model.core.Impiegato login(java.lang.String username, java.lang.String password) {
com.speearth.model.core.Impiegato utente = com.speearth.model.core.AgenziaFacade.getInstance().getRegistroImpiegati().cercaImpiegatoDaUsername(username);
if (utente.getPassword().equals(password)) {
co... | public com.speearth.model.core.Impiegato login(java.lang.String username, java.lang.String password) {
com.speearth.model.core.Impiegato utente = com.speearth.model.core.AgenziaFacade.getInstance().getRegistroImpiegati().cercaImpiegatoDaUsername(username);
if ((utente != null) && (utente.getPassword().equals(pa... |
public void onClick(android.view.View v) {
if (menuOnlineDatabase.checkUsername(txtUsernameRegister.getText().toString())) {
menuOnlineDatabase.insertUser(txtUsernameRegister.getText().toString(), txtPasswordRegister.getText().toString());
android.widget.Toast.makeText(this, "Dang ky thanh cong", To... | public void onClick(android.view.View v) {
if (menuOnlineDatabase.checkUsername(txtUsernameRegister.getText().toString())) {
menuOnlineDatabase.insertUser(txtUsernameRegister.getText().toString(), txtPasswordRegister.getText().toString());
android.widget.Toast.makeText(this, "Dang ky thanh cong", To... |
private void resetTimer() {
java.util.TimerTask timerTask = new java.util.TimerTask() {
@java.lang.Override
public void run() {
flushEventBatch(eventBatch);
}
};
if ((timer) != null) {
timer.cancel();
timer.purge();
}
timer = new java.util.Timer();... | public void resetTimer() {
java.util.TimerTask timerTask = new java.util.TimerTask() {
@java.lang.Override
public void run() {
flushEventBatch(eventBatch);
}
};
if ((timer) != null) {
timer.cancel();
timer.purge();
}
timer = new java.util.Timer();
... |
private void computeTop100RecordID() {
java.util.Iterator<logdruid.data.record.RecordingItem> rIIte = recordingItem.iterator();
top100Index = -1;
int count = 0;
while ((rIIte.hasNext()) && ((top100Index) == (-1))) {
if (rIIte.next().getProcessingType().equals("top100")) {
top100Index... | private void computeTop100RecordID() {
if ((recordingItem) != null) {
java.util.Iterator<logdruid.data.record.RecordingItem> rIIte = recordingItem.iterator();
top100Index = -1;
int count = 0;
while ((rIIte.hasNext()) && ((top100Index) == (-1))) {
if (rIIte.next().getProce... |
private java.util.Collection filterByAdjacentAndVisitArea(java.util.Collection collection) {
java.util.ArrayList<com.example.nickozoulis.teamproj.domain.Referee> refs = ((java.util.ArrayList<com.example.nickozoulis.teamproj.domain.Referee>) (collection));
java.util.ArrayList<com.example.nickozoulis.teamproj.dom... | private java.util.Collection filterByAdjacentAndVisitArea(java.util.Collection collection) {
java.util.Set<com.example.nickozoulis.teamproj.domain.Referee> refs = ((java.util.HashSet<com.example.nickozoulis.teamproj.domain.Referee>) (collection));
java.util.Set<com.example.nickozoulis.teamproj.domain.Referee> f... |
public void onCreate() {
super.onCreate();
cn.xueximiao.tv.activity.MeowApplication.context = getApplicationContext();
io.vov.vitamio.Vitamio.isInitialized(cn.xueximiao.tv.activity.MeowApplication.context);
x.Ext.init(this);
cn.xueximiao.tv.activity.MeowApplication.initImageLoader(this);
com.orh... | public void onCreate() {
super.onCreate();
cn.xueximiao.tv.activity.MeowApplication.context = getApplicationContext();
io.vov.vitamio.Vitamio.isInitialized(cn.xueximiao.tv.activity.MeowApplication.context);
x.Ext.init(this);
cn.xueximiao.tv.activity.MeowApplication.initImageLoader(this);
com.orh... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.