lang
stringclasses 10
values | seed
stringlengths 5
2.12k
|
---|---|
java | package com.dev.payments.client;
import com.dev.payments.payment.Payment;
import com.dev.payments.payment.PaymentDTO;
import lombok.Getter;
import lombok.Setter;
import java.math.BigDecimal;
import java.util.ArrayList; |
java |
@ProtobufProperty(index = 9, type = UINT64)
private Long recipientTimestamp;
@ProtobufProperty(index = 10, type = UINT32, repeated = true, packed = true)
private List<Integer> recipientKeyIndexes;
public static class DeviceListMetadataBuilder {
public DeviceListMetadataBuilder senderKeyIndexes(List<Integer> senderKeyIndexes) {
if (this.senderKeyIndexes == null) this.senderKeyIndexes = new ArrayList<>();
this.senderKeyIndexes.addAll(senderKeyIndexes);
return this;
} |
java | public final void upgrade(final AttackResult attackResult) {
if (!attackResult.killed()) {
throw new IllegalStateException(String.format(
"In this result: %s, no one killed anyone.",
attackResult
)); |
java |
if (f.getNumeroTo() != null) {
where += (where.trim().length() > 0 ) ? " AND " : "";
where += " AsientoContable.Numero <= ?";
this.addArg(buildArgTrim(f.getNumeroTo(), Integer.class));
} |
java | "\"notes\": {\n " +
"\"notes_key_1\": " +
"\"Tea, Earl Grey, Hot\",\n " +
"\"notes_key_2\": " +
"\"Tea, Earl Grey\u2026 decaf.\"\n " +
"},\n " +
"\"created_at\": " +
"1582033731\n" +
"}";
try {
mockResponseFromExternalClient(mockedResponseJson); |
java | <gh_stars>1-10
package cn.kastner.oj.domain.enums;
public enum ContestStatus {
NOT_STARTED,
PROCESSING, |
java | );
Assert.assertEquals(2, lines.size());
Assert.assertEquals("+ 2 3", lines.get(0));
Assert.assertEquals("* 5 4", lines.get(1)); |
java | package netcracker.practice.crossgen.game.states;
import netcracker.practice.crossgen.game.Game;
import netcracker.practice.crossgen.game.GameException;
public class PlayingState implements GameState {
@Override
public void doAction(Game game) throws GameException {
}
}
|
java |
public class CreateNewSingleIndexRangeJob extends RebuildIndexRangesJob {
private static final Logger LOG = LoggerFactory.getLogger(CreateNewSingleIndexRangeJob.class);
private final String indexName;
private final Indices indices;
public interface Factory {
CreateNewSingleIndexRangeJob create(Set<IndexSet> indexSets, String indexName);
} |
java | *
* @param method
* - method representing the feature being processed (getter for property or collection, or
* action)
* @param paramNum
* - 0-based index to the parameter to be processed.
* @param holder
* - to attach the facets to
*
|
java |
import com.shj.pojo.RequireBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Service { |
java | }
public LogLevel getLevel() {
return level;
}
public void setLevel(LogLevel level) {
this.level = level;
}
public Boolean getNotifiable() { |
java |
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/** |
java | @MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.gizmo.luggage;
import net.minecraft.MethodsReturnNonnullByDefault;
import javax.annotation.ParametersAreNonnullByDefault; |
java | this.s.request(1);
}
}
public boolean tryOnNext(T t) {
if (this.done) { |
java | @Rule public ZipkinRule server = new ZipkinRule();
HttpStorage storage = new HttpStorage(server.httpUrl());
@Override protected HttpStorage storage() {
return storage;
}
@Override public void clear() {
// no need.. the test rule does this
}
}
public static class SpanStoreTest extends zipkin.storage.SpanStoreTest {
@Rule public ZipkinRule server = new ZipkinRule(); |
java | }
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace(); |
java | package omtteam.omlib.api.tile;
import omtteam.omlib.api.permission.IHasOwner;
import omtteam.omlib.tileentity.TileEntityOwnedBlock;
import omtteam.omlib.util.player.Player;
import javax.annotation.Nonnull; |
java |
import java.util.List;
import io.erehsawsaltul.locationweb.entities.Location;
public interface LocationService {
Location saveLocation(Location location);
Location updateLocation(Location location);
void deleteLocation(Location location); |
java | this.endpoints = new ArrayList<AbstractEndpoint>();
load();
}
@Override
public boolean configure(final StaplerRequest req, final JSONObject formData) {
setEndpoints(req.bindJSONToList(AbstractEndpoint.class, formData.get("endpoints"))); |
java |
super();
}
public int getSeatsNumber() {
return this.seatsNumber;
} |
java | import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int [] counts = new int [101];
while(n-- > 0) { |
java | String accessToken = "<PASSWORD>-<PASSWORD>-token";
OAuthContext retVal = owner.createMock(OAuthContext.class);
expect(retVal.getType()).andReturn(AuthorizationType.OAUTH_2).anyTimes();
expect(retVal.getTokenType()).andReturn(tokenType).anyTimes();
expect(retVal.getToken()).andReturn(accessToken).anyTimes();
AccessToken accessTokenMock = owner.createMock(AccessToken.class);
expect(accessTokenMock.getAccessToken()).andReturn(accessToken).anyTimes();
// This is also hard-coded since we aren't using anything els.e
expect(accessTokenMock.getAccessTokenType()).andReturn(TokenType.BEARER).anyTimes();
// The expiry date of the token is always set some time in the future. |
java | public void testValidateRequest_noCenter() throws Exception {
try (LocalTestServerContext sc = new LocalTestServerContext(IMAGE)) {
StaticMapsRequest req = StaticMapsApi.newRequest(sc.context, new Size(WIDTH, HEIGHT));
req.zoom(16);
req.await();
}
}
@Test(expected = IllegalArgumentException.class)
public void testValidateRequest_noZoom() throws Exception {
try (LocalTestServerContext sc = new LocalTestServerContext(IMAGE)) {
StaticMapsRequest req = StaticMapsApi.newRequest(sc.context, new Size(WIDTH, HEIGHT));
req.center("Google Sydney"); |
java |
public interface PersonDAO {
Person findById(Long personId);
|
java | public class Expression extends RuleElement {
/**
* If true, this statement originally was placed between ()-signs
*/
private boolean precedenceOverridden = false;
public boolean isPrecedenceOverridden() {
return precedenceOverridden;
}
public void setPrecedenceOverridden(boolean precedenceOverridden) {
this.precedenceOverridden = precedenceOverridden;
}
}
|
java | openOption.setText(((scopeTab == null) || (scopeTabParent.getTabPane().getTabs().indexOf(scopeTab) == -1)) ? "Open tab" : "Goto tab");
if (scopeTab != null) {
openOption.setOnAction((ActionEvent event) -> {
if (scopeTabParent.getTabPane().getTabs().indexOf(scopeTab) == -1) {
scopeTabParent.getTabPane().getTabs().add(scopeTab);
}
scopeTabParent.getTabPane().getSelectionModel().select(scopeTab); |
java |
private void signOut() {
Log.d(TAG, "signOut()");
if (!isSignedIn()) {
Log.w(TAG, "signOut() called, but was not signed in!");
return;
} |
java | Assertions.assertTrue(exception.getMessage().contains(sample.getName()));
}
@Test
void testWhenNewProductGroupNameProvidedThanProductGroupDataServiceShouldBeCalled() { |
java | /**
* @author sruby on 2020-10-28 21:38
*/
@Slf4j
public class MethodExecutionListenerImpl implements MethodExecutionListener {
@Override
public void onMethodExecute(MethodExecutionEvent methodExecutionEvent) {
String method = methodExecutionEvent.getMethod();
log.info("onMethodExecute:{}",method);
}
@Override |
java | case 4 : festival = "冬天";
break;
default: {
festival = "错误季节";
System.out.println("default执行");
}
break;
} |
java | */
public SldChangeEvent(Object source, String layerKey, String sldName, StyledLayerDescriptor sld)
{
mySource = source;
mySld = sld;
mySldName = sldName;
|
java | package ai.cogmission.mosaic;
public class MosaicEngineBuilder<T> implements EngineBuilder<T> {
/**
* Returns a new {@link MosaicEngine}
*/
@Override
public MosaicEngine<T> build() {
return new MosaicEngineImpl<>();
}
}
|
java | return initialReevaluationInterval.toJodaPeriod();
}
public DefaultOverdueStatesAccount setAccountOverdueStates(final DefaultOverdueState[] accountOverdueStates) {
this.accountOverdueStates = accountOverdueStates;
return this;
}
|
java |
@FindBy(xpath = "//*[@class='edit-profile']")
WebElement btn_edit_profile;
@FindBy(css = "#name-input")
WebElement input_new_ClientName;
@FindBy(xpath = "//*[@class='phone-edit']//input")
WebElement input_new_ClientTel; |
java | public Iterator<float[][]> iterator() {
iter.rewind();
return iter;
}
}
|
java | public HistoryAdapter(Context context) {
this.context = context;
}
public void setHistoryInfo(List<HistoryxianInfo> mHistoryxianInfo) { |
java | private final HTTPRequestPattern pattern;
private final HTTPResponse response;
private final Parsing parsing;
private Entry(HTTPRequestPattern pattern, HTTPResponse response, Parsing parsing) {
this.pattern = pattern;
this.response = response;
this.parsing = parsing;
}
public Parsing getParsing() {
return parsing;
}
public HTTPResponse getResponse() {
|
java | }
/**
* Adds the second vector to the first and returns the result as a new vector
* without changing either of the given vectors
*
* @param vector2D1 The fist vector that will be added
* @param vector2D2 The second vector that will be added
* @return The resulting vector from the addition
*/
public static Vector2D add(final Vector2D vector2D1, final Vector2D vector2D2) {
return Vector2D.add(vector2D1.x, vector2D1.y, vector2D2.x, vector2D2.y);
}
|
java |
}
// 최대 금액
System.out.println(DP[allInput][numOfCom]);
// 각 회사당 투자 금액
List<Integer> list = new ArrayList<>();
int b = allInput;
for (int i = numOfCom; i >= 1; i--) { |
java | Drive.getInstance().runAuto(Constants.DISTANCE_TO_SWITCH/2 - 12, 0.7, true);
//Turn left 90 degrees, -80 to account for gyro inaccuracy
Drive.getInstance().autoTurn(0, -90);
//Zero encoder
Drive.getInstance().starboardEncoderZero();
//Drive to middle of left side of switch
Drive.getInstance().runAuto(Constants.SWITCH_LENGTH / 2 + 42, 0.7, false);
//Turn right 90 degrees, 80 to account for gyro inaccuracy
Drive.getInstance().autoTurn(0, 90);
//Raise elevator
Elevator.getInstance().runAuto(Constants.AUTO_SWITCH_UPPER_LIMIT, 0.7, false);
//CubeGrabber.getInstance().runAuto(0, 0.7, true);
//Zero encoder
Drive.getInstance().starboardEncoderZero();
//Drive rest of distance to switch |
java | fReader.close();
gpsTrace = new GPSTrace(vTemp.size(), 0);
for (int i = 0; i < vTemp.size(); i++) { |
java | import org.springframework.web.client.RestTemplate;
public class AmpResourceFieldProvider extends AmpFieldProvider {
public static final String RESOURCE_FIELDS_ENDPOINT = "/rest/resource/fields";
public AmpResourceFieldProvider(String baseURL, RestTemplate restTemplate) {
super(baseURL, restTemplate);
}
public String getFieldProviderEndpoint() {
return RESOURCE_FIELDS_ENDPOINT;
}
|
java | out.writeObjectStop(writeIdLabel);
Modification modification = decisionRow.getModification();
out.writeUUID(WAIT_FOR_AFTER_RELEASE, modification.getWaitForAfterRelease());
Set<UUID> newItems = modification.getNewItems();
if (newItems != null) {
int newItemsLabel = out.writeArray(NEW_ITEMS);
int i = 0;
for (UUID item : newItems) {
out.writeUUID(i, item);
i++;
}
out.writeArrayStop(newItemsLabel);
} |
java | <gh_stars>0
package org.biobrief.mongo;
import org.springframework.data.mongodb.repository.MongoRepository;
public interface MongoEntityRepository<E extends AbstractMongoEntity>
extends MongoRepository<E, String>
{
}
|
java |
private void loadUpdates() {
showListView(false);
Query q = getClient().appData(StatusShare.COL_UPDATES, UpdateEntity.class).query();
q.setLimit(10); |
java | int FLOAT = 4;
int INTEGER = 5;
int LBRACE = 6;
int LBRACKET = 7;
int NULL = 8;
int RBRACE = 9;
int RBRACKET = 10;
int STRING = 11;
int TRUE = 12;
int error = 13;
}
|
java |
if(indexOfDelim < 0) {
String[] vals = new String[1];
vals[0] = val;
return vals;
} else {
String[] vals = new String[2];
vals[0] = null;
vals[1] = null;
|
java | */
private FileConfiguration publicWarpsConfig;
/**
* Create a new OWConfigurationManager backed by the given OpenWarp instance.
* Sets up data folders on-disk and loads (creating if necessary) the global
* configuration and public warp files.
*
* @param ow The OpenWarp instance backing this OWConfigurationManager.
*/
public OWConfigurationManager(OpenWarp ow) {
this.plugin = ow;
// Set up configuration folder if necessary
this.plugin.getDataFolder().mkdirs(); |
java | public class NTMessageToByteEncoder extends MessageToByteEncoder<byte[]> {
@Override
protected void encode(ChannelHandlerContext ctx, byte[] msg, ByteBuf out) throws Exception {
System.out.println(Arrays.toString(msg));
out.writeBytes(msg);
ctx.flush();
}
}
|
java |
provisioner = new NullProvisioner(cloudsim);
scheduler = new EnsembleDynamicScheduler(cloudsim, environment);
engine = new WorkflowEngine(provisioner, scheduler, Double.MAX_VALUE, Double.MAX_VALUE, cloudsim, environment);
cloud = new Cloud(cloudsim);
provisioner.setCloud(cloud);
cloud.addVMListener(engine);
jobLog = new WorkflowLog(cloudsim);
engine.addJobListener(jobLog);
}
// ??ds this is part of provisioner really |
java | public void countGains() {
//parentEntropy =
//List<EntStatistic> stat = e;
//for (int i = 0; i < stat.size(); i++) {
//
//}
if (gains == null) {
gains = new ArrayList<GainsEntity>();
} |
java | package ru.siaw.personal.rpgitems.utilities;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import java.util.Objects;
public class Messages {
public void msg(CommandSender sender, String msg) {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', |
java | Button button1 = new Button(shell, SWT.PUSH);
button1.setText("OK");
Button button2 = new Button(shell, SWT.PUSH);
button2.setText("Cancel");
final int insetX = 4, insetY = 4;
FormLayout formLayout = new FormLayout();
formLayout.marginWidth = insetX;
formLayout.marginHeight = insetY;
shell.setLayout(formLayout); |
java | * @return the response entity
* @throws Exception the exception
*/
@SuppressWarnings("rawtypes")
@PostMapping("/findById")
public ResponseEntity findById(@RequestBody ID id) throws Exception {
return handleSuccess(getService().findById(id));
}
/**
* Update.
*
* @param obj the obj
* @return the response entity |
java |
public synchronized JenkinsServiceManager getJenkinsServiceManager() {
if(jenkinsServiceManager == null){
jenkinsServiceManager = new JenkinsServiceManager(this);
}
return jenkinsServiceManager;
}
public static JenkinsClientApplication getInstance(){
return instance;
}
@Override
public void onTerminate() {
//We will delete stored key on application terminate
|
java | import java.util.stream.Collectors;
public class WorldGenMineshaft extends StructureGenerator<WorldGenMineshaftConfiguration> {
public WorldGenMineshaft(Codec<WorldGenMineshaftConfiguration> codec) {
super(codec);
}
protected boolean a(ChunkGenerator chunkgenerator, WorldChunkManager worldchunkmanager, long i, SeededRandom seededrandom, int j, int k, BiomeBase biomebase, ChunkCoordIntPair chunkcoordintpair, WorldGenMineshaftConfiguration worldgenmineshaftconfiguration) { |
java | * Get the plugin providing this command.
*
* @return the plugin providing this command
*/
public @NotNull Plugin getPlugin() {
return JavaPlugin.getProvidingPlugin(getClass());
} |
java | * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.andstatus.app.account;
import android.accounts.AccountManager;
import android.app.Activity;
import android.content.Intent; |
java | Resilience.getInstance().getValues().namesEnabled = true;
}
@Override
public void onDisable() {
Resilience.getInstance().getValues().namesEnabled = false;
}
}
|
java | protected long toOffset(Map<String, Object> paraMap, int size) {
Object value = paraMap.get(pageName);
Long page = ObjectUtils.toLong(value);
if (page == null) {
return 0;
}
return Math.max(page - getStart(), 0) * size;
} |
java | import android.content.SharedPreferences;
import android.os.Bundle;
import java.util.HashSet;
public class SettingsTextActivity extends SettingsItemCommon {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PreferencesFragment fragment = new PreferencesFragment();
fragment.mWatchId = mWatchId;
fragment.mRowId = mRowId;
fragment.mItemId = mItemId;
|
java | return offset;
}
public int getLength() {
return length;
}
@Override
public String toString() {
return "Offset: " + offset + ", length: " + length;
}
}
|
java | */
package self.philbrown.javaQuery;
import java.io.IOException;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.ResponseHandler; |
java | import modelo.Ropero;
/**
*
* @author ever
*/ |
java | package org.mycash.repository;
import org.mycash.domain.Lancamento;
import org.springframework.data.jpa.repository.JpaRepository;
public interface LancamentoRepository
extends JpaRepository<Lancamento, Integer> {
}
|
java | import lombok.Getter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import java.time.LocalDateTime;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import static java.time.LocalDateTime.now; |
java | package rnk.bb.rest.util;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;
import java.io.Serializable;
@Named("stringUtils")
@ApplicationScoped
public class StringUtils implements Serializable {
public Boolean isNotBlank(String value){
return (value !=null)&&(!value.trim().isEmpty());
}
}
|
java | public double cena() {
return 23;
}
public static String opis() {
return "Hawajska (szynka, ananas, ser)";
}
public static String ostrosc() {
return "Ostrosc: 0";
} |
java | import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
System.setProperty("javax.net.debug", "ssl");
SpringApplication.run(Application.class, args);
}
|
java | package com.swan.picturerepository.security;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import lombok.Getter;
import lombok.Setter;
@Getter |
java | uri = data.getData();
resultEditImage(uri);
break;
case PICK_STICKER_REQUEST_CODE:
allPaths = data.getStringArrayListExtra(SelectPhotoActivity.EXTRA_SELECTED_IMAGES);
if (allPaths != null && allPaths.size() > 0) {
final int len = allPaths.size(); |
java | import controller.exceptions.UnAuthorizedException;
import csv.InvalidCSVHeaderException;
import dao.exceptions.ConstraintViolationException;
import dao.exceptions.DataAccessException;
import dao.exceptions.ObjectNotFoundException;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import pdf.PdfException; |
java | * makeTags("i", "Yay") ? "<i>Yay</i>"
* makeTags("i", "Hello") ? "<i>Hello</i>"
* makeTags("cite", "Yay") ? "<cite>Yay</cite>"
* makeTags("address", "here") ? "<address>here</address>"
* makeTags("body", "Heart") ? "<body>Heart</body>"
* makeTags("i", "i") ? "<i>i</i>" |
java | * javax.swing.table.TableCellEditor#getTableCellEditorComponent(javax.swing
* .JTable, java.lang.Object, boolean, int, int)
*/
@Override
public Component getTableCellEditorComponent(final JTable table,
final Object value, final boolean isSelected, final int arg3, |
java | import com.hirshi001.multiplayerrotmg.client.packet.Packet;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
public class UnloadChunkHandler extends PacketHandler {
/** |
java | Matcher matcher=patternPack.matcher(result);
if(matcher.find())
apkInfo.packIdentity=matcher.group(1);
matcher=patternMainActivity.matcher(result);
if(matcher.find())
apkInfo.launcherActivity=matcher.group(1);
return apkInfo;
}
/**
* extract file from apk
* @param apkPath
* @param fileInApk
* @param output if output is not end with "/" or "\" ,it will be treated as a file
* @throws IOException |
java | new Vec3d(0, 2, 0)
));
public String getArraylistInfo() {
if (getClosestPlayer() != null) {
return ChatFormatting.GRAY + " " + getClosestPlayer().getName();
} else {
return "";
}
} |
java | this.right = right;
}
public Line getLeft()
{
return left;
}
|
java |
LimitClause limit = MySqlDialect.INSTANCE.limit();
assertThat(limit.getClausePosition()).isEqualTo(LimitClause.Position.AFTER_ORDER_BY);
assertThat(limit.getLimit(10)).isEqualTo("LIMIT 10");
}
@Test // DATAJDBC-278
public void shouldRenderOffset() {
LimitClause limit = MySqlDialect.INSTANCE.limit();
assertThat(limit.getOffset(10)).isEqualTo("LIMIT 10, 18446744073709551615"); |
java | return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n "); |
java | @Singleton
public class SynchronizerSync extends Synchronizer {
@Override
@RolesAllowed({SYSTEM_ROLE, ADMIN_ROLE}) |
java | fileInfo.file(new File(name));
try {
fileInfo.writer(new PrintWriter(fileInfo.file()));
fileInfo.supportedWriting(true);
} catch (FileNotFoundException e) {
System.out.printf("Error: Failed to open summary file '%s'.\n", fileInfo.file().getName()); |
java | import javax.persistence.OneToMany;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;
import com.fasterxml.jackson.annotation.JsonIgnore;
|
java |
public class PigHerdCapability extends Capability<Void> {
private static final long serialVersionUID = 1L;
@Override
public Feature initFeature(GameState state, String tileId, Feature feature, Element xml) {
if (feature instanceof Farm) {
if (attributeBoolValue(xml, "pig")) {
if ("pig".equals(state.getStringRule(Rule.GQ11_PIG_HERD)) || !"GQ/F".equals(tileId)) {
feature = ((Farm) feature).setPigHerds(1); |
java | @Override
protected AbstractPac4jDecoder getDecoder(final WebContext webContext) {
final Pac4jHTTPPostDecoder decoder = new Pac4jHTTPPostDecoder(webContext);
try {
decoder.setParserPool(Configuration.getParserPool());
decoder.initialize();
decoder.decode();
} catch (final Exception e) {
throw new SAMLException("Error decoding SAML message", e); |
java | *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and |
java |
public PaperPluginMessanger(final VelocityManagerPlugin instance) {
this.instance = instance;
instance.getServer().getMessenger().registerIncomingPluginChannel(instance, CHANNEL, this);
instance.getServer().getMessenger().registerOutgoingPluginChannel(instance, CHANNEL);
}
public void sendOutgoingMessage(final ByteArrayDataOutput out, final Player player) { |
java | * with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.linecorp.armeria.server;
import static com.linecorp.armeria.server.RoutingContextTest.create; |
java | * <attribute name="EndDate" type="{http://www.w3.org/2001/XMLSchema}date" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD) |
java | public static RoleType parseTo(String roleTypeName) {
for (RoleType roleType : RoleType.values()) {
if (roleType.name().equalsIgnoreCase(roleTypeName)) {
return roleType;
} |
java | import org.mockito.junit.jupiter.MockitoExtension;
@ExtendWith(MockitoExtension.class)
class UrlControllerTest {
@Mock
UrlService mockUrlService; |
java | mob.tell(L("Your life echo sensations fade."));
}
}
public boolean inhabitated(MOB mob, Room R) {
if (R == null)
return false;
for (int i = 0; i < R.numInhabitants(); i++) {
final MOB M = R.fetchInhabitant(i);
if ((M != null) |
java | }
public void setQuantity(int quantity) {
this.quantity = quantity;
}
|
java | * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.underlegendz.underactivity_sample.ui.fragment;
import android.annotation.SuppressLint;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable; |
java | @Override
public String getName() {
return name;
}
@Override
public long getUserId() { |
java | public class AQSReentrant {
int a = 0;
ReentrantLock lock = new ReentrantLock();
@Test
public void test(){ |
java | messageSource.create1().send(MessageBuilder.withPayload(msgDto).build());
log.info("Msg to "+messageSource.OUTPUT1 +" published");
messageSource.create2().send(MessageBuilder.withPayload(msgDto).build());
log.info("Msg to "+messageSource.OUTPUT2+" published");
} catch (Exception e) {
log.error("Blad przekazania wiadomosci do kolejki");
}
}
|
java |
public class DummyClass {
@HackerAttack
private String title;
@HackerAttack
private int ttl;
@HackerAttack
private int key;
private int someField;
|
java | if (userAttributes != null && userAttributes.size() > 0) {
for (ClaimMapping claimMapping : userAttributes.keySet()) {
claims.put(claimMapping.getRemoteClaim().getClaimUri(), userAttributes.get(claimMapping));
}
}
return claims;
} |
Subsets and Splits