auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void preInit(FMLPreInitializationEvent event) { instance = this; configPath = event.getModConfigurationDirectory() + "/RTG/"; Mods.syncAllConfigs(); <START> this.registerStructures(); <END> Logger.info("[FMLPreInitializationEvent] Creating RTG's EventManager"); eventMgr = new EventManagerRTG(); worldtype = new WorldTypeRTG("RTG"); }</code><technical_language>1. move registrations a method? 2. specific event(s) registration happen before? why? world gen specific events get registered server is start up, register anytime pre-init init process. (I originally moved registrations in 1.7.10 post-init I recall noticing side effects.)</technical_language>

Target:
public void preInit(FMLPreInitializationEvent event) { instance = this; configPath = event.getModConfigurationDirectory() + "/RTG/"; Mods.syncAllConfigs(); this.registerStructures(); Logger.info("[FMLPreInitializationEvent] Creating RTG's EventManager"); eventMgr = new EventManagerRTG(); worldtype = new WorldTypeRTG(ModInfo.MOD_ID); }
Source:
<code>private void updateUser(UserDto user, User userEntity, UserDto originalUser) { <START> if (user.getCreationTime().isPresent() && !user.isChanged(originalUser)) <END> { Require.that(yonaProperties.isTestServer(), () -> InvalidDataException.onlyAllowedOnTestServers("Cannot set user creation time")); LocalDateTime creationTime = user.getCreationTime().get(); userEntity.setCreationTime(creationTime); userEntity.getBuddies().forEach(b -> b.setLastStatusChangeTime(creationTime)); } else { user.updateUser(userEntity); } }</code><technical_language>This is a strange condition. If user is changed, is suddenly allowed send a new creation date</technical_language>

Target:
private void updateUser(UserDto user, User userEntity, UserDto originalUser) { if (user.getCreationTime().isPresent() && !containsPropertyUpdate(originalUser, user)) { Require.that(yonaProperties.isTestServer(), () -> InvalidDataException.onlyAllowedOnTestServers("Cannot set user creation time")); LocalDateTime creationTime = user.getCreationTime().get(); userEntity.setCreationTime(creationTime); userEntity.getBuddies().forEach(b -> b.setLastStatusChangeTime(creationTime)); } else { Require.isNotPresent(user.getCreationTime(), () -> InvalidDataException.extraProperty("creationTime", "Creation time cannot be changed")); user.updateUser(userEntity); } }
Source:
<code>private Object getEnvelopePartitionId(OutgoingMessageEnvelope envelope) { return envelope.getPartitionKey(); <START> } <END></code><technical_language>Null check (or is guaranteed not-null?)</technical_language>

Target:
protected Object getEnvelopePartitionId(OutgoingMessageEnvelope envelope) { return envelope.getPartitionKey(); }
Source:
<code>private String loginOnBehalf(DbUser dbUser) { if (dbUser == null) { throw new RuntimeException("User not found in database"); } Collection<ExtMap> principalRecords = AuthzUtils.findPrincipalsByIds( getAuthz(dbUser.getDomain()), dbUser.getNamespace(), Arrays.asList(dbUser.getExternalId()), true, true); if (principalRecords.isEmpty()) { throw new RuntimeException(String.format("Unable to find principal for user %s in domain '%s'", dbUser.getLoginName(), dbUser.getDomain())); } <START> return attachUserToSession(dbUser.getDomain(), principalRecords.iterator().next()); <END> }</code><technical_language>getDomain is authz name, right? I nicer if return authz name external id call attachUserToSession command... important</technical_language>

Target:
private ExtMap loginOnBehalf(DbUser dbUser) { Collection<ExtMap> principalRecords = AuthzUtils.findPrincipalsByIds( EngineExtensionsManager.getInstance().getExtensionByName(dbUser.getDomain()), dbUser.getNamespace(), Arrays.asList(dbUser.getExternalId()), true, true); if (principalRecords.isEmpty()) { throw new RuntimeException(String.format("Unable to find principal for user %s in domain '%s'", dbUser.getLoginName(), dbUser.getDomain())); } return principalRecords.iterator().next(); }
Source:
<code>private int getServicePort(Service service) { <START> return version.matches(BEFORE_0_11) ? service.port : PORT; <END> }</code><technical_language>FYI a utility class (ComparableVersion) for parsing comparing version strings. more reliable a regex - please that? Also, a slight risk people want custom Localstack image, a completely form of tag. While I this a problem, please some logging time of container startup give some clues happen</technical_language>

Target:
private int getServicePort(Service service) { return legacyMode ? service.port : PORT; }
Source:
<code>public Builder from(int ... nums) { <START> this.matchers.add((from, to, msg) -> Arrays.binarySearch(nums, from) >= 0); <END> return this; }</code><technical_language>this assumes input is sorted, test case is calls this; test defined in non-sorted order</technical_language>

Target:
public Builder from(int... nums) { from = nums; return this; }
Source:
<code>private void iterateLocs(File localStorageFolder1, File localStorageFolder2, File localStorageFolder3, StorageLocationSelectorStrategy roundRobinStrategy) { Iterator<StorageLocation> locations; locations = roundRobinStrategy.getLocations(); StorageLocation loc1 = locations.next(); Assert.assertEquals("The next element of the iterator should point to path local_storage_folder_1", localStorageFolder1, loc1.getPath()); StorageLocation loc2 = locations.next(); <START> Assert.assertEquals("The next element of the iterator should point to path local_storage_folder_1", <END> localStorageFolder2, loc2.getPath()); StorageLocation loc3 = locations.next(); Assert.assertEquals("The next element of the iterator should point to path local_storage_folder_1", localStorageFolder3, loc3.getPath()); }</code><technical_language>assert message is wrong</technical_language>

Target:
private void iterateLocs(File localStorageFolder1, File localStorageFolder2, File localStorageFolder3, StorageLocationSelectorStrategy roundRobinStrategy) { Iterator<StorageLocation> locations = roundRobinStrategy.getLocations(); StorageLocation loc1 = locations.next(); Assert.assertEquals("The next element of the iterator should point to path local_storage_folder_1", localStorageFolder1, loc1.getPath()); StorageLocation loc2 = locations.next(); Assert.assertEquals("The next element of the iterator should point to path local_storage_folder_2", localStorageFolder2, loc2.getPath()); StorageLocation loc3 = locations.next(); Assert.assertEquals("The next element of the iterator should point to path local_storage_folder_3", localStorageFolder3, loc3.getPath()); }
Source:
<code>void whenCreateLedger_thenSuccess() throws Exception { <START> <END> LedgerHandle lh = bk.createLedger(BookKeeper.DigestType.MAC, ledgerPassword); assertNotNull(lh); assertNotNull(lh.getId()); log.info("[I33] Ledge created: id=" + lh.getId()); }</code><technical_language>remove this blank lines</technical_language>

