auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public int findAtBPartsAvailabilityLevel(IAcquisitionWork acquisition, StringBuilder reportBuilder) { <START> AtBContract contract = acquisition != null ? getAttachedAtBContract(acquisition.getUnit()) : null; <END> for (Mission m : getMissions()) { if (m.isActive() && m instanceof AtBContract && ((AtBContract) m).getStartDate().isBefore(currentDay)) { if (null == contract || ((AtBContract) m).getPartsAvailabilityLevel() > contract.getPartsAvailabilityLevel()) { contract = (AtBContract) m; } } } if (null != contract && contract.getStartDate().isBefore(currentDay)) { if (reportBuilder != null) { reportBuilder.append(contract.getPartsAvailabilityLevel() + " (" + contract.getType() +")"); } return contract.getPartsAvailabilityLevel(); } Person adminLog = findBestInRole(Person.T_ADMIN_LOG, SkillType.S_ADMIN); int adminLogExp = (adminLog == null) ? SkillType.EXP_ULTRA_GREEN : adminLog.getSkill(SkillType.S_ADMIN).getExperienceLevel(); int adminMod = adminLogExp - SkillType.EXP_REGULAR; if (reportBuilder != null) { reportBuilder.append(getUnitRatingMod() + "(unit rating)"); if(adminLog != null) { reportBuilder.append(adminMod + "(" + adminLog.getFullName() +", logistics admin)"); } else { reportBuilder.append(adminMod + "(no logistics admin)"); } } return getUnitRatingMod() + adminMod; }</code><technical_language>suggestion AtBContract contract = (acquisition != null) ? getAttachedAtBContract(acquisition.getUnit()) : null;</technical_language>

Target:
public int findAtBPartsAvailabilityLevel(IAcquisitionWork acquisition, StringBuilder reportBuilder) { AtBContract contract = (acquisition != null) ? getAttachedAtBContract(acquisition.getUnit()) : null; if (hasActiveContract()) { for (Contract c : getActiveContracts()) { if ((c instanceof AtBContract) && ((contract == null) || (((AtBContract) c).getPartsAvailabilityLevel() > contract.getPartsAvailabilityLevel()))) { contract = (AtBContract) c; } } } if ((null != contract) && getLocalDate().isBefore(contract.getStartDate())) { if (reportBuilder != null) { reportBuilder.append(contract.getPartsAvailabilityLevel() + " (" + contract.getType() +")"); } return contract.getPartsAvailabilityLevel(); } Person adminLog = findBestInRole(Person.T_ADMIN_LOG, SkillType.S_ADMIN); int adminLogExp = (adminLog == null) ? SkillType.EXP_ULTRA_GREEN : adminLog.getSkill(SkillType.S_ADMIN).getExperienceLevel(); int adminMod = adminLogExp - SkillType.EXP_REGULAR; if (reportBuilder != null) { reportBuilder.append(getUnitRatingMod() + "(unit rating)"); if (adminLog != null) { reportBuilder.append(adminMod + "(" + adminLog.getFullName() +", logistics admin)"); } else { reportBuilder.append(adminMod + "(no logistics admin)"); } } return getUnitRatingMod() + adminMod; }
Source:
<code>protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { HttpServletRequest httpRequest = (HttpServletRequest) request; String path = httpRequest.getServletPath(); <START> if (path.startsWith("/search/") || path.startsWith("/oauth/token") || path.startsWith("/experimental_rdf_v1/") || path.startsWith("/static/identifierTypes.xsl")) { <END> filterChain.doFilter(request, response); } else { Matcher matcher = VERSION_PATTERN.matcher(path); String version = null; if (matcher.lookingAt()) { version = matcher.group(1); } if (PojoUtil.isEmpty(version)) { if (Features.PUB_API_2_0_BY_DEFAULT.isActive()) { String baseUrl = orcidUrlManager.getPubBaseUrl(); String redirectUri = baseUrl + "/v2.0" + path; response.sendRedirect(redirectUri); } else { filterChain.doFilter(request, response); } } else { filterChain.doFilter(request, response); } } }</code><technical_language>path.startsWith("/resources/swagger.json") ? good if directory</technical_language>

Target:
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { HttpServletRequest httpRequest = (HttpServletRequest) request; String path = httpRequest.getServletPath(); if (path.startsWith("/resources/") || path.startsWith("/search/") || path.startsWith("/oauth/token") || path.startsWith("/experimental_rdf_v1/") || path.startsWith("/static/")) { filterChain.doFilter(request, response); } else { Matcher matcher = VERSION_PATTERN.matcher(path); String version = null; if (matcher.lookingAt()) { version = matcher.group(1); } if (PojoUtil.isEmpty(version)) { if (Features.PUB_API_2_0_BY_DEFAULT.isActive()) { String baseUrl = orcidUrlManager.getPubBaseUrl(); String redirectUri = baseUrl + "/v2.0" + path; response.sendRedirect(redirectUri); } else { filterChain.doFilter(request, response); } } else { filterChain.doFilter(request, response); } } }
Source:
<code>public Response getPolicy(@PathParam("tenant") String tenant, @PathParam("subject") String subject, @PathParam("policyId") String policyId) { <START> LOGGER.debug("Getting policy with id [" + policyId + "] for [" + tenant + "] and subject [" + subject + "]"); <END> String id = URLEncoding.decode(policyId); Policy p = dao.loadPolicy(tenant, subject, id); if (p != null) { return Response.ok(p.getPolicy()).build(); } else { return Response.status(404).build(); } }</code><technical_language><LINK_0></technical_language>

Target:
public Response getPolicy(@PathParam("tenant") String tenant, @PathParam("subject") String subject, @PathParam("policyId") String policyId) { LOGGER.debug("Getting policy with id for and subject [{}]", policyId, tenant, subject); String id = URLEncoding.decode(policyId); Policy p = dao.loadPolicy(tenant, subject, id); if (p != null) { return Response.ok(p.getPolicy()).build(); } else { return Response.status(404).build(); } }
Source:
<code>public static JavaArchive createDeployment() { final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, MODULE_NAME + ".jar"); jar.addPackage(UserTransactionAccessTestCase.class.getPackage()); <START> jar.as(ZipExporter.class).exportTo(new File(TestSuiteEnvironment.getTmpDir(), jar.getName()), true); <END> return jar; }</code><technical_language>I this deleted, is reason export archive</technical_language>

