buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public static java.time.ZonedDateTime updateDateTime(java.time.ZonedDateTime value, float range) {
range = (range != 0) ? range : 10;
float days = org.pipservices.commons.random.RandomFloat.nextFloat((-range), range);
return value.plusDays(((int) (days)));
} | public static java.time.ZonedDateTime updateDateTime(java.time.ZonedDateTime value, float range) {
range = (range != 0) ? range : 10;
if (range < 0)
return value;
float days = org.pipservices.commons.random.RandomFloat.nextFloat((-range), range);
return value.plusDays(((int) (days)));
} |
public com.google.gson.JsonElement view(java.lang.Object obj, java.lang.Class<?> objectClass, java.lang.Class<? extends pt.ist.bennu.json.JsonViewer> jsonViewerClass) {
if ((obj == null) || (objectClass == null)) {
return null;
}
if (java.util.Collection.class.isAssignableFrom(objectClass)) {
... | public com.google.gson.JsonElement view(java.lang.Object obj, java.lang.Class<?> objectClass, java.lang.Class<? extends pt.ist.bennu.json.JsonViewer> jsonViewerClass) {
if (objectClass == null) {
return null;
}
if (java.util.Collection.class.isAssignableFrom(objectClass)) {
return views(((ja... |
public void channelInactive(final io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception {
super.channelInactive(ctx);
org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractOutboundQueueManager.LOG.debug("Channel {} initiating shutdown...", ctx.channel());
shuttingDown = true;
... | public void channelInactive(final io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception {
super.channelInactive(ctx);
org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractOutboundQueueManager.LOG.debug("Channel {} initiating shutdown...", ctx.channel());
shuttingDown = true;
... |
public boolean isEditable() {
switch (getWPUmsatzArt()) {
case Payout :
case DivIn :
case OthrInc :
case IntrInc :
case Ausgabe :
isEditable = true;
break;
case Verkauf :
case WP_Entnahme :
isEditable = checkDeleteSharesOut(... | public boolean isEditable() {
if ((isEditable) == null) {
switch (getWPUmsatzArt()) {
case Payout :
case DivIn :
case OthrInc :
case IntrInc :
case Ausgabe :
isEditable = true;
break;
case Verkauf :
... |
private void saveNonSharedSettings() {
sharedConfigMaster = org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences.getSharedConfigMaster();
sharedConfigFolder = org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences.getSharedConfigFolder();
mode = org.sleuthkit.autops... | private void saveNonSharedSettings() {
sharedConfigMaster = org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences.getSharedConfigMaster();
sharedConfigFolder = org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences.getSharedConfigFolder();
displayLocalTime = org.sleu... |
protected boolean parseMsg(java.lang.String subject, java.lang.String body, net.anei.cadpage.parsers.MsgInfo.Data data) {
if (parseMsg3(body, data))
return true;
if (parseMsg2(body, data))
return true;
if (parseMsg1(subject, body, data))
return true;
return false;
... | protected boolean parseMsg(java.lang.String subject, java.lang.String body, net.anei.cadpage.parsers.MsgInfo.Data data) {
if (parseMsg3(body, data))
return true;
if (parseMsg1(subject, body, data))
return true;
if (parseMsg2(body, data))
return true;
return false;
... |
private void handleMessage(com.gboxsw.miniac.gateways.exec.Message message) {
java.lang.String[] topicHierarchy = com.gboxsw.miniac.gateways.exec.Application.parseTopicHierarchy(message.getTopic());
java.lang.String commandId = topicHierarchy[2];
java.lang.String output = message.getContent();
com.gboxs... | private void handleMessage(com.gboxsw.miniac.gateways.exec.Message message) {
java.lang.String[] topicHierarchy = com.gboxsw.miniac.gateways.exec.Application.parseTopicHierarchy(message.getTopic());
java.lang.String commandId = topicHierarchy[2];
java.lang.String output = message.getContent();
com.gboxs... |
public void update(float delta) {
velocity.add(acceleration.cpy().scl(delta));
if ((velocity.y) > 200) {
velocity.y = 200;
}
java.lang.System.out.println(velocity.x);
position.add(velocity.cpy().scl(delta));
} | public void update(float delta) {
velocity.add(acceleration.cpy().scl(delta));
if ((velocity.y) > 200) {
velocity.y = 200;
}
position.add(velocity.cpy().scl(delta));
} |
private Text.Builder applyArg(org.spongepowered.api.text.TextElement param, org.spongepowered.api.text.TextTemplate.Arg arg, @javax.annotation.Nullable
org.spongepowered.api.text.Text.Builder builder) {
org.spongepowered.api.text.Text.Builder wrapper = org.spongepowered.api.text.Text.builder().format(arg.format);
... | private Text.Builder applyArg(org.spongepowered.api.text.TextElement param, org.spongepowered.api.text.TextTemplate.Arg arg, @javax.annotation.Nullable
org.spongepowered.api.text.Text.Builder builder) {
if (builder == null) {
builder = org.spongepowered.api.text.Text.builder();
}
org.spongepowered.a... |
private static void maybeStoreSymlink(com.google.devtools.build.lib.vfs.PathFragment linkName, com.google.devtools.build.lib.vfs.PathFragment linkTarget, java.lang.String metadata, com.google.devtools.build.lib.vfs.PathFragment destPath, java.util.Set<java.lang.String> exclusions, java.util.Map<com.google.devtools.buil... | private static void maybeStoreSymlink(com.google.devtools.build.lib.vfs.PathFragment linkName, com.google.devtools.build.lib.vfs.PathFragment linkTarget, java.lang.String metadata, com.google.devtools.build.lib.vfs.PathFragment destPath, java.util.Map<com.google.devtools.build.lib.vfs.PathFragment, com.google.devtools.... |
public E next() {
if (!(hasNext())) {
throw new java.util.NoSuchElementException();
}
E next = ((E) (arr[pos]));
if (!(hasNext())) {
(obsList.msgCount)--;
}
return next;
} | public E next() {
if (!(hasNext())) {
throw new java.util.NoSuchElementException();
}
E next = ((E) (arr[((pos)++)]));
if (!(hasNext())) {
(obsList.msgCount)--;
}
return next;
} |
public java.lang.String getString() {
java.lang.String str = "";
for (int i = 0; i < (current.length); i++) {
for (int j = 0; j < (current[i].length); j++) {
str += java.lang.String.valueOf(current[i][j]);
java.lang.System.out.print(((current[i][j]) + " "));
}
jav... | public java.lang.String getString() {
java.lang.String str = "";
for (int i = 0; i < (current.length); i++) {
for (int j = 0; j < (current[i].length); j++) {
str += java.lang.String.valueOf(current[i][j]);
}
}
return str;
} |
private static void testOneSetup(int whiteLVL, int blackLVL, int howManyBoards) {
long start = java.lang.System.currentTimeMillis();
java.lang.System.out.println(OptimizationMain.getEstimationOfProcessLength((2 * howManyBoards), whiteLVL, blackLVL));
MatchMaker referee = new MatchMaker(whiteLVL, AI.AI.bestP... | private static void testOneSetup(int whiteLVL, int blackLVL, int howManyBoards) {
long start = java.lang.System.currentTimeMillis();
java.lang.System.out.println(OptimizationMain.getEstimationOfProcessLength((2 * howManyBoards), whiteLVL, blackLVL));
MatchMaker referee = new MatchMaker(whiteLVL, AI.AI.bestP... |
javafx.util.Pair<java.lang.Integer, java.lang.Integer> tick() {
currentTime += SIM_SPEED;
generatePackets();
for (com.damianhxy.Edge_ACO edge : edgeList) {
if (edge.isOffline)
continue;
processEdge(edge);
}
for (com.damianhxy.Node_EACO node : nodes) {
if ... | javafx.util.Pair<java.lang.Integer, java.lang.Integer> tick() {
++(currentTime);
generatePackets();
for (com.damianhxy.Edge_ACO edge : edgeList) {
if (edge.isOffline)
continue;
processEdge(edge);
}
for (com.damianhxy.Node_EACO node : nodes) {
if (node.isO... |
public void setModeDehumid(boolean modeDehumid) {
int mask = 1 << 1;
int tempRegister = getPanelStatus(room);
int tempBackRegister = getPanelBackupStatus(room);
if (modeDehumid) {
tempRegister |= mask;
tempBackRegister |= mask;
}else {
mask = ~mask;
mask &= 255;
... | public void setModeDehumid(boolean modeDehumid) {
final int mask = 1 << 1;
int tempRegister = getPanelStatus(room);
int tempBackRegister = getPanelBackupStatus(room);
if (modeDehumid) {
tempRegister |= mask;
tempBackRegister |= mask;
}else {
tempRegister &= mask;
temp... |
public void onSpawningComplete(net.minecraft.entity.EntityLivingBase entity) {
java.lang.String oldTag = entity.getEntityData().getString(atomicstryker.infernalmobs.common.InfernalMobsCore.instance().getNBTTag());
if (!(oldTag.equals(getLinkedModNameUntranslated()))) {
java.lang.System.out.printf("Infer... | public void onSpawningComplete(net.minecraft.entity.EntityLivingBase entity) {
java.lang.String oldTag = entity.getEntityData().getString(atomicstryker.infernalmobs.common.InfernalMobsCore.instance().getNBTTag());
if ((!(oldTag.isEmpty())) && (!(oldTag.equals(getLinkedModNameUntranslated())))) {
java.la... |
public void solve(Node pine) {
Node next;
while (someNodesNotPassed()) {
solution.add(pine);
pine.setPassed(true);
next = findNearestTo(pine);
dist += pine.distanceTo(next);
java.lang.System.out.println(dist);
pine = next;
}
dist += pine.distanceTo(firstN... | public void solve(Node pine) {
Node next;
while (someNodesNotPassed()) {
solution.add(pine);
pine.setPassed(true);
next = findNearestTo(pine);
dist += pine.distanceTo(next);
pine = next;
}
dist += pine.distanceTo(firstNode);
} |
public com.rockson.servletplus.ParamValidator notEmpty(java.lang.String... tip) {
if (((this.goOn) && (null != (this.value))) && (!("".equals(this.value)))) {
this.addError(java.lang.String.format("%s can not be empty.", name), tip);
}
return this;
} | public com.rockson.servletplus.ParamValidator notEmpty(java.lang.String... tip) {
if (((this.goOn) && (null == (this.value))) && ("".equals(this.value))) {
this.addError(java.lang.String.format("%s can not be empty.", name), tip);
}
return this;
} |
public static java.util.Calendar getNewInstanceZeroedCalendarForTimezone(java.util.TimeZone timeZone) {
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.setTimeZone(timeZone);
cal.set(java.util.Calendar.HOUR_OF_DAY, 0);
cal.set(java.util.Calendar.MINUTE, 0);
cal.set(java.util.Calendar.... | public static java.util.Calendar getNewInstanceZeroedCalendarForTimezone(java.util.TimeZone timeZone) {
java.util.Calendar cal = java.util.Calendar.getInstance(timeZone);
cal.set(java.util.Calendar.HOUR_OF_DAY, 0);
cal.set(java.util.Calendar.MINUTE, 0);
cal.set(java.util.Calendar.SECOND, 0);
cal.set... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
android.widget.TextView textLog = ((android.widget.TextView) (findViewById(R.id.textView1)));
jp.ksksue.driver.serial.FTDriver driver = new jp.ksksue.driver.serial.... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textLog = ((android.widget.TextView) (findViewById(R.id.textView1)));
jp.ksksue.driver.serial.FTDriver driver = new jp.ksksue.driver.serial.FTDriver(((android.hardw... |
protected void onPostExecute(java.util.List<java.util.Map<java.lang.String, java.lang.Object>> result) {
super.onPostExecute(result);
datas.clear();
datas.addAll(result);
mAdapter.notifyDataSetChanged();
mSwipeRefreshLayout.setRefreshing(false);
mSwipeRefreshLayout.setEnabled(true);
} | protected void onPostExecute(java.util.List<java.util.Map<java.lang.String, java.lang.Object>> result) {
super.onPostExecute(result);
mSwipeRefreshLayout.setEnabled(true);
mSwipeRefreshLayout.setRefreshing(false);
datas.clear();
datas.addAll(result);
mAdapter.notifyDataSetChanged();
} |
private static void getDriftingPositions(final float speed, final int driftTime, final float startXPosition, final int startSize, final float[] xPositions) {
float xMoved = 0;
for (int i = startSize; i < (startSize + driftTime); i++) {
xMoved += MarioAI.marioMovement.MarioControls.getNextDriftingDistanc... | private static void getDriftingPositions(final float speed, final int driftTime, final float startXPosition, final int startSize, final float[] xPositions) {
float xMoved = 0;
for (int i = startSize; i < (startSize + driftTime); i++) {
xMoved += MarioAI.marioMovement.MarioControls.getNextDriftingDistanc... |
public void testAddInvoice_shouldFailWithNegativeGrossAmount() throws com.at.ac.tuwien.sepm.ss15.edulium.domain.validation.ValidationException, com.at.ac.tuwien.sepm.ss15.edulium.service.ServiceException {
com.at.ac.tuwien.sepm.ss15.edulium.domain.Invoice invoice = new com.at.ac.tuwien.sepm.ss15.edulium.domain.Invo... | public void testAddInvoice_shouldFailWithNegativeGrossAmount() throws com.at.ac.tuwien.sepm.ss15.edulium.domain.validation.ValidationException, com.at.ac.tuwien.sepm.ss15.edulium.service.ServiceException {
com.at.ac.tuwien.sepm.ss15.edulium.domain.Invoice invoice = new com.at.ac.tuwien.sepm.ss15.edulium.domain.Invo... |
public static boolean isNetworkAvailable(android.content.Context context) {
android.net.ConnectivityManager connectivityManager = ((android.net.ConnectivityManager) (context.getSystemService(Context.CONNECTIVITY_SERVICE)));
android.net.NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
... | public static boolean isNetworkAvailable(android.content.Context context) {
if (context == null)
return false;
android.net.ConnectivityManager connectivityManager = ((android.net.ConnectivityManager) (context.getSystemService(Context.CONNECTIVITY_SERVICE)));
android.net.NetworkInfo activeNetwor... |
private void removeLastFrame() {
me.enerccio.sp.interpret.FrameObject o = this.currentFrame.removeLast();
if ((o.parentFrame) != null) {
o.parentFrame.returnHappened = o.returnHappened;
o.parentFrame.stack.add(o);
}else {
if ((currentFrame.size()) == 0)
throw new me.enerc... | private void removeLastFrame() {
me.enerccio.sp.interpret.FrameObject o = this.currentFrame.removeLast();
if ((o.parentFrame) != null) {
o.parentFrame.returnHappened = o.returnHappened;
o.parentFrame.stack.add(o);
}else {
if ((currentFrame.size()) == 0) {
if ((o.exception... |
private void stopped() {
com.couchbase.lite.util.Log.d(Log.TAG_CHANGE_TRACKER, "%s: Change tracker in stopped()", this);
if ((client) != null) {
com.couchbase.lite.util.Log.d(Log.TAG_CHANGE_TRACKER, "%s: Change tracker calling changeTrackerStopped, client: %s", this, client);
client.changeTracke... | private void stopped() {
com.couchbase.lite.util.Log.d(Log.TAG_CHANGE_TRACKER, "%s: Change tracker in stopped()", this);
running = false;
if ((client) != null) {
com.couchbase.lite.util.Log.d(Log.TAG_CHANGE_TRACKER, "%s: Change tracker calling changeTrackerStopped, client: %s", this, client);
... |
public Item removeFirst() {
if (isEmpty())
throw new java.util.NoSuchElementException("sorry can't remove from an empty deque");
Item item = firstP.item;
if ((firstP.nxt) == (lastP)) {
firstP.item = null;
}else {
firstP = firstP.nxt;
}
len -= 1;
return item;
} | public Item removeFirst() {
if (isEmpty())
throw new java.util.NoSuchElementException("sorry can't remove from an empty deque");
Item item = firstP.item;
if ((firstP.nxt) == (lastP)) {
}else {
firstP = firstP.nxt;
}
len -= 1;
return item;
} |
public boolean hasNext() {
if (exhausted_) {
return false;
}
if (((batchIterator_) != null) && (batchIterator_.hasNext())) {
return true;
}else {
updateCurrentBatch();
return !(exhausted_);
}
} | public boolean hasNext() {
if (((batchIterator_) != null) && (batchIterator_.hasNext())) {
return true;
}
if (exhausted_) {
return false;
}else {
updateCurrentBatch();
return ((batchIterator_) != null) && (batchIterator_.hasNext());
}
} |
public void completed(final org.eclipse.californium.core.network.Exchange exchange) {
if ((exchange.getOrigin()) == (Exchange.Origin.LOCAL)) {
org.eclipse.californium.core.network.Exchange.KeyToken idByToken = Exchange.KeyToken.fromOutboundMessage(exchange.getCurrentRequest());
exchangeStore.remove(... | public void completed(final org.eclipse.californium.core.network.Exchange exchange) {
if ((exchange.getOrigin()) == (Exchange.Origin.LOCAL)) {
org.eclipse.californium.core.network.Exchange.KeyToken idByToken = Exchange.KeyToken.fromOutboundMessage(exchange.getCurrentRequest());
exchangeStore.remove(... |
public void expandItem(int position, com.jiebademo.MainAdapter.ViewHolder viewHolder) {
if (((currentExpandedItem) != (com.jiebademo.MainAdapter.NONE)) && ((currentExpandedViewHolder) != null)) {
collapseItem(viewHolder);
}
currentExpandedItem = position;
currentExpandedViewHolder = viewHolder;
... | public void expandItem(int position, com.jiebademo.MainAdapter.ViewHolder viewHolder) {
if (((currentExpandedItem) != (com.jiebademo.MainAdapter.NONE)) && ((currentExpandedViewHolder) != null)) {
collapseItem(currentExpandedViewHolder);
}
currentExpandedItem = position;
currentExpandedViewHolder... |
public void update(float dt) {
world.step((1 / 60.0F), 6, 2);
handleInput(dt);
gamecam.update();
renderer.setView(gamecam);
b2dr.render(world, gamecam.combined);
} | public void update(float dt) {
handleInput(dt);
world.step((1 / 60.0F), 6, 2);
gamecam.update();
renderer.setView(gamecam);
b2dr.render(world, gamecam.combined);
} |
private void updateAll() {
if ((mPlayerService) != null) {
android.util.Log.d("playlist", ("hasplaylist " + (org.oucho.musicplayer.PlayerService.hasPlaylist())));
updateQueue();
updateTrackInfo();
setButtonDrawable();
if (org.oucho.musicplayer.PlayerService.isPlaying()) {
... | private void updateAll() {
if ((mPlayerService) != null) {
updateQueue();
updateTrackInfo();
setButtonDrawable();
if (org.oucho.musicplayer.PlayerService.isPlaying()) {
mHandler.post(mUpdateSeekBarRunnable);
}
updateShuffleButton();
updateRepeatBut... |
public boolean equals(java.lang.Object o) {
if (o == (this)) {
return true;
}
if (o instanceof com.github.mzule.activityrouter.router.Mapping) {
com.github.mzule.activityrouter.router.Mapping that = ((com.github.mzule.activityrouter.router.Mapping) (o));
return that.format.equals(((c... | public boolean equals(java.lang.Object o) {
if (o == (this)) {
return true;
}
if (o instanceof com.github.mzule.activityrouter.router.Mapping) {
com.github.mzule.activityrouter.router.Mapping that = ((com.github.mzule.activityrouter.router.Mapping) (o));
return format.equals(that.for... |
public pl.edu.icm.jlargearrays.LogicLargeArray not() {
pl.edu.icm.jlargearrays.LogicLargeArray out = new pl.edu.icm.jlargearrays.LogicLargeArray(length, false);
for (long i = 0; i < (length); i++) {
out.setByte(i, ((byte) (~(getByte(i)))));
}
return out;
} | public pl.edu.icm.jlargearrays.LogicLargeArray not() {
pl.edu.icm.jlargearrays.LogicLargeArray out = new pl.edu.icm.jlargearrays.LogicLargeArray(length, false);
for (long i = 0; i < (length); i++) {
out.setByte(i, ((byte) (1 - (getByte(i)))));
}
return out;
} |
public void tsLintPathSetting_definedAppropriately() {
org.sonar.api.Property property = findPropertyByName(TypeScriptPlugin.SETTING_TS_LINT_PATH);
assertEquals(PropertyType.STRING, property.type());
assertEquals("", property.defaultValue());
assertEquals(false, property.project());
assertEquals(tru... | public void tsLintPathSetting_definedAppropriately() {
org.sonar.api.Property property = findPropertyByName(TypeScriptPlugin.SETTING_TS_LINT_PATH);
assertEquals(PropertyType.STRING, property.type());
assertEquals("", property.defaultValue());
assertEquals(true, property.project());
assertEquals(true... |
public info.javaperformance.malloc.SingleThreadedBlock getBlock(final int requiredSize, final info.javaperformance.buckets.Buckets data) {
info.javaperformance.malloc.SingleThreadedBlock cur = getCurrentBlock(false, data);
if (!(cur.hasSpace(requiredSize))) {
cur.writeFinished();
cur = getCurren... | public info.javaperformance.malloc.SingleThreadedBlock getBlock(final int requiredSize, final info.javaperformance.buckets.Buckets data) {
info.javaperformance.malloc.SingleThreadedBlock cur = getCurrentBlock(false, data, requiredSize);
if (!(cur.hasSpace(requiredSize))) {
cur.writeFinished();
c... |
public void removeMiddle() {
swingGUI.DoubleNode temp = current.getPrev();
current.getNext().setPrev(current.getPrev());
current.getPrev().setNext(current.getNext());
current.setNext(null);
current.setPrev(null);
current = temp;
} | public void removeMiddle() {
swingGUI.DoubleNode temp = current.getPrev();
current.getNext().setPrev(current.getPrev());
current.getPrev().setNext(current.getNext());
current.setNext(null);
current.setPrev(null);
current = temp;
(count)--;
} |
public bai4_rn.praktikum_01.command.ServerReply process() throws java.io.IOException {
bai4_rn.praktikum_01.client.ClientData clientData = bai4_rn.praktikum_01.command.CommandUtils.getClientData();
clientData.writeToServer(("EHLO " + (clientData.getHostname())));
java.lang.String serverReply = clientData.re... | public bai4_rn.praktikum_01.command.ServerReply process() throws java.io.IOException {
bai4_rn.praktikum_01.client.ClientData clientData = bai4_rn.praktikum_01.command.CommandUtils.getClientData();
clientData.writeToServer(("EHLO " + (clientData.getHostname())));
clientData.readFromServer();
java.lang.S... |
public static void initializePointer() {
com.piuucseditor.Pointer.row = 1;
com.piuucseditor.Chart.updatePointerView();
com.piuucseditor.Pointer.updateTexts();
android.widget.ScrollView scrollView = ((android.widget.ScrollView) (com.piuucseditor.Pointer.mainActivity.findViewById(R.id.rightScrollView)));
... | public static void initializePointer() {
com.piuucseditor.Pointer.row = 1;
com.piuucseditor.Chart.updatePointerView();
com.piuucseditor.Pointer.updateTexts();
android.widget.ScrollView scrollView = ((android.widget.ScrollView) (com.piuucseditor.Pointer.mainActivity.findViewById(R.id.rightScrollView)));
... |
public static org.genepattern.pipelines.ResponseJSON createModuleList(java.util.Vector<org.genepattern.data.pipeline.JobSubmission> jobs) {
org.genepattern.pipelines.ResponseJSON listObject = new org.genepattern.pipelines.ResponseJSON();
java.lang.Integer idCounter = 1;
for (org.genepattern.data.pipeline.Jo... | public static org.genepattern.pipelines.ResponseJSON createModuleList(java.util.Vector<org.genepattern.data.pipeline.JobSubmission> jobs) {
org.genepattern.pipelines.ResponseJSON listObject = new org.genepattern.pipelines.ResponseJSON();
java.lang.Integer idCounter = 0;
for (org.genepattern.data.pipeline.Jo... |
private void stopTimer() {
if ((((timer) == null) || ((viewPager) == null)) || (timer.isStopped)) {
s = $missing$;
return ;
}
viewPager.removeOnPageChangeListener(timer);
timer.removeCallbacksAndMessages(null);
timer.listener = null;
timer.isStopped = true;
} | private void stopTimer() {
if ((((timer) == null) || ((viewPager) == null)) || (timer.isStopped)) {
return ;
}
viewPager.removeOnPageChangeListener(timer);
timer.removeCallbacksAndMessages(null);
timer.listener = null;
timer.isStopped = true;
} |
public java.lang.Object getValueAt(int rowIndex, int columnIndex) {
com.sdoras.mods.wow.manager.WowMod mod = ((com.sdoras.mods.wow.manager.WowMod) (this.mModManager.getManagedMods().get(rowIndex)));
if (columnIndex == 0)
return this.mModManager.isModActive(mod);
if (columnIndex == 1)
re... | public java.lang.Object getValueAt(int rowIndex, int columnIndex) {
com.sdoras.mods.wow.manager.WowMod mod = ((com.sdoras.mods.wow.manager.WowMod) (this.mModManager.getManagedMods().get(rowIndex)));
if (columnIndex == 0)
return this.mModManager.isModActive(mod);
if (columnIndex == 1)
re... |
public static boolean userExists(java.sql.Connection connection, pl.tripper.bean.User user) throws java.sql.SQLException {
try {
connection = pl.tripper.connection.MySQLConnUtils.getMySQLConnection();
user = pl.tripper.util.DBUtils.findUser(connection, user.getUserName());
if (user != null)
... | public static boolean userExists(java.sql.Connection connection, pl.tripper.bean.User user) throws java.sql.SQLException {
try {
connection = pl.tripper.connection.MySQLConnUtils.getMySQLConnection();
user = pl.tripper.util.DBUtils.findUser(connection, user.getUserName());
if (user != null)
... |
public void handle(server.Conversation conversation) {
if (conversation.getRequestedURI().startsWith("/docent/absentienoteren/lessen")) {
java.lang.System.out.println("test0");
lessenOphalen(conversation);
}else
if (conversation.getRequestedURI().startsWith("/docent/absentienoteren/ophal... | public void handle(server.Conversation conversation) {
if (conversation.getRequestedURI().startsWith("/docent/absentienoteren/lessen")) {
lessenOphalen(conversation);
}else
if (conversation.getRequestedURI().startsWith("/docent/absentienoteren/ophalen")) {
ophalen(conversation);
... |
org.snpeff.interval.Transcript findTrFromLatest(org.snpeff.genBank.Feature fcds, org.snpeff.interval.Gene geneLatest, java.util.List<org.snpeff.interval.Transcript> trLatest) {
if (cdsMatchesGene(fcds, geneLatest)) {
for (org.snpeff.interval.Transcript tr : trLatest) {
if ((tr.getCds().isEmpty()... | org.snpeff.interval.Transcript findTrFromLatest(org.snpeff.genBank.Feature fcds, org.snpeff.interval.Gene geneLatest, java.util.List<org.snpeff.interval.Transcript> trLatest) {
if (trLatest == null)
return null;
if (cdsMatchesGene(fcds, geneLatest)) {
for (org.snpeff.interval.Transcript tr ... |
private int signatureOffset() {
return (((((1 + 1) + 4) + 2) + 32) + 8) + (useNQT() ? (8 + 8) + 32 : (4 + 4) + 8);
} | private int signatureOffset() {
return ((((((1 + 1) + 4) + 2) + 32) + (+8)) + 8) + (useNQT() ? (8 + 8) + 32 : (4 + 4) + 8);
} |
private void populateTrinkets() {
int currY = ((-5) * (Constants.SCREEN_HEIGHT)) / 4;
while (currY < 0) {
int xStart = ((int) ((java.lang.Math.random()) * ((Constants.SCREEN_WIDTH) - (tWidth))));
trinkets.add(new com.example.casier.coinjet.Trinket(tHeight, color, tWidth, currY));
currY +... | private void populateTrinkets() {
int currY = ((-5) * (Constants.SCREEN_HEIGHT)) / 4;
while (currY < 0) {
int xStart = ((int) ((java.lang.Math.random()) * ((Constants.SCREEN_WIDTH) - (tWidth))));
trinkets.add(new com.example.casier.coinjet.Trinket(xStart, currY, tWidth, tHeight, color));
... |
private boolean doAction(java.lang.String playersName) {
if ((playersName.length()) < 2) {
java.lang.System.out.println(("\nInvalid players name: " + "The name must be greater than one charater in length"));
return false;
}
slayergame.model.Player player = slayergame.control.GameControl.crea... | private boolean doAction(java.lang.String playersName) {
if ((playersName.length()) < 2) {
java.lang.System.out.println(("\nInvalid players name: " + "The name must be greater than one charater in length"));
return false;
}
slayergame.model.Player player = slayergame.control.GameControl.crea... |
private void throwExceptionIfCancelled(com.ichi2.async.Connection con) {
if (com.ichi2.async.Connection.getIsCancelled()) {
timber.log.Timber.i("Sync was cancelled");
publishProgress(con, R.string.sync_cancelled);
try {
mServer.finish();
} catch (com.ichi2.anki.exception.... | private void throwExceptionIfCancelled(com.ichi2.async.Connection con) {
if (com.ichi2.async.Connection.getIsCancelled()) {
timber.log.Timber.i("Sync was cancelled");
publishProgress(con, R.string.sync_cancelled);
try {
mServer.finish(true);
} catch (com.ichi2.anki.except... |
private void selectItem(int position) {
mCurrentSelectedPosition = position;
if ((mDrawerListView) != null) {
mDrawerListView.setItemChecked(position, true);
}
if ((mDrawerLayout) != null) {
mDrawerLayout.closeDrawer(mFragmentContainerView);
}
if ((mCallbacks) != null) {
... | public void selectItem(int position) {
mCurrentSelectedPosition = position;
if ((mDrawerListView) != null) {
mDrawerListView.setItemChecked(position, true);
}
if ((mDrawerLayout) != null) {
mDrawerLayout.closeDrawer(mFragmentContainerView);
}
if ((mCallbacks) != null) {
m... |
public android.view.View newView(android.content.Context context, android.database.Cursor cursor, android.view.ViewGroup parent) {
final android.view.LayoutInflater inflater = android.view.LayoutInflater.from(context);
android.view.View v = inflater.inflate(R.layout.journey_history_row, parent, false);
com.... | public android.view.View newView(android.content.Context context, android.database.Cursor cursor, android.view.ViewGroup parent) {
final android.view.LayoutInflater inflater = android.view.LayoutInflater.from(context);
com.markupartist.sthlmtraveling.provider.planner.JourneyQuery journeyQuery = com.markupartist... |
public void add(java.lang.String uuid, boolean registered) {
com.lenis0012.bukkit.ls.thread.Timeout.TimeoutData current = authList.putIfAbsent(uuid, new com.lenis0012.bukkit.ls.thread.Timeout.TimeoutData(uuid, registered));
notify(current);
org.bukkit.entity.Player player = org.bukkit.Bukkit.getPlayer(java.... | public void add(java.lang.String uuid, boolean registered) {
com.lenis0012.bukkit.ls.thread.Timeout.TimeoutData current = new com.lenis0012.bukkit.ls.thread.Timeout.TimeoutData(uuid, registered);
notify(current);
org.bukkit.entity.Player player = org.bukkit.Bukkit.getPlayer(java.util.UUID.fromString(uuid));... |
public com.netflix.config.PollResult poll(final boolean initial, final java.lang.Object checkPoint) {
final java.util.Map<java.lang.String, java.lang.Object> config = com.google.common.collect.Maps.newHashMap();
for (final java.lang.String path : getPaths()) {
try {
final com.nike.vault.clie... | public com.netflix.config.PollResult poll(final boolean initial, final java.lang.Object checkPoint) {
final java.util.Map<java.lang.String, java.lang.Object> config = com.google.common.collect.Maps.newHashMap();
for (final java.lang.String path : getPaths()) {
final com.nike.vault.client.model.VaultResp... |
public double StandardDeviation(java.util.ArrayList<java.lang.Long> l) {
double mean = Mean(l);
java.util.ArrayList<java.lang.Double> sd_list = new java.util.ArrayList<java.lang.Double>();
for (java.lang.Long val : l) {
sd_list.add(java.lang.Math.pow((val - mean), 2));
}
return java.lang.Mat... | public double StandardDeviation(java.util.ArrayList<java.lang.Long> l) {
double mean = Mean(l);
java.util.ArrayList<java.lang.Double> sd_list = new java.util.ArrayList<java.lang.Double>();
for (java.lang.Long val : l) {
if (val == null)
val = ((long) (0));
sd_list.add(ja... |
public int getAction(java.lang.Object caller) {
if ((ifLoaded) == false) {
ifLoaded = true;
return 0;
}else {
int randNumber = ((int) ((java.lang.Math.floor(((java.lang.Math.random()) * 2))) + 1));
if (randNumber == 1) {
return 1;
}else {
ifLoaded ... | public int getAction(java.lang.Object caller) {
if ((ifLoaded) == false) {
ifLoaded = true;
return 0;
}else {
int randNumber = ((int) ((java.lang.Math.floor(((java.lang.Math.random()) * 2))) + 1));
if (randNumber == 1) {
ifLoaded = false;
return 1;
... |
private void computeKeyboardStartXY() {
kpStartX = 0;
kpStartY = (drawableHeight) + (DRAWABLE_PADDING);
keyWidth = (getMeasuredWidth()) / (KEY_PAD_COLS);
keyHeight = ((getMeasuredHeight()) - ((drawableHeight) + (2 * (DRAWABLE_PADDING)))) / (KEY_PAD_ROWS);
initialiseKeyRects();
} | private void computeKeyboardStartXY() {
kpStartX = 0;
kpStartY = (drawableHeight) + (DRAWABLE_PADDING);
keyWidth = (getMeasuredWidth()) / (KEY_PAD_COLS);
keyHeight = ((getMeasuredHeight()) - ((drawableHeight) + (DRAWABLE_PADDING))) / (KEY_PAD_ROWS);
initialiseKeyRects();
} |
public void run() {
if ((mLeadInCounter) < (mLeadInText.length)) {
if (org.roundware.rwapp.RwSpeakActivity.D) {
android.util.Log.d(org.roundware.rwapp.RwSpeakActivity.TAG, (("displaying lead in text '" + (mLeadInText[((mLeadInCounter) - 1)])) + "'"));
}
mRecordingTimeText.setText... | public void run() {
if (((mLeadInCounter) > 0) && ((mLeadInCounter) < (mLeadInText.length))) {
if (org.roundware.rwapp.RwSpeakActivity.D) {
android.util.Log.d(org.roundware.rwapp.RwSpeakActivity.TAG, (("displaying lead in text '" + (mLeadInText[((mLeadInCounter) - 1)])) + "'"));
}
... |
public static com.nequissimus.library.os.OSystem getCurrentOs() {
final java.lang.String system = java.lang.System.getProperty("os.name").toLowerCase();
final com.nequissimus.library.os.OSystem[] values = com.nequissimus.library.os.OSystem.values();
for (final com.nequissimus.library.os.OSystem osystem : va... | public static com.nequissimus.library.os.OSystem getCurrentOs() {
final java.lang.String system = java.lang.System.getProperty("os.name").toLowerCase();
final com.nequissimus.library.os.OSystem[] values = com.nequissimus.library.os.OSystem.values();
for (final com.nequissimus.library.os.OSystem osystem : va... |
public void run() {
}
}, 1000);
android.util.Log.i("MainAct", "Waited a sec");
}
com.google.android.gms.maps.model.LatLng currLoc = new com.google.android.gms.maps.model.LatLng(mLastLocation.getLatitude(), mLastLocation.getLongitude());
locationsList.add(currLoc);
... | public void run() {
}
}, 1000);
}
com.google.android.gms.maps.model.LatLng currLoc = new com.google.android.gms.maps.model.LatLng(mLastLocation.getLatitude(), mLastLocation.getLongitude());
locationsList.add(currLoc);
return currLoc;
} |
public android.graphics.Bitmap blur(int radius) {
if (((mLastRadius) == radius) && ((mBlurredBitmap) != null)) {
return mBlurredBitmap;
}
this.mLastRadius = radius;
this.mRadius = radius;
if ((mOriginalBitmap) == null)
return null;
if ((mBlurredBitmap) != null)
mBlur... | public android.graphics.Bitmap blur(int radius) {
this.mRadius = radius;
if ((mOriginalBitmap) == null)
return null;
if (((mLastRadius) == radius) && ((mBlurredBitmap) != null)) {
this.mLastRadius = radius;
return mBlurredBitmap;
}
this.mLastRadius = radius;
if ((mBl... |
private static void writeAndRead(org.bouncycastle.crypto.tls.TlsProtocol writer, org.bouncycastle.crypto.tls.TlsProtocol reader, byte[] data, boolean fragment) throws java.io.IOException {
int dataSize = data.length;
writer.offerOutput(data, 0, dataSize);
org.bouncycastle.crypto.tls.test.TlsProtocolNonBlock... | private static void writeAndRead(org.bouncycastle.crypto.tls.TlsProtocol writer, org.bouncycastle.crypto.tls.TlsProtocol reader, byte[] data, boolean fragment) throws java.io.IOException {
int dataSize = data.length;
writer.offerOutput(data, 0, dataSize);
org.bouncycastle.crypto.tls.test.TlsProtocolNonBlock... |
public static void sleep(long ms, java.lang.String cause) {
try {
java.lang.String message = ("Need to sleep " + ms) + "ms";
if (!(org.apache.commons.lang3.StringUtils.isEmpty(cause))) {
message = ", cause: " + cause;
}
daaa.qdscraper.services.Console.println(message);
... | public static void sleep(long ms, java.lang.String cause) {
try {
java.lang.String message = ("Need to sleep " + ms) + "ms";
if (!(org.apache.commons.lang3.StringUtils.isEmpty(cause))) {
message = (message + ", cause: ") + cause;
}
daaa.qdscraper.services.Console.println(... |
public void stopEcho(android.view.View view) {
if ((!(supportRecording)) || (!(isPlaying))) {
return ;
}
com.google.sample.echo.MainActivity.stopPlay();
updateNativeAudioUI();
com.google.sample.echo.MainActivity.deleteSLBufferQueueAudioPlayer();
com.google.sample.echo.MainActivity.delete... | public void stopEcho(android.view.View view) {
if ((!(supportRecording)) || (!(isPlaying))) {
return ;
}
com.google.sample.echo.MainActivity.stopPlay();
updateNativeAudioUI();
com.google.sample.echo.MainActivity.deleteAudioRecorder();
com.google.sample.echo.MainActivity.deleteSLBufferQue... |
protected java.lang.Void doInBackground(java.lang.Void... params) {
android.database.sqlite.SQLiteDatabase db = com.vladimircvetanov.smartfinance.db.DBAdapter.helper.getWritableDatabase();
count[0] = db.delete(com.vladimircvetanov.smartfinance.db.DBAdapter.DbHelper.TABLE_NAME_FAVCATEGORIES, ((((com.vladimircvet... | protected java.lang.Void doInBackground(java.lang.Void... params) {
android.database.sqlite.SQLiteDatabase db = com.vladimircvetanov.smartfinance.db.DBAdapter.helper.getWritableDatabase();
count[0] = db.delete(com.vladimircvetanov.smartfinance.db.DBAdapter.DbHelper.TABLE_NAME_FAVCATEGORIES, ((((com.vladimircvet... |
public void testConvertSimpleTypes() {
assertParseTypeAndConvert("?").hasType(com.google.javascript.rhino.Token.ANY_TYPE);
assertParseTypeAndConvert("boolean").hasType(com.google.javascript.rhino.Token.BOOLEAN_TYPE);
assertParseTypeAndConvert("null").hasType(com.google.javascript.rhino.Token.NULL_TYPE);
... | public void testConvertSimpleTypes() {
assertParseTypeAndConvert("?").hasType(com.google.javascript.rhino.Token.ANY_TYPE);
assertParseTypeAndConvert("boolean").hasType(com.google.javascript.rhino.Token.BOOLEAN_TYPE);
assertParseTypeAndConvert("null").hasType(com.google.javascript.rhino.Token.NULL_TYPE);
... |
public static void main(java.lang.String[] args) throws ilog.concert.IloException, java.io.IOException {
psp.Instance instance = psp.Parser.lireInstance((((("Data" + (java.io.File.separator)) + "Instances") + (java.io.File.separator)) + "instance10.txt"), 4);
psp.Mip mip = new psp.Mip(instance);
mip.solve()... | public static void main(java.lang.String[] args) throws ilog.concert.IloException, java.io.IOException {
psp.Instance instance = psp.Parser.lireInstance((((("Data" + (java.io.File.separator)) + "Instances") + (java.io.File.separator)) + "instance10.txt"), 1);
psp.Mip mip = new psp.Mip(instance);
mip.solve()... |
public void init() {
climbL = hardwareMap.servo.get("ClimbL");
climbR = hardwareMap.servo.get("ClimbR");
rotorA = hardwareMap.dcMotor.get("RotorA");
rotorB = hardwareMap.dcMotor.get("RotorB");
driveL = hardwareMap.dcMotor.get("DriveL");
driveR = hardwareMap.dcMotor.get("DriveR");
hingeA = ha... | public void init() {
climbL = hardwareMap.servo.get("ClimbL");
climbR = hardwareMap.servo.get("ClimbR");
rotorA = hardwareMap.dcMotor.get("RotorA");
rotorB = hardwareMap.dcMotor.get("RotorB");
driveL = hardwareMap.dcMotor.get("DriveL");
driveR = hardwareMap.dcMotor.get("DriveR");
hingeA = ha... |
private void notifyChange(int pSelectedPoint, int pX, double pY) {
org.jwildfire.create.tina.base.Flame flame = owner.getOwner().getCurrFlame();
if (owner.isUseUndoManager()) {
owner.getOwner().undoManager.saveUndoPoint(flame);
}
org.jwildfire.create.tina.base.motion.MotionCurve curve = getCurve... | private void notifyChange(int pSelectedPoint, int pX, double pY) {
org.jwildfire.create.tina.base.Flame flame = owner.getOwner().getCurrFlame();
if (owner.isUseUndoManager()) {
owner.getOwner().undoManager.saveUndoPoint(flame);
}
org.jwildfire.create.tina.base.motion.MotionCurve curve = getCurve... |
public com.heitian.ssm.bo.Result addShopAd(javax.servlet.http.HttpServletRequest request, @org.springframework.web.bind.annotation.RequestParam
java.lang.String photoUrl, @org.springframework.web.bind.annotation.RequestParam
java.lang.Long price) {
java.lang.String auth = request.getHeader("Authorization");
if ... | public com.heitian.ssm.bo.Result addShopAd(javax.servlet.http.HttpServletRequest request, @org.springframework.web.bind.annotation.RequestParam
java.lang.String photoUrl, @org.springframework.web.bind.annotation.RequestParam
java.lang.Double price) {
java.lang.String auth = request.getHeader("Authorization");
i... |
public int getIntProp(java.lang.String propertyName) throws org.owasp.esapi.errors.ConfigurationException {
for (org.owasp.esapi.configuration.AbstractPrioritizedPropertyLoader loader : loaders) {
try {
return loader.getIntProp(propertyName);
} catch (org.owasp.esapi.errors.Configuration... | public int getIntProp(java.lang.String propertyName) throws org.owasp.esapi.errors.ConfigurationException {
for (org.owasp.esapi.configuration.AbstractPrioritizedPropertyLoader loader : loaders) {
try {
return loader.getIntProp(propertyName);
} catch (org.owasp.esapi.errors.Configuration... |
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_fitsy_main, container, false);
butterknife.ButterKnife.bind(this, rootView);
exerciseCourseItemList = new java.u... | public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_fitsy_main, container, false);
butterknife.ButterKnife.bind(this, rootView);
exerciseCourseItemList = new java.u... |
public void actionPerformed(java.awt.event.ActionEvent e) {
guiCon.editSubject(subject, nameT.getText(), shortNameT.getText(), teacherT.getText(), colorL.getBackground());
guiCon.displayPanel(guiCon.getManageSubjects().displaySubjects(de.privat.ciupka.schedule.controller.Controller.getInstance().loadAllSubjects... | public void actionPerformed(java.awt.event.ActionEvent e) {
if (guiCon.editSubject(subject, nameT.getText(), shortNameT.getText(), teacherT.getText(), colorL.getBackground())) {
guiCon.displayPanel(guiCon.getManageSubjects().displaySubjects(de.privat.ciupka.schedule.controller.Controller.getInstance().loadA... |
public double massBetween(java.lang.Integer start, java.lang.Integer end) {
end = java.lang.Math.min(end, ((n) - 1));
start = java.lang.Math.max(start, 0);
return ((end - start) + 1) / (n);
} | public double massBetween(java.lang.Integer start, java.lang.Integer end) {
if (end < start) {
return 0;
}else {
end = java.lang.Math.min(end, ((n) - 1));
start = java.lang.Math.max(start, 0);
return ((end - start) + 1) / (n);
}
} |
android.content.Intent intent = new android.content.Intent(getApplicationContext(), com.example.hvs.UpdateActivity.class);
intent.putExtra("liga", ligaNr);
intent.putExtra("update", 2);
intent.putExtra("liganame", this.getTitle());
startActivity(intent);
this.finish();
} | android.content.Intent intent = new android.content.Intent(getApplicationContext(), com.example.hvs.UpdateActivity.class);
intent.putExtra("liga", ligaNr);
intent.putExtra("update", 2);
intent.putExtra("liganame", this.getTitle());
this.finish();
startActivity(intent);
} |
private java.util.Set<com.globex.model.entity.common.RateRequirement> getRateRequirements(java.util.Set<com.globex.model.vo.common.RateRequirementDO> rateRequirementDOs, com.globex.model.entity.common.Country country) {
if ((rateRequirementDOs != null) && (!(rateRequirementDOs.isEmpty()))) {
java.util.Set<c... | private java.util.List<com.globex.model.entity.common.RateRequirement> getRateRequirements(java.util.List<com.globex.model.vo.common.RateRequirementDO> rateRequirementDOs, com.globex.model.entity.common.Country country) {
if ((rateRequirementDOs != null) && (!(rateRequirementDOs.isEmpty()))) {
java.util.Lis... |
public void setResult(java.util.List<com.yummyteam.fastcampus.forkit.model.Results> results) {
if ((results.size()) == 0) {
android.util.Log.e("getKeyWord", "result size = 0");
noSearch_content.setVisibility(View.VISIBLE);
}else {
elAdapter.removeallData();
android.util.Log.e("ge... | public void setResult(java.util.List<com.yummyteam.fastcampus.forkit.model.Results> results) {
elAdapter.removeallData();
if ((results.size()) == 0) {
android.util.Log.e("getKeyWord", "result size = 0");
noSearch_content.setVisibility(View.VISIBLE);
}else {
android.util.Log.e("getKey... |
private java.lang.String getProgressText() {
java.lang.String text = "";
if (!(isFinish)) {
if (!(isStop)) {
text = ("数据采集中" + (progress)) + "%";
}else {
text = "继续";
}
}else {
text = "数据采集完成";
}
return text;
} | private java.lang.String getProgressText() {
java.lang.String text = "";
if (!(isFinish)) {
if (!(isStop)) {
text = ("数据采集中" + (progress)) + "%";
}else {
text = "数据采集完成";
}
}else {
text = "数据采集完成";
}
return text;
} |
private org.joda.time.DateTime parseDate(int day, java.lang.Integer month, java.lang.Integer year, boolean end) {
return new org.joda.time.DateTime((year == null ? java.util.Calendar.getInstance().get(java.util.Calendar.YEAR) : year), (month == null ? java.util.Calendar.getInstance().get(java.util.Calendar.MONTH) :... | private org.joda.time.DateTime parseDate(int day, java.lang.Integer month, java.lang.Integer year, boolean end) {
return new org.joda.time.DateTime((year == null ? java.util.Calendar.getInstance().get(java.util.Calendar.YEAR) : year), (month == null ? (java.util.Calendar.getInstance().get(java.util.Calendar.MONTH))... |
public com.google.common.base.Optional<com.spotify.helios.auth.HeliosUser> authenticate(io.dropwizard.auth.basic.BasicCredentials credentials) throws io.dropwizard.auth.AuthenticationException {
final java.lang.String username = credentials.getUsername();
final java.lang.String password = credentials.getPasswor... | public com.google.common.base.Optional<com.spotify.helios.auth.HeliosUser> authenticate(io.dropwizard.auth.basic.BasicCredentials credentials) throws io.dropwizard.auth.AuthenticationException {
final java.lang.String username = credentials.getUsername();
final java.lang.String password = credentials.getPasswor... |
public boolean isInCheck() {
for (Piece enemy : this.opponentsPieces) {
if (!(enemy.isKing)) {
if (enemy.checkPossibleMoves().contains(Chess.board.spaces[this.getLY()][this.getLX()])) {
return true;
}
}
}
return false;
} | public boolean isInCheck() {
for (Piece enemy : this.opponentsPieces) {
if (!(enemy.isKing)) {
if (enemy.checkPossibleMoves().contains(Chess.board.spaces[this.getLY()][this.getLX()])) {
java.lang.System.out.println(enemy);
java.lang.System.out.println(this.opponen... |
public void afterTextChanged(android.text.Editable s) {
setting.setDailyTrafficLimitationAlarm(true);
java.lang.Long value = com.zohaltech.app.sigma.classes.TrafficUnitsUtil.MbToByte(java.lang.Integer.valueOf(edtDailyLimitationAlarm.getText().toString()));
setting.setDailyTrafficLimitation(value);
com.z... | public void afterTextChanged(android.text.Editable s) {
java.lang.Long value = 0L;
if ((edtDailyLimitationAlarm.getText().length()) != 0) {
value = com.zohaltech.app.sigma.classes.TrafficUnitsUtil.MbToByte(java.lang.Integer.valueOf(edtDailyLimitationAlarm.getText().toString()));
}
setting.setDai... |
public void signalFileNotFoundToUserInterface() {
java.lang.String path = org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric(13);
org.mockito.Mockito.when(fileLoader.load(path)).thenReturn(ZStory.NOT_FOUND);
memory.initialize(userInterface, path);
org.mockito.Mockito.verify(userInterface).fat... | public void signalFileNotFoundToUserInterface() {
java.lang.String path = org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric(13);
org.mockito.Mockito.when(fileLoader.load(path)).thenReturn(ZStory.NOT_FOUND);
memory.initialize(path);
org.mockito.Mockito.verify(userInterface).fatal((("Story fil... |
public void update(com.flurnamenpuzzle.generator.ui.Observable observable) {
com.flurnamenpuzzle.generator.ui.model.PuzzleGeneratorModel model = ((com.flurnamenpuzzle.generator.ui.model.PuzzleGeneratorModel) (observable));
com.flurnamenpuzzle.generator.ui.Steps currentStep = model.getCurrentStep();
java.lan... | public void update(com.flurnamenpuzzle.generator.ui.Observable observable) {
com.flurnamenpuzzle.generator.ui.model.PuzzleGeneratorModel model = ((com.flurnamenpuzzle.generator.ui.model.PuzzleGeneratorModel) (observable));
com.flurnamenpuzzle.generator.ui.Steps currentStep = model.getCurrentStep();
java.lan... |
public boolean isConditionMet() {
switch (this.conditionType) {
case SUPPLY :
return (self.supplyUsed()) >= ((this.conditionCount) * 2);
case BUILDING :
for (SCBot.Unit u : self.getUnits()) {
if ((u.getType()) == (this.conditionUnitType))
r... | public boolean isConditionMet() {
switch (this.conditionType) {
case SUPPLY :
return (this.self.supplyUsed()) >= ((this.conditionCount) * 2);
case BUILDING :
for (SCBot.Unit u : this.self.getUnits()) {
if ((u.getType()) == (this.conditionUnitType))
... |
public void onLoad() {
reportPanel.add(ueberSchrift1);
reportPanel.add(nutzerAboDropDown);
reportPanel.add(report2Generieren);
com.google.gwt.user.client.ui.RootPanel.get("content").clear();
com.google.gwt.user.client.ui.RootPanel.get("content").add(reportPanel);
report2Generieren.addClickHandle... | public void onLoad() {
reportPanel.add(ueberSchrift1);
reportPanel.add(nutzerAboDropDown);
reportPanel.add(report2Generieren);
com.google.gwt.user.client.ui.RootPanel.get("content").clear();
com.google.gwt.user.client.ui.RootPanel.get("content").add(reportPanel);
} |
private int getPermutation(acx.lam.HashMaglev16Balancer.CellState state) {
char c = state.row[state.nextPos];
if (c == 0) {
if ((state.nextPos) == 0) {
return state.offset;
}
int perm = ((state.last) + (state.skip)) % (mSizeLookup);
state.last = perm;
state.ro... | private int getPermutation(acx.lam.HashMaglev16Balancer.CellState state) {
char c = state.row[state.nextPos];
if (c == 0) {
if ((state.nextPos) == 0) {
return state.offset;
}
int perm = ((state.last) + (state.skip)) % (mSizeLookup);
state.last = perm;
state.ro... |
public java.lang.String[] getMissionSuites(java.lang.String missionName, java.lang.String programName) {
return target.path("ocssw").path("missionSuites").path(missionName).path(programName).request(MediaType.APPLICATION_JSON_TYPE).get(java.lang.String[].class);
} | public java.lang.String[] getMissionSuites(java.lang.String missionName, java.lang.String programName) {
if (missionName == null) {
return null;
}
return target.path("ocssw").path("missionSuites").path(missionName).path(programName).request(MediaType.APPLICATION_JSON_TYPE).get(java.lang.String[].cla... |
public play.mvc.Result placeOrder() throws java.lang.Exception {
com.fasterxml.jackson.databind.JsonNode nodebody = request().body().asJson();
apimodels.Order body;
body = mapper.readValue(nodebody.toString(), apimodels.Order.class);
apimodels.Order obj = imp.placeOrder(body);
obj.validate();
co... | public play.mvc.Result placeOrder() throws java.lang.Exception {
com.fasterxml.jackson.databind.JsonNode nodebody = request().body().asJson();
apimodels.Order body;
body = mapper.readValue(nodebody.toString(), apimodels.Order.class);
body.validate();
apimodels.Order obj = imp.placeOrder(body);
o... |
public boolean isItemValidForSlot(int slot, net.minecraft.item.ItemStack stack) {
net.minecraft.item.ItemStack itemStack = getStackInSlot(0);
return (((stack != null) && (slot == 0)) && (((stack.getItem()) instanceof net.minecraftforge.fluids.IFluidContainerItem) || (net.minecraftforge.fluids.FluidContainerRegi... | public boolean isItemValidForSlot(int slot, net.minecraft.item.ItemStack stack) {
return (((stack != null) && ((stack.getItem()) != null)) && (slot == 0)) && (((stack.getItem()) instanceof net.minecraftforge.fluids.IFluidContainerItem) || (net.minecraftforge.fluids.FluidContainerRegistry.isContainer(stack)));
} |
public void onNewProfileFragmentInteraction(android.net.Uri uri, net.tscloud.hivenotes.db.Profile profile) {
android.util.Log.d(net.tscloud.hivenotes.MainActivity.TAG, ("MainActivity.onNewProfileFragmentInteraction called..." + (uri.toString())));
newProfile = false;
theProfile = profile;
android.suppor... | public void onNewProfileFragmentInteraction(net.tscloud.hivenotes.db.Profile profile) {
android.util.Log.d(net.tscloud.hivenotes.MainActivity.TAG, "MainActivity.onNewProfileFragmentInteraction called...");
newProfile = false;
theProfile = profile;
android.support.v4.app.Fragment fragment = net.tscloud.h... |
protected static com.mcmoddev.lib.init.MMDCreativeTab getTab(java.lang.String modName, int id) {
if (com.mcmoddev.lib.init.ItemGroups.itemGroupsByModID.containsKey(modName)) {
if ((com.mcmoddev.lib.init.ItemGroups.itemGroupsByModID.get(modName).size()) <= id) {
return com.mcmoddev.lib.init.ItemG... | protected static com.mcmoddev.lib.init.MMDCreativeTab getTab(java.lang.String modName, int id) {
if (com.mcmoddev.lib.init.ItemGroups.itemGroupsByModID.containsKey(modName)) {
if ((com.mcmoddev.lib.init.ItemGroups.itemGroupsByModID.get(modName).size()) > id) {
com.mcmoddev.lib.init.MMDCreativeTa... |
public void format(final org.eclipse.xtext.formatting2.IFormattableSubDocument doc) throws org.eclipse.xtext.formatting2.FormattingNotApplicableException {
final org.eclipse.xtext.xbase.lib.Procedures.Procedure1<org.eclipse.xtext.formatting2.IHiddenRegionFormatter> _function = new org.eclipse.xtext.xbase.lib.Proced... | public void format(final org.eclipse.xtext.formatting2.IFormattableSubDocument doc) throws org.eclipse.xtext.formatting2.FormattingNotApplicableException {
final org.eclipse.xtext.xbase.lib.Procedures.Procedure1<org.eclipse.xtext.formatting2.IHiddenRegionFormatter> _function = new org.eclipse.xtext.xbase.lib.Proced... |
public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
if (process) {
mDatabase.child("approved").setValue("false");
mDatabase.child("removed").setValue(1);
process = false;
android.widget.Toast.makeText(this, "The notice has been Rejected", Toast.LENGTH_L... | public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
if (process) {
mDatabase.child("approved").setValue("false");
mDatabase.child("removed").setValue(1);
process = false;
android.support.v7.app.AlertDialog alert11 = builder1.create();
alert11.sh... |
private int getColumnIndex(java.lang.String columnName) {
java.util.Objects.requireNonNull(columnName);
java.lang.String key = columnName.toLowerCase();
if (key == null) {
throw new com.linuxense.javadbf.DBFException(("Not field name found for:" + columnName));
}
return mapcolumnNames.get(ke... | private int getColumnIndex(java.lang.String columnName) {
java.util.Objects.requireNonNull(columnName);
java.lang.String key = columnName.toLowerCase();
java.lang.Integer index = mapcolumnNames.get(key);
if (index == null) {
throw new com.linuxense.javadbf.DBFException(("Not field name found for... |
public void shouldBackupAndRestoreWithExistingUserTransaction() throws java.lang.Exception {
startRunStop(( repository) -> {
org.modeshape.jcr.JcrSession session = repository.login();
javax.transaction.TransactionManager txnMgr = repository.transactionManager();
txnMgr.begin();
makeB... | public void shouldBackupAndRestoreWithExistingUserTransaction() throws java.lang.Exception {
startRunStop(( repository) -> {
org.modeshape.jcr.JcrSession session = repository.login();
javax.transaction.TransactionManager txnMgr = repository.transactionManager();
txnMgr.begin();
makeB... |
private void onOptionClick(android.view.View v, java.lang.CharSequence type, int index) {
android.widget.Toast.makeText(getContext(), ("selected: " + type), Toast.LENGTH_SHORT).show();
com.mad.utsstudcentre.Controller.CentreFragment subEnqFragment = com.mad.utsstudcentre.Controller.CentreFragment.newInstance(ty... | private void onOptionClick(android.view.View v, java.lang.CharSequence type, int index) {
com.mad.utsstudcentre.Controller.CentreFragment subEnqFragment = com.mad.utsstudcentre.Controller.CentreFragment.newInstance(type, index);
android.support.v4.app.FragmentManager fragmentManager = getFragmentManager();
... |
public long getKeyVersionNo(java.lang.String inKSName, java.nio.ByteBuffer inKey) {
long version = -1;
synchronized(m_versionMaplock) {
java.util.concurrent.atomic.AtomicLong atomicLong = m_versionMaps.get(inKSName, inKey);
if (atomicLong == null) {
m_versionMaps.put(inKSName, inKey,... | public long getKeyVersionNo(java.lang.String inKSName, java.nio.ByteBuffer inKey) {
long version = -1;
synchronized(m_versionMaplock) {
java.lang.Long atomicLong = m_versionMaps.get(inKSName, inKey);
if (atomicLong == null) {
m_versionMaps.put(inKSName, inKey, 0L);
versio... |
public void actionPerformed(java.awt.event.ActionEvent e) {
java.lang.String cmd = e.getActionCommand();
if (cmd.equals("Plant")) {
isClicked = cisc275.game.view.SplashScreen.click.plant1;
cisc275.game.view.SplashScreen.crabby = false;
}else
if (cmd.equals("Garbage Collector")) {
... | public void actionPerformed(java.awt.event.ActionEvent e) {
java.lang.String cmd = e.getActionCommand();
if (cmd.equals("Plant")) {
isClicked = cisc275.game.view.SplashScreen.click.plant1;
cisc275.game.view.SplashScreen.crabby = false;
getPButton().setBorderPainted(true);
getGCBu... |
public static int xToLonE7(final int screenWidth, final de.blau.android.osm.BoundingBox viewBox, final float x) {
return ((int) (((((double) (x)) / ((double) (screenWidth))) * (viewBox.getWidth())) + (viewBox.getLeft())));
} | public static int xToLonE7(final int screenWidth, final de.blau.android.osm.BoundingBox viewBox, final float x) {
return ((int) (java.lang.Math.round((((((double) (x)) / ((double) (screenWidth))) * (viewBox.getWidth())) + (viewBox.getLeft())))));
} |
public be.willima.jrpgdatabase.model.JRPGMap createNewMap(java.lang.String mapTitle, java.awt.Dimension dim) {
int mapID = this.maps.size();
be.willima.jrpgdatabase.model.JRPGMap newMap = new be.willima.jrpgdatabase.model.JRPGMap(mapID, mapTitle, dim.width, dim.height);
maps.add(newMap);
return newMap;
... | public be.willima.jrpgdatabase.model.JRPGMap createNewMap(java.lang.String mapTitle, java.awt.Dimension dim) {
int mapID = this.maps.size();
be.willima.jrpgdatabase.model.JRPGMap newMap = new be.willima.jrpgdatabase.model.JRPGMap(this, mapID, mapTitle, dim.width, dim.height);
maps.add(newMap);
return ne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.