Target:
void whenCreateLedger_thenSuccess() throws Exception { LedgerHandle lh = bk.createLedger(BookKeeper.DigestType.MAC, ledgerPassword); assertNotNull(lh); assertNotNull(lh.getId()); LOG.info("[I33] Ledge created: id=" + lh.getId()); }
Source:
<code>public void testTranscriberWithNullProvider() { VaultTranscriber transcriber = new DefaultVaultTranscriber(null); <START> try { <END> transcriber.getRawSecret("${vault.id}"); Assert.fail(); } catch(IllegalStateException expected) { Assert.assertEquals("Required VaultProvider not found - check vault configuration", expected.getMessage()); } try (VaultRawSecret secret = transcriber.getRawSecret("non_vault_secret")) { Optional<ByteBuffer> optional = secret.getRawSecret(); Assert.assertTrue(optional.isPresent()); ByteBuffer secretBuffer = optional.get(); Assert.assertTrue(Arrays.equals("non_vault_secret".getBytes(StandardCharsets.UTF_8), secretBuffer.array())); } }</code><technical_language>Please do this of testing expected exception. @Rule ExpectedException instead illustrated e.g. here: <LINK_0></technical_language>

Target:
public void testTranscriberWithNullProvider() throws Exception { VaultTranscriber transcriber = new DefaultVaultTranscriber(null); for (String key : validExpressions.keySet()) { try (VaultRawSecret secret = transcriber.getRawSecret(key)) { Assert.assertFalse(secret.get().isPresent()); Assert.assertFalse(secret.getAsArray().isPresent()); } } for (String value : invalidExpressions) { try (VaultStringSecret secret = transcriber.getStringSecret(value)) { Optional<String> optional = secret.get(); Assert.assertTrue(optional.isPresent()); String secretString = optional.get(); Assert.assertEquals(value, secretString); } } }
Source:
<code>public void getOutputFileToWrite_shouldNeverOverwritePreviousFiles() throws IOException { String content1 = "A"; String content2 = "B"; AbstractHandler handler = new AbstractHandler(); File previousFile = null; File currentFile = null; mockStatic(Context.class); when(Context.getAdministrationService()).thenReturn(administrationService); when(administrationService.getGlobalProperty(any())).thenReturn(complexObsTestFolder.newFolder().getAbsolutePath()); for (int i = 0; i <= 101; i++) { String currentData; String previousData; if (i % 2 == 0) { currentData = content1; previousData = content2; } else { currentData = content2; previousData = content1; } ComplexData complexData = new ComplexData(FILENAME, currentData); Obs obs = new Obs(); obs.setComplexData(complexData); currentFile = handler.getOutputFileToWrite(obs); try (BufferedWriter fout = new BufferedWriter( <START> new OutputStreamWriter(new FileOutputStream(currentFile), StandardCharsets.UTF_8))) { <END> fout.write(currentData); } try (BufferedReader fin = new BufferedReader( new InputStreamReader(new FileInputStream(currentFile), StandardCharsets.UTF_8))) { String readData = fin.readLine(); assertEquals(readData, currentData); } if (i > 0) { try (BufferedReader fin = new BufferedReader( new InputStreamReader(new FileInputStream(previousFile), StandardCharsets.UTF_8))) { String readData = fin.readLine(); assertEquals(readData, previousData); } } previousFile = currentFile; } }</code><technical_language>of apache commons-io FileUtils.contentEquals</technical_language>

Target:
public void getOutputFileToWrite_shouldNeverOverwritePreviousFiles() throws IOException { String content1 = "A"; String content2 = "B"; File previousFile = null; File currentFile = null; for (int i = 0; i <= 101; i++) { String currentData = (i % 2 == 0) ? content1 : content2; ComplexData complexData = new ComplexData(FILENAME, currentData); Obs obs = new Obs(); obs.setComplexData(complexData); currentFile = handler.getOutputFileToWrite(obs); try (BufferedWriter fout = new BufferedWriter( new OutputStreamWriter(new FileOutputStream(currentFile), StandardCharsets.UTF_8))) { fout.write(currentData); } try (BufferedReader fin = new BufferedReader( new InputStreamReader(new FileInputStream(currentFile), StandardCharsets.UTF_8))) { String readData = fin.readLine(); assertEquals(readData, currentData); } if (i > 0) { assertFalse(FileUtils.contentEquals(previousFile, currentFile)); } previousFile = currentFile; } }
Source:
<code>public List<AccountInfo> apply(TopLevelResource rsrc) throws OrmException, BadRequestException { if (Strings.isNullOrEmpty(query)) { throw new BadRequestException("missing query field"); } if (!suggest || query.length() < suggestFrom) { return Collections.emptyList(); } String a = query; String b = a + MAX_SUFFIX; Map<Account.Id, AccountInfo> matches = new LinkedHashMap<>(); Map<Account.Id, String> queryEmail = new HashMap<>(); for (Account p : db.accounts().suggestByFullName(a, b, limit)) { addSuggestion(matches, p.getId()); } if (matches.size() < limit) { for (Account p : db.accounts() .suggestByPreferredEmail(a, b, limit - matches.size())) { addSuggestion(matches, p.getId()); } } if (matches.size() < limit) { for (AccountExternalId e : db.accountExternalIds() .suggestByEmailAddress(a, b, limit - matches.size())) { queryEmail.put(e.getAccountId(), e.getEmailAddress()); addSuggestion(matches, e.getAccountId()); } } accountLoader.fill(); for (Map.Entry<Account.Id, String> p : queryEmail.entrySet()) { AccountInfo info = matches.get(p.getKey()); if (info != null) { info.email = p.getValue(); } } <START> return new ArrayList<>(matches.values()); <END> }</code><technical_language>list sorted</technical_language>

