text
stringlengths
27
3.15k
<code>@@ -714,4 +714,83 @@ public static Set<String> getExternalPackageNamesUsedInClient(List<ClientModel> return externalPackageNames; } + + + public static IType getMultipartFileDetailsModel( + ObjectSchema compositeType, + String filePropertyName) { +</code> <technical_language>Reviewer: Wouldn't it cause breaking c...
<code>@@ -138,7 +138,13 @@ private static FileResult generateBinaryFileResult(RepoConfiguration config, Fil * on the file. */ private static void aggregateBlameAuthorModifiedAndDateInfo(RepoConfiguration config, FileInfo fileInfo) { - String blameResults = getGitBlameResult(config, fileInfo.getPath()); + String blameRe...
<code>@@ -325,4 +335,20 @@ public boolean tick() this.loadedChunks.remove(ChunkPos.asLong(chunk.x, chunk.z)); ((ChunkBridge) chunk).bridge$setScheduledForUnload(-1); } + + + @Inject(method = "canSave", at = @At("HEAD"), cancellable = true) + public void onCanSave(CallbackInfoReturnable<Boolean> cir) {</code> <technical...
<code>@@ -1039,6 +1040,13 @@ private void writeTypeInfo(TDSWriter tdsWriter, int srcJdbcType, int srcScale, i } break; + case microsoft.sql.Types.VECTOR: + tdsWriter.writeByte(TDSType.VECTOR.byteValue()); + tdsWriter.writeShort((short) (8 + srcScale * srcPrecision));</code> <technical_language>Reviewer: Use the static ...
<code>@@ -28,4 +29,44 @@ public void htmlProperties_should_have_correct_syntax() throws IOException { assertEquals("HTML property key should have a .HTML suffix", ".HTML", key.substring(key.length() - 5)); }); } + + @Test + public void properties_should_have_no_double_quote_wrapping() throws IOException { + + Propertie...
<code>@@ -0,0 +1,110 @@ + +package com.mercedesbenz.sechub.spring.security; + +import static org.assertj.core.api.Assertions.*; +import static org.mockito.Mockito.*; + +import java.util.Map; +import java.util.Set; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Argume...
<code>@@ -0,0 +1,35 @@ + + + +package com.azure.android.core.http.interceptors; + +import androidx.annotation.NonNull; + +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.ZoneId; +import org.threeten.bp.format.DateTimeFormatter; + +import java.io.IOException; +import java.util.Locale; + +import okhttp3.In...
<code>@@ -238,6 +238,37 @@ public void pipelineLatestRunIncludesRunning() throws Exception { Assert.assertEquals("Waiting for next available executor", latestRun.get("causeOfBlockage")); } + @Test + public void pipelineRunIncludesNextPrevLinks() throws Exception { + WorkflowJob p = createWorkflowJobWithJenkinsfile(getC...
<code>@@ -95,4 +96,14 @@ public DefendantPinLetterContentProvider( return content; } + private String getPartyNameFor(NamedParty party) { + StringBuilder name = new StringBuilder(party.getName()); + + if (party instanceof SoleTrader) { + (((SoleTrader) party).getBusinessName()).ifPresent(t -> name.append(" T/A ").appen...
<code>@@ -0,0 +1,81 @@ + +package org.spongepowered.common.data.processor.value.tileentity; + +import net.minecraft.item.EnumDyeColor; +import net.minecraft.tileentity.TileEntityShulkerBox; +import org.spongepowered.api.data.DataTransactionResult; +import org.spongepowered.api.data.key.Keys; +import org.spongepowered.a...
<code>@@ -0,0 +1,41 @@ + +package org.spongepowered.api.util.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Target; + + +@Inherited +@Target(ElementType.TYPE) +public @interface DoNotStore {</code> <technical_language>Reviewer: Add `@Document...
<code>@@ -0,0 +1,98 @@ +package com.stripe.net; + +import static java.util.Objects.requireNonNull; + +import com.stripe.util.StreamUtils; +import java.io.IOException; +import java.io.InputStream; +import java.time.Instant; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Op...
<code>@@ -131,6 +142,32 @@ public void deleteGroup(SecuredUUID uuid) throws NotFoundException { groupRepository.delete(group); } + @Override + @ExternalAuthorization(resource = Resource.GROUP, action = ResourceAction.MEMBERS) + public GroupUserResponseDto getGroupUsers(SecuredUUID uuid, PaginationRequestDto paginationR...
<code>@@ -0,0 +1,25 @@ +package com.codeborne.selenide; + + +public enum AuthenticationType { + BASIC("Basic"), + BEARER("Bearer"), + DIGEST("Digest"), + HOBA("HOBA"), + MUTUAL("Mutual"), + AWS4_HMAC_SHA256("AWS4-HMAC-SHA256"); + + private String value; + + AuthenticationType(final String value) {</code> <technical_lan...
<code>@@ -295,21 +306,88 @@ public static Collection gitRepoUrls() throws MalformedURLException, FileNotFoun } } Collections.shuffle(repos); - int toIndex = Math.min(repos.size(), TEST_ALL_CREDENTIALS ? 120 : 6); - return repos.subList(0, toIndex); + + return TEST_ALL_CREDENTIALS ? repos : repos.subList(0, Math.min(rep...
<code>@@ -327,13 +330,42 @@ public Client map(CodeModel codeModel) { } }; - syncClients.stream().filter(c -> c.getServiceClient() != null) + + syncClients.stream().filter(c -> c.getServiceClient() != null && CoreUtils.isNullOrEmpty(c.getConvenienceMethods()))</code> <technical_language>Reviewer: Should we filter it in ...
<code>@@ -0,0 +1,64 @@ +package mage.cards.e; + +import java.util.UUID; +import mage.abilities.condition.Condition; +import mage.abilities.condition.LockedInCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.co...
<code>@@ -69,15 +69,23 @@ public KeyMapper createKeyMapper(String keyDefinitionName) { "KeyMapper can be build in run(C, Environment), not in initialize(Bootstrap)"); } if (failStrategy == FailStrategy.FAIL_WITH_EXCEPTION) { - return getMapOrFailKeyMapper(keyDefinitionName); + return getMapOrFailKeyMapper(keyDefinition...
<code>@@ -462,6 +468,126 @@ public void testConnectionPoolGetTwice() throws SQLException { } } + + @Test + public void testConcatNullYieldsNull() throws SQLException { + SQLServerDataSource ds = new SQLServerDataSource(); + ds.setURL(connectionString); + ds.setConcatNullYieldsNull("OFF"); + int expectedResultForNewConn...
<code>@@ -0,0 +1,206 @@ + + +package com.microsoft.sqlserver.jdbc; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.text.MessageFormat; +import j...
<code>@@ -359,6 +360,17 @@ void shouldBeStoppableWhenFacedWithFailedApplicationContext(Class<?> contextConf assertDoesNotThrow(factory::stop); } + @ParameterizedTest + @ValueSource(classes = { + WithMetaAnnotation.class,</code> <technical_language>Reviewer: Does this have to be a parameterized test?</technical_language...
<code>@@ -0,0 +1,78 @@ +package mage.cards.c; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.LifeCompareCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.C...
<code>@@ -75,64 +73,56 @@ private static DataContainer translateFromNode(ConfigurationNode node) { return dataContainer; } - private void translate(Map<Object, ? extends ConfigurationNode> node, DataView container, Map<?, ?> value) { + private void translate(Map<Object, ? extends ConfigurationNode> node, DataView conta...
<code>@@ -15,26 +25,70 @@ public static List<String> servers = new ArrayList<>(); - - public KaldbSearch.SearchResult distributedSearch(KaldbSearch.SearchRequest request) { + + + + public static int READ_TIMEOUT_MS = 15000; + + public static final KaldbSearch.SearchResult error = + KaldbSearch.SearchResult.newBuilder()...
<code>@@ -47,72 +49,92 @@ Currency getDefaultCurrency(); + AccountType getDefaultAccountType();</code> <technical_language>Reviewer: What is the usecase for this method?</technical_language>
<code>@@ -0,0 +1,28 @@ +package com.baeldung.dto; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +class BooleanUnitTest { + + @Test + void givenInputAsString_whenStringToBoolean_thenValidBooleanConversion() { + Boolean trueVar = Boolean.valueOf("TRUE"); + Boolean...
<code>@@ -417,20 +417,20 @@ public Request authenticateRequest(Request request) { final Map<String, String> headers = CoreHttpProvider.getResponseHeadersAsMapStringString(response); + if(response.body() == null || response.body().contentLength() == 0) + return (Result) null; + final String contentType = headers.get(Con...
<code>@@ -4,21 +4,18 @@ public class SumOfMultiples { private final int sum; - public SumOfMultiples(int number, int[] set) { - sum = calculateSum(number, set); + public SumOfMultiples(int limit, int[] set) {</code> <technical_language>Reviewer: Much better variable name, thanks!</technical_language>
<code>@@ -412,7 +412,6 @@ public void onError(IOException e, HttpURLConnection uc) throws IOException { assertThat(uc.getContentType(), equalTo("application/json; charset=utf-8")); assertThat(uc.getContentLength(), equalTo(-1)); assertThat(uc.getHeaderFields(), instanceOf(Map.class)); - assertThat(uc.getHeaderFields()....
<code>@@ -16,13 +13,7 @@ public void testSingleBitOneToDecimal() { int[] expectedDigits = new int[]{1}; int[] actualDigits = baseConverter.convertToBase(10); - assertArrayEquals( - String.format( - "Expected digits: %s but found digits: %s", - Arrays.toString(expectedDigits), - Arrays.toString(actualDigits)), - expecte...
<code>@@ -451,7 +451,7 @@ private AuthenticationConstants() { } * Signature info for Azure authenticator app that installs authenticator * component. */ - public static final String AZURE_AUTHENTICATOR_APP_SIGNATURE = "ho040S3ffZkmxqtQrSwpTVOn9r0=";</code> <technical_language>Reviewer: Why has this changed?</technical_...
<code>@@ -0,0 +1,33 @@ + + +package com.microsoft.azure.maven.utils; + +import com.microsoft.azure.toolkit.lib.common.proxy.ProxyManager; + +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.maven.execution.MavenExecutionRequest; +import org.apache....
<code>@@ -93,12 +95,43 @@ private List<Recipient> getRepresentativesServedByPost(CaseData caseData) { } private List<Recipient> getNotRepresentedRespondents(CaseData caseData) { - return unwrapElements(caseData.getRespondents1()).stream() - .filter(respondent -> ObjectUtils.isEmpty(respondent.getRepresentedBy()) - && h...
<code>@@ -36,14 +39,15 @@ public static JSONObject generateSchema() { * Iterates over the base configurators and adds them to the schema. */ JSONObject schemaConfiguratorObjects = new JSONObject(); - ConfigurationAsCode configurationAsCode = ConfigurationAsCode.get(); - for (Object configuratorObject : configurationAsC...
<code>@@ -0,0 +1,6 @@ +package com.baeldung.spring.kafka.start.stop.consumer;</code> <technical_language>Reviewer: Couldn't we put all these in a package called "startstopconsumer" like you did for the live test?</technical_language> <technical_language>Reply: I have moved the live test package from "startstopconsumer"...
<code>@@ -238,18 +234,13 @@ public static boolean canEntitySpawnHere(EntityLiving entityLiving, IEntityLivin } public static Object onUtilRunTask(FutureTask<?> task, Logger logger) { - for (WorldServer worldServer : WorldManager.getWorlds()) { - final CauseTracker otherCauseTracker = ((IMixinWorldServer) worldServer).g...
<code>@@ -174,4 +175,30 @@ public void testSwitchExprLambda() { "}") .doTest(); } + + @Ignore + @Test + public void testSwitchExprNullCase() { + defaultCompilationHelper + .addSourceLines( + "SwitchExpr.java", + "package com.uber;", + "import javax.annotation.Nullable;", + "class SwitchExpr {", + " public enum Nullable...
<code>@@ -135,34 +187,27 @@ public boolean containsDataInTimeRange(long startTimeMs, long endTimeMs) { * Update the max and min data time range of the chunk given a new timestamp. */ public void updateDataTimeRange(long messageTimeStampMs) { - if (dataStartTimeEpochMs == 0 || dataEndTimeEpochMs == 0) { - dataStartTimeE...
<code>@@ -31,13 +29,36 @@ public class JsonParseNode implements ParseNode { private final JsonElement currentNode; + protected final Gson gson; + @Deprecated</code> <technical_language>Reviewer:</technical_language> <code>*/</code> <technical_language>Perfectly fine to want the default.</technical_language>
<code>@@ -22,12 +23,14 @@ default boolean blockMatches(Block other) { } @Override + @Nonnull</code> <technical_language>Reviewer: Personally I am more of a fan of putting the Nonnull above the override as it is a shorter annotation</technical_language>
<code>@@ -51,19 +54,25 @@ public List<CafcassApiCase> searchCaseByDateRange(LocalDateTime startDate, Local return caseDetails.stream() .map(this::convertToCafcassApiCase) + .filter(Objects::nonNull) .toList(); } private CafcassApiCase convertToCafcassApiCase(CaseDetails caseDetails) { - return CafcassApiCase.builder() ...
<code>@@ -973,4 +1020,47 @@ public String toString() { "runtimePrimitivesSeen: " + runtimePrimitivesSeen.size())) + ")"; } + + + private @Nullable Sequence selectTfidfSequence( + SIList<Sequence> candidates, + ClassOrInterfaceType type, + ScopeToLiteralStatistics scopeToLiteralStatistics) { + + if (candidates.isEmpty()...
<code>@@ -0,0 +1,60 @@ +package com.mercedesbenz.sechub.owaspzapwrapper.helper; + +import java.io.IOException; +import java.util.List; + +import com.mercedesbenz.sechub.commons.TextFileWriter; +import com.mercedesbenz.sechub.commons.model.SecHubMessage; +import com.mercedesbenz.sechub.commons.model.SecHubMessageType; +...
<code>@@ -0,0 +1,102 @@ + + + +package com.azure.storage.common.policy; + +import com.azure.core.annotation.Fluent; + +import java.time.Duration; + +/** + * This class contains configuration for applying the HTTP header {@code Expect: 100-continue} to requests that carry a + * body. + * + * <p>When the header is applie...
<code>@@ -0,0 +1,29 @@ +package io.cucumber.spring.cucontextconfig; + +import io.cucumber.spring.CucumberContextConfiguration; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.ContextConfiguration; +import org...
<code>@@ -194,6 +213,10 @@ public Application createApplication(User user, UUID researchGroupId, UUID topic application.setState(ApplicationState.NOT_ASSESSED); application.setDesiredStartDate(desiredStartDate); application.setCreatedAt(Instant.now()); + + + application.setConsentTimestamp(Instant.now());</code> <techn...
<code>@@ -1,24 +1,25 @@ package com.bakdata.conquery.sql.conversion.cqelement; +import java.time.Clock;</code> <technical_language>Reviewer: Was macht die Clock hier überall?</technical_language> <technical_language>Reply: Das ist dafür da, dass man in den Tests das heutige Datum mocken kann.</technical_language>
<code>@@ -531,36 +531,63 @@ public static String getStableID(String input) { private static String extractFileFromGist(String url) { try { - String gistapi = url.replaceFirst("^<LINK_0>(([a-zA-Z0-9]*)/)?(?<gistid>[a-zA-Z0-9]*)$", + String[] pathPlusAnchor = url.split("#"); + String fileName = ""; + if (pathPlusAnchor.l...
<code>@@ -51,23 +55,50 @@ public class CompareSAMs extends CommandLineProgram { static final String USAGE_SUMMARY = "Compare two input \".sam\" or \".bam\" files. "; static final String USAGE_DETAILS = "This tool initially compares the headers of SAM or BAM files. " + - " If the file headers are comparable, the tool wi...
<code>@@ -81,6 +84,7 @@ public Preferences() { showGameDetailsSidePane = new SimpleBooleanProperty(false); advancedIceLogEnabled = new SimpleBooleanProperty(false); prereleaseCheckEnabled = new SimpleBooleanProperty(false); + cacheLifeTime = new SimpleIntegerProperty(30);</code> <technical_language>Reviewer: Maybe refl...
<code>@@ -504,14 +503,47 @@ private static Condition buildWhereCondition(CatalogRequestParameters params) { condition = condition.and(caseInsensitiveLikeRegexNullTrue(AV_LOC2.AV_LOC2.BOUNDING_OFFICE_ID, params.getBoundingOfficeLike())); - condition = condition.and(caseInsensitiveLikeRegexNullTrue(AV_LOC2.AV_LOC2.LOCATI...
<code>@@ -151,7 +151,7 @@ public User getUniqueUser(String userName, String tenantId, UserType userType) { - userSearchCriteria = encryptionDecryptionUtil.encryptObject(userSearchCriteria, "User", UserSearchCriteria.class); + userSearchCriteria = encryptionDecryptionUtil.encryptObject(userSearchCriteria, "User", UserSe...
<code>@@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + +package com.microsoft.aad.adal; + +import java.lang.reflect.Type; + +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.goo...
<code>@@ -0,0 +1,90 @@ + +package com.playtika.test.selenium.drivers; + + +import com.playtika.test.selenium.SeleniumProperties; +import org.junit.jupiter.api.Test; +import org.openqa.selenium.firefox.FirefoxOptions; +import org.openqa.selenium.remote.CapabilityType; +import org.springframework.beans.factory.annotation...
<code>@@ -96,6 +96,16 @@ public User createDefendant(final String letterHolderId) { return userService.authenticateUser(email, password); } + private void createUser(CreateUserRequest createUserRequest) { + idamTestApi.createUser(createUserRequest); + + try { + Thread.sleep(1000);</code> <technical_language>Reviewer: D...
<code>@@ -67,19 +60,9 @@ private List<CCDCollectionElement<CCDDefendant>> defendants; private List<CCDCollectionElement<CCDTimelineEvent>> timeline; private List<CCDCollectionElement<CCDEvidenceRow>> evidence; - - private CCDCountyCourtJudgment countyCourtJudgment; - private LocalDateTime countyCourtJudgmentRequestedAt...
<code>@@ -328,6 +334,8 @@ public Result saveManualAssessment(final Submission submission, final List<Feedb result.setHasComplaint(false); } + checkFeedbackBelongsToResultElseThrow(feedbackList, result);</code> <technical_language>Reviewer: @WoH [medium] When `resultId` is null, `saveNewEmptyResult` has already persiste...
<code>@@ -0,0 +1,41 @@ +package org.zalando.riptide.spring.testing; + +import org.springframework.boot.autoconfigure.ImportAutoConfiguration; +import org.springframework.boot.test.autoconfigure.web.client.AutoConfigureMockRestServiceServer; +import org.springframework.boot.test.autoconfigure.web.client.RestClientTest; ...
<code>@@ -0,0 +1,70 @@ +package com.faforever.client.vault; + +import com.faforever.client.i18n.I18n; +import com.faforever.client.notification.Action; +import com.faforever.client.notification.NotificationService; +import com.faforever.client.notification.PersistentNotification; +import com.faforever.client.notificati...
<code>@@ -101,6 +115,25 @@ public int onStartCommand(Intent intent, int flags, int startId) { return START_STICKY; } + if (!checkActivityRecognitionPermission()) {</code> <technical_language>Reviewer: try rearrange these stop conditions check, so it is clear to see there are three aspects to check. The current code is ...
<code>@@ -0,0 +1,23 @@ +package org.mockito; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + + +/** + * Findbugs handles any annotation with name "CheckReturnValue" in return value check.</code> <tec...
<code>@@ -0,0 +1,126 @@ + + + +package com.azure.android.communication.common; + +import com.azure.android.core.util.CoreUtil; + + +public class MicrosoftTeamsUserIdentifier extends CommunicationIdentifier { + + private final String userId; + private final boolean isAnonymous; + private String id; + private Communicati...
<code>@@ -56,6 +56,18 @@ public PageResponse findByLanguageAndInitial( initial); } + public PageResponse<PersonImpl> findByLocationOfBirth( + PageRequest pageRequest, UUID uuidGeoLocation) throws HttpException { + return doGetRequestForPagedObjectList( + "/latest/persons/placeOfBirth/" + uuidGeoLocation.toString(), pag...
<code>@@ -63,7 +66,7 @@ public RepositoryStatistics mine(final Collection<String> absoluteFileNames, fin long nano = System.nanoTime(); logger.logInfo("Analyzing the commit log of the Git repository '%s'", gitClient.getWorkTree()); RepositoryStatistics statistics = gitClient.withRepository( - new RepositoryStatisticsCa...
<code>@@ -171,6 +177,15 @@ " - each samples from INPUT will only be compared to that same sample in SECOND_INPUT. \n" + " - MATRIX_OUTPUT is disabled. " + "\n" + + "In some cases, the groups collected may not have any observations (calls for a vcf, reads for a bam) at fingerprinting sites, or " + + "a sample in INPUT m...
<code>@@ -100,6 +100,11 @@ protected SamlEngineConfiguration() {} @JsonProperty protected URI configUri; + @Valid + @NotNull + @JsonProperty + protected Duration certificatesConfigCacheExpiry;</code> <technical_language>Reviewer: Might be nice to have a default value here.</technical_language> <technical_language>Reply...
<code>@@ -0,0 +1,96 @@ +package org.sdase.commons.server.mongo.testing; + +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +import com.mongodb.MongoClient; +import com.mongodb.MongoClientURI; +import org.bson.BsonDocument; +import org.bson.BsonString; +import org.slf4j.Logger; +import org.slf4j.LoggerF...
<code>@@ -0,0 +1,54 @@ +package slimeknights.tconstruct.gadgets.item.slimesling; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.MathHelper; +impor...
<code>@@ -57,6 +61,21 @@ public static File findSubFolder(File rootFolder, String name) { return allFiles; } + public static List<File> listAllFiles(File folder, String ext) {</code> <technical_language>Reviewer: consider whether it's ok to use `Files.walk()` directly?</technical_language>
<code>@@ -0,0 +1,93 @@ +package com.denizenscript.denizen.events.player; + +import com.denizenscript.denizen.events.BukkitScriptEvent; +import com.denizenscript.denizen.objects.EntityTag; +import com.denizenscript.denizen.objects.ItemTag; +import com.denizenscript.denizen.objects.LocationTag; +import com.denizenscript....
<code>@@ -882,6 +882,17 @@ void mergesMultiLineBytesAcrossThreeLines() { ); } + @Test + void mergesNamedMultiLineBytesWithSuffixOnFinalChunk() {</code> <technical_language>Reviewer: Only the direct-formation-child repro from the issue (2 chunks) has a test. The issue also describes a `foo > bar` binding case where the ...
<code>@@ -0,0 +1,98 @@ + +package org.mockitousage; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import static org.assertj.core.api.Assertions.assertThat; + +cla...
<code>@@ -0,0 +1,91 @@ +package edu.hm.hafner.analysis; + + +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; + + + +public abstract class ListTest { + + + + abstract List<Integer> create(int numberOfInitialElements); ...
<code>@@ -311,16 +316,18 @@ private String oname() { private static Map<String, Phi> defaults() { final Map<String, Phi> attrs = new HashMap<>(0); - attrs.put(Phi.RHO, new PhRho()); + attrs.put(Phi.RHO, new PhVoid(Phi.RHO)); return attrs; } /** * Log debug message for PhDefault. + *</code> <technical_language>Reviewer:...
<code>@@ -0,0 +1,102 @@ + + + +package com.azure.storage.common.policy; + +import com.azure.core.annotation.Fluent; + +import java.time.Duration; + + +@Fluent +public final class Request100ContinueOptions { + private static final Duration DEFAULT_AUTO_INTERVAL = Duration.ofMinutes(1); + + private Request100ContinueMode...
<code>@@ -107,4 +109,90 @@ public Response updatePreference( } return null; } + + public boolean validateDataSecurityPolicy( + String orgId, String key, Map<String, Object> data, RequestContext context) { + boolean validation = false; + List<Map<String, Object>> defaultDataSecurityPolicy = + preferenceDao.getTenantPref...
<code>@@ -0,0 +1,45 @@ +package com.baeldung.threading; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.net.Socket; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +class ThreadModelManualTest {...
<code>@@ -0,0 +1,38 @@ +package randoop.output; + +import java.io.File; + + +public interface CodeWriter { + + + public File writeClassCode(String packageName, String classname, String classCode); + + + public File writeUnmodifiedClassLines(String packageName, String classname, String[] sourceLines);</code> <technical_...
<code>@@ -30,7 +30,9 @@ import java.util.Collections; import java.util.Map; - +/** + * A {@link WireMockServer} based HTTP service used for testing HTTP services.</code> <technical_language>Reviewer:</technical_language> <code>* A {@link WireMockServer}-based HTTP service used for testing HTTP services.</code>
<code>@@ -516,6 +516,10 @@ public Limits(int time_limit, int attempted_limit, int generated_limit, int outp ALL } +</code> <technical_language>Reviewer: Throughout, "bloodhound" is a single word.</technical_language>
<code>@@ -70,6 +70,12 @@ public interface TriggeredAbility extends Ability { boolean checkInterveningIfClause(Game game); + TriggeredAbility withTriggerCondition(Condition condition, String phrase);</code> <technical_language>Reviewer: I think there should also be a version that only takes the condition argument and us...
<code>@@ -0,0 +1,77 @@ + + +package cwms.cda.formatters.json.adapters; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonNode; +import cwms.cda.data.dto.TimeS...
<code>@@ -334,6 +347,12 @@ private JedisCluster(ClusterConnectionProvider provider, int maxAttempts, Durati super(provider, maxAttempts, maxTotalRetriesDuration, protocol, clientSideCache); } + @Override + public void close() { + super.close(); + IOUtils.closeQuietly(this.clusterPipelineExecutor); + } +</code> <technic...
<code>@@ -152,14 +152,23 @@ public void onError(Throwable throwable) { final Throwable throwable = exception.getAndSet(null); if (throwable != null) { + + brokerEvent.setBrokerAccountServiceConnectionErrorInfo(throwable); + if (throwable instanceof RemoteException) { Logger.e(TAG, "Get error when trying to get token fr...
<code>@@ -1998,12 +1998,16 @@ public enum AsylumCaseFieldDefinition { "isIntegrated", new TypeReference<YesOrNo>(){}), MANUAL_CANCEL_HEARINGS_REQUIRED( - "manualCancelHearingsRequired", new TypeReference<String>(){}), MANUAL_UPDATE_HEARING_REQUIRED( + "manualUpdateHearingRequired", new TypeReference<String>(){}), + + U...
<code>@@ -85,4 +92,25 @@ public List<StudentGrade> getParticipantsGradeForExam( .map(gradeMapper::toRestStudentGrade) .toList(); } + + @PutMapping(value = "/exams/{exam_id}/grades") + public List<StudentGrade> updateParticipantsGradeForExam( + @PathVariable("exam_id") String examId, @RequestBody List<UpdateGrade> grade...
<code>@@ -0,0 +1,96 @@ +package tech.picnic.errorprone.plugin; + +import static java.nio.charset.StandardCharsets.UTF_8; +import static tech.picnic.errorprone.plugin.DocumentationType.BUG_PATTERN; + +import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; +import com.fasterxml.jackson.annotation.PropertyAcce...
<code>@@ -51,20 +59,22 @@ public PluginLoader(PluginSwitch pluginSwitch) { try { resources = loader.getResources("mockito-extensions/" + service.getName()); } catch (IOException e) { - throw new MockitoException("Failed to load " + service, e); + + + throw new RuntimeException("Failed to load " + service, e); } try { S...
<code>@@ -139,7 +139,14 @@ public Description createErrorDescription( if (nonNullTarget != null) { SerializationService.serializeFixSuggestion(config, state, nonNullTarget, errorMessage); } - SerializationService.serializeReportingError(config, state, nonNullTarget, errorMessage); + Tree errorTree =</code> <technical_l...
<code>@@ -152,7 +152,7 @@ static final String AUTHORITY_TYPE_ADFS = "adfs"; - static final String AUTHORITY_TYPE_AAD = EVENT_PREFIX + "aad"; + static final String AUTHORITY_TYPE_AAD = "aad"; static final String AUTHORITY_VALIDATION_SUCCESS = EVENT_PREFIX + "authority_validation_status_success";</code> <technical_langua...
<code>@@ -0,0 +1,179 @@ +package tech.picnic.errorprone.documentation; + +import static com.google.errorprone.matchers.Matchers.hasAnnotation; +import static com.google.errorprone.matchers.Matchers.instanceMethod; +import static com.google.errorprone.matchers.method.MethodMatchers.staticMethod; + +import com.google.aut...
<code>@@ -90,15 +90,53 @@ protected SubclassBytecodeGenerator( handler = ModuleHandler.make(byteBuddy, loader, random); } + private static boolean needsSamePackageClassLoader(MockFeatures<?> features) { + if (!Modifier.isPublic(features.mockedType.getModifiers()) + || !features.mockedType.isInterface()) { + +</code> <t...
<code>@@ -98,12 +96,10 @@ private void validateContent(final CaseDataContent content, int length = referenceArray.length; String nodeReference = length > 1 ? referenceArray[length - 2] : referenceArray[length - 1]; List<JsonNode> parentNodes = caseFieldNode.findParents(nodeReference); - parentNodes.stream().forEach(par...
<code>@@ -0,0 +1,148 @@ +package randoop.resource; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; +import org.objectweb.asm.AnnotationVisitor; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.MethodVisitor; +import org.objectweb.asm.Opcodes; +import org.objectweb.asm....
<code>@@ -1,12 +1,14 @@ -package com.petclinic.vet.servicelayer; + package com.petclinic.vet.servicelayer; -import com.petclinic.vet.dataaccesslayer.Album; -import reactor.core.publisher.Flux; + import com.petclinic.vet.dataaccesslayer.Album; -import org.springframework.core.io.Resource; -import reactor.core.publisher....
<code>@@ -62,17 +63,25 @@ public PageResponse<FamilyName> find( @Operation(summary = "Get a familyname by namespace and id") @GetMapping( - value = { - "/v5/familynames/identifier/{namespace}:{id}", - "/v5/familynames/identifier/{namespace}:{id}.json" - }, + value = {"/v5/familynames/identifier/**"}, produces = MediaTy...
<code>@@ -69,7 +69,8 @@ public class DatePickersTests extends TestsInit { private LocalDate date = LocalDate.now(); - private DateTimeFormatter formatterDow = DateTimeFormatter.ofPattern("ccc, LLL d").withLocale(Locale.ENGLISH); + private DateTimeFormatter formatterRow = DateTimeFormatter.ofPattern("ccc, MMM d").withLo...
<code>@@ -90,8 +90,8 @@ public SchemaService(final SchemaRepository schemaRepository, final EventTypeCache eventTypeCache, final TimelineSync timelineSync, final NakadiSettings nakadiSettings, - final NakadiAuditLogPublisher nakadiAuditLogPublisher, + @Lazy final NakadiAuditLogPublisher nakadiAuditLogPublisher, @Lazy f...
<code>@@ -70,6 +84,89 @@ public AuthenticationException(ADALError code, String details) { public AuthenticationException(ADALError code, String details, Throwable throwable) { super(details, throwable); mCode = code; + + if (null == throwable) { + return; + } + + if (throwable instanceof AuthenticationException) { + mS...
<code>@@ -1258,7 +1313,7 @@ default void validateCourseSettings(ProgrammingExercise programmingExercise, Cou SELECT new de.tum.cit.aet.artemis.deimos.dto.DeimosExerciseScopeInfoDTO( p.id, p.title, - COALESCE(c.id, ec.id), + CASE WHEN eg.id IS NOT NULL THEN ec.id ELSE c.id END,</code> <technical_language>Reviewer: @krus...