buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private int getPositionTypeLinear(int itemPosition, int adapterPosition, boolean isReverseLayout) {
boolean isFirstItem = (isReverseLayout) ? adapter.isLastItemInManager(adapterPosition) : itemPosition == 0;
boolean isLastItem = (isReverseLayout) ? itemPosition == 0 : adapter.isLastItemInManager(adapterPosition... | private int getPositionTypeLinear(int itemPosition, int adapterPosition, boolean isReverseLayout) {
boolean isFirstItem = (isReverseLayout) ? adapter.isLastItemInManager(adapterPosition, itemPosition) : itemPosition == 0;
boolean isLastItem = (isReverseLayout) ? itemPosition == 0 : adapter.isLastItemInManager(a... |
private boolean checkBorder(int x, int y) {
if ((((x >= 0) && (x <= (com.snake.Game.sizeByX))) && (y >= 0)) && (y <= (com.snake.Game.sizeByY))) {
return true;
}
return false;
} | private boolean checkBorder(int x, int y) {
if ((((x >= 0) && (x < (com.snake.Game.sizeByX))) && (y >= 0)) && (y < (com.snake.Game.sizeByY))) {
return true;
}
return false;
} |
public void validate_shouldReturnMaxScoreIfEverythingIsCorrect() {
int score = validator.validate(answer1);
org.junit.Assert.assertTrue(((("Validate should return maxScore if everything is correct. It was " + score) + " but expected is: ") + (quest1.getMaxScore())), (score == (quest1.getMaxScore())));
} | public void validate_shouldReturnMaxScoreIfEverythingIsCorrect() {
int score = validator.validate(answer1);
java.lang.System.out.println(quest1.getId());
org.junit.Assert.assertTrue(((("Validate should return maxScore if everything is correct. It was " + score) + " but expected is: ") + (quest1.getMaxScore(... |
public void sendTextMessage(com.hyphenate.chat.EMConversation.EMConversationType conType, java.lang.String conId, java.lang.String message) {
com.hyphenate.chat.EMMessage emMessage = com.lwk.familycontact.im.helper.HxChatHelper.getInstance().createTextMessage(getChatTypeFromConType(conType), conId, message);
em... | public void sendTextMessage(com.hyphenate.chat.EMConversation.EMConversationType conType, java.lang.String conId, java.lang.String message) {
com.hyphenate.chat.EMMessage emMessage = com.lwk.familycontact.im.helper.HxChatHelper.getInstance().createTextMessage(getChatTypeFromConType(conType), conId, message);
em... |
public void remove(java.util.function.LongConsumer item) {
int size = list.length;
int idx = 0;
while ((idx < size) && ((list.get(idx).item) != item))
idx++;
if (idx < size)
list.remove(item);
} | public void remove(java.util.function.LongConsumer item) {
int size = list.size();
int idx = 0;
while ((idx < size) && ((list.get(idx).item) != item))
idx++;
if (idx < size)
list.remove(item);
} |
public void testBuilderSetsPskCipherSuitesWhenPskStoreIsSet() {
org.eclipse.californium.scandium.config.DtlsConnectorConfig config = builder.setPskStore(new org.eclipse.californium.scandium.dtls.pskstore.StaticPskStore("ID", "KEY".getBytes())).build();
org.junit.Assert.assertTrue(((config.getSupportedCipherSuit... | public void testBuilderSetsPskCipherSuitesWhenPskStoreIsSet() {
org.eclipse.californium.scandium.config.DtlsConnectorConfig config = builder.setPskStore(new org.eclipse.californium.scandium.dtls.pskstore.StaticPskStore("ID", "KEY".getBytes())).build();
assertTrue(((config.getSupportedCipherSuites().length) > 0)... |
public void testDeleteRange() {
java.lang.String userCommand = "delete 1 - 3";
java.util.ArrayList<java.lang.Integer> expectedResult = new java.util.ArrayList<>();
expectedResult.add(1);
expectedResult.add(2);
expectedResult.add(3);
assertEquals(tasknote.parser.Parser.parseDelete(userCommand), e... | public void testDeleteRange() {
java.lang.String userCommand = "delete 1 - 3";
java.util.ArrayList<java.lang.Integer> expectedResult = new java.util.ArrayList<>();
expectedResult.add(1);
expectedResult.add(2);
expectedResult.add(3);
assertEquals(tasknote.parser.Parser.parseDelete(userCommand, tr... |
public boolean onLongClick(android.view.View v) {
final java.lang.String pkg = source.componentName.getPackageName();
if (android.text.TextUtils.equals(pkg, getActivity().getPackageName())) {
return false;
}
try {
startActivity(new android.content.Intent(android.provider.Settings.ACTION_... | public boolean onLongClick(android.view.View v) {
final java.lang.String pkg = source.componentName.getPackageName();
if (android.text.TextUtils.equals(pkg, getContext().getPackageName())) {
return false;
}
try {
startActivity(new android.content.Intent(android.provider.Settings.ACTION_A... |
private void checkAttachmentSizeLimit(java.io.InputStream input) {
byte[] bytes = new byte[1024 * 64];
int bytesRead;
long totalBytes = 0;
try {
while ((bytesRead = input.read(bytes)) > 0) {
totalBytes = totalBytes + bytesRead;
}
if ((totalBytes / 1024) > 15000)
... | private void checkAttachmentSizeLimit(java.io.InputStream input) {
byte[] bytes = new byte[1024 * 64];
int bytesRead;
long totalBytes = 0;
try {
while ((bytesRead = input.read(bytes)) > 0) {
totalBytes = totalBytes + bytesRead;
}
if ((totalBytes / 1024) > 15000)
... |
public void run() {
java.util.ArrayList<org.eclipse.core.resources.IProject> projects = new java.util.ArrayList<org.eclipse.core.resources.IProject>();
projects.add(arr.utils.ProjectUtilities.getCurrentProject());
if ((projects.size()) == 0) {
arr.ui.MessageSystem.runProjectFirst();
return ;... | public void run() {
java.util.ArrayList<org.eclipse.core.resources.IProject> projects = new java.util.ArrayList<org.eclipse.core.resources.IProject>();
projects.add(arr.utils.ProjectUtilities.getCurrentProject());
if ((projects.size()) == 0) {
arr.ui.MessageSystem.runProjectFirst();
return ;... |
public void updateAllEntities() {
this.currentEntities = new java.util.ArrayList<com.ichmed.bol2d.world.Entity>(this.nextEntities);
for (com.ichmed.bol2d.world.Entity e : getEntitesInUpdateRange())
e.onUpdate();
for (com.ichmed.bol2d.world.Entity e : entitiesToCleanup)
e.performCleanup(... | public void updateAllEntities() {
this.currentEntities = new java.util.ArrayList<com.ichmed.bol2d.world.Entity>(this.nextEntities);
for (com.ichmed.bol2d.world.Entity e : getEntitesInUpdateRange())
e.onUpdate();
for (com.ichmed.bol2d.world.Entity e : entitiesToCleanup)
e.performCleanup(... |
public T remove() {
if (this.isEmpty()) {
return null;
}
T item = this._bag[this._count];
this._bag[_count] = null;
(this._count)--;
return item;
} | public T remove() {
if (this.isEmpty()) {
return null;
}
T item = this._bag[((this._count) - 1)];
this._bag[_count] = null;
(this._count)--;
return item;
} |
private void sendNotification(java.lang.String text, java.util.List<java.lang.String> klassen) {
java.lang.String payload = com.notnoop.apns.APNS.newPayload().alertBody(text).badge(1).sound("default").build();
java.util.List<java.lang.String> pushTokens = this.registrationRep.findPushTokensByKlassen(klassen, OS... | private void sendNotification(java.lang.String text, java.util.List<java.lang.String> klassen) {
if ((klassen.size()) <= 0)
return ;
java.lang.String payload = com.notnoop.apns.APNS.newPayload().alertBody(text).badge(1).sound("default").build();
java.util.List<java.lang.String> pushTokens = thi... |
public void onCheckedChanged(android.widget.CompoundButton buttonView, boolean isChecked) {
if (isChecked)
command = ((byte) (128));
else
command = 0;
skbarLeft.setProgress(0);
skbarRight.setProgress(0);
sendCommand();
receiveAndUpdateStatus();
} | public void onCheckedChanged(android.widget.CompoundButton buttonView, boolean isChecked) {
if (isChecked)
command = ((byte) (128));
else
command = 0;
skbarLeft.setProgress(0);
skbarRight.setProgress(0);
sendCommand();
} |
protected void onCreate(@android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user);
findViewById(R.id.favorites).setOnClickListener(this);
findViewById(R.id.main).setOnClickListener(this);
findViewById(R.id.... | protected void onCreate(@android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user);
findViewById(R.id.favorites).setOnClickListener(this);
findViewById(R.id.main).setOnClickListener(this);
findViewById(R.id.... |
public void addDietTags(java.util.List<dev.blunch.blunch.domain.DietTags> dietTags) {
for (dev.blunch.blunch.domain.DietTags dietTag : dietTags) {
if (dietTag.equals(""))
this.dietTags += dietTag.toString();
else
this.dietTags += "&" + (dietTag.toString());
}
} | public void addDietTags(java.util.List<dev.blunch.blunch.domain.DietTags> dietTags) {
for (dev.blunch.blunch.domain.DietTags dietTag : dietTags) {
if (this.dietTags.equals(""))
this.dietTags += dietTag.toString();
else
this.dietTags += "&" + (dietTag.toString());
... |
public void getElements(double[] dest, int destOffset, int[] indices) {
int n = indices.length;
int offset = getArrayOffset();
int stride = getStride();
for (int i = 0; i < n; i++) {
dest[(destOffset + i)] = dest[(offset + (stride * (indices[i])))];
}
} | public void getElements(double[] dest, int destOffset, int[] indices) {
int n = indices.length;
int offset = getArrayOffset();
int stride = getStride();
for (int i = 0; i < n; i++) {
dest[(destOffset + i)] = data[(offset + (stride * (indices[i])))];
}
} |
public char[] sourceFileName() {
try (org.eclipse.jdt.internal.core.nd.IReader rl = this.typeRef.lock()) {
org.eclipse.jdt.internal.core.nd.java.NdType type = this.typeRef.get();
if (type != null) {
return type.getSourceFileName().getChars();
}else {
return new char[0... | public char[] sourceFileName() {
try (org.eclipse.jdt.internal.core.nd.IReader rl = this.typeRef.lock()) {
org.eclipse.jdt.internal.core.nd.java.NdType type = this.typeRef.get();
if (type != null) {
char[] result = type.getSourceFileName().getChars();
if ((result.length) == 0... |
public void onResponseReceived(org.rstudio.studio.client.workbench.views.environment.dataimport.model.DataImportPreviewResponse response) {
if ((response.getErrorMessage()) != null) {
progressIndicator_.onError(response.getErrorMessage());
return ;
}
gridViewer_.setOption("nullsAsNAs", "true... | public void onResponseReceived(org.rstudio.studio.client.workbench.views.environment.dataimport.model.DataImportPreviewResponse response) {
if ((response.getErrorMessage()) != null) {
gridViewer_.setData(null);
progressIndicator_.onError(response.getErrorMessage());
return ;
}
gridVi... |
public void logItemSelected(final java.lang.String id, final de.lessvoid.nifty.controls.ListBoxSelectionChangedEvent<julietgroupproject.GUI.julietgroupproject.GenerationResult> event) {
if ((event.getSelection().size()) > 0) {
app.showOffGeneration(event.getSelection().get(0).generation);
}
} | public void logItemSelected(final java.lang.String id, final de.lessvoid.nifty.controls.ListBoxSelectionChangedEvent<julietgroupproject.GUI.julietgroupproject.GenerationResult> event) {
if ((event.getSelection().size()) > 0) {
app.showOffGeneration(((event.getSelection().get(0).generation) - 1));
}
} |
public void add() {
if ((name) == (org.jboss.as.quickstarts.cdi.service.ItemBean.EMPTY_STRING)) {
javax.faces.application.FacesMessage fm = new javax.faces.application.FacesMessage("Name can't be empty");
context.addMessage(fm.getSummary(), fm);
refresh();
return ;
}
org.jbos... | public void add() {
if (name.isEmpty()) {
javax.faces.application.FacesMessage fm = new javax.faces.application.FacesMessage("Name can't be empty");
context.addMessage(fm.getSummary(), fm);
refresh();
return ;
}
org.jboss.as.quickstarts.cdi.service.Item item = new org.jboss.a... |
public static android.content.Intent getIntent(android.content.Context context, com.jacquessmuts.bakingforudacity.Models.Recipe recipe, com.jacquessmuts.bakingforudacity.Models.Step step) {
android.content.Intent intent = new android.content.Intent(context, com.jacquessmuts.bakingforudacity.Activities.StepDetailAct... | public static android.content.Intent getIntent(android.content.Context context, com.jacquessmuts.bakingforudacity.Models.Recipe recipe, com.jacquessmuts.bakingforudacity.Models.Step step) {
android.content.Intent intent = new android.content.Intent(context, com.jacquessmuts.bakingforudacity.Activities.StepDetailAct... |
public java.lang.Iterable<com.google.common.collect.SetMultimap<org.apache.olingo.commons.api.edm.FullQualifiedName, java.lang.Object>> loadEntitySetData(@org.springframework.web.bind.annotation.PathVariable(value = SET_ID)
java.util.UUID entitySetId, @org.springframework.web.bind.annotation.RequestParam(value = FILE_T... | public java.lang.Iterable<com.google.common.collect.SetMultimap<org.apache.olingo.commons.api.edm.FullQualifiedName, java.lang.Object>> loadEntitySetData(@com.dataloom.datastore.data.controllers.PathVariable(value = SET_ID)
java.util.UUID entitySetId, @com.dataloom.datastore.data.controllers.RequestParam(value = FILE_T... |
private void newPiece() {
curPiece.setRandomShape();
curX = ((BoardWidth) / 2) + 1;
curY = ((BoardHeight) - 1) + (curPiece.minY());
if ((!(tryMove(curPiece, curX, curY))) || ((numLinesRemoved) == 50)) {
curPiece.setShape(Tetrominoes.NoShape);
timer.stop();
isStarted = false;
... | private void newPiece() {
curPiece.setRandomShape();
curX = ((BoardWidth) / 2) + 1;
curY = ((BoardHeight) - 1) + (curPiece.minY());
if ((!(tryMove(curPiece, curX, curY))) || ((numLinesRemoved) == 50)) {
timer.stop();
isStarted = false;
statusbar.setText(gameOverMsg);
}
} |
public final int column(long pos) {
int count = 0;
for (long p = pos - 1; p >= 0; p--) {
if ((this.byteAt(pos)) == '\n') {
break;
}
count++;
}
return count;
} | public final int column(long pos) {
int count = 0;
for (long p = pos - 1; p >= 0; p--) {
if ((this.byteAt(p)) == '\n') {
break;
}
count++;
}
return count;
} |
private java.lang.Long getEntityId(java.lang.String tableName, java.lang.String columnName, java.lang.String entityName) {
final java.lang.String SQL_GET_ENTITY = ((((((("SELECT " + (android.provider.BaseColumns._ID)) + " FROM ") + tableName) + " WHERE ") + columnName) + " = '") + entityName) + "' LIMIT 1";
and... | private long getEntityId(java.lang.String tableName, java.lang.String columnName, java.lang.String entityName) {
final java.lang.String SQL_GET_ENTITY = ((((((("SELECT " + (android.provider.BaseColumns._ID)) + " FROM ") + tableName) + " WHERE ") + columnName) + " = '") + entityName) + "' LIMIT 1";
android.datab... |
protected void onStart() {
super.onStart();
if (this.getIntent().getBooleanExtra("skipToCourses", false)) {
android.util.Log.d("iHW", ((("Year: " + (com.ihwapp.android.model.Curriculum.getCurrentYear())) + " / Campus: ") + (com.ihwapp.android.model.Curriculum.getCurrentCampus())));
com.ihwapp.an... | protected void onStart() {
super.onStart();
if (this.getIntent().getBooleanExtra("skipToCourses", false)) {
com.ihwapp.android.model.Curriculum.reloadCurrentCurriculum().addModelLoadingListener(this);
campusLayout.setVisibility(View.GONE);
coursesLayout.setVisibility(View.VISIBLE);
}... |
public org.eclipse.scanning.api.points.IPosition seek(int location, java.util.Iterator<org.eclipse.scanning.api.points.IPosition> iterator) {
while (iterator.hasNext()) {
org.eclipse.scanning.api.points.IPosition pos = iterator.next();
pos.setStepIndex(stepNumber);
if ((stepNumber) == locati... | public org.eclipse.scanning.api.points.IPosition seek(int location, java.util.Iterator<org.eclipse.scanning.api.points.IPosition> iterator) {
stepNumber = 0;
while (iterator.hasNext()) {
org.eclipse.scanning.api.points.IPosition pos = iterator.next();
pos.setStepIndex(stepNumber);
if ((s... |
public java.util.List<org.nextprot.api.core.domain.PublicationAuthor> findAuthorsByPublicationIds(java.util.List<java.lang.Long> publicationIds) {
org.springframework.jdbc.core.namedparam.SqlParameterSource namedParameters = new org.springframework.jdbc.core.namedparam.MapSqlParameterSource("publicationIds", public... | public java.util.List<org.nextprot.api.core.domain.PublicationAuthor> findAuthorsByPublicationIds(java.util.List<java.lang.Long> publicationIds) {
org.springframework.jdbc.core.namedparam.SqlParameterSource namedParameters = new org.springframework.jdbc.core.namedparam.MapSqlParameterSource("publicationIds", public... |
public void songPicked(android.view.View view) {
musicSrv.setSong(java.lang.Integer.parseInt(view.getTag().toString()));
musicSrv.playSong();
if (playbackPaused) {
setController();
playbackPaused = false;
}
controller.show(0);
} | public void songPicked(android.view.View view) {
if (playbackPaused) {
setController();
playbackPaused = false;
}
musicSrv.setSong(java.lang.Integer.parseInt(view.getTag().toString()));
musicSrv.playSong();
controller.show();
} |
public void letAImove() {
int pushMousePointingColumn = mousePointingcolumn;
boolean preEndGame = gameController.isFinish();
if ((mousePointingcolumn = gameController.getAITurn()) < 0) {
mousePointingcolumn = pushMousePointingColumn;
return ;
}
if ((!preEndGame) && (!(fallingAnimatio... | public void letAImove() {
int pushMousePointingColumn = mousePointingcolumn;
boolean preEndGame = gameController.isFinish();
if ((mousePointingcolumn = gameController.getAITurn()) < 0) {
mousePointingcolumn = pushMousePointingColumn;
return ;
}
if ((!preEndGame) && (!(fallingAnimatio... |
public void npcLoop() {
while (true) {
currentTime = java.lang.System.nanoTime();
float elapsedThinkMilliSecs = ((currentTime) - (lastThinkUpdateTime)) / 1000000.0F;
float elapsedTickMilliSecs = ((currentTime) - (lastTickUpdateTime)) / 1000000.0F;
if (elapsedTickMilliSecs >= 50.0F) {... | public void npcLoop() {
while (true) {
currentTime = java.lang.System.nanoTime();
float elapsedThinkMilliSecs = ((currentTime) - (lastThinkUpdateTime)) / 1000000.0F;
float elapsedTickMilliSecs = ((currentTime) - (lastTickUpdateTime)) / 1000000.0F;
if (elapsedTickMilliSecs >= 500.0F) ... |
public java.lang.String pageAction(org.springframework.ui.ModelMap model, @org.springframework.web.bind.annotation.PathVariable(name = "pageId")
final int pageId) {
be.nille.blog.service.PageInfo pageInfo = new be.nille.blog.service.PageInfo(pageId, 10, postService.getNumberOfPosts());
model.put("page", new be.... | public java.lang.String pageAction(org.springframework.ui.ModelMap model, @org.springframework.web.bind.annotation.PathVariable(name = "pageId")
final int pageId) {
be.nille.blog.service.PageInfo pageInfo = new be.nille.blog.service.PageInfo(pageId, 10, postService.getNumberOfPosts());
model.put("page", new be.... |
public void addMessage(java.lang.String message) {
if ((messages.remainingCapacity()) == 0) {
try {
user.getSession().close(new javax.websocket.CloseReason(CloseReason.CloseCodes.UNEXPECTED_CONDITION, "Too many stored messages"));
} catch (java.io.IOException e) {
e.printStac... | public synchronized void addMessage(java.lang.String message) {
if ((messages.remainingCapacity()) == 0) {
try {
user.getSession().close(new javax.websocket.CloseReason(CloseReason.CloseCodes.UNEXPECTED_CONDITION, "Too many stored messages"));
this.interrupt();
} catch (java.... |
private void updateKnownWord() {
println(("\n the word is " + (secretWord)));
int replaceLocation = 0;
while (replaceLocation < (secretWord.length())) {
println(("i = " + replaceLocation));
println(("current KnownWord " + (knownWord)));
replaceLocation = secretWord.indexOf(guess, rep... | private void updateKnownWord() {
int replaceLocation = 0;
while (replaceLocation < (secretWord.length())) {
replaceLocation = secretWord.indexOf(guess, replaceLocation);
if (replaceLocation == (-1)) {
break;
}
replaceLocation = updateKnownWord(replaceLocation);
} ... |
private java.util.Map<io.crate.sql.tree.QualifiedName, io.crate.analyze.relations.AnalyzedRelation> mapSourceRelations(io.crate.analyze.relations.MultiSourceSelect multiSourceSelect) {
return com.google.common.collect.Maps.transformValues(multiSourceSelect.sources(), new com.google.common.base.Function<io.crate.ana... | private static java.util.Map<io.crate.sql.tree.QualifiedName, io.crate.analyze.relations.AnalyzedRelation> mapSourceRelations(io.crate.analyze.relations.MultiSourceSelect multiSourceSelect) {
return com.google.common.collect.Maps.transformValues(multiSourceSelect.sources(), new com.google.common.base.Function<io.cr... |
private int checkImmidiateFour(neu.Token player, neu.Token[][] board) {
for (int col : cols)
if ((colHeight(col)) < (neu.ComputerPlayer.ROWS)) {
neu.Token[][] copiedBoard = insertToken(col, player, getCopyOfBoard(board));
if (checkPossibleVierGewinnt(col, ((neu.ComputerPlayer.colHeig... | private int checkImmidiateFour(neu.Token player, neu.Token[][] board) {
for (int col : cols)
if ((neu.ComputerPlayer.colHeight(board, col)) < (neu.ComputerPlayer.ROWS)) {
neu.Token[][] copiedBoard = insertToken(col, player, getCopyOfBoard(board));
if (checkPossibleVierGewinnt(col, ((... |
public void loadScreen(java.lang.String name, java.lang.String resource) {
try {
javafx.fxml.FXMLLoader loader = new javafx.fxml.FXMLLoader(getClass().getResource(resource));
javafx.scene.Parent screen = loader.load();
game.view.Controller controller = loader.getController();
control... | public void loadScreen(java.lang.String name, java.lang.String resource) {
try {
javafx.fxml.FXMLLoader loader = new javafx.fxml.FXMLLoader(getClass().getResource(resource));
javafx.scene.Parent screen = loader.load();
addScreen(name, screen);
} catch (java.io.IOException e) {
e.... |
public long read(okio.OkBuffer sink, long byteCount) throws java.io.IOException {
if (byteCount < 0)
throw new java.lang.IllegalArgumentException(("byteCount < 0: " + byteCount));
if (closed)
throw new java.lang.IllegalStateException("closed");
if (inputExhausted)
return -1... | public long read(okio.OkBuffer sink, long byteCount) throws java.io.IOException {
if (byteCount < 0)
throw new java.lang.IllegalArgumentException(("byteCount < 0: " + byteCount));
if (closed)
throw new java.lang.IllegalStateException("closed");
if (inputExhausted)
return -1... |
public static com.uawebchallenge.bomberman.game.model.PlayerState execute(com.uawebchallenge.bomberman.game.model.PlayerCommand playerCommand, com.uawebchallenge.bomberman.game.model.PlayerState oldPlayerState, com.uawebchallenge.bomberman.game.model.GameField gameField, com.uawebchallenge.bomberman.game.model.GameConf... | public static com.uawebchallenge.bomberman.game.model.PlayerState execute(com.uawebchallenge.bomberman.game.model.PlayerCommand playerCommand, com.uawebchallenge.bomberman.game.model.PlayerState oldPlayerState, com.uawebchallenge.bomberman.game.model.GameField gameField, com.uawebchallenge.bomberman.game.model.GameConf... |
public java.util.List<se.racemates.maven.FileInfo> sortDependencies() {
final java.util.List<se.racemates.maven.FileInfo> result = new java.util.ArrayList<>();
final java.util.Optional<java.lang.String> first = map.keySet().stream().findFirst();
if (first.isPresent()) {
checkDependencies(first.get()... | public java.util.List<se.racemates.maven.FileInfo> sortDependencies() {
final java.util.List<se.racemates.maven.FileInfo> result = new java.util.ArrayList<>();
map.keySet().forEach(this::checkDependencies);
index.forEach(( key) -> {
result.add(map.get(key));
});
return result;
} |
public void setCategories(java.lang.String mainCategory, java.lang.String sub1, java.lang.String sub2, java.lang.String sub3, java.lang.String sub4, java.lang.String sub5) {
if (mainCategory == null) {
kategoriPanel1.setVisible(false);
searchPanel1.setLocation(searchPanel1.getX(), 0);
}else {
... | public void setCategories(java.lang.String mainCategory, java.lang.String sub1, java.lang.String sub2, java.lang.String sub3, java.lang.String sub4, java.lang.String sub5) {
if (mainCategory == null) {
kategoriPanel1.setVisible(false);
}else {
kategoriPanel1.setVisible(true);
kategoriPan... |
public java.lang.String getErrorMsg() {
java.lang.String result = ("Validation of graph " + (this.graph.getName())) + " raised the following errors:\n";
for (final java.lang.String msg : this.errorMsgs.keySet()) {
result += "- " + msg;
}
return result;
} | public java.lang.String getErrorMsg() {
java.lang.String result = ("Validation of graph " + (this.graph.getName())) + " raised the following errors:\n";
for (final java.lang.String msg : this.errorMsgs.keySet()) {
result += ("- " + msg) + "\n";
}
return result;
} |
private static boolean isBoxedPrimitiveInstance(java.lang.Object obj) {
return ((((((((obj instanceof java.lang.Boolean) || (obj instanceof java.lang.Byte)) || (obj instanceof java.lang.Character)) || (obj instanceof java.lang.Double)) || (obj instanceof java.lang.Enum)) || (obj instanceof java.lang.Float)) || (obj... | private static boolean isBoxedPrimitiveInstance(java.lang.Object obj) {
return (((((((obj instanceof java.lang.Boolean) || (obj instanceof java.lang.Byte)) || (obj instanceof java.lang.Character)) || (obj instanceof java.lang.Double)) || (obj instanceof java.lang.Float)) || (obj instanceof java.lang.Integer)) || (o... |
private void createOrderMulticast(ExtendMessage received_message) {
mcui.debug("createOrderMulticast");
ExtendMessage order = new ExtendMessage(received_message.getSender(), (((received_message.getText()) + "/") + (java.lang.String.valueOf(Sg))), received_message.getIdNumber(), ExtendMessage.TYPE_SEQ_ORDER, cre... | private void createOrderMulticast(ExtendMessage received_message) {
ExtendMessage order = new ExtendMessage(received_message.getSender(), (((received_message.getText()) + "/") + (java.lang.String.valueOf(Sg))), received_message.getIdNumber(), ExtendMessage.TYPE_SEQ_ORDER, createClockMessage());
multicast(order)... |
public static play.mvc.Result getSolvedProblems(java.lang.String username) {
models.User user = User.find.where().eq("name", username).findUnique();
if (user == null) {
return restJsonResponse(1, "User not found");
}
return restJsonResponse(0, user.solvedProblems());
} | public static play.mvc.Result getSolvedProblems(java.lang.String username) {
models.User user = User.find.where().eq("name", username).findUnique();
if (user == null) {
return restJsonResponse(1, "User not found");
}
return restJsonResponse(0, user.getSolvedProblems());
} |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
butterknife.ButterKnife.bind(this);
checkForPermissions();
sharedPreferences = getSharedPreferences("squirrel", info.philboyd.secretsquirrelsociety.activities.M... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
butterknife.ButterKnife.bind(this);
checkForPermissions();
sharedPreferences = getSharedPreferences("squirrel", info.philboyd.secretsquirrelsociety.activities.M... |
private org.apache.hadoop.fs.Path getRealHDFSPath(java.lang.String resourcePath) {
if ((resourcePath.startsWith("/")) && ((resourcePath.length()) > 1))
resourcePath = resourcePath.substring(1, resourcePath.length());
return new org.apache.hadoop.fs.Path(this.hdfsMetaPath, resourcePath);
} | private org.apache.hadoop.fs.Path getRealHDFSPath(java.lang.String resourcePath) {
if (resourcePath.equals("/"))
return this.hdfsMetaPath;
if ((resourcePath.startsWith("/")) && ((resourcePath.length()) > 1))
resourcePath = resourcePath.substring(1, resourcePath.length());
return ne... |
public void onClick(android.view.View v) {
mSectionsPagerAdapter.notifyDataSetChanged();
mViewPager.setAdapter(mSectionsPagerAdapter);
tabLayout.setupWithViewPager(mViewPager);
mViewPager.setCurrentItem(2, true);
prefEditor.putInt(getString(R.string.bedroom_mode), selection[0]);
prefEditor.apply... | public void onClick(android.view.View v) {
mSectionsPagerAdapter.notifyDataSetChanged();
mViewPager.setAdapter(mSectionsPagerAdapter);
tabLayout.setupWithViewPager(mViewPager);
mViewPager.setCurrentItem(2, true);
prefEditor.putInt(getString(R.string.bedroom_mode), selection[0]);
prefEditor.apply... |
public void notifyAdapterSubItemsChanged(int position) {
if (mPositionBasedStateManagement) {
if ((mExpanded.indexOfKey(position)) > (-1)) {
int previousCount = mExpanded.get(position);
int itemsCount = notifyAdapterSubItemsChanged(position, previousCount);
mExpanded.put(... | public void notifyAdapterSubItemsChanged(int position) {
if (mPositionBasedStateManagement) {
if ((mExpanded.indexOfKey(position)) > (-1)) {
int previousCount = mExpanded.get(position);
int itemsCount = notifyAdapterSubItemsChanged(position, previousCount);
if (itemsCount... |
public com.github.sandorw.mocabogaso.games.GameMove getMostSimulatedMove() {
if ((((rootNode) == null) || (!(rootNode.expanded))) || (rootNode.childNodes.isEmpty()))
return null;
com.github.sandorw.mocabogaso.games.GameMove mostSimulatedMove = null;
int mostSimulations = -1;
for (com.github... | public com.github.sandorw.mocabogaso.games.GameMove getMostSimulatedMove() {
if ((((rootNode) == null) || (!(rootNode.expanded))) || (rootNode.childNodes.isEmpty()))
return null;
com.github.sandorw.mocabogaso.games.GameMove mostSimulatedMove = null;
int mostSimulations = -1;
for (com.github... |
private static org.apache.solr.client.solrj.SolrServer initService() {
if ((tw.edu.ncu.im.Util.EmbeddedIndexSearcher.SolrHomePath) == null) {
throw new java.lang.IllegalStateException("Please set the home path of Solr Location");
}
if ((tw.edu.ncu.im.Util.EmbeddedIndexSearcher.solrCoreName) == null)... | protected org.apache.solr.client.solrj.SolrServer initService() {
if ((tw.edu.ncu.im.Util.EmbeddedIndexSearcher.SolrHomePath) == null) {
throw new java.lang.IllegalStateException("Please set the home path of Solr Location");
}
if ((tw.edu.ncu.im.Util.EmbeddedIndexSearcher.solrCoreName) == null) {
... |
private double[] bp(double[] errorGradient) {
for (int i = (layers.size()) - 1; i > 0; i--) {
errorGradient = layers.get(i).errorGradient(errorGradient);
}
return errorGradient;
} | private double[] bp(double[] errorGradient) {
for (int i = (layers.size()) - 1; i >= 0; i--) {
errorGradient = layers.get(i).errorGradient(errorGradient);
}
return errorGradient;
} |
public void setMoveDirection(float x, float y) {
this.moveDirection.set(x, y);
this.moveDirection.nor();
if (((moveDirection.x) == 0) && ((moveDirection.y) == 0)) {
this.isMoving = false;
}else {
this.isMoving = true;
}
} | public void setMoveDirection(float x, float y) {
this.moveDirection.set(x, y);
if ((x == 0) && (y == 0)) {
this.isMoving = false;
}else {
this.moveDirection.nor();
this.isMoving = true;
}
} |
public void test_explicit_defaultCredentialsFile() {
java.io.File file = com.here.account.oauth2.tutorial.GetHereClientCredentialsAccessTokenTutorial.getDefaultCredentialsFile();
java.lang.String path = (null != file) ? file.getAbsolutePath() : "broken";
java.lang.String[] args = new java.lang.String[]{ pat... | public void test_explicit_defaultCredentialsFile() {
java.io.File file = com.here.account.oauth2.tutorial.GetHereClientCredentialsAccessTokenTutorial.getDefaultCredentialsFile();
java.lang.String path = (null != file) ? file.getAbsolutePath() : "broken";
java.lang.String[] args = new java.lang.String[]{ pat... |
public synchronized void login(java.lang.String username, java.lang.String password, java.lang.String language) throws java.lang.Exception {
java.util.Map<java.lang.String, java.lang.String> response = invoke("LogIn", new java.lang.Object[]{ username , password , language , getUserAgent() });
setToken(response.... | public synchronized void login(java.lang.String username, java.lang.String password, java.lang.String language) throws java.lang.Exception {
java.util.Map<java.lang.String, java.lang.String> response = ((java.util.Map<java.lang.String, java.lang.String>) (invoke("LogIn", new java.lang.Object[]{ username , password ... |
public org.saiku.olap.dto.SaikuHierarchy getHierarchy(org.saiku.olap.dto.SaikuCube cube, java.lang.String hierarchyName) throws org.saiku.olap.util.exception.SaikuOlapException {
org.olap4j.metadata.Cube nativeCube = getNativeCube(cube);
org.olap4j.metadata.Hierarchy h = nativeCube.getHierarchies().get(hierarch... | public org.saiku.olap.dto.SaikuHierarchy getHierarchy(org.saiku.olap.dto.SaikuCube cube, java.lang.String hierarchyName) throws org.saiku.olap.util.exception.SaikuOlapException {
org.olap4j.metadata.Cube nativeCube = getNativeCube(cube);
org.olap4j.metadata.Hierarchy h = nativeCube.getHierarchies().get(hierarch... |
public static void setUp() throws java.lang.Exception {
org.roda.core.index.PermissionsRecursiveTest.basePath = org.roda.core.TestsHelper.createBaseTempDir(org.roda.core.index.PermissionsRecursiveTest.class, true);
boolean deploySolr = true;
boolean deployLdap = true;
boolean deployFolderMonitor = false... | public static void setUp() throws java.lang.Exception {
org.roda.core.index.PermissionsRecursiveTest.basePath = org.roda.core.TestsHelper.createBaseTempDir(org.roda.core.index.PermissionsRecursiveTest.class, true);
boolean deploySolr = true;
boolean deployLdap = true;
boolean deployFolderMonitor = false... |
public void testGetGroupUsersNotFoundViaFieldValueException() throws java.lang.Exception {
com.jasify.schedule.appengine.model.common.OrganizationService service = com.jasify.schedule.appengine.model.common.OrganizationServiceFactory.getOrganizationService();
com.google.appengine.api.datastore.Key key = org.sli... | public void testGetGroupUsersNotFoundViaFieldValueException() throws java.lang.Exception {
com.jasify.schedule.appengine.model.common.OrganizationService service = com.jasify.schedule.appengine.model.common.OrganizationServiceFactory.getOrganizationService();
com.google.appengine.api.datastore.Key key = org.sli... |
if (nna.base.util.concurrent.WorkerManager.init) {
return nna.base.util.concurrent.WorkerManager.workerManager;
}
nna.base.util.concurrent.WorkerManager.init = true;
int workCount = nna.base.util.concurrent.WorkerManager.getAvlCPUCount();
if ((maxBusinessProcessTime != null) && (thresholdTim... | if (nna.base.util.concurrent.WorkerManager.init) {
return nna.base.util.concurrent.WorkerManager.workerManager;
}
nna.base.util.concurrent.WorkerManager.init = true;
int workCount = nna.base.util.concurrent.WorkerManager.getAvlCPUCount();
if ((maxBusinessProcessTime != null) && (thresholdTim... |
public void changed(javafx.beans.value.ObservableValue<? extends com.bartoszrogowski.todolist.datamodel.TodoItem> observable, com.bartoszrogowski.todolist.datamodel.TodoItem oldValue, com.bartoszrogowski.todolist.datamodel.TodoItem newValue) {
if (newValue != null) {
com.bartoszrogowski.todolist.datamodel.T... | public void changed(javafx.beans.value.ObservableValue<? extends com.bartoszrogowski.todolist.datamodel.TodoItem> observable, com.bartoszrogowski.todolist.datamodel.TodoItem oldValue, com.bartoszrogowski.todolist.datamodel.TodoItem newValue) {
if (newValue != null) {
com.bartoszrogowski.todolist.datamodel.T... |
protected void onAttack(android.view.View v) {
android.widget.EditText editText = ((android.widget.EditText) (findViewById(R.id.taps)));
try {
java.lang.String string = editText.getText().toString();
com.bugsnguns.asprokopov.tapattack.ChooseTargetActivity.tapsToWin = java.lang.Integer.parseInt(s... | public void onAttack(android.view.View v) {
android.widget.EditText editText = ((android.widget.EditText) (findViewById(R.id.taps)));
try {
java.lang.String string = editText.getText().toString();
com.bugsnguns.asprokopov.tapattack.ChooseTargetActivity.tapsToWin = java.lang.Integer.parseInt(stri... |
public void replace(org.lodder.subtools.sublibrary.model.Release release, java.util.Map<java.lang.String, java.lang.Integer> weights) {
java.lang.String reservedKey = "%GROUP%";
if (!(weights.containsKey(reservedKey)))
return ;
int weight = weights.get(reservedKey);
weights.remove(reservedK... | public void replace(org.lodder.subtools.sublibrary.model.Release release, java.util.Map<java.lang.String, java.lang.Integer> weights) {
java.lang.String reservedKey = "%GROUP%";
if (!(weights.containsKey(reservedKey)))
return ;
int weight = weights.get(reservedKey);
weights.remove(reservedK... |
public void handleClientRequest(com.smartfoxserver.v2.entities.User user, com.smartfoxserver.v2.entities.data.ISFSObject data) {
nstuff.juggerfall.extension.pawn.Pawn pawn = ((nstuff.juggerfall.extension.pawn.Pawn) (((nstuff.juggerfall.extension.MainExtension) (getParentExtension())).viewManager.getView(data.getInt... | public void handleClientRequest(com.smartfoxserver.v2.entities.User user, com.smartfoxserver.v2.entities.data.ISFSObject data) {
nstuff.juggerfall.extension.pawn.Pawn pawn = ((nstuff.juggerfall.extension.pawn.Pawn) (((nstuff.juggerfall.extension.MainExtension) (getParentExtension())).viewManager.getView(data.getInt... |
public boolean isValid(java.lang.Object value) {
beans.Productos productos = ((beans.Productos) (value));
java.lang.Integer sumGr = 0;
for (beans.MaterialProducto materialp : productos.getMaterialProducto())
sumGr = sumGr + (materialp.getCantidadGr());
if (!(sumGr.equals(productos.getCantid... | public boolean isValid(java.lang.Object value) {
beans.Productos productos = ((beans.Productos) (value));
java.lang.Integer sumGr = 0;
for (beans.MaterialProducto materialp : productos.getMaterialProducto())
sumGr = sumGr + (materialp.getCantidadGr());
if ((sumGr.intValue()) < (productos.ge... |
public static java.util.List<org.osate.xtext.aadl2.errormodel.errorModel.EMV2PropertyAssociation> getProperty(java.lang.String propertyName, org.osate.aadl2.NamedElement ci, org.osate.aadl2.NamedElement target, org.osate.xtext.aadl2.errormodel.errorModel.ErrorTypes ts) {
java.util.List<org.osate.xtext.aadl2.errormo... | public static java.util.List<org.osate.xtext.aadl2.errormodel.errorModel.EMV2PropertyAssociation> getProperty(java.lang.String propertyName, org.osate.aadl2.NamedElement ci, org.osate.aadl2.NamedElement target, org.osate.xtext.aadl2.errormodel.errorModel.ErrorTypes ts) {
java.util.List<org.osate.xtext.aadl2.errormo... |
private int[] getPosBeforeMovement(solver.Movement move, general.Cordination after) {
int[] arr = after.get_cords().clone();
switch (move.getAction()) {
case "Move up" :
(arr[1])++;
break;
case "Move down" :
(arr[1])--;
break;
case "Move le... | private int[] getPosBeforeMovement(solver.Movement move, general.Cordination after) {
int[] arr = after.get_cords().clone();
switch (move.getAction()) {
case "Move up" :
(arr[1])++;
break;
case "Move down" :
(arr[1])--;
break;
case "Move le... |
public void onFavoriteSheetEditDoneClick() {
com.ludoscity.findmybikes.helpers.DBHelper.dropFavoriteAll(this);
java.util.ArrayList<com.ludoscity.findmybikes.FavoriteItem> newlyOrderedFavList = new java.util.ArrayList<>();
newlyOrderedFavList.addAll(mFavoriteRecyclerViewAdapter.getCurrentFavoriteList());
... | public void onFavoriteSheetEditDoneClick() {
com.ludoscity.findmybikes.helpers.DBHelper.dropFavoriteAll(this);
java.util.ArrayList<com.ludoscity.findmybikes.FavoriteItem> newlyOrderedFavList = new java.util.ArrayList<>();
newlyOrderedFavList.addAll(mFavoriteRecyclerViewAdapter.getCurrentFavoriteList());
... |
public void resetRanking() {
ranking = Character[4][0];
ranking[0] = new java.lang.Character[]{ null , null , null , null };
ranking[1] = new java.lang.Character[]{ null , null , null };
ranking[2] = new java.lang.Character[]{ null , null };
ranking[3] = new java.lang.Character[]{ null };
} | public void resetRanking() {
ranking = new java.lang.Character[4][0];
ranking[0] = new java.lang.Character[]{ null , null , null , null };
ranking[1] = new java.lang.Character[]{ null , null , null };
ranking[2] = new java.lang.Character[]{ null , null };
ranking[3] = new java.lang.Character[]{ null... |
protected void addChildren(int index, org.jsoup.nodes.Node... children) {
org.jsoup.helper.Validate.noNullElements(children);
for (int i = (children.length) - 1; i >= 0; i--) {
org.jsoup.nodes.Node in = children[i];
reparentChild(in);
childNodes.add(index, in);
}
reindexChildren(... | protected void addChildren(int index, org.jsoup.nodes.Node... children) {
org.jsoup.helper.Validate.noNullElements(children);
for (int i = (children.length) - 1; i >= 0; i--) {
org.jsoup.nodes.Node in = children[i];
reparentChild(in);
childNodes.add(index, in);
}
reindexChildren(... |
private void addLabelTTF(java.lang.String text, com.badlogic.gdx.math.Vector2 pos, com.badlogic.gdx.graphics.Color strokeColor) {
label = new net.mwplay.nativefont.NativeLabel("", game.fonts.get("ttffont"), com.badlogic.gdx.graphics.Color.BLACK);
label.setText(text);
label.setPosition(pos.x, pos.y);
lab... | private void addLabelTTF(java.lang.String text, com.badlogic.gdx.math.Vector2 pos, com.badlogic.gdx.graphics.Color strokeColor) {
label = new net.mwplay.nativefont.NativeLabel("", game.fonts.get("ttffont"), com.badlogic.gdx.graphics.Color.BLACK);
label.setText(text);
label.setPosition(pos.x, pos.y);
lab... |
public com.buginc.java.math.geometry.Polygon dec(com.buginc.java.math.geometry.Vector origin, double a) {
com.buginc.java.math.geometry.Vector position = origin.add(position().rem(origin).dec(a));
java.util.List<com.buginc.java.math.geometry.Vector> outline = new java.util.ArrayList<>();
for (com.buginc.jav... | public com.buginc.java.math.geometry.Polygon dec(java.util.Vector origin, double a) {
java.util.Vector position = origin.add(position().rem(origin).dec(a));
java.util.List<java.util.Vector> outline = new java.util.ArrayList<>();
for (java.util.Vector vector : this.outline)
outline.add(vector.dec(a))... |
protected void setUp() throws java.lang.Exception {
super.setUp();
mainActivity = new dk.glutter.izbrannick.nativesmsforwarder.MainActivity();
CurrentCountryCode = GetCountryZipCode();
smsHandler = new dk.glutter.izbrannick.nativesmsforwarder.SmsHandler(getContext(), recieverNumber, recievedMessage, "0"... | protected void setUp() throws java.lang.Exception {
super.setUp();
mainActivity = new dk.glutter.izbrannick.nativesmsforwarder.MainActivity();
CurrentCountryCode = GetCountryZipCode();
smsHandler = new dk.glutter.izbrannick.nativesmsforwarder.SmsHandler(getContext(), recieverNumber, recievedMessage, "0"... |
public java.lang.String processAddCategory(org.springframework.ui.Model model, @org.springframework.web.bind.annotation.ModelAttribute
@javax.validation.Valid
org.launchcode.models.Category category, org.springframework.validation.Errors errors) {
if (errors.hasErrors()) {
model.addAttribute("title", "Add C... | public java.lang.String processAddCategory(org.springframework.ui.Model model, @org.springframework.web.bind.annotation.ModelAttribute
@javax.validation.Valid
org.launchcode.models.Category category, org.springframework.validation.Errors errors) {
if (errors.hasErrors()) {
model.addAttribute("title", "Add C... |
public java.util.Map handleFileUpload(@org.springframework.web.bind.annotation.RequestParam(value = "file")
org.springframework.web.multipart.MultipartFile file) {
java.util.Map<java.lang.String, java.lang.Object> result = new java.util.HashMap<>();
java.util.Map<java.lang.String, java.lang.Object> item = new j... | public java.util.Map handleFileUpload(@org.springframework.web.bind.annotation.RequestParam(value = "file")
org.springframework.web.multipart.MultipartFile file) {
java.util.Map<java.lang.String, java.lang.Object> result = new java.util.HashMap<>();
java.util.Map<java.lang.String, java.lang.Object> item = new j... |
private void setPreferenceChangeListener() {
android.content.SharedPreferences.OnSharedPreferenceChangeListener onChange = new android.content.SharedPreferences.OnSharedPreferenceChangeListener() {
@java.lang.Override
public void onSharedPreferenceChanged(android.content.SharedPreferences sp, java.l... | private void setPreferenceChangeListener() {
if ((onChange) == null) {
onChange = new android.content.SharedPreferences.OnSharedPreferenceChangeListener() {
@java.lang.Override
public void onSharedPreferenceChanged(android.content.SharedPreferences sp, java.lang.String s) {
... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.tap_out_home);
java.lang.System.gc();
play = ((android.widget.LinearLayout) (findViewById(R.id.pp)));
pl = ((android.widget.TextView) (findViewById(R.id.play)));
toolbarMai... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.tap_out_home);
java.lang.System.gc();
play = ((android.widget.LinearLayout) (findViewById(R.id.pp)));
pl = ((android.widget.TextView) (findViewById(R.id.play)));
play.setOn... |
public void deletePlaylist() {
java.lang.String name = playlist.getName();
this.names.remove(name);
this.lib.remove(playlist);
contextproject.models.Playlist pl = new contextproject.models.Playlist();
setAppLibrary(lib);
this.update();
playlistController.setPlaylist(pl);
} | public void deletePlaylist() {
if ((lib.size()) > 0) {
java.lang.String name = playlist.getName();
this.names.remove(name);
this.lib.remove(playlist);
contextproject.models.Playlist pl = new contextproject.models.Playlist();
setAppLibrary(lib);
this.update();
... |
public void onClick(android.view.View view) {
sessionManager.logout();
dbm.signOut(sessionManager.getEmail(), sessionManager.getAuthentication());
actionBar.show();
setNavButtonColorSelected(journeysFab);
updateActionBar(R.id.journeys_fab);
visibleLayout.setVisibility(View.GONE);
journeysLay... | public void onClick(android.view.View view) {
sessionManager.logout();
dbm.signOut(sessionManager.getEmail(), sessionManager.getAuthentication());
actionBar.show();
setNavButtonColorSelected(journeysFab);
updateActionBar(R.id.journeys_fab);
visibleLayout.setVisibility(View.GONE);
journeysLay... |
public java.net.PasswordAuthentication getPasswordAuthentication() {
if (((domain) != null) && (!(domain.isEmpty()))) {
user = ((domain) + "\\") + (user);
}
return new java.net.PasswordAuthentication(user, password.toCharArray());
} | public java.net.PasswordAuthentication getPasswordAuthentication() {
if (((domain) != null) && (!(domain.isEmpty()))) {
user = ((domain) + "\\") + (user);
}
if ((password) != null) {
return new java.net.PasswordAuthentication(user, password.toCharArray());
}
return new java.net.Passw... |
public void submitButton_Clicked() {
if ((selectionState) == 2) {
controllers.MapController.getInstance().getCollectionOfNodes().resetForPathfinding();
graph.createEdgeLines(mapController.requestPath());
}
selectionState = 0;
java.lang.System.out.println("The user has clicked the submit ... | public void submitButton_Clicked() {
if ((selectionState) == 2) {
controllers.MapController.getInstance().getCollectionOfNodes().resetForPathfinding();
graph.createEdgeLines(mapController.requestPath());
}
selectionState = 0;
java.lang.System.out.println("The user has clicked the submit ... |
private void set_device_type() {
if ((((device_info_hashmap.get("ABS_MT_POSITION_X")) != null) && ((device_info_hashmap.get("ABS_MT_POSITION_Y")) != null)) && ((device_info_hashmap.get("BTN_TOUCH")) == null)) {
typeA = true;
}else {
if ((device_info_hashmap.get("ABS_MT_SLOT")) != null) {
... | private void set_device_type() {
if ((((device_info_hashmap.get("ABS_MT_POSITION_X")) == null) && ((device_info_hashmap.get("ABS_MT_POSITION_Y")) == null)) && ((device_info_hashmap.get("BTN_TOUCH")) != null)) {
typeA = true;
}else {
if ((device_info_hashmap.get("ABS_MT_SLOT")) != null) {
... |
public org.orcid.jaxb.model.message.WorkExternalIdentifier toMessagePojo() {
org.orcid.core.adapter.impl.jsonidentifiers.WorkExternalIdentifier messagePojo = new org.orcid.core.adapter.impl.jsonidentifiers.WorkExternalIdentifier();
try {
messagePojo.setWorkExternalIdentifierType(org.orcid.jaxb.model.mes... | public org.orcid.jaxb.model.message.WorkExternalIdentifier toMessagePojo() {
org.orcid.core.adapter.impl.jsonidentifiers.WorkExternalIdentifier messagePojo = new org.orcid.core.adapter.impl.jsonidentifiers.WorkExternalIdentifier();
try {
messagePojo.setWorkExternalIdentifierType(org.orcid.jaxb.model.mes... |
public boolean promptForGuess() {
java.util.Scanner scanner = new java.util.Scanner(java.lang.System.in);
boolean isCorrect = false;
boolean isAcceptable = false;
do {
java.lang.System.out.print("Enter a number: ");
int guessInput = scanner.nextInt();
try {
isCorrect... | public boolean promptForGuess() {
java.util.Scanner scanner = new java.util.Scanner(java.lang.System.in);
boolean isCorrect = false;
do {
java.lang.System.out.print("Enter a number: ");
int guessInput = scanner.nextInt();
try {
isCorrect = jar.applyGuess(guessInput);
... |
private void scanScriptSource(net.nexustools.njs.compiler.ScriptData script, net.nexustools.njs.compiler.JavaTranspiler.ScopeOptimizer variableScope) {
scanParsedSource(script.impl, variableScope);
if (!(script.functions.isEmpty())) {
variableScope.markUseTypedClassStack();
for (net.nexustools.n... | private void scanScriptSource(net.nexustools.njs.compiler.ScriptData script, net.nexustools.njs.compiler.JavaTranspiler.ScopeOptimizer variableScope) {
scanParsedSource(script.impl, variableScope);
if (!(script.functions.isEmpty())) {
variableScope.markUseTypedClassStack();
for (net.nexustools.n... |
private javax.swing.JMenu initAdministationMenu() {
javax.swing.JMenu administrationMenu = new javax.swing.JMenu("Управление");
javax.swing.JMenuItem settingsItem = new javax.swing.JMenuItem("Настройки");
administrationMenu.add(settingsItem);
settingsItem.addActionListener(( ae) -> {
new diplom.... | private javax.swing.JMenu initAdministationMenu() {
javax.swing.JMenu administrationMenu = new javax.swing.JMenu("Управление");
javax.swing.JMenuItem settingsItem = new javax.swing.JMenuItem("Настройки");
administrationMenu.add(settingsItem);
settingsItem.addActionListener(( ae) -> new diplom.administra... |
private void computeHigherSwingGradient(int stepIndex) {
double duration = originalSwingDurations.get(stepIndex);
double variation = (swingTwiddleSizeDuration) * duration;
submitSwingTiming(stepIndex, (duration + variation), (-1.0));
applyVariation(adjustedCoMPosition);
computeGradient(predictedCoMP... | private void computeHigherSwingGradient(int stepIndex) {
double duration = originalSwingDurations.get(stepIndex);
double variation = (-(swingTwiddleSizeDuration)) * duration;
submitSwingTiming(stepIndex, (duration + variation), (-1.0));
applyVariation(adjustedCoMPosition);
computeGradient(predictedC... |
private void ack(com.ctrip.hermes.storage.range.NewOffsetBitmap bitmap, int start, int end, com.ctrip.hermes.storage.message.Ack ack) {
java.util.List<java.lang.Long> list = new java.util.ArrayList<>();
for (int i = start; i < end; i++) {
list.add(((long) (i)));
}
bitmap.ackOffset(list, ack);
} | private void ack(com.ctrip.hermes.storage.range.NewOffsetBitmap bitmap, int start, int end, com.ctrip.hermes.storage.message.Ack ack) {
java.util.List<java.lang.Long> list = new java.util.ArrayList<>();
for (int i = start; i < end; i++) {
list.add(((long) (i)));
}
bitmap.ackOffset(list.iterator(... |
public void onClick(android.view.View v) {
nl.mprog.glimp.work_out.Workout[] plannerWorkouts = new nl.mprog.glimp.work_out.Workout[plannerArrayList.size()];
plannerWorkouts = plannerArrayList.toArray(plannerWorkouts);
android.content.Intent intent = new android.content.Intent(getActivity(), nl.mprog.glimp.w... | public void onClick(android.view.View view) {
nl.mprog.glimp.work_out.Workout[] plannerWorkouts = new nl.mprog.glimp.work_out.Workout[plannerArrayList.size()];
plannerWorkouts = plannerArrayList.toArray(plannerWorkouts);
android.content.Intent intent = new android.content.Intent(getActivity(), nl.mprog.glim... |
public static org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid asSrcDstEid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.source.dest.key.SourceDestKey sd, int vni) {
org.opendaylight.yang.gen.v1.urn.opendayligh... | public static org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid asSrcDstEid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.source.dest.key.SourceDestKey sd, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ie... |
public java.lang.Long toBinary() {
long binary = 0;
for (int i = 0; i < (pieces.length); i++) {
for (int j = 0; j < (pieces[i].length); j++) {
binary |= pieces[i][j].getId();
binary <<= 3;
}
}
return binary;
} | public java.lang.Long toBinary() {
long binary = 0;
for (int i = 0; i < (pieces.length); i++) {
for (int j = 0; j < (pieces[i].length); j++) {
binary <<= 3;
binary |= pieces[i][j].getId();
}
}
return binary;
} |
public java.net.URL getNextServerUrl() {
synchronized(serverUrls) {
if (serverUrls.isEmpty()) {
throw new java.lang.RuntimeException(("No server is found for " + (protocol.getName())));
}else {
lastIndex = ((lastIndex) + 1) % (serverUrls.size());
return serverUrls... | public synchronized java.net.URL getNextServerUrl() {
if (serverUrls.isEmpty()) {
throw new java.lang.RuntimeException(("No server is found for " + (protocol.getName())));
}else {
lastIndex = ((lastIndex) + 1) % (serverUrls.size());
return serverUrls.get(lastIndex);
}
} |
public boolean isTableRequiredAfterIteration(java.lang.String tableName, int iteration) {
java.util.HashSet<java.lang.String> dependentTables = getDependentTables(tableName);
for (java.lang.String dependentTable : dependentTables) {
if ((getTickForTable(dependentTable)) > iteration) {
return... | public boolean isTableRequiredAfterIteration(java.lang.String tableName, int iteration) {
java.util.HashSet<java.lang.String> dependentTables = getDependentTables(tableName);
for (java.lang.String dependentTable : dependentTables) {
if ((getTickForTable(dependentTable)) >= iteration) {
retur... |
public java.util.Map<java.lang.String, java.lang.String> execute() throws java.lang.Exception {
final java.lang.String endpoint = java.lang.String.format(awsConfig.getHostHeader());
final java.lang.String signature = rs.sign("ec2", attributes);
attributes.put("X-Amz-Signature", signature);
java.io.Input... | public java.util.Map<java.lang.String, java.lang.String> execute() throws java.lang.Exception {
final java.lang.String signature = rs.sign("ec2", attributes);
attributes.put("X-Amz-Signature", signature);
java.io.InputStream stream = callService(endpoint, signature);
return com.hazelcast.aws.utility.Clo... |
public float getAvgWheelSpeedXYZ() {
float speed = ((float) ((((wheels[0].getSpeedXYZ()) + (wheels[1].getSpeedXYZ())) + (wheels[2].getSpeedXYZ())) + (wheels[3].getSpeedXYZ()))) / 4;
return speed;
} | public float getAvgWheelSpeedXYZ() {
float speed = 0;
if (((wheels) != null) && ((wheels.length) >= 4)) {
speed = ((float) ((((wheels[0].getSpeedXYZ()) + (wheels[1].getSpeedXYZ())) + (wheels[2].getSpeedXYZ())) + (wheels[3].getSpeedXYZ()))) / 4;
}
return speed;
} |
private void updateUI() {
boolean enableButtons = (com.facebook.AccessToken.getCurrentAccessToken()) != null;
com.facebook.Profile profile = com.facebook.Profile.getCurrentProfile();
if (enableButtons && (profile != null)) {
android.content.Intent intent = new android.content.Intent(getActivity(), c... | private void updateUI() {
boolean enableButtons = (com.facebook.AccessToken.getCurrentAccessToken()) != null;
com.facebook.Profile profile = com.facebook.Profile.getCurrentProfile();
if (enableButtons && (profile != null)) {
android.content.Intent intent = new android.content.Intent(getActivity(), c... |
private jlang.clex.SourceLocation getSourceLocation(int curPos, int toklen) {
assert (curPos >= 0) && (curPos < (bufferEnd)) : "Location out of range for this buffer!";
int charNo = curPos;
if (fileLoc.isFileID())
return fileLoc.getFileLocWithOffset(charNo);
assert (pp) != null : "This does... | private jlang.clex.SourceLocation getSourceLocation(int curPos, int toklen) {
assert (curPos >= 0) && (curPos <= (bufferEnd)) : "Location out of range for this buffer!";
int charNo = curPos;
if (fileLoc.isFileID())
return fileLoc.getFileLocWithOffset(charNo);
assert (pp) != null : "This doe... |
protected final java.lang.String getRemoteHost() {
java.lang.String remote = this.getHeader("X-Forwarded-For");
if (remote == null) {
remote = getHeader("X-Real-IP");
if (remote == null) {
remote = req.getRemoteAddr();
}
}
return remote;
} | public final java.lang.String getRemoteHost() {
java.lang.String remote = this.getHeader("X-Forwarded-For");
if (remote == null) {
remote = getHeader("X-Real-IP");
if (remote == null) {
remote = req.getRemoteAddr();
}
}
return remote;
} |
public com.silverpeas.form.DataRecord getDataRecord() throws com.silverpeas.webpages.model.WebPagesException {
try {
com.silverpeas.publicationTemplate.PublicationTemplate pubTemplate = getXMLTemplate();
com.silverpeas.form.RecordSet recordSet = pubTemplate.getRecordSet();
com.silverpeas.for... | public com.silverpeas.form.DataRecord getDataRecord() throws com.silverpeas.webpages.model.WebPagesException {
try {
com.silverpeas.publicationTemplate.PublicationTemplate pubTemplate = getXMLTemplate();
com.silverpeas.form.RecordSet recordSet = pubTemplate.getRecordSet();
com.silverpeas.for... |
protected final java.io.InputStream newInputStreamRemote(char[] path) throws java.io.IOException {
if (exists(path)) {
try {
return getDelegate().newInputStream(path);
} catch (java.io.FileNotFoundException ex) {
}
}
if ((pathSynchronizer) == null) {
retriever.ret... | protected final java.io.InputStream newInputStreamRemote(char[] path) throws java.io.IOException {
if (exists(path)) {
try {
return getDelegate().newInputStream(path);
} catch (java.io.FileNotFoundException ex) {
}
}
retrieve(path);
return getDelegate().newInputStream... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.