Target:
public List<AccountInfo> apply(TopLevelResource rsrc) throws OrmException, BadRequestException { if (Strings.isNullOrEmpty(query)) { throw new BadRequestException("missing query field"); } if (!suggest || query.length() < suggestFrom) { return Collections.emptyList(); } String a = query; String b = a + MAX_SUFFIX; Map<Account.Id, AccountInfo> matches = new LinkedHashMap<>(); Map<Account.Id, String> queryEmail = new HashMap<>(); for (Account p : db.accounts().suggestByFullName(a, b, limit)) { addSuggestion(matches, p.getId()); } if (matches.size() < limit) { for (Account p : db.accounts() .suggestByPreferredEmail(a, b, limit - matches.size())) { addSuggestion(matches, p.getId()); } } if (matches.size() < limit) { for (AccountExternalId e : db.accountExternalIds() .suggestByEmailAddress(a, b, limit - matches.size())) { if (addSuggestion(matches, e.getAccountId())) { queryEmail.put(e.getAccountId(), e.getEmailAddress()); } } } accountLoader.fill(); for (Map.Entry<Account.Id, String> p : queryEmail.entrySet()) { AccountInfo info = matches.get(p.getKey()); if (info != null) { info.email = p.getValue(); } } List<AccountInfo> m = new ArrayList<>(matches.values()); Collections.sort(m, new Comparator<AccountInfo>() { @Override public int compare(AccountInfo a, AccountInfo b) { return ComparisonChain.start() .compare(a.name, b.name, Ordering.natural().nullsLast()) .compare(a.email, b.email, Ordering.natural().nullsLast()) .result(); } }); return m; }
Source:
<code>HttpSolrServer getAnatomyCore() { <START> return new HttpSolrServer("http://localhost:8090/solr" + "/anatomy"); <END> }</code><technical_language>This solrBaseUrl</technical_language>

Target:
HttpSolrServer getAnatomyCore() { return new HttpSolrServer(solrBaseUrl + "/anatomy"); }
Source:
<code><START> public Object doReceive() { <END> Assert.isTrue(this.initialized, "This class is not yet initialized. Invoke its afterPropertiesSet() method"); Assert.notNull(this.queryExpression, "'queryExpression' must not be null"); Object value = this.queryExpression.getValue(this.evaluationContext); Object result; if (value instanceof Query) { result = executeQuery(((Query) value)); } else if (value instanceof String) { result = executeQuery((String) value); } else { throw new IllegalStateException("'queryExpression' must evaluate to String " + "or org.springframework.data.relational.core.query.Query, but not: " + value); } return getMessageBuilderFactory() .withPayload(result); }</code><technical_language>this method public? is receive() MessageSource contract give access for end-user</technical_language>

Target:
protected Object doReceive() { Assert.isTrue(this.initialized, "This class is not yet initialized. Invoke its afterPropertiesSet() method"); Mono<?> queryMono = Mono.fromSupplier(() -> this.queryExpression.getValue(this.evaluationContext)); if (this.expectSingleResult) { return queryMono.flatMap(this::selectOne); } return queryMono.flatMapMany(this::select); }
Source:
<code>public Optional<PassengerData> from(DataHolder dataHolder) { if (dataHolder instanceof EntityLivingBase) { final SpongePassengerData passengerData = new SpongePassengerData(); final Entity vehicle = (Entity) ((EntityLivingBase) dataHolder).ridingEntity; <START> final Entity baseVehicle = (Entity) ((EntityLivingBase) dataHolder).ridingEntity; <END> return Optional.<PassengerData>of(passengerData.setVehicle(vehicle).setBaseVehicle(baseVehicle)); } else { return Optional.absent(); } }</code><technical_language>ridingEntity here</technical_language>

Target:
public Optional<PassengerData> from(DataHolder dataHolder) { if (supports(dataHolder)) { final SpongePassengerData passengerData = new SpongePassengerData(); final Entity vehicle = (Entity) ((net.minecraft.entity.Entity) dataHolder).ridingEntity; net.minecraft.entity.Entity currentEntity = (net.minecraft.entity.Entity) vehicle; while (currentEntity != null && currentEntity.isRiding()) { currentEntity = currentEntity.ridingEntity; } final Entity baseVehicle = (Entity) currentEntity; return Optional.<PassengerData>of(passengerData.setVehicle(vehicle).setBaseVehicle(baseVehicle)); } else { return Optional.absent(); } }
Source:
<code>private boolean isEmulator() { String fingerprint = Build.FINGERPRINT; <START> if (fingerprint == null) { <END> return false; } return fingerprint.startsWith("unknown") || fingerprint.contains("generic") || fingerprint.contains("vbox"); }</code><technical_language>Is this a case added here, in a separate PR</technical_language>

Target:
private boolean isEmulator() { String fingerprint = buildInfo.getFingerprint(); return fingerprint.startsWith("unknown") || fingerprint.contains("generic") || fingerprint.contains("vbox"); }
Source:
<code>protected Application getApplicationOr404(Map<String, Application> registry, String application) { if (!registry.containsKey(application)) throw new WebApplicationException(Response.Status.NOT_FOUND); Application current = registry.get(application); <START> if (current.getStatus() != Application.Status.RUNNING) <END> throw new WebApplicationException(Response.Status.NOT_ACCEPTABLE); return current; }</code><technical_language>Do want return running apps? apps starting stopping? context this method is in though..</technical_language>

Target:
protected Application getApplicationOr404(Map<String, Application> registry, String application) { if (!registry.containsKey(application)) throw notFound("Application '%s' not found.", application); return registry.get(application); }
Source:
<code>public void testMultiMapPutAllAsyncMap() throws InterruptedException { Map<String, Collection<? extends Integer>> expectedMultiMap1 = new HashMap<>(); <START> expectedMultiMap1.put("A", new ArrayList<Integer>(Arrays.asList(1, 1, 1, 1, 2))); <END> expectedMultiMap1.put("B", new ArrayList<Integer>(Arrays.asList(6, 6, 6, 9))); expectedMultiMap1.put("C", new ArrayList<Integer>(Arrays.asList(10, 10, 10, 10, 10, 15))); testMultiMapPutAllTemplate(testMultiMapPutAllSetup(), expectedMultiMap1, (o) -> { o.putAllAsync(expectedMultiMap1); } ); }</code><technical_language>minor: diamond operator instead of <Integer> (here a more places below)</technical_language>