Target:
public static JavaArchive createDeployment() { final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, MODULE_NAME + ".jar"); jar.addPackage(UserTransactionAccessTestCase.class.getPackage()); return jar; }
Source:
<code>protected String getId() { <START> return "IAR compiler 6.X (C/C++)"; <END> }</code><technical_language>This break existing installations. Revert name</technical_language>

Target:
protected String getId() { return "IAR compiler (C/C++)"; }
Source:
<code>public <T> T construct(Class<T> componentType) { if (globalConfiguration.security().authorization().enabled()) <START> return (T) new GlobalSecurityManagerImpl(); <END> else return null; }</code><technical_language>I recommend componentType.cast(new GlobalSecurityManagerImpl()); instead</technical_language>

Target:
public <T> T construct(Class<T> componentType) { if (globalConfiguration.security().authorization().enabled()) return componentType.cast(new GlobalSecurityManagerImpl()); else return null; }
Source:
<code>public void findByUserNameShouldFindUserForRegisteredUserName() { UserEntity registeredUser = repository.findByUserName(REGISTERED_USER_NAME); assertThat(registeredUser, notNullValue()); assertThat(registeredUser.getUserName(),is(REGISTERED_USER_NAME)); assertThat(registeredUser.getId(), is(1L)); <START> assertThat(registeredUser.getUserPassword(), is("$2a$04$6r2eBlucnE3/m0fDYgE3e.eI5akUx55qPMID3O/SlptCIqOFFcCPK")); <END> }</code><technical_language>password is in named constant above. Please instead</technical_language>

Target:
public void findByUserNameShouldFindUserForRegisteredUserName() { UserEntity registeredUser = repository.findByUserName(REGISTERED_USER_NAME); assertThat(registeredUser, notNullValue()); assertThat(registeredUser.getUserName(),is(REGISTERED_USER_NAME)); assertThat(registeredUser.getId(), is(1L)); assertThat(registeredUser.getUserPassword(), is(REGISTERED_USER_PASSWORD)); }
Source:
<code>private void onApiAvailable() { if (mApi == null) { Log.e(TAG, "onApiAvailable: Did we stop the binary during startup? mApi == null"); return; } synchronized (mStateLock) { if (mCurrentState != State.STARTING) { Log.e(TAG, "onApiAvailable: Wrong state " + mCurrentState + " detected. Cancelling callback."); return; } onServiceStateChange(State.ACTIVE); } if (mDestroyScheduled) { mDestroyScheduled = false; stopSelf(); return; } if (mEventProcessor == null) { mEventProcessor = new EventProcessor(SyncthingService.this, mApi); } <START> mEventProcessor.start(); <END> }</code><technical_language>Do want double start if exists</technical_language>

Target:
private void onApiAvailable() { if (mApi == null) { Log.e(TAG, "onApiAvailable: Did we stop the binary during startup? mApi == null"); return; } synchronized (mStateLock) { if (mCurrentState != State.STARTING) { Log.e(TAG, "onApiAvailable: Wrong state " + mCurrentState + " detected. Cancelling callback."); return; } onServiceStateChange(State.ACTIVE); } if (mDestroyScheduled) { mDestroyScheduled = false; stopSelf(); return; } if (mEventProcessor == null) { mEventProcessor = new EventProcessor(SyncthingService.this, mApi); mEventProcessor.start(); } }
Source:
<code>public void createNetworkSecurityRule() throws InterruptedException { NetworkSecurityRule rule = createRule(); server.enqueue(jsonResponse("/networksecurityrulecreate.json").setResponseCode(200)); final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME); String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/securityRules/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, rule.name(), apiVersion); NetworkSecurityRule result = ruleApi.createOrUpdate(rule.name(), rule.properties()); <START> assertSent(server, "PUT", path); <END> assertNotNull(result); assertEquals(result.name(), rule.name()); }</code><technical_language>Verify generated body</technical_language>

Target:
public void createNetworkSecurityRule() throws InterruptedException { NetworkSecurityRule rule = createRule(); server.enqueue(jsonResponse("/networksecurityrulecreate.json").setResponseCode(200)); final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME); String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/securityRules/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, rule.name(), apiVersion); NetworkSecurityRule result = ruleApi.createOrUpdate(rule.name(), rule.properties()); String json = String.format("{\"properties\":%s}", new Gson().toJson(rule.properties())); assertSent(server, "PUT", path, json); assertNotNull(result); assertEquals(result.name(), rule.name()); }
Source:
<code>public void executeCommand() { boolean mergeRunning = false; try { <START> updateVolumeDescription(); <END> VDSReturnValue vdsReturnValue = runVdsCommand(VDSCommandType.Merge, createVDSParameters()); if (vdsReturnValue.getSucceeded()) { Guid jobId = (Guid) vdsReturnValue.getReturnValue(); persistBlockJobPlaceholder(jobId); getParameters().setVmJobId(jobId); persistCommand(getParameters().getParentCommand(), true); log.debug("Merge started successfully"); mergeRunning = true; } else { log.error("Failed to start Merge on VDS"); } } catch (EngineException e) { log.error("Engine exception thrown while sending merge command", e); if (e.getErrorCode() == EngineError.imageErr || e.getErrorCode() == EngineError.mergeErr) { mergeRunning = true; } } finally { if (mergeRunning) { setSucceeded(true); } else { setCommandStatus(CommandStatus.FAILED); } } }</code><technical_language>image description is a nicety more else. expect this done merge is finished volume is removed</technical_language>

Target:
public void executeCommand() { boolean mergeRunning = false; try { VDSReturnValue vdsReturnValue = runVdsCommand(VDSCommandType.Merge, createVDSParameters()); if (vdsReturnValue.getSucceeded()) { Guid jobId = (Guid) vdsReturnValue.getReturnValue(); persistBlockJobPlaceholder(jobId); getParameters().setVmJobId(jobId); persistCommand(getParameters().getParentCommand(), true); log.debug("Merge started successfully"); mergeRunning = true; updateVolumeDescription(); } else { log.error("Failed to start Merge on VDS"); } } catch (EngineException e) { log.error("Engine exception thrown while sending merge command", e); if (e.getErrorCode() == EngineError.imageErr || e.getErrorCode() == EngineError.mergeErr) { mergeRunning = true; } } finally { if (mergeRunning) { setSucceeded(true); } else { setCommandStatus(CommandStatus.FAILED); } } }
Source:
<code>public boolean violates(Constraint other, Action.ActionEffect actionEffect) { if (other instanceof PatternScopedConstraint) { PatternScopedConstraint psc = (PatternScopedConstraint) other; if (user) { assert !psc.user : "illegal comparison"; if (!readOnly) { if (!global) { if (actionEffect == Action.ActionEffect.WRITE_RUNTIME || actionEffect == Action.ActionEffect.WRITE_CONFIG) { Set<Pattern> ourPatterns = patternsHolder.patterns; String theTarget = psc.target; boolean anyMatch = anyMatch(ourPatterns, theTarget); if (!anyMatch) ControllerLogger.ACCESS_LOGGER.tracef("pattern constraint violated " + <START> "for action %s due to no match between target %s and allowed patterns %s", <END> actionEffect, theTarget, ourPatterns); return !anyMatch; } } } } else { assert psc.user : "illegal comparison"; return other.violates(this, actionEffect); } } return false; }</code><technical_language>possibly leak information, if patterns target non-addressable resources? unlikely, possibility occured immediately :-)</technical_language>

