buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private static java.util.List<onefengma.demo.server.model.metaData.City> initCities() {
if ((onefengma.demo.server.config.MetaDataHelper.CITIES) != null) {
return onefengma.demo.server.config.MetaDataHelper.CITIES;
}
try {
java.lang.String cityFiles = org.apache.commons.io.FileUtils.readFile... | private static java.util.List<onefengma.demo.server.model.metaData.City> initCities() {
try {
java.lang.String cityFiles = org.apache.commons.io.FileUtils.readFileToString(new java.io.File(((onefengma.demo.server.config.Config.getBaseMetaPath()) + "citys.json")), "utf-8");
java.util.List<onefengma.d... |
private static boolean isPdfIntent(android.content.Intent intent) {
if (intent == null)
return false;
java.lang.String filename = intent.getData().getLastPathSegment();
return ((filename != null) && (filename.endsWith(org.chromium.chrome.browser.externalnav.ExternalNavigationDelegateImpl.PDF_SU... | private static boolean isPdfIntent(android.content.Intent intent) {
if ((intent == null) || ((intent.getData()) == null))
return false;
java.lang.String filename = intent.getData().getLastPathSegment();
return ((filename != null) && (filename.endsWith(org.chromium.chrome.browser.externalnav.Ext... |
public void onRightCardExit(java.lang.Object dataObject) {
if ((list.size()) == 0)
android.widget.Toast.makeText(this, "no more users!", Toast.LENGTH_LONG).show();
else {
com.bnutalk.ui.AddContactsActivity.makeToast(this, "like");
new com.bnutalk.server.AHttpAddContacts(list, uid, handle... | public void onRightCardExit(java.lang.Object dataObject) {
if ((list.size()) < 0)
android.widget.Toast.makeText(this, "no more users!", Toast.LENGTH_LONG).show();
else {
com.bnutalk.ui.AddContactsActivity.makeToast(this, "like");
new com.bnutalk.server.AHttpAddContacts(list, uid, handler... |
public void onSuccess(java.util.Map<java.lang.String, java.lang.String> result) {
if (null != result) {
org.instantplaces.purewidgets.client.application.PublicDisplayApplication.parameters = result;
for (java.lang.String key : result.keySet()) {
org.instantplaces.purewidgets.shared.Log.d... | public void onSuccess(java.util.Map<java.lang.String, java.lang.String> result) {
if (null != result) {
org.instantplaces.purewidgets.client.application.PublicDisplayApplication.parameters = result;
for (java.lang.String key : result.keySet()) {
org.instantplaces.purewidgets.shared.Log.d... |
public void mouseClicked(java.awt.event.MouseEvent e) {
if ((e.getClickCount()) == 1) {
int index = availablePluginsList.locationToIndex(e.getPoint());
if (index > (-1)) {
java.lang.String pluginName = ((java.lang.String) (availablePluginsList.getSelectedValue()));
availableS... | public void mouseClicked(java.awt.event.MouseEvent e) {
if ((e.getClickCount()) == 1) {
int index = availablePluginsList.locationToIndex(e.getPoint());
if (index > (-1)) {
java.lang.String pluginName = ((java.lang.String) (availablePluginsList.getSelectedValue()));
availableS... |
protected static int numberSolutions(java.lang.String dir) {
java.io.File out = new java.io.File(((dir + (java.io.File.separator)) + "src"));
org.junit.Assert.assertTrue(((out.listFiles().length) > 1));
int cantSol = 0;
for (java.io.File sol : out.listFiles()) {
cantSol += (sol.getName().startsW... | protected static int numberSolutions(java.lang.String dir) {
java.io.File out = new java.io.File(((dir + (java.io.File.separator)) + "src"));
int cantSol = 0;
for (java.io.File sol : out.listFiles()) {
cantSol += (sol.getName().startsWith("variant-")) ? 1 : 0;
}
return cantSol;
} |
public int incrementClaimCounter() {
int mostRecentId;
int newId;
android.content.SharedPreferences counterFile;
android.content.SharedPreferences.Editor editor;
counterFile = this.context.getSharedPreferences("claimCounter", 0);
mostRecentId = counterFile.getInt("claimCount", 0);
if (mostRe... | public int incrementClaimCounter() {
int mostRecentId;
int newId;
android.content.SharedPreferences counterFile;
android.content.SharedPreferences.Editor editor;
counterFile = this.context.getSharedPreferences("claimCounter", 0);
mostRecentId = counterFile.getInt("claimCount", 0);
newId = mo... |
public void onTextChanged(java.lang.CharSequence charSequence, int i, int i1, int i2) {
float storeCredit = store_credit.getValueFloat();
if (storeCredit > (mOrderHistoryListController.getOrder().getMaxStoreCreditRefund())) {
store_credit.setText(com.magestore.app.util.ConfigUtil.formatNumber(com.magest... | public void onTextChanged(java.lang.CharSequence charSequence, int i, int i1, int i2) {
float storeCredit = store_credit.getValueFloat();
if (storeCredit > (com.magestore.app.util.ConfigUtil.convertToPrice(mOrderHistoryListController.getOrder().getMaxStoreCreditRefund()))) {
store_credit.setText(com.mag... |
public void run() {
active_entities.Coach.State state = active_entities.Coach.State.WAIT_FOR_REFEREE_COMMAND;
while (true) {
switch (state) {
case WAIT_FOR_REFEREE_COMMAND :
this.contestants_bench.callContestants();
state = active_entities.Coach.State.ASSEMBLE... | public void run() {
active_entities.Coach.State state = active_entities.Coach.State.WAIT_FOR_REFEREE_COMMAND;
while (true) {
switch (state) {
case WAIT_FOR_REFEREE_COMMAND :
this.contestants_bench.callContestants();
state = active_entities.Coach.State.ASSEMBLE... |
private void addDiscardedDataPoints(final javafx.scene.chart.XYChart.Series<java.lang.Number, java.lang.Number> discardedDataSeries) {
int count = 0;
for (int index : discardedIndices) {
javafx.scene.chart.XYChart.Data<java.lang.Number, java.lang.Number> dataPoint = new javafx.scene.chart.XYChart.Data<j... | private void addDiscardedDataPoints() {
int count = 0;
for (int index : discardedIndices) {
javafx.scene.chart.XYChart.Data<java.lang.Number, java.lang.Number> dataPoint = new javafx.scene.chart.XYChart.Data<java.lang.Number, java.lang.Number>(discardedCoordinates[0][count], discardedCoordinates[1][coun... |
public long getBits(int position, int length) {
if (position < 0)
throw new java.lang.IllegalArgumentException();
if ((position + length) > 64)
throw new java.lang.IllegalArgumentException();
switch (length) {
case 0 :
return 0;
case 64 :
ret... | public long getBits(int position, int length) {
if (position < 0)
throw new java.lang.IllegalArgumentException();
if ((position + length) > 64)
throw new java.lang.IllegalArgumentException();
switch (length) {
case 0 :
return 0;
case 64 :
ret... |
public void run() {
long now = java.lang.System.currentTimeMillis();
stats.runTime = now - (stats.startTime);
if (((maxRunTime) > 0) && ((stats.runTime) > (maxRunTime))) {
runnable.notifyTimeout();
return ;
}
com.bryllyant.kona.util.KSystemUtil.sleep(1000L);
watch();
} | public void run() {
long now = java.lang.System.currentTimeMillis();
stats.runTime = now - (stats.startTime);
if ((((maxRunTime) != null) && ((maxRunTime) > 0)) && ((stats.runTime) > (maxRunTime))) {
runnable.notifyTimeout();
return ;
}
com.bryllyant.kona.util.KSystemUtil.sleep(1000L... |
public void center() {
setPosition(((game.Game.getPlayer().getX()) - ((Game.SCREEN_WIDTH) / 2)), ((game.Game.getPlayer().getY()) - ((Game.SCREEN_HEIGHT) / 2)));
} | public void center() {
setPosition(((game.Game.getPlayer().getX()) - ((Game.SCREEN_WIDTH) / 2)), ((game.Game.getPlayer().getY()) - ((Game.SCREEN_HEIGHT) / 2)));
update();
} |
public void addPossibleMovesTo(com.github.aedge90.nmm.MoveNode parent, com.github.aedge90.nmm.Player player, com.github.aedge90.nmm.GameBoard gameBoard) {
if ((parent.getChildren().size()) == 0) {
java.util.LinkedList<com.github.aedge90.nmm.Move> moves = gameBoard.possibleMoves(player);
for (com.git... | public java.util.ArrayList<com.github.aedge90.nmm.MoveNode> addPossibleMovesTo(com.github.aedge90.nmm.MoveNode parent, com.github.aedge90.nmm.Player player, com.github.aedge90.nmm.GameBoard gameBoard) {
if ((parent.getChildren().size()) == 0) {
java.util.LinkedList<com.github.aedge90.nmm.Move> moves = gameB... |
public static void setBoard() {
for (int i = 0; i < (GameBase.pitNum); i++) {
GameBase.board[i] = GameBase.stoneNum;
GameBase.board[((2 * (GameBase.pitNum)) - i)] = GameBase.stoneNum;
}
java.lang.System.out.println(GameBase.board[(2 * (GameBase.pitNum))]);
GameBase.board[GameBase.pitNum]... | public static void setBoard() {
for (int i = 0; i < (GameBase.pitNum); i++) {
GameBase.board[i] = GameBase.stoneNum;
GameBase.board[((2 * (GameBase.pitNum)) - i)] = GameBase.stoneNum;
}
GameBase.board[GameBase.pitNum] = 0;
GameBase.board[((2 * (GameBase.pitNum)) + 1)] = 0;
} |
private void stopTimer() {
android.util.Log.i(LOG_TAG, "starting the timer in service");
service.startTimer(cookTime);
timerRunning = true;
incTimeButton.setEnabled(false);
decTimeButton.setEnabled(false);
button.setText(getString(R.string.stop));
resetButton.setEnabled(false);
} | private void startTimer() {
android.util.Log.i(LOG_TAG, "starting the timer in service");
service.startTimer(cookTime);
timerRunning = true;
incTimeButton.setEnabled(false);
decTimeButton.setEnabled(false);
button.setText(getString(R.string.stop));
resetButton.setEnabled(false);
} |
private static java.lang.String dump(java.util.List<com.slang.utils.cmdline.CMDLine.Option> options, boolean defaultsOnly) {
java.lang.String strBuild = "";
for (com.slang.utils.cmdline.CMDLine.Option option : options) {
if (defaultsOnly) {
if (option.isDefault)
strBuild += (... | private static java.lang.String dump(java.util.List<com.slang.utils.cmdline.CMDLine.Option> options, boolean defaultsOnly) {
java.lang.String strBuild = "";
for (com.slang.utils.cmdline.CMDLine.Option option : options) {
if (defaultsOnly) {
if (option.isDefault)
strBuild += (... |
public boolean equals(java.lang.Object object) {
if (!(object instanceof it.cnr.istc.sponsor.db.UserEntity)) {
return false;
}
it.cnr.istc.sponsor.db.UserEntity other = ((it.cnr.istc.sponsor.db.UserEntity) (object));
if ((((this.id) == null) && ((other.id) != null)) || (((this.id) != null) && (!... | public boolean equals(java.lang.Object object) {
if (!(object instanceof it.cnr.istc.sponsor.db.UserEntity)) {
return false;
}
it.cnr.istc.sponsor.db.UserEntity other = ((it.cnr.istc.sponsor.db.UserEntity) (object));
return !((((this.id) == null) && ((other.id) != null)) || (((this.id) != null) ... |
private double getNormalizedTaskDisplacement(us.ihmc.manipulation.planning.rrt.wholebodyplanning.TaskNode nodeOne, us.ihmc.manipulation.planning.rrt.wholebodyplanning.TaskNode nodeTwo) {
double squaredDisplacement = 0;
for (int i = 1; i < (rootNode.getDimensionOfNodeData()); i++) {
double nodeOneValue =... | private double getNormalizedTaskDisplacement(us.ihmc.manipulation.planning.rrt.wholebodyplanning.TaskNode nodeOne, us.ihmc.manipulation.planning.rrt.wholebodyplanning.TaskNode nodeTwo) {
double squaredDisplacement = 0;
for (int i = 1; i < (rootNode.getDimensionOfNodeData()); i++) {
double nodeOneValue =... |
public void onMessageReceived(com.google.android.gms.wearable.MessageEvent messageEvent) {
super.onMessageReceived(messageEvent);
if ("/KEEPMESAFE".equals(messageEvent.getPath())) {
android.util.Log.d("myTag", "Message received from Wearable");
android.content.Intent intent = new android.content... | public void onMessageReceived(com.google.android.gms.wearable.MessageEvent messageEvent) {
super.onMessageReceived(messageEvent);
if ("/KEEPMESAFE".equals(messageEvent.getPath())) {
android.util.Log.d("myTag", "Message received from Wearable");
android.content.Intent intent = new android.content... |
public java.lang.Integer addCategory(com.nisum.portal.data.domain.Categories category) {
com.nisum.portal.data.dao.impl.CategoriesDAOImpl.logger.info("CategoriesDAOImpl :: addCategories");
java.lang.Integer status;
com.nisum.portal.data.domain.Categories categories = categoriesRepository.findByCategoryName(... | public java.lang.Integer addCategory(com.nisum.portal.data.domain.Categories category) {
com.nisum.portal.data.dao.impl.CategoriesDAOImpl.logger.info("CategoriesDAOImpl :: addCategories");
java.lang.Integer status;
com.nisum.portal.data.domain.Categories categories = categoriesRepository.findByCategoryName(... |
public void clear(org.kutsuki.akanana.shoe.Hand hand) {
hand.clear();
org.junit.Assert.assertEquals("Unexpected Size", hand.size(), 0);
org.junit.Assert.assertEquals("Unexpected Showing Rank", hand.showingRank(), 0);
org.junit.Assert.assertEquals("Unexpected Soft", hand.getSoft(), 0);
org.junit.Asse... | public void clear(org.kutsuki.akanana.shoe.Hand hand) {
hand.clear();
org.junit.Assert.assertEquals("Unexpected Size", hand.size(), 0);
org.junit.Assert.assertEquals("Unexpected Soft", hand.getSoft(), 0);
org.junit.Assert.assertEquals("Unexpected String", hand.toString(), "");
org.junit.Assert.asser... |
public void onResume() {
super.onResume();
log("on resume");
if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {
log("being process intent");
processIntent(getIntent());
}else {
log("resume was not due to nfc");
}
long prev_id = getLastEventId(getCont... | public void onResume() {
super.onResume();
if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {
processIntent(getIntent());
}
long prev_id = getLastEventId(getContentResolver());
if (prev_id == (prefs.getKey(prefs.EVENT_KEY))) {
com.krkeco.dateit.widget.WidgetProv... |
private void withDriverAndFlight(java.util.function.BiConsumer<com.lightbend.lagom.javadsl.testkit.PersistentEntityTestDriver<less.stupid.flights.impl.FlightCommand, less.stupid.flights.impl.FlightEvent, less.stupid.flights.impl.FlightState>, com.lightbend.lagom.javadsl.testkit.PersistentEntityTestDriver.Outcome<less.s... | private void withDriverAndFlight(java.util.function.BiConsumer<com.lightbend.lagom.javadsl.testkit.PersistentEntityTestDriver<less.stupid.flights.impl.FlightCommand, less.stupid.flights.impl.FlightEvent, less.stupid.flights.impl.FlightState>, com.lightbend.lagom.javadsl.testkit.PersistentEntityTestDriver.Outcome<less.s... |
public static final int getSignedInteger(int o1, int o2, int o3, int o4) {
return ((((o1 & 255) << 24) | ((o2 & 255) << 16)) | ((o3 & 255) << 8)) | (o1 & 255);
} | public static final int getSignedInteger(int o1, int o2, int o3, int o4) {
return ((((o1 & 255) << 24) | ((o2 & 255) << 16)) | ((o3 & 255) << 8)) | (o4 & 255);
} |
public void mouseReleased(java.awt.event.MouseEvent arg0) {
java.lang.String filename = "";
MazeGenerator.Maze tempMaze = new MazeGenerator.Maze();
tempMaze.setTitle(inpMazeTitle.getText());
tempMaze.setGridSize(sldGridSize.getValue());
tempMaze.setActiveNodeCount(sldActiveNodeCount.getValue());
... | public void mouseReleased(java.awt.event.MouseEvent arg0) {
java.lang.String filename = "";
MazeGenerator.Maze tempMaze = new MazeGenerator.Maze(inpMazeTitle.getText(), sldGridSize.getValue(), sldActiveNodeCount.getValue());
tempMaze.generateMaze();
filename = tempMaze.toFile();
model1.addElement(fi... |
public void testCheckOutVocabularyFolder() throws eionet.meta.service.ServiceException {
vocabularyService.checkOutVocabularyFolder(1, "testUser");
eionet.meta.dao.domain.VocabularyFolder result = vocabularyService.getVocabularyFolder("common", "test_vocabulary1", true);
org.junit.Assert.assertNotNull("Work... | public void testCheckOutVocabularyFolder() throws eionet.meta.service.ServiceException {
vocabularyService.checkOutVocabularyFolder(1, "testUser");
eionet.meta.dao.domain.VocabularyFolder result = vocabularyService.getVocabularyFolder("common", "test_vocabulary1", true);
assertNotNull("Working copy vocabula... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
overlay = ((android.widget.RelativeLayout) (findViewById(R.id.overlay)));
db = ((com.group_seven.csc413.finalprojectrepository.Global) (this.getApplication())).getD... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
overlay = ((android.widget.RelativeLayout) (findViewById(R.id.overlay)));
db = ((com.group_seven.csc413.finalprojectrepository.Global) (this.getApplication())).getD... |
public java.lang.Object getRealAttributeValueFromObject(java.lang.Object object, java.lang.Object attribute) {
boolean wasInstantiated = ((org.eclipse.persistence.indirection.ValueHolderInterface) (attribute)).isInstantiated();
java.lang.Object value = super.getRealAttributeValueFromObject(object, attribute);
... | public java.lang.Object getRealAttributeValueFromObject(java.lang.Object object, java.lang.Object attribute) {
boolean wasInstantiated = ((attribute != null) && (attribute instanceof org.eclipse.persistence.indirection.ValueHolderInterface)) && (((org.eclipse.persistence.indirection.ValueHolderInterface) (attribute... |
protected boolean isItemHoldable(org.vufind.ItemInfo itemInfo, org.vufind.Scope curScope) {
java.util.ArrayList<org.vufind.LoanRule> relevantLoanRules = getRelevantLoanRules(itemInfo.getITypeCode(), itemInfo.getLocationCode(), curScope.getRelatedNumericPTypes());
for (org.vufind.LoanRule loanRule : relevantLoan... | protected boolean isItemHoldable(org.vufind.ItemInfo itemInfo, org.vufind.Scope curScope) {
java.util.ArrayList<org.vufind.LoanRule> relevantLoanRules = getRelevantLoanRules(itemInfo.getITypeCode(), itemInfo.getLocationCode(), curScope.getRelatedNumericPTypes());
for (org.vufind.LoanRule loanRule : relevantLoan... |
public static int findNext(java.lang.String str) {
int index = 0;
if ((str.indexOf(' ')) == (-1)) {
return index;
}
while ((str.charAt(index)) == ' ') {
index++;
}
return index;
} | public static int findNext(java.lang.String str) {
int index = 0;
if ((str.indexOf(' ')) == (-1)) {
return index;
}
while ((str.charAt(index)) == ' ') {
index++;
if (index == (str.length())) {
return 0;
}
}
return index;
} |
public void testGetAllStudent() {
java.lang.Iterable<com.jimmy.domain.Student> list = studentRepository.findAll();
java.lang.System.out.println(("list:" + list));
java.util.Iterator<com.jimmy.domain.Student> itr = list.iterator();
while (itr.hasNext()) {
java.lang.System.out.println(("id:" + (it... | public void testGetAllStudent() {
java.lang.Iterable<com.jimmy.domain.Student> list = studentRepository.findAll();
java.util.Iterator<com.jimmy.domain.Student> itr = list.iterator();
while (itr.hasNext()) {
java.lang.System.out.println(("id:" + (itr.next().getId())));
}
} |
public com.google.maps.model.LatLng makeGeocodeDataFromInfo(java.lang.String address) throws com.google.maps.errors.ApiException, java.io.IOException, java.lang.InterruptedException {
com.google.maps.GeoApiContext context = new com.google.maps.GeoApiContext().setApiKey(API_KEY);
final com.google.maps.GeocodingA... | public com.google.maps.model.LatLng makeGeocodeDataFromInfo(java.lang.String address) throws com.google.maps.errors.ApiException, java.io.IOException, java.lang.InterruptedException {
com.google.maps.GeoApiContext context = new com.google.maps.GeoApiContext().setApiKey(API_KEY);
final com.google.maps.GeocodingA... |
public void onBackPressed() {
com.sothree.slidinguppanel.SlidingUpPanelLayout slidingPanelLayout = ((com.sothree.slidinguppanel.SlidingUpPanelLayout) (findViewById(R.id.sliding_panel_layout)));
if (slidingPanelLayout != null) {
if (slidingPanelLayout.isPanelExpanded()) {
slidingPanelLayout.c... | public void onBackPressed() {
com.sothree.slidinguppanel.SlidingUpPanelLayout slidingPanelLayout = ((com.sothree.slidinguppanel.SlidingUpPanelLayout) (findViewById(R.id.sliding_panel_layout)));
if ((slidingPanelLayout != null) && (slidingPanelLayout.isPanelExpanded())) {
slidingPanelLayout.collapsePanel... |
private java.lang.String removeFrontSideAudio(java.lang.String answerContent) {
java.lang.String answerFormat = getAnswerFormat();
if (answerFormat.contains("{{FrontSide}}")) {
java.lang.String frontSideFormat = mCurrentCard._getQA(false).get("q");
java.util.regex.Matcher audioReferences = Sound... | private java.lang.String removeFrontSideAudio(java.lang.String answerContent) {
java.lang.String answerFormat = getAnswerFormat();
if (answerFormat.contains("{{FrontSide}}")) {
java.lang.String frontSideFormat = mCurrentCard._getQA(false).get("q");
java.util.regex.Matcher audioReferences = Sound... |
public void setSkipValue(int value) {
super.setSkipValue(value);
ucar.visad.display.FlowDisplayable fd = getGridDisplay();
if ((skipFactorWidget) != null) {
skipFactorWidget.setValue(value);
}
fd.setUseSpeedForColor(useSpeedForColor);
if (useSpeedForColor) {
colorIndex = fd.getSp... | public void setSkipValue(int value) {
super.setSkipValue(value);
ucar.visad.display.FlowDisplayable fd = getGridDisplay();
if ((skipFactorWidget) != null) {
skipFactorWidget.setValue(value);
}
if (fd != null) {
fd.setUseSpeedForColor(useSpeedForColor);
if (useSpeedForColor) {... |
private void authSuccess() {
isAuth = true;
pulseListener = new client.transmission.PulseListener(this);
pulseListenerThread = new java.lang.Thread(pulseListener);
pulseListenerThread.start();
pulseSender = new java.lang.Thread(new client.transmission.PulseSender(out, username));
pulseSender.sta... | private void authSuccess(java.lang.String username) {
isAuth = true;
this.username = username;
pulseListener = new client.transmission.PulseListener(this);
pulseListenerThread = new java.lang.Thread(pulseListener);
pulseListenerThread.start();
pulseSender = new java.lang.Thread(new client.transm... |
public T reduce(scala.Function2<T, T, T> f) {
com.datatorrent.example.ApexRDD.ReduceOperator reduceOperator = dag.addOperator(("Reduce " + (java.lang.System.currentTimeMillis())), com.datatorrent.example.ApexRDD.ReduceOperator.class);
reduceOperator.f2 = f;
return ((T) (this));
} | public T reduce(scala.Function2<T, T, T> f) {
com.datatorrent.example.ApexRDD.ReduceOperator reduceOperator = dag.addOperator(("Reduce " + (java.lang.System.currentTimeMillis())), com.datatorrent.example.ApexRDD.ReduceOperator.class);
reduceOperator.f2 = f;
return ((T) (new java.lang.Integer(1)));
} |
public void onDrawerClosed(android.view.View view) {
super.onDrawerClosed(view);
if (ut.getEmailAddress().equals("none")) {
getSupportActionBar().setTitle("Your Position");
android.util.Log.i("emfanisi", ut.getEmailAddress());
}else {
getSupportActionBar().setTitle(mActivityTitle);
... | public void onDrawerClosed(android.view.View view) {
super.onDrawerClosed(view);
if (ut.getEmailAddress().equals("none")) {
getSupportActionBar().setTitle("Your Position");
}else {
getSupportActionBar().setTitle(mActivityTitle);
}
invalidateOptionsMenu();
} |
public java.lang.Object getCellEditorValue() {
if (this.isPushed()) {
if (this.getLabel().equals(Configurations.CCTM_BUTTON_NAME)) {
cctmFrame.setVisible(true);
}else
if (this.getLabel().equals(Configurations.STD_BUTTON_NAME)) {
ftdFrame.setVisible(true);
... | public java.lang.Object getCellEditorValue() {
if (this.isPushed()) {
if (this.getLabel().equals(Configurations.CCTM_BUTTON_NAME)) {
cctmFrame.setVisible(true);
}else
if (this.getLabel().equals(Configurations.STD_BUTTON_NAME)) {
stdFrame.setVisible(true);
... |
protected void onDialogClosed(boolean positiveResult) {
super.onDialogClosed(positiveResult);
if (positiveResult) {
mLastHour = mTimePicker.getCurrentHour();
mLastMinute = mTimePicker.getCurrentMinute();
java.lang.String time = ((toTimeDigits(mLastHour)) + ":") + (toTimeDigits(mLastMinut... | protected void onDialogClosed(boolean positiveResult) {
super.onDialogClosed(positiveResult);
if (positiveResult) {
mLastHour = mTimePicker.getCurrentHour();
mLastMinute = mTimePicker.getCurrentMinute();
java.lang.String time = ((mLastHour) + ":") + (toTimeDigits(mLastMinute));
i... |
public void init() {
setPackage(mapperPackage);
addAttribute(org.molgenis.data.mapper.meta.AttributeMappingMetaData.IDENTIFIER, org.molgenis.data.meta.model.EntityMetaData.AttributeRole.ROLE_ID);
addAttribute(org.molgenis.data.mapper.meta.AttributeMappingMetaData.TARGETATTRIBUTEMETADATA).setNillable(false);... | public void init() {
setPackage(mapperPackage);
addAttribute(org.molgenis.data.mapper.meta.AttributeMappingMetaData.IDENTIFIER, org.molgenis.data.meta.model.EntityMetaData.AttributeRole.ROLE_ID);
addAttribute(org.molgenis.data.mapper.meta.AttributeMappingMetaData.TARGETATTRIBUTEMETADATA).setNillable(false);... |
public boolean isStarred(java.lang.Object target) {
if (target == null) {
return false;
}
org.wilson.world.star.StarProvider provider = this.getStarProvider(target);
java.util.List list = this.stars.get(provider);
for (java.lang.Object item : list) {
if (provider.equals(item, target)... | public boolean isStarred(java.lang.Object target) {
if (target == null) {
return false;
}
org.wilson.world.star.StarProvider provider = this.getStarProvider(target);
java.util.List list = this.stars.get(provider);
if (list != null) {
for (java.lang.Object item : list) {
i... |
public int getLastHeartbeat(java.lang.String user) {
int lastHeartBeat = -1;
for (int i = 0; i < (userInfo.size()); i++) {
if ((userInfo.get(i).username) == user) {
lastHeartBeat = ((int) (userInfo.get(i).lastHeartbeat));
break;
}
}
return lastHeartBeat;
} | public int getLastHeartbeat(java.lang.String user) {
int lastHeartBeat = -1;
for (int i = 0; i < (userInfo.size()); i++) {
if (userInfo.get(i).username.equals(user)) {
lastHeartBeat = ((int) (userInfo.get(i).lastHeartbeat));
break;
}
}
return lastHeartBeat;
} |
public java.util.List<java.lang.String> convertListElementToListOfElementText(java.util.List<org.openqa.selenium.WebElement> elements) {
java.util.List<java.lang.String> texts = new java.util.ArrayList<>();
for (org.openqa.selenium.WebElement webElement : elements) {
texts.add(webElement.getText().toLow... | public java.util.List<java.lang.String> convertListElementToListOfElementText(java.util.List<org.openqa.selenium.WebElement> elements) {
java.util.List<java.lang.String> texts = new java.util.ArrayList<>();
for (org.openqa.selenium.WebElement webElement : elements) {
if (!(webElement.getText().isEmpty()... |
public LeastMatrix.Output compute(prashanth.photoncodechallenge.reusable.LeastMatrix leastMatrix) throws java.lang.Exception {
java.util.List<prashanth.photoncodechallenge.reusable.SmallestInteger> integers = shortPath.findPath(leastMatrix);
if (integers == null) {
throw new java.lang.Exception("Total c... | public LeastMatrix.Output compute(prashanth.photoncodechallenge.reusable.LeastMatrix leastMatrix) {
java.util.List<prashanth.photoncodechallenge.reusable.SmallestInteger> integers = shortPath.findPath(leastMatrix);
if (integers == null) {
return new prashanth.photoncodechallenge.reusable.LeastMatrix.Out... |
public void present(java.lang.Appendable out, java.lang.String rootKey, java.lang.Object o) throws java.lang.Exception {
this.out = out;
out.append("var o={};\n");
assign = new java.lang.StringBuilder();
presentOne(rootKey, o, (-1));
out.append(";\n").append(assign);
} | public void present(java.lang.Appendable out, java.lang.String rootKey, java.lang.Object o) throws java.lang.Exception {
this.out = out;
out.append("var o={};\n");
assign = new java.lang.StringBuilder();
presentOne(rootKey, o, (-1), false);
out.append(";\n").append(assign);
} |
public boolean attack(navalbattle.Matrix matrix, int row, java.lang.String col) {
try {
int column = matrix.getColumn(col);
if ((matrix.get(row, column)) == null) {
return false;
}
matrix.set("X", row, column);
return true;
} catch (java.lang.ArrayIndexOutOfBo... | public boolean attack(navalbattle.Matrix matrix, int row, java.lang.String col) {
try {
int column = matrix.getColumn(col);
if (((matrix.get(row, column)) == null) || (matrix.get(row, column).equals("X"))) {
return false;
}
matrix.set("X", row, column);
return tru... |
public uk.co.cranfield.model.Results solve() {
uk.co.cranfield.core.WaveSimulatorSolver.logger.info(("Preparing Bathymetry File : " + (uk.co.cranfield.common.Constants.SLOPE_RES_FILE)));
prepareBathyMetryFile();
uk.co.cranfield.core.WaveSimulatorSolver.logger.info(("Bathymetry File Created with file name : ... | public uk.co.cranfield.model.Results solve() {
uk.co.cranfield.core.WaveSimulatorSolver.logger.info(("Preparing Bathymetry File : " + (uk.co.cranfield.common.Constants.SLOPE_RES_FILE)));
uk.co.cranfield.core.WaveSimulatorSolver.logger.info(("Bathymetry File Created with file name : " + (uk.co.cranfield.common.C... |
public void run() {
executePredictionCalculation();
org.oracul.service.task.PredictionTask3D.LOGGER.debug((("Execute calculation 3D task #" + (getId())) + ": test sleep for 10 sec"));
org.oracul.service.dto.Prediction3D pred = facade.getPrediction3dRepository().findById(getId());
pred = facade.getBuilde... | public void run() {
try {
executePredictionCalculation();
org.oracul.service.task.PredictionTask3D.LOGGER.debug((("Execute calculation 3D task #" + (getId())) + ": test sleep for 10 sec"));
org.oracul.service.dto.Prediction3D pred = facade.getPrediction3dRepository().findById(getId());
... |
public void updateWeights(double rate) {
for (int i = 0; i < (weights.length); i++) {
double deltaW = ((-rate) * (connections[i].delta)) * (Output);
weights[i] += delta;
}
} | public void updateWeights(double rate) {
for (int i = 0; i < (weights.length); i++) {
double deltaW = (((-1) * rate) * (connections[i].delta)) * (Output);
weights[i] += deltaW;
}
} |
private void updateMap() {
cLong += 1.0E-4;
cLat += 1.0E-4;
double longitude = java.lang.Double.parseDouble(Stats.longitude);
double lat = java.lang.Double.parseDouble(Stats.latitude);
currLoc = new org.jxmapviewer.viewer.GeoPosition(cLat, cLong);
smm.update(currLoc);
mapViewer.setAddressLoc... | private void updateMap() {
cLong += 1.0E-4;
cLat += 1.0E-4;
double longitude = java.lang.Double.parseDouble(Stats.longitude);
double lat = java.lang.Double.parseDouble(Stats.latitude);
if ((longitude != 0) && (lat != 0))
currLoc = new org.jxmapviewer.viewer.GeoPosition(lat, longitude);
e... |
private static java.lang.String hash(long input, java.lang.String alphabet) {
java.lang.String hash = "";
int alphabetLen = alphabet.length();
do {
hash = (alphabet.charAt(((int) (input % alphabetLen)))) + hash;
input /= alphabetLen;
} while (input > 0 );
return hash;
} | private static java.lang.String hash(long input, java.lang.String alphabet) {
java.lang.String hash = "";
int alphabetLen = alphabet.length();
do {
int index = ((int) (input % alphabetLen));
if ((index >= 0) && (index < (alphabet.length()))) {
hash = (alphabet.charAt(index)) + ha... |
private static void moveDown() {
int selectedIndex = EditLayersPopup.list.getSelectionModel().getSelectedIndex();
if (selectedIndex != (Main.layerStrings.size())) {
EditLayersPopup.swap(selectedIndex, (selectedIndex + 1));
EditLayersPopup.list.getSelectionModel().select((selectedIndex + 1));
... | private static void moveDown() {
int selectedIndex = EditLayersPopup.list.getSelectionModel().getSelectedIndex();
if (selectedIndex != ((Main.layerStrings.size()) - 1)) {
EditLayersPopup.swap(selectedIndex, (selectedIndex + 1));
EditLayersPopup.list.getSelectionModel().select((selectedIndex + 1)... |
public void onEnable() {
readConfig();
getServer().getPluginManager().registerEvents(this, this);
org.bukkit.plugin.RegisteredServiceProvider<net.milkbowl.vault.chat.Chat> rsp = getServer().getServicesManager().getRegistration(net.milkbowl.vault.chat.Chat.class);
net.citringo.hageplugin.HagePlugin.chat ... | public void onEnable() {
readConfig();
getServer().getPluginManager().registerEvents(this, this);
org.bukkit.plugin.RegisteredServiceProvider<net.milkbowl.vault.chat.Chat> rsp = getServer().getServicesManager().getRegistration(net.milkbowl.vault.chat.Chat.class);
net.citringo.hageplugin.HagePlugin.chat ... |
private static void playCollisionNoise() {
if ((java.lang.Math.abs((((com.mygdx.game.PlayScreen.taxi.getVelocity()[0]) * (com.mygdx.game.PlayScreen.taxi.getOrientation()[0])) + ((com.mygdx.game.PlayScreen.taxi.getVelocity()[1]) * (com.mygdx.game.PlayScreen.taxi.getOrientation()[1]))))) > 0.7) {
com.mygdx.ga... | public static void playCollisionNoise() {
if ((java.lang.Math.abs((((com.mygdx.game.PlayScreen.taxi.getVelocity()[0]) * (com.mygdx.game.PlayScreen.taxi.getOrientation()[0])) + ((com.mygdx.game.PlayScreen.taxi.getVelocity()[1]) * (com.mygdx.game.PlayScreen.taxi.getOrientation()[1]))))) > 0.7) {
com.mygdx.gam... |
public com.einzig.ipst2.portal.PortalAccepted build(java.lang.String name, java.util.Date dateResponded, java.lang.String message) {
java.lang.String pictureURL = parsePictureURL(message);
java.lang.String address = parseLiveAddress(message);
java.lang.String intelLink = parseIntelLink(message);
return ... | public com.einzig.ipst2.portal.PortalAccepted build(java.lang.String name, java.util.Date dateResponded, java.lang.String message) {
java.lang.String pictureURL = parsePictureURL(message, name);
java.lang.String address = parseLiveAddress(message);
java.lang.String intelLink = parseIntelLink(message);
r... |
public void testFamily() {
org.talend.components.api.component.ComponentDefinition cd = getComponentService().getComponentDefinition("tSalesforceConnection");
org.junit.Assert.assertEquals(2, cd.getFamilies().length);
org.junit.Assert.assertEquals("Business/Salesforce", cd.getFamilies()[0]);
org.junit.A... | public void testFamily() {
org.talend.components.api.component.ComponentDefinition cd = getComponentService().getComponentDefinition("tSalesforceConnection");
assertEquals(2, cd.getFamilies().length);
assertEquals("Business/Salesforce", cd.getFamilies()[0]);
assertEquals("Cloud/Salesforce", cd.getFamili... |
private void gameOverP2() {
newGameSetup();
javafx.application.Platform.runLater(new java.lang.Runnable() {
@java.lang.Override
public void run() {
new ErrorBox("You Win!", "You have won this game!");
}
});
if (isHost) {
GameServer.closeConnection();
j... | private void gameOverP2() {
javafx.application.Platform.runLater(new java.lang.Runnable() {
@java.lang.Override
public void run() {
new ErrorBox("You Win!", "You have won this game!");
}
});
if (isHost) {
GameServer.closeConnection();
java.lang.System.out.... |
private void step() {
if ((player) == null)
player = view.GameFrame.getInstance().getSnake();
player.setLookingDirection(dir);
player.move();
view.GameFrame.getInstance().repaintGameCanvas();
} | private void step() {
if ((player) == null)
player = view.GameFrame.getInstance().getSnake();
if ((dir) != null)
player.setLookingDirection(dir);
player.move();
view.GameFrame.getInstance().repaintGameCanvas();
} |
public void doPush(level.action.PushAction action) {
level.Location agLoc = action.getAgentLocation();
level.Direction dir1 = action.getAgentDir();
level.Direction dir2 = action.getBoxDir();
level.Location nAgLoc = level.Location.newLocation(dir1, agLoc);
level.Location nBoxLoc = level.Location.newL... | public void doPush(level.action.PushAction action) {
level.Direction dir1 = action.getAgentDir();
level.Direction dir2 = action.getBoxDir();
level.Location agLoc = action.getAgentLocation();
level.Location nAgLoc = level.Location.newLocation(dir1, agLoc);
level.Location nBoxLoc = level.Location.newL... |
public tcg.tree.ITreeObject findRootLevelTreeObjectByContentDescription(java.lang.String description) {
for (tcg.tree.ITreeObject treeObject : ((tcg.tree.TreeParent) (treeInstanceRoot)).getChildren()) {
if (description.equals(treeObject.getContent().getDescription()))
return treeObject;
... | public tcg.tree.ITreeObject findRootLevelTreeObjectByContentDescription(java.lang.String description) {
if ((treeInstanceRoot) == null)
return null;
for (tcg.tree.ITreeObject treeObject : ((tcg.tree.TreeParent) (treeInstanceRoot)).getChildren()) {
if (description.equals(treeObject.getConten... |
protected void commit() {
this.matrix = getMatrix();
for (java.util.Map.Entry<java.lang.Integer, android.util.Pair<android.graphics.PointF, android.graphics.PointF>> p : points.entrySet()) {
p.setValue(new android.util.Pair<android.graphics.PointF, android.graphics.PointF>(p.getValue().second, p.getValu... | private void commit() {
this.matrix = getMatrix();
for (java.util.Map.Entry<java.lang.Integer, android.util.Pair<android.graphics.PointF, android.graphics.PointF>> p : points.entrySet()) {
p.setValue(new android.util.Pair(p.getValue().second, p.getValue().second));
}
} |
public java.lang.Object getPropertyAtIndex(java.lang.String s, int i) {
try {
java.lang.String attr = replaceAspectAttrSep(s);
mc.dctm.el.identifier.context.IDfValue dfValue = sysObject.getRepeatingValue(attr, i);
return extractValue(dfValue, sysObject.getAttrDataType(s));
} catch (mc.dc... | public java.lang.Object getPropertyAtIndex(java.lang.String s, int i) {
try {
java.lang.String attr = replaceAspectAttrSep(s);
mc.dctm.el.identifier.context.IDfValue dfValue = sysObject.getRepeatingValue(attr, i);
return extractValue(dfValue, sysObject.getAttrDataType(attr));
} catch (mc... |
public T get() {
if (!(set)) {
throw new redis.clients.jedis.exceptions.JedisDataException("Please close pipeline or multi block before calling this method.");
}
if (!(built)) {
if ((data) instanceof redis.clients.jedis.exceptions.JedisDataException) {
throw new redis.clients.jed... | public T get() {
if (!(set)) {
throw new redis.clients.jedis.exceptions.JedisDataException("Please close pipeline or multi block before calling this method.");
}
if (!(built)) {
if ((data) != null) {
if ((data) instanceof redis.clients.jedis.exceptions.JedisDataException) {
... |
public void log(com.site.maven.plugin.codegen.LogLevel logLevel, java.lang.String message) {
switch (logLevel) {
case DEBUG :
if (debug) {
getLog().debug(message);
}
break;
case INFO :
if ((debug) || (verbose)) {
getLog(... | public void log(com.site.maven.plugin.codegen.LogLevel logLevel, java.lang.String message) {
switch (logLevel) {
case DEBUG :
if (debug) {
getLog().info(message);
}
break;
case INFO :
if ((debug) || (verbose)) {
getLog()... |
public synchronized void connect(java.lang.String address) {
android.bluetooth.BluetoothDevice device = btAdapter.getRemoteDevice(address);
android.util.Log.d(com.henrykvdb.sttt.BtService.TAG, ("connect to: " + device));
closeConnecting();
closeConnected();
connectingThread = new com.henrykvdb.sttt.... | public synchronized void connect(java.lang.String address) {
android.bluetooth.BluetoothDevice device = btAdapter.getRemoteDevice(address);
android.util.Log.d(com.henrykvdb.sttt.BtService.TAG, ("connect to: " + device));
start();
connectingThread = new com.henrykvdb.sttt.BtService.ConnectingThread(devic... |
public void databaseMigration() throws java.sql.SQLException, org.wso2.carbon.apimgt.migration.APIMigrationException {
java.lang.String amScriptPath = (((((org.wso2.carbon.utils.CarbonUtils.getCarbonHome()) + (java.io.File.separator)) + "migration-scripts") + (java.io.File.separator)) + "19-110-migration") + (java.... | public void databaseMigration() throws java.sql.SQLException, org.wso2.carbon.apimgt.migration.APIMigrationException {
java.lang.String amScriptPath = (((((org.wso2.carbon.utils.CarbonUtils.getCarbonHome()) + (java.io.File.separator)) + "migration-scripts") + (java.io.File.separator)) + "19-110-migration") + (java.... |
private void processCard(com.valeriisosliuk.game.model.Game game, com.valeriisosliuk.game.model.Card card) {
com.valeriisosliuk.game.model.Player player = game.getActivePlayer();
player.removeCard(card);
player.getActiveState().addCurrentTurnCard(card);
game.getCardHolder().putCardInDiscard(card);
j... | private void processCard(com.valeriisosliuk.game.model.Game game, com.valeriisosliuk.game.model.Card card) {
com.valeriisosliuk.game.model.Player player = game.getActivePlayer();
player.removeCard(card);
player.getActiveState().addCurrentTurnCard(card);
game.putCardInDiscard(card);
java.util.Set<com... |
public boolean redoToDoList() {
if (toDoListUndoChanges.isEmpty()) {
return false;
}
seedu.commando.model.ToDoListChange change = toDoListUndoChanges.get(((toDoListUndoChanges.size()) - 1));
try {
applyToDoListChange(change);
} catch (seedu.commando.commons.exceptions.IllegalValueExc... | public boolean redoToDoList() {
if (toDoListUndoChanges.isEmpty()) {
return false;
}
seedu.commando.model.ToDoListChange change = toDoListUndoChanges.get(((toDoListUndoChanges.size()) - 1));
toDoListChanges.add(change);
toDoListUndoChanges.remove(((toDoListUndoChanges.size()) - 1));
try ... |
public void getAll() throws java.lang.Exception {
com.cinema.controller.rest.SessionControllerTest.LOGGER.debug("mock test: getAll()");
java.util.List<com.cinema.model.Session> sessions = new java.util.ArrayList<>();
sessions.add(com.cinema.controller.rest.SessionControllerTest.SESSION_1);
sessions.add(... | public void getAll() throws java.lang.Exception {
com.cinema.controller.rest.SessionControllerTest.LOGGER.debug("mock test: getAll()");
java.util.List<com.cinema.model.Session> sessions = new java.util.ArrayList<>();
sessions.add(com.cinema.controller.rest.SessionControllerTest.SESSION_1);
sessions.add(... |
public java.lang.Object bareissPivot(final de.feu.algebra.computeralgebra.matrix.Matrix matrix) throws de.feu.algebra.computeralgebra.algorithm.AlgorithmFailedException {
final int colSize = (matrix.getColCount()) - 1;
checkPrincipalMinorsNonZero(matrix, colSize);
for (int k = 0; k < colSize; k++) {
... | public java.lang.Object bareissPivot(final de.feu.algebra.computeralgebra.matrix.Matrix matrix) throws de.feu.algebra.computeralgebra.algorithm.AlgorithmFailedException {
final int colSize = (matrix.getColCount()) - 1;
for (int k = 0; k < colSize; k++) {
checkForZeroDivisorAndPivotColumn(matrix, k);
... |
public java.util.concurrent.Future<com.sun.jersey.api.client.ClientResponse> open(java.lang.String path, java.lang.String flag) throws java.io.IOException {
hsyndicate.rest.common.WebParamBuilder builder = new hsyndicate.rest.common.WebParamBuilder(path);
builder.addParam(getAPI(hsyndicate.rest.client.Syndicate... | public java.util.concurrent.Future<com.sun.jersey.api.client.ClientResponse> open(java.lang.String path, java.lang.String flag) throws java.io.IOException {
hsyndicate.rest.common.WebParamBuilder builder = new hsyndicate.rest.common.WebParamBuilder(path);
builder.addParam(getAPI(hsyndicate.rest.client.Syndicate... |
public no.ntnu.stud.minvakt.data.NewsFeedItem getNewsFeed() {
if (getSession().isAdmin()) {
return newsDB.getNewsFeedAdmin().get(0);
}else {
return newsDB.getNewsFeed(getSession().getUser().getId()).get(0);
}
} | public java.util.ArrayList<no.ntnu.stud.minvakt.data.NewsFeedItem> getNewsFeed() {
if (getSession().isAdmin()) {
return newsDB.getNewsFeedAdmin();
}else {
return newsDB.getNewsFeed(getSession().getUser().getId());
}
} |
public void actionPerformed(java.awt.event.ActionEvent e) {
ctrl.changerSauvegardeProjet(enregistrerFichier.getSelectedFile().getPath().substring(0, ((enregistrerFichier.getSelectedFile().getPath().length()) - (enregistrerFichier.getSelectedFile().getName().length()))), enregistrerFichier.getSelectedFile().getName(... | public void actionPerformed(java.awt.event.ActionEvent e) {
if ((enregistrerFichier.getSelectedFile()) != null) {
ctrl.changerSauvegardeProjet(enregistrerFichier.getSelectedFile().getPath().substring(0, ((enregistrerFichier.getSelectedFile().getPath().length()) - (enregistrerFichier.getSelectedFile().getNam... |
public static ba.unsa.etf.si.app.Inventura.Model.KlasaArtikla nadjiIme(java.lang.String naziv) throws java.lang.Exception {
ba.unsa.etf.si.app.Inventura.Kontroleri.KlasaArtikalaKontroler.openSession();
java.util.List<java.lang.Object> klase = ba.unsa.etf.si.app.Inventura.Kontroleri.KlasaArtikalaKontroler.s.crea... | public static ba.unsa.etf.si.app.Inventura.Model.KlasaArtikla nadjiIme(java.lang.String naziv) throws java.lang.Exception {
ba.unsa.etf.si.app.Inventura.Kontroleri.KlasaArtikalaKontroler.openSession();
java.util.List<java.lang.Object> klase = ba.unsa.etf.si.app.Inventura.Kontroleri.KlasaArtikalaKontroler.s.crea... |
public void updateResultOverlay() {
ij.process.ImageProcessor overlay = classifiedImage.getImageStack().getProcessor(displayImage.getCurrentSlice()).duplicate();
overlay = overlay.convertToByte(false);
overlay.setColorModel(overlayLUT);
new ij.ImagePlus("overlay", overlay).show();
resultOverlay.setI... | public void updateResultOverlay() {
ij.process.ImageProcessor overlay = classifiedImage.getImageStack().getProcessor(displayImage.getCurrentSlice()).duplicate();
overlay = overlay.convertToByte(false);
overlay.setColorModel(overlayLUT);
resultOverlay.setImage(overlay);
displayImage.updateAndDraw();
... |
private java.lang.String GetCurrentCheckInDate(java.util.List<java.lang.String> checkInTimeList) {
for (int idx = 0; idx < (checkInTimeList.size()); idx++) {
if ((com.Warcraft.SupportUnit.DateAdapter.TimeSpan(checkInTimeList.get(idx), "12:00:00")) > 0)
return checkInTimeList.get(idx);
... | private java.lang.String GetCurrentCheckInDate(java.util.List<java.lang.String> checkInTimeList) {
for (int idx = 0; idx < (checkInTimeList.size()); idx++) {
if ((com.Warcraft.SupportUnit.DateAdapter.TimeSpan(checkInTimeList.get(idx), "12:00:00")) > 0)
return checkInTimeList.get(idx);
... |
public java.lang.String remove(final spark.Request req) throws java.lang.Exception {
final java.lang.String id = req.params(":id");
this.userService.removeUser(id);
this.logger.info((("[REMOVE] User " + id) + " removed"));
return this.prettyPrint(new response.ResponseMessage((("User " + id) + " removed!... | public java.lang.String remove(final spark.Request req) throws java.lang.Exception {
final java.lang.String id = req.params(":id");
this.userService.removeUser(id);
this.logger.info((("[REMOVE] User " + id) + " removed"));
return prettyPrint(new response.ResponseMessage((("User " + id) + " removed!!"), ... |
private static java.util.List<com.emc.storageos.model.vpool.VirtualPoolRemoteReplicationSettingsParam> getRemoteReplicationSettings(com.emc.storageos.model.vpool.BlockVirtualPoolProtectionParam protection) {
if (protection != null) {
com.emc.storageos.model.vpool.VirtualPoolRemoteReplicationParam param = pr... | private static java.util.List<com.emc.storageos.model.vpool.VirtualPoolRemoteReplicationSettingsParam> getRemoteReplicationSettings(com.emc.storageos.model.vpool.BlockVirtualPoolProtectionParam protection) {
if (((protection != null) && ((protection.getRemoteReplicationParam()) != null)) && ((protection.getRemoteRe... |
public void setEnabled(boolean enabled) {
if (!enabled) {
mBarColor = com.appyvet.rangebar.RangeBar.DEFAULT_BAR_COLOR;
mConnectingLineColor = com.appyvet.rangebar.RangeBar.DEFAULT_BAR_COLOR;
mCircleColor = com.appyvet.rangebar.RangeBar.DEFAULT_BAR_COLOR;
mTickColor = com.appyvet.rang... | public void setEnabled(boolean enabled) {
if (!enabled) {
mBarColor = com.appyvet.rangebar.RangeBar.DEFAULT_BAR_COLOR;
mConnectingLineColor = com.appyvet.rangebar.RangeBar.DEFAULT_BAR_COLOR;
mCircleColor = com.appyvet.rangebar.RangeBar.DEFAULT_BAR_COLOR;
mTickColor = com.appyvet.rang... |
private void destinationReachedDialog() {
android.app.AlertDialog.Builder d = new android.app.AlertDialog.Builder(cunycodes.parkmatch.MapsActivity.instance());
d.setTitle("Destination reached! Did you find parking?").setNeutralButton("Yes", new android.content.DialogInterface.OnClickListener() {
@java.l... | private void destinationReachedDialog() {
android.app.AlertDialog.Builder d = new android.app.AlertDialog.Builder(cunycodes.parkmatch.MapsActivity.instance());
d.setTitle("Destination reached! Did you find parking?").setNeutralButton("Yes", new android.content.DialogInterface.OnClickListener() {
@java.l... |
public T next() {
if ((this.iterator) == null) {
this.iterator = this.iterable.iterator();
}
if (!(this.iterator.hasNext())) {
this.iterator = this.iterable.iterator();
if (!(this.iterator.hasNext())) {
throw new java.util.NoSuchElementException();
}
}
ret... | public boolean hasNext() {
if (((this.iterator) == null) || (!(this.iterator.hasNext()))) {
this.iterator = this.iterable.iterator();
}
return this.iterator.hasNext();
} |
private static void parseLine(java.lang.String line) throws org.json.simple.parser.ParseException {
java.lang.String[] objs = line.split(model.Input.missingNo);
org.json.simple.parser.JSONParser parser = new org.json.simple.parser.JSONParser();
for (java.lang.String item : objs) {
org.json.simple.JS... | private static void parseLine(java.lang.String line) throws org.json.simple.parser.ParseException {
java.lang.String[] objs = line.split(model.Input.missingNo);
org.json.simple.parser.JSONParser parser = new org.json.simple.parser.JSONParser();
for (java.lang.String item : objs) {
org.json.simple.JS... |
public boolean hasAllChunks(uk.ac.ebi.fg.gwt.resumable.server.FileChunkInfo info) {
if (isComplete) {
return true;
}
int count = ((int) (java.lang.Math.floor((((double) (info.fileSize)) / ((double) (info.chunkSize))))));
if ((chunks.size()) == count) {
isComplete = true;
}
return... | public boolean hasAllChunks(uk.ac.ebi.fg.gwt.resumable.server.FileChunkInfo info) {
if (isComplete) {
return true;
}
int count = ((int) (java.lang.Math.floor((((double) (info.fileSize)) / ((double) (info.chunkSize))))));
if ((chunks.size()) >= count) {
isComplete = true;
}
return... |
public void test1() {
sensor.overrideSpeedLimit(10);
org.junit.Assert.assertEquals(0, controller.getReferenceSpeed());
user.overrideJoystickPosition(5);
controller.followSpeed();
org.junit.Assert.assertEquals(5, controller.getReferenceSpeed());
controller.followSpeed();
org.junit.Assert.asse... | public void test1() {
sensor.overrideSpeedLimit(10);
org.junit.Assert.assertEquals(0, controller.getReferenceSpeed());
user.overrideJoystickPosition((-5));
controller.followSpeed();
org.junit.Assert.assertEquals(5, controller.getReferenceSpeed());
controller.followSpeed();
org.junit.Assert.a... |
private java.lang.String readIt(java.io.InputStream stream) {
try {
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(stream));
java.lang.StringBuilder result = new java.lang.StringBuilder();
java.lang.String line;
while ((line = reader.readLine... | private java.lang.String readIt(java.io.InputStream stream) {
try {
if (stream != null) {
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(stream));
java.lang.StringBuilder result = new java.lang.StringBuilder();
java.lang.String li... |
protected java.lang.Boolean doInBackground(java.lang.Void... params) {
try {
mediaPlayer = android.media.MediaPlayer.create(appContext, mediaID);
mediaPlayer.setLooping(true);
return true;
} catch (android.content.res.Resources rnfe) {
android.util.Log.e(com.aarondevelops.alma_ma... | protected java.lang.Boolean doInBackground(java.lang.Void... params) {
try {
mediaPlayer = android.media.MediaPlayer.create(appContext, mediaID);
mediaPlayer.setLooping(false);
return true;
} catch (android.content.res.Resources rnfe) {
android.util.Log.e(com.aarondevelops.alma_m... |
public java.lang.Boolean isReadyToStreamFile() throws java.lang.Exception {
isReadyToStreamFileEvent();
if ((this.commOpen) == false) {
throw new java.lang.Exception("Cannot begin streaming, comm port is not open.");
}
if (((this.awaitingResponseQueue.size()) != 0) || ((this.outgoingQueue.size()... | public java.lang.Boolean isReadyToStreamFile() throws java.lang.Exception {
isReadyToStreamFileEvent();
if ((this.commOpen) == false) {
throw new java.lang.Exception("Cannot begin streaming, comm port is not open.");
}
if ((!(this.awaitingResponseQueue.isEmpty())) || (!(this.outgoingQueue.isEmpt... |
protected void simulateEating() {
int currentInd = tb.getSelectedTab();
tabContents.get(currentInd).setHTML((((tabContents.get(currentInd).getHTML()) + (channelToken)) + "<br />"));
int eatRange = ((edu.caltech.cs141b.hw2.gwt.collab.client.Collaborator.EATING_RANGE_END) - (edu.caltech.cs141b.hw2.gwt.collab.... | protected void simulateEating() {
int currentInd = tb.getSelectedTab();
tabContents.get(currentInd).setHTML((((tabContents.get(currentInd).getHTML()) + (channelToken)) + "<br />"));
int eatRange = ((edu.caltech.cs141b.hw2.gwt.collab.client.Collaborator.EATING_RANGE_END) - (edu.caltech.cs141b.hw2.gwt.collab.... |
public static javax.shell.Shell getInstance() {
javax.shell.Shell sh = javax.shell.Shell.instances.get(java.lang.Thread.currentThread());
if (sh == null) {
sh = new javax.shell.Shell();
javax.shell.Shell.instances.put(java.lang.Thread.currentThread(), sh);
}
return null;
} | public static javax.shell.Shell getInstance() {
javax.shell.Shell sh = javax.shell.Shell.instances.get(java.lang.Thread.currentThread());
if (sh == null) {
sh = new javax.shell.Shell();
javax.shell.Shell.instances.put(java.lang.Thread.currentThread(), sh);
}
return sh;
} |
public void finalize(java.io.PrintWriter writer) {
for (java.lang.String s : relevantEntities) {
java.lang.StringBuilder builder = new java.lang.StringBuilder();
builder.append(s);
builder.append(" ");
java.lang.String wikiText = "";
wikiText = getWikiText(s);
builder... | public void finalize(java.io.PrintWriter writer) {
for (java.lang.String s : relevantEntities) {
java.lang.StringBuilder builder = new java.lang.StringBuilder();
builder.append(s);
builder.append(" ");
java.lang.String wikiText = "";
wikiText = getWikiText(s);
builder... |
public int getSID(int gid) {
if (gid == 0) {
return 0;
}
int count = 0;
for (net.java.dev.typecast.ot.table.CffTable.CharsetRange range : _charsetRanges) {
count += range.getLeft();
if (gid < count) {
int sid = (gid - count) + (range.getFirst());
return si... | public int getSID(int gid) {
if (gid == 0) {
return 0;
}
int count = 1;
for (net.java.dev.typecast.ot.table.CffTable.CharsetRange range : _charsetRanges) {
if (gid <= ((range.getLeft()) + count)) {
int sid = (gid - count) + (range.getFirst());
return sid;
... |
public RecyclableObject getRecyclable(java.lang.Class cls, java.lang.Object... args) {
if (!(recyclables.isEmpty())) {
RecyclableObject obj = recyclables.pop();
obj.onRecycle(args);
return obj;
}
try {
RecyclableObject obj = ((RecyclableObject) (cls.newInstance()));
o... | public RecyclableObject getRecyclable(java.lang.Class cls, java.lang.Object... args) {
if (!(recyclables.isEmpty())) {
RecyclableObject obj = recyclables.pop();
obj.onRecycle(args);
return obj;
}
try {
RecyclableObject obj = ((RecyclableObject) (cls.newInstance()));
o... |
private void setImageViewOwner(com.MagikSquirrel.backgammon.imgBoard.Player player, android.widget.ImageView iv) {
try {
if (player == (com.MagikSquirrel.backgammon.imgBoard.Player.BLACK)) {
iv.setImageBitmap(bmBlack);
iv.setVisibility(View.VISIBLE);
}else
if (pla... | private void setImageViewOwner(com.MagikSquirrel.backgammon.imgBoard.Player player, android.widget.ImageView iv) {
try {
if (player == (com.MagikSquirrel.backgammon.imgBoard.Player.BLACK)) {
iv.setImageBitmap(bmBlack);
}else
if (player == (com.MagikSquirrel.backgammon.imgBoar... |
public void actionPerformed(java.awt.event.ActionEvent e) {
if ((e.getSource()) == (btnStart)) {
audioThread = new java.lang.Thread(new authoring.ThreadRunnable());
audioThread.start();
java.lang.System.out.println("Start");
}else
if ((e.getSource()) == (btnStop)) {
j... | public void actionPerformed(java.awt.event.ActionEvent e) {
if ((e.getSource()) == (btnStart)) {
audioThread.start();
btnStop.setEnabled(true);
btnStart.setEnabled(false);
}else
if ((e.getSource()) == (btnStop)) {
audioThread.interrupt();
btnStart.setEnabl... |
private void addSDES(org.jitsi.impl.neomedia.recording.RawPacket pkt) {
if (org.jitsi.impl.neomedia.recording.SynchronizerImpl.USE_CNAME_AS_ENDPOINT_ID) {
for (org.jitsi.impl.neomedia.recording.SynchronizerImpl.CNAMEItem item : getCnameItems(pkt)) {
org.jitsi.impl.neomedia.recording.Synchronizer... | private void addSDES(org.jitsi.impl.neomedia.recording.RawPacket pkt) {
if (org.jitsi.impl.neomedia.recording.SynchronizerImpl.USE_CNAME_AS_ENDPOINT_ID) {
for (org.jitsi.impl.neomedia.recording.SynchronizerImpl.CNAMEItem item : getCnameItems(pkt)) {
org.jitsi.impl.neomedia.recording.Synchronizer... |
private java.io.InputStream getInputStream(final se.simonsoft.cms.item.CmsItem item) {
final java.io.PipedInputStream inputStream = new java.io.PipedInputStream();
new java.lang.Thread(new java.lang.Runnable() {
@java.lang.Override
public void run() {
java.io.PipedOutputStream output... | private java.io.InputStream getInputStream(final se.simonsoft.cms.item.CmsItem item) {
java.io.PipedInputStream inputStream;
final java.io.PipedOutputStream outputStream;
try {
inputStream = new java.io.PipedInputStream();
outputStream = new java.io.PipedOutputStream(inputStream);
} catc... |
public void onCalled(java.util.ArrayList<com.johnsimon.payback.data.Debt> feed) {
if ((recyclerView.getAdapter()) == null) {
adapter = new com.johnsimon.payback.adapter.FeedListAdapter(feed, ((com.johnsimon.payback.core.DataActivity) (getActivity())), self, emptyView);
recyclerView.setAdapter(adapte... | public void onCalled(java.util.ArrayList<com.johnsimon.payback.data.Debt> feed) {
if ((recyclerView.getAdapter()) == null) {
adapter = new com.johnsimon.payback.adapter.FeedListAdapter(feed, ((com.johnsimon.payback.core.DataActivity) (getActivity())), self, emptyView);
recyclerView.setAdapter(adapte... |
public java.lang.String checkHungerStatus(model.Person person) {
final int currentHealth = person.getHealth().getCurrent();
if (currentHealth == 0) {
return (person.getName()) + " has died of starvation!";
}else
if ((person.getHealth().getCurrent()) < (2 * (getPace().getSpeed()))) {
... | public java.lang.String checkHungerStatus(model.Person person) {
final int currentHealth = person.getHealth().getCurrent();
if (currentHealth == 0) {
return (person.getName()) + " has died of starvation!";
}else
if ((person.getHealth().getCurrent()) < (getPace().getSpeed())) {
re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.