Target:
public void testMultiMapPutAllAsyncMap() throws InterruptedException { Map<String, Collection<? extends Integer>> expectedMultiMap = new HashMap<>(); expectedMultiMap.put("A", new ArrayList<>(Arrays.asList(1, 1, 1, 1, 2))); expectedMultiMap.put("B", new ArrayList<>(Arrays.asList(6, 6, 6, 9))); expectedMultiMap.put("C", new ArrayList<>(Arrays.asList(10, 10, 10, 10, 10, 15))); testMultiMapPutAllTemplate(testMultiMapPutAllSetup(), expectedMultiMap, (o) -> { o.putAllAsync(expectedMultiMap); } ); }
Source:
<code>public boolean isSupported() { boolean supported = false; if (!daos.isEmpty()) { for (I18NDAO<?> dao : daos.values()) { if (dao.isSupported()) { supported = dao.isSupported(); } } } return supported; <START> } <END></code><technical_language>a broken indentation. short-circuit loop: java public boolean isSupported() { if (!daos.isEmpty()) { for (I18NDAO<?> dao : daos.values()) { if (dao.isSupported()) { return true; } } } return false; }</technical_language>

Target:
public boolean isSupported() { if (!daos.isEmpty()) { for (I18NDAO<?> dao : daos.values()) { if (dao.isSupported()) { return true; } } } return false; }
Source:
<code>public static int getCdDeviceIndex(String cdInterface) { if ("scsi".equals(cdInterface)) { return 0; } else if ("ide".equals(cdInterface)) { return 2; } else if ("sata".equals(cdInterface)) { return 0; } <START> return -1; <END> }</code><technical_language>replacing switch-case statement</technical_language>

Target:
public static int getCdDeviceIndex(String cdInterface) { switch (cdInterface) { case "scsi": return 0; case "ide": return 2; case "sata": return 0; default: return -1; } }
Source:
<code>private void addMessage(Message message) { <START> StringBuilder line = new StringBuilder(127); <END> line.append(message.getMessage()); String subMessage = message.getSubMessage(); if (subMessage != null) { line.append(": "); line.append(subMessage); } messages.add(line.toString()); long offset = message.getOffset(); if (offset > -1) { messages.add("Offset: " + offset); } }</code><technical_language>"calculate" this of 127</technical_language>

Target:
private void addMessage(Message message) { StringBuilder line = new StringBuilder(127); line.append(message.getMessage()); String subMessage = message.getSubMessage(); if (Objects.nonNull(subMessage)) { line.append(": "); line.append(subMessage); } messages.add(line.toString()); long offset = message.getOffset(); if (offset > -1) { messages.add("Offset: " + offset); } }
Source:
<code>private StoppableCheck performCustomInstanceCheck(String clusterId, String instanceName, String baseUrl, Map<String, String> customPayLoads) { LOG.info("Perform instance level client side health checks for {}/{}", clusterId, instanceName); MetricRegistry metrics = SharedMetricRegistries.getOrCreate(_namespace); Counter requestsTotal = metrics.counter(CUSTOM_INSTANCE_CHECK_HTTP_REQUESTS_TOTAL); <START> Counter errorRequestsTotal = metrics.counter(CUSTOM_INSTANCE_CHECK_HTTP_REQUESTS_ERROR_TOTAL); <END> try (final Timer.Context timer = metrics.timer(CUSTOM_INSTANCE_CHECK_HTTP_REQUEST_DURATION) .time()) { requestsTotal.inc(); Map<String, Boolean> instanceStoppableCheck = _customRestClient.getInstanceStoppableCheck(baseUrl, customPayLoads); return new StoppableCheck(instanceStoppableCheck, StoppableCheck.Category.CUSTOM_INSTANCE_CHECK); } catch (IOException ex) { LOG.error("Custom client side instance level health check for {}/{} failed.", clusterId, instanceName, ex); errorRequestsTotal.inc(); return new StoppableCheck(false, Collections.singletonList(instanceName), StoppableCheck.Category.CUSTOM_INSTANCE_CHECK); } }</code><technical_language>nit: variable name consistent metric name avoid misuse</technical_language>

Target:
private StoppableCheck performCustomInstanceCheck(String clusterId, String instanceName, String baseUrl, Map<String, String> customPayLoads) { LOG.info("Perform instance level client side health checks for {}/{}", clusterId, instanceName); MetricRegistry metrics = SharedMetricRegistries.getOrCreate(_namespace); try (final Timer.Context timer = metrics.timer(CUSTOM_INSTANCE_CHECK_HTTP_REQUESTS_DURATION) .time()) { Map<String, Boolean> instanceStoppableCheck = _customRestClient.getInstanceStoppableCheck(baseUrl, customPayLoads); return new StoppableCheck(instanceStoppableCheck, StoppableCheck.Category.CUSTOM_INSTANCE_CHECK); } catch (IOException ex) { LOG.error("Custom client side instance level health check for {}/{} failed.", clusterId, instanceName, ex); metrics.counter(CUSTOM_INSTANCE_CHECK_HTTP_REQUESTS_ERROR_TOTAL).inc(); return new StoppableCheck(false, Collections.singletonList(instanceName), StoppableCheck.Category.CUSTOM_INSTANCE_CHECK); } }
Source:
<code>public Request authenticate(Route route, final Response response) throws IOException { logger.warn(response.toString()); if (!response.peekBody(200).string().contains("token_expired")) { return null; } PrefManager pref = new PrefManager(context, PrefManager.Pref.LOGIN); refreshAccessToken(pref); return response.request().newBuilder() <START> .header("Authorization", "Bearer " + pref.getCurrentAuth().access_token) <END> .build(); }</code><technical_language>need token type (e.g. "Bearer") saved token. Apparently changing</technical_language>

Target:
public Request authenticate(Route route, final Response response) throws IOException { logger.warn(response.toString()); if (!isTokenExpired(response.peekBody(200).string())) { return null; } PrefManager pref = new PrefManager(context, PrefManager.Pref.LOGIN); refreshAccessToken(pref); return response.request().newBuilder() .header("Authorization", pref.getCurrentAuth().token_type + " " + pref.getCurrentAuth().access_token) .build(); }
Source:
<code>public void testDontOverwriteSessionTokenForCurrentUser() throws Exception { ParseUser.State sessionTokenState = new ParseUser.State.Builder() .sessionToken("sessionToken") .build(); ParseUser.State emptyState = new ParseUser.State.Builder().build(); ParseUser user = ParseObject.from(sessionTokenState); user.setIsCurrentUser(true); <START> Assert.assertEquals(user.getSessionToken(), "sessionToken"); <END> user.setState(emptyState); Assert.assertEquals(user.getSessionToken(), "sessionToken"); user.setIsCurrentUser(false); user.setState(emptyState); Assert.assertNull(user.getSessionToken()); }</code><technical_language>nit: able static imports. java import static org.junit.Assert.assertEquals;</technical_language>

