buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public static java.util.ArrayList<be.uclouvain.lsinf1225.v.bartender.model.Ingredient> getInsufficient() {
be.uclouvain.lsinf1225.v.bartender.dao.DaoIngredient.refreshStock();
java.util.ArrayList<be.uclouvain.lsinf1225.v.bartender.model.Ingredient> insufficient = new java.util.ArrayList<>();
for (be.uclouva... | public static java.util.ArrayList<be.uclouvain.lsinf1225.v.bartender.model.Ingredient> getInsufficient() {
be.uclouvain.lsinf1225.v.bartender.dao.DaoIngredient.refreshStock();
java.util.ArrayList<be.uclouvain.lsinf1225.v.bartender.model.Ingredient> insufficient = new java.util.ArrayList<>();
for (be.uclouva... |
public void follow(java.lang.String usernameFollower, java.lang.String usernameFollowing) {
java.lang.String followerKey = ("user:" + usernameFollower) + ":following";
java.lang.String followingKey = ("user" + usernameFollowing) + ":follower";
redisStringSetOps.add(followerKey, usernameFollowing);
redis... | public void follow(java.lang.String usernameFollower, java.lang.String usernameFollowing) {
java.lang.String followerKey = ("user:" + usernameFollower) + ":following";
java.lang.String followingKey = ("user:" + usernameFollowing) + ":follower";
redisStringSetOps.add(followerKey, usernameFollowing);
redi... |
protected void applyEntityAttributes() {
super.applyEntityAttributes();
{
getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(8.0);
}
getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.3);
getEntityAttribute(SharedMonsterAttributes.knockbackResistance).se... | protected void applyEntityAttributes() {
super.applyEntityAttributes();
getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(8.0);
getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.3);
getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(0.0);... |
public void shutdown() {
try {
flush();
sync(Sync.MAJOR_SYNC);
domDb.close();
collectionsDb.close();
notifyClose();
} catch (final java.lang.Exception e) {
org.exist.storage.LOG.warn(e.getMessage(), e);
}
super.shutdown();
} | public void shutdown() {
try {
flush();
sync(Sync.MAJOR_SYNC);
domDb.close();
collectionsDb.close();
notifyClose();
} catch (final java.lang.Exception e) {
org.exist.storage.LOG.error(e.getMessage(), e);
}
super.shutdown();
} |
public void paintComponent(java.awt.Graphics g) {
int heightLocation = (this.point.getX()) * (view.SlotView.SLOTIMAGE_HEIGHT);
int widthLocation = (this.point.getY()) * (view.SlotView.SLOTIMAGE_WIDTH);
g.drawImage(this.slotImage, widthLocation, heightLocation, null);
} | public void paintComponent(java.awt.Graphics g) {
int heightLocation = (this.point.getX()) * (view.SlotView.SLOTIMAGE_HEIGHT);
int widthLocation = (this.point.getY()) * (view.SlotView.SLOTIMAGE_WIDTH);
g.drawImage(this.slotImage, 0, 0, null);
} |
public static java.util.List<org.kaaproject.kaa.examples.gpiocontrol.model.DeviceGroup> getMockedDeviceGroupList() {
java.util.List<org.kaaproject.kaa.examples.gpiocontrol.model.DeviceGroup> deviceGroupList = new java.util.ArrayList<>();
for (int i = 0; i < 5; i++) {
deviceGroupList.add(new org.kaaproje... | public static java.util.List<org.kaaproject.kaa.examples.gpiocontrol.model.DeviceGroup> getMockedDeviceGroupList() {
java.util.List<org.kaaproject.kaa.examples.gpiocontrol.model.DeviceGroup> deviceGroupList = new java.util.ArrayList<>();
for (int i = 0; i < 5; i++) {
deviceGroupList.add(new org.kaaproje... |
private org.wso2.carbon.identity.application.authentication.framework.inbound.HttpIdentityRequestFactory getIdentityRequestFactory(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) {
java.util.List<org.wso2.carbon.identity.application.authentication.framework.inbound.Ht... | private org.wso2.carbon.identity.application.authentication.framework.inbound.HttpIdentityRequestFactory getIdentityRequestFactory(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) {
java.util.List<org.wso2.carbon.identity.application.authentication.framework.inbound.Ht... |
public boolean isPassing(sg.edu.nus.comp.codis.Program program, java.util.Map<sg.edu.nus.comp.codis.Parameter, sg.edu.nus.comp.codis.Constant> parameterValuation, sg.edu.nus.comp.codis.TestCase test) {
sg.edu.nus.comp.codis.ProgramVariable result = new sg.edu.nus.comp.codis.ProgramVariable("<testResult>", test.getO... | public boolean isPassing(sg.edu.nus.comp.codis.Program program, java.util.Map<sg.edu.nus.comp.codis.Parameter, sg.edu.nus.comp.codis.Constant> parameterValuation, sg.edu.nus.comp.codis.TestCase test) {
sg.edu.nus.comp.codis.ProgramVariable result = new sg.edu.nus.comp.codis.ProgramVariable("<testResult>", test.getO... |
public void test_CreateUser() {
s = Subscriber.SubscriberFactory.createSubsriber("Beathe", "Beispielbraut", TerminalType.PearaPhone4s, new SubscriptionType.GreenMobileS());
assertEquals("Beathe", s.getForename());
assertEquals("Beispielbraut", s.getSurname());
assertEquals("Beathe Beispielbraut", s.getF... | public void test_CreateUser() {
s = Subscriber.SubscriberFactory.createSubsriber("Beathe", "Beispielbraut", TerminalType.PearaPhone4s, new SubscriptionType.GreenMobileS(), new java.util.Date());
assertEquals("Beathe", s.getForename());
assertEquals("Beispielbraut", s.getSurname());
assertEquals("Beathe ... |
public static void enqueue(ArrayQueueADT arrayQueueADT, java.lang.Object o) {
ArrayQueueADT.ensureCapacity(arrayQueueADT, ((arrayQueueADT.size) + 1));
arrayQueueADT.elements[((arrayQueueADT.tail)++)] = o;
arrayQueueADT.tail %= arrayQueueADT.elements.length;
(arrayQueueADT.size)++;
} | public static void enqueue(ArrayQueueADT arrayQueueADT, java.lang.Object o) {
assert o != null;
ArrayQueueADT.ensureCapacity(arrayQueueADT, ((arrayQueueADT.size) + 1));
arrayQueueADT.elements[arrayQueueADT.tail] = o;
arrayQueueADT.tail = ((arrayQueueADT.tail) + 1) % (arrayQueueADT.elements.length);
... |
public static int getOverallMaxPlayers(org.bukkit.configuration.file.FileConfiguration fileConfiguration) {
int i = 0;
int n = 0;
int x;
java.lang.String[] names = org.kwstudios.play.ragemode.toolbox.GetGames.getGameNames(fileConfiguration);
while (i <= (org.kwstudios.play.ragemode.toolbox.GetGames.... | public static int getOverallMaxPlayers(org.bukkit.configuration.file.FileConfiguration fileConfiguration) {
int i = 0;
int n = 0;
int x;
java.lang.String[] names = org.kwstudios.play.ragemode.toolbox.GetGames.getGameNames(fileConfiguration);
while (i <= (org.kwstudios.play.ragemode.toolbox.GetGames.... |
private static java.lang.Comparable[] getBenchmarkData() {
java.util.ArrayList<java.lang.Comparable> listToSort = new java.util.ArrayList<>();
for (int i = 0; i < 10000; ++i) {
listToSort.add(((int) ((java.lang.Math.random()) * 10000)));
}
java.lang.Comparable[] mess = new java.lang.Comparable[l... | private static java.lang.Comparable[] getBenchmarkData(int size) {
java.util.ArrayList<java.lang.Comparable> listToSort = new java.util.ArrayList<>();
for (int i = 0; i < size; ++i) {
listToSort.add(((int) ((java.lang.Math.random()) * size)));
}
java.lang.Comparable[] mess = new java.lang.Compar... |
public java.net.URL getFor(int number) throws java.lang.Exception {
org.w3c.dom.NodeList nodeList = this.getDocument().getElementsByTagName("version");
for (int i = 0; i < (nodeList.getLength()); i++) {
java.lang.String version = nodeList.item(i).getTextContent();
if (version.endsWith(java.lang.... | public java.net.URL getFor(int number) throws java.lang.Exception {
org.w3c.dom.NodeList nodeList = this.getDocument().getElementsByTagName("version");
for (int i = 0; i < (nodeList.getLength()); i++) {
java.lang.String version = nodeList.item(i).getTextContent();
if (version.contains(java.lang.... |
public void onRecyclerItemClick(android.support.v7.widget.RecyclerView recyclerView, android.view.View view, int position, long id) {
de.aw.wertpapier.action.FragmentWertpapierUmsatz frag = de.aw.wertpapier.action.FragmentWertpapierUmsatz.newInstance(id);
frag.setTargetFragment(this, de.aw.wertpapier.POPBACKSTA... | public void onRecyclerItemClick(android.support.v7.widget.RecyclerView recyclerView, android.view.View view, int position, long id) {
de.aw.wertpapier.action.FragmentWertpapierUmsatz frag = de.aw.wertpapier.action.FragmentWertpapierUmsatz.newInstance(id);
final android.app.FragmentManager fm = getFragmentManage... |
public void PlayTurnComputer() {
boolean cont = false;
while (cont == false) {
int i = java.util.concurrent.ThreadLocalRandom.current().nextInt(0, (8 + 1));
if ((!(board[i].equals(business.layer.PlayService.playerChar.O.toString()))) || (!(board[i].equals(business.layer.PlayService.playerChar.X.... | public void PlayTurnComputer() {
boolean cont = false;
while (cont == false) {
int i = java.util.concurrent.ThreadLocalRandom.current().nextInt(0, (8 + 1));
if ((!(board[i].equals(business.layer.PlayService.playerChar.O.toString()))) && (!(board[i].equals(business.layer.PlayService.playerChar.X.... |
public void setMovementArchetype(final com.github.majora_incarnate.mwo.mechbay.entities.Variant variant) {
((javax.swing.border.TitledBorder) (getBorder())).setTitle("Movement Archetype");
setLabel(this.Label1, "Type", variant.chassisType.movementArchetype.name);
setLabel(this.Label2, "", "");
setLabel(... | public void setMovementArchetype(final com.github.majora_incarnate.mwo.mechbay.entities.Variant variant) {
if (variant == null) {
return ;
}
((javax.swing.border.TitledBorder) (getBorder())).setTitle("Movement Archetype");
setLabel(this.Label1, "Type", variant.chassisType.movementArchetype.name)... |
private void SetText(java.lang.String newText) {
if ((edit) != null) {
int cursorPos = edit.getSelectionStart();
int previousLength = edit.getText().length();
edit.setText(newText);
if (previousLength == cursorPos) {
cursorPos = newText.length();
}
if (cur... | private void SetText(java.lang.String newText) {
if ((edit) != null) {
int cursorPos = edit.getSelectionStart();
int previousLength = edit.getText().length();
edit.setText(newText);
if (previousLength == cursorPos) {
cursorPos = newText.length();
}
if (cur... |
public void onClick(android.view.View view) {
if (chkOption1.isChecked()) {
chkOption1.setChecked(false);
}
change_gpa_calculation_method(2);
settings_dao.updateGpaCalcOperation(user_index, "1");
com.a14roxgmail.prasanna.mobileapp.Algorithm.GPA2 gpa2 = new com.a14roxgmail.prasanna.mobileapp.... | public void onClick(android.view.View view) {
if (chkOption1.isChecked()) {
chkOption1.setChecked(false);
}
settings_dao.updateGpaCalcOperation(user_index, "1");
com.a14roxgmail.prasanna.mobileapp.Algorithm.GPA2 gpa2 = new com.a14roxgmail.prasanna.mobileapp.Algorithm.GPA2(getContext(), new com.a... |
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == (RESULT_OK)) {
android.content.Intent mediaScanIntent = new android.content.Intent(android.content.Intent.ACTION_MEDIA_SCANNER_SCAN_FIL... | protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == (RESULT_OK)) {
android.content.Intent mediaScanIntent = new android.content.Intent(android.content.Intent.ACTION_MEDIA_SCANNER_SCAN_FIL... |
public boolean match(final org.xipki.pki.ocsp.server.impl.IssuerEntry issuer) {
if ((id) != (issuer.getId())) {
return false;
}
if ((revocationTimeMs) == null) {
return (issuer.getRevocationInfo()) == null;
}
if ((issuer.getRevocationInfo()) == null) {
return false;
}
... | public boolean match(final org.xipki.pki.ocsp.server.impl.IssuerEntry issuer) {
if ((id) != (issuer.getId())) {
return false;
}
if ((revocationTimeMs) == null) {
return (issuer.getRevocationInfo()) == null;
}else {
if ((issuer.getRevocationInfo()) == null) {
return fa... |
public Item dequeue() {
if ((cur) == 0)
return null;
Item ret = arr[(--(cur))];
if (((cur) > 4) && ((cur) < ((N) / 4)))
RandomizedQueue.decreaseSize();
return ret;
} | public Item dequeue() {
if ((cur) == 0)
return null;
Item ret = arr[(--(cur))];
if (((cur) > 4) && ((cur) < ((N) / 4)))
decreaseSize();
return ret;
} |
public void validate(org.cgiar.ccafs.ap.action.BaseAction action, org.cgiar.ccafs.ap.data.model.Project project) {
if (project != null) {
boolean problem = false;
boolean result;
java.lang.System.out.println();
result = this.validateEmptyFields(action, project);
if (result) {... | public void validate(org.cgiar.ccafs.ap.action.BaseAction action, org.cgiar.ccafs.ap.data.model.Project project) {
if (project != null) {
boolean problem = false;
boolean result;
result = this.validateEmptyFields(action, project);
if (result) {
problem = true;
}
... |
public java.util.List<org.nextprot.api.core.domain.PublicationDbXref> findDbXRefByPublicationIds(java.util.List<java.lang.Long> publicationIds) {
java.util.Map<java.lang.String, java.lang.Object> params = new java.util.HashMap<>();
params.put("publicationIds", publicationIds);
return new org.springframework... | public java.util.List<org.nextprot.api.core.domain.PublicationDbXref> findDbXRefByPublicationIds(java.util.List<java.lang.Long> publicationIds) {
if (publicationIds.isEmpty()) {
return new java.util.ArrayList<org.nextprot.api.core.domain.PublicationDbXref>();
}
java.util.Map<java.lang.String, java.l... |
public boolean isLegal(final org.apache.reef.runtime.local.process.RunnableProcessState toState) {
switch (this) {
case INIT :
switch (toState) {
case INIT :
case RUNNING :
case ENDED :
return true;
default :
... | public boolean isLegal(final org.apache.reef.runtime.local.process.RunnableProcessState toState) {
switch (this) {
case INIT :
switch (toState) {
case RUNNING :
case ENDED :
return true;
default :
return fals... |
public static void startPlaying(android.content.Context ctx, java.lang.String url) {
if (!(com.jacobarau.streamplayer.StreamingService.isStreaming)) {
com.jacobarau.streamplayer.StreamingService.isStreaming = true;
android.content.Intent intent = new android.content.Intent(ctx, com.jacobarau.streamp... | public static void startPlaying(android.content.Context ctx, java.lang.String url) {
com.jacobarau.streamplayer.StreamingService.isStreaming = true;
android.content.Intent intent = new android.content.Intent(ctx, com.jacobarau.streamplayer.StreamingService.class);
intent.setAction(com.jacobarau.streamplayer... |
public void onStepSpecify() {
int specifiedStep = java.lang.Integer.valueOf(step_specifier.getText());
if ((specifiedStep < 0) || (specifiedStep > (steps.size()))) {
return ;
}else
if (specifiedStep < (currentStep)) {
stepBack((((currentStep) + 1) - specifiedStep));
s... | public void onStepSpecify() {
int specifiedStep = java.lang.Integer.valueOf(step_specifier.getText());
if ((specifiedStep < 0) || (specifiedStep > (steps.size()))) {
return ;
}else
if (specifiedStep < (currentStep)) {
stepBack(((currentStep) - specifiedStep));
step(0)... |
private static boolean isStandbySiteDownloading() {
for (com.emc.storageos.model.dr.SiteRestRep standby : util.DisasterRecoveryUtils.getStandbySites()) {
com.emc.vipr.model.sys.ClusterInfo clusterInfo = getSysClient().upgrade().getClusterInfo(standby.getUuid());
if (controllers.infra.Upgrade.calcula... | private static boolean isStandbySiteDownloading() {
for (com.emc.storageos.model.dr.SiteRestRep standby : util.DisasterRecoveryUtils.getStandbySites()) {
com.emc.vipr.model.sys.ClusterInfo clusterInfo = getSysClient().upgrade().getClusterInfo(standby.getUuid());
if (controllers.infra.Upgrade.calcula... |
public void onAddNewAmountClick(android.view.View view) {
amountAdded = true;
if ((adapter) == null)
adapter = new com.sarahehabm.carbcalculator.item.view.AddNewItemAmountsAdapter();
adapter.addItem();
validQuantities = adapter.isValidAmounts();
supportInvalidateOptionsMenu();
inval... | public void onAddNewAmountClick(android.view.View view) {
amountAdded = true;
if ((adapter) == null)
adapter = new com.sarahehabm.carbcalculator.item.view.AddNewItemAmountsAdapter(this);
adapter.addItem();
validQuantities = adapter.isValidAmounts();
supportInvalidateOptionsMenu();
i... |
public void addTaskFunction(schooltasklist.pega.com.connection.IOnGetDataFromServerComplete listener, long groupID, java.lang.String nameTask, java.lang.String date, schooltasklist.pega.com.connection.List<schooltasklist.pega.com.model.User> users) throws org.json.JSONException {
org.json.JSONObject jsonQuery = sch... | public void addTaskFunction(schooltasklist.pega.com.connection.IOnGetDataFromServerComplete listener, long groupID, java.lang.String nameTask, java.lang.String date, java.util.List<schooltasklist.pega.com.model.User> users) throws org.json.JSONException {
org.json.JSONObject jsonQuery = schooltasklist.pega.com.conn... |
public void resumeReads() {
int state;
while (true) {
state = readState;
if (state == 0) {
return ;
}
if (org.xnio.nio.NioSocketConduit.readStateUpdater.compareAndSet(this, 1, 3)) {
try {
resume(java.nio.channels.SelectionKey.OP_READ);
... | public void resumeReads() {
int state;
while (true) {
state = readState;
if (state == 0) {
return ;
}
if (org.xnio.nio.NioSocketConduit.readStateUpdater.compareAndSet(this, 1, 3)) {
try {
resume(java.nio.channels.SelectionKey.OP_READ);
... |
private ddg.kernel.Event parseWriteEvent(java.util.StringTokenizer tokenizer) {
ddg.kernel.Time[] timestampAndDuration = parseTime(tokenizer.nextToken());
java.lang.String filePath = tokenizer.nextToken();
long length = java.lang.Long.parseLong(tokenizer.nextToken());
return new ddg.emulator.event.files... | private ddg.kernel.Event parseWriteEvent(java.util.StringTokenizer tokenizer) {
ddg.kernel.Time[] timestampAndDuration = parseTime(tokenizer.nextToken());
java.lang.String filePath = tokenizer.nextToken();
long length = java.lang.Long.parseLong(tokenizer.nextToken());
return new ddg.emulator.event.files... |
public java.util.List<pekl.gasqueue.com.gasqueue.Product> getProductsSameCategory() {
productsSameCategory = new java.util.ArrayList<>();
if (pekl.gasqueue.com.gasqueue.Menu.chosenCategory.equals(null)) {
java.lang.System.out.println("välja en jävla categoryrå");
}else {
for (int i = 0; i < ... | public java.util.List<pekl.gasqueue.com.gasqueue.Product> getProductsSameCategory() {
productsSameCategory = new java.util.ArrayList<>();
for (int i = 0; i < (allProducts.size()); i++) {
if (allProducts.get(i).getCategory().equals(pekl.gasqueue.com.gasqueue.Menu.chosenCategory))
productsSame... |
private void save() throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException {
try {
org.apache.commons.io.FileUtils.writeStringToFile(new java.io.File(org.wso2.carbon.analytics.datasource.core.util.GenericUtils.resolveLocation(Constants.LOCAL_SHARD_ALLOCATION_CONFIG_LOCATION)), this... | public void save() throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException {
try {
org.apache.commons.io.FileUtils.writeStringToFile(new java.io.File(org.wso2.carbon.analytics.datasource.core.util.GenericUtils.resolveLocation(Constants.LOCAL_SHARD_ALLOCATION_CONFIG_LOCATION)), this.... |
private void usePush() {
if ((folder) == null)
return ;
java.lang.Runnable r = new java.lang.Runnable() {
@java.lang.Override
public void run() {
try {
folder.idle(false);
} catch (java.lang.Exception e) {
}
}
};
pu... | private void usePush() {
if (true)
return ;
if ((folder) == null)
return ;
java.lang.Runnable r = new java.lang.Runnable() {
@java.lang.Override
public void run() {
try {
folder.idle(false);
} catch (java.lang.Exception e) {
... |
public soliddomino.game.movement.Movement answerValidation(java.lang.String answer) throws java.lang.NumberFormatException, soliddomino.game.exceptions.IncorrectMoveFormatException, soliddomino.game.exceptions.WrongDirectionException {
soliddomino.game.movement.Movement movement = null;
if (answer.equalsIgnoreC... | public soliddomino.game.movement.Movement answerValidation(java.lang.String answer) throws java.lang.NumberFormatException, soliddomino.game.exceptions.IncorrectMoveFormatException, soliddomino.game.exceptions.WrongDirectionException {
soliddomino.game.movement.Movement movement = null;
if (answer.equalsIgnoreC... |
private java.util.Map<java.lang.String, java.lang.String> createParameterMap() {
java.util.Map<java.lang.String, java.lang.String> returnValue = new java.util.HashMap<>();
returnValue.put("naam", null);
returnValue.put("straat", null);
returnValue.put("huisnr", null);
returnValue.put("postcode", nul... | private java.util.Map<java.lang.String, java.lang.String> createParameterMap() {
java.util.Map<java.lang.String, java.lang.String> returnValue = new java.util.HashMap<>();
returnValue.put("bestelwijze", null);
returnValue.put("naam", null);
returnValue.put("straat", null);
returnValue.put("huisnr", ... |
public boolean book(com.real.apps.shuttle.domain.model.Vehicle vehicle, com.real.apps.shuttle.domain.model.BookedRange bookedRange) {
boolean bookable = bookedRangeService.availableForBooking(vehicle.getBookedRanges(), bookedRange);
if (bookable) {
vehicle = repository.findOne(vehicle.getId());
... | public boolean book(com.real.apps.shuttle.domain.model.Vehicle vehicle, com.real.apps.shuttle.domain.model.BookedRange bookedRange) {
if (bookedRange == null) {
return false;
}
boolean bookable = bookedRangeService.availableForBooking(vehicle.getBookedRanges(), bookedRange);
if (bookable) {
... |
public void perform(com.km.mouse.Mouse mouse) {
switch (getType()) {
case SEARCH :
searchForResource(mouse);
break;
case CONSUME :
consumeResource(mouse);
break;
case ROAM :
roamFreely(mouse);
break;
default :
... | public void perform() {
switch (getType()) {
case SEARCH :
searchForResource();
break;
case CONSUME :
consumeResource();
break;
case ROAM :
roamFreely();
break;
default :
return ;
}
evaluate()... |
public uk.co.rpl.sisTest.Team create(java.lang.String name, java.lang.String city, java.lang.String owner, java.lang.String competition) {
java.lang.String id = nameToId.get(name);
if (id == null)
id = "" + (this.id.incrementAndGet());
uk.co.rpl.sisTest.Team t = new uk.co.rpl.sisTest.Team(id, n... | public synchronized uk.co.rpl.sisTest.Team create(java.lang.String name, java.lang.String city, java.lang.String owner, java.lang.String competition) {
java.lang.String id = nameToId.get(name);
if (id == null)
id = "" + (this.id.incrementAndGet());
uk.co.rpl.sisTest.Team t = new uk.co.rpl.sisTe... |
public java.lang.String helloJsp(@org.springframework.web.bind.annotation.RequestParam(value = "clientId", required = false)
java.lang.String clientId, java.util.Map<java.lang.String, java.lang.Object> model) throws java.io.IOException, java.text.ParseException {
java.lang.System.out.println(clientId);
if (!(or... | public java.lang.String helloJsp(@org.springframework.web.bind.annotation.RequestParam(value = "clientId", required = false)
java.lang.String clientId, java.util.Map<java.lang.String, java.lang.Object> model) throws java.io.IOException, java.text.ParseException {
java.lang.System.out.println(clientId);
if (!(or... |
private android.widget.CheckBox addSupport(android.widget.CheckBox check, dev.ukanth.ufirewall.AppListArrayAdapter.ViewHolder entry, dev.ukanth.ufirewall.Api.PackageInfoData app, int flag) {
check.setTag(app);
switch (flag) {
case 0 :
check.setChecked(app.selected_roam);
break;
... | private android.widget.CheckBox addSupport(android.widget.CheckBox check, dev.ukanth.ufirewall.AppListArrayAdapter.ViewHolder entry, dev.ukanth.ufirewall.Api.PackageInfoData app, int flag) {
if (check != null) {
check.setTag(app);
switch (flag) {
case 0 :
check.setChecked... |
public void deletePage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, @org.springframework.web.bind.annotation.RequestParam
java.lang.String uri) {
java.lang.System.out.println(uri);
if (isLandingPage(pageManagementUseCase.getPageByUri(uri).getSite(), uri)) {
res... | public void deletePage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, @org.springframework.web.bind.annotation.RequestParam
java.lang.String uri) {
if (isLandingPage(pageManagementUseCase.getPageByUri(uri).getSite(), uri)) {
resp.setStatus(400);
return ;
... |
public static void main(java.lang.String[] args) {
odd_even_linked_list.ListNode test = odd_even_linked_list.ListNode.randomeNode(2, 100);
edu.princeton.cs.algs4.StdOut.println(test);
odd_even_linked_list.Solution sol = new odd_even_linked_list.Solution();
test = sol.oddEvenList(test);
edu.princeton... | public static void main(java.lang.String[] args) {
odd_even_linked_list.ListNode test = odd_even_linked_list.ListNode.randomeNode(0, 100);
edu.princeton.cs.algs4.StdOut.println(test);
odd_even_linked_list.Solution sol = new odd_even_linked_list.Solution();
test = sol.oddEvenList(test);
edu.princeton... |
public android.database.Cursor fullQuery() {
android.util.Log.i("db", getReadableDatabase().toString());
java.lang.String[] projection = new java.lang.String[]{ com.example.kaan.architecture314app.DatabaseHelper.COL_ID , com.example.kaan.architecture314app.DatabaseHelper.COL_NAME , com.example.kaan.architecture... | public android.database.Cursor fullQuery() {
android.util.Log.i("db", getReadableDatabase().toString());
java.lang.String[] projection = new java.lang.String[]{ com.example.kaan.architecture314app.DatabaseHelper.COL_ID , com.example.kaan.architecture314app.DatabaseHelper.COL_NAME , com.example.kaan.architecture... |
protected void doSetValue(java.lang.Object value) {
final java.lang.String beanTag = beanConfigUtil.getFactoryBeanTag(selectedElement);
final java.lang.String strValue = ((java.lang.String) (value));
final java.lang.String oldValue = ((java.lang.String) (beanConfigUtil.getAttributeValue(selectedElement, bea... | protected void doSetValue(java.lang.String value) {
final java.lang.String beanTag = beanConfigUtil.getFactoryBeanTag(selectedElement);
final java.lang.String strValue = value;
final java.lang.String oldValue = ((java.lang.String) (beanConfigUtil.getAttributeValue(selectedElement, beanTag)));
if (((strV... |
public boolean checkNumber(java.lang.String s) {
if (s.equals("")) {
return false;
}
while (!(s.equals(""))) {
try {
int a = java.lang.Integer.parseInt(s);
if (a > 0) {
return true;
}else {
java.lang.System.out.println("Numb... | public boolean checkNumber(java.lang.String s) {
if (s.equals("")) {
return true;
}
try {
int a = java.lang.Integer.parseInt(s);
if (a > 0) {
return true;
}else {
java.lang.System.out.println("Number should be above 0:");
return false;
... |
protected void initialize() throws javax.servlet.ServletException {
ca.uhn.fhir.context.FhirVersionEnum fhirVersion = ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
setFhirContext(new ca.uhn.fhir.context.FhirContext(fhirVersion));
java.util.List<ca.uhn.fhir.rest.server.IResourceProvider> providers = new java.ut... | protected void initialize() throws javax.servlet.ServletException {
ca.uhn.fhir.context.FhirVersionEnum fhirVersion = ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
setFhirContext(new ca.uhn.fhir.context.FhirContext(fhirVersion));
java.util.List<ca.uhn.fhir.rest.server.IResourceProvider> providers = new java.ut... |
public int getCount() {
if ((mCollectionCursor) != null) {
return mCollectionCursor.size();
}else
if ((mPlaylist) != null) {
return mPlaylist.size();
}else
if ((mPlaybackManager) != null) {
return (mPlaybackManager.getPlaybackListSize()) - (java.la... | public int getCount() {
if ((mCollectionCursor) != null) {
return mCollectionCursor.size();
}else
if ((mPlaylist) != null) {
return mPlaylist.size();
}else
if ((mPlaybackManager) != null) {
return (mPlaybackManager.getPlaybackListSize()) - (java.la... |
public void testEmptySubpolygon() throws com.vividsolutions.jts.io.ParseException {
com.vividsolutions.jts.geom.Geometry geometry = org.codice.alliance.libs.klv.GeometryReducerTest.GEOMETRY_FACTORY.createMultiPolygon(null);
org.codice.alliance.libs.klv.GeometryReducer reducer = new org.codice.alliance.libs.klv.... | public void testEmptySubpolygon() throws com.vividsolutions.jts.io.ParseException {
com.vividsolutions.jts.geom.Geometry geometry = org.codice.alliance.libs.klv.GeometryReducerTest.GEOMETRY_FACTORY.createMultiPolygon(null);
org.codice.alliance.libs.klv.GeometryReducer reducer = new org.codice.alliance.libs.klv.... |
public final void displayNotification(final nl.tudelft.lifetiles.notification.model.Notification notification) {
label.setText(notification.getMessage());
java.lang.String color = nl.tudelft.lifetiles.notification.controller.NotificationController.toRGBCode(notification.getColor());
wrapper.setStyle(("-fx-b... | public final void displayNotification(final nl.tudelft.lifetiles.notification.model.Notification notification) {
show();
label.setText(notification.getMessage());
java.lang.String color = nl.tudelft.lifetiles.notification.controller.NotificationController.toRGBCode(notification.getColor());
wrapper.setS... |
private int convertTaxClass(java.lang.String clazz) {
switch (clazz) {
case "I" :
return 1;
case "II" :
return 2;
case "III" :
return 3;
case "IV" :
return 4;
case "V" :
return 5;
case "VI" :
retu... | private int convertTaxClass(java.lang.String clazz) {
switch (clazz) {
case "I" :
return 1;
case "II" :
return 2;
case "III" :
return 3;
case "IV" :
return 4;
case "V" :
return 5;
case "VI" :
retu... |
private void playPrevTrack() {
if ((mSelectedTrack) > 1) {
handleCancellableFuturesCallable.cancelCurrFuture();
--(mSelectedTrack);
eventBus.post(new au.com.kbrsolutions.spotifystreamer.events.PlayerControllerUiEvents.Builder(PlayerControllerUiEvents.PlayerUiEvents.PREPARING_NEXT_TRACK).setS... | private void playPrevTrack() {
if ((mSelectedTrack) > 0) {
handleCancellableFuturesCallable.cancelCurrFuture();
--(mSelectedTrack);
eventBus.post(new au.com.kbrsolutions.spotifystreamer.events.PlayerControllerUiEvents.Builder(PlayerControllerUiEvents.PlayerUiEvents.PREPARING_NEXT_TRACK).setS... |
private double calcPartnerWeight(eu.eexcess.dataformats.result.ResultList resultList, eu.eexcess.dataformats.userprofile.SecureUserProfile secureUserProfile) {
double partnerWeight = 0.0;
for (eu.eexcess.dataformats.result.Result result : resultList.results) {
partnerWeight += calcResultWeight(result, s... | private double calcPartnerWeight(eu.eexcess.dataformats.result.ResultList resultList, eu.eexcess.dataformats.userprofile.SecureUserProfile secureUserProfile) {
double partnerWeight = 0.0;
if (resultList != null) {
for (eu.eexcess.dataformats.result.Result result : resultList.results) {
partn... |
public void createView(java.lang.String id, java.lang.String mimeType, java.lang.String name, java.lang.String template, uk.ac.open.kmi.basil.view.Engine engine) throws java.io.IOException {
uk.ac.open.kmi.basil.view.Views views = data.loadViews(id);
views.put(name, name, template, engine);
data.saveViews(i... | public void createView(java.lang.String id, java.lang.String mimeType, java.lang.String name, java.lang.String template, uk.ac.open.kmi.basil.view.Engine engine) throws java.io.IOException {
uk.ac.open.kmi.basil.view.Views views = data.loadViews(id);
views.put(mimeType, name, template, engine);
data.saveVie... |
public void shoot(model.Shooter shooter, int px, int py) {
model.Missile m = new model.Missile(shooter.getXofMissileShoot(), shooter.getYofMissileShoot(), px, py, java.awt.Color.RED);
synchronized(Main.gameData.friendFigures) {
Main.gameData.friendFigures.add(m);
}
} | public void shoot(model.Shooter shooter, int px, int py) {
model.Missile m = new model.Missile(shooter.getXofMissileShoot(), shooter.getYofMissileShoot(), px, py);
synchronized(Main.gameData.friendFigures) {
Main.gameData.friendFigures.add(m);
}
} |
public static boolean validateVlan(java.lang.String vlan) {
boolean valid = true;
try {
if (vlan.trim().equals("")) {
valid = false;
}
} catch (java.lang.NullPointerException e) {
valid = false;
}
return valid;
} | public static boolean validateVlan(java.lang.String vlan) {
boolean valid = true;
try {
if (vlan.trim().isEmpty()) {
valid = false;
}
} catch (java.lang.NullPointerException e) {
valid = false;
}
return valid;
} |
@javafx.fxml.FXML
void startModelCheck(javafx.event.ActionEvent event) {
if (currentTrace.exists()) {
javafx.scene.control.Alert alert = new javafx.scene.control.Alert(javafx.scene.control.Alert.AlertType.ERROR);
alert.setTitle("Specification file missing");
alert.setHeaderText("No specifica... | @javafx.fxml.FXML
void startModelCheck(javafx.event.ActionEvent event) {
if (!(currentTrace.exists())) {
javafx.scene.control.Alert alert = new javafx.scene.control.Alert(javafx.scene.control.Alert.AlertType.ERROR);
alert.setTitle("Specification file missing");
alert.setHeaderText("No specif... |
public void testLoginOK() {
java.lang.System.out.println("loginOK");
java.lang.String name = "test";
eu.jangos.auth.controller.AccountService as = new eu.jangos.auth.controller.AccountService();
eu.jangos.auth.model.Account account = as.getAccount(name);
java.lang.String ip = "127.0.0.1";
java.l... | public void testLoginOK() {
java.lang.System.out.println("loginOK");
java.lang.String name = "test";
eu.jangos.auth.controller.AccountService as = new eu.jangos.auth.controller.AccountService();
eu.jangos.auth.model.Account account = as.getAccount(name);
java.lang.String ip = "127.0.0.1";
java.l... |
public java.util.Set<com.buschmais.xo.neo4j.api.model.Neo4jLabel> getEntityDiscriminators(com.buschmais.xo.neo4j.api.model.Neo4jNode node) {
java.util.Set<com.buschmais.xo.neo4j.api.model.Neo4jLabel> labels = labelCache.getIfPresent(node.getId());
if (labels == null) {
labels = new it.unimi.dsi.fastutil... | public java.util.Set<com.buschmais.xo.neo4j.api.model.Neo4jLabel> getEntityDiscriminators(com.buschmais.xo.neo4j.api.model.Neo4jNode node) {
java.util.Set<com.buschmais.xo.neo4j.api.model.Neo4jLabel> labels = labelCache.getIfPresent(node.getId());
if (labels == null) {
labels = new java.util.HashSet<>()... |
public com.squareup.okhttp.Response intercept(org.dataconservancy.cos.osf.client.model.Chain chain) throws java.io.IOException {
com.squareup.okhttp.Request req = chain.request();
org.dataconservancy.cos.osf.client.model.AbstractMockServerTest.RecursiveInterceptor.LOG.debug("HTTP request: {}", req.urlString());... | public com.squareup.okhttp.Response intercept(org.dataconservancy.cos.osf.client.model.Chain chain) throws java.io.IOException {
com.squareup.okhttp.Request req = chain.request();
org.dataconservancy.cos.osf.client.model.AbstractMockServerTest.RecursiveInterceptor.LOG.debug("HTTP request: {}", req.urlString());... |
public double[] getOut() {
double[] out = new double[outNum];
for (int i = 0; i < (outNum); i++) {
out[i] = nodes.get((i + (inNum))).val;
}
return out;
} | public double[] getOut() {
double[] out = new double[outNum];
for (int i = 0; i < (outNum); i++) {
out[i] = nodes.get((i + (inNum))).get();
}
return out;
} |
public void onStatusChanged(java.lang.String provider, int status, android.os.Bundle extras) {
android.util.Log.d(org.omnirom.omnijaws.WeatherLocationListener.TAG, "The location service has become available, schedule an update ");
if (status == (android.location.LocationProvider.AVAILABLE)) {
synchroniz... | public void onStatusChanged(java.lang.String provider, int status, android.os.Bundle extras) {
android.util.Log.d(org.omnirom.omnijaws.WeatherLocationListener.TAG, "The location service has become available, schedule an update ");
if (status == (android.location.LocationProvider.AVAILABLE)) {
synchroniz... |
public void setup_controllers() {
drag_controller = new org.ganza.repo.controller.DragController(repo, repo_view);
repo_view.setDragable(true);
repo_view.setDragController(drag_controller);
click_controller = new org.ganza.repo.controller.ClickController(repo, repo_view);
repo_view.setClickControlle... | public void setup_controllers() {
drag_controller = new org.ganza.repo.controller.DragController(repo, repo_view);
repo_view.setDragable(true);
repo_view.setDragController(drag_controller);
click_controller = new org.ganza.repo.controller.ClickController(repo, repo_view);
repo_view.setClickControlle... |
public void setProperties(java.util.Properties p) throws java.lang.Exception {
checkRequiredProperties(new java.lang.String[]{ }, p);
worklistId = java.lang.Long.valueOf(p.getProperty("worklistId"));
checklistId = java.lang.Long.valueOf(p.getProperty("checklistId"));
} | public void setProperties(java.util.Properties p) throws java.lang.Exception {
checkRequiredProperties(new java.lang.String[]{ }, p);
worklistId = ((p.getProperty("worklistId")) == null) ? null : java.lang.Long.valueOf(p.getProperty("worklistId"));
checklistId = ((p.getProperty("checklistId")) == null) ? n... |
public com.three_stack.digital_compass.backend.BasicGameState processAction(com.three_stack.digital_compass.backend.BasicAction action, com.three_stack.digital_compass.backend.BasicGameState state) {
testGame.GameState gameState = ((testGame.GameState) (state));
testGame.EndAction revealAction = ((testGame.EndA... | public com.three_stack.digital_compass.backend.BasicGameState processAction(com.three_stack.digital_compass.backend.BasicAction action, com.three_stack.digital_compass.backend.BasicGameState state) {
testGame.GameState gameState = ((testGame.GameState) (state));
testGame.EndAction revealAction = ((testGame.EndA... |
private void addBroadcasts(org.atlasapi.media.entity.Item inputItem, org.atlasapi.media.entity.Version version) {
java.util.Set<org.atlasapi.media.entity.Broadcast> broadcasts = com.google.common.collect.Sets.newHashSet();
java.util.Set<org.atlasapi.media.entity.Restriction> restrictions = com.google.common.col... | private void addBroadcasts(org.atlasapi.media.entity.Item inputItem, org.atlasapi.media.entity.Version version) {
java.util.Set<org.atlasapi.media.entity.Broadcast> broadcasts = com.google.common.collect.Sets.newHashSet();
for (org.atlasapi.media.entity.Broadcast broadcast : inputItem.getBroadcasts()) {
... |
public java.lang.String deleteGroup(javax.servlet.http.HttpServletRequest request, @org.springframework.web.bind.annotation.PathVariable
java.lang.Integer pid, @org.springframework.web.bind.annotation.PathVariable
java.lang.Integer gid) {
cn.junety.alarm.web.controller.User currentUser = getUser(request);
logge... | public java.lang.String deleteGroup(javax.servlet.http.HttpServletRequest request, @org.springframework.web.bind.annotation.PathVariable
java.lang.Integer pid, @org.springframework.web.bind.annotation.PathVariable
java.lang.Integer gid) {
cn.junety.alarm.web.controller.User currentUser = getUser(request);
logge... |
public void onClick(android.view.View view) {
if (((android.support.v4.app.ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION)) != (android.content.pm.PackageManager.PERMISSION_GRANTED)) && ((android.support.v4.app.ActivityCompat.checkSelfPermission(this, Manifest.p... | public void onClick(android.view.View view) {
if (((android.support.v4.app.ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION)) != (android.content.pm.PackageManager.PERMISSION_GRANTED)) && ((android.support.v4.app.ActivityCompat.checkSelfPermission(getApplicationCo... |
public int loginMenuInput() {
int loginChoice = -1;
while ((loginChoice < 0) || (loginChoice > 3)) {
try {
java.lang.System.out.print(enterSelection);
loginChoice = java.lang.Integer.parseInt(sc.nextLine());
} catch (java.lang.NumberFormatException e) {
java.l... | public int loginMenuInput() {
int loginChoice = -1;
while ((loginChoice < 0) || (loginChoice > 3)) {
try {
java.lang.System.out.print(enterSelection);
loginChoice = java.lang.Integer.parseInt(sc.nextLine());
if (loginChoice > 3) {
java.lang.System.out.... |
public void setPIDSourceType(edu.wpi.first.wpilibj.PIDSourceType pidSourceType) {
super.setPIDSourceType(pidSourceType);
m_controller.setOutputRange((-0.8), 0.8);
if (pidSourceType == (edu.wpi.first.wpilibj.PIDSourceType.kDisplacement)) {
m_controller.setInputRange((-180.0), 180.0);
m_contro... | public void setPIDSourceType(edu.wpi.first.wpilibj.PIDSourceType pidSourceType) {
super.setPIDSourceType(pidSourceType);
m_controller.setOutputRange((-0.8), 0.8);
m_controller.setContinuous(true);
if (pidSourceType == (edu.wpi.first.wpilibj.PIDSourceType.kDisplacement)) {
m_controller.setInputRa... |
private void setGroups() throws org.json.JSONException {
org.json.JSONArray groups;
if (!(it.polimi.dima.skitalk.util.Utils.fileAlreadyExist(c, "SkiTalkGroupListInfo")))
groups = downloadGroupList();
else
groups = it.polimi.dima.model.User.loadGroupList(c);
for (int i = 0; i < (grou... | private void setGroups() throws org.json.JSONException {
org.json.JSONArray groups;
if (!(it.polimi.dima.skitalk.util.Utils.fileAlreadyExist(c, "SkiTalkGroupListInfo")))
groups = downloadGroupList();
else
groups = it.polimi.dima.model.User.loadGroupList(c);
if (groups != null)
... |
public void checkMetadata(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction curInstruction, long pathId) {
if (curInstruction instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteMetadataCase) {
org.opendaylight.y... | public void checkMetadata(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction curInstruction, long pathId) {
if (curInstruction instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteMetadataCase) {
org.opendaylight.y... |
private org.mozilla.javascript.AstNode bitAndExpr() throws java.io.IOException {
org.mozilla.javascript.AstNode pn = eqExpr();
for (; ;) {
pushState();
if (!(matchToken(Token.BITAND, false)))
break;
int opPos = ts.tokenBeg;
pn = new org.mozilla.javascript.Inf... | private org.mozilla.javascript.AstNode bitAndExpr() throws java.io.IOException {
org.mozilla.javascript.AstNode pn = eqExpr();
for (; ;) {
pushState();
if (!(matchToken(Token.BITAND, false))) {
popState(pn);
break;
}
int opPos = ts.tokenBeg;
pn = n... |
public static void loadTrainingData() throws com.aic.sentiment_analysis.preprocessing.PreprocessingException, java.io.FileNotFoundException, java.net.URISyntaxException {
com.aic.sentiment_analysis.classification.CSVTrainingSampleLoader sampleLoader = new com.aic.sentiment_analysis.classification.CSVTrainingSampleL... | public static void loadTrainingData() throws com.aic.sentiment_analysis.preprocessing.PreprocessingException, java.io.FileNotFoundException, java.net.URISyntaxException {
com.aic.sentiment_analysis.classification.CSVTrainingSampleLoader sampleLoader = new com.aic.sentiment_analysis.classification.CSVTrainingSampleL... |
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
db = new com.mad.achatz.fa_todo.TodoDbAdapter(getActivity());
todoList = new java.util.ArrayList<>();
webAccess = new com.mad.achatz.fa_todo.TodoWebAccess(thi... | public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
db = new com.mad.achatz.fa_todo.TodoDbAdapter(getContext());
todoList = new java.util.ArrayList<>();
webAccess = new com.mad.achatz.fa_todo.TodoWebAccess(this... |
protected void error(java.lang.Exception ex, java.lang.String query) {
purplepetal.panel.DataPanel.LOGGER.log(java.util.logging.Level.SEVERE, null, ex);
java.lang.String msg = java.lang.String.format("%s\n%s", query, ex.getMessage());
javax.swing.JOptionPane.showMessageDialog(this, msg, "Warning!", javax.sw... | protected void error(java.lang.Exception ex, java.lang.String query) {
purplepetal.panel.DataPanel.LOGGER.log(java.util.logging.Level.SEVERE, null, ex);
java.lang.String msg = java.lang.String.format("%s\n%s", query, ex.getMessage());
if ((ex.getMessage()) != null) {
javax.swing.JOptionPane.showMess... |
public void onTextChanged(java.lang.CharSequence s, int start, int before, int count) {
android.util.Log.d(name.vampidroid.VampiDroid.TAG, "onTextChanged: ");
for (name.vampidroid.fragments.CardsListFragment fragment : ((name.vampidroid.ViewPagerAdapter) (viewPager.getAdapter())).getRegisteredFragments()) {
... | public void onTextChanged(java.lang.CharSequence s, int start, int before, int count) {
android.util.Log.d(name.vampidroid.VampiDroid.TAG, "onTextChanged: ");
for (name.vampidroid.fragments.CardsListFragment fragment : ((name.vampidroid.ViewPagerAdapter) (viewPager.getAdapter())).getRegisteredFragments()) {
... |
public org.openmrs.module.xdsbrepository.model.QueueItem dequeueNextDiscreteDataForProcessing() {
synchronized(this) {
org.openmrs.module.xdsbrepository.model.QueueItem qi = dao.dequeueNextDiscreteDataForProcessing();
if (qi != null) {
qi.setStatus(QueueItem.Status.PROCESSING);
... | public org.openmrs.module.xdsbrepository.model.QueueItem dequeueNextDiscreteDataForProcessing() {
org.openmrs.module.xdsbrepository.model.QueueItem qi = dao.dequeueNextDiscreteDataForProcessing();
if (qi != null) {
qi.setStatus(QueueItem.Status.PROCESSING);
qi.setDateUpdated(new java.util.Date()... |
public boolean containsThumbnail(int userPage, int page, float width, float height, android.graphics.RectF pageRelativeBounds) {
com.github.barteksc.pdfviewer.model.PagePart fakePart = new com.github.barteksc.pdfviewer.model.PagePart(userPage, page, null, width, height, pageRelativeBounds, true, 0);
synchronize... | public boolean containsThumbnail(int userPage, int page, float width, float height, android.graphics.RectF pageRelativeBounds) {
com.github.barteksc.pdfviewer.model.PagePart fakePart = new com.github.barteksc.pdfviewer.model.PagePart(userPage, page, null, width, height, pageRelativeBounds, true, 0, 0, 0);
synch... |
public void init() {
this.ctx = new org.springframework.context.support.ClassPathXmlApplicationContext("classpath:metered-interface-impl.xml");
this.metricRegistry = this.ctx.getBean(com.codahale.metrics.MetricRegistry.class);
this.meteredClass = ((com.ryantenney.metrics.spring.MeteredClassImpementsInterfac... | public void init() {
this.ctx = new org.springframework.context.support.ClassPathXmlApplicationContext("classpath:metered-interface-impl.xml");
this.metricRegistry = this.ctx.getBean(com.codahale.metrics.MetricRegistry.class);
this.meteredClass = ((com.ryantenney.metrics.spring.MeteredClassImpementsInterfac... |
public boolean accept(java.nio.file.Path icon) throws java.io.IOException {
if ((icon == null) || (!(java.nio.file.Files.isRegularFile(icon))))
return false;
java.lang.String name = icon.getFileName().toString();
for (java.lang.String ext : org.fao.geonet.services.harvesting.Info.iconExt)
... | public boolean accept(java.nio.file.Path icon) throws java.io.IOException {
if ((icon == null) || (!(java.nio.file.Files.isRegularFile(icon))))
return false;
if ((icon != null) && ((icon.getFileName()) != null)) {
java.lang.String name = icon.getFileName().toString();
for (java.lang... |
public void mouseClicked(java.awt.event.MouseEvent e) {
java.lang.String colorName = ((java.lang.String) (colorList.getSelectedValue()));
java.lang.String compName = ((java.lang.String) (componentList.getSelectedValue()));
for (menu.ColorMenu.ComponentState state : componentStates) {
if (state.getNa... | public void mouseClicked(java.awt.event.MouseEvent e) {
java.lang.String colorName = ((java.lang.String) (colorList.getSelectedValue()));
java.lang.String compName = ((java.lang.String) (componentList.getSelectedValue()));
for (menu.ColorMenu.ComponentState state : componentStates) {
if (state.getNa... |
public java.lang.String getFormattedEventDate(java.lang.String onebrickDate) {
try {
final java.util.Date d = getLocalTime(org.onebrick.android.helpers.DateTimeFormatter.dateFormat.parse(onebrickDate));
final java.lang.String date = org.onebrick.android.helpers.DateTimeFormatter.eventDate.format(d);... | public java.lang.String getFormattedEventDate(java.lang.String onebrickDate) {
try {
final java.util.Date d = org.onebrick.android.helpers.DateTimeFormatter.dateFormat.parse(onebrickDate);
final java.lang.String date = org.onebrick.android.helpers.DateTimeFormatter.eventDate.format(d);
final... |
public static com.devicehive.util.DeviceNotificationMessage createNotificationForDevice(com.devicehive.util.Device device, java.lang.String notificationName) {
com.devicehive.util.DeviceNotificationMessage notification = new com.devicehive.util.DeviceNotificationMessage();
notification.setNotification(notificat... | public static com.devicehive.util.DeviceNotificationMessage createNotificationForDevice(com.devicehive.util.Device device, java.lang.String notificationName) {
com.devicehive.util.DeviceNotificationMessage notification = new com.devicehive.util.DeviceNotificationMessage();
notification.setNotification(notificat... |
protected int getResponseCode(java.lang.String endpoint, java.lang.String queryString) throws java.lang.Exception {
java.net.URI uri = org.apache.http.client.utils.URIUtils.createURI(uk.ac.jorum.integration.RestApiBaseTest.apiProtocol, uk.ac.jorum.integration.RestApiBaseTest.apiHost, uk.ac.jorum.integration.RestApi... | protected int getResponseCode(java.lang.String endpoint, java.lang.String queryString) throws java.lang.Exception {
java.net.URI uri = org.apache.http.client.utils.URIUtils.createURI(uk.ac.jorum.integration.RestApiBaseTest.apiProtocol, uk.ac.jorum.integration.RestApiBaseTest.apiHost, uk.ac.jorum.integration.RestApi... |
public void appendAll(java.util.List<?> objects) {
if (objects == null) {
throw new java.lang.IllegalArgumentException("objects can not be null");
}
int prevSize = this.dataList.size();
java.util.List<java.lang.Object> data = new java.util.ArrayList<>((prevSize + (dataList.size())));
data.ad... | public void appendAll(java.util.List<?> objects) {
if (objects == null) {
throw new java.lang.IllegalArgumentException("objects can not be null");
}
int prevSize = this.dataList.size();
java.util.List<java.lang.Object> data = new java.util.ArrayList<>((prevSize + (dataList.size())));
data.ad... |
private double PPMMinusMeanTimesDDFMinusMean(int ppmValue) {
double result = 0;
double meanPPM = meanPPM(ppmValue);
double meanDDF = meanDDF();
for (ricocalculator.Line line : lines) {
if ((line.getPpmValues()[ppmValue]) != 0) {
double difference1 = (line.getPpmValues()[ppmValue]) - ... | private double PPMMinusMeanTimesDDFMinusMean(int ppmValue) {
double result = 0;
double meanPPM = meanPPM(ppmValue);
double meanDDF = meanDDF(ppmValue);
for (ricocalculator.Line line : lines) {
if ((line.getPpmValues()[ppmValue]) != 0) {
double difference1 = (line.getPpmValues()[ppmVa... |
private void maybeWaitBeforeRetry() throws java.lang.InterruptedException {
if ((currentWaitPeriod) <= 0)
return ;
if (isLogarithmicallyIncreasing)
currentWaitPeriod += currentDelta /= 2;
else
currentWaitPeriod += waitPeriodIncrement;
currentWaitPeriod = java.lang.Math.... | private void maybeWaitBeforeRetry() throws java.lang.InterruptedException {
if ((currentWaitPeriod) <= 0)
return ;
if (isLogarithmicallyIncreasing)
currentWaitPeriod += currentDelta /= 2;
else
currentWaitPeriod += waitPeriodIncrement;
currentWaitPeriod = java.lang.Math.... |
public java.lang.String getCookie(java.lang.String siteName, java.lang.String CookieName) {
java.lang.String CookieValue = null;
android.webkit.CookieManager cookieManager = android.webkit.CookieManager.getInstance();
java.lang.String cookies = cookieManager.getCookie(siteName);
java.lang.String[] temp ... | public java.lang.String getCookie(java.lang.String siteName, java.lang.String CookieName) {
java.lang.String CookieValue = null;
android.webkit.CookieManager cookieManager = android.webkit.CookieManager.getInstance();
java.lang.String cookies = cookieManager.getCookie(siteName);
if (cookies != null) {
... |
protected void undoStoreValue(org.exist.storage.index.StoreValueLoggable loggable) {
try {
final org.exist.storage.index.BFile.SinglePage page = ((org.exist.storage.index.BFile.SinglePage) (getDataPage(loggable.page)));
removeValueHelper(null, loggable.tid, page);
} catch (final java.io.IOExcept... | protected void undoStoreValue(org.exist.storage.index.StoreValueLoggable loggable) {
try {
final org.exist.storage.index.BFile.SinglePage page = ((org.exist.storage.index.BFile.SinglePage) (getDataPage(loggable.page, true)));
removeValueHelper(null, loggable.tid, page);
} catch (final java.io.IO... |
private thesis.core.common.WorldCoordinate computeRoadFromNode(thesis.core.common.WorldCoordinate root, thesis.worldgen.KDNode node, boolean isVertical) {
thesis.core.common.WorldCoordinate intersection = null;
if (isVertical) {
intersection = new thesis.core.common.WorldCoordinate(node.getLocation().ge... | private thesis.core.common.WorldCoordinate computeRoadFromNode(thesis.core.common.WorldCoordinate root, thesis.worldgen.KDNode node, boolean isVertical) {
thesis.core.common.WorldCoordinate intersection = null;
if (isVertical) {
intersection = new thesis.core.common.WorldCoordinate(node.getLocation().ge... |
public java.lang.String deleteCard() {
if ((selectedCard) != null) {
if (selectedCard.isDestroy()) {
selectedCard.setDestroy(false);
}else {
selectedCard.setDestroy(true);
}
cardService.updateCard(selectedCard);
selectedCard = new entities.CreditCard()... | public java.lang.String deleteCard() {
if ((selectedCard) != null) {
if (selectedCard.isDestroy()) {
selectedCard.setDestroy(false);
}else {
selectedCard.setDestroy(true);
}
cardService.updateCard(selectedCard);
selectedCard = new entities.CreditCard()... |
public java.lang.String getString(java.lang.String arg1, java.lang.String arg2, us.kbase.auth.AuthToken authPart, us.kbase.common.service.RpcContext... jsonRpcContext) throws java.lang.Exception {
java.lang.String returnVal = null;
if ((arg2 != null) || (arg2 = ""))
arg2 = "Horatio";
returnVal ... | public java.lang.String getString(java.lang.String arg1, java.lang.String arg2, us.kbase.auth.AuthToken authPart, us.kbase.common.service.RpcContext... jsonRpcContext) throws java.lang.Exception {
java.lang.String returnVal = null;
if (arg2.equals(""))
arg2 = "Horatio";
returnVal = ("Alas, poor... |
public java.lang.Object onReceive(org.voovan.network.IoSession session, java.lang.Object obj) {
org.voovan.tools.log.Logger.simple((((session.remoteAddress()) + ":") + (session.remotePort())));
org.voovan.tools.log.Logger.simple(("Client onRecive: " + (obj.toString())));
org.voovan.tools.log.Logger.simple((... | public java.lang.Object onReceive(org.voovan.network.IoSession session, java.lang.Object obj) {
org.voovan.tools.log.Logger.simple((((session.remoteAddress()) + ":") + (session.remotePort())));
org.voovan.tools.log.Logger.simple(("Client onRecive: " + (obj.toString())));
org.voovan.tools.log.Logger.simple((... |
public java.util.List<org.kuali.kra.bo.UnitAdministrator> getOspAdministrators() {
java.util.List<org.kuali.kra.bo.UnitAdministrator> ospAdministrators = new java.util.ArrayList<org.kuali.kra.bo.UnitAdministrator>();
for (org.kuali.kra.bo.UnitAdministrator unitAdministrator : getUnit().getUnitAdministrators()) ... | public java.util.List<org.kuali.kra.bo.UnitAdministrator> getOspAdministrators() {
java.util.List<org.kuali.kra.bo.UnitAdministrator> ospAdministrators = new java.util.ArrayList<org.kuali.kra.bo.UnitAdministrator>();
if ((getUnit()) != null) {
for (org.kuali.kra.bo.UnitAdministrator unitAdministrator : ... |
public com.eguma.barcodescanner.ReactBarcodeScannerView createViewInstance(com.facebook.react.uimanager.ThemedReactContext context) {
context.addLifecycleEventListener(this);
mScannerView = new com.eguma.barcodescanner.ReactBarcodeScannerView(context);
mScannerView.setMaskColor(com.eguma.barcodescanner.Reac... | public com.eguma.barcodescanner.ReactBarcodeScannerView createViewInstance(com.facebook.react.uimanager.ThemedReactContext context) {
context.addLifecycleEventListener(this);
mScannerView = new com.eguma.barcodescanner.ReactBarcodeScannerView(context);
mScannerView.setMaskColor(com.eguma.barcodescanner.Reac... |
public void isOpen(boolean bOpen) {
android.util.Log.e("下层窗帘回调", ("isOpen= " + bOpen));
if (bOpen) {
curtainTopView.openCurtain(10);
promotionHeader.setVisibility(com.example.curtaineffect.view.VISIBLE);
promotionHeader.setAlpha(255);
}else {
promotionHeader.setVisibility(com... | public void isOpen(boolean bOpen) {
android.util.Log.e("下层窗帘回调", ("isOpen= " + bOpen));
if (bOpen) {
curtainTopView.openCurtain(10);
promotionHeader.setVisibility(com.example.curtaineffect.view.VISIBLE);
promotionHeader.setAlpha(1);
}else {
promotionHeader.setVisibility(com.e... |
private int findJohnStamosBottom(int index) {
int cardBottom = currentHand.get(0).getRank();
if (index < 0) {
return index;
}
if (cardBottom == (currentHand.get(index).getRank())) {
kindCounter += 1;
return findJohnStamosTop((index - 1));
}else
if (cardBottom != (curr... | private int findJohnStamosBottom(int index) {
int cardBottom = currentHand.get(0).getRank();
if (index < 0) {
return index;
}
if (cardBottom == (currentHand.get(index).getRank())) {
kindCounter += 1;
return findJohnStamosBottom((index - 1));
}else
if (cardBottom != (c... |
public void actionPerformed(java.awt.event.ActionEvent e) {
javax.swing.JFrame parentFrame = new javax.swing.JFrame();
javax.swing.JFileChooser fileChooser = new javax.swing.JFileChooser();
fileChooser.setDialogTitle("Import Names.");
fileChooser.setCurrentDirectory(new java.io.File(java.lang.System.get... | public void actionPerformed(java.awt.event.ActionEvent e) {
javax.swing.JFrame parentFrame = new javax.swing.JFrame();
javax.swing.JFileChooser fileChooser = new javax.swing.JFileChooser();
fileChooser.setDialogTitle("Import Names.");
fileChooser.setCurrentDirectory(new java.io.File(java.lang.System.get... |
com.squareup.okhttp.Request request = new com.squareup.okhttp.Request.Builder().url(url).build();
client.setConnectTimeout(90, java.util.concurrent.TimeUnit.SECONDS);
client.setReadTimeout(90, java.util.concurrent.TimeUnit.SECONDS);
com.squareup.okhttp.Response response = client.newCall(request).execute... | com.squareup.okhttp.Request request = new com.squareup.okhttp.Request.Builder().url(url).build();
com.squareup.okhttp.Response response = client.newCall(request).execute();
return response.body().string();
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.