buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public double calculateUploadSpeed(java.lang.String uploadUrl) {
httpInvoker.config().setUrl(uploadUrl).update();
com.astronlab.ngenhttplib.http.extended.UploadFileWithProgressListener uploadTester = new com.astronlab.ngenhttplib.http.extended.UploadFileWithProgressListener(httpInvoker, this);
uploadSpeedMa... | public double calculateUploadSpeed(java.lang.String uploadUrl) {
httpInvoker.config().setUrl(uploadUrl);
com.astronlab.ngenhttplib.http.extended.UploadFileWithProgressListener uploadTester = new com.astronlab.ngenhttplib.http.extended.UploadFileWithProgressListener(httpInvoker, this);
uploadSpeedManager = n... |
public void testParseInfoRequest() throws java.lang.Exception {
rosa.iiif.image.model.InfoRequest info;
rosa.iiif.image.model.InfoRequest test;
info = new rosa.iiif.image.model.InfoRequest();
info.setImageId("abc/123");
info.setFormat(InfoFormat.JSON);
test = parser.parseImageInfoRequest("abc%2F... | public void testParseInfoRequest() throws java.lang.Exception {
rosa.iiif.image.model.InfoRequest info;
rosa.iiif.image.model.InfoRequest test;
info = new rosa.iiif.image.model.InfoRequest();
info.setImageId("abc/123");
info.setFormat(InfoFormat.JSON);
test = parser.parseImageInfoRequest("/abc%2... |
public void onDescriptorRead(com.evothings.BluetoothGatt g, com.evothings.BluetoothGattDescriptor d, int status) {
if (status == (BluetoothGatt.GATT_SUCCESS)) {
mCurrentOpContext.success(d.getValue());
}else {
mCurrentOpContext.error(status);
}
mCurrentOpContext = null;
process();
} | public void onDescriptorRead(com.evothings.BluetoothGatt g, com.evothings.BluetoothGattDescriptor d, int status) {
if ((mCurrentOpContext) == null)
return ;
if (status == (BluetoothGatt.GATT_SUCCESS)) {
mCurrentOpContext.success(d.getValue());
}else {
mCurrentOpContext.error(sta... |
public java.lang.String tsNumPadInputValue(short beat, short value) {
timeSignature.setBeats(beat);
timeSignature.setNoteValues(value);
timeSignatureText.setText(((("" + (timeSignature.getBeats())) + "/") + (timeSignature.getNoteValues())));
metroTask.setBeat(beat);
metroTask.setNoteValue(value);
... | public java.lang.String tsNumPadInputValue(short beat, short value) {
timeSignature.setBeats(beat);
timeSignature.setNoteValues(value);
timeSignatureText.setText(((("" + beat) + "/") + value));
metroTask.setBeat(beat);
metroTask.setNoteValue(value);
return null;
} |
public boolean hasNext() {
if ((!(this.cur.hasNext())) && (this.hasNext())) {
this.cur = f.apply(this.next()).iterator();
}
return this.cur.hasNext();
} | public boolean hasNext() {
if (this.cur.hasNext()) {
return true;
}
while (this.hasNext()) {
this.cur = f.apply(this.next()).iterator();
if (this.cur.hasNext()) {
return true;
}
}
return false;
} |
private static boolean isEprPredicate(de.uni_freiburg.informatik.ultimate.logic.FunctionSymbol function) {
if (function.getName().equals("not"))
return false;
if (function.getName().equals("or"))
return false;
if (function.getName().equals("ite"))
return false;
if ... | private static boolean isEprPredicate(de.uni_freiburg.informatik.ultimate.logic.FunctionSymbol function) {
if (function.getName().equals("not"))
return false;
if (function.getName().equals("or"))
return false;
if (function.getName().equals("ite"))
return false;
ret... |
private void heapifyUp(int idx) {
if (idx == 0)
return ;
int parentIdx = idx / 2;
Key parentKey = data.get(parentIdx);
Key currentKey = data.get(idx);
if ((parentKey.compareTo(currentKey)) > 0) {
Key tmp = parentKey;
data.set(parentIdx, currentKey);
data.set(idx,... | private void heapifyUp(int idx) {
if (idx == 0)
return ;
int parentIdx = (idx - 1) / 2;
Key parentKey = data.get(parentIdx);
Key currentKey = data.get(idx);
if ((parentKey.compareTo(currentKey)) > 0) {
Key tmp = parentKey;
data.set(parentIdx, currentKey);
data.se... |
public void testValidChoice() throws org.quattor.pan.exceptions.SyntaxException {
org.quattor.pan.template.Context context = new org.quattor.pan.template.BuildContext();
java.util.List<org.quattor.pan.dml.data.Element> args = new java.util.ArrayList<org.quattor.pan.dml.data.Element>();
args.add(org.quattor.... | public void testValidChoice() throws org.quattor.pan.exceptions.SyntaxException {
org.quattor.pan.template.Context context = new org.quattor.pan.template.BuildContext();
java.util.List<org.quattor.pan.dml.data.Element> args = new java.util.ArrayList<org.quattor.pan.dml.data.Element>();
args.add(org.quattor.... |
public void addCard(java.lang.String card) {
for (com.coach.plugin.hearthstone.deck.Card existing : classCards) {
if (existing.getName().equals(card)) {
existing.setAmount(("" + (java.lang.Integer.parseInt(((existing.getAmount()) + 1)))));
return ;
}
}
com.coach.plugi... | public void addCard(java.lang.String card) {
for (com.coach.plugin.hearthstone.deck.Card existing : classCards) {
if (existing.getName().equals(card)) {
existing.setAmount(("" + ((java.lang.Integer.parseInt(existing.getAmount())) + 1)));
return ;
}
}
com.coach.plugin.... |
public static void removeFromContacts(java.lang.String name) {
java.lang.String userName = controllers.Security.connected();
ch.unibe.ese.calendar.User user = ch.unibe.ese.calendar.UserManager.getInstance().getUserByName(userName);
ch.unibe.ese.calendar.User userToRemove = ch.unibe.ese.calendar.UserManager.... | public static void removeFromContacts(java.lang.String name) {
java.lang.String userName = controllers.Security.connected();
ch.unibe.ese.calendar.User user = ch.unibe.ese.calendar.UserManager.getInstance().getUserByName(userName);
ch.unibe.ese.calendar.User userToRemove = ch.unibe.ese.calendar.UserManager.... |
public void createJobWithZeroPerson() throws User.AuthFailure, xyz.swordfeng.jobsystem.ValidationError {
java.lang.String username = "user1";
xyz.swordfeng.jobsystem.User user = xyz.swordfeng.jobsystem.User.login(username, "password");
java.lang.String name = "Programmer";
java.lang.String address = "Ch... | public void createJobWithZeroPerson() throws User.AuthFailure, xyz.swordfeng.jobsystem.ValidationError {
java.lang.String username = "user1";
xyz.swordfeng.jobsystem.User user = xyz.swordfeng.jobsystem.User.login(username, "password");
java.lang.String name = "Programmer";
java.lang.String address = "Ch... |
private static void putSubtitleInHashMap(java.lang.String word) {
if (!(common.StopWords.isStopWord(word))) {
java.lang.Integer freq = PDFContainer.wordsOccurence.get(word);
if (freq == null) {
if ((frontend.app.TextProcessor.wordsInserted) < (common.PDFContainer.numberOfWordsToInsert)) ... | private static void putSubtitleInHashMap(java.lang.String word) {
if (!(common.StopWords.isStopWord(word))) {
java.lang.Integer freq = PDFContainer.wordsOccurence.get(word);
if (freq == null) {
(frontend.app.TextProcessor.wordsInserted)++;
PDFContainer.wordsOccurence.put(word... |
public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
mP1 = ((com.app.restfulapp.models.Member) (parent.getSelectedItem()));
if (("Alert".equalsIgnoreCase(mP1.getCode())) || ("".equalsIgnoreCase(mP1.getCode())))
return ;
updateP2();
} | public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
mP1 = ((com.app.restfulapp.models.Member) (parent.getSelectedItem()));
if ("".equalsIgnoreCase(mP1.getCode()))
return ;
updateP2();
} |
synchronized(this) {
com.kk.bus.EventDeliverer eventDeliverer = mObjectDeliverers.get(objectToRegister);
if (eventDeliverer == null) {
eventDeliverer = new com.kk.bus.EventDeliverer(bus, objectToRegister, deliveryContext);
mObjectDeliverers.put(objectToRegister, eventDelivere... | com.kk.bus.EventDeliverer eventDeliverer = mObjectDeliverers.get(objectToRegister);
if (eventDeliverer == null) {
eventDeliverer = new com.kk.bus.EventDeliverer(bus, objectToRegister, deliveryContext);
mObjectDeliverers.put(objectToRegister, eventDeliverer);
}
eventDeliverer.setProducerM... |
public ea.internal.phy.PhysikHandler typ(ea.Physik.Typ typ) {
if (typ == (physikTyp)) {
return this;
}
ea.internal.phy.BodyType newType = typ.convert();
body.setType(newType);
body.setActive(true);
fixture.setSensor((typ == (Physik.Typ.PASSIV)));
body.setGravityScale((typ == (Physik.... | public ea.internal.phy.PhysikHandler typ(ea.Physik.Typ typ) {
if (typ == (physikTyp)) {
return this;
}
this.physikTyp = typ;
ea.internal.phy.BodyType newType = typ.convert();
body.setType(newType);
body.setActive(true);
fixture.setSensor((typ == (Physik.Typ.PASSIV)));
body.setGra... |
public void perform() {
boolean friendlyFire = myFaction.getFriendlyFire();
myFaction.msg(TL.COMMAND_FRIENDLYFIRE_TOGGLED, fme.describeTo(myFaction, true), ((friendlyFire ? "en" : "dis") + "abled"));
myFaction.setFriendlyFire((!friendlyFire));
} | public void perform() {
boolean friendlyFire = myFaction.getFriendlyFire();
myFaction.msg(TL.COMMAND_FRIENDLYFIRE_TOGGLED, fme.describeTo(myFaction, true), ((!friendlyFire ? "en" : "dis") + "abled"));
myFaction.setFriendlyFire((!friendlyFire));
} |
public void prepareRun() {
internalCloseRunner();
statusEmpty();
for (int i = 0; i < 10; i++)
java.lang.System.out.println();
if (processing.app.Preferences.getBoolean("console.auto_clear")) {
console.clear();
}
sketch.ensureExistence();
for (processing.app.SketchCode sc... | public void prepareRun() {
internalCloseRunner();
statusEmpty();
for (int i = 0; i < 10; i++)
java.lang.System.out.println();
if (processing.app.Preferences.getBoolean("console.auto_clear")) {
console.clear();
}
sketch.ensureExistence();
for (processing.app.SketchCode sc... |
public void update() {
for (com.ne.revival_games.entity.WorldObjects.Entity.Entity entity : this.team.getTeamObjects()) {
entity.update(world);
}
if (holdingGhost) {
org.dyn4j.geometry.Vector2 delta = new org.dyn4j.geometry.Vector2(((pullTowards.x) - (ghost.entity.shape.getX())), ((pullTowar... | public void update() {
if (holdingGhost) {
org.dyn4j.geometry.Vector2 delta = new org.dyn4j.geometry.Vector2(((pullTowards.x) - (ghost.entity.shape.getX())), ((pullTowards.y) - (ghost.entity.shape.getY())));
ghost.setLinearVelocity((10 * (delta.x)), (10 * (delta.y)));
}
} |
public int onStartCommand(android.content.Intent intent, int flags, int startId) {
android.util.Log.e(in.apps.maitreya.travelalarm.BackgroundLocationService.TAG, "onStartCommand");
setIntervals(intent.getFloatExtra("act_dist", (-1)), intent.getFloatExtra("alarm_dist", (-1)));
android.widget.Toast.makeText(t... | public int onStartCommand(android.content.Intent intent, int flags, int startId) {
android.util.Log.e(in.apps.maitreya.travelalarm.BackgroundLocationService.TAG, "onStartCommand");
setIntervals(intent.getFloatExtra("act_dist", (-1)), intent.getFloatExtra("alarm_dist", (-1)));
super.onStartCommand(intent, fl... |
public void sendChatAction(int chatId, com.edoardogiacomello.telegrambot.types.ChatAction action) {
if ((chatId <= 0) || (action == null))
throw new java.lang.IllegalArgumentException("You must specify at least a chatId and a valid action");
java.util.List<org.apache.http.NameValuePair> params = ne... | public void sendChatAction(int chatId, com.edoardogiacomello.telegrambot.types.ChatAction action) {
if ((chatId == 0) || (action == null))
throw new java.lang.IllegalArgumentException("You must specify at least a chatId and a valid action");
java.util.List<org.apache.http.NameValuePair> params = ne... |
public boolean accept(org.apache.hadoop.fs.Path path) {
if (org.apache.hadoop.hbase.wal.DefaultWALProvider.isMetaFile(path)) {
if (org.apache.hadoop.hbase.backup.impl.IncrementalBackupManager.LOG.isDebugEnabled()) {
org.apache.hadoop.hbase.backup.impl.IncrementalBackupManager.LOG.debug(("Skip .m... | public boolean accept(org.apache.hadoop.fs.Path path) {
if (org.apache.hadoop.hbase.wal.DefaultWALProvider.isMetaFile(path)) {
if (org.apache.hadoop.hbase.backup.impl.IncrementalBackupManager.LOG.isDebugEnabled()) {
org.apache.hadoop.hbase.backup.impl.IncrementalBackupManager.LOG.debug(("Skip .m... |
public void onResponse(retrofit2.Call<com.arman.horus.models.PlaceDetail> call, retrofit2.Response<com.arman.horus.models.PlaceDetail> response) {
if (!(response.isSuccessful())) {
android.util.Log.d(com.arman.horus.activities.PlaceDetailActivity.LOG_TAG, "Request wasn't successful!");
dialog.dismis... | public void onResponse(retrofit2.Call<com.arman.horus.models.PlaceDetail> call, retrofit2.Response<com.arman.horus.models.PlaceDetail> response) {
if (!(response.isSuccessful())) {
android.util.Log.d(com.arman.horus.activities.PlaceDetailActivity.LOG_TAG, "Request wasn't successful!");
dialog.dismis... |
public static java.lang.String load(java.lang.String path, java.lang.String charsetName, int readTimeout) throws java.io.IOException {
java.net.URL url = org.cubeengine.pericopist.util.Misc.getResource(path);
if (url == null) {
throw new java.io.FileNotFoundException((("The resource '" + path) + "' was ... | public static java.lang.String load(java.lang.String path, java.lang.String charsetName, int readTimeout) throws java.io.IOException {
java.net.URL url = org.cubeengine.pericopist.util.Misc.getResource(path);
if (url == null) {
throw new java.io.FileNotFoundException((("The resource '" + path) + "' was ... |
private void compute_speed() {
float[] currentGPSReadings = mGPSListener.getCurrentValues();
float tot_weight = (currentGPSReadings[1]) + ((float) (mAccPrecision));
float gps_weight = (currentGPSReadings[1]) / tot_weight;
float vel_weight = ((float) (mAccPrecision)) / tot_weight;
mSpeed = ((mSpeedAc... | private void compute_speed() {
float[] currentGPSReadings = mGPSListener.getCurrentValues();
float tot_weight = (currentGPSReadings[1]) + ((float) (mAccPrecision));
float gps_weight = (currentGPSReadings[1]) / tot_weight;
float vel_weight = ((float) (mAccPrecision)) / tot_weight;
mSpeed = ((mSpeedAc... |
public void onBindViewHolder(com.theraytar.ungkyrkja.adapters.RecyclerAdapter.EntryListRowHolder EntryListRowHolder, int i) {
com.theraytar.ungkyrkja.other.UKEntry entry = entries.get(i);
java.util.Date date = entry.getDate();
EntryListRowHolder.date.setText((((date.getDay()) + ". ") + (months[date.getMonth... | public void onBindViewHolder(com.theraytar.ungkyrkja.adapters.RecyclerAdapter.EntryListRowHolder EntryListRowHolder, int i) {
com.theraytar.ungkyrkja.other.UKEntry entry = entries.get(i);
java.util.Date date = entry.getDate();
EntryListRowHolder.date.setText((((date.getDate()) + ". ") + (months[date.getMont... |
public static uniandes.unacloud.agent.platform.VirtualBox.VirtualBox getInstalledVirtualBoxPlatform(java.lang.String path) throws uniandes.unacloud.agent.exceptions.UnsupportedPlatformException {
java.lang.String h = uniandes.unacloud.common.utils.LocalProcessExecutor.executeCommandOutput(path, "--version");
if... | public static uniandes.unacloud.agent.platform.VirtualBox.VirtualBox getInstalledVirtualBoxPlatform(java.lang.String path) throws uniandes.unacloud.agent.exceptions.UnsupportedPlatformException {
java.lang.String h = uniandes.unacloud.common.utils.LocalProcessExecutor.executeCommandOutput(path, "--version");
if... |
private void rehash(int size) {
int newHashSize = it.unimi.dsi.fastutil.HashCommon.arraySize((size + 1), com.facebook.presto.operator.aggregation.TypedSet.FILL_RATIO);
hashMask = newHashSize - 1;
maxFill = com.facebook.presto.operator.aggregation.TypedSet.calculateMaxFill(newHashSize);
blockPositionByHa... | private void rehash(int size) {
int newHashSize = it.unimi.dsi.fastutil.HashCommon.arraySize((size + 1), com.facebook.presto.operator.aggregation.TypedSet.FILL_RATIO);
hashMask = newHashSize - 1;
maxFill = com.facebook.presto.operator.aggregation.TypedSet.calculateMaxFill(newHashSize);
blockPositionByHa... |
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser) {
android.os.Message message = new android.os.Message();
message.what = 2;
message.obj = "bottom1";
mt1Handler.sendMessage(message);
}else
if (!is... | public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser) {
android.os.Message message = new android.os.Message();
message.what = 2;
message.obj = "bottom1";
mt1Handler.sendMessage(message);
}else
if (!is... |
public boolean check_permission() {
if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.M)) {
for (java.lang.String permission : PERMISSION_LIST) {
if ((android.support.v4.content.ContextCompat.checkSelfPermission(mActivity, permission)) != (android.content.pm.PackageManager.PERMISSION_GRANTED))... | public boolean check_permission() {
if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.M)) {
for (java.lang.String permission : PERMISSION_LIST) {
if ((android.support.v4.content.ContextCompat.checkSelfPermission(mActivity, permission)) != (android.content.pm.PackageManager.PERMISSION_GRANTED))... |
private int getOperatorPositionInString(java.lang.String[] operators, int operatorNumber) {
int stringPosition = 0;
for (int i = 0; i < operatorNumber; i++)
stringPosition += (operators[i].length()) + 1;
return stringPosition;
} | private int getOperatorPositionInString(java.lang.String[] operators, int operatorNumber) {
int stringPosition = 0;
for (int i = 0; i < operatorNumber; i++)
stringPosition += (operators[i].length()) + 1;
return ++stringPosition;
} |
public void testToFAGetToFAnswerByNullId() {
try {
java.lang.Long optionSeq = null;
br.cefetmg.jquest.model.service.TrueOrFalseAnswerManagementImplTest.tofaManagement.getToFAnswerById(optionSeq);
} catch (br.cefetmg.jquest.model.exception.BusinessException | br.cefetmg.jquest.model.exception.Per... | public void testToFAGetToFAnswerByNullId() {
try {
java.lang.Long optionSeq = null;
br.cefetmg.jquest.model.service.TrueOrFalseAnswerManagementImplTest.tofaManagement.getToFAnswerById(optionSeq);
} catch (br.cefetmg.jquest.model.exception.BusinessException | br.cefetmg.jquest.model.exception.Per... |
public void testValidNullStudentEmail() {
try {
student = new model.Student("Jacó Mario Souza", cpf, rg, date, null, address, phone1, phone2, "Milene Souza Medeiros", "Mário Souza Filho");
assertEquals("", student.getStudentEmail());
} catch (exception.StudentException e) {
fail(("Should... | public void testValidNullStudentEmail() {
try {
student = new model.Student("Jacó Mario Souza", cpf, rg, date, null, address, phone1, phone2, "Milene Souza Medeiros", "Mário Souza Filho", 1);
assertEquals("", student.getStudentEmail());
} catch (exception.StudentException e) {
fail(("Sho... |
private void undoUpdateTask() {
for (int i = 0; i < (tasksList.size()); i++) {
if ((tasksList.get(i).getIndex()) == (prevModIndex)) {
tasksList.remove(i);
tasksList.add(i, prevModTask);
java.util.Collections.sort(tasksList);
Tempo.Calendar.indexStore.replaceTa... | private void undoUpdateTask() {
for (int i = 0; i < (tasksList.size()); i++) {
if ((tasksList.get(i).getIndex()) == (prevModIndex)) {
tasksList.remove(i);
tasksList.add(i, prevModTask);
java.util.Collections.sort(tasksList);
Tempo.Calendar.indexStore.replaceTa... |
public void moveLeft() {
if (((!(board.questionCollision(((xPosition) - 1), yPosition, elevation))) && (wallCollide)) && (!(questionPlayerCollision((-1), 0))))
(xPosition)--;
questionNonWalls();
lastPosition[0] = xPosition;
} | public void moveLeft() {
if (((!(board.questionCollision(((xPosition) - 1), yPosition, elevation))) && (wallCollide)) && (!(questionPlayerCollision((-1), 0))))
(xPosition)--;
questionNonWalls();
lastPosition[0] = xPosition;
lastPosition[1] = yPosition;
} |
public void update(float delta) {
bulletsToRemove.clear();
for (lando.systems.lordsandships.entities.Bullet bullet : bullets) {
if (bullet.isAlive())
bullet.update(delta);
else
bulletsToRemove.add(bullet);
}
bullets.removeAll(bulletsToRemove, true);
i... | public void update(float delta) {
bulletsToRemove.clear();
for (lando.systems.lordsandships.entities.Bullet bullet : bullets) {
if (bullet.isAlive())
bullet.update(delta);
else
bulletsToRemove.add(bullet);
}
bullets.removeAll(bulletsToRemove, true);
a... |
public void exit(int line) {
int currentCount = --(counts[line]);
if (currentCount == 0) {
times[line] += (java.lang.System.nanoTime()) - (start[line]);
start[line] = 0L;
}
if (line > (max)) {
max = line;
}
} | public void exit(int line) {
if (line >= 0) {
int currentCount = --(counts[line]);
if (currentCount == 0) {
times[line] += (java.lang.System.nanoTime()) - (start[line]);
start[line] = 0L;
}
if (line > (max)) {
max = line;
}
}
} |
protected void onListItemClick(android.widget.ListView l, android.view.View v, int position, long id) {
android.content.Intent intent = new android.content.Intent(this, com.students.lmi.lmi_app.CurrentNews.class);
dialog2 = android.app.ProgressDialog.show(this, "Загрузка", "Подождите, новость загружается...");
... | protected void onListItemClick(android.widget.ListView l, android.view.View v, int position, long id) {
if ((com.students.lmi.lmi_app.News.referencelist.size()) != 0) {
android.content.Intent intent = new android.content.Intent(this, com.students.lmi.lmi_app.CurrentNews.class);
dialog2 = android.app... |
public void shouldParseValidPropertyOnDefaultDelimiter() {
final java.util.Properties input = createDummyProperties("key", "test,values");
final java.util.Optional<java.lang.String[]> actual = tested.getArray(input, "key", null);
org.assertj.core.api.Assertions.assertThat(actual).isNotEmpty();
org.asser... | public void shouldParseValidPropertyOnDefaultDelimiter() {
final java.util.Properties input = createDummyProperties("key", "test,values");
final java.lang.String[] actual = tested.getArray("key", input);
org.assertj.core.api.Assertions.assertThat(actual).isNotEmpty();
org.assertj.core.api.Assertions.ass... |
public void testFindPrinter() throws java.lang.Exception {
java.util.Map<java.lang.String, java.util.List<java.lang.String>> authors = new java.util.HashMap<java.lang.String, java.util.List<java.lang.String>>() {
{
put("Author1", java.util.Arrays.asList("1", "2", "3"));
put("Author2"... | public void testFindPrinter() throws java.lang.Exception {
java.util.Map<java.lang.String, java.util.List<java.lang.String>> authors = new java.util.HashMap<java.lang.String, java.util.List<java.lang.String>>() {
{
put("Author1", java.util.Arrays.asList("1", "2", "3"));
put("Author2"... |
public void validateTopic(java.lang.String title, java.lang.String content, java.lang.String date) {
boolean cancel = false;
if (android.text.TextUtils.isEmpty(title)) {
cancel = true;
mAddTopicView.setTitleError(R.string.error_field_required);
}
if (android.text.TextUtils.isEmpty(conten... | public void validateTopic(java.lang.String title, java.lang.String content, java.lang.String date) {
boolean cancel = false;
if (android.text.TextUtils.isEmpty(title)) {
cancel = true;
mAddTopicView.setTitleError(R.string.error_field_required);
}
if (android.text.TextUtils.isEmpty(conten... |
private static java.lang.String generateTestValue() {
java.lang.String firstline = "23 B\n";
java.lang.String[] field = new java.lang.String[]{ "K...." , "b...." , ".k..." , "....." , "....." , "....." };
java.lang.StringBuilder builder = new java.lang.StringBuilder();
builder.append(firstline);
for... | private static java.lang.String generateTestValue() {
java.lang.String firstline = "23 B\n";
java.lang.String[] field = new java.lang.String[]{ "K...." , "b...." , ".k..." , "....." , "....." , "....." };
java.lang.StringBuilder builder = new java.lang.StringBuilder();
builder.append(firstline);
for... |
private void depositCash() {
int account = selectAccount();
java.lang.System.out.println("Enter the amount that you would like to Deposit : ");
double amount = 0;
try {
amount = java.lang.Double.parseDouble(keyboard.nextLine());
} catch (java.lang.NumberFormatException e) {
amount = ... | private void depositCash() {
int account = selectAccount();
if (account >= 0) {
java.lang.System.out.println("Enter the amount that you would like to Deposit : ");
double amount = 0;
try {
amount = java.lang.Double.parseDouble(keyboard.nextLine());
} catch (java.lang.... |
private void alterLinks(java.lang.String pathHtml) {
for (org.jsoup.nodes.Element link : links) {
java.lang.String atr = link.attr(Constants.ABS_HREF);
if (atr != null) {
java.lang.String path = utils.parsers.Parser.urlToPath(atr, root, ("/" + (utils.Constants.PAGE_NAME)));
j... | private void alterLinks(java.lang.String pathHtml) {
for (org.jsoup.nodes.Element link : links) {
java.lang.String atr = link.attr(Constants.ABS_HREF);
if (atr != null) {
java.lang.String path = utils.parsers.Parser.urlToPath(atr, root, ("/" + (utils.Constants.PAGE_NAME)));
j... |
protected void onPageMoved(int position, float fraction) {
super.onPageMoved(position, fraction);
if (!(mSearchMode)) {
float openFraction = (1 - position) - fraction;
android.support.v4.view.ViewCompat.setScaleX(mCreateFab, openFraction);
android.support.v4.view.ViewCompat.setScaleY(mCr... | protected void onPageMoved(int position, float fraction) {
super.onPageMoved(position, fraction);
if ((!(mSearchMode)) && ((mCreateFab) != null)) {
float openFraction = (1 - position) - fraction;
android.support.v4.view.ViewCompat.setScaleX(mCreateFab, openFraction);
android.support.v4.v... |
public void startGame() {
start();
while ((turnCount) == 2) {
play(player1, cup, rule);
play(player2, cup, rule);
}
while ((turnCount) == 1) {
play(player2, cup, rule);
play(player1, cup, rule);
}
} | public void startGame() {
start();
while ((turnCount) == 0) {
play(player1, cup, rule);
play(player2, cup, rule);
}
while ((turnCount) == 1) {
play(player2, cup, rule);
play(player1, cup, rule);
}
} |
public void recordServiceStart() {
android.util.Log.i(com.prismaqf.callblocker.CallHelper.TAG, "Opening a DB connection and recording service start");
android.database.sqlite.SQLiteDatabase db = new com.prismaqf.callblocker.sql.DbHelper(ctx).getWritableDatabase();
com.prismaqf.callblocker.sql.ServiceRun las... | public void recordServiceStart() {
android.util.Log.i(com.prismaqf.callblocker.CallHelper.TAG, "Opening a DB connection and recording service start");
android.database.sqlite.SQLiteDatabase db = new com.prismaqf.callblocker.sql.DbHelper(ctx).getWritableDatabase();
try {
com.prismaqf.callblocker.sql.... |
private void doShare(com.liulishuo.share.content.ShareContent shareContent) {
java.lang.String appId = ShareBlock.Config.qqAppId;
if (android.text.TextUtils.isEmpty(appId)) {
throw new java.lang.NullPointerException("请通过shareBlock初始化QQAppId");
}
com.tencent.tauth.Tencent tencent = com.tencent.ta... | private void doShare(com.liulishuo.share.content.ShareContent shareContent, java.lang.String appId) {
com.tencent.tauth.Tencent tencent = com.tencent.tauth.Tencent.createInstance(appId, getApplicationContext());
if (isToFriend) {
android.os.Bundle params = createQQBundle(shareContent);
tencent.s... |
public static javafx.scene.layout.HBox constructButtonPane() {
javafx.scene.layout.HBox buttonPane = new javafx.scene.layout.HBox();
buttonPane.setSpacing(gui.modal.ModalUtilities.BUTTON_SPACING);
buttonPane.setAlignment(javafx.geometry.Pos.CENTER_LEFT);
buttonPane.setMinHeight(gui.modal.ModalUtilities.... | public static javafx.scene.layout.HBox constructButtonPane() {
javafx.scene.layout.HBox buttonPane = new javafx.scene.layout.HBox();
buttonPane.setSpacing(gui.modal.ModalUtilities.BUTTON_SPACING);
buttonPane.setAlignment(javafx.geometry.Pos.CENTER_LEFT);
buttonPane.setMinHeight(gui.modal.ModalUtilities.... |
private static final boolean equalsUUID(java.util.UUID one, java.util.UUID two) {
boolean equal = false;
if ((one == null) || (two == null))
equal = false;
else
equal = one.equals(two);
if (equal)
return true;
java.lang.String user1 = net.minecraftforge.common.Usern... | private static final boolean equalsUUID(java.util.UUID one, java.util.UUID two) {
if ((one == null) || (two == null))
return false;
else
if (one.equals(two))
return true;
java.lang.String user1 = net.minecraftforge.common.UsernameCache.getLastKnownUsername(one);
... |
public void update(android.graphics.Point point) {
rectangle.set(((point.x) - ((rectangle.width()) / 2)), ((point.y) - ((rectangle.height()) / 2)), ((point.x) - ((rectangle.width()) / 2)), ((point.y) + ((rectangle.height()) / 2)));
} | public void update(android.graphics.Point point) {
rectangle.set(((point.x) - ((rectangle.width()) / 2)), ((point.y) - ((rectangle.height()) / 2)), ((point.x) + ((rectangle.width()) / 2)), ((point.y) + ((rectangle.height()) / 2)));
} |
public void setActivePlayers() {
for (players.Player player : players) {
if ((player.getStake()) >= (currentBigBlind)) {
player.setActive(true);
activePlayers.add(player);
}else {
player.setActive(false);
}
}
} | private void setActivePlayers() {
for (players.Player player : players) {
if ((player.getStake()) >= (currentBigBlind)) {
player.setActive(true);
activePlayers.add(player);
}else {
player.setActive(false);
}
}
} |
private void onWPComEmailCheckError(boolean forceWordPressComDisplay) {
if (!(isAdded())) {
return ;
}
if (forceWordPressComDisplay) {
showSelfHostedSignInForm();
return ;
}
if (isUsernameEmail()) {
showSelfHostedSignInForm();
}else {
showPasswordFieldAndF... | private void onWPComEmailCheckError(boolean forceWordPressComDisplay) {
if (!(isAdded())) {
return ;
}
if (forceWordPressComDisplay) {
showPasswordFieldAndFocus();
return ;
}
if (isUsernameEmail()) {
showSelfHostedSignInForm();
}else {
showPasswordFieldAnd... |
private static java.util.Date setTimeToStartOfDay(java.util.Date date) {
assert date != null;
java.util.Calendar calendar = java.util.Calendar.getInstance();
calendar.setTime(date);
calendar.set(java.util.Calendar.HOUR_OF_DAY, 0);
calendar.set(java.util.Calendar.MINUTE, 0);
calendar.set(java.uti... | public static java.util.Date setTimeToStartOfDay(java.util.Date date) {
assert date != null;
java.util.Calendar calendar = java.util.Calendar.getInstance();
calendar.setTime(date);
calendar.set(java.util.Calendar.HOUR_OF_DAY, 0);
calendar.set(java.util.Calendar.MINUTE, 0);
calendar.set(java.util... |
private void startCLI() {
Println(plainsimple.geometrytoolkit.CLI.msg.program_full_name());
java.lang.String user_input;
do {
user_input = getInput();
if (user_input.isEmpty()) {
Println(plainsimple.geometrytoolkit.CLI.msg.no_input());
}else {
processInput(use... | public void startCLI() {
Println(plainsimple.geometrytoolkit.CLI.msg.program_full_name());
java.lang.String user_input;
do {
user_input = getInput();
if (user_input.isEmpty()) {
Println(plainsimple.geometrytoolkit.CLI.msg.no_input());
}else {
processInput(user... |
public static void addElement(java.lang.String name, int power, java.lang.String serialNumber) {
try {
JavafxLab6.Equipment equip = new JavafxLab6.Equipment(name, power, serialNumber);
JavafxLab6.Equipments.map.put(equip.getSerialNumber(), equip);
JavafxLab6.Equipments.showAddAcceptDilog();
... | public static void addElement(java.lang.String name, int power, java.lang.String serialNumber) {
try {
JavafxLab6.Equipment equip = new JavafxLab6.Equipment(serialNumber, power, name);
JavafxLab6.Equipments.map.put(equip.getSerialNumber(), equip);
JavafxLab6.Equipments.showAddAcceptDilog();
... |
public com.jadieldearmas.codegenerator.JCodedBody addCodedBody() throws java.lang.UnsupportedOperationException {
if (!(this.isBodyAdded)) {
com.jadieldearmas.codegenerator.JCodedBody body = new com.jadieldearmas.codegenerator.JCodedBody();
this.addNewChildTemplate("body", body);
this.isBody... | public com.jadieldearmas.codegenerator.JCodedBody addCodedBody() throws java.lang.UnsupportedOperationException {
if (!(this.isBodyAdded)) {
com.jadieldearmas.codegenerator.JCodedBody body = new com.jadieldearmas.codegenerator.JCodedBody();
this.addNewChildTemplate("body", body);
this.isBody... |
public boolean onTouch(android.view.View v, android.view.MotionEvent event) {
int source = event.getSource();
if (source == (android.view.InputDevice.SOURCE_MOUSE)) {
handleMouseEvent(event);
}else
if (source == (android.view.InputDevice.SOURCE_TOUCHSCREEN)) {
handleTouchEvent(ev... | public boolean onTouch(android.view.View v, android.view.MotionEvent event) {
int source = event.getSource();
if ((android.view.InputDevice.SOURCE_MOUSE) == (source & (android.view.InputDevice.SOURCE_MOUSE))) {
handleMouseEvent(event);
}else
if ((android.view.InputDevice.SOURCE_TOUCHSCREEN) ... |
public java.net.URI getCurrentURI() {
if ((m_bUseStaticServerInfo) && (com.helger.web.servlet.server.StaticServerInfo.isSet()))
return com.helger.commons.url.URLHelper.getAsURI((((com.helger.web.servlet.server.StaticServerInfo.getInstance().getFullServerPath()) + "/") + (m_aUriInfo.getPath())));
if... | public java.net.URI getCurrentURI() {
if ((m_bUseStaticServerInfo) && (com.helger.web.servlet.server.StaticServerInfo.isSet())) {
return com.helger.commons.url.URLHelper.getAsURI((((com.helger.web.servlet.server.StaticServerInfo.getInstance().getFullServerPath()) + "/") + (m_aUriInfo.getPath(false))));
... |
public void onFocusChange(android.view.View v, boolean hasFocus) {
if (!hasFocus) {
boolean isValid = validUser();
ev_Role.setEnabled(isValid);
if (isValid) {
ev_Role.expandGroup(0);
loadRole();
}else {
ev_Role.collapseGroup(0);
}
}
} | public void onFocusChange(android.view.View v, boolean hasFocus) {
if (!hasFocus) {
boolean isValid = validUser();
ev_Role.setEnabled(isValid);
if (isValid) {
ev_Role.expandGroup(0);
}else {
ev_Role.collapseGroup(0);
}
}
} |
public void connect() throws java.io.IOException {
org.phoenixframework.channels.Socket.LOG.log(java.util.logging.Level.FINE, "connect");
disconnect();
final java.lang.String httpUrl = this.endpointUri.replaceFirst("^ws:", "http:").replaceFirst("^wss:", "https:");
final com.squareup.okhttp.Request reque... | public void connect() throws java.io.IOException {
org.phoenixframework.channels.Socket.LOG.log(java.util.logging.Level.FINE, "connect");
disconnect();
final com.squareup.okhttp.Request request = new com.squareup.okhttp.Request.Builder().url(this.endpointUri).build();
final com.squareup.okhttp.ws.WebSoc... |
private java.util.List<android.view.accessibility.AccessibilityNodeInfo> findAccessibilityNodeInfosByTexts(android.view.accessibility.AccessibilityNodeInfo nodeInfo, java.lang.String[] texts) {
for (java.lang.String text : texts) {
java.util.List<android.view.accessibility.AccessibilityNodeInfo> nodes = nod... | private java.util.List<android.view.accessibility.AccessibilityNodeInfo> findAccessibilityNodeInfosByTexts(android.view.accessibility.AccessibilityNodeInfo nodeInfo, java.lang.String[] texts) {
for (java.lang.String text : texts) {
java.util.List<android.view.accessibility.AccessibilityNodeInfo> nodes = nod... |
private static void deserializeStore(MiniWebStore store, java.lang.String filename) throws java.io.IOException, java.lang.ClassNotFoundException {
java.io.FileInputStream fileInputStream = new java.io.FileInputStream(filename);
java.util.zip.GZIPInputStream gzipInputStream = new java.util.zip.GZIPInputStream(fi... | private static MiniWebStore deserializeStore(java.lang.String filename) throws java.io.IOException, java.lang.ClassNotFoundException {
java.io.FileInputStream fileInputStream = new java.io.FileInputStream(filename);
java.util.zip.GZIPInputStream gzipInputStream = new java.util.zip.GZIPInputStream(fileInputStrea... |
public int returnID(java.lang.String n) throws java.sql.SQLException {
try {
conn.prepareStatement((("SELECT FROM COURSES WHERE NAME='" + n) + "'")).executeUpdate();
java.sql.ResultSet executeQuery = conn.prepareStatement((("SELECT FROM COURSES WHERE NAME='" + n) + "'")).executeQuery();
whil... | public int returnID(java.lang.String n) throws java.sql.SQLException {
try {
conn.prepareStatement((("SELECT FROM COURSES WHERE NAME='" + n) + "'")).executeUpdate();
java.sql.ResultSet executeQuery = conn.prepareStatement((("SELECT FROM COURSES WHERE NAME='" + n) + "'")).executeQuery();
whil... |
public void testCalculateSmallFactorial() {
org.junit.Assert.assertEquals(1, be.inniger.euler.util.Maths.calculateSmallFactorial(1));
org.junit.Assert.assertEquals(2, be.inniger.euler.util.Maths.calculateSmallFactorial(2));
org.junit.Assert.assertEquals(6, be.inniger.euler.util.Maths.calculateSmallFactorial... | public void testCalculateSmallFactorial() {
org.junit.Assert.assertEquals(1, calculateSmallFactorial(1));
org.junit.Assert.assertEquals(2, calculateSmallFactorial(2));
org.junit.Assert.assertEquals(6, calculateSmallFactorial(3));
org.junit.Assert.assertEquals(479001600, calculateSmallFactorial(12));
} |
public void onClick(com.google.gwt.event.dom.client.ClickEvent event) {
forceTabsCleaning();
if ((this.modal) != null) {
this.modal.hide();
}
this.setSelectedAnchorListItem(this.firewall);
this.contentPanel.setVisible(true);
this.contentPanelHeader.setText(org.eclipse.kura.web.client.ui.... | public void onClick(com.google.gwt.event.dom.client.ClickEvent event) {
forceTabsCleaning();
if ((this.modal) != null) {
this.modal.hide();
}
this.setSelectedAnchorListItem(this.firewall);
this.contentPanel.setVisible(true);
this.contentPanelHeader.setText(org.eclipse.kura.web.client.ui.... |
private void updateRoomListString() {
chatserver.ChatServer.chatRoomListString = "";
int i = 0;
synchronized(chatserver.ChatServer.chatRoomList) {
for (chatRoom.ChatRoom rm : chatserver.ChatServer.chatRoomList) {
chatserver.ChatServer.chatRoomListString = ((((chatserver.ChatServer.chatRo... | private void updateRoomListString() {
chatserver.ChatServer.chatRoomListString = "";
int i = 1;
synchronized(chatserver.ChatServer.chatRoomList) {
for (chatRoom.ChatRoom rm : chatserver.ChatServer.chatRoomList) {
chatserver.ChatServer.chatRoomListString = (((((chatserver.ChatServer.chatR... |
public IO() {
speedUp.whenPressed(new org.usfirst.frc.team5243.robot.StrafeSpeedCommand(((strafeSpeed) + 0.1)));
slowDown.whenPressed(new org.usfirst.frc.team5243.robot.StrafeSpeedCommand(((strafeSpeed) - 0.1)));
leftStrafe.whileHeld(new org.usfirst.frc.team5243.robot.commands.StrafeCommand());
rightSt... | public IO() {
strafeSpeed = 0;
speedUp.whenPressed(new org.usfirst.frc.team5243.robot.StrafeSpeedCommand(((strafeSpeed) + 0.1)));
slowDown.whenPressed(new org.usfirst.frc.team5243.robot.StrafeSpeedCommand(((strafeSpeed) - 0.1)));
leftStrafe.whileHeld(new org.usfirst.frc.team5243.robot.commands.StrafeCo... |
public void translate(org.jbox2d.common.Vec2 force, int milliseconds) {
int newX = ((int) ((this.shape.getX()) + ((force.x) * milliseconds)));
int newY = ((int) ((this.shape.getY()) + ((force.y) * milliseconds)));
this.shape.setLocation(newX, newY);
} | public void translate(org.jbox2d.common.Vec2 force, int milliseconds) {
int newX = ((int) (java.lang.Math.round(((this.shape.getX()) + ((force.x) * milliseconds)))));
int newY = ((int) (java.lang.Math.round(((this.shape.getY()) + ((force.y) * milliseconds)))));
this.shape.setLocation(newX, newY);
} |
protected void reset() {
for (int i = 0; i < (animations.length); i++) {
synchronized(animations[i]) {
animations[i].clear();
}
}
super.reset();
} | protected void reset() {
super.reset();
for (int i = 0; i < (animations.length); i++) {
synchronized(animations[i]) {
animations[i].clear();
}
}
} |
protected void onComplete(retrofit2.Call<java.util.List<br.com.clairtonluz.moviemanagerapp.favorite.Favorite>> call, boolean success) {
super.onComplete(call, success);
if (movieList.isEmpty()) {
noContent.setVisibility(View.VISIBLE);
mSwipeRefreshLayout.setVisibility(View.GONE);
}else {
... | protected void onComplete(retrofit2.Call<java.util.List<br.com.clairtonluz.moviemanagerapp.favorite.Favorite>> call, boolean success) {
super.onComplete(call, success);
if (movieList.isEmpty()) {
noContent.setVisibility(View.VISIBLE);
}else {
noContent.setVisibility(View.GONE);
}
} |
protected void applyAfterConditionLogic(com.moorkensam.xlra.dto.PriceCalculationDTO priceDTO) {
if ((priceDTO.getAdrSurchargeMinimum().doubleValue()) > (priceDTO.getCalculatedAdrSurcharge().doubleValue())) {
priceDTO.setResultingPriceSurcharge(priceDTO.getAdrSurchargeMinimum());
}else {
priceDTO... | protected void applyAfterConditionLogic(com.moorkensam.xlra.dto.PriceCalculationDTO priceDTO) {
if (((priceDTO.getAdrSurchargeMinimum()) == null) && ((priceDTO.getCalculatedAdrSurcharge()) == null)) {
}else {
if ((priceDTO.getAdrSurchargeMinimum().doubleValue()) > (priceDTO.getCalculatedAdrSurcharge().d... |
private void setPosition() {
switch (dir) {
case LEFT :
position.setPosition(bottomLeft.getX(), bottomLeft.getY());
break;
case RIGHT :
position.setPosition(((topRight.getX()) - (region.getRegionWidth())), bottomLeft.getY());
break;
}
} | private void setPosition() {
switch (dir) {
case LEFT :
position.setPosition(((bottomLeft.getX()) + 1), bottomLeft.getY());
break;
case RIGHT :
position.setPosition((((topRight.getX()) - (region.getRegionWidth())) - 1), bottomLeft.getY());
break;
}... |
public void testDeadChatAccess() {
shared.logic.Player ghost = addPlayer(shared.logic.templates.BasicRoles.Ghost());
shared.logic.Player maf = addPlayer(shared.logic.templates.BasicRoles.Mafioso());
shared.logic.Player cit = addPlayer(shared.logic.templates.BasicRoles.Citizen());
shared.logic.Player amn... | public void testDeadChatAccess() {
shared.logic.Player cit = addPlayer(shared.logic.templates.BasicRoles.Citizen());
shared.logic.Player ghost = addPlayer(shared.logic.templates.BasicRoles.Ghost());
shared.logic.Player maf = addPlayer(shared.logic.templates.BasicRoles.Mafioso());
shared.logic.Player amn... |
public void update(cards.Card currentCard) {
locationString = "src\\gui\\images\\";
locationString += currentCard.getImageFile();
image = new javax.swing.ImageIcon(locationString);
scaledImage = image.getImage().getScaledInstance(240, 300, java.awt.Image.SCALE_DEFAULT);
cardImage = new javax.swing.I... | public void update(cards.Card currentCard) {
locationString = "src\\gui\\images\\";
locationString += currentCard.getImageFile();
java.lang.System.out.println(locationString);
image = new javax.swing.ImageIcon(locationString);
scaledImage = image.getImage().getScaledInstance(240, 300, java.awt.Image... |
private Todo.TextBuddy.CommandType getCommandType(java.lang.String command) {
java.lang.String lowerCaseCommand = command.toLowerCase();
switch (lowerCaseCommand) {
case "add" :
return Todo.TextBuddy.CommandType.ADD;
case "delete" :
return Todo.TextBuddy.CommandType.DELET... | private Todo.TextBuddy.CommandType getCommandType(java.lang.String command) {
java.lang.String lowerCaseCommand = command.toLowerCase();
switch (lowerCaseCommand) {
case "add" :
return Todo.TextBuddy.CommandType.ADD;
case "delete" :
return Todo.TextBuddy.CommandType.DELET... |
public void setAdapter(com.wiky.ui.adapter.PageAdapter adapter) {
mAdapter = adapter;
mCurrentFrame.removeAllViews();
mCurrentFrame.setTag(null);
mNextFrame.removeAllViews();
mNextFrame.setTag(null);
mPrevFrame.removeAllViews();
mPrevFrame.setTag(null);
mCurrentPos = 0;
setDisplayVie... | public void setAdapter(com.wiky.ui.adapter.PageAdapter adapter) {
mAdapter = adapter;
mCurrentFrame.removeAllViews();
mNextFrame.removeAllViews();
mPrevFrame.removeAllViews();
mCurrentPos = 0;
setDisplayView(mCurrentFrame, 0);
setDisplayView(mNextFrame, 1);
setDisplayView(mPrevFrame, (-1... |
public java.lang.String getDateString() {
java.text.SimpleDateFormat format = new java.text.SimpleDateFormat();
format.applyPattern("MMMM yyyy");
java.lang.String noDateStr = format.format(date.getTime());
int val = date.get(java.util.Calendar.DAY_OF_MONTH);
return (((java.lang.String.format(java.ut... | public java.lang.String getDateString() {
java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("MMMM yyyy", java.util.Locale.getDefault());
java.lang.String noDateStr = format.format(date.getTime());
int val = date.get(java.util.Calendar.DAY_OF_MONTH);
return (((java.lang.String.format(jav... |
public java.lang.Integer put(final java.lang.String key, final java.lang.Integer value) {
com.pdpmr.task0.mappers.KScorerMapper.WordStats.WordStatsModel model = modelMap.getOrDefault(key, new com.pdpmr.task0.mappers.KScorerMapper.WordStats.WordStatsModel());
int wordScore = (model.wordScore) + value;
int wo... | public java.lang.Integer put(final java.lang.String key, final java.lang.Integer value) {
com.pdpmr.task0.mappers.KScorerMapper.WordStats.WordStatsModel model = modelMap.getOrDefault(key, new com.pdpmr.task0.mappers.KScorerMapper.WordStats.WordStatsModel());
model = new com.pdpmr.task0.mappers.KScorerMapper.Wor... |
public void onDestroyView() {
super.onDestroyView();
android.util.Log.d("FRIEND FRAGMENT", "OnDestroy");
if ((VEL) != null)
pcchatapp.child("user_friend").child(pcchatapp.getAuth().getUid()).removeEventListener(VEL);
} | public void onDestroyView() {
super.onDestroyView();
android.util.Log.d("FRIEND FRAGMENT", "OnDestroy");
if (((VEL) != null) && ((pcchatapp.getAuth()) != null))
pcchatapp.child("user_friend").child(pcchatapp.getAuth().getUid()).removeEventListener(VEL);
} |
public com.whayer.wx.common.mvc.ResponseCondition associate(@org.springframework.web.bind.annotation.RequestBody
java.lang.String[] ids, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) {
com.whayer.wx.product.controller.Product2RoleController.log.info("Product2RoleCon... | public com.whayer.wx.common.mvc.ResponseCondition associate(@org.springframework.web.bind.annotation.RequestParam(value = "ids[]")
java.lang.String[] ids, java.lang.String role, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) {
com.whayer.wx.product.controller.Product... |
public void setPivot(double Joystick) {
if ((Joystick < 0) && ((MIN_SWITCH.get()) == false)) {
PIVOT_MOTOR.set(Joystick);
}
if ((Joystick > 0) && ((MAX_SWITCH.get()) == false)) {
PIVOT_MOTOR.set(Joystick);
}
} | public void setPivot(double Joystick) {
if ((Joystick < 0) && ((MIN_SWITCH.get()) == false)) {
PIVOT_MOTOR.set(Joystick);
}
if ((Joystick > 0) && ((MAX_SWITCH.get()) == false)) {
PIVOT_MOTOR.set(Joystick);
}else {
PIVOT_MOTOR.set(0);
}
} |
public final void enableCache() {
this.enableValueCache = true;
if ((this.valueToIdCache) == null)
this.valueToIdCache = new java.lang.ref.SoftReference<>(new java.util.concurrent.ConcurrentHashMap());
if ((this.idToValueCache) == null)
this.idToValueCache = new java.lang.ref.SoftRefere... | public final void enableCache() {
if ((this.valueToIdCache) == null)
this.valueToIdCache = new java.lang.ref.SoftReference<>(new java.util.concurrent.ConcurrentHashMap());
if ((this.idToValueCache) == null)
this.idToValueCache = new java.lang.ref.SoftReference<>(new java.lang.Object[org.apa... |
public void successfulHead() throws java.lang.Exception {
com.springernature.watermark.api.WatermarkApiIntegrationTest.LOG.info("Testing successfulHead");
com.springernature.watermark.model.Book book = com.springernature.watermark.model.ModelTestUtil.createDummyBook();
java.lang.Long id = postRequest(book);... | public void successfulHead() throws java.lang.Exception {
com.springernature.watermark.api.WatermarkApiIntegrationTest.LOG.info("Testing successfulHead");
com.springernature.watermark.model.Book book = com.springernature.watermark.model.ModelTestUtil.createDummyBook();
java.lang.Long id = postRequest(book);... |
public void moveComponentInst(com.stratelia.webactiv.beans.admin.DomainDriverManager ddManager, int spaceLocalId, int componentLocalId) throws com.stratelia.webactiv.beans.admin.AdminException {
try {
com.stratelia.webactiv.beans.admin.ComponentInst componentInst = getComponentInst(ddManager, componentLocal... | public void moveComponentInst(com.stratelia.webactiv.beans.admin.DomainDriverManager ddManager, int spaceLocalId, int componentLocalId) throws com.stratelia.webactiv.beans.admin.AdminException {
try {
ddManager.getOrganization().instance.moveComponentInstance(spaceLocalId, componentLocalId);
} catch (ja... |
public void setVelocityDirection(float x, float y) {
com.badlogic.gdx.math.Vector2 newVelocity = new com.badlogic.gdx.math.Vector2((x - (this.position.x)), (y - (this.position.y)));
newVelocity.nor();
newVelocity.scl(this.DEFAULT_VELOCITY);
this.setVelocity(newVelocity.x, newVelocity.y);
java.lang.S... | public void setVelocityDirection(float x, float y) {
com.badlogic.gdx.math.Vector2 newVelocity = new com.badlogic.gdx.math.Vector2((x - (this.position.x)), (y - (this.position.y)));
newVelocity.nor();
newVelocity.scl(this.DEFAULT_VELOCITY);
this.setVelocity(newVelocity.x, newVelocity.y);
} |
private imp.lickgen.transformations.Transform learnByTrendDetection() {
notate.adjustSelection();
int start = notate.getCurrentSelectionStart();
int stop = notate.getCurrentSelectionEnd();
imp.data.MelodyPart outline = notate.getCurrentMelodyPart();
imp.data.ChordPart chords = notate.getChordProg();... | private imp.lickgen.transformations.Transform learnByTrendDetection() {
notate.adjustSelection();
int start = notate.getCurrentSelectionStart();
int stop = notate.getCurrentSelectionEnd();
imp.data.MelodyPart outline = notate.getCurrentMelodyPart();
imp.data.ChordPart chords = notate.getChordProg();... |
public static void EchoInput(java.util.ArrayList<java.lang.String> options) {
java.lang.String output = "";
for (java.lang.String option : options) {
if (option.equals("-h")) {
java.lang.System.out.println("Command syntax:\n\techo [-h] input\n\nPrints the specified input to the console.");
... | public static void EchoInput(java.util.ArrayList<java.lang.String> options) {
java.lang.String output = "";
for (java.lang.String option : options) {
if (option.equals("-h")) {
java.lang.System.out.println("Command syntax:\n\techo [-h] input\n\nPrints the specified input to the console.");
... |
public void run() {
if ((mOrientation) == (VERTICAL)) {
((com.taobao.weex.ui.view.WXScrollView) (getInnerView())).smoothScrollBy(0, y);
}else {
((com.taobao.weex.ui.view.WXHorizontalScrollView) (getInnerView())).smoothScrollBy(x, 0);
}
getInnerView().invalidate();
} | public void run() {
if ((getInnerView()) == null) {
return ;
}
if ((mOrientation) == (VERTICAL)) {
((com.taobao.weex.ui.view.WXScrollView) (getInnerView())).smoothScrollBy(0, y);
}else {
((com.taobao.weex.ui.view.WXHorizontalScrollView) (getInnerView())).smoothScrollBy(x, 0);
... |
public void onChangeGUI(java.lang.String tokens) {
if (acceptChanges) {
if (((changeIndex) >= 0) && ((changeIndex) != ((changesList.size()) - 1))) {
changesList.subList(changeIndex, ((changesList.size()) - 1));
}
changesList.add(tokens);
changeIndex = (changesList.size())... | public void onChangeGUI(java.lang.String tokens) {
if (acceptChanges) {
if (((changeIndex) >= 0) && ((changeIndex) != ((changesList.size()) - 1))) {
changesList = new java.util.ArrayList<>(changesList.subList(0, changeIndex));
}
changesList.add(tokens);
changeIndex = (cha... |
public static void startImport(java.lang.String docDir) {
java.io.File cRoot = new java.io.File(docDir);
java.io.File[] files = cRoot.listFiles();
for (java.io.File f : files) {
query.Doc2Mysql.mapFile(f);
if ((query.Doc2Mysql.docMap.size()) > (query.Doc2Mysql.INSERT_PER_BATCH)) {
... | public static void startImport(java.lang.String docDir) {
java.io.File cRoot = new java.io.File(docDir);
java.io.File[] files = cRoot.listFiles();
for (java.io.File f : files) {
query.Doc2Mysql.mapFile(f);
if ((query.Doc2Mysql.docMap.size()) > (query.Doc2Mysql.INSERT_PER_BATCH)) {
... |
public java.lang.Object[] decode(vmm.IntSequence iseq) {
java.lang.Object[] res = new java.lang.String[(iseq.length()) - 1];
for (int i = 1; i < (iseq.length()); i++) {
res[i] = getDecodedSymbol(iseq.intAt(i));
}
return res;
} | public java.lang.Object[] decode(vmm.IntSequence iseq) {
java.lang.Object[] res = new java.lang.String[(iseq.length()) - 1];
for (int i = 1; i < (iseq.length()); i++) {
res[(i - 1)] = getDecodedSymbol(iseq.intAt(i));
}
return res;
} |
public void act() {
if ((timer) > 0) {
(timer)--;
if ((timer) == 0) {
ChangeMouseImage(cImage, x, y);
}
}else
if (Greenfoot.mousePressed(getActor())) {
java.lang.System.out.println(("Click Test: " + (Greenfoot.mouseClicked(getActor()))));
play(... | public void act() {
if ((timer) > 0) {
(timer)--;
if ((timer) == 0) {
ChangeMouseImage(cImage, x, y);
}
}else
if (Greenfoot.mousePressed(getActor())) {
play();
timer = 2;
}
} |
public void actionPerformed(java.awt.event.ActionEvent e) {
this.parent.screen.addOption(nameField.getText(), this.parent.screen.getParent().getScreen(((java.lang.String) (screenField.getSelectedItem()))));
model.fireTableStructureChanged();
} | public void actionPerformed(java.awt.event.ActionEvent e) {
if (this.parent.screen.addOption(nameField.getText(), this.parent.screen.getParent().getScreen(((java.lang.String) (screenField.getSelectedItem())))))
model.fireTableStructureChanged();
} |
public java.lang.String toString() {
return ((((((((((getFingerprint()) + "\t") + (getCommonName())) + "\t") + (getOrganization())) + "\t") + (getValidFrom())) + "\t") + (getValidTo())) + "\t") + ((theCertificate) == null ? isValid() : isTrusted());
} | public java.lang.String toString() {
return ((((((((((getFingerprint()) + "\t") + (getCommonName())) + "\t") + (getOrganization())) + "\t") + (getValidFrom())) + "\t") + (getValidTo())) + "\t") + (isTrusted());
} |
private java.lang.String getNewChequenumbers(final org.egov.model.instrument.InstrumentHeader instrumentHeader, final java.lang.Integer department) {
if (org.egov.egf.web.actions.payment.ChequeAssignmentAction.LOGGER.isDebugEnabled())
org.egov.egf.web.actions.payment.ChequeAssignmentAction.LOGGER.debug("Sta... | private java.lang.String getNewChequenumbers(final org.egov.model.instrument.InstrumentHeader instrumentHeader, final java.lang.Integer department) {
if (org.egov.egf.web.actions.payment.ChequeAssignmentAction.LOGGER.isDebugEnabled())
org.egov.egf.web.actions.payment.ChequeAssignmentAction.LOGGER.debug("Sta... |
public void display(javax.media.opengl.GLAutoDrawable gLDrawable) {
setGL(gLDrawable);
drawScene();
if (((org.geogebra.desktop.geogebra3D.euclidian3D.EuclidianView3DD) (view3D)).hasPrinter()) {
if ((type) == (RendererType.SHADER)) {
((org.geogebra.desktop.geogebra3D.euclidian3D.Euclidian... | public void display(javax.media.opengl.GLAutoDrawable gLDrawable) {
setGL(gLDrawable);
drawScene();
if (((org.geogebra.desktop.geogebra3D.euclidian3D.EuclidianView3DD) (view3D)).hasPrinter()) {
if ((getType()) == (RendererType.SHADER)) {
((org.geogebra.desktop.geogebra3D.euclidian3D.Eucl... |
public void initObjects(java.util.ArrayList<gui.components.Visible> viewObjects) {
initAllObjects(viewObjects);
clickables = new java.util.ArrayList<gui.components.Clickable>();
for (gui.components.Visible v : viewObjects) {
if (v instanceof gui.components.Clickable) {
clickables.add(((g... | public void initObjects(java.util.List<gui.components.Visible> viewObjects) {
initAllObjects(viewObjects);
clickables = new java.util.ArrayList<gui.components.Clickable>();
for (gui.components.Visible v : viewObjects) {
if (v instanceof gui.components.Clickable) {
clickables.add(((gui.co... |
public void checkAndForceLoginIfNecessary() throws com.silicolife.textmining.core.interfaces.core.dataaccess.exception.DaemonException {
java.util.Date now = new java.util.Date();
java.util.Date interationServer = webClient.getLastOperationTime();
long duration = (now.getTime()) - (interationServer.getTime(... | public void checkAndForceLoginIfNecessary() throws com.silicolife.textmining.core.interfaces.core.dataaccess.exception.DaemonException {
java.util.Date now = new java.util.Date();
java.util.Date interationServer = webClient.getLastOperationTime();
long duration = (now.getTime()) - (interationServer.getTime(... |
private org.eclipse.login.session.Session getSession(java.lang.String csrfToken, java.lang.String sessionID) {
if (csrfToken != null) {
org.eclipse.login.session.Session session = sessions.getIfPresent(sessionID);
if ((session != null) && (session.getCSRFToken().equals(csrfToken))) {
ret... | private org.eclipse.login.session.Session getSession(java.lang.String csrfToken, java.lang.String sessionID) {
if ((csrfToken != null) && (sessionID != null)) {
org.eclipse.login.session.Session session = sessions.getIfPresent(sessionID);
if ((session != null) && (session.getCSRFToken().equals(csrfT... |
private void generateBriefcase() {
boolean briefcaseset = false;
while (!briefcaseset) {
int r = rand.nextInt(9);
int s = rand.nextInt(9);
if (board.getTile(r, s).isRoom()) {
board.getTile(r, s).setBriefcase();
java.lang.System.out.println(((("\nBriefcase placed a... | private void generateBriefcase() {
boolean briefcaseset = false;
while (!briefcaseset) {
int r = rand.nextInt(9);
int s = rand.nextInt(9);
if (board.getTile(r, s).isRoom()) {
board.getTile(r, s).setBriefcase();
briefcaseset = true;
}
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.