Target:
public void testDontOverwriteSessionTokenForCurrentUser() throws Exception { ParseUser.State sessionTokenState = new ParseUser.State.Builder() .sessionToken("sessionToken") .put("key0", "value0") .put("key1", "value1") .isComplete(true) .build(); ParseUser.State newState = new ParseUser.State.Builder() .put("key0", "newValue0") .put("key2", "value2") .isComplete(true) .build(); ParseUser.State emptyState = new ParseUser.State.Builder().isComplete(true).build(); ParseUser user = ParseObject.from(sessionTokenState); user.setIsCurrentUser(true); assertEquals(user.getSessionToken(), "sessionToken"); assertEquals(user.getString("key0"), "value0"); assertEquals(user.getString("key1"), "value1"); user.setState(newState); assertEquals(user.getSessionToken(), "sessionToken"); assertEquals(user.getString("key0"), "newValue0"); assertNull(user.getString("key1")); assertEquals(user.getString("key2"), "value2"); user.setIsCurrentUser(false); user.setState(emptyState); assertNull(user.getSessionToken()); assertNull(user.getString("key0")); assertNull(user.getString("key1")); assertNull(user.getString("key2")); }
Source:
<code><START> protected TestMemorySmoke() <END> { super(MemoryQueryRunner::createQueryRunner); }</code><technical_language>This technically public a public class for TestNG execute. (it apparently bypasses privilege checks reflection</technical_language>

Target:
public TestMemorySmoke() { super(MemoryQueryRunner::createQueryRunner); }
Source:
<code>public List<TreeNode> getTreeNodesForParentKey(String searchParentKey) { String wikiName = getWikiName(searchParentKey); LOGGER.trace("getNotMappedMenuItemsFromDatabase: for cacheKey [{}].", wikiName); if (!menuItems.containsKey(wikiName)) { loadMenuForWiki(wikiName); } if (menuItems.containsKey(wikiName) && (menuItems.get(wikiName) != null) && (menuItems.get(wikiName).get(searchParentKey) != null)){ return menuItems.get(wikiName).get(searchParentKey); <START> } <END> return Collections.emptyList(); }</code><technical_language>This if block is thread safe. If loadMenuForWiki flushMenuItemCache called other threads in statements, data inconsistency NPEs occur. I suggest changes: Map<String, List<TreeNode>> wikiMenu = menuItems.get(wikiName); if (wikiMenu == null) { wikiMenu = loadMenuForWiki(wikiName); } if (wikiMenu.containsKey(searchParentKey)) { return wikiMenu.get(searchParentKey); } loadMenuForWiki in this case return loaded</technical_language>

Target:
public List<TreeNode> getTreeNodesForParentKey(String searchParentKey) { String wikiName = getWikiName(searchParentKey); LOGGER.trace("getNotMappedMenuItemsFromDatabase: for cacheKey [{}].", wikiName); Map<String, List<TreeNode>> wikiMenu = internalGetMenuItemsForWiki(wikiName); if (wikiMenu == null) { wikiMenu = loadMenuForWiki(wikiName); } if (wikiMenu.containsKey(searchParentKey)) { return wikiMenu.get(searchParentKey); } return Collections.emptyList(); }
Source:
<code>public boolean decide(final Attributes attributes) { <START> Serializable value = attributes.getOrDefault(attribute, 0); <END> if (!(value instanceof Number)) { throw new RuntimeException("Expecting a number as the value of "+attribute+" but got "+value +" of type "+value.getClass().getSimpleName()); } final double valueAsDouble = ((Number) value).doubleValue(); return valueAsDouble > threshold; }</code><technical_language>0 here, opposed Double.MIN_VALUE? Attributes legitimately a of 0</technical_language>

Target:
public boolean decide(final Attributes attributes) { Serializable value = attributes.get(attribute); if (value == null) value = 0; if (!(value instanceof Number)) { throw new RuntimeException("Expecting a number as the value of "+attribute+" but got "+value +" of type "+value.getClass().getSimpleName()); } final double valueAsDouble = ((Number) value).doubleValue(); return valueAsDouble > threshold; }
Source:
<code>public List<String> listDeviceIDsByEmail(@Scope(OAuthScope.ADMINISTRATION_READ) final AccessToken accessToken, @QueryParam("email") String email) { LOGGER.debug("Searching devices for email = {}", email); Optional<Long> accountId = getAccountIdByEmail(email); if (!accountId.isPresent()) { <START> throw new WebApplicationException(Response.Status.NOT_FOUND); <END> } final List<DeviceAccountPair> devices = deviceDAO.getDeviceAccountMapFromAccountId(accountId.get()); final List<String> deviceIdList = new ArrayList<>(); for (DeviceAccountPair pair: devices) { deviceIdList.add(pair.externalDeviceId); } return deviceIdList; }</code><technical_language>I suggest logging here. LOGGER.warn("ID for account {}", email);</technical_language>

Target:
public List<String> listDeviceIDsByEmail(@Scope(OAuthScope.ADMINISTRATION_READ) final AccessToken accessToken, @QueryParam("email") String email) { LOGGER.debug("Searching devices for email = {}", email); Optional<Long> accountId = getAccountIdByEmail(email); if (!accountId.isPresent()) { LOGGER.debug("ID not found for account {}", email); throw new WebApplicationException(Response.Status.NOT_FOUND); } final List<DeviceAccountPair> devices = deviceDAO.getDeviceAccountMapFromAccountId(accountId.get()); final List<String> deviceIdList = new ArrayList<>(); for (DeviceAccountPair pair: devices) { deviceIdList.add(pair.externalDeviceId); } return deviceIdList; }
Source:
<code>private IndexDiffData calcIndexDiffData(IProgressMonitor monitor, String jobName, Collection<String> filesToUpdate, Collection<IResource> resourcesToUpdate) throws IOException { EclipseGitProgressTransformer jgitMonitor = new EclipseGitProgressTransformer( monitor); List<String> treeFilterPaths = calcTreeFilterPaths(filesToUpdate); WorkingTreeIterator iterator = null; try { iterator = IteratorService.createInitialIterator(repository); } catch (IllegalStateException e) { return null; <START> } <END> IndexDiff diffForChangedResources = new IndexDiff(repository, Constants.HEAD, iterator); diffForChangedResources.setFilter(PathFilterGroup .createFromStrings(treeFilterPaths)); diffForChangedResources.diff(jgitMonitor, 0, 0, jobName); return new IndexDiffData(indexDiffData, filesToUpdate, resourcesToUpdate, diffForChangedResources); }</code><technical_language>Is other detect that? Platform.isRunning()</technical_language>

Target:
private IndexDiffData calcIndexDiffData(IProgressMonitor monitor, String jobName, Collection<String> filesToUpdate, Collection<IResource> resourcesToUpdate) throws IOException { EclipseGitProgressTransformer jgitMonitor = new EclipseGitProgressTransformer( monitor); List<String> treeFilterPaths = calcTreeFilterPaths(filesToUpdate); WorkingTreeIterator iterator = IteratorService.createInitialIterator(repository); if (iterator == null) return null; IndexDiff diffForChangedResources = new IndexDiff(repository, Constants.HEAD, iterator); diffForChangedResources.setFilter(PathFilterGroup .createFromStrings(treeFilterPaths)); diffForChangedResources.diff(jgitMonitor, 0, 0, jobName); return new IndexDiffData(indexDiffData, filesToUpdate, resourcesToUpdate, diffForChangedResources); }
Source:
<code>protected SAMSequenceDictionary getDictionaryForMergedBam() { SAMSequenceDictionary finalDict; if (alignedSamFile != null && !alignedSamFile.isEmpty()) { finalDict = SAMSequenceDictionaryExtractor.extractDictionary(alignedSamFile.get(0)); alignedSamFile.stream() .map(SAMSequenceDictionaryExtractor::extractDictionary) .forEach(finalDict::assertSameDictionary); } else { final SeparateEndAlignmentIterator mergingIterator = new SeparateEndAlignmentIterator(this.read1AlignedSamFile, this.read2AlignedSamFile, referenceFasta); finalDict = mergingIterator.getHeader().getSequenceDictionary(); } SAMSequenceDictionary referenceDict = SAMSequenceDictionaryExtractor.extractDictionary(referenceFasta); if (referenceDict == null) { throw new PicardException("No sequence dictionary found for " + referenceFasta.getAbsolutePath() + <START> ". Use CreateSequenceDictionary.jar to create a sequence dictionary."); <END> } return SAMSequenceDictionary.mergeDictionaries(finalDict, referenceDict, matchingDictionaryTags); }</code><technical_language>This message is horribly out of date ;) Picard's CreateSequenceDictionary</technical_language>