Target:
public boolean violates(Constraint other, Action.ActionEffect actionEffect) { if (other instanceof PatternScopedConstraint) { PatternScopedConstraint psc = (PatternScopedConstraint) other; if (user) { assert !psc.user : "illegal comparison"; if (!readOnly) { if (!global) { if (actionEffect == Action.ActionEffect.WRITE_RUNTIME || actionEffect == Action.ActionEffect.WRITE_CONFIG) { Set<Pattern> ourPatterns = patternsHolder.patterns; String theTarget = psc.target; boolean anyMatch = anyMatch(ourPatterns, theTarget); if (!anyMatch) { ControllerLogger.ACCESS_LOGGER.tracef("pattern constraint violated " + "for action %s due to no match between target and allowed patterns", actionEffect); } return !anyMatch; } } } } else { assert psc.user : "illegal comparison"; return other.violates(this, actionEffect); } } return false; }
Source:
<code>public void testFilterWithWrongString() { mockFilterObserver.setName("WRONG"); <START> assert mockFilterObserver.getFilteredInstalledApplications().size() == 0; <END> }</code><technical_language>JUnit assertEquals please</technical_language>

Target:
public void testFilterWithWrongString() { mockFilterObserver.setName("WRONG"); assertEquals(0, mockFilterObserver.getFilteredInstalledApplications().size()); }
Source:
<code>private void setInitialState(PlexBindingProvider provider) { for (String itemName : provider.getItemNames()) { PlexBindingConfig config = provider.getConfig(itemName); if (config != null) <START> setInitialState(config); <END> } }</code><technical_language>please curly braces this is a Oneliner</technical_language>

Target:
private void setInitialState(PlexBindingProvider provider) { for (String itemName : provider.getItemNames()) { PlexBindingConfig config = provider.getConfig(itemName); if (config != null) { setInitialState(config); } } }
Source:
<code>public void storeInHttpSession(String key, String value) { HttpServletRequest request = this.getThreadLocalRequest(); HttpSession session = request.getSession(); <START> session.setAttribute(key, value); <END> }</code><technical_language>avoid potential clashes other session attributes, I suggest some naming convention for attribute name, for example: ui_{key} Otherwise, allow UI override arbitrary session attribute, potentially other systems/components (not meant accessed UI)</technical_language>

Target:
public void storeInHttpSession(String key, String value) { HttpServletRequest request = this.getThreadLocalRequest(); HttpSession session = request.getSession(); session.setAttribute(UI_PREFIX + key, value); }
Source:
<code>private void doVisitToken(FullIdent ident, boolean isStatic, boolean previous) { final String name = ident.getText(); final int groupIdx = getGroupNumber(name); final int line = ident.getLineNo(); if (groupIdx == lastGroup || !beforeFirstImport && isAlphabeticallySortableStaticImport(isStatic)) { doVisitTokenInSameGroup(isStatic, previous, name, line); } else if (groupIdx > lastGroup) { if (!beforeFirstImport && separated && line - lastImportLine < 2) { log(line, MSG_SEPARATION, name); } } else { log(line, MSG_ORDERING, name); } if (checkSeparatorInGroup(groupIdx, isStatic, line) <START> || checkSeparatorInStaticImport(isStatic, line)) { <END> log(line, MSG_SEPARATED_IN_GROUP, name); } lastGroup = groupIdx; lastImport = name; }</code><technical_language>a question, separate this 2 methods instead of combining 1? named similarly similar parameters. Some conditions 2 too</technical_language>

Target:
private void doVisitToken(FullIdent ident, boolean isStatic, boolean previous) { final String name = ident.getText(); final int groupIdx = getGroupNumber(name); final int line = ident.getLineNo(); if (groupIdx == lastGroup || !beforeFirstImport && isAlphabeticallySortableStaticImport(isStatic)) { doVisitTokenInSameGroup(isStatic, previous, name, line); } else if (groupIdx > lastGroup) { if (!beforeFirstImport && separated && line - lastImportLine < 2) { log(line, MSG_SEPARATION, name); } } else { log(line, MSG_ORDERING, name); } if (isSeparatorInGroup(groupIdx, isStatic, line)) { log(line, MSG_SEPARATED_IN_GROUP, name); } lastGroup = groupIdx; lastImport = name; }
Source:
<code>public DefaultCompactionPolicyTest() throws InterruptedException { Pair<MockBlobStore, StoreConfig> initState = CompactionPolicyTest.initializeBlobStore(properties, time, -1, -1, DEFAULT_MAX_BLOB_SIZE); <START> this.config = initState.getSecond(); <END> this.blobStore = initState.getFirst(); this.mockBlobStoreStats = blobStore.getBlobStoreStats(); this.messageRetentionTimeInMs = config.storeDeletedMessageRetentionDays * Time.HoursPerDay * Time.SecsPerHour * Time.MsPerSec; this.compactionPolicy = new DefaultCompactionPolicy(config, time); }</code><technical_language>minor: this qualifiers required</technical_language>

