buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public static void registerDataSetAsATable() throws java.lang.Exception {
final org.apache.flink.api.java.ExecutionEnvironment execEnv = org.apache.flink.api.java.ExecutionEnvironment.createLocalEnvironment(com.manning.fia.ch09.MediaBatchTableTransformations.DEFAULT_LOCAL_PARALLELISM);
final org.apache.flink.ap... | private static void registerDataSetAsATable() throws java.lang.Exception {
final org.apache.flink.api.java.ExecutionEnvironment execEnv = org.apache.flink.api.java.ExecutionEnvironment.createLocalEnvironment(com.manning.fia.ch09.MediaBatchTableTransformations.DEFAULT_LOCAL_PARALLELISM);
final org.apache.flink.a... |
protected void setIndexVBO(int[] indices) {
if ((this.indexVBO) == null) {
this.indexVBO = new com.jukusoft.rpg.graphic.opengl.buffer.IntegerVertexBufferObject(GL_ELEMENT_ARRAY_BUFFER);
}
this.indexVBO.bind();
this.indexVBO.putData(indices);
this.indexVBO.defineStructure(2, 3, false, 0, 0);
... | protected void setIndexVBO(int[] indices) {
if ((this.indexVBO) == null) {
this.indexVBO = new com.jukusoft.rpg.graphic.opengl.buffer.IntegerVertexBufferObject(GL_ELEMENT_ARRAY_BUFFER);
}
this.indexVBO.bind();
this.indexVBO.putData(indices);
this.indexVBO.unbind();
} |
private boolean checkUnit(SudokuSquare[] unit) {
int[] target = new int[]{ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 };
int[] unitvalues = new int[9];
for (int index = 0; index < 9; index++) {
unitvalues[index] = unit[index].getValue();
}
java.util.Arrays.sort(unitvalues);
return java.util.Array... | private boolean checkUnit(int[] unit) {
int[] target = new int[]{ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 };
int[] unitvalues = new int[9];
for (int index = 0; index < 9; index++) {
unitvalues[index] = unit[index];
}
java.util.Arrays.sort(unitvalues);
return java.util.Arrays.equals(unitvalues,... |
public void doFrame() {
handleTimers();
frameActions();
setX(((getX()) + ((front) * (getXSpeed()))));
setY(((getY()) + (getYSpeed())));
} | public void doFrame() {
handleTimers();
frameActions();
setX(((getX()) - ((front) * (getXSpeed()))));
setY(((getY()) + (getYSpeed())));
} |
protected void process(java.util.List<? extends ijfx.explorer.datamodel.Explorable> selected) {
java.io.File file = mongis.utils.FXUtilities.openFolder("Open folder to save in...", "~/");
if (file == null)
return ;
batchService.builder().add(selected).saveIn(file.getAbsolutePath()).startAsync(t... | protected void process(java.util.List<? extends ijfx.explorer.datamodel.Explorable> selected) {
java.io.File file = mongis.utils.FXUtilities.openFolder("Open folder to save in...", null);
if (file == null)
return ;
batchService.builder().add(selected).saveIn(file.getAbsolutePath()).startAsync(t... |
private void setAppMode(boolean b) {
android.app.FragmentManager fragmentManager = getFragmentManager();
android.app.FragmentTransaction ft = fragmentManager.beginTransaction();
android.app.Fragment fragment = (b) ? new com.hsfl.speakshot.ui.SearchFragment() : new com.hsfl.speakshot.ui.ReadFragment();
f... | private void setAppMode(boolean b) {
android.app.FragmentManager fragmentManager = getFragmentManager();
android.app.FragmentTransaction ft = fragmentManager.beginTransaction();
android.app.Fragment fragment = (b) ? new com.hsfl.speakshot.ui.SearchFragment() : new com.hsfl.speakshot.ui.ReadFragment();
f... |
public void onResult(com.iflytek.cloud.EvaluatorResult result, boolean isLast) {
android.util.Log.d(com.lixl.waveform.WaveformViewModule.TAG, ("evaluator result :" + isLast));
if (isLast) {
java.lang.StringBuilder builder = new java.lang.StringBuilder();
builder.append(result.getResultString());... | public void onResult(com.iflytek.cloud.EvaluatorResult result, boolean isLast) {
android.util.Log.d(com.lixl.waveform.WaveformViewModule.TAG, ("evaluator result :" + isLast));
if (isLast) {
java.lang.StringBuilder builder = new java.lang.StringBuilder();
builder.append(result.getResultString());... |
public com.google.common.base.Optional<T> getById(java.lang.String id) {
if (com.hsjawanda.gaeobjectify.data.ObjectifyDao.isBlank(id))
return com.google.common.base.Optional.absent();
com.googlecode.objectify.Key<T> key = null;
try {
key = com.googlecode.objectify.Key.create(this.cls, i... | public com.google.common.base.Optional<T> getById(java.lang.String id) {
if (com.hsjawanda.gaeobjectify.data.ObjectifyDao.isBlank(id))
return com.google.common.base.Optional.absent();
com.googlecode.objectify.Key<T> key = null;
try {
key = com.googlecode.objectify.Key.create(this.cls, i... |
public void setRedisKeyNamespace(java.lang.String namespace) {
if (com.gemstone.gemfire.internal.lang.StringUtils.isBlank(namespace)) {
namespace = org.springframework.session.data.redis.RedisOperationsSessionRepository.DEFAULT_ATTR_SEPARATOR;
}
if (!(namespace.endsWith(org.springframework.session.d... | public void setRedisKeyNamespace(java.lang.String namespace) {
if (com.gemstone.gemfire.internal.lang.StringUtils.isBlank(namespace)) {
this.namespace = org.springframework.session.data.redis.RedisOperationsSessionRepository.DEFAULT_ATTR_SEPARATOR;
}
if (!(namespace.endsWith(org.springframework.sess... |
private static java.util.List<com.emc.storageos.db.client.model.Cluster> getVolumeGroupClusters(com.emc.storageos.db.client.DbClient dbClient, com.emc.storageos.db.client.model.VolumeGroup volumeGroup) {
java.util.List<com.emc.storageos.db.client.model.Cluster> result = new java.util.ArrayList<com.emc.storageos.db.... | private static java.util.List<com.emc.storageos.db.client.model.Cluster> getVolumeGroupClusters(com.emc.storageos.db.client.DbClient dbClient, com.emc.storageos.db.client.model.VolumeGroup volumeGroup) {
final java.util.List<com.emc.storageos.db.client.model.Cluster> clusters = com.emc.storageos.db.client.util.Cust... |
public void onActivityCreated(@android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mSongDecoration = new com.nulldreams.bemusic.adapter.SongDecoration(getContext());
getRecyclerView().addItemDecoration(mSongDecoration);
java.util.List<... | public void onActivityCreated(@android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mSongDecoration = new com.nulldreams.bemusic.adapter.SongDecoration(getContext());
getRecyclerView().addItemDecoration(mSongDecoration);
java.util.List<... |
public void startRunning() {
try {
connectToServer();
setupStreams();
whileCompile();
} catch (java.io.EOFException eofException) {
java.lang.System.out.println("Client terminated connection");
} catch (java.io.IOException e) {
e.printStackTrace();
} finally {
... | public void startRunning() {
try {
connectToServer();
setupStreams();
whileCompile();
} catch (java.io.EOFException eofException) {
java.lang.System.out.println("Client terminated connection");
} catch (java.io.IOException e) {
e.printStackTrace();
} finally {
... |
private int getLevelDone(org.bukkit.entity.Player player) {
for (int result = 1; result <= (Settings.challengeLevels.size()); result++) {
if ((checkLevelCompletion(player, Settings.challengeLevels.get((result - 1)))) > 0) {
return result;
}
}
return Settings.challengeLevels.size(... | private int getLevelDone(org.bukkit.entity.Player player) {
for (int result = 0; result < (Settings.challengeLevels.size()); result++) {
if ((checkLevelCompletion(player, Settings.challengeLevels.get(result))) > 0) {
return result;
}
}
return (Settings.challengeLevels.size()) - 1... |
private void doPause() {
pauseMenu = new GamePauseMenu();
pauseMenu.init(this);
mainFrame.remove(mainPanel);
mainFrame.add(pauseMenu, java.awt.BorderLayout.CENTER);
mainFrame.revalidate();
pauseMenu.repaint();
timer.stop();
mainPanel.removeMouseListener(mouseListener);
mainPanel.remo... | private void doPause() {
pauseMenu = new GamePauseMenu();
pauseMenu.init(this);
mainFrame.remove(mainPanel);
mainFrame.add(pauseMenu, java.awt.BorderLayout.CENTER);
mainFrame.revalidate();
pauseMenu.repaint();
timer.stop();
mainPanel.removeMouseListener(mouseListener);
mainPanel.remo... |
private void validateBorrowHistoryItem(cgk.bibliothouris.learning.application.transferobject.BorrowHistoryItemTO borrowHistoryItemTO, cgk.bibliothouris.learning.service.entity.Book book, cgk.bibliothouris.learning.service.entity.Member member) {
java.lang.Boolean isEndDateAfterStartDate = false;
java.lang.Boole... | private void validateBorrowHistoryItem(cgk.bibliothouris.learning.application.transferobject.BorrowHistoryItemTO borrowHistoryItemTO, cgk.bibliothouris.learning.service.entity.Book book, cgk.bibliothouris.learning.service.entity.Member member) {
java.lang.Boolean isEndDateAfterStartDate = false;
java.lang.Boole... |
private ddf.catalog.data.Result updateResult(ddf.catalog.data.Result origResult, float newScore) {
ddf.catalog.data.impl.ResultImpl result = new ddf.catalog.data.impl.ResultImpl(origResult.getMetacard());
result.setRelevanceScore(new java.lang.Double(newScore));
result.setDistanceInMeters(origResult.getDist... | private ddf.catalog.data.Result updateResult(ddf.catalog.data.Result origResult, float newScore) {
ddf.catalog.data.impl.ResultImpl result = new ddf.catalog.data.impl.ResultImpl(origResult.getMetacard());
result.setRelevanceScore(((double) (newScore)));
result.setDistanceInMeters(origResult.getDistanceInMet... |
private void generateLastChunk(com.firefly.codec.http2.encode.HttpGenerator generator, com.firefly.net.Session tcpSession) throws java.io.IOException {
java.nio.ByteBuffer chunk = com.firefly.utils.io.BufferUtils.allocate(HttpGenerator.CHUNK_SIZE);
com.firefly.codec.http2.encode.HttpGenerator.Result generatorRe... | private void generateLastChunk(com.firefly.codec.http2.encode.HttpGenerator generator, com.firefly.net.Session tcpSession) throws java.io.IOException {
java.nio.ByteBuffer chunk = com.firefly.utils.io.BufferUtils.allocate(HttpGenerator.CHUNK_SIZE);
com.firefly.codec.http2.encode.HttpGenerator.Result generatorRe... |
public www.purple.mixxy.models.User getUser(java.lang.String username) {
www.purple.mixxy.models.User user = null;
if (username != null) {
user = objectify.get().load().type(www.purple.mixxy.models.User.class).filter(User.USERNAME, username).first().now();
}
return user;
} | public www.purple.mixxy.models.User getUser(java.lang.String username) {
if (username != null) {
www.purple.mixxy.models.User user = objectify.get().load().type(www.purple.mixxy.models.User.class).filter(User.USERNAME, username).first().now();
if (user != null)
return user;
... |
public void scheduleWork() throws java.lang.Exception {
com.imcode.tools.jdbmtosql.entities.DatabasesInfo dbInfo = getSchedulerHelper().findBy(getDatabaseDescription());
java.lang.Long timestamp;
if (dbInfo == null) {
dbInfo = new com.imcode.tools.jdbmtosql.entities.DatabasesInfo();
dbInfo.s... | public final void scheduleWork() throws java.lang.Exception {
com.imcode.tools.jdbmtosql.entities.DatabasesInfo dbInfo = getSchedulerHelper().findBy(getDatabaseDescription());
java.lang.Long timestamp;
if (dbInfo == null) {
dbInfo = new com.imcode.tools.jdbmtosql.entities.DatabasesInfo();
db... |
private void openLocalFile(com.seafile.seadroid2.data.EventDetailsFileItem fileItem) {
if (fileItem.isDir()) {
viewRepo(fileItem.getEvent().getRepo_id());
}else {
viewFile(fileItem.getEvent().getRepo_id(), fileItem.getPath());
}
} | private void openLocalFile(com.seafile.seadroid2.data.EventDetailsFileItem fileItem) {
if (fileItem.isDir()) {
viewRepo(fileItem.getEvent().getRepo_id(), fileItem.getPath());
}else {
viewFile(fileItem.getEvent().getRepo_id(), fileItem.getPath());
}
} |
public double[][] getR() {
double[][] R = new double[m][n];
for (int i = 0; i < (m); i++) {
java.lang.System.arraycopy(QR[i], 0, R[i], 0, i);
R[i][i] = Rdiag[i];
}
return R;
} | public double[][] getR() {
double[][] R = new double[n][n];
for (int i = 0; i < (n); i++) {
java.lang.System.arraycopy(QR[i], (i + 1), R[i], (i + 1), (((n) - i) - 1));
R[i][i] = Rdiag[i];
}
return R;
} |
public android.support.v4.app.Fragment getItem(int position) {
int dateOffset = (position + 1) - (numOfDaysToShow);
br.com.dgimenes.nasapic.fragment.SinglePictureFragment fragment = new br.com.dgimenes.nasapic.fragment.SinglePictureFragment();
java.util.Calendar calendar = java.util.Calendar.getInstance();
... | public android.support.v4.app.Fragment getItem(int position) {
int dateOffset = position * (-1);
br.com.dgimenes.nasapic.fragment.SinglePictureFragment fragment = new br.com.dgimenes.nasapic.fragment.SinglePictureFragment();
java.util.Calendar calendar = java.util.Calendar.getInstance();
calendar.add(ja... |
public void onDestroyView() {
android.util.Log.e("DEBUG", "onDestroyView of MapFragment");
super.onDestroyView();
com.google.android.gms.maps.MapFragment f = ((com.google.android.gms.maps.MapFragment) (getFragmentManager().findFragmentById(R.id.map)));
if (f != null) {
try {
getFragm... | public void onDestroyView() {
super.onDestroyView();
com.google.android.gms.maps.MapFragment f = ((com.google.android.gms.maps.MapFragment) (getFragmentManager().findFragmentById(R.id.map)));
if (f != null) {
getFragmentManager().beginTransaction().remove(f).commit();
}
} |
public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column) {
org.openstreetmap.josm.gui.history.TwoColumnDiff.Item member = ((org.openstreetmap.josm.gui.history.TwoColumnDiff.Item) (value));
renderIcon(((or... | public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column) {
if (value == null)
return this;
org.openstreetmap.josm.gui.history.TwoColumnDiff.Item member = ((org.openstreetmap.josm.gui.history.... |
private static io.grpc.StatusRuntimeException toException(com.google.rpc.Status status) {
com.google.rpc.Status grpcStatus = io.grpc.Status.fromCodeValue(status.getCode()).withDescription(status.getMessage());
for (com.google.protobuf.Any detail : status.getDetailsList()) {
grpcStatus.augmentDescription... | private static io.grpc.StatusRuntimeException toException(com.google.rpc.Status status) {
com.google.rpc.Status grpcStatus = io.grpc.Status.fromCodeValue(status.getCode()).withDescription(status.getMessage());
for (com.google.protobuf.Any detail : status.getDetailsList()) {
grpcStatus = grpcStatus.augme... |
protected internetofeveryone.ioe.Data.Message cursorToMessage(android.database.Cursor cursor) {
internetofeveryone.ioe.Data.Message msg = new internetofeveryone.ioe.Data.Message(cursor.getLong(0), cursor.getString(1), cursor.getString(2), cursor.getString(3), java.lang.Boolean.valueOf(cursor.getString(4)), getUserC... | private internetofeveryone.ioe.Data.Message cursorToMessage(android.database.Cursor cursor) {
return new internetofeveryone.ioe.Data.Message(cursor.getLong(0), cursor.getString(1), cursor.getString(2), cursor.getString(3), java.lang.Boolean.valueOf(cursor.getString(4)), getUserCode());
} |
static void Consume(java.io.PrintWriter output) {
if ((buffer.Buffer.index_buffer) == (-1))
output.println(buffer.Buffer.Response.FAILURE_EMPTY_BUFFER.toString());
else {
output.println(buffer.Buffer.Response.SUCCESS.toString());
if ((buffer.Buffer.index_buffer) == (buffer.Buffer.BUFFER_... | static void Consume(java.io.PrintWriter output) {
if ((buffer.Buffer.index_buffer) == (-1))
output.println(buffer.Buffer.Response.FAILURE_EMPTY_BUFFER.toString());
else {
output.println(buffer.Buffer.Response.SUCCESS.toString());
output.println(buffer.Buffer.buffer[((buffer.Buffer.index_... |
public void setRemainTime(org.bitbucket.ucchy.fnafim.game.Night night, int hour) {
java.lang.String title = org.bitbucket.ucchy.fnafim.Messages.get("Sidebar_Title", new java.lang.String[]{ "%night" , "%hour" }, new java.lang.String[]{ night.toString() , java.lang.String.format("%2d", hour) });
if (!(title.equal... | public void setRemainTime(org.bitbucket.ucchy.fnafim.game.Night night, int hour) {
java.lang.String title = org.bitbucket.ucchy.fnafim.Messages.get("Sidebar_Title", new java.lang.String[]{ "%night" , "%hour" }, new java.lang.String[]{ night.toString() , java.lang.String.format("%2d", hour) });
if (!(title.equal... |
public void pushCommand(commands.Command cmd, boolean clear) {
if (cmd == null) {
java.lang.System.out.println("cmd is null");
}
cmd.Apply(this);
if (cmd.isUndoable) {
commandStack.addFirst(cmd);
if (clear) {
redoStack.clear();
}
}
if ((commandStack.si... | public void pushCommand(commands.Command cmd, boolean clear) {
if (cmd == null) {
java.lang.System.out.println("cmd is null");
return ;
}
cmd.Apply(this);
if (cmd.isUndoable) {
commandStack.addFirst(cmd);
if (clear) {
redoStack.clear();
}
}
if ... |
public void retirePersonTest() {
org.openmrs.reference.page.AdministrationPage administrationPage = homePage.goToAdministration();
org.openmrs.reference.page.ManagePersonPage managePersonPage = administrationPage.clickOnManagePersons();
managePersonPage.setPersonName(personInfo.givenName);
org.openmrs.r... | public void retirePersonTest() {
org.openmrs.reference.page.AdministrationPage administrationPage = homePage.goToAdministration();
org.openmrs.reference.page.ManagePersonPage managePersonPage = administrationPage.clickOnManagePersons();
managePersonPage.setPersonName(personInfo.givenName);
org.openmrs.r... |
public static void addRecipe(com.lothrazar.samscontent.block.BlockCommandBlockCraftable block, net.minecraft.item.ItemStack flavor) {
net.minecraftforge.fml.common.registry.GameRegistry.addRecipe(new net.minecraft.item.ItemStack(com.lothrazar.samscontent.BlockRegistry.command_block_weather), "rcr", "cec", "rcr", 'c... | public static void addRecipe(com.lothrazar.samscontent.block.BlockCommandBlockCraftable block, net.minecraft.item.ItemStack flavor) {
net.minecraftforge.fml.common.registry.GameRegistry.addRecipe(new net.minecraft.item.ItemStack(block), "rcr", "cec", "rcr", 'c', Items.comparator, 'e', flavor, 'r', Blocks.redstone_b... |
public void testCalendarBasedTimeout() {
for (java.util.TimeZone tz : org.jboss.as.ejb3.timer.schedule.CalendarBasedTimeoutTestCase.getTimezones()) {
this.timezone = tz;
this.timeZoneDisplayName = this.timezone.getDisplayName();
testEverySecondTimeout();
testEveryMinuteEveryHourEvery... | public void testCalendarBasedTimeout() {
for (java.util.TimeZone tz : org.jboss.as.ejb3.timer.schedule.CalendarBasedTimeoutTestCase.getTimezones()) {
this.timezone = tz;
this.timeZoneDisplayName = this.timezone.getDisplayName();
testEverySecondTimeout();
testEveryMinuteEveryHourEvery... |
private java.util.ArrayList<frogger.AssisterRow<frogger.Lily>> nextRoundLilyRows(java.util.ArrayList<frogger.AssisterRow<frogger.Lily>> prevLilies, frogger.Score score) {
java.util.ArrayList<frogger.AssisterRow<frogger.Lily>> newLilies = new java.util.ArrayList<>();
for (frogger.AssisterRow<frogger.Lily> r : pr... | private java.util.ArrayList<frogger.AssisterRow<frogger.Lily>> nextRoundLilyRows(java.util.ArrayList<frogger.AssisterRow<frogger.Lily>> prevLilies, frogger.Score score) {
java.util.ArrayList<frogger.AssisterRow<frogger.Lily>> newLilies = new java.util.ArrayList<>();
for (frogger.AssisterRow<frogger.Lily> x : pr... |
private void hideFragment() {
if ((mListener) != null) {
mListener.onFragmentHidden();
}
android.support.v4.app.Fragment activeFragment = mContext.getSupportFragmentManager().findFragmentById(mAttachView.getId());
if (activeFragment != null) {
mContext.getSupportFragmentManager().beginTr... | private void hideFragment() {
if ((mListener) != null) {
mListener.onFragmentHidden();
}
if ((mAttachView) != null) {
android.support.v4.app.Fragment activeFragment = mContext.getSupportFragmentManager().findFragmentById(mAttachView.getId());
if (activeFragment != null) {
... |
public com.google.common.util.concurrent.ListenableFuture<org.dykman.jtl.core.JSON> call(final org.dykman.jtl.core.engine.future.AsyncExecutionContext<org.dykman.jtl.core.JSON> context, final com.google.common.util.concurrent.ListenableFuture<org.dykman.jtl.core.JSON> t) {
try {
if (t == null)
r... | public com.google.common.util.concurrent.ListenableFuture<org.dykman.jtl.core.JSON> call(final org.dykman.jtl.core.engine.future.AsyncExecutionContext<org.dykman.jtl.core.JSON> context, final com.google.common.util.concurrent.ListenableFuture<org.dykman.jtl.core.JSON> t) {
try {
if (t == null)
r... |
public int getNoPets() {
petLock.lock();
try {
int ret = 0;
for (int i = 0; i < 3; i++) {
if ((pets[i]) != null) {
ret++;
}
}
return ret;
} finally {
petLock.unlock();
}
} | public int getNoPets() {
petLock.lock();
try {
int ret = 0;
for (int i = 0; i < (pets.length); i++) {
if ((pets[i]) != null) {
ret++;
}
}
return ret;
} finally {
petLock.unlock();
}
} |
public javax.ws.rs.core.Response deleteDeck(jdransoft.model.DeckRequest deckRequest) {
java.lang.String deckName = deckRequest.getName();
javax.ws.rs.core.Response.ResponseBuilder builder = javax.ws.rs.core.Response.status(Status.OK).entity("Success").type(MediaType.TEXT_PLAIN);
if (!(jdransoft.data.memory.... | public javax.ws.rs.core.Response deleteDeck(@javax.ws.rs.PathParam(value = "deckName")
java.lang.String deckName) {
javax.ws.rs.core.Response.ResponseBuilder builder = javax.ws.rs.core.Response.status(Status.OK).entity("Success").type(MediaType.TEXT_PLAIN);
if (!(jdransoft.data.memory.MemoryDeckData.getInstance... |
public java.util.ArrayList<com.pette.server.chattserver.chat.ChatMessage> getUpdate(com.pette.server.common.UpdateRequest request) {
if (((request.getIndex()) != null) && ((request.getRange()) != null)) {
return getLastEntries(request.getChatRoomId(), request.getUsername(), request.getIndex(), request.getRa... | public java.util.ArrayList<com.pette.server.chattserver.chat.ChatMessage> getUpdate(com.pette.server.common.UpdateRequest request) {
if (((request.getIndex()) != null) && ((request.getRange()) != null)) {
return getLastEntries(request.getChatRoomId(), request.getIndex(), request.getRange());
}else {
... |
private void writeCurrentRunInfo(edu.illinois.nondex.plugin.CleanSurefireExecution execution) {
try {
java.nio.file.Files.write(this.executions.get(0).getConfiguration().getRunFilePath(), java.lang.String.format(((execution.getConfiguration().executionId) + "%n")).getBytes(), java.nio.file.StandardOpenOptio... | private void writeCurrentRunInfo(edu.illinois.nondex.plugin.CleanSurefireExecution execution) {
try {
java.nio.file.Files.write(this.executions.get(0).getConfiguration().getRunFilePath(), ((execution.getConfiguration().executionId) + (java.lang.String.format("%n"))).getBytes(), java.nio.file.StandardOpenOpt... |
public void resetMenuComponents() {
ViDSortGUI.Mode mode = ViDSortGUI.getInstance().getMode();
java.awt.GridBagConstraints gridConstraints = getDefaultGridConstraints();
if (mode == (ViDSortGUI.Mode.SINGLE_ALGORITHM_MODE)) {
removeComboBox(rightAlgorithmComboBox);
gridConstraints.gridy = 1;
... | public void resetMenuComponents() {
ViDSortGUI.Mode mode = ViDSortGUI.getInstance().getMode();
java.awt.GridBagConstraints gridConstraints = getDefaultGridConstraints();
removeComboBox(leftAlgorithmComboBox);
removeComboBox(rightAlgorithmComboBox);
if (mode == (ViDSortGUI.Mode.SINGLE_ALGORITHM_MODE)... |
public synchronized boolean selectAudioTrack(int pid) {
if ((mPids.get(org.xvdr.extractor.LiveTvSource.TRACK_AUDIO, (-1))) == pid) {
return true;
}
org.xvdr.robotv.tv.StreamBundle.Stream stream = mBundle.getStreamOfPid(pid);
if (stream == null) {
return false;
}
mPids.put(org.xvd... | public synchronized boolean selectAudioTrack(int pid) {
if ((mPids[org.xvdr.extractor.LiveTvSource.TRACK_AUDIO]) == pid) {
return true;
}
org.xvdr.robotv.tv.StreamBundle.Stream stream = mBundle.getStreamOfPid(pid);
if (stream == null) {
return false;
}
mPids[org.xvdr.extractor.Li... |
public void actionPerformed(java.awt.event.ActionEvent ae) {
textArea.setEnabled(false);
try {
FileUtils.saveFileContents(textArea.getText(), parent.getCurrentFilePath());
} catch (java.io.IOException ex) {
ExceptionDialog dialog = new ExceptionDialog(parent, ex);
} finally {
tex... | public void actionPerformed(java.awt.event.ActionEvent ae) {
try {
textArea.setEnabled(false);
FileUtils.saveFileContents(textArea.getText(), parent.getCurrentFilePath());
} catch (java.io.IOException ex) {
ExceptionDialog dialog = new ExceptionDialog(parent, ex);
} finally {
... |
public int getNumRows() {
int count = 0;
android.database.sqlite.SQLiteDatabase db = this.getReadableDatabase();
android.database.Cursor cursor = db.query("testTable", null, null, null, null, null, null);
if (cursor != null) {
if (cursor.moveToFirst()) {
while (!(cursor.isAfterLast()... | public int getNumRows() {
int count = 0;
android.database.sqlite.SQLiteDatabase db = this.getReadableDatabase();
android.database.Cursor cursor = db.query("testTable", null, null, null, null, null, null);
if (cursor != null) {
if (cursor.moveToFirst()) {
while (!(cursor.isAfterLast()... |
public java.lang.String getMove() {
int max = 0;
java.lang.String move = INCOME;
for (int i = 0; i < (possibleMoves); i++) {
if (max < (utility[i]))
max = utility[i];
java.lang.System.out.println(utility[i]);
}
for (int i = 0; i < (possibleMoves); i++) {
... | public java.lang.String getMove() {
int max = 0;
java.lang.String move = INCOME;
for (int i = 0; i < (possibleMoves); i++) {
if (max < (utility[i]))
max = utility[i];
}
for (int i = 0; i < (possibleMoves); i++) {
if (max == (utility[i]))
return moves[... |
public void enterProject(android.view.View v) {
android.content.SharedPreferences sharedPref = this.getSharedPreferences("Projects", Context.MODE_PRIVATE);
android.content.Intent i = new android.content.Intent(this, com.example.facebook.insighting.SelectInsightActivity.class);
android.widget.TextView x = ((... | public void enterProject(android.view.View v) {
android.content.SharedPreferences sharedPref = this.getSharedPreferences("Projects", Context.MODE_PRIVATE);
android.content.Intent i = new android.content.Intent(this, com.example.facebook.insighting.SelectInsightActivity.class);
android.widget.TextView x = ((... |
public void before() throws java.lang.Exception {
db = fongo.getDatabase();
authChecker = new coursesketch.database.auth.DbAuthChecker(db);
insertValidObject(coursesketch.database.auth.DbAuthCheckerTest.VALID_ITEM_TYPE, coursesketch.database.auth.DbAuthCheckerTest.VALID_ITEM_ID, coursesketch.database.auth.D... | public void before() throws java.lang.Exception {
db = fongo.getDatabase();
insertValidObject(coursesketch.database.auth.DbAuthCheckerTest.VALID_ITEM_TYPE, coursesketch.database.auth.DbAuthCheckerTest.VALID_ITEM_ID, coursesketch.database.auth.DbAuthCheckerTest.VALID_GROUP_ID);
authChecker = new coursesketch... |
public void done(com.parse.ParseUser user, com.parse.ParseException err) {
if (user == null) {
android.util.Log.d("MyApp", "Uh oh. The user cancelled the Facebook login.");
}else
if (user.isNew()) {
android.util.Log.d("MyApp", "User signed up and logged in through Facebook!");
... | public void done(com.parse.ParseUser user, com.parse.ParseException err) {
if (user == null) {
android.util.Log.d("MyApp", "Uh oh. The user cancelled the Facebook login.");
}else
if (user.isNew()) {
android.util.Log.d("MyApp", "User signed up and logged in through Facebook!");
... |
public int apply(final int[] counts) {
int result = 0;
for (int i = 0; i < (counts.length); ++i) {
if ((counts[i]) > 0) {
++result;
}
}
return result >= n ? 1 : 0;
} | public int apply(final int[] counts) {
int result = 0;
for (int i = 0; i < (counts.length); ++i) {
result += counts[i];
}
return result >= n ? 1 : 0;
} |
private void photoClicked(br.com.jeancsanchez.photoviewslider.Photo photo) {
generatePhotoDetail();
for (int i = 0; i < (photos.size()); i++)
if (photos.get(i).getImage().equals(photo.getImage()))
currentPosition = i;
showImage(photo.getImage(), photo.getDescription(), curr... | private void photoClicked(br.com.jeancsanchez.photoviewslider.Photo photo) {
generatePhotoDetail();
for (int i = 0; i < (photos.size()); i++)
if ((photos.get(i)) == photo)
currentPosition = i;
showImage(photo.getImage(), photo.getDescription(), currentPosition);
} |
public void config(com.blade.config.Configuration configuration) {
java.lang.System.out.println("1 ...");
com.blade.mvc.view.template.JetbrickTemplateEngine templateEngine = new com.blade.mvc.view.template.JetbrickTemplateEngine();
jetbrick.template.resolver.GlobalResolver resolver = templateEngine.getJetEn... | public void config(com.blade.config.Configuration configuration) {
com.blade.mvc.view.template.JetbrickTemplateEngine templateEngine = new com.blade.mvc.view.template.JetbrickTemplateEngine();
jetbrick.template.resolver.GlobalResolver resolver = templateEngine.getJetEngine().getGlobalResolver();
resolver.re... |
private com.taozeyu.calico.generator.PageService createPageService(java.lang.String[] pathCells, java.lang.String extensionName) {
int endOfExistDirIndex = findEndOfExistDirIndex(pathCells, extensionName);
java.lang.String path = getTemplateDirPath(pathCells, endOfExistDirIndex);
java.io.File templatePath =... | private com.taozeyu.calico.generator.PageService createPageService(java.lang.String[] pathCells, java.lang.String extensionName) {
int endOfExistDirIndex = findEndOfExistDirIndex(pathCells, extensionName);
java.lang.String path = getTemplateDirPath(pathCells, endOfExistDirIndex);
java.io.File templatePath =... |
public void creerLesMouvements() {
toucan.modele.IAnimation comparaisonCaseCase = new toucan.modele.ComparaisonCaseCase();
toucan.modele.IAnimation comparaisonVariableCase = new toucan.modele.ComparaisonVariableCase();
toucan.modele.IAnimation affectationCaseCase = new toucan.modele.AffectationCaseCase();
... | public void creerLesMouvements() {
toucan.modele.IAnimation comparaisonCaseCase = new toucan.modele.ComparaisonCaseCase();
toucan.modele.IAnimation comparaisonVariableCase = new toucan.modele.ComparaisonVariableCase();
toucan.modele.IAnimation affectationCaseCase = new toucan.modele.AffectationCaseCase();
... |
public static void test_071() {
framework.common.GalleryCommon.deleteMoreGallery();
framework.common.GalleryCommon.clickGallery();
check(testcase.Object_Description, testcase.Operation_WaitForExists, "更多选项", "10000");
excute(testcase.Object_Description, testcase.Operation_ClickWait, "更多选项");
excute(... | public static void test_071() {
framework.common.GalleryCommon.deleteMoreGallery();
framework.common.GalleryCommon.clickGallery();
excute(testcase.Object_Description, testcase.Operation_WaitForExists, "更多选项", "10000");
excute(testcase.Object_Description, testcase.Operation_ClickWait, "更多选项");
excute... |
public void onSetEndOfFile(java.lang.String fileName, long length, net.decasdev.dokan.DokanFileInfo arg2) throws net.decasdev.dokan.DokanOperationException {
log.debug(("[onSetEndOfFile] " + fileName));
org.opendedup.sdfs.io.DedupFileChannel ch = this.getFileChannel(fileName, arg2.handle);
try {
ch.... | public void onSetEndOfFile(java.lang.String fileName, long length, net.decasdev.dokan.DokanFileInfo arg2) throws net.decasdev.dokan.DokanOperationException {
log.debug(("[onSetEndOfFile] " + fileName));
try {
org.opendedup.sdfs.io.DedupFileChannel ch = this.getFileChannel(fileName, arg2.handle);
... |
protected void publishResults(java.lang.CharSequence constraint, com.mikepenz.fastadapter.adapters.FilterResults results) {
if ((results.values) != null) {
this.set(((java.util.List<Item>) (results.values)));
}
if ((mItemFilterListener) != null) {
mItemFilterListener.itemsFiltered();
}
} | protected void publishResults(java.lang.CharSequence constraint, com.mikepenz.fastadapter.adapters.FilterResults results) {
if ((results.values) != null) {
this.set(((java.util.List<Item>) (results.values)), false);
}
if ((mItemFilterListener) != null) {
mItemFilterListener.itemsFiltered();
... |
public void teleopPeriodic() {
double Kp = 0.03;
double angle = gyro.getAngle();
myRobot.mecanumDrive_Cartesian(rightStick.getY(), rightStick.getX(), rightStick.getTwist(), gyro.getAngle());
if (rightStick.getRawButton(2)) {
climber.set(0.5);
}else {
climber.set(0);
}
edu.wpi... | public void teleopPeriodic() {
double Kp = 0.03;
double angle = gyro.getAngle();
myRobot.mecanumDrive_Cartesian(rightStick.getY(), rightStick.getX(), rightStick.getTwist(), (angle * Kp));
if (rightStick.getRawButton(2)) {
climber.set(0.5);
}else {
climber.set(0);
}
edu.wpi.fi... |
public void onException(java.lang.Exception e) {
if (io.datakernel.http.AsyncHttpClient.logger.isWarnEnabled()) {
io.datakernel.http.AsyncHttpClient.logger.warn("Connect error to {} : {}", address, e.getMessage());
}
if (e instanceof java.net.BindException) {
blockBindException(address, e);
... | public void onException(java.lang.Exception e) {
connectsMonitor.removePending(address);
if (io.datakernel.http.AsyncHttpClient.logger.isWarnEnabled()) {
io.datakernel.http.AsyncHttpClient.logger.warn("Connect error to {} : {}", address, e.getMessage());
}
if (e instanceof java.net.BindException... |
public static void updateDatabase(final android.content.Context context) {
new java.lang.Thread() {
public void run() {
android.database.Cursor c = com.buaa556.projecteuler.MainActivity.db.rawQuery("select id from cache", null);
int i = (c.getCount()) + 1;
int count = com... | public static int updateDatabase(final android.content.Context context) {
android.database.Cursor c = com.buaa556.projecteuler.MainActivity.db.rawQuery("select id from cache", null);
int i = (c.getCount()) + 1;
int count = com.buaa556.projecteuler.MainActivity.dbHelper.generateFrom(i, com.buaa556.projecteul... |
org.LexGrid.relations.AssociationQualification createAssociationQualification(org.semanticweb.owlapi.model.OWLRestriction rdfProp, edu.mayo.informatics.lexgrid.convert.Conversions.SupportedMappings lgSupportedMappings_) {
java.lang.String label = rdfProp.getClassExpressionType().getName();
if (label.isEmpty()) ... | org.LexGrid.relations.AssociationQualification createAssociationQualification(org.semanticweb.owlapi.model.OWLRestriction rdfProp, edu.mayo.informatics.lexgrid.convert.Conversions.SupportedMappings lgSupportedMappings_) {
java.lang.String label;
label = rdfProp.getClassExpressionType().getName();
if (label.... |
public void setMode(com.umbra.manager.modes.Modes state) {
switch (state) {
case BATLLE :
mode = com.umbra.manager.modes.ModesInstantiator.battleModeInstance(characters);
break;
case MAZE :
mode = com.umbra.manager.modes.ModesInstantiator.mazeModeInstance(characte... | public void setMode(com.umbra.manager.modes.Modes state) {
this.state = state;
switch (state) {
case BATLLE :
mode = com.umbra.manager.modes.ModesInstantiator.battleModeInstance(characters);
break;
case MAZE :
mode = com.umbra.manager.modes.ModesInstantiator.m... |
public static parser.pdfbox.model.PdfBoxColor create(float[] rgb) throws java.io.IOException {
java.lang.String rgbStr = (rgb != null) ? java.util.Arrays.toString(rgb) : null;
if (!(parser.pdfbox.model.PdfBoxColor.colorMap.containsKey(rgbStr))) {
parser.pdfbox.model.PdfBoxColor.colorMap.put(rgbStr, new ... | public static parser.pdfbox.model.PdfBoxColor create(float[] rgb) throws java.io.IOException {
if (rgb == null) {
rgb = new float[]{ 0 , 0 , 0 };
}
java.lang.String rgbStr = java.util.Arrays.toString(rgb);
if (!(parser.pdfbox.model.PdfBoxColor.colorMap.containsKey(rgbStr))) {
parser.pdfb... |
public org.kurento.repository.RepositoryItem createRepositoryItem(java.lang.String id) {
if (!(gridFS.find(idQuery(id)).isEmpty())) {
throw new org.kurento.repository.DuplicateItemException(id);
}
com.mongodb.gridfs.GridFSInputFile dbFile = gridFS.createFile(id);
dbFile.setId(id);
return cre... | public org.kurento.repository.RepositoryItem createRepositoryItem(java.lang.String id) {
if (!(gridFS.find(id).isEmpty())) {
throw new org.kurento.repository.DuplicateItemException(id);
}
com.mongodb.gridfs.GridFSInputFile dbFile = gridFS.createFile(id);
dbFile.setId(id);
return createReposi... |
private void syncUpdates() {
java.util.List<byte[]> updates = remoteJedis.lrange(org.ulyssis.ipp.config.Config.getCurrentConfig().getUpdatesList().getBytes(), 0L, (-1L));
for (byte[] update : updates) {
processMessage(update);
}
lastUpdate = (updates.size()) - 1L;
} | private void syncUpdates() {
java.util.List<byte[]> updates = remoteJedis.lrange(org.ulyssis.ipp.config.Config.getCurrentConfig().getUpdatesList().getBytes(), ((lastUpdate) + 1), (-1L));
for (byte[] update : updates) {
processMessage(update);
}
lastUpdate += updates.size();
} |
public static void PrintNodeList(java.util.ArrayList<Node> list) {
for (int i = 0; i < (list.size()); i++) {
java.lang.System.out.print(java.lang.String.format("%d ", list.get(i).data));
}
} | public static void PrintNodeList(java.util.ArrayList<Node> list) {
if (list == null) {
return ;
}
for (int i = 0; i < (list.size()); i++) {
java.lang.System.out.print(java.lang.String.format("%d ", list.get(i).data));
}
} |
private void setCommentsId(com.hn.nishant.nvhn.model.Story story, java.util.HashMap<java.lang.String, java.lang.Object> hm) {
java.util.ArrayList<java.lang.Long> kids = ((java.util.ArrayList<java.lang.Long>) (hm.get("kids")));
if (kids != null) {
io.realm.RealmList<com.hn.nishant.nvhn.util.RealmInteger>... | private void setCommentsId(com.hn.nishant.nvhn.model.Story story, java.util.HashMap<java.lang.String, java.lang.Object> hm) {
java.util.ArrayList<java.lang.Long> kids = ((java.util.ArrayList<java.lang.Long>) (hm.get("kids")));
if (kids != null) {
io.realm.RealmList<com.hn.nishant.nvhn.util.RealmInteger>... |
private int slotForKey(java.lang.String key) {
java.nio.ByteBuffer bytes = java.nio.charset.StandardCharsets.UTF_8.encode(key);
int sum = 0;
for (int i : bytes.array()) {
sum = (sum * 17) + i;
}
return sum % (config.getNumSlots());
} | private int slotForKey(java.lang.String key) {
java.nio.ByteBuffer bytes = java.nio.charset.StandardCharsets.UTF_8.encode(key);
int sum = 0;
for (int i : bytes.array()) {
sum = (sum * 17) + i;
}
return (java.lang.Math.abs(sum)) % (config.getNumSlots());
} |
public boolean itemDrop(java.lang.Character deadChar) {
int chance = rnd.nextInt(100);
if (chance < 20) {
if (chance < 10) {
int loc = deadChar.getLocation();
CurvedTestGrade ctg = new CurvedTestGrade(loc[0], loc[1], loc[2], loc[3], loc[4]);
addThing(ctg, loc[3], loc[... | public boolean itemDrop(java.lang.Character deadChar) {
int chance = rnd.nextInt(100);
if (chance < 20) {
if (chance < 10) {
int[] loc = deadChar.getLocation();
CurvedTestGrade ctg = new CurvedTestGrade(loc[0], loc[1], loc[2], loc[3], loc[4]);
addThing(ctg, loc[3], lo... |
private void songTimeBarStateChanged(javax.swing.event.ChangeEvent evt) {
if ((java.lang.Math.abs(((songTimeBar.getValue()) - ((mpModel.getCurrentSong().getElapsedTime()) * 1000)))) >= (GUI.MusicPlayerView.speedConstant)) {
mpModel.seek(songTimeBar.getValue());
}
} | private void songTimeBarStateChanged(javax.swing.event.ChangeEvent evt) {
if ((!(mpModel.isEmpty())) && ((java.lang.Math.abs(((songTimeBar.getValue()) - ((mpModel.getCurrentSong().getElapsedTime()) * 1000)))) >= (GUI.MusicPlayerView.speedConstant))) {
mpModel.seek(songTimeBar.getValue());
}
} |
public void keyReleased(java.awt.event.KeyEvent e) {
java.lang.System.out.println(e.getKeyCode());
for (java.lang.Character person : characters) {
if (person.keysPressed.contains(e.getKeyCode()))
person.keysPressed.remove(e.getKeyCode());
}
if ((e.getKeyCode()) == (java.awt.... | public void keyReleased(java.awt.event.KeyEvent e) {
for (java.lang.Character person : characters) {
if (person.keysPressed.contains(e.getKeyCode()))
person.keysPressed.remove(e.getKeyCode());
}
if ((e.getKeyCode()) == (java.awt.event.KeyEvent.VK_SHIFT)) {
shouldShowHitb... |
public void onClick(android.view.View v) {
if (com.aidanas.torch.Const.DEBUG)
android.util.Log.v(com.aidanas.torch.fragments.MainFragment.TAG, ("In onClick(), isLightOn = " + (isLightOn)));
if (isLightOn) {
lightOn((!(isLightOn)));
getActivity().setRequestedOrientation(ActivityInfo.... | public void onClick(android.view.View v) {
if (com.aidanas.torch.Const.DEBUG)
android.util.Log.v(com.aidanas.torch.fragments.MainFragment.TAG, ("In onClick(), isLightOn = " + (isLightOn)));
if (isLightOn) {
lightOn((!(isLightOn)));
btn.setText(R.string.ma_btn_txt_lights_up);
... |
public java.lang.String eth_call(org.ethereum.jsonrpc.CallArguments args, java.lang.String bnOrId) throws java.lang.Exception {
if (org.ethereum.jsonrpc.JsonRpcImpl.logger.isDebugEnabled())
org.ethereum.jsonrpc.JsonRpcImpl.logger.debug((("eth_call(" + args) + ")"));
org.ethereum.vm.program.ProgramR... | public java.lang.String eth_call(org.ethereum.jsonrpc.CallArguments args, java.lang.String bnOrId) throws java.lang.Exception {
java.lang.String s = null;
try {
org.ethereum.vm.program.ProgramResult res = createCallTxAndExecute(args, getByJsonBlockId(bnOrId));
return s = org.ethereum.jsonrpc.Typ... |
private void initialize() {
javafx.scene.image.Image img = new javafx.scene.image.Image(awktal.mule.TownController.class.getResourceAsStream("town_pictures/town.png"));
javafx.scene.layout.BackgroundSize size = new javafx.scene.layout.BackgroundSize(javafx.scene.layout.BackgroundSize.AUTO, javafx.scene.layout.B... | private void initialize() {
javafx.scene.image.Image img = new javafx.scene.image.Image(awktal.mule.TownController.class.getResourceAsStream("town_pictures/town.png"));
javafx.scene.layout.BackgroundSize size = new javafx.scene.layout.BackgroundSize(javafx.scene.layout.BackgroundSize.AUTO, javafx.scene.layout.B... |
protected int processEvent(de.uni_hildesheim.sse.monitoring.runtime.recordingStrategies.RecordingStrategiesElement event) {
int result = event.getIdentification();
try {
handleEvent(event);
event.clear();
event.release();
} catch (de.uni_hildesheim.sse.monitoring.runtime.recordingStr... | protected int processEvent(de.uni_hildesheim.sse.monitoring.runtime.recordingStrategies.RecordingStrategiesElement event) {
int result = event.getIdentification();
try {
handleEvent(event);
event.release();
} catch (de.uni_hildesheim.sse.monitoring.runtime.recordingStrategies.AbstractEventRe... |
public static int bigToLittleEndian(int data) {
int value = 0;
value = ((((data & -16777216) >> 24) | ((data & 16711680) >> 8)) | ((data & 65280) << 8)) | ((data & 255) << 24);
return value;
} | public static int bigToLittleEndian(int data) {
int value;
value = ((((data >> 24) & 255) | ((data >> 8) & 65280)) | ((data << 8) & 16711680)) | ((data << 24) & -16777216);
return value;
} |
public void subReputation(long amount) {
long globalMax = io.github.griffenx.CityZen.CityZen.getPlugin().getConfig().getLong("reputation.maximum");
long rep;
if ((amount < 0) && ((java.lang.Math.abs(amount)) > (globalMax - (getReputation()))))
rep = globalMax;
else
rep = (getReputation()... | public void subReputation(long amount) {
long globalMax = io.github.griffenx.CityZen.CityZen.getPlugin().getConfig().getLong("reputation.maximum");
long rep;
if ((amount < 0) && ((java.lang.Math.abs(amount)) > (globalMax - (getReputation()))))
rep = globalMax;
else
rep = (getReputation()... |
public short getBlockAt(int relativeX, int relativeY, int relativeZ) {
return ((relativeX < (Chunk.X_MAX)) && (relativeY < (Chunk.Y_MAX))) && (relativeZ < (Chunk.Z_MAX)) ? blocks[relativeX][relativeY][relativeZ] : BlockType.AIR.getBlockId();
} | public short getBlockAt(int relativeX, int relativeY, int relativeZ) {
return (((((relativeX < (Chunk.X_MAX)) && (relativeY < (Chunk.Y_MAX))) && (relativeZ < (Chunk.Z_MAX))) && (relativeX > (-1))) && (relativeY > (-1))) && (relativeZ > (-1)) ? blocks[relativeX][relativeY][relativeZ] : BlockType.AIR.getBlockId();
} |
public void sendSMSAndEmailToApplicantForLettertoparty(final org.egov.bpa.application.entity.BpaApplication bpaApplication) {
if ((isSmsEnabled()) || (isEmailEnabled())) {
buildSmsAndEmailForBPANewAppln(bpaApplication, bpaApplication.getOwner().getUser().getName(), bpaApplication.getOwner().getUser().getEma... | public void sendSMSAndEmailToApplicantForLettertoparty(final org.egov.bpa.application.entity.BpaApplication bpaApplication) {
if ((isSmsEnabled()) || (isEmailEnabled())) {
buildSmsAndEmailForBPANewAppln(bpaApplication, bpaApplication.getOwner().getUser().getName(), bpaApplication.getOwner().getUser().getMob... |
public void signIn() throws java.lang.Exception {
try {
startTestCase("makePost");
java.lang.System.out.println("signIn");
org.openqa.selenium.WebElement element = new org.openqa.selenium.support.ui.WebDriverWait(driver, 60).until(org.openqa.selenium.support.ui.ExpectedConditions.presenceOfE... | public void signIn() throws java.lang.Exception {
try {
java.lang.System.out.println("signIn");
org.openqa.selenium.WebElement element = new org.openqa.selenium.support.ui.WebDriverWait(driver, 60).until(org.openqa.selenium.support.ui.ExpectedConditions.presenceOfElementLocated(org.openqa.selenium.B... |
private static void jj_la1_init_1() {
caesar.Caesar.jj_la1_1 = new int[]{ 0 , 128 , 0 , 1792 , 1792 , 0 , 0 , 1792 , 0 , 126 , 1792 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1792 , 0 , 128 , 128 , 0 , 1792 , 1792 , 0 };
} | private static void jj_la1_init_1() {
caesar.Caesar.jj_la1_1 = new int[]{ 0 , 128 , 0 , 1792 , 0 , 0 , 1792 , 0 , 126 , 1792 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1792 , 0 , 128 , 128 , 0 , 1792 , 0 };
} |
public static boolean operator_lessThan(org.eclipse.smarthome.core.types.Type type, java.lang.Number x) {
if ((type != null) && (type instanceof org.eclipse.smarthome.core.library.types.DecimalType)) {
return (((org.eclipse.smarthome.core.library.types.DecimalType) (type)).toBigDecimal().compareTo(org.eclip... | public static boolean operator_lessThan(org.eclipse.smarthome.core.types.Type type, java.lang.Number x) {
if (((type != null) && (type instanceof org.eclipse.smarthome.core.library.types.DecimalType)) && (x != null)) {
return (((org.eclipse.smarthome.core.library.types.DecimalType) (type)).toBigDecimal().co... |
public void reloadMDData(com.moneydance.modules.features.invextension.ReportConfig reportConfig) throws java.lang.Exception {
if ((featureModuleContext) != null) {
initializeMDDataInApplication();
currentInfo = new com.moneydance.modules.features.invextension.BulkSecInfo(accountBook, reportConfig);
... | public void reloadMDData(com.moneydance.modules.features.invextension.ReportConfig reportConfig) throws java.lang.Exception {
if ((featureModuleContext) != null) {
initializeMDDataInApplication(false);
currentInfo = new com.moneydance.modules.features.invextension.BulkSecInfo(accountBook, reportConf... |
void onCreateImpl(@android.support.annotation.NonNull
V v, @android.support.annotation.NonNull
android.content.Context context) {
if (!(v.isInEditMode())) {
allowScreenViewCalls = true;
v.onCreate(context);
allowScreenViewCalls = false;
VP presenter = getPresenter(v);
if (pre... | void onCreateImpl(@android.support.annotation.NonNull
V v, @android.support.annotation.NonNull
android.content.Context context) {
if (!(v.isInEditMode())) {
VP presenter = getPresenter(v, true);
allowScreenViewCalls = true;
v.onCreate(context);
allowScreenViewCalls = false;
i... |
private static int calculate() {
int answer = 0;
java.lang.String[] inputArray = RNC.stack1.toArray(new java.lang.String[0]);
java.lang.System.out.print("\nThe Roman Numeral you entered to calculate is: ");
for (int i = (inputArray.length) - 1; i >= 0; i--) {
java.lang.System.out.print(inputArra... | private static int calculate() {
int answer = 0;
java.lang.String[] inputArray = RNC.stack1.toArray(new java.lang.String[0]);
java.lang.System.out.print("\nThe Roman Numeral you entered to calculate is: ");
for (int i = 0; i < (inputArray.length); i++) {
java.lang.System.out.print(inputArray[i])... |
public void t_CheckBasicCounts() {
java.util.Map<java.lang.String, java.lang.Object> parameters = new java.util.HashMap<>();
parameters.put(com.intuit.wasabi.tests.service.CountIntegrationTest.FROM_TIME, "");
com.intuit.wasabi.tests.model.analytics.AnalyticsParameters params = new com.intuit.wasabi.tests.mo... | public void t_CheckBasicCounts() {
java.util.Map<java.lang.String, java.lang.Object> parameters = new java.util.HashMap<>();
parameters.put(com.intuit.wasabi.tests.service.CountIntegrationTest.FROM_TIME, "");
java.util.List<com.intuit.wasabi.tests.model.Event> events = postEvents(experiment, parameters, tru... |
public static void main(java.lang.String[] args) throws java.lang.Exception {
if ((args.length) != 2) {
java.lang.System.out.println("Usage: java -cp PanelSegJ.jar ExpLabelDetectHogBootstrap <Sample List File> <target folder>");
java.lang.System.out.println(" This is a utility program to Collect neg... | public static void main(java.lang.String[] args) throws java.lang.Exception {
if ((args.length) != 2) {
java.lang.System.out.println("Usage: java -cp PanelSegJ.jar ExpLabelDetectHogBootstrap <Sample List File> <target folder>");
java.lang.System.out.println(" This is a utility program to Collect neg... |
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int widthMode = com.db.chart.view.MeasureSpec.getMode(widthMeasureSpec);
int heightMode = com.db.chart.view.MeasureSpec.getMode(heightMeasureSpec);
int tmpWidth = widthMeasureSpec;
int tmpHeight = heightMeasureSpec;
if (widthMode =... | public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int widthMode = com.db.chart.view.MeasureSpec.getMode(widthMeasureSpec);
int heightMode = com.db.chart.view.MeasureSpec.getMode(heightMeasureSpec);
int tmpWidth = widthMeasureSpec;
... |
public static void loadUserSession(android.content.Context context) {
android.content.SharedPreferences savedSession = context.getSharedPreferences(com.bridginggood.UserSessionStore.KEY, Context.MODE_PRIVATE);
com.bridginggood.UserInfo.setTokenString(savedSession.getString(com.bridginggood.UserSessionStore.TOKE... | public static void loadUserSession(android.content.Context context) {
android.content.SharedPreferences savedSession = context.getSharedPreferences(com.bridginggood.UserSessionStore.KEY, Context.MODE_PRIVATE);
com.bridginggood.UserInfo.setTokenString(savedSession.getString(com.bridginggood.UserSessionStore.TOKE... |
public static <T extends util.RegisteredEntity> java.util.List<T> getAll(java.lang.Class<T> c) {
if (util.RegisteredEntity.ALL.containsKey(c)) {
return ((java.util.List) (util.RegisteredEntity.ALL.get(c)));
}else {
return new java.util.LinkedList();
}
} | public static <T extends util.RegisteredEntity> java.util.List<T> getAll(java.lang.Class<T> c) {
if (util.RegisteredEntity.ALL.containsKey(c)) {
return new java.util.ArrayList(util.RegisteredEntity.ALL.get(c));
}else {
return new java.util.LinkedList();
}
} |
protected boolean oneBackward() {
try {
if (!(resultset.isClosed())) {
if (resultset.previous()) {
if (resultset.isBeforeFirst())
resultset.first();
java.lang.System.out.println(resultset.getRow());
return true;... | protected boolean oneBackward() {
try {
if (!(resultset.isClosed())) {
if (resultset.previous()) {
return true;
}
if (resultset.isBeforeFirst()) {
resultset.first();
}
}else {
updateConnection();
... |
public void storeWord(Hex index, Hex word) {
int i = index.toInt();
if (((word.compareTo(Simpletron.MAX_WORD)) > 0) || ((word.compareTo(Simpletron.MIN_WORD)) < 0)) {
fatalError("*** overflow occured ***");
}
if ((i > ((Simpletron.MEMORY_SIZE) - 1)) || (i < 0)) {
fatalError("*** index out... | public void storeWord(Hex index, Hex word) {
int i = index.toInt();
if (((word.compareTo(Simpletron.MAX_WORD)) > 0) || ((word.compareTo(Simpletron.MIN_WORD)) < 0)) {
fatalError("*** overflow occured ***");
}
if ((i > ((Simpletron.MEMORY_SIZE) - 1)) || (i < 0)) {
fatalError("*** index out... |
public void textChange(com.vaadin.event.FieldEvents.TextChangeEvent event) {
java.lang.String pid = event.getText();
tk.packattk.utils.Person p = tk.packattk.utils.DatabaseWrappers.getPerson(pid);
if (p != null) {
java.util.Collection<java.lang.Package> packages = tk.packattk.utils.DatabaseWrappers.... | public void textChange(com.vaadin.event.FieldEvents.TextChangeEvent event) {
java.lang.String pid = event.getText();
tk.packattk.utils.Person p = tk.packattk.utils.DatabaseWrappers.getPerson(pid);
if (p != null) {
java.util.Collection<java.lang.Package> packages = tk.packattk.utils.DatabaseWrappers.... |
public java.lang.String useChatbotCheckers(java.lang.String input) {
java.lang.String checkedInput = "";
if (stupidBot.memeChecker(input)) {
checkedInput += "\nYou like memes!\n";
}
if (stupidBot.contentChecker(input)) {
checkedInput += "\nYou know my secret topic!n";
}
if ((chec... | private java.lang.String useChatbotCheckers(java.lang.String input) {
java.lang.String checkedInput = "";
if (stupidBot.memeChecker(input)) {
checkedInput += "\nYou like memes!\n";
}
if (stupidBot.contentChecker(input)) {
checkedInput += "\nYou know my secret topic!n";
}
if ((che... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
initViews();
addEvents();
operation = new com.usr.thermostat.Operations(socketHandler);
count = new com.usr.thermostat.MainActivity.Counter();
java.lang.Thread c... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
initViews();
addEvents();
operation = new com.usr.thermostat.Operations(this, socketHandler);
count = new com.usr.thermostat.MainActivity.Counter();
java.lang.Th... |
public int removeDuplicates(int[] nums) {
if (nums == null)
return 0;
else
if ((nums.length) == 1)
return 1;
else {
for (int i = 1; i < (nums.length); i++) {
if ((nums[i]) != (nums[(i - 1)])) {
(Solution.result)++;
... | public int removeDuplicates(int[] nums) {
int result = 1;
if (nums == null)
return 0;
else
if ((nums.length) == 1)
return 1;
else {
for (int i = 1; i < (nums.length); i++) {
if ((nums[i]) != (nums[(i - 1)])) {
result++;
... |
public void onStop() {
handler.removeCallbacks(seekUpdateTask);
mMediaPlayer.stop();
mMediaPlayer.setAudioStreamType(AudioManager.MODE_NORMAL);
mMediaPlayer.release();
mAudioManager.setMode(AudioManager.MODE_NORMAL);
mAudioManager.setSpeakerphoneOn(true);
mPreferences.getPreferences().edit()... | public void onStop() {
handler.removeCallbacks(seekUpdateTask);
mMediaPlayer.stop();
mMediaPlayer.setAudioStreamType(AudioManager.MODE_NORMAL);
mMediaPlayer.release();
mAudioManager.setMode(AudioManager.MODE_NORMAL);
mAudioManager.setSpeakerphoneOn(true);
mPreferences.getPreferences().edit()... |
private boolean checkIfHasToSteal(java.lang.Integer lastBowl) {
if (table.getContainerByIndex(lastBowl).isTray())
return false;
else
if ((table.getContainerByIndex(lastBowl).getNumSeeds()) != 0)
return false;
else
if (getActivePlayerId().equals(table.getPlayerIdBy... | private boolean checkIfHasToSteal(java.lang.Integer lastBowl) {
if (table.getContainerByIndex(lastBowl).isTray())
return false;
else
if ((table.getContainerByIndex(lastBowl).getNumSeeds()) != 1)
return false;
else
if (getActivePlayerId().equals(table.getPlayerIdBy... |
public org.lightcouch.Response post(java.lang.Object object) {
org.lightcouch.internal.CouchDbUtil.assertNotEmpty(object, "object");
org.lightcouch.HttpResponse response = null;
try {
java.net.URI uri = org.lightcouch.internal.URIBuilder.buildUri(getDBUri()).build();
response = client.post(u... | public org.lightcouch.Response post(java.lang.Object object) {
org.lightcouch.internal.CouchDbUtil.assertNotEmpty(object, "object");
org.lightcouch.Response response = null;
java.net.URI uri = org.lightcouch.internal.URIBuilder.buildUri(getDBUri()).build();
response = client.post(uri);
return respon... |
private void ensureMinIdle(final K key) throws java.lang.Exception {
final org.apache.commons.pool2.impl.GenericKeyedObjectPool<K, T>.ObjectDeque<T> objectDeque = poolMap.get(key);
final int deficit = calculateDeficit(objectDeque);
for (int i = 0; (i < deficit) && ((calculateDeficit(objectDeque)) > 0); i++)... | private void ensureMinIdle(final K key) throws java.lang.Exception {
org.apache.commons.pool2.impl.GenericKeyedObjectPool<K, T>.ObjectDeque<T> objectDeque = poolMap.get(key);
final int deficit = calculateDeficit(objectDeque);
for (int i = 0; (i < deficit) && ((calculateDeficit(objectDeque)) > 0); i++) {
... |
public void onAnimationEnd(android.support.v4.animation.ValueAnimatorCompat animation) {
super.onAnimationEnd(animation);
if (this.mOverridden) {
return ;
}
if (swipeDir <= 0) {
mCallback.clearView(mRecyclerView, prevSelected);
}else {
mPendingCleanup.add(prevSelected.itemVie... | public void onAnimationEnd(android.support.v4.animation.ValueAnimatorCompat animation) {
super.onAnimationEnd(animation);
if (this.mOverridden) {
return ;
}
if (swipeDir <= 0) {
mCallback.clearView(mRecyclerView, prevSelected);
}else {
mPendingCleanup.add(prevSelected.itemVie... |
public java.util.List<T> deserialiseToList(java.lang.String values) {
try {
java.lang.Object outputs = com.acuo.collateral.transform.margin.DisputeTransformer.getMarginCall().disputeResponse(values);
return java.util.Arrays.asList(((T[]) (outputs)));
} catch (com.tracegroup.transformer.exposedse... | public java.util.List<T> deserialiseToList(java.lang.String values) {
try {
java.lang.Object outputs = com.acuo.collateral.transform.margin.DisputeTransformer.getMarginCall().disputeResponse(values, new java.lang.String[]{ });
return java.util.Arrays.asList(((T[]) (outputs)));
} catch (com.trac... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.