Target:
protected SAMSequenceDictionary getDictionaryForMergedBam() { SAMSequenceDictionary finalDict; if (alignedSamFile != null && !alignedSamFile.isEmpty()) { finalDict = SAMSequenceDictionaryExtractor.extractDictionary(alignedSamFile.get(0)); alignedSamFile.stream() .map(SAMSequenceDictionaryExtractor::extractDictionary) .forEach(finalDict::assertSameDictionary); } else { final SeparateEndAlignmentIterator mergingIterator = new SeparateEndAlignmentIterator(this.read1AlignedSamFile, this.read2AlignedSamFile, referenceFasta); finalDict = mergingIterator.getHeader().getSequenceDictionary(); } SAMSequenceDictionary referenceDict = SAMSequenceDictionaryExtractor.extractDictionary(referenceFasta); if (referenceDict == null) { throw new PicardException("No sequence dictionary found for " + referenceFasta.getAbsolutePath() + ". Use Picard's CreateSequenceDictionary to create a sequence dictionary."); } return SAMSequenceDictionary.mergeDictionaries(finalDict, referenceDict, requiredMatchingDictionaryTags); }
Source:
<code>public Response link(@PathParam("itemName") @ApiParam(value = "itemName") String itemName, @PathParam("channelUID") @ApiParam(value = "channelUID") String channelUid) { <START> if (!itemRegistry.isValidItemName(itemName)) { <END> return Response.status(Status.METHOD_NOT_ALLOWED).build(); } itemChannelLinkRegistry.add(new ItemChannelLink(itemName, new ChannelUID(channelUid))); return Response.ok().build(); }</code><technical_language>I do introduce a dependency itemRegistry for this method call. endpoint is creating a link. If content is valid, constructor of ItemChannelLink() complain ChannelLinkRegistry accept link in add()</technical_language>

Target:
public Response link(@PathParam("itemName") @ApiParam(value = "itemName") String itemName, @PathParam("channelUID") @ApiParam(value = "channelUID") String channelUid) { itemChannelLinkRegistry.add(new ItemChannelLink(itemName, new ChannelUID(channelUid))); return Response.ok().build(); }
Source:
<code>private Runnable loadProject(ScannerReport.Metadata reportMetadata, Organization organization) { String reportProjectKey = projectKeyFromReport(reportMetadata); String componentKey = ceTask.getComponentKey(); if (componentKey == null) { throw MessageException.of(format( "Compute Engine task component key is null. Project with UUID %s must have been deleted since report was uploaded. Can not proceed.", ceTask.getComponentUuid())); } ComponentDto dto = toProject(reportProjectKey); analysisMetadata.setProject(new Project(dto.uuid(), dto.getDbKey(), dto.name())); return () -> { if (!componentKey.equals(reportProjectKey)) { throw MessageException.of(format( <START> "ProjectKey in report (%s) is not consistent with projectKey under which the report as been submitted (%s)", <END> reportProjectKey, componentKey)); } if (!dto.getOrganizationUuid().equals(organization.getUuid())) { throw MessageException.of(format("Project is not in the expected organization: %s", organization.getKey())); } if (dto.getMainBranchProjectUuid() != null) { throw MessageException.of("Project should not reference a branch"); } }; }</code><technical_language>s/as been/has been/ (an annoying typo in original too...)</technical_language>