Target:
public DefaultCompactionPolicyTest() throws InterruptedException { Pair<MockBlobStore, StoreConfig> initState = CompactionPolicyTest.initializeBlobStore(properties, time, -1, -1, DEFAULT_MAX_BLOB_SIZE); config = initState.getSecond(); blobStore = initState.getFirst(); mockBlobStoreStats = blobStore.getBlobStoreStats(); messageRetentionTimeInMs = config.storeDeletedMessageRetentionDays * Time.HoursPerDay * Time.SecsPerHour * Time.MsPerSec; compactionPolicy = new DefaultCompactionPolicy(config, time); }
Source:
<code>public void adDisplayedBeforeSections() { AdsBaseObject ads = new AdsBaseObject(); ads.getUrl(urlWithInstantGlobals(true)); ads.scrollTo(By.id(String.format(ARTICLE_HEADER_SELECTOR, Integer.toString(1)))); Assertion.assertTrue(isIncontenAdDisplayed(1, ads), <START> "IncontentBoxad is not displayed before section" <END> ); ads.scrollTo(By.id(String.format(ARTICLE_HEADER_SELECTOR, Integer.toString(2)))); Assertion.assertFalse(isIncontenAdDisplayed(0, ads), "IncontentBoxad is displayed before section" ); ads.scrollTo(By.id(String.format(ARTICLE_HEADER_SELECTOR, Integer.toString(3)))); Assertion.assertTrue(isIncontenAdDisplayed(2, ads), "IncontentBoxad is not displayed before section" ); ads.scrollTo(By.id(String.format(ARTICLE_HEADER_SELECTOR, Integer.toString(4)))); Assertion.assertTrue(isIncontenAdDisplayed(3, ads), "IncontentBoxad is not displayed before section" ); ads.scrollTo(By.id(String.format(ARTICLE_HEADER_SELECTOR, Integer.toString(5)))); Assertion.assertFalse(isIncontenAdDisplayed(5, ads), "IncontentBoxad is displayed before section" ); ads.scrollTo(By.id(String.format(ARTICLE_HEADER_SELECTOR, Integer.toString(6)))); Assertion.assertFalse(isIncontenAdDisplayed(6, ads), "IncontentBoxad is displayed before section" ); }</code><technical_language>![MINOR](<LINK_1> 'Severity: MINOR') Define a constant instead of duplicating this literal "IncontentBoxad is displayed section" 3 times. [![rule](<LINK_0>](http://sonar-s4/coding_rules#rule_key=squid%3AS1192)</technical_language>

Target:
public void adDisplayedBeforeSections() { AdsBaseObject ads = new AdsBaseObject(); ads.getUrl(urlWithInstantGlobals(true)); ads.scrollTo(By.id(String.format(ARTICLE_HEADER_SELECTOR, Integer.toString(1)))); Assertion.assertTrue(isIncontenAdDisplayed(1, ads), "IncontentBoxad is not displayed before section" ); ads.scrollTo(By.id(String.format(ARTICLE_HEADER_SELECTOR, Integer.toString(3)))); Assertion.assertTrue(isIncontenAdDisplayed(2, ads), "IncontentBoxad is not displayed before section" ); ads.scrollTo(By.id(String.format(ARTICLE_HEADER_SELECTOR, Integer.toString(4)))); Assertion.assertTrue(isIncontenAdDisplayed(3, ads), "IncontentBoxad is not displayed before section" ); ads.scrollTo(By.id(String.format(ARTICLE_HEADER_SELECTOR, Integer.toString(5)))); Assertion.assertFalse(isIncontenAdDisplayed(5, ads), "IncontentBoxad is displayed before section" ); ads.scrollTo(By.id(String.format(ARTICLE_HEADER_SELECTOR, Integer.toString(6)))); Assertion.assertFalse(isIncontenAdDisplayed(6, ads), "IncontentBoxad is displayed before section" ); }
Source:
<code>public void setHandlers(Closure<?> handlers) { <START> this.handlers = this.handlers.leftShift(handlers); <END> }</code><technical_language>Crazy variant of this method meaningful name</technical_language>

Target:
public void setHandlers(Closure<?> handlers) { assertAtTopLevelOfRatpackDsl("handlers"); this.handlers = new ComposedClosure<>(handlers, this.handlers); }
Source:
<code>public void testInvalidReferenceIndex() { final SAMRecord sam = new SAMRecordSetBuilder().addFrag("test", 0, 1, false, false, "3S9M", null, 2); <START> sam.setReferenceIndex(9999); <END> }</code><technical_language>interesting throw invalid reference index, invalid reference name (when is a header). for consistency's sake throw setReferenceName() a header is present reference name is in dictionary? Thoughts</technical_language>

Target:
public void testInvalidReferenceIndex() { final SAMRecord sam = createTestRecordHelper(); sam.setReferenceIndex(9999); }
Source:
<code>private String findQueryToResend(SolrQuery query, QueryResponse solrResponse) { long maxHits = Integer.MIN_VALUE; String queryToResend = query.get("q"); <START> for (SpellCheckResponse.Collation collation : <END> solrResponse.getSpellCheckResponse().getCollatedResults()) { if (maxHits < collation.getNumberOfHits()) { maxHits = collation.getNumberOfHits(); queryToResend = collation.getCollationQueryString(); } } return queryToResend; }</code><technical_language>Import Collation instead of SpellCheckResponse.Collation</technical_language>

Target:
private String findQueryToResend(SolrQuery query, QueryResponse solrResponse) { long maxHits = Integer.MIN_VALUE; String queryToResend = query.get("q"); for (Collation collation : solrResponse.getSpellCheckResponse().getCollatedResults()) { if (maxHits < collation.getNumberOfHits()) { maxHits = collation.getNumberOfHits(); queryToResend = collation.getCollationQueryString(); } } return queryToResend; }
Source:
<code>public void testConcurrentExpensiveJobs() { <START> final ValidationThreadPool pool = new ValidationThreadPool(VALIDATION_THREAD_COUNT); <END> final IJobManager manager = Job.getJobManager(); final Runnable expensiveRunnable = createValidatableRunnable(CheckType.EXPENSIVE, manager); final List<Promise<Object>> validationPromises = Lists.newArrayList(); for (int i = 0; i < 10; i++) { validationPromises.add(pool.submit(CheckType.EXPENSIVE, expensiveRunnable)); } Promise.all(validationPromises).getSync(); }</code><technical_language>Test fixture initialization a @Before method, please convert common variables fields initialize in method</technical_language>

Target:
public void testConcurrentExpensiveJobs() { final IJobManager manager = Job.getJobManager(); final Runnable expensiveRunnable = createValidatableRunnable(CheckType.EXPENSIVE, manager); final List<Promise<Object>> validationPromises = Lists.newArrayList(); for (int i = 0; i < 10; i++) { validationPromises.add(pool.submit(CheckType.EXPENSIVE, expensiveRunnable)); } Promise.all(validationPromises).getSync(); }
Source:
<code><START> public FeatureFlagBuilder(String key) { <END> this.key = key; }</code><technical_language>add a ctor for FeatureFlagBuilder(FeatureFlag f) FeatureFlag immutable</technical_language>

Target:
FeatureFlagBuilder(String key) { this.key = key; }
Source:
<code>private int getFlags() { int flags = 0; if (actionArgs.containsKey("flags")) { for (String f : (List<String>)actionArgs.get("flags")) { if(f.equals("resolve-groups")) { flags += 1; } else if (f.equals("resolve-groups-recursive")) { <START> flags += 2; <END> } } } return flags; }</code><technical_language>do hard code flags</technical_language>

Target:
private int getFlags() { int flags = 0; if (actionArgs.containsKey("flags")) { for (String f : (List<String>)actionArgs.get("flags")) { try { flags |= Authz.QueryFlags.class.getDeclaredField(f.toUpperCase().replace("-", "_")).getInt(new Authz.QueryFlags()); } catch(NoSuchFieldException | IllegalAccessException ex) { logger.error("Flag '{}' was not recognized, it will be ignored.", f); } } } return flags; }
Source:
<code>public Double getValue() { <START> return value; <END> }</code><technical_language>add "this" qualifier</technical_language>

Target:
public Double getValue() { return this.value; }
Source:
<code>protected HttpClient getHttpClient(Integer readTimeout, Integer connectTimeout) { if (getDoCacheClient() && HTTP_CLIENT_API_43) { if (cachedClient != null) { return cachedClient; } else { <START> getNewPooledHttpClient(readTimeout, <END> connectTimeout); } } if (HTTP_CLIENT_API_43) { RequestConfig config = RequestConfig.custom() .setSocketTimeout(readTimeout) .setConnectTimeout(connectTimeout) .setConnectionRequestTimeout(connectTimeout) .build(); HttpClientBuilder clientBuilder = HttpClientBuilder.create() .setDefaultRequestConfig(config); HttpClient httpClient = clientBuilder.build(); return httpClient; } else { DefaultHttpClient httpClient = new DefaultHttpClient(); httpClient.getParams().setIntParameter(CoreConnectionPNames.SO_TIMEOUT, readTimeout); httpClient.getParams().setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, connectTimeout); return httpClient; } }</code><technical_language>this return newly created client? overridden road of this method, it</technical_language>

Target:
protected HttpClient getHttpClient(Integer readTimeout, Integer connectTimeout) { if (getDoCacheClient() && HTTP_CLIENT_API_43) { if (cachedClient == null) { cachedClient = getNewPooledHttpClient(readTimeout, connectTimeout); } return cachedClient; } if (HTTP_CLIENT_API_43) { RequestConfig config = RequestConfig.custom() .setSocketTimeout(readTimeout) .setConnectTimeout(connectTimeout) .setConnectionRequestTimeout(connectTimeout) .build(); HttpClientBuilder clientBuilder = HttpClientBuilder.create() .setDefaultRequestConfig(config); HttpClient httpClient = clientBuilder.build(); return httpClient; } else { DefaultHttpClient httpClient = new DefaultHttpClient(); httpClient.getParams().setIntParameter(CoreConnectionPNames.SO_TIMEOUT, readTimeout); httpClient.getParams().setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, connectTimeout); return httpClient; } }
Source:
<code>private MistTask(final QueryManager queryManager, final CheckpointManager checkpointManager, @Parameter(TaskId.class) final String taskId, @Parameter(TaskHostname.class) final String taskHostname, @Parameter(MasterHostname.class) final String masterHostname, @Parameter(TaskToMasterPort.class) final int taskToMasterPort, final MasterToTaskMessage masterToTaskMessage, final ClientToTaskMessage clientToTaskMessage, final TcpPortProvider tcpPortProvider) throws InjectionException, IOException, InterruptedException { this.countDownLatch = new CountDownLatch(1); this.queryManager = queryManager; <START> final Iterator<Integer> portNumIterator = tcpPortProvider.iterator(); <END> clientToTaskServer = setupRandomPortAvroServer(ClientToTaskMessage.class, clientToTaskMessage, tcpPortProvider); LOG.log(Level.INFO, "Client to task port = " + clientToTaskServer.getPort()); masterToTaskServer = setupRandomPortAvroServer(MasterToTaskMessage.class, masterToTaskMessage, tcpPortProvider); LOG.log(Level.INFO, "Master to task port = " + masterToTaskServer.getPort()); final TaskToMasterMessage proxyToMaster = AvroUtils.createAvroProxy(TaskToMasterMessage.class, new InetSocketAddress(masterHostname, taskToMasterPort)); final TaskInfo taskInfo = TaskInfo.newBuilder() .setTaskId(taskId) .setTaskHostname(taskHostname) .setClientToTaskPort(clientToTaskServer.getPort()) .setMasterToTaskPort(masterToTaskServer.getPort()) .build(); final Thread t = new Thread(new RegisterTaskInfoRunner(proxyToMaster, taskInfo)); t.start(); t.join(); this.checkpointManager = checkpointManager; }</code><technical_language>unused variable</technical_language>

