buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public org.openhab.binding.zwave.internal.protocol.transaction.ZWaveCommandClassTransactionPayload getUserCode(int id) {
org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveUserCodeCommandClass.logger.debug("NODE {}: Creating new message for application command USER_CODE_GET({})", this.getNode().getNodeId... | public org.openhab.binding.zwave.internal.protocol.transaction.ZWaveCommandClassTransactionPayload getUserCode(int id) {
org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveUserCodeCommandClass.logger.debug("NODE {}: Creating new message for application command USER_CODE_GET({})", getNode().getNodeId(), i... |
public static void processKeyEvent(int keyCode, me.simonhaasnoot.geinigspel.game.input.key.KeyEventType eventType) {
switch (eventType) {
case PRESSED :
if (!(me.simonhaasnoot.geinigspel.game.input.Input.pressedKeys.contains(keyCode))) {
me.simonhaasnoot.geinigspel.game.input.Inp... | public static void processKeyEvent(int keyCode, me.simonhaasnoot.geinigspel.game.input.key.KeyEventType eventType) {
switch (eventType) {
case PRESSED :
if (!(me.simonhaasnoot.geinigspel.game.input.Input.pressedKeys.contains(keyCode))) {
me.simonhaasnoot.geinigspel.game.input.Inp... |
public int setCandidatesProcessed(@lombok.NonNull
final java.util.List<java.lang.Integer> huIds) {
if (huIds.isEmpty()) {
return 0;
}
final org.adempiere.ad.dao.IQueryBL queryBL = org.adempiere.util.Services.get(org.adempiere.ad.dao.IQueryBL.class);
final org.adempiere.ad.dao.ICompositeQueryUpda... | public int setCandidatesProcessed(@lombok.NonNull
final java.util.List<java.lang.Integer> huIds) {
if (huIds.isEmpty()) {
return 0;
}
final org.adempiere.ad.dao.IQueryBL queryBL = org.adempiere.util.Services.get(org.adempiere.ad.dao.IQueryBL.class);
final org.adempiere.ad.dao.ICompositeQueryUpda... |
public void start(javafx.stage.Stage stage) {
this.eventBus = new com.google.common.eventbus.EventBus("Test Event Bus");
this.mockCameraSourceFactory = new edu.wpi.grip.ui.pipeline.AddSourceViewTest.AddSourceViewNoExceptionsTest.MockCameraSourceFactory(eventBus);
addSourceView = new edu.wpi.grip.ui.pipeline... | public void start(javafx.stage.Stage stage) {
this.eventBus = new com.google.common.eventbus.EventBus("Test Event Bus");
this.mockCameraSourceFactory = new edu.wpi.grip.ui.pipeline.AddSourceViewTest.AddSourceViewNoExceptionsTest.MockCameraSourceFactory(eventBus);
addSourceView = new edu.wpi.grip.ui.pipeline... |
public void saveProjectAs() {
fc.getExtensionFilters().clear();
fc.getExtensionFilters().add(extFilterProject);
java.io.File file = fc.showSaveDialog(de.uni_hannover.sra.minimax_simulator.Main.getPrimaryStage());
new de.uni_hannover.sra.minimax_simulator.ui.actions.ProjectSaveTo().save(file);
} | public boolean saveProjectAs() {
fc.getExtensionFilters().clear();
fc.getExtensionFilters().add(extFilterProject);
java.io.File file = fc.showSaveDialog(de.uni_hannover.sra.minimax_simulator.Main.getPrimaryStage());
return new de.uni_hannover.sra.minimax_simulator.ui.actions.ProjectSaveTo().save(file);
... |
private void printText(java.lang.String text) {
if ((text.length()) > (Output.ConsoleOutput.lineLenght)) {
java.lang.String[] lines = getMultipleLines(text);
for (int i = 0; i < (lines.length); i++) {
java.lang.System.out.println(lines[i]);
}
}
} | private void printText(java.lang.String text) {
if ((text.length()) > (Output.ConsoleOutput.lineLenght)) {
java.lang.String[] lines = getMultipleLines(text);
for (int i = 0; i < (lines.length); i++) {
java.lang.System.out.println(lines[i]);
}
}else {
java.lang.System.... |
public boolean onNavigationItemSelected(android.view.MenuItem item) {
samsung.labo.pl.locateyourtask.activities.MainActivity.itemId = item.getItemId();
samsung.labo.pl.locateyourtask.activities.MainActivity.DrawerFragmentItem drawerFragmentItem = samsung.labo.pl.locateyourtask.activities.MainActivity.findDrawer... | public boolean onNavigationItemSelected(android.view.MenuItem item) {
samsung.labo.pl.locateyourtask.activities.MainActivity.DrawerFragmentItem drawerFragmentItem = samsung.labo.pl.locateyourtask.activities.MainActivity.findDrawerItemFragmentWithId(item.getItemId());
if (drawerFragmentItem != null) {
op... |
public boolean isOpen(int row, int col) {
checkValidInput(row);
checkValidInput(col);
row = row - 1;
col = col - 1;
if ((grid[row][col]) == (open)) {
return true;
}else {
return false;
}
} | public boolean isOpen(int row, int col) {
checkValidInput(row);
checkValidInput(col);
if ((grid[(row - 1)][(col - 1)]) == (open)) {
return true;
}else {
return false;
}
} |
private eionet.webq.dao.orm.UserFile userFileServiceWillReturnUserFileFromCdr() {
eionet.webq.dao.orm.UserFile userFile = new eionet.webq.dao.orm.UserFile();
userFile.setId(1);
userFile.setFromCdr(true);
userFile.setAuthorized(true);
org.mockito.Mockito.when(userFileHelper.getUserFile(org.mockito.Ma... | private eionet.webq.dao.orm.UserFile userFileServiceWillReturnUserFileFromCdr() {
eionet.webq.dao.orm.UserFile userFile = new eionet.webq.dao.orm.UserFile();
userFile.setId(1);
userFile.setFromCdr(true);
userFile.setAuthorized(true);
when(userFileHelper.getUserFile(org.mockito.Matchers.anyInt(), org... |
@java.lang.Override
void doIt(float tpf) {
logo3d.desktop.TurtleControl.LOG.debug("current slerp: {}, tpf {} , speed {}", currentSlerp, tpf, activeDirection.speedCoefficient);
currentSlerp += tpf * (activeDirection.speedCoefficient);
com.jme3.math.Quaternion thisRotation = new com.jme3.math.Quaternion();
... | @java.lang.Override
void doIt(float tpf) {
currentSlerp += tpf * (activeDirection.speedCoefficient);
com.jme3.math.Quaternion thisRotation = new com.jme3.math.Quaternion();
thisRotation.slerp(localRotation, targetRotation, currentSlerp);
turtle.setLocalRotation(thisRotation);
if ((currentSlerp) >= 1... |
@org.dasein.cloud.azure.tests.network.Mock(invocations = 1)
java.lang.String post(java.lang.String resource, java.lang.Object definitionResponseModel) {
org.junit.Assert.assertEquals("Post method not called with correct resource string", resource, java.lang.String.format(AzureLoadBalancerSupport.RESOURCE_DEFINITION... | @org.dasein.cloud.azure.tests.network.Mock(invocations = 1)
java.lang.String post(java.lang.String resource, java.lang.Object definitionResponseModel) {
assertEquals("Post method not called with correct resource string", resource, java.lang.String.format(AzureLoadBalancerSupport.RESOURCE_DEFINITIONS, LOAD_BALANCER_... |
public void onCommonResponded(cn.bit.hao.ble.tool.response.events.CommonResponseEvent commonResponseEvent) {
if (commonResponseEvent instanceof cn.bit.hao.ble.tool.response.events.bluetooth.BluetoothGattEvent) {
java.lang.String macAddress = ((cn.bit.hao.ble.tool.response.events.bluetooth.BluetoothGattEvent... | public void onCommonResponded(cn.bit.hao.ble.tool.response.events.CommonResponseEvent commonResponseEvent) {
if (commonResponseEvent instanceof cn.bit.hao.ble.tool.response.events.bluetooth.BluetoothGattEvent) {
java.lang.String macAddress = ((cn.bit.hao.ble.tool.response.events.bluetooth.BluetoothGattEvent... |
public static com.drewhannay.chesscrafter.models.PieceType getQueenPieceType() {
java.util.Map<com.drewhannay.chesscrafter.models.Direction, java.lang.Integer> movements = com.google.common.collect.Maps.newHashMap();
for (com.drewhannay.chesscrafter.models.Direction direction : com.drewhannay.chesscrafter.model... | public static com.drewhannay.chesscrafter.models.PieceType getQueenPieceType() {
java.util.Map<com.drewhannay.chesscrafter.models.Direction, java.lang.Integer> movements = com.google.common.collect.Maps.newHashMap();
for (com.drewhannay.chesscrafter.models.Direction direction : com.drewhannay.chesscrafter.model... |
private void changeState() {
if (isGameDraw()) {
state = GameState.DRAW;
}else
if (state.equals(GameState.X_TURN)) {
state = (board.hasDrawnLineFor(CellValue.X)) ? GameState.X_WON : GameState.O_TURN;
}else {
state = (board.hasDrawnLineFor(CellValue.O)) ? GameState... | private void changeState() {
if (board.hasDrawnLineFor(CellValue.X)) {
state = GameState.X_WON;
}else
if (board.hasDrawnLineFor(CellValue.O)) {
state = GameState.O_WON;
}else
if (isGameDraw()) {
state = GameState.DRAW;
}else
... |
public void removeNode(model.Node parent, model.Node child) {
parent.getChildren().remove(child);
for (javax.swing.event.TreeModelListener l : listeners) {
l.treeNodesRemoved(new javax.swing.event.TreeModelEvent(this, getPathToRoot(parent), new int[]{ getIndexOfChild(parent, child) }, new java.lang.Obje... | public void removeNode(model.Node parent, model.Node child) {
for (javax.swing.event.TreeModelListener l : listeners) {
l.treeNodesRemoved(new javax.swing.event.TreeModelEvent(this, getPathToRoot(parent), new int[]{ getIndexOfChild(parent, child) }, new java.lang.Object[]{ child }));
}
parent.getChi... |
public void onTimeSet(android.widget.TimePicker view, int hourOfDay, int minute) {
hour = hourOfDay;
mins = minute;
if (v == (startTime)) {
startTimeStr = (((hour) + ":") + (mins)) + ":00";
}else
if (v == (endTime)) {
endTimeStr = (((hour) + ":") + (mins)) + ":00";
}
... | public void onTimeSet(android.widget.TimePicker view, int hourOfDay, int minute) {
hour = hourOfDay;
mins = minute;
if (v == (startTime)) {
startTimeStr = (((hour) + ":") + (mins)) + ":00";
startTime.setText(startTimeStr);
}else
if (v == (endTime)) {
endTimeStr = (((h... |
public void testNAK() throws java.lang.Exception {
com.whizzosoftware.wzwave.codec.ZWaveFrameDecoder decoder = new com.whizzosoftware.wzwave.codec.ZWaveFrameDecoder();
java.util.List<java.lang.Object> out = new java.util.ArrayList<java.lang.Object>();
io.netty.buffer.ByteBuf in = wrappedBuffer(new byte[]{ 2... | public void testNAK() throws java.lang.Exception {
com.whizzosoftware.wzwave.codec.ZWaveFrameDecoder decoder = new com.whizzosoftware.wzwave.codec.ZWaveFrameDecoder();
java.util.List<java.lang.Object> out = new java.util.ArrayList<java.lang.Object>();
io.netty.buffer.ByteBuf in = wrappedBuffer(new byte[]{ 2... |
public java.lang.String addAppointment(@javax.validation.Valid
com.medman.controllers.AppointmentTime appointmentTime, org.springframework.validation.Errors validation, org.springframework.ui.Model model) {
if (validation.hasErrors()) {
model.addAttribute("errors", validation);
model.addAttribute("a... | public java.lang.String addAppointment(@javax.validation.Valid
com.medman.controllers.AppointmentTime appointmentTime, org.springframework.validation.Errors validation, org.springframework.ui.Model model) {
if (validation.hasErrors()) {
model.addAttribute("errors", validation);
model.addAttribute("a... |
public int onStartCommand(final android.content.Intent intent, int flags, int startId) {
int result = super.onStartCommand(intent, flags, startId);
interruptAndWait();
synchronized(workerThread) {
android.widget.Toast.makeText(this, getString(R.string.notify_sync_start), Toast.LENGTH_SHORT).show();
... | public int onStartCommand(final android.content.Intent intent, int flags, int startId) {
int result = super.onStartCommand(intent, flags, startId);
android.widget.Toast.makeText(this, getString(R.string.notify_sync_start), Toast.LENGTH_SHORT).show();
workerThread = new java.lang.Thread(new java.lang.Runnabl... |
protected void onSaveInstanceState(android.os.Bundle outState) {
if ((artists) == null) {
outState.putParcelableArrayList(com.bli.spotifystreamer.ArtistSearchActivity.KEY_PARCELABLE_ARTIST_LIST, artists);
int position = artistsListView.getFirstVisiblePosition();
outState.putInt("listViewPosi... | protected void onSaveInstanceState(android.os.Bundle outState) {
outState.putParcelableArrayList(com.bli.spotifystreamer.ArtistSearchActivity.KEY_PARCELABLE_ARTIST_LIST, artists);
int position = artistsListView.getFirstVisiblePosition();
outState.putInt("listViewPosition", position);
android.view.View v... |
private void RestoreFragmentsStates(android.os.Bundle savedInstanceState) {
com.example.kamil.astroweather.MainActivity.currentPages = new java.util.HashMap<>();
if ((getSupportFragmentManager().getFragments()) != null) {
if (com.example.kamil.astroweather.MainActivity.isTablet) {
com.exampl... | private void RestoreFragmentsStates(android.os.Bundle savedInstanceState) {
com.example.kamil.astroweather.MainActivity.currentPages = new java.util.HashMap<>();
if ((getSupportFragmentManager().getFragments()) != null) {
if (com.example.kamil.astroweather.MainActivity.isTablet) {
com.exampl... |
private void setTimer(com.rdt.Packet pkt, long seqNo) {
if (timeoutMap.containsKey(seqNo)) {
timeoutMap.remove(seqNo).cancel();
}
com.rdt.TimeoutTimerTask ttt = new com.rdt.TimeoutTimerTask(seqNo, java.lang.System.currentTimeMillis(), timeoutInterval, pkt);
ttt.subscribe(this);
timeoutMap.pu... | private void setTimer(long seqNo) {
com.rdt.TimeoutTimerTask ttt = new com.rdt.TimeoutTimerTask(seqNo, java.lang.System.currentTimeMillis(), timeoutInterval);
ttt.subscribe(this);
timeoutMap.put(seqNo, ttt);
com.rdt.ConnectionHandler.TIMER.schedule(ttt, timeoutInterval);
} |
public java.lang.Integer insertOrderCourse(java.lang.String login_name, java.lang.Integer cid) {
cn.edu.buaa.tricloud.mooc.domain.Account account = accountRepository.getAccountByLoginName(login_name);
if (account == null)
throw new cn.edu.buaa.tricloud.mooc.exception.AccountNotFound(java.lang.String.for... | public java.lang.Integer insertOrderCourse(java.lang.String login_name, java.lang.Integer cid) {
cn.edu.buaa.tricloud.mooc.domain.Account account = accountRepository.getAccountByLoginName(login_name);
if (account == null)
throw new cn.edu.buaa.tricloud.mooc.exception.AccountNotFound(java.lang.String.for... |
private void removeQueen(int row, int col) {
if ((row >= (board.length)) || (col >= (board.length))) {
throw new java.lang.IllegalArgumentException("Invalid row/column to remove a queen!");
}
if ((board[row][col]) != (-1)) {
throw new java.lang.IllegalArgumentException("There is no queen the... | private void removeQueen(int row, int col) {
if ((row >= (board.length)) || (col >= (board.length))) {
throw new java.lang.IllegalArgumentException("Invalid row/column to remove a queen!");
}
if ((board[row][col]) != (-1)) {
throw new java.lang.IllegalArgumentException("There is no queen the... |
public java.lang.String content_file(java.lang.String pth) {
java.lang.String thisLine = null;
java.lang.String str_words = "";
java.lang.String val = "";
if (new java.io.File(pth).canExecute()) {
try {
java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamRea... | java.lang.String content_file(java.lang.String pth) {
java.lang.String thisLine;
java.lang.String str_words = "";
if (new java.io.File(pth).canExecute()) {
try {
java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(pth), "window... |
public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState) {
long timestamp = getArguments().getLong("date");
calendar = new java.util.GregorianCalendar();
calendar.setTime(new java.util.Date(timestamp));
int hour = calendar.get(java.util.Calendar.HOUR_OF_DAY);
int minute = calen... | public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState) {
long timestamp = getArguments().getLong("date");
calendar = new java.util.GregorianCalendar();
calendar.setTime(new java.util.Date(timestamp));
int hour = calendar.get(java.util.Calendar.HOUR_OF_DAY);
int minute = calen... |
protected void cancelPressed() {
if ((this.profile) != null) {
this.profile.setName(profileNameOld);
this.profile.getAction().clear();
for (sernet.verinice.model.auth.Action action : selectedActionsOld) {
this.profile.getAction().add(action);
}
}
super.okPressed()... | protected void cancelPressed() {
if (((this.profile) != null) && ((profileNameOld) != null)) {
this.profile.setName(profileNameOld);
this.profile.getAction().clear();
for (sernet.verinice.model.auth.Action action : selectedActionsOld) {
this.profile.getAction().add(action);
... |
private void searchViewChildAndSetListener(android.view.ViewGroup parent) {
for (int i = 0; i < (parent.getChildCount()); i++) {
android.view.View target = parent.getChildAt(i);
if (target instanceof android.widget.LinearLayout) {
searchViewChildAndSetListener(((android.widget.LinearLayo... | private void searchViewChildAndSetListener(android.view.ViewGroup parent) {
for (int i = 0; i < (parent.getChildCount()); i++) {
android.view.View target = parent.getChildAt(i);
if (target instanceof android.widget.LinearLayout) {
searchViewChildAndSetListener(((android.widget.LinearLayo... |
public static void incrementQuantity(int quantity, long id) {
org.apache.ibatis.session.SqlSession session = com.devsolutions.camelus.services.DBConnection.getSqlSessionFactory().openSession();
session.getMapper(com.devsolutions.camelus.mappers.ProductMapper.class).incrementQuantity(quantity, id);
session.c... | public static void incrementQuantity(int quantity, long id) {
org.apache.ibatis.session.SqlSession session = com.devsolutions.camelus.services.DBConnection.getSqlSessionFactory().openSession();
session.getMapper(com.devsolutions.camelus.mappers.ProductMapper.class).incrementQuantity(quantity, id);
session.c... |
public void startRecognition() throws java.lang.Exception {
java.lang.System.out.println("start recognition");
recognizer.startRecognition(true);
while (this.transcriberEnabled) {
java.lang.String utterance = recognizer.getResult().getHypothesis();
java.lang.System.out.println(utterance);
... | public void startRecognition() throws java.lang.Exception {
java.lang.System.out.println("start recognition");
this.transcriberEnabled = true;
recognizer.startRecognition(true);
while (this.transcriberEnabled) {
java.lang.String utterance = recognizer.getResult().getHypothesis();
java.la... |
private java.lang.String getApplicationVersionName() {
java.lang.String devBuild = (BuildConfig.DEBUG) ? "d" : "";
try {
return (this.getPackageManager().getPackageInfo(getPackageName(), 0).versionName) + devBuild;
} catch (android.content.pm.PackageManager e) {
throw new java.lang.RuntimeEx... | public java.lang.String getApplicationVersionName() {
java.lang.String devBuild = (BuildConfig.DEBUG) ? "d" : "";
try {
return (this.getPackageManager().getPackageInfo(getPackageName(), 0).versionName) + devBuild;
} catch (android.content.pm.PackageManager e) {
throw new java.lang.RuntimeExc... |
public void onRequestPermissionsResult(int requestCode, java.lang.String[] permissions, int[] grantResults) {
switch (requestCode) {
case 10 :
{
if (((grantResults.length) > 0) && ((grantResults[0]) == (android.content.pm.PackageManager.PERMISSION_GRANTED))) {
... | public void onRequestPermissionsResult(int requestCode, java.lang.String[] permissions, int[] grantResults) {
switch (requestCode) {
case 10 :
{
if (((grantResults.length) > 0) && ((grantResults[0]) == (android.content.pm.PackageManager.PERMISSION_GRANTED))) {
}el... |
public static com.intellij.codeInspection.streamMigration.ReduceHandling.ReductionData getReduceVar(com.intellij.codeInspection.streamMigration.PsiLoopStatement loop, com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.TerminalBlock tb, java.util.List<com.intellij.codeInspection.streamMigration.Psi... | public static com.intellij.codeInspection.streamMigration.ReduceHandling.ReductionData getReduceVar(com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.TerminalBlock tb, java.util.List<com.intellij.codeInspection.streamMigration.PsiVariable> variables) {
com.intellij.codeInspection.streamMigrat... |
public void instrumentUpdated(uk.ac.stfc.isis.ibex.ui.synoptic.editor.model.UpdateTypes updateType) {
if (updateType == (uk.ac.stfc.isis.ibex.ui.synoptic.editor.model.UpdateTypes.EDIT_COMPONENT)) {
saveAsBtn.setEnabled((!(synopticViewModel.getHasDuplicatedName())));
saveBtn.setEnabled((!(synopticVie... | public void instrumentUpdated(uk.ac.stfc.isis.ibex.ui.synoptic.editor.model.UpdateTypes updateType) {
if (updateType == (uk.ac.stfc.isis.ibex.ui.synoptic.editor.model.UpdateTypes.EDIT_COMPONENT)) {
saveAsBtn.setEnabled((!(synopticViewModel.getHasDuplicatedName())));
if ((saveBtn) != null) {
... |
public static byte[] toCompressedBytes(@javax.annotation.Nonnull
final java.io.Externalizable obj) throws java.io.IOException {
hivemall.utils.io.FastMultiByteArrayOutputStream bos = new hivemall.utils.io.FastMultiByteArrayOutputStream();
final java.util.zip.DeflaterOutputStream dos = new java.util.zip.Deflater... | public static byte[] toCompressedBytes(@javax.annotation.Nonnull
final java.io.Externalizable obj) throws java.io.IOException {
hivemall.utils.io.FastMultiByteArrayOutputStream bos = new hivemall.utils.io.FastMultiByteArrayOutputStream();
final java.util.zip.DeflaterOutputStream dos = new java.util.zip.Deflater... |
public void navigateToFrontPage() {
com.campustribune.event.utility.EventRestCallThread myRestClient = new com.campustribune.event.utility.EventRestCallThread(getApplicationContext(), new java.lang.String("create"), event, this.token);
myRestClient.start();
android.content.Intent frontPageIntent = new andro... | public void navigateToFrontPage() {
com.campustribune.event.utility.EventRestCallThread myRestClient = new com.campustribune.event.utility.EventRestCallThread(getApplicationContext(), new java.lang.String("create"), event, this.token);
myRestClient.start();
android.content.Intent frontPageIntent = new andro... |
public void selectFromListByValue(java.lang.String locator, java.lang.String... values) {
if ((values.length) == 0) {
throw new com.github.markusbernhardt.selenium2library.Selenium2LibraryNonFatalException("No value given.");
}
java.lang.String items = java.lang.String.format("value(s) '%s'", com.gi... | public void selectFromListByValue(java.lang.String locator, java.lang.String... values) {
if ((values.length) == 0) {
throw new com.github.markusbernhardt.selenium2library.Selenium2LibraryNonFatalException("No value given.");
}
java.lang.String items = java.lang.String.format("value(s) '%s'", com.gi... |
public void retrieveServices(com.facebook.react.bridge.Callback callback) {
if (!(isConnected())) {
callback.invoke("Device is not connected", null);
}
if ((gatt) == null) {
callback.invoke("BluetoothGatt is null", null);
return ;
}
this.retrieveServicesCallback = callback;
... | public void retrieveServices(com.facebook.react.bridge.Callback callback) {
if (!(isConnected())) {
callback.invoke("Device is not connected", null);
return ;
}
if ((gatt) == null) {
callback.invoke("BluetoothGatt is null", null);
return ;
}
this.retrieveServicesCallb... |
public rssminer.Feed[] likeThis(int docID, int count) throws java.io.IOException, org.apache.lucene.index.CorruptIndexException {
org.apache.lucene.index.IndexReader reader = org.apache.lucene.index.IndexReader.open(indexer, true);
org.apache.lucene.search.similar.MoreLikeThis likeThis = new org.apache.lucene.s... | public rssminer.Feed[] likeThis(int docID, int count) throws java.io.IOException, org.apache.lucene.index.CorruptIndexException {
org.apache.lucene.index.IndexReader reader = org.apache.lucene.index.IndexReader.open(indexer, false);
org.apache.lucene.search.similar.MoreLikeThis likeThis = new org.apache.lucene.... |
public void verifyDeleteService() throws java.lang.Exception {
final org.apereo.cas.services.RegexRegisteredService r = new org.apereo.cas.services.RegexRegisteredService();
r.setId(1200);
r.setName(org.apereo.cas.services.web.ManageRegisteredServicesMultiActionControllerTests.NAME);
r.setServiceId("ser... | public void verifyDeleteService() throws java.lang.Exception {
final org.apereo.cas.services.RegexRegisteredService r = new org.apereo.cas.services.RegexRegisteredService();
r.setId(1200);
r.setName(org.apereo.cas.services.web.ManageRegisteredServicesMultiActionControllerTests.NAME);
r.setServiceId("ser... |
public static void setIpAssignment(java.lang.String assign, android.net.wifi.WifiConfiguration wifiConf) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.NoSuchFieldException, java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.reflect.InvocationTargetException ... | private void setIpAssignment(java.lang.String assign, android.net.wifi.WifiConfiguration wifiConf) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.NoSuchFieldException, java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.reflect.InvocationTargetException {
... |
public java.lang.String execute() {
try {
_agencies = _transitDataService.getAgenciesWithCoverage();
} catch (java.lang.Throwable t) {
org.onebusaway.webapp.actions.admin.servicealerts.ServiceAlertsAction._log.error("unable to retrieve agencies with coverage", t);
org.onebusaway.webapp.a... | public java.lang.String execute() {
super.execute();
try {
_agencies = _transitDataService.getAgenciesWithCoverage();
} catch (java.lang.Throwable t) {
org.onebusaway.webapp.actions.admin.servicealerts.ServiceAlertsAction._log.error("unable to retrieve agencies with coverage", t);
or... |
private static void waveInitiationLogic(float mouseX, float mouseY) {
if (main.Main.startWave.isClicked(mouseX, mouseY)) {
main.Main.isEditPhase = !(main.Main.isEditPhase);
int i = 0;
for (grid.Grid g : main.Main.gridsReadOnly) {
main.Main.grids.remove(i);
main.Main.g... | private static void waveInitiationLogic(float mouseX, float mouseY) {
if (main.Main.startWave.isClicked(mouseX, mouseY)) {
main.Main.isEditPhase = !(main.Main.isEditPhase);
int i = 0;
for (grid.Grid g : main.Main.gridsReadOnly) {
main.Main.grids.add(i, g.copy());
main... |
public void addLast(int x) {
if ((head) == null) {
head = new Node(x);
(size)++;
}else {
Node n = new Node(x);
Node current = head;
while ((current.getNext()) != null) {
current = current.getNext();
}
current.setNext(n);
(size)++;
... | public void addLast(int x) {
if ((head) == null) {
head = new Node(x);
}else {
Node n = new Node(x);
Node current = head;
while ((current.getNext()) != null) {
current = current.getNext();
}
current.setNext(n);
}
(size)++;
} |
public boolean equals(java.lang.Object obj) {
model.curve.Curve other = ((model.curve.Curve) (obj));
for (model.curve.Grade grade : curve) {
if (!(other.curve.contains(grade))) {
return false;
}
}
return true;
} | public boolean equals(java.lang.Object obj) {
if (obj == null) {
return false;
}
model.curve.Curve other = ((model.curve.Curve) (obj));
for (model.curve.Grade grade : curve) {
if (!(other.curve.contains(grade))) {
return false;
}
}
return true;
} |
float avgSpread = 0;
float sumSpread = 0;
for (personal.vinay.bigdata.PrepData.Record record : records) {
sumSpread += (record.getBidPrice()) - (record.getAskPrice());
}
avgSpread = sumSpread / (records.size());
for (personal.vinay.bigdata.PrepData.Record record : records) {
reco... | double avgSpread = 0;
double sumSpread = 0;
for (personal.vinay.bigdata.PrepData.Record record : records) {
sumSpread += (record.getBidPrice()) - (record.getAskPrice());
}
avgSpread = sumSpread / (records.size());
for (personal.vinay.bigdata.PrepData.Record record : records) {
re... |
private void findAndUpdateTrack(android.content.Intent intent) {
android.os.Bundle trackBundle = intent.getBundleExtra(PowerampAPI.TRACK);
if (trackBundle != null) {
io.nya.powerlyrics.model.Track track = createTrack(trackBundle);
if (((mCurrentTrack) == null) || (((track.id) != (mCurrentTrack.i... | private void findAndUpdateTrack(android.content.Intent intent) {
android.os.Bundle trackBundle = intent.getBundleExtra(PowerampAPI.TRACK);
if (trackBundle != null) {
io.nya.powerlyrics.model.Track track = createTrack(trackBundle);
if (((mCurrentTrack) == null) || (((track.id) != (mCurrentTrack.i... |
public static boolean isInteger(org.apache.sqoop.schema.type.Column column) {
java.lang.Long byteSize = ((org.apache.sqoop.schema.type.FixedPoint) (column)).getByteSize();
java.lang.Boolean signed = ((org.apache.sqoop.schema.type.FixedPoint) (column)).isSigned();
if (byteSize == null) {
return false... | public static boolean isInteger(org.apache.sqoop.schema.type.Column column) {
assert column instanceof org.apache.sqoop.schema.type.FixedPoint;
java.lang.Long byteSize = ((org.apache.sqoop.schema.type.FixedPoint) (column)).getByteSize();
java.lang.Boolean signed = ((org.apache.sqoop.schema.type.FixedPoint) ... |
public java.util.Set<? extends com.cfar.swim.worldwind.geom.RegularGrid> getNeighbors() {
java.util.Set<com.cfar.swim.worldwind.geom.RegularGrid> neighbors = new java.util.HashSet<com.cfar.swim.worldwind.geom.RegularGrid>(26);
if (this.hasParent()) {
gov.nasa.worldwind.geom.Vec4[] corners = this.getCorn... | public java.util.Set<? extends com.cfar.swim.worldwind.geom.RegularGrid> getNeighbors() {
java.util.Set<com.cfar.swim.worldwind.geom.RegularGrid> neighbors = new java.util.HashSet<com.cfar.swim.worldwind.geom.RegularGrid>(26);
if (this.hasParent()) {
gov.nasa.worldwind.geom.Vec4[] corners = this.getCorn... |
public void rotateX(float angle) {
com.base.engine.Vector3f hAxis = com.base.engine.Camera.m_yAxis.cross(m_forward).normalized();
m_forward = m_forward.rotate(angle, hAxis).normalized();
m_up = m_forward.cross(hAxis).normalized();
java.lang.System.out.println(m_up);
} | public void rotateX(float angle) {
com.base.engine.Vector3f hAxis = com.base.engine.Camera.m_yAxis.cross(m_forward).normalized();
m_forward = m_forward.rotate(angle, hAxis).normalized();
m_up = m_forward.cross(hAxis).normalized();
} |
public void cancelSeat(int cancellationTime) throws asgn2Passengers.PassengerException {
if ((((((this.isNew()) || (this.isQueued())) || (this.isRefused())) || (this.isFlown())) || (cancellationTime < 0)) || ((departureTime) < cancellationTime)) {
throw new asgn2Passengers.PassengerException("Could not canc... | public void cancelSeat(int cancellationTime) throws asgn2Passengers.PassengerException {
if ((((((this.isNew()) || (this.isQueued())) || (this.isRefused())) || (this.isFlown())) || (cancellationTime < 0)) || ((departureTime) < cancellationTime)) {
throw new asgn2Passengers.PassengerException("Could not canc... |
public void changed(javafx.beans.value.ObservableValue<? extends javafx.scene.control.Toggle> observable, javafx.scene.control.Toggle oldValue, javafx.scene.control.Toggle newValue) {
if ((toggleGroup.getSelectedToggle()) != null) {
if (newValue.getUserData().equals("4")) {
centerOuterPane.toggl... | public void changed(javafx.beans.value.ObservableValue<? extends javafx.scene.control.Toggle> observable, javafx.scene.control.Toggle oldValue, javafx.scene.control.Toggle newValue) {
if ((toggleGroup.getSelectedToggle()) != null) {
if (newValue.getUserData().equals("4")) {
centerOuterPane.toggl... |
public void onTouchDrawer(int position) {
switch (position) {
case compsci290.edu.duke.myeveryday.util.Constants.NOTES :
startActivity(new android.content.Intent(this, compsci290.edu.duke.myeveryday.MainActivity.class));
break;
case compsci290.edu.duke.myeveryday.util.Constan... | public void onTouchDrawer(int position) {
switch (position) {
case compsci290.edu.duke.myeveryday.util.Constants.NOTES :
startActivity(new android.content.Intent(this, compsci290.edu.duke.myeveryday.MainActivity.class));
break;
case compsci290.edu.duke.myeveryday.util.Constan... |
public boolean onOptionsItemSelected(final android.view.MenuItem item) {
int id = item.getItemId();
switch (id) {
case R.id.action_favorite :
if ((movies) != null)
new com.ashwinpilgaonkar.popularmovies.Backend.Favorite(getContext(), movies, item, 1);
... | public boolean onOptionsItemSelected(final android.view.MenuItem item) {
int id = item.getItemId();
switch (id) {
case R.id.action_favorite :
if ((movies) != null)
new com.ashwinpilgaonkar.popularmovies.Backend.Favorite(getActivity(), movies, item, 1);
... |
private void scanBluetoothDevice(org.apache.cordova.CallbackContext callbackContext) {
scanCallback = callbackContext;
android.content.IntentFilter filter = new android.content.IntentFilter(android.bluetooth.BluetoothDevice.ACTION_FOUND);
cordova.getActivity().registerReceiver(bluetoothReceiver, filter);
... | private void scanBluetoothDevice(org.apache.cordova.CallbackContext callbackContext) {
scanCallback = callbackContext;
android.content.IntentFilter filter = new android.content.IntentFilter(android.bluetooth.BluetoothDevice.ACTION_FOUND);
cordova.getActivity().registerReceiver(bluetoothReceiver, filter);
... |
public final uk.chromis.pos.forms.ProductInfoExt getProductInfoByCode(java.lang.String sCode) throws uk.chromis.basic.BasicException {
if (sCode.startsWith("977")) {
sCode = sCode.substring(0, 10);
}
return ((uk.chromis.pos.forms.ProductInfoExt) (new uk.chromis.pos.forms.PreparedSentence(s, ((("SELE... | public final uk.chromis.pos.forms.ProductInfoExt getProductInfoByCode(java.lang.String sCode) throws uk.chromis.basic.BasicException {
return ((uk.chromis.pos.forms.ProductInfoExt) (new uk.chromis.pos.forms.PreparedSentence(s, ((("SELECT " + (getSelectFieldList())) + "FROM STOCKCURRENT C RIGHT JOIN PRODUCTS P ON (C... |
public void onClick(android.content.DialogInterface dialog, int which) {
switch (title) {
case R.string.save :
save();
break;
case R.string.discard :
loadCurrentList();
adapter.notifyDataSetChanged();
break;
case R.string.reset :
... | public void onClick(android.content.DialogInterface dialog, int which) {
switch (title) {
case R.string.save :
save();
break;
case R.string.discard :
loadCurrentList();
adapter.notifyDataSetChanged();
break;
case R.string.reset :
... |
public void onLayoutChildren(android.support.v7.widget.RecyclerView.Recycler recycler, android.support.v7.widget.RecyclerView.State state) {
super.onLayoutChildren(recycler, state);
cacheHeaderPositions();
positioner.reset(getOrientation());
positioner.updateHeaderState(findFirstVisibleItemPosition(), r... | public void onLayoutChildren(android.support.v7.widget.RecyclerView.Recycler recycler, android.support.v7.widget.RecyclerView.State state) {
super.onLayoutChildren(recycler, state);
cacheHeaderPositions();
positioner.reset(getOrientation(), findFirstVisibleItemPosition());
positioner.updateHeaderState(f... |
public void IncrsRedCorRB() {
if ((((JoystickTest.PressJSRedCorRB) == true) && ((JoystickTest.pressLstJSRedCorRB) != true)) && ((SettingsUI.RedCorRight) == true)) {
if ((AutoState) == true) {
RedCorAutoSpin.setValue((++(RedCorAuto)));
JoystickTest.pressLstJSRedCorAbtn = true;
... | public void IncrsRedCorRB() {
if ((((JoystickTest.PressJSRedCorRB) == true) && ((JoystickTest.pressLstJSRedCorRB) != true)) && ((SettingsUI.RedCorRight) == true)) {
if ((AutoState) == true) {
RedCorAutoSpin.setValue((++(RedCorAuto)));
JoystickTest.pressLstJSRedCorRB = true;
}... |
private void createComponentMap(java.awt.Container container) {
componentMap = new java.util.HashMap<java.lang.String, java.awt.Component>();
java.awt.Component[] components = container.getComponents();
for (int i = 0; i < (components.length); i++) {
componentMap.put(components[i].getName(), compone... | private java.util.HashMap createComponentMap(java.awt.Container container) {
java.util.HashMap componentMap = new java.util.HashMap<java.lang.String, java.awt.Component>();
java.awt.Component[] components = container.getComponents();
for (int i = 0; i < (components.length); i++) {
componentMap.put(c... |
private void cancelChallenge(nl.hanze.gameserver.server.Challenge challenge, boolean notify) {
if (challenge == null) {
return ;
}
challenge.getPlayer().setChallenge(null);
challenge.getOpponent().removeChallenge(challenge);
if (notify) {
java.lang.String challengeNumberString = nl.h... | private void cancelChallenge(nl.hanze.gameserver.server.Challenge challenge, boolean notify) {
if (challenge == null) {
}else {
challenge.getPlayer().setChallenge(null);
challenge.getOpponent().removeChallenge(challenge);
if (notify) {
java.lang.String challengeNumberString =... |
public boolean equals(java.lang.Object o) {
if ((this) == o) {
return true;
}
if ((o == null) || ((getClass()) != (o.getClass()))) {
return false;
}
no.arkivlab.hioa.nikita.webapp.model.user.Authority authority = ((no.arkivlab.hioa.nikita.webapp.model.user.Authority) (o));
if ((n... | public boolean equals(java.lang.Object o) {
if ((this) == o) {
return true;
}
if ((o == null) || ((getClass()) != (o.getClass()))) {
return false;
}
no.arkivlab.hioa.nikita.webapp.model.user.Authority authority = ((no.arkivlab.hioa.nikita.webapp.model.user.Authority) (o));
return... |
public static void initializeOthers() {
android.content.pm.PackageManager pm = com.anna.util.MyApplication.getAppContext().getPackageManager();
java.util.List<android.content.pm.ApplicationInfo> appsInfos = pm.getInstalledApplications(PackageManager.GET_META_DATA);
for (android.content.pm.ApplicationInfo in... | private static void initializeOthers() {
android.content.pm.PackageManager pm = com.anna.util.MyApplication.getAppContext().getPackageManager();
java.util.List<android.content.pm.ApplicationInfo> appsInfos = pm.getInstalledApplications(PackageManager.GET_META_DATA);
for (android.content.pm.ApplicationInfo i... |
public java.lang.String getTags() {
java.lang.String globalTags = java.lang.System.getenv("MP_METRICS_TAGS");
if ((globalTags != null) && (!(globalTags.isEmpty()))) {
return ((tags) + ",") + globalTags;
}else {
return tags;
}
} | public java.lang.String getTags() {
java.lang.String result = null;
java.lang.String globalTags = java.lang.System.getenv("MP_METRICS_TAGS");
if ((globalTags != null) && (!(globalTags.isEmpty()))) {
result = globalTags;
}
if (((tags) != null) && (!(tags.isEmpty()))) {
result = (resul... |
public de.metas.adempiere.form.terminal.IKeyLayout getNumericKeyLayout() {
assertCurrentReferencesNotNull();
for (int i = (referencesList.size()) - 1; i <= 0; i--) {
final de.metas.adempiere.form.terminal.context.TerminalContextReferences terminalContextReferences = referencesList.get(i);
final ... | public de.metas.adempiere.form.terminal.IKeyLayout getNumericKeyLayout() {
assertCurrentReferencesNotNull();
for (int i = (referencesList.size()) - 1; i >= 0; i--) {
final de.metas.adempiere.form.terminal.context.TerminalContextReferences terminalContextReferences = referencesList.get(i);
final ... |
public void testGenerator() {
try {
final io.github.pr0methean.betterrandom.seed.SeedGenerator generator = DevRandomSeedGenerator.DEV_RANDOM_SEED_GENERATOR;
final byte[] seed = generator.generateSeed(32);
assert (seed.length) == 32 : "Failed to generate seed of correct length";
} catch (... | public void testGenerator() {
try {
final io.github.pr0methean.betterrandom.seed.SeedGenerator generator = DevRandomSeedGenerator.DEV_RANDOM_SEED_GENERATOR;
final byte[] seed = generator.generateSeed(32);
assert (seed.length) == 32 : "Failed to generate seed of correct length";
gener... |
protected void setResultModel(org.apache.jena.rdf.model.Model resultModel) {
try {
resultModelMutex.acquire();
} catch (java.lang.InterruptedException e) {
org.hobbit.core.components.AbstractBenchmarkController.LOGGER.error("Interrupted while waiting for the result model mutex. Returning.", e);
... | protected void setResultModel(org.apache.jena.rdf.model.Model resultModel) {
try {
resultModelMutex.acquire();
} catch (java.lang.InterruptedException e) {
org.hobbit.core.components.AbstractBenchmarkController.LOGGER.error("Interrupted while waiting for the result model mutex. Returning.", e);
... |
public java.lang.String logout() {
java.lang.String result = "/index.xhtml?faces-redirect=true";
try {
javax.faces.context.FacesContext.getCurrentInstance().getExternalContext().invalidateSession();
javax.faces.context.FacesContext context = javax.faces.context.FacesContext.getCurrentInstance();... | public java.lang.String logout() {
java.lang.String result = "/index.xhtml?faces-redirect=true";
try {
javax.faces.context.FacesContext context = javax.faces.context.FacesContext.getCurrentInstance();
javax.servlet.http.HttpServletRequest request = ((javax.servlet.http.HttpServletRequest) (conte... |
public boolean next() throws org.eclipse.datatools.connectivity.oda.OdaException {
int max = size;
if ((maxRows) != (-1)) {
max = java.lang.Math.min(maxRows, size);
}
if ((index) < max) {
row = root.get((++(index)));
}
return (index) < max;
} | public boolean next() throws org.eclipse.datatools.connectivity.oda.OdaException {
int max = size;
if (((maxRows) != (-1)) && ((maxRows) != 0)) {
max = java.lang.Math.min(maxRows, size);
}
if ((index) < max) {
row = root.get((++(index)));
}
return (index) < max;
} |
public static void recoverPreviousStats() {
if (bubbleMaster.Start.previous.equals("chooseLevel"))
bubbleMaster.Start.chooseLevel = 1;
else
if (bubbleMaster.Start.previous.equals("startGame"))
bubbleMaster.Start.startGame = 1;
else
if (bubbleMaster.Start.previous.... | public static void recoverPreviousStats() {
if (bubbleMaster.Start.previous.get(0).equals("chooseLevel"))
bubbleMaster.Start.chooseLevel = 1;
else
if (bubbleMaster.Start.previous.get(0).equals("startGame"))
bubbleMaster.Start.startGame = 1;
else
if (bubbleMaster.S... |
public void checkPermissions() {
permissionCoarseLocationCheck = android.support.v4.content.ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_COARSE_LOCATION);
permissionFineLocationCheck = android.support.v4.content.ContextCompat.checkSelfPermission(getApplicationContext(), ... | public void checkPermissions() {
permissionCoarseLocationCheck = android.support.v4.content.ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_COARSE_LOCATION);
permissionFineLocationCheck = android.support.v4.content.ContextCompat.checkSelfPermission(getApplicationContext(), ... |
public board.Cell getNeighbourAt(int x, int y, board.Direction dir) {
int newX = x + (dir.getDX());
int newY = y + (dir.getDY());
if ((((newX >= 0) && (newX < (board.Board.BOARDSIZE))) && (newY >= 0)) && (newY < (board.Board.BOARDSIZE))) {
return board[newX][newY];
}else {
return null;
... | public board.Cell getNeighbourAt(int x, int y, board.Direction dir) {
int newX = x + (dir.getDX());
int newY = y + (dir.getDY());
if ((((newX >= 0) && (newX < (board.Board.BOARDSIZE))) && (newY >= 0)) && (newY < (board.Board.BOARDSIZE))) {
return board[newY][newX];
}else {
return null;
... |
protected void testInt() {
org.molgenis.data.Query<org.molgenis.data.Entity> query = new org.molgenis.data.support.QueryImpl().search(org.molgenis.integrationtest.data.abstracts.query.HEIGHT, java.lang.String.valueOf(165));
java.util.Set<org.molgenis.data.Entity> resultSet = org.elasticsearch.common.collect.Set... | protected void testInt() {
org.molgenis.data.Query<org.molgenis.data.Entity> query = new org.molgenis.data.support.QueryImpl().search(org.molgenis.integrationtest.data.abstracts.query.HEIGHT, java.lang.String.valueOf(165));
java.util.Set<org.molgenis.data.Entity> resultSet = newHashSet(person2);
org.testng.... |
private void requestChunkUnload(net.librofur.scar.world.chunk.ChunkPointer chunkPointer) {
if (isChunkInBounds(chunkPointer.x, chunkPointer.y)) {
return ;
}
if ((loadedChunks.containsKey(chunkPointer)) && (!(chunksToUnload.contains(chunkPointer)))) {
chunksToUnload.add(chunkPointer);
}
} | private void requestChunkUnload(net.librofur.scar.world.chunk.ChunkPointer chunkPointer) {
if (!(isChunkInBounds(chunkPointer.x, chunkPointer.y))) {
return ;
}
if ((loadedChunks.containsKey(chunkPointer)) && (!(chunksToUnload.contains(chunkPointer)))) {
chunksToUnload.add(chunkPointer);
... |
public void nodeRemoved(@org.jetbrains.annotations.NotNull
org.jetbrains.mps.openapi.event.SNodeRemoveEvent event) {
if (!(event.isRoot())) {
return ;
}
jetbrains.mps.smodel.Language language = jetbrains.mps.smodel.Language.getLanguageFor(event.getModel());
if (language != null) {
refres... | public void nodeRemoved(@org.jetbrains.annotations.NotNull
org.jetbrains.mps.openapi.event.SNodeRemoveEvent event) {
if (!(event.isRoot())) {
return ;
}
jetbrains.mps.smodel.Language language = jetbrains.mps.smodel.Language.getLanguageFor(event.getModel());
if (language != null) {
refres... |
public void generateRandomKey() {
byte[] generatedHash = new byte[0];
try {
generatedHash = org.fides.encryption.KeyGenerator.generateRandomKey("AES", keySize).getEncoded();
} catch (java.security.NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (java.security.spec.InvalidKeySp... | public void generateRandomKey() {
byte[] generatedHash = new byte[0];
try {
generatedHash = org.fides.encryption.KeyGenerator.generateRandomKey("AES", keySize).getEncoded();
} catch (java.security.NoSuchAlgorithmException e) {
e.printStackTrace();
}
org.junit.Assert.assertEquals(keyS... |
public static void addRoll(int playerID, int die1, int die2, int point, int sum, int result) {
craps.model.GameHistory.rollHistory = new java.util.ArrayList<java.lang.Integer>();
craps.model.GameHistory.rollHistory.add(playerID);
craps.model.GameHistory.rollHistory.add(die1);
craps.model.GameHistory.rol... | public static void addRoll(int playerID, int die1, int die2, int point, int sum, int result) {
craps.model.GameHistory.rollHistory = new java.util.ArrayList<java.lang.Integer>();
craps.model.GameHistory.rollHistory.add(playerID);
craps.model.GameHistory.rollHistory.add(die1);
craps.model.GameHistory.rol... |
public static void main(java.lang.String[] args) throws java.sql.SQLException {
new view.mode.dialog.help.QuestionAnswerDialog().setVisible(true);
new org.languagetool.gui.GrammarChecker(new javax.swing.JTextArea());
view.MainFrame mainFrame = new view.MainFrame();
mainFrame.getChooseModePanel().setMain... | public static void main(java.lang.String[] args) throws java.sql.SQLException {
new org.languagetool.gui.GrammarChecker(new javax.swing.JTextArea());
view.MainFrame mainFrame = new view.MainFrame();
mainFrame.getChooseModePanel().setMainFrame(mainFrame);
mainFrame.getChooseFriendPanel().setMainFrame(mai... |
static void injectBaseContext(android.app.Application application) {
com.plugin.util.LogUtil.d("替换宿主程序Application对象的mBase");
android.content.Context base = ((android.content.Context) (com.plugin.util.RefInvoker.getFieldObject(application, android.content.ContextWrapper.class.getName(), com.plugin.core.PluginInj... | static void injectBaseContext(android.content.Context context) {
com.plugin.util.LogUtil.d("替换宿主程序Application对象的mBase");
android.content.Context base = ((android.content.Context) (com.plugin.util.RefInvoker.getFieldObject(context, android.content.ContextWrapper.class.getName(), com.plugin.core.PluginInjector.an... |
public int compare(dbResources.FlightCombo combo1, dbResources.FlightCombo combo2) {
if (ascending) {
return java.lang.Integer.compare(combo1.getDepartureTimeInMin(), combo2.getDepartureTimeInMin());
}else {
return java.lang.Integer.compare(combo2.getDepartureTimeInMin(), combo1.getDepartureTime... | public int compare(dbResources.FlightCombo combo1, dbResources.FlightCombo combo2) {
if (ascending) {
return java.lang.Integer.compare(combo2.getDepartureTimeInMin(), combo1.getDepartureTimeInMin());
}else {
return java.lang.Integer.compare(combo1.getDepartureTimeInMin(), combo2.getDepartureTime... |
public static boolean isRatedFirstTime(java.lang.String randoId, android.content.Context context) {
if ((randoId != null) && (context != null)) {
com.github.randoapp.db.model.Rando randoToUpdate = com.github.randoapp.db.RandoDAO.getRandoByRandoId(context, randoId);
return (randoToUpdate != null) && ... | public static boolean isRatedFirstTime(java.lang.String randoId, android.content.Context context) {
if ((randoId != null) && (context != null)) {
com.github.randoapp.db.model.Rando randoToUpdate = com.github.randoapp.db.RandoDAO.getRandoByRandoId(context, randoId);
return (randoToUpdate == null) || ... |
private client.model.CellState getCellState(client.ai.Tile tile) {
client.model.Beetle beetle = tile.beetles.get(0);
if (tile.beetles.isEmpty())
return client.model.CellState.Blank;
if ((beetle.getTeam()) == (AI.world.getTeamID()))
return client.model.CellState.Ally;
return cli... | private client.model.CellState getCellState(client.ai.Tile tile) {
if (tile.beetles.isEmpty())
return client.model.CellState.Blank;
client.model.Beetle beetle = tile.beetles.get(0);
if ((beetle.getTeam()) == (AI.world.getTeamID()))
return client.model.CellState.Ally;
return cli... |
public franks.game.entity.Entity buildEntity(franks.game.entity.EntityList entities, franks.game.Army army, franks.game.entity.EntityGroupData.EntityInstanceData ref) {
franks.game.entity.EntityData data = loadEntity(("assets/entities/" + (ref.dataFile)));
franks.game.entity.Entity dataEnt = entities.buildEntit... | public franks.game.entity.Entity buildEntity(franks.game.entity.EntityList entities, franks.game.Army army, franks.game.entity.EntityGroupData.EntityInstanceData ref) {
franks.game.entity.EntityData data = loadEntity(("assets/entities/" + (ref.dataFile)));
franks.game.entity.Entity dataEnt = entities.buildEntit... |
public java.util.List<net.sharksystem.sharknet.api.Contact> getContacts() {
if ((myProfile) == null)
return null;
java.util.List<net.sharksystem.sharknet.api.Contact> contact_list = net.sharksystem.sharknet.api.DummyDB.getInstance().getContact_list(myProfile);
contact_list.remove(myProfile.getC... | public java.util.List<net.sharksystem.sharknet.api.Contact> getContacts() {
if ((myProfile) == null)
return null;
java.util.List<net.sharksystem.sharknet.api.Contact> contact_list = net.sharksystem.sharknet.api.DummyDB.getInstance().getContact_list(myProfile);
contact_list.remove(myProfile.getC... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().add(R.id.container, new com.mohammedsazid.android.done.MainActivity.Placeholder... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().add(R.id.container, new com.mohammedsazid.android.done.MainActivity.Placeholder... |
private void jButton_StartActionPerformed(java.awt.event.ActionEvent evt) {
int status;
if ((aggregator.running_flag) == false) {
status = aggregator.Start();
if (status == 0) {
jButton_Start.setText("Stop");
jSpinnerInterval.setEnabled(false);
int_counter = (... | private void jButton_StartActionPerformed(java.awt.event.ActionEvent evt) {
int status;
if ((aggregator.running_flag) == false) {
int_counter = ((java.lang.Number) (jSpinnerInterval.getValue())).intValue();
if ((int_counter) > 0) {
status = aggregator.Start();
if (status ... |
protected void onStart() {
super.onStart();
android.animation.PropertyValuesHolder holder1 = android.animation.PropertyValuesHolder.ofFloat("scaleX", 0.0F, 5.0F);
android.animation.PropertyValuesHolder holder2 = android.animation.PropertyValuesHolder.ofFloat("scaleY", 0.0F, 5.0F);
android.animation.Obje... | protected void onStart() {
super.onStart();
android.animation.PropertyValuesHolder holder1 = android.animation.PropertyValuesHolder.ofFloat("scaleX", 0.0F, 5.0F);
android.animation.PropertyValuesHolder holder2 = android.animation.PropertyValuesHolder.ofFloat("scaleY", 0.0F, 5.0F);
android.animation.Obje... |
private void reloadData() {
synchronized(lock) {
dataset.clear();
if ((releasedToday) != null) {
dataset.addAll(releasedToday);
}
if ((recentlyWatched) != null) {
dataset.addAll(recentlyWatched);
}
if ((friendsRecently) != null) {
d... | private void reloadData() {
dataset.clear();
if ((releasedToday) != null) {
dataset.addAll(releasedToday);
}
if ((recentlyWatched) != null) {
dataset.addAll(recentlyWatched);
}
if ((friendsRecently) != null) {
dataset.addAll(friendsRecently);
}
} |
public void actionCompleted(java.util.List<com.example.vlad.licenta.model.Book> res) {
if (res == null)
res = new java.util.ArrayList<>();
favouriteBooks = res;
if ((adapter) == null) {
adapter = new com.example.vlad.licenta.CustomAdapterBooks(favouriteBooks, getContext());
lv.s... | public void actionCompleted(java.util.List<com.example.vlad.licenta.model.Book> res) {
if (res == null)
res = new java.util.ArrayList<>();
favouriteBooks = res;
adapter = new com.example.vlad.licenta.CustomAdapterBooks(favouriteBooks, getContext());
lv.setAdapter(adapter);
} |
public void OnAlbumFragmentInteraction(int pos) {
mFragmentList.remove(1);
vm.changeCurrentList(pos);
mFragmentList.add(com.vinay.vinplayer.fragments.AllSongsFragment.newInstance(1, vinMediaLists.getAlbumSongsList(VinMediaLists.allAlbums.get(pos).get("album"))));
adapter = new com.vinay.vinplayer.views.... | public void OnAlbumFragmentInteraction(int pos) {
mFragmentList.remove(1);
vm.changeCurrentList(pos, 1);
mFragmentList.add(com.vinay.vinplayer.fragments.AllSongsFragment.newInstance(1, vinMediaLists.getAlbumSongsList(VinMediaLists.allAlbums.get(pos).get("album"))));
adapter = new com.vinay.vinplayer.vie... |
private java.lang.String getFusekiSparqlEndpointUrl(java.lang.String company) {
java.lang.String FUSEKI_SPARQL_ENDPOINT_URL;
if (company.equals(this.FUSEKI_DATASET_HELLA))
FUSEKI_SPARQL_ENDPOINT_URL = this.FUSEKI_SPARQL_ENDPOINT_HELLA;
else
if (company.equals(this.FUSEKI_DATASET_MHWIRTH))
... | private java.lang.String getFusekiSparqlEndpointUrl(java.lang.String company) {
java.lang.String FUSEKI_SPARQL_ENDPOINT_URL;
if (company == null)
FUSEKI_SPARQL_ENDPOINT_URL = this.FUSEKI_SPARQL_ENDPOINT_DEFAULT;
else
if (company.equals(this.FUSEKI_DATASET_HELLA))
FUSEKI_SPARQL_EN... |
public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
if (isReadyToCommit(tabType, otherfg)) {
if (commit(cPlaceholder)) {
com.vaadin.ui.ComboBox comboAllFCOperators = null;
com.vaadin.ui.ComboBox comboTT = null;
if (isCommission) {
comboAllFCOp... | public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
if (isReadyToCommit(tabType, otherfg)) {
if (commit(cPlaceholder)) {
com.vaadin.ui.ComboBox comboAllFCOperators = null;
com.vaadin.ui.ComboBox comboTT = null;
if (isCommission) {
comboAllFCOp... |
public java.util.Map<java.lang.String, java.lang.String> getColorSwatch() {
java.util.Map<java.lang.String, java.lang.String> swatch = new java.util.LinkedHashMap<java.lang.String, java.lang.String>();
for (dk.i2m.converge.core.Color color : dk.i2m.converge.core.Color.values()) {
swatch.put(i18n.getStri... | public java.util.Map<java.lang.String, java.lang.String> getColorSwatch() {
java.util.Map<java.lang.String, java.lang.String> swatch = new java.util.LinkedHashMap<java.lang.String, java.lang.String>();
for (dk.i2m.converge.core.Color color : dk.i2m.converge.core.Color.values()) {
swatch.put(i18n.getStri... |
public void onScrolled(android.support.v7.widget.RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
totalItemCount = gridLayoutManager.getItemCount();
lastVisibleItem = gridLayoutManager.findLastVisibleItemPosition();
if ((!(isLoading)) && ((totalItemCount) <= ((lastVis... | public void onScrolled(android.support.v7.widget.RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
totalItemCount = gridLayoutManager.getItemCount();
lastVisibleItem = gridLayoutManager.findLastVisibleItemPosition();
if (((!(isLoading)) && ((totalItemCount) > 0)) && ((... |
public thoth_lib_m.dataclass.CopyTable getIArray(int row) throws java.lang.Exception {
thoth_lib_m.dataclass.CopyTable copy = new thoth_lib_m.dataclass.CopyTable((-1));
if ((model) instanceof thoth_lib_m.guiclass.TableCopiesModel) {
copy = ((thoth_lib_m.guiclass.TableCopiesModel) (model)).getIArray(row)... | public thoth_lib_m.dataclass.CopyTable getIArray(int row) throws java.lang.Exception {
thoth_lib_m.dataclass.CopyTable copy = new thoth_lib_m.dataclass.CopyTable((-1));
if ((model) instanceof thoth_lib_m.guiclass.TableCopiesModel) {
copy = ((thoth_lib_m.guiclass.TableCopiesModel) (model)).getIArray(this... |
private static double redistributeProduction(double elUsage, double possibleProduction, java.util.List<nz.ac.victoria.swen424.mainTypes.SimulationStatus> prodStatus) throws java.lang.Exception {
double globalDiff = 0;
double percentage = (java.lang.Math.abs(elUsage)) / possibleProduction;
for (nz.ac.victori... | private static double redistributeProduction(double elUsage, double possibleProduction, java.util.List<nz.ac.victoria.swen424.mainTypes.SimulationStatus> prodStatus) throws java.lang.Exception {
double globalDiff = 0;
double percentage = ((-1) * elUsage) / possibleProduction;
for (nz.ac.victoria.swen424.mai... |
private boolean send(java.lang.String messageString) {
getLog().onOutgoing(messageString);
quickfix.Responder responder;
synchronized(responderLock) {
responder = this.responder;
}
if (responder == null) {
getLog().onEvent(("No responder, not sending message: " + messageString));
... | private boolean send(java.lang.String messageString) {
quickfix.Responder responder = this.responder;
if (null == responder) {
this.getLog().onEvent(("No responder, not sending message: " + messageString));
return false;
}else {
try {
return responder.send(messageString);... |
public com.catify.initializr.domain.Domain createSample() {
com.catify.initializr.rest.DomainGeneratorController.LOG.log(java.util.logging.Level.INFO, "request to create sample");
com.catify.initializr.domain.Domain domain = new com.catify.initializr.domain.Domain("My-Domain", "com.my.domain");
domain.addSe... | public com.catify.initializr.domain.Domain createSample() {
com.catify.initializr.rest.DomainGeneratorController.LOG.log(java.util.logging.Level.INFO, "request to create sample");
com.catify.initializr.domain.Domain domain = new com.catify.initializr.domain.Domain("My-Domain", "com.my.domain");
domain.addSe... |
private miniJava.SyntacticAnalyzer.WhileStmt parseWhileKW() {
miniJava.SyntacticAnalyzer.WhileStmt whileAst = null;
accept(TokenKind.WHILE_KW);
miniJava.SyntacticAnalyzer.Statement stAst = null;
parseLParen();
miniJava.SyntacticAnalyzer.Expression eAst = parseExpression();
parseRParen();
min... | private miniJava.SyntacticAnalyzer.WhileStmt parseWhileKW() {
miniJava.SyntacticAnalyzer.WhileStmt whileAst = null;
accept(TokenKind.WHILE_KW);
miniJava.SyntacticAnalyzer.Statement stAst = null;
parseLParen();
miniJava.SyntacticAnalyzer.Expression eAst = parseExpression();
parseRParen();
min... |
public void setKill(int kill) {
kills += kill;
kk.setKill(kills);
kk.tact();
GreenfootImage bg2 = new GreenfootImage(bg);
bg2.setFont(new java.awt.Font("SERIF", java.awt.Font.BOLD, 24));
bg2.setColor(java.awt.Color.white);
bg2.drawString(("" + (kills)), 675, 40);
} | public void setKill(int kill) {
kills += kill;
kk.setKill(kills);
GreenfootImage bg2 = new GreenfootImage(bg);
bg2.setFont(new java.awt.Font("SERIF", java.awt.Font.BOLD, 24));
bg2.setColor(java.awt.Color.white);
bg2.drawString(("" + (kills)), 675, 40);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.