Target:
private Runnable loadProject(ScannerReport.Metadata reportMetadata, Organization organization) { String reportProjectKey = projectKeyFromReport(reportMetadata); String componentKey = ceTask.getComponentKey(); if (componentKey == null) { throw MessageException.of(format( "Compute Engine task component key is null. Project with UUID %s must have been deleted since report was uploaded. Can not proceed.", ceTask.getComponentUuid())); } ComponentDto dto = toProject(reportProjectKey); analysisMetadata.setProject(new Project(dto.uuid(), dto.getDbKey(), dto.name())); return () -> { if (!componentKey.equals(reportProjectKey)) { throw MessageException.of(format( "ProjectKey in report (%s) is not consistent with projectKey under which the report has been submitted (%s)", reportProjectKey, componentKey)); } if (!dto.getOrganizationUuid().equals(organization.getUuid())) { throw MessageException.of(format("Project is not in the expected organization: %s", organization.getKey())); } if (dto.getMainBranchProjectUuid() != null) { throw MessageException.of("Project should not reference a branch"); } }; }
Source:
<code>public List<Header> decodeHeaders(final ByteBuffer src) throws HPackException { final boolean enforceSizeLimit = maxListSize < Integer.MAX_VALUE; int listSize = 0; final List<Header> list = new ArrayList<>(); while (src.hasRemaining()) { final Header header = decodeHeader(src); if (header == null) { break; } if (enforceSizeLimit) { <START> listSize += header.getName().length() * 2; if (header.getValue() != null) { listSize += header.getValue().length() * 2; } listSize += 32; <END> if (listSize >= maxListSize) { throw new HeaderListConstraintException("Maximum header list size exceeded"); } } list.add(header); } return list; }</code><technical_language>I this code duplicates logic constants HPackHeader. Also, multiplying 2</technical_language>

Target:
public List<Header> decodeHeaders(final ByteBuffer src) throws HPackException { final boolean enforceSizeLimit = maxListSize < Integer.MAX_VALUE; int listSize = 0; final List<Header> list = new ArrayList<>(); while (src.hasRemaining()) { final HPackHeader header = decodeHPackHeader(src); if (header == null) { break; } if (enforceSizeLimit) { listSize += header.getTotalSize(); if (listSize >= maxListSize) { throw new HeaderListConstraintException("Maximum header list size exceeded"); } } list.add(new BasicHeader(header.getName(), header.getValue(), header.isSensitive())); } return list; }
Source:
<code>protected void executeTask(ProcessContext process) throws Exception { try (BatchJob job = createJob(process)) { <START> logParameters(process); <END> job.execute(); } }</code><technical_language>done creating job this fail due invalid parameters</technical_language>

Target:
protected void executeTask(ProcessContext process) throws Exception { logParameters(process); try (BatchJob job = createJob(process)) { job.execute(); } }
Source:
<code>public static void runTestListeners(ITestResult tr, List<ITestListener> listeners) { for (ITestListener itl : listeners) { switch (tr.getStatus()) { case ITestResult.SKIP: itl.onTestSkipped(tr); break; case ITestResult.SUCCESS_PERCENTAGE_FAILURE: itl.onTestFailedButWithinSuccessPercentage(tr); break; case ITestResult.FAILURE: if (ITestResult.wasFailureDueToTimeout(tr)) { itl.onTestFailedWithTimeout(tr); } <START> itl.onTestFailure(tr); <END> break; case ITestResult.SUCCESS: itl.onTestSuccess(tr); break; case ITestResult.STARTED: itl.onTestStart(tr); break; default: throw new AssertionError("Unknown status: " + tr.getStatus()); } } }</code><technical_language>In case of timeout failure, onTestFailure called. if default onTestFailedWithTimeout calls onTestFailure previous behavior keept</technical_language>

Target:
public static void runTestListeners(ITestResult tr, List<ITestListener> listeners) { for (ITestListener itl : listeners) { switch (tr.getStatus()) { case ITestResult.SKIP: itl.onTestSkipped(tr); break; case ITestResult.SUCCESS_PERCENTAGE_FAILURE: itl.onTestFailedButWithinSuccessPercentage(tr); break; case ITestResult.FAILURE: if (ITestResult.wasFailureDueToTimeout(tr)) { itl.onTestFailedWithTimeout(tr); } else { itl.onTestFailure(tr); } break; case ITestResult.SUCCESS: itl.onTestSuccess(tr); break; case ITestResult.STARTED: itl.onTestStart(tr); break; default: throw new AssertionError("Unknown status: " + tr.getStatus()); } } }
Source:
<code>private void requestNewWorker(WorkerResourceSpec workerResourceSpec) { final TaskExecutorProcessSpec taskExecutorProcessSpec = TaskExecutorProcessUtils.processSpecFromWorkerResourceSpec(flinkConfig, workerResourceSpec); final int pendingCount = pendingWorkerCounter.increaseAndGet(workerResourceSpec); log.info("Requesting new worker with resource spec {}, current pending count: {}.", workerResourceSpec, pendingCount); <START> resourceManagerDriver.requestResource(taskExecutorProcessSpec) .whenComplete((worker, exception) -> { if (exception != null) { final int count = pendingWorkerCounter.decreaseAndGet(workerResourceSpec); log.warn("Failed requesting worker with resource spec {}, current pending count: {}, exception: {}", workerResourceSpec, count, exception); requestWorkerIfRequired(); } else { final ResourceID resourceId = worker.getResourceID(); workerNodeMap.put(resourceId, worker); currentAttemptUnregisteredWorkers.put(resourceId, workerResourceSpec); log.info("Requested worker with resource spec {}.", resourceId, workerResourceSpec); } }); <END> }</code><technical_language>good guard unwanted exceptions FutureUtils.assertNoException(...). In this case whenComplete handle returns null</technical_language>