Target:
private MistTask(final QueryManager queryManager, final CheckpointManager checkpointManager, @Parameter(TaskId.class) final String taskId, @Parameter(TaskHostname.class) final String taskHostname, @Parameter(MasterHostname.class) final String masterHostname, @Parameter(TaskToMasterPort.class) final int taskToMasterPort, final MasterToTaskMessage masterToTaskMessage, final ClientToTaskMessage clientToTaskMessage, final TcpPortProvider tcpPortProvider) throws InjectionException, IOException, InterruptedException { this.countDownLatch = new CountDownLatch(1); this.queryManager = queryManager; clientToTaskServer = setupRandomPortAvroServer(ClientToTaskMessage.class, clientToTaskMessage, tcpPortProvider); LOG.log(Level.INFO, "Client to task port = " + clientToTaskServer.getPort()); masterToTaskServer = setupRandomPortAvroServer(MasterToTaskMessage.class, masterToTaskMessage, tcpPortProvider); LOG.log(Level.INFO, "Master to task port = " + masterToTaskServer.getPort()); final TaskToMasterMessage proxyToMaster = AvroUtils.createAvroProxy(TaskToMasterMessage.class, new InetSocketAddress(masterHostname, taskToMasterPort)); final TaskInfo taskInfo = TaskInfo.newBuilder() .setTaskId(taskId) .setTaskHostname(taskHostname) .setClientToTaskPort(clientToTaskServer.getPort()) .setMasterToTaskPort(masterToTaskServer.getPort()) .build(); final Thread t = new Thread(new RegisterTaskInfoRunner(proxyToMaster, taskInfo)); t.start(); t.join(); this.checkpointManager = checkpointManager; }
Source:
<code>protected boolean advance() { this.nextRecord = null; while (this.nextRecord == null && (this.bufferedRecords.hasNext() || bufferNextChunkOfRecords(getTargetProportion(), this.targetAccuracy))) { final SAMRecord rec = this.bufferedRecords.next(); final String key = rec.getReadName(); final Boolean previous = decisions.get(key); <START> final boolean keeper; <END> if (previous == null) { keeper = this.bufferedRecordsToKeep.contains(rec.getReadName()); decisions.put(key, keeper); } else { keeper = previous; } if (keeper) { this.nextRecord = rec; recordAcceptedRecord(rec); } else { recordDiscardedRecord(rec); } } return this.nextRecord != null; }</code><technical_language>I stop thinking a goalie, renaming keepRecord</technical_language>

Target:
protected boolean advance() { this.nextRecord = null; while (this.nextRecord == null && (this.bufferedRecords.hasNext() || bufferNextChunkOfRecords(getTargetProportion(), this.targetAccuracy))) { final SAMRecord rec = this.bufferedRecords.next(); final String key = rec.getReadName(); final Boolean previous = decisions.get(key); final boolean keepThisRecord; if (previous == null) { keepThisRecord = this.bufferedRecordsToKeep.contains(rec.getReadName()); decisions.put(key, keepThisRecord); } else { keepThisRecord = previous; } if (keepThisRecord) { this.nextRecord = rec; recordAcceptedRecord(); } else { recordDiscardedRecord(); } } return this.nextRecord != null; }
Source:
<code>public void handleMessage(Message msg) { AsyncResult ar; if (mDestroyed.get()) { Rlog.e(LOG_TAG, "Received message " + msg + "[" + msg.what + "] while being destroyed. Ignoring."); return; } loge("IsimUiccRecords: handleMessage " + msg + "[" + msg.what + "] "); try { switch (msg.what) { case EVENT_APP_READY: onReady(); break; case <START> EVENT_ISIM_REFRESH: <END> broadcastRefresh(); break; case EVENT_ISIM_AUTHENTICATE_DONE: ar = (AsyncResult)msg.obj; log("EVENT_ISIM_AUTHENTICATE_DONE"); if (ar.exception != null) { log("Exception ISIM AKA: " + ar.exception); } else { try { auth_rsp = (String)ar.result; log("ISIM AKA: auth_rsp = " + auth_rsp); } catch (Exception e) { log("Failed to parse ISIM AKA contents: " + e); } } synchronized (mLock) { mLock.notifyAll(); } break; default: super.handleMessage(msg); } } catch (RuntimeException exc) { Rlog.w(LOG_TAG, "Exception parsing SIM record", exc); } }</code><technical_language>need a separate registration for this? This simply EVENT_SIM_REFRESH, call super.handleMessage() broadcastRefresh()</technical_language>

Target:
public void handleMessage(Message msg) { AsyncResult ar; if (mDestroyed.get()) { Rlog.e(LOG_TAG, "Received message " + msg + "[" + msg.what + "] while being destroyed. Ignoring."); return; } loge("IsimUiccRecords: handleMessage " + msg + "[" + msg.what + "] "); try { switch (msg.what) { case EVENT_APP_READY: onReady(); break; case IccRecords.EVENT_REFRESH: broadcastRefresh(); super.handleMessage(msg); break; case EVENT_ISIM_AUTHENTICATE_DONE: ar = (AsyncResult)msg.obj; log("EVENT_ISIM_AUTHENTICATE_DONE"); if (ar.exception != null) { log("Exception ISIM AKA: " + ar.exception); } else { try { auth_rsp = (String)ar.result; log("ISIM AKA: auth_rsp = " + auth_rsp); } catch (Exception e) { log("Failed to parse ISIM AKA contents: " + e); } } synchronized (mLock) { mLock.notifyAll(); } break; default: super.handleMessage(msg); } } catch (RuntimeException exc) { Rlog.w(LOG_TAG, "Exception parsing SIM record", exc); } }
Source:
<code>public void reserveSeatWithInvalidTicket() { userTicket.setValid(false); ticketRepository.save(userTicket); <START> SessionData login = login("user", userCleartextPassword); <END> given(). filter(sessionFilter). header(login.getCsrfHeader()). when(). param("ticketId", userTicket.getId()). post("/seats/A/1"). then(). statusCode(HttpStatus.SC_BAD_REQUEST); }</code><technical_language>Please username user variable</technical_language>

Target:
public void reserveSeatWithInvalidTicket() { userTicket.setValid(false); ticketRepository.save(userTicket); SessionData login = login(user.getUsername(), userCleartextPassword); given(). filter(sessionFilter). header(login.getCsrfHeader()). when(). param("ticketId", userTicket.getId()). post("/seats/A/1"). then(). statusCode(HttpStatus.SC_BAD_REQUEST); }
Source:
<code>public String display( @CliOption(mandatory = true, key = { "", "name" }, help = "the name of the the module") String name, @CliOption(mandatory = true, key = "type", help = "the type of the module") RESTModuleType moduleType) { try { String moduleConfigurationFile = xdShell.getSpringXDOperations().moduleOperations().displayConfigurationFile( moduleType, name); return moduleConfigurationFile; } <START> catch (HttpClientErrorException e) { <END> if (HttpStatus.NOT_FOUND.equals(e.getStatusCode())) { return e.getResponseBodyAsString(); } throw e; } }</code><technical_language>VndErrors bubble shell</technical_language>