Target:
private void requestNewWorker(WorkerResourceSpec workerResourceSpec) { final TaskExecutorProcessSpec taskExecutorProcessSpec = TaskExecutorProcessUtils.processSpecFromWorkerResourceSpec(flinkConfig, workerResourceSpec); final int pendingCount = pendingWorkerCounter.increaseAndGet(workerResourceSpec); log.info("Requesting new worker with resource spec {}, current pending count: {}.", workerResourceSpec, pendingCount); CompletableFuture<WorkerType> requestResourceFuture = resourceManagerDriver.requestResource(taskExecutorProcessSpec); FutureUtils.assertNoException( requestResourceFuture.handle((worker, exception) -> { if (exception != null) { final int count = pendingWorkerCounter.decreaseAndGet(workerResourceSpec); log.warn("Failed requesting worker with resource spec {}, current pending count: {}, exception: {}", workerResourceSpec, count, exception); requestWorkerIfRequired(); } else { final ResourceID resourceId = worker.getResourceID(); workerNodeMap.put(resourceId, worker); currentAttemptUnregisteredWorkers.put(resourceId, workerResourceSpec); log.info("Requested worker with resource spec {}.", resourceId, workerResourceSpec); } return null; })); }
Source:
<code>public void testInterruptedDuringAcquire() throws Exception { Timing timing = new Timing(); final CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1)); client.start(); final InterProcessMutex lock = new InterProcessMutex(client, LOCK_PATH); final AtomicBoolean interruptOnError = new AtomicBoolean(true); ((CuratorFrameworkImpl)client).debugUnhandledErrorListener = new UnhandledErrorListener() { @Override public void unhandledError(String message, Throwable e) { if(interruptOnError.compareAndSet(true, false)) { Thread.currentThread().interrupt(); } } }; try { client.create().creatingParentsIfNeeded().forPath(LOCK_PATH); } catch(NodeExistsException e) { } try { Thread.currentThread().interrupt(); lock.acquire(); <START> Assert.fail(); <END> } catch(InterruptedException e) { Assert.assertTrue(!lock.isOwnedByCurrentThread()); } try { Assert.assertTrue(lock.acquire(timing.seconds(), TimeUnit.SECONDS)); } catch(Exception e) { Assert.fail(); } finally { if(lock.isOwnedByCurrentThread()) { lock.release(); } } }</code><technical_language>add a message fail(), in case a regression in future</technical_language>

Target:
public void testInterruptedDuringAcquire() throws Exception { Timing timing = new Timing(); final CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1)); client.start(); final InterProcessMutex lock = new InterProcessMutex(client, LOCK_PATH); final AtomicBoolean interruptOnError = new AtomicBoolean(true); ((CuratorFrameworkImpl)client).debugUnhandledErrorListener = new UnhandledErrorListener() { @Override public void unhandledError(String message, Throwable e) { if(interruptOnError.compareAndSet(true, false)) { Thread.currentThread().interrupt(); } } }; try { client.create().creatingParentsIfNeeded().forPath(LOCK_PATH); } catch(NodeExistsException e) { } try { Thread.currentThread().interrupt(); lock.acquire(); Assert.fail("Lock acquisition succeeded when failure was expected"); } catch(InterruptedException e) { Assert.assertFalse(lock.isOwnedByCurrentThread()); } try { Assert.assertTrue(lock.acquire(timing.seconds(), TimeUnit.SECONDS)); } catch(Exception e) { Assert.fail(); } finally { if(lock.isOwnedByCurrentThread()) { lock.release(); } } }
Source:
<code>private void startTagsEdit(GalleryItemFragment item) { <START> startActivityForResult(SuggestedEditsImageTagEditActivity.Companion.newIntent(this, item.getMediaPage()), ACTIVITY_REQUEST_ADD_IMAGE_TAGS); <END> }</code><technical_language>Companion removed</technical_language>

Target:
private void startTagsEdit(GalleryItemFragment item) { startActivityForResult(SuggestedEditsImageTagEditActivity.newIntent(this, item.getMediaPage()), ACTIVITY_REQUEST_ADD_IMAGE_TAGS); }
Source:
<code>public final Option<A> maximumOption(final Ord<A> o) { <START> return headOption().map(x -> maximum(o)); <END> }</code><technical_language>space indentation</technical_language>

Target:
public final Option<A> maximumOption(final Ord<A> o) { return NonEmptyList.fromList(this).map(nel -> nel.maximum(o)); }
Source:
<code>public void testApplication() throws IOException, Exception { try { LocalMode lma = LocalMode.newInstance(); Configuration conf = new Configuration(false); conf.addResource(this.getClass().getResourceAsStream("/META-INF/properties-CassandraInputApplication.xml")); conf.set("dt.operator.CassandraReader.prop.store.node", "localhost"); conf.set("dt.operator.CassandraReader.prop.store.keyspace", KEYSPACE); conf.set("dt.operator.CassandraReader.prop.tablename", TABLE_NAME); lma.prepareDAG(new Application(), conf); LocalMode.Controller lc = lma.getController(); <START> lc.run(10000); END> ((StramLocalCluster)lc).setExitCondition(new Callable<Boolean>() { @Override public Boolean call() throws Exception { if (getNumOfEventsInStore() == 10) { return true; } return false; } }); } catch (ConstraintViolationException e) { Assert.fail("constraint violations: " + e.getConstraintViolations()); } }</code><technical_language>This run for 10 secs end. Do this set exit condition</technical_language>

Target:
public void testApplication() throws IOException, Exception { try { LocalMode lma = LocalMode.newInstance(); Configuration conf = new Configuration(false); conf.addResource(this.getClass().getResourceAsStream("/META-INF/properties-CassandraInputApplication.xml")); conf.set("dt.operator.CassandraReader.prop.store.node", "localhost"); conf.set("dt.operator.CassandraReader.prop.store.keyspace", KEYSPACE); conf.set("dt.operator.CassandraReader.prop.tablename", TABLE_NAME); lma.prepareDAG(new Application(), conf); LocalMode.Controller lc = lma.getController(); ((StramLocalCluster)lc).setExitCondition(new Callable<Boolean>() { @Override public Boolean call() throws Exception { if (getNumOfEventsInStore() == 10) { return true; } return false; } }); lc.run(10000); Assert.assertEquals(10, getNumOfEventsInStore()); } catch (ConstraintViolationException e) { Assert.fail("constraint violations: " + e.getConstraintViolations()); } }
Source:
<code>public void getDescription_BothOldAndNewAnnotations() throws NoSuchMethodException { <START> String actualResult = getDescriptionWithMethodNameAndParamIndex(TEST_METHOD_9, FIRST_INDEX); <END> assertEquals(SECOND_DESCRIPTION_METHOD_ANNOTATION, actualResult); }</code><technical_language>Abbreviation for variable name: Result -> res. abbreviation rules</technical_language>

Target:
public void getDescription_BothOldAndNewAnnotations() throws NoSuchMethodException { String actualRes = getDescriptionWithMethodNameAndParamIndex(TEST_METHOD_9, FIRST_INDEX); assertEquals(SECOND_DESCRIPTION_METHOD_ANNOTATION, actualRes); }