Target:
public String display( @CliOption(mandatory = true, key = { "", "name" }, help = "the name of the the module") String name, @CliOption(mandatory = true, key = "type", help = "the type of the module") RESTModuleType moduleType) { final String configurationFileContents = xdShell.getSpringXDOperations().moduleOperations().displayConfigurationFile( moduleType, name); final StringBuilder sb = new StringBuilder() .append(String.format("Configuration file contents for module definiton '%s' (%s)\n\n", name, moduleType)) .append(UiUtils.HORIZONTAL_LINE) .append(configurationFileContents) .append(UiUtils.HORIZONTAL_LINE); return sb.toString(); }
Source:
<code><START> protected boolean isContainedByBoundType( <END> AnnotatedTypeMirror inside, BoundType outside, boolean canBeCovariant) { if (BoundType.isBoundType(inside)) { BoundType insideBoundType = new BoundType(inside); if (!insideBoundType.hasSuperBound && !outside.hasSuperBound) { return (canBeCovariant || isSubtype(outside.lower, insideBoundType.lower)) && isContainedByBoundType(insideBoundType.upper, outside, canBeCovariant); } else if (outside.hasSuperBound || TypesUtils.isObject(outside.upper.getUnderlyingType())) { return (canBeCovariant || isSubtype(insideBoundType.upper, outside.upper)) && isContainedByBoundType(insideBoundType.lower, outside, canBeCovariant); } } if (BoundType.isBoundType(outside.upper)) { BoundType outsideUpper = new BoundType(outside.upper); Set<AnnotationMirror> setA = AnnotatedTypes.findEffectiveLowerBoundAnnotations( qualifierHierarchy, outsideUpper.lower); Set<AnnotationMirror> setB = AnnotatedTypes.findEffectiveLowerBoundAnnotations( qualifierHierarchy, outside.lower); Set<? extends AnnotationMirror> glb = qualifierHierarchy.greatestLowerBounds(setA, setB); addToLowestBound(outside.lower, glb); return isContainedByBoundType(inside, outsideUpper, canBeCovariant); } else if (BoundType.isBoundType(outside.lower)) { BoundType outsideLower = new BoundType(outside.lower); return isContainedByBoundType(inside, outsideLower, canBeCovariant); } else { if (canBeCovariant) { if (outside.hasSuperBound) { return isSubtype(outside.lower, inside); } else { return isSubtype(inside, outside.upper); } } return isSubtype(outside.lower, inside) && isSubtype(inside, outside.upper); } }</code><technical_language>this need protected, public</technical_language>

Target:
protected boolean isContainedByBoundType( AnnotatedTypeMirror inside, BoundType outside, boolean canBeCovariant) { AnnotatedTypeMirror insideUpperBound; AnnotatedTypeMirror insideLowerBound; if (BoundType.isBoundType(inside)) { BoundType insideBoundType = new BoundType(inside); insideLowerBound = insideBoundType.lower; insideUpperBound = insideBoundType.upper; } else { insideLowerBound = inside; insideUpperBound = inside; } return isSubtype(insideUpperBound, outside.upper) && isSubtype(outside.lower, insideLowerBound); }
Source:
<code><START> private Path createActionTemp(Path execRoot) throws IOException { <END> return execRoot.getRelative( java.nio.file.Files.createTempDirectory( java.nio.file.Paths.get(execRoot.getPathString()), "windows-sandbox.") .getFileName() .toString()); }</code><technical_language>static</technical_language>

Target:
private static Path createActionTemp(Path execRoot) throws IOException { return execRoot.getRelative( java.nio.file.Files.createTempDirectory( java.nio.file.Paths.get(execRoot.getPathString()), "windows-sandbox.") .getFileName() .toString()); }
Source:
<code>private void handleSpecialCharacterAndMissingValues() { if (isChecked && this.valueToFreq.size() < 1) { return; } long counted = 0L; List<Object> invalid = new ArrayList<Object>(); List<Object> lengthMore = new ArrayList<Object>(); for (Object val : this.valueToFreq.keySet()) { if (isInvalid(val) < 0) { invalid.add(val); Long freq = this.valueToFreq.get(val); counted = (freq == null) ? counted : counted + freq; <START> } else if (String.valueOf(val).codePointCount(0, String.valueOf(val).length()) > 1) { <END> lengthMore.add(val); } } if (invalid.size() > 0) { for (Object val : invalid) { this.valueToFreq.remove(val); } this.valueToFreq.put(INVALID, counted); } if (lengthMore.size() > 0) { for (Object val : lengthMore) { String k = String.valueOf(val).substring(0, String.valueOf(val).offsetByCodePoints(0, 1)); Long freq = this.valueToFreq.get(val); this.valueToFreq.remove(val); this.valueToFreq.put(k, freq); } } for (int i = 1; i < 10; i++) { Long value = this.valueToFreq.get(String.valueOf(i)); if (value == null) { this.valueToFreq.put(String.valueOf(i), 0L); } } isChecked = true; }</code><technical_language>String.valueOf(val).codePoints().count() > 1 is simple hrer</technical_language>

Target:
private void handleSpecialCharacterAndMissingValues() { if (isChecked && this.valueToFreq.size() < 1) { return; } long counted = 0L; List<Object> invalid = new ArrayList<Object>(); List<Object> lengthMore = new ArrayList<Object>(); for (Object val : this.valueToFreq.keySet()) { if (isInvalid(val) < 0) { invalid.add(val); Long freq = this.valueToFreq.get(val); counted = (freq == null) ? counted : counted + freq; } else if (String.valueOf(val).codePoints().count() > 1) { lengthMore.add(val); } } if (invalid.size() > 0) { for (Object val : invalid) { this.valueToFreq.remove(val); } this.valueToFreq.put(INVALID, counted); } if (lengthMore.size() > 0) { for (Object val : lengthMore) { String k = String.valueOf(val).substring(0, String.valueOf(val).offsetByCodePoints(0, 1)); Long freq = this.valueToFreq.get(val); this.valueToFreq.remove(val); this.valueToFreq.put(k, freq); } } for (int i = 1; i < 10; i++) { Long value = this.valueToFreq.get(String.valueOf(i)); if (value == null) { this.valueToFreq.put(String.valueOf(i), 0L); } } isChecked = true; }
Source:
<code>public void onDestroyView() { <START> layerOnMap = null; <END> super.onDestroyView(); }</code><technical_language>call clearGeoJsonLayer for code reuse</technical_language>

Target:
public void onDestroyView() { clearGeoJsonLayer(); super.onDestroyView(); }
Source:
<code>public Object visit(ASTClassOrInterfaceDeclaration node, Object data) { int wmc = (int) JavaMetrics.get(JavaClassMetricKey.WMC, node); double tcc = JavaMetrics.get(JavaClassMetricKey.TCC, node); <START> int atfd = (int) JavaMetrics.get(JavaClassMetricKey.ATFD, node); <END> super.visit(node, data); if (wmc >= WMC_VERY_HIGH && atfd > FEW_ATFD_THRESHOLD && tcc < TCC_THRESHOLD) { addViolation(data, node, new Object[] {wmc, StringUtil.percentageString(tcc, 3, true), atfd, }); } return data; }</code><technical_language>simple! I it</technical_language>

Target:
public Object visit(ASTClassOrInterfaceDeclaration node, Object data) { int wmc = (int) JavaMetrics.get(JavaClassMetricKey.WMC, node); double tcc = JavaMetrics.get(JavaClassMetricKey.TCC, node); int atfd = (int) JavaMetrics.get(JavaClassMetricKey.ATFD, node); super.visit(node, data); if (wmc >= WMC_VERY_HIGH && atfd > FEW_ATFD_THRESHOLD && tcc < TCC_THRESHOLD) { addViolation(data, node, new Object[] {wmc, StringUtil.percentageString(tcc, 3), atfd, }); } return data; }
Source:
<code>@Override public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) { final SqlNode operand = call.getOperandList().get(0); final RelDataType nodeType = validator.deriveType(scope, operand); assert nodeType != null; if (!nodeType.isStruct()) { throw SqlUtil.newContextException(operand.getParserPosition(), Static.RESOURCE.incompatibleTypes()); } final SqlNode fieldId = call.operand(1); final String fieldName = fieldId.toString(); final RelDataTypeField field = nodeType.getField(fieldName, false, false); if (field == null) { throw SqlUtil.newContextException(fieldId.getParserPosition(), Static.RESOURCE.unknownField(fieldName)); } RelDataType type = field.getType(); if (nodeType.isNullable() && !type.isNullable()) { type = validator.getTypeFactory().createTypeWithNullability(type, true); <START> } <END> type = adjustType(validator, call, type); SqlValidatorUtil.checkCharsetAndCollateConsistentIfCharType(type); return type; }</code><technical_language>In Calcite, record type is nullable, attributes nullable, so, this fix is necessary Calcite side</technical_language>

Target:
@Override public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) { final SqlNode operand = call.getOperandList().get(0); final RelDataType nodeType = validator.deriveType(scope, operand); assert nodeType != null; if (!nodeType.isStruct()) { throw SqlUtil.newContextException(operand.getParserPosition(), Static.RESOURCE.incompatibleTypes()); } final SqlNode fieldId = call.operand(1); final String fieldName = fieldId.toString(); final RelDataTypeField field = nodeType.getField(fieldName, false, false); if (field == null) { throw SqlUtil.newContextException(fieldId.getParserPosition(), Static.RESOURCE.unknownField(fieldName)); } RelDataType type = field.getType(); if (nodeType.isNullable()) { type = validator.getTypeFactory().createTypeWithNullability(type, true); } type = adjustType(validator, call, type); SqlValidatorUtil.checkCharsetAndCollateConsistentIfCharType(type); return type; }
Source:
<code>public FileDataModel(File dataFile, boolean transpose, long minReloadIntervalMS, String delimiterRegex) throws IOException { this.dataFile = Preconditions.checkNotNull(dataFile.getAbsoluteFile()); if (!dataFile.exists() || dataFile.isDirectory()) { throw new FileNotFoundException(dataFile.toString()); } Preconditions.checkArgument(dataFile.length() > 0L, "dataFile is empty"); Preconditions.checkArgument(minReloadIntervalMS >= 0L, "minReloadIntervalMs must be non-negative"); log.info("Creating FileDataModel for file {}", dataFile); this.lastModified = dataFile.lastModified(); this.lastUpdateFileModified = readLastUpdateFileModified(); FileLineIterator iterator = new FileLineIterator(dataFile, false); <START> initilize(iterator, transpose, minReloadIntervalMS, delimiterRegex); <END> }</code><technical_language>typo here, initialize</technical_language>

Target:
public FileDataModel(File dataFile, boolean transpose, long minReloadIntervalMS, String delimiterRegex) throws IOException { this.dataFile = Preconditions.checkNotNull(dataFile.getAbsoluteFile()); if (!dataFile.exists() || dataFile.isDirectory()) { throw new FileNotFoundException(dataFile.toString()); } Preconditions.checkArgument(dataFile.length() > 0L, "dataFile is empty"); Preconditions.checkArgument(minReloadIntervalMS >= 0L, "minReloadIntervalMs must be non-negative"); log.info("Creating FileDataModel for file {}", dataFile); this.lastModified = dataFile.lastModified(); this.lastUpdateFileModified = readLastUpdateFileModified(); FileLineIterator iterator = new FileLineIterator(dataFile, false); initialize(iterator, transpose, minReloadIntervalMS, delimiterRegex); }
Source:
<code>public static boolean[] hexDigitMsb0ToBinary(final char hexDigit) { switch (hexDigit) { case '0': return FFFF.clone(); case '1': return FFFT.clone(); case '2': return FFTF.clone(); case '3': return FFTT.clone(); case '4': return FTFF.clone(); case '5': return FTFT.clone(); case '6': return FTTF.clone(); case '7': return FTTT.clone(); case '8': return TFFF.clone(); case '9': return TFFT.clone(); case 'a':// fall through case 'A': return TFTF.clone(); case 'b':// fall through case 'B': return TFTT.clone(); case 'c':// fall through case 'C': return TTFF.clone(); case 'd':// fall through case 'D': return TTFT.clone(); case 'e':// fall through case 'E': return TTTF.clone(); case 'f':// fall through case 'F': return TTTT.clone(); default: <START> throw IllegalArgumentExceptions.format("Cannot interpret '%s' as a hexadecimal digit", hexDigit); <END> } }</code><technical_language>%d</technical_language>

Target:
public static boolean[] hexDigitMsb0ToBinary(final char hexDigit) { switch (hexDigit) { case '0': return FFFF.clone(); case '1': return FFFT.clone(); case '2': return FFTF.clone(); case '3': return FFTT.clone(); case '4': return FTFF.clone(); case '5': return FTFT.clone(); case '6': return FTTF.clone(); case '7': return FTTT.clone(); case '8': return TFFF.clone(); case '9': return TFFT.clone(); case 'a':// fall through case 'A': return TFTF.clone(); case 'b':// fall through case 'B': return TFTT.clone(); case 'c':// fall through case 'C': return TTFF.clone(); case 'd':// fall through case 'D': return TTFT.clone(); case 'e':// fall through case 'E': return TTTF.clone(); case 'f':// fall through case 'F': return TTTT.clone(); default: throw IllegalArgumentExceptions.format("Cannot interpret '%d' as a hexadecimal digit", hexDigit); } }