auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private CoordinatorStats doRun( Map<String, DataSourceCompactionConfig> compactionConfigs, int numAvailableCompactionTaskSlots, CompactionSegmentIterator iterator ) { int numSubmittedTasks = 0; for (; iterator.hasNext() && numSubmittedTasks < numAvailableCompactionTaskSlots; numSubmittedTasks++) { final List<DataSegment> segmentsToCompact = iterator.next(); final String dataSourceName = segmentsToCompact.get(0).getDataSource(); <START> if (!segmentsToCompact.isEmpty()) { <END> final DataSourceCompactionConfig config = compactionConfigs.get(dataSourceName); final String taskId = indexingServiceClient.compactSegments( segmentsToCompact, config.getTaskPriority(), ClientCompactQueryTuningConfig.from(config.getTuningConfig(), config.getMaxRowsPerSegment()), config.getTaskContext() ); LOG.info( "Submitted a compactTask[%s] for segments %s", taskId, Iterables.transform(segmentsToCompact, DataSegment::getId) ); } else { throw new ISE("Failed to find segments for dataSource[%s]", dataSourceName); } } return makeStats(numSubmittedTasks, iterator); }</code><technical_language>Line#179 move in this if block</technical_language>

Target:
private CoordinatorStats doRun( Map<String, DataSourceCompactionConfig> compactionConfigs, int numAvailableCompactionTaskSlots, CompactionSegmentIterator iterator ) { int numSubmittedTasks = 0; for (; iterator.hasNext() && numSubmittedTasks < numAvailableCompactionTaskSlots; numSubmittedTasks++) { final List<DataSegment> segmentsToCompact = iterator.next(); if (!segmentsToCompact.isEmpty()) { final String dataSourceName = segmentsToCompact.get(0).getDataSource(); final DataSourceCompactionConfig config = compactionConfigs.get(dataSourceName); final String taskId = indexingServiceClient.compactSegments( segmentsToCompact, config.getTaskPriority(), ClientCompactQueryTuningConfig.from(config.getTuningConfig(), config.getMaxRowsPerSegment()), newAutoCompactionContext(config.getTaskContext()) ); LOG.info( "Submitted a compactTask[%s] for segments %s", taskId, Iterables.transform(segmentsToCompact, DataSegment::getId) ); } else { throw new ISE("segmentsToCompact is empty?"); } } return makeStats(numSubmittedTasks, iterator); }
Source:
<code>public StreamInputPacketIndexEntry(long dataOffsetBits, StructDefinition streamPacketContextDef, long fileSizeBytes, long lostSoFar) { for (String field : streamPacketContextDef.getDeclaration().getFieldsList()) { IDefinition id = streamPacketContextDef.lookupDefinition(field); if (id instanceof IntegerDefinition) { fAttributes.put(field, ((IntegerDefinition) id).getValue()); } else if (id instanceof FloatDefinition) { fAttributes.put(field, ((FloatDefinition) id).getValue()); } else if (id instanceof EnumDefinition) { fAttributes.put(field, ((EnumDefinition) id).getValue()); } else if (id instanceof StringDefinition) { fAttributes.put(field, ((StringDefinition) id).getValue()); } } <START> Long contentSize = (Long) fAttributes.get(CTFStrings.CONTENT_SIZE); Long packetSize = (Long) fAttributes.get(CTFStrings.PACKET_SIZE); Long tsBegin = (Long) fAttributes.get(CTFStrings.TIMESTAMP_BEGIN); Long tsEnd = (Long) fAttributes.get(CTFStrings.TIMESTAMP_END); boolean hasDevice = fAttributes.containsKey(CTFStrings.DEVICE); Long cpuId = (Long) fAttributes.get(CTFStrings.CPU_ID); Long lostEvents = (Long) fAttributes.get(CTFStrings.EVENTS_DISCARDED); <END> fContentSizeBits = computeContentSize(fileSizeBytes, contentSize, packetSize); fPacketSizeBits = computePacketSize(fileSizeBytes, packetSize); fTimestampBegin = computeTsBegin(tsBegin); fTimestampEnd = computeTsEnd(tsEnd); Target target = lookupTarget(streamPacketContextDef, hasDevice, cpuId); fTarget = target.string; fTargetID = target.number; fLostEvents = computeLostEvents(lostSoFar, lostEvents); fOffsetBits = dataOffsetBits; fOffsetBytes = dataOffsetBits / Byte.SIZE; }</code><technical_language>a of in respective compute* methods. I suggest moved instead, constructor a bit shorter (it's a bit heavy!)</technical_language>

Target:
public StreamInputPacketIndexEntry(long dataOffsetBits, StructDefinition streamPacketContextDef, long fileSizeBytes, long lostSoFar) { for (String field : streamPacketContextDef.getDeclaration().getFieldsList()) { IDefinition id = streamPacketContextDef.lookupDefinition(field); if (id instanceof IntegerDefinition) { fAttributes.put(field, ((IntegerDefinition) id).getValue()); } else if (id instanceof FloatDefinition) { fAttributes.put(field, ((FloatDefinition) id).getValue()); } else if (id instanceof EnumDefinition) { fAttributes.put(field, ((EnumDefinition) id).getValue()); } else if (id instanceof StringDefinition) { fAttributes.put(field, ((StringDefinition) id).getValue()); } } fContentSizeBits = computeContentSize(fileSizeBytes); fPacketSizeBits = computePacketSize(fileSizeBytes); fTimestampBegin = computeTsBegin(); fTimestampEnd = computeTsEnd(); Target target = lookupTarget(streamPacketContextDef); fTarget = target.string; fTargetID = target.number; fLostEvents = computeLostEvents(lostSoFar); fOffsetBits = dataOffsetBits; fOffsetBytes = dataOffsetBits / Byte.SIZE; }
Source:
<code>private void processQuery() { try { parser.process(sqlQuery); <START> eclQuery = new ECLEngine(parser, dbMetadata, hpccConnection.getProperties()); <END> eclQuery.generateECL(); } catch (SQLException e) { System.out.println(e.getLocalizedMessage()); if (warnings == null) warnings = new SQLWarning(); warnings.setNextException(e); eclQuery = null; parser = null; } }</code><technical_language>a ref conn.getProperties instead of keeping conn around</technical_language>

Target:
private void processQuery() { try { if (!this.closed) { if (parser != null) parser.process(sqlQuery); else throw new SQLException("Error parser is not ready, cannot execute query"); eclQuery = new ECLEngine(parser, dbMetadata, hpccConnection.getProperties()); eclQuery.generateECL(); } else throw new SQLException("HPCCPreparedStatement closed, cannot execute query"); } catch (SQLException e) { System.out.println(e.getLocalizedMessage()); if (warnings == null) warnings = new SQLWarning(); warnings.setNextException(e); eclQuery = null; parser = null; } }
Source:
<code>public void test() throws Exception { String rawInput = getResource(TEST_DOC); String expected = getResource(CONVERTED_HTML); String input = NormalizeHtml.convertToNormalizedHTML(rawInput); input = bodyOnly(input); expected = bodyOnly(expected); input = input.replaceAll("\r", ""); expected = expected.replaceAll("\r", ""); input = input.replaceAll("br>", "br />"); <START> input = input.replaceAll("br\\[>", "br[ />"); <END> input = input.replaceAll("br\\]>", "br />"); Assert.assertEquals("Converted HTML does not equal expected", expected, input); input = rawInput.replaceAll("BODY", "body"); input = bodyOnly(input); input = NormalizeHtml.wrapAndNormalizeHTML(input, false, false, false); input = bodyOnly(input); input = input.replaceAll("\r", ""); input = input.replaceAll("br>", "br />"); input = input.replaceAll("br\\[>", "br[ />"); input = input.replaceAll("br\\]>", "br />"); Assert.assertEquals("Converted body only HTML does not equal expected", expected, input); }</code><technical_language>Please update expected (in file)</technical_language>

Target:
public void test() throws Exception { String rawInput = getResource(TEST_DOC); String expected = getResource(CONVERTED_HTML); String input = NormalizeHtml.convertToNormalizedHTML(rawInput); input = bodyOnly(input); input = input.replaceAll("br /", "br"); expected = bodyOnly(expected); input = input.replaceAll("\r", ""); expected = expected.replaceAll("\r", ""); Assert.assertEquals("Converted HTML does not equal expected", expected, input); input = rawInput.replaceAll("BODY", "body"); input = bodyOnly(input); input = NormalizeHtml.wrapAndNormalizeHTML(input, false, false, false); input = bodyOnly(input); input = input.replaceAll("\r", ""); input = input.replaceAll("br /", "br"); Assert.assertEquals("Converted body only HTML does not equal expected", expected, input); }
Source:
<code><START> public CompletableFuture<WriteAdvHandle> execute() { <END> CompletableFuture<WriteAdvHandle> counter = new CompletableFuture<>(); create(new SyncCreateCallback(), counter); return counter; }</code><technical_language>nit: if 'builderLedgerId' is of type Long, received arg type Long instead of primitive long</technical_language>

Target:
public CompletableFuture<WriteAdvHandle> execute() { CompletableFuture<WriteAdvHandle> future = new CompletableFuture<>(); SyncCreateCallback callback = new SyncCreateCallback(future); create(callback); return future; }
Source:
<code>public static List<GAV> convert2GAV(String gavString) { List<GAV> gavs = new ArrayList<>(); String[] componentsStr = gavString.split(","); <START> for (String componentStr : componentsStr) { <END> String[] component = componentStr.split(":"); GAV gav = new GAV(); gav.setGroupId(component[0]); gav.setArtifactId(component[1]); gav.setVersion(component[2]); gavs.add(gav); } return gavs; }</code><technical_language>This handle classifier type, intended</technical_language>

Target:
public static List<GAV> convert2GAV(String gavString) { List<GAV> gavs = new ArrayList<>(); String[] componentsStr = gavString.split(","); for (String componentStr : componentsStr) { String[] component = componentStr.split(":"); GAV gav = new GAV(); gav.setGroupId(component[0]); gav.setArtifactId(component[1]); gav.setVersion(component[2]); if (3 < component.length) { gav.setClassifier(component[3]); } if (4 < component.length) { gav.setType(component[4]); } gavs.add(gav); } return gavs; }
Source:
<code>public ClosePresenceChecker(SimpleName cursorSimpleName, String recycleMethodName) { <START> super(); <END> this.closePresent = false; this.lastCursorUse = null; this.cursorSimpleName = cursorSimpleName; this.recycleMethodName = recycleMethodName; }</code><technical_language>Please remove</technical_language>

Target:
public ClosePresenceChecker(SimpleName cursorSimpleName, String recycleMethodName) { this.cursorSimpleName = cursorSimpleName; this.recycleMethodName = recycleMethodName; }
Source:
<code>protected ViewModel verify(HttpServletRequest request, HttpServletResponse response, String sptoken) throws ServletException, IOException { Account account = client.verifyAccountEmail(sptoken); RequestEvent e = createVerifiedEvent(request, response, account); publish(e); if (isJsonPreferred(request, response)) { if (autoLogin){ final AuthenticationResult result = new TransientAuthenticationResult(account); this.authenticationResultSaver.set(request, response, result); Map<String,Object> model = new HashMap<String, Object>(); model.put("account", accountModelFactory.toMap(account, Collections.EMPTY_LIST)); return new DefaultViewModel("stormpathJsonView", model); } else { <START> return new DefaultViewModel("stormpathJsonView"); <END> } } else { if (autoLogin) { final AuthenticationResult result = new TransientAuthenticationResult(account); this.authenticationResultSaver.set(request, response, result); return new DefaultViewModel(loginNextUri).setRedirect(true); } else { return new DefaultViewModel(nextUri).setRedirect(true); } } }</code><technical_language>yes, a constant</technical_language>

Target:
protected ViewModel verify(HttpServletRequest request, HttpServletResponse response, String sptoken) throws ServletException, IOException { Account account = client.verifyAccountEmail(sptoken); RequestEvent e = createVerifiedEvent(request, response, account); publish(e); if (isJsonPreferred(request, response)) { if (autoLogin){ final AuthenticationResult result = new TransientAuthenticationResult(account); this.authenticationResultSaver.set(request, response, result); Map<String,Object> model = new HashMap<String, Object>(); model.put("account", accountModelFactory.toMap(account, Collections.EMPTY_LIST)); return new DefaultViewModel(STORMPATH_JSON_VIEW_NAME, model); } else { return null; } } else { if (autoLogin) { final AuthenticationResult result = new TransientAuthenticationResult(account); this.authenticationResultSaver.set(request, response, result); return new DefaultViewModel(loginNextUri).setRedirect(true); } else { return new DefaultViewModel(nextUri).setRedirect(true); } } }
Source:
<code>public void invalidate() { <START> if (mNativeMap.isEmpty()) { return; } <END> final WeakHashMap<android.view.MenuItem, MenuItem> menuMapCopy = new WeakHashMap<android.view.MenuItem, MenuItem>(mNativeMap.size()); for (int i = 0; i < mNativeMenu.size(); i++) { final android.view.MenuItem item = mNativeMenu.getItem(i); menuMapCopy.put(item, mNativeMap.get(item)); } mNativeMap.clear(); mNativeMap.putAll(menuMapCopy); }</code><technical_language>brackets put return line</technical_language>

Target:
public void invalidate() { if (mNativeMap.isEmpty()) return; final WeakHashMap<android.view.MenuItem, MenuItem> menuMapCopy = new WeakHashMap<android.view.MenuItem, MenuItem>(mNativeMap.size()); for (int i = 0; i < mNativeMenu.size(); i++) { final android.view.MenuItem item = mNativeMenu.getItem(i); menuMapCopy.put(item, mNativeMap.get(item)); } mNativeMap.clear(); mNativeMap.putAll(menuMapCopy); }
Source:
<code>public ColorThemeManager() { editors = new HashMap<String, ThemePreferenceMapper>(); IConfigurationElement[] config = Platform.getExtensionRegistry() .getConfigurationElementsFor( Activator.EXTENSION_POINT_ID_MAPPER); try { for (IConfigurationElement e : config) { final Object o = e.createExecutableExtension("class"); if (o instanceof ThemePreferenceMapper) { String pluginId = e.getAttribute("pluginId"); ThemePreferenceMapper mapper = (ThemePreferenceMapper) o; mapper.setPluginId(pluginId); if (o instanceof GenericMapper) { String xml = e.getAttribute("xml"); String contributorPluginId = e.getContributor() .getName(); Bundle bundle = Platform.getBundle(contributorPluginId); InputStream input = (InputStream) bundle.getResource( xml).getContent(); ((GenericMapper) mapper).parseMapping(input); } editors.put(pluginId, mapper); } } } catch (Exception ex) { ex.printStackTrace(); } <START> themes = new HashMap<String, ColorTheme>(); <END> readStockThemes(themes); readImportedThemes(themes); }</code><technical_language>move this block down? stay there</technical_language>

Target:
public ColorThemeManager() { editors = new HashMap<String, ThemePreferenceMapper>(); IConfigurationElement[] config = Platform.getExtensionRegistry() .getConfigurationElementsFor( Activator.EXTENSION_POINT_ID_MAPPER); try { for (IConfigurationElement e : config) { final Object o = e.createExecutableExtension("class"); if (o instanceof ThemePreferenceMapper) { String pluginId = e.getAttribute("pluginId"); ThemePreferenceMapper mapper = (ThemePreferenceMapper) o; mapper.setPluginId(pluginId); if (o instanceof GenericMapper) { String xml = e.getAttribute("xml"); String contributorPluginId = e.getContributor() .getName(); Bundle bundle = Platform.getBundle(contributorPluginId); InputStream input = (InputStream) bundle.getResource( xml).getContent(); ((GenericMapper) mapper).parseMappings(input); } editors.put(pluginId, mapper); } } } catch (Exception ex) { ex.printStackTrace(); } themes = new HashMap<String, ColorTheme>(); readStockThemes(themes); readImportedThemes(themes); }
Source:
<code>public void testRegisteredSynonyms() { List<CodeSnippet> codeSnippets = snippetGenerator.generateSnippets(Maven2LayoutProvider.ALIAS, new MavenArtifactCoordinates("org.carlspring.strongbox", "maven-snippet", "1.0", null, "jar")); assertNotNull(codeSnippets, "Failed to look up dependency synonym formatter!"); assertFalse(codeSnippets.isEmpty(), "No synonyms found!"); assertEquals(6, codeSnippets.size(), "Incorrect number of dependency synonyms!"); <START> String[] synonyms = new String[]{ "Maven 2", "ApacheBuildr", "Gradle", "Ivy", "Leiningen", "SBT", }; <END> int i = 0; for (CodeSnippet snippet : codeSnippets) { System.out.println(snippet.getName()); assertEquals(synonyms[i], snippet.getName(), "Failed to re-order correctly!"); i++; } }</code><technical_language>String[] synonyms = new String[]{ "Maven 2", "Buildr", "Gradle", "Ivy", "Leiningen", "SBT" };</technical_language>

Target:
public void testRegisteredSynonyms() { List<CodeSnippet> codeSnippets = snippetGenerator.generateSnippets(Maven2LayoutProvider.ALIAS, new MavenArtifactCoordinates("org.carlspring.strongbox", "maven-snippet", "1.0", null, "jar")); assertNotNull(codeSnippets, "Failed to look up dependency synonym formatter!"); assertFalse(codeSnippets.isEmpty(), "No synonyms found!"); assertEquals(6, codeSnippets.size(), "Incorrect number of dependency synonyms!"); String[] synonyms = new String[]{ "Maven 2", "Buildr", "Gradle", "Ivy", "Leiningen", "SBT", }; int i = 0; for (CodeSnippet snippet : codeSnippets) { System.out.println(snippet.getName()); assertEquals(synonyms[i], snippet.getName(), "Failed to re-order correctly!"); i++; } }
Source:
<code>public static String readStringFromFile(String readFromPath) throws IOException { try { Cipher decrypter = Cipher.getInstance("AES"); <START> decrypter.init(Cipher.DECRYPT_MODE, KEY); <END> FileInputStream fis = new FileInputStream(new File(readFromPath)); CipherInputStream cis = new CipherInputStream(fis, decrypter); BufferedReader reader = new BufferedReader(new InputStreamReader(cis)); String docString = ""; String line; while ((line = reader.readLine()) != null) { docString += line; } reader.close(); return docString; } catch (NoSuchAlgorithmException e) { e.printStackTrace(); throw new RuntimeException(e); } catch (NoSuchPaddingException e) { e.printStackTrace(); throw new RuntimeException(e); } catch (InvalidKeyException e) { e.printStackTrace(); throw new RuntimeException(e); } catch (FileNotFoundException e) { e.printStackTrace(); throw new RuntimeException(e); } }</code><technical_language>I able straight CryptUtil here, file/cipher input stream good refactor</technical_language>

Target:
public static String readStringFromFile(String readFromPath) throws IOException { try { Cipher decrypter = Cipher.getInstance("AES"); decrypter.init(Cipher.DECRYPT_MODE, KEY); FileInputStream fis = new FileInputStream(new File(readFromPath)); CipherInputStream cis = new CipherInputStream(fis, decrypter); BufferedReader reader = new BufferedReader(new InputStreamReader(cis)); StringBuilder sb = new StringBuilder(); String line; while ((line = reader.readLine()) != null) { sb.append(line); } reader.close(); return sb.toString(); } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | FileNotFoundException e) { e.printStackTrace(); throw new RuntimeException(e); } }
Source:
<code>public RDTCommandLauncher(IProject project) { fProcess = null; fShowCommand = false; try { if (project.hasNature(RemoteProxyManager.SYNC_NATURE)) { IRemoteResource remoteRes = (IRemoteResource)project.getAdapter(IRemoteResource.class); uri = remoteRes.getActiveLocationURI(); } else{ uri = project.getLocationURI(); } lineSeparator = System.getProperty("line.separator", "\n"); } catch (CoreException e) { uri = project.getLocationURI(); <START> lineSeparator = System.getProperty("line.separator", "\n"); END> } }</code><technical_language>move this line of try block. Sorry. I</technical_language>

Target:
public RDTCommandLauncher(IProject project) { fProcess = null; fShowCommand = false; try { if (project.hasNature(RemoteProxyManager.SYNC_NATURE)) { IRemoteResource remoteRes = (IRemoteResource)project.getAdapter(IRemoteResource.class); uri = remoteRes.getActiveLocationURI(); } else{ uri = project.getLocationURI(); } } catch (CoreException e) { uri = project.getLocationURI(); } lineSeparator = System.getProperty("line.separator", "\n"); }
Source:
<code>private CloseableHttpResponse proxyRequest(String appUrl, ContainerRequestContext request) throws IOException { String method = request.getMethod(); String requestURI = request.getUriInfo().getRequestUri().getPath(); CloseableHttpResponse proxiedResponse; switch (method) { case "GET": HttpGet httpGet = new HttpGet(appUrl + requestURI); proxiedResponse = httpclient.execute(httpGet); break; case "PUT": HttpPut httpPut = new HttpPut(appUrl + requestURI); httpPut.setHeader(HTTP.CONTENT_TYPE, request.getHeaderString("Content-Type")); httpPut.setEntity(new InputStreamEntity(request.getEntityStream())); proxiedResponse = httpclient.execute(httpPut); break; case "POST": HttpPost httpPost = new HttpPost(appUrl + requestURI); httpPost.setHeader(HTTP.CONTENT_TYPE, request.getHeaderString("Content-Type")); httpPost.setEntity(new InputStreamEntity(request.getEntityStream())); proxiedResponse = httpclient.execute(httpPost); break; case "DELETE": HttpDelete httpDelete = new HttpDelete(appUrl + requestURI); httpDelete.setHeader(HTTP.CONTENT_TYPE, request.getHeaderString("Content-Type")); proxiedResponse = httpclient.execute(httpDelete); break; default: <START> throw new RuntimeException("Method not supported: " + method); <END> } return proxiedResponse; }</code><technical_language>IllegalStateException</technical_language>

Target:
private CloseableHttpResponse proxyRequest(String appUrl, ContainerRequestContext request) throws IOException { String method = request.getMethod(); String requestURI = request.getUriInfo().getRequestUri().getPath(); CloseableHttpResponse proxiedResponse; switch (method) { case "GET": HttpGet httpGet = new HttpGet(appUrl + requestURI); proxiedResponse = httpclient.execute(httpGet); break; case "PUT": HttpPut httpPut = new HttpPut(appUrl + requestURI); httpPut.setHeader(HTTP.CONTENT_TYPE, request.getHeaderString("Content-Type")); httpPut.setEntity(new InputStreamEntity(request.getEntityStream())); proxiedResponse = httpclient.execute(httpPut); break; case "POST": HttpPost httpPost = new HttpPost(appUrl + requestURI); httpPost.setHeader(HTTP.CONTENT_TYPE, request.getHeaderString("Content-Type")); httpPost.setEntity(new InputStreamEntity(request.getEntityStream())); proxiedResponse = httpclient.execute(httpPost); break; case "DELETE": HttpDelete httpDelete = new HttpDelete(appUrl + requestURI); httpDelete.setHeader(HTTP.CONTENT_TYPE, request.getHeaderString("Content-Type")); proxiedResponse = httpclient.execute(httpDelete); break; default: throw new IllegalStateException("Method not supported: " + method); } return proxiedResponse; }
Source:
<code>protected void execute(Context context) throws SQLException { MassUpdate massUpdate = context.prepareMassUpdate(); massUpdate.select("SELECT prop.id FROM properties prop " + "INNER JOIN projects p ON p.id=prop.resource_id AND p.qualifier IN ('VW','SVW') " + "WHERE prop.prop_key='sonar.leak.period' or prop.prop_key='sonar.timemachine.period1' "); massUpdate.update("DELETE from properties WHERE id=?"); <START> massUpdate.rowPluralName("leak period settings on views"); <END> massUpdate.execute((row, update) -> { update.setLong(1, row.getLong(1)); return true; }); }</code><technical_language>"properties" is good enough for logs</technical_language>

Target:
protected void execute(Context context) throws SQLException { MassUpdate massUpdate = context.prepareMassUpdate(); massUpdate.select("SELECT prop.id FROM properties prop " + "INNER JOIN projects p ON p.id=prop.resource_id AND p.qualifier NOT IN ('TRK') " + "WHERE prop.prop_key='sonar.leak.period' or prop.prop_key='sonar.timemachine.period1' "); massUpdate.update("DELETE FROM properties WHERE id=?"); massUpdate.rowPluralName("properties"); massUpdate.execute((row, update) -> { update.setLong(1, row.getLong(1)); return true; }); }
Source:
<code>public boolean isSupportedArrayComponentType(Class<?> componentType) { <START> if (boolean.class == componentType) { <END> return true; } if (short.class == componentType) { return true; } if (int.class == componentType) { return true; } if (long.class == componentType) { return true; } if (double.class == componentType) { return true; } return false; }</code><technical_language>This easier read if collapsed</technical_language>

Target:
public boolean isSupportedArrayComponentType(Class<?> componentType) { return boolean.class == componentType || short.class == componentType || int.class == componentType || long.class == componentType || double.class == componentType; }
Source:
<code>public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { if (Objects.nonNull(requestIdSupplier)) { HttpHeaders httpHeaders = requestIdSupplier.get(); if (Objects.nonNull(httpHeaders) && httpHeaders.getSize() > 0) { httpHeaders.stream().forEach(httpHeader -> { String requestIdHeaderValue = context.getHttpRequest().getHeaders().getValue(httpHeader.getName()); <START> if (requestIdHeaderValue == null) { <END> context.getHttpRequest().getHeaders().put(httpHeader.getName(), httpHeader.getValue()); } }); return next.process(); } } String requestId = context.getHttpRequest().getHeaders().getValue(REQUEST_ID_HEADER); if (requestId == null) { context.getHttpRequest().getHeaders().put(REQUEST_ID_HEADER, UUID.randomUUID().toString()); } return next.process(); }</code><technical_language>This is a general question for policies mutate request, this insert header value? @JonathanGiles @srnagar</technical_language>

Target:
public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { HttpHeaders httpHeaders = requestIdSupplier.get(); if (Objects.nonNull(httpHeaders) && httpHeaders.getSize() > 0) { for (HttpHeader header : httpHeaders) { String requestIdHeaderValue = context.getHttpRequest().getHeaders().getValue(header.getName()); if (requestIdHeaderValue == null) { context.getHttpRequest().getHeaders().put(header.getName(), header.getValue()); } } return next.process(); } String requestId = context.getHttpRequest().getHeaders().getValue(REQUEST_ID_HEADER); if (requestId == null) { context.getHttpRequest().getHeaders().put(REQUEST_ID_HEADER, UUID.randomUUID().toString()); } return next.process(); }
Source:
<code>private GeneralCommandLine getCommandLine(File sdk) { ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator(); progressIndicator.setIndeterminate(true); progressIndicator.setText("Running Intel® HAXM installer"); int memorySize = myState.getNotNull(KEY_EMULATOR_MEMORY_MB, getRecommendedMemoryAllocation()); <START> File sourceLocation = new File(sdk, "extras/intel/Hardware_Accelerated_Execution_Manager"); <END> if (SystemInfo.isMac) { return getMacHaxmInstallCommandLine(sourceLocation, memorySize); } else if (SystemInfo.isWindows) { return getWindowsHaxmInstallCommandLine(sourceLocation, memorySize); } else { assert !isSupportedOS(); throw new IllegalStateException("Usupported OS"); } }</code><technical_language>Nit: Is a merge this line InstallComponentsPath.createExtra(...) line below</technical_language>

Target:
private GeneralCommandLine getCommandLine(File sdk) { ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator(); progressIndicator.setIndeterminate(true); progressIndicator.setText("Running Intel® HAXM installer"); int memorySize = myState.getNotNull(KEY_EMULATOR_MEMORY_MB, getRecommendedMemoryAllocation()); String path = FileUtil.join(SdkConstants.FD_EXTRAS, COMPONENT_VENDOR, COMPONENT_PATH); File sourceLocation = new File(sdk, path); if (SystemInfo.isMac) { return getMacHaxmInstallCommandLine(sourceLocation, memorySize); } else if (SystemInfo.isWindows) { return getWindowsHaxmInstallCommandLine(sourceLocation, memorySize); } else { assert !isSupportedOS(); throw new IllegalStateException("Usupported OS"); } }
Source:
<code>private Duration extractDuration(String duration) { List<String> tokens = ImmutableList.copyOf(durationSplitter.split(duration)); int hours = Integer.parseInt(tokens.get(0)); int minutes = Integer.parseInt(tokens.get(1)); int seconds = Integer.parseInt(tokens.get(2)); <START> return Duration.standardSeconds(seconds + minutes * SECONDS_PER_MIN + hours * SECONDS_PER_HOUR); <END> }</code><technical_language>friend is Joda PeriodFormatter. a format is structured, call formatter.parsePeriod(timeString).toStandardDuration();. a <LINK_0> for more info</technical_language>

Target:
private Duration extractDuration(String duration) { return durationFormatter.parsePeriod(duration).toStandardDuration(); }
Source:
<code>private Map<String, String> processRegistrationPayload( final Context context, final String payload ) { Object[] obj; try { obj = (Object[]) weborb.util.io.Serializer.fromBytes( payload.getBytes(), weborb.util.io.Serializer.JSON, false ); } catch( IOException e ) { <START> callback.onError( context, "Could not deserialize server response: " + e.getMessage() ); <END> return null; } PushTemplateHelper.deleteNotificationChannel( context ); Map<String, AndroidPushTemplate> templates = (Map<String, AndroidPushTemplate>) obj[ 1 ]; if( android.os.Build.VERSION.SDK_INT > 25 ) for( AndroidPushTemplate templ : templates.values() ) PushTemplateHelper.getOrCreateNotificationChannel( context.getApplicationContext(), templ ); PushTemplateHelper.setPushNotificationTemplates( templates, payload.getBytes() ); String regs = (String) obj[ 0 ]; Map<String, String> channelRegistrations = new HashMap<>(); String[] regPairs = regs.split( "," ); for( String pair : regPairs ) { String[] valueKey = pair.split( "::" ); channelRegistrations.put( valueKey[1], valueKey[0] ); } return channelRegistrations; }</code><technical_language>log this error</technical_language>

Target:
private Map<String, String> processRegistrationPayload( final Context context, final String payload ) { Object[] obj; try { obj = (Object[]) weborb.util.io.Serializer.fromBytes( payload.getBytes(), weborb.util.io.Serializer.JSON, false ); } catch( IOException e ) { Log.e( TAG, "Could not deserialize server response: " + e.getMessage() ); callback.onError( context, "Could not deserialize server response: " + e.getMessage() ); return null; } PushTemplateHelper.deleteNotificationChannel( context ); Map<String, AndroidPushTemplate> templates = (Map<String, AndroidPushTemplate>) obj[ 1 ]; if( android.os.Build.VERSION.SDK_INT > 25 ) { for( AndroidPushTemplate templ : templates.values() ) PushTemplateHelper.getOrCreateNotificationChannel( context.getApplicationContext(), templ ); } PushTemplateHelper.setPushNotificationTemplates( templates, payload.getBytes() ); String regs = (String) obj[ 0 ]; Map<String, String> channelRegistrations = new HashMap<>(); String[] regPairs = regs.split( "," ); for( String pair : regPairs ) { String[] valueKey = pair.split( "::" ); channelRegistrations.put( valueKey[1], valueKey[0] ); } return channelRegistrations; }
Source:
<code>public SecurityGroup createSecurityGroup(String name, Location location) { String zone = location.getId(); if (zone != null) { return createSecurityGroup(name, zone); } else { return null; <START> } <END> }</code><technical_language>in places above, if (zone == null) { return null; } return createSecurityGroup(name, zone);</technical_language>

Target:
public SecurityGroup createSecurityGroup(String name, Location location) { String zone = location.getId(); if (zone == null) { return null; } return createSecurityGroup(name, zone); }
Source:
<code>protected Response buildQueryResponse( final HttpServletRequest req, final Query query, final QueryToolChest toolChest, final ObjectWriter jsonWriter, final String contentType, final long startTime, final Yielder yielder, final Map<String, Object> responseContext ) throws IOException { try { return Response .ok( new StreamingOutput() { @Override public void write(OutputStream outputStream) throws IOException, WebApplicationException { CountingOutputStream os = new CountingOutputStream(outputStream); jsonWriter.writeValue( os, ImmutableMap.of( "result", yielder, "context", responseContext ) ); os.flush(); <START> os.close(); <END> final long queryTime = System.currentTimeMillis() - startTime; emitter.emit( DruidMetrics.makeQueryTimeMetric(toolChest, jsonMapper, query, req.getRemoteAddr()) .setDimension("success", "true") .build("query/time", queryTime) ); emitter.emit( DruidMetrics.makeQueryTimeMetric(toolChest, jsonMapper, query, req.getRemoteAddr()) .build("query/bytes", os.getCount()) ); requestLogger.log( new RequestLogLine( new DateTime(startTime), req.getRemoteAddr(), query, new QueryStats( ImmutableMap.<String, Object>of( "query/time", queryTime, "query/bytes", os.getCount(), "success", true ) ) ) ); } }, contentType ) .header("X-Druid-Query-Id", query.getId()) .build(); } catch (Exception e) { yielder.close(); throw Throwables.propagate(e); } finally { } }</code><technical_language>this in a try resources block guarantee is closed</technical_language>

Target:
protected Response buildQueryResponse( final HttpServletRequest req, final Query query, final QueryToolChest toolChest, final ObjectWriter jsonWriter, final String contentType, final long startTime, final Yielder yielder, final Map<String, Object> responseContext ) throws IOException { try { return Response .ok( new StreamingOutput() { @Override public void write(OutputStream outputStream) throws IOException, WebApplicationException { CountingOutputStream os = new CountingOutputStream(outputStream); try { serializeResponseToOS( jsonWriter, os, ImmutableMap.of( "result", yielder, "context", responseContext ) ); os.flush(); } finally { os.close(); } final long queryTime = System.currentTimeMillis() - startTime; emitter.emit( DruidMetrics.makeQueryTimeMetric(toolChest, jsonMapper, query, req.getRemoteAddr()) .setDimension("success", "true") .build("query/time", queryTime) ); emitter.emit( DruidMetrics.makeQueryTimeMetric(toolChest, jsonMapper, query, req.getRemoteAddr()) .build("query/bytes", os.getCount()) ); requestLogger.log( new RequestLogLine( new DateTime(startTime), req.getRemoteAddr(), query, new QueryStats( ImmutableMap.<String, Object>of( "query/time", queryTime, "query/bytes", os.getCount(), "success", true ) ) ) ); } }, contentType ) .header("X-Druid-Query-Id", query.getId()) .build(); } catch (Exception e) { yielder.close(); throw Throwables.propagate(e); } finally { } }
Source:
<code>public MetadataField findByString(Context context, String mdString, char separator) throws SQLException { String[] seq = StringUtils.split(mdString, separator); String schema = seq.length > 1 ? seq[0] : null; String element = seq.length > 1 ? seq[1] : null; String qualifier = seq.length == 3 ? seq[2] : null; if (schema == null || element == null) { return null; } else { MetadataSchema metadataSchema = metadataSchemaService.find(context, schema); <START> return this.findByElement(context, metadataSchema, element, qualifier); <END> } }</code><technical_language>need find MetadataSchema object first, other findByElement() method takes in metadataSchemaName: <LINK_0></technical_language>

Target:
public MetadataField findByString(Context context, String mdString, char separator) throws SQLException { String[] seq = StringUtils.split(mdString, separator); String schema = seq.length > 1 ? seq[0] : null; String element = seq.length > 1 ? seq[1] : null; String qualifier = seq.length == 3 ? seq[2] : null; if (schema == null || element == null) { return null; } else { return this.findByElement(context, schema, element, qualifier); } }
Source:
<code>public StreamProperties visitSpatialJoin(SpatialJoinNode node, List<StreamProperties> inputProperties) { StreamProperties leftProperties = inputProperties.get(0); switch (node.getType()) { case INNER: case LEFT: return leftProperties.translate(column -> PropertyDerivations.filterIfMissing(node.getOutputSymbols(), column)); default: <START> throw new UnsupportedOperationException("Unsupported spatial join type: " + node.getType()); <END> } }</code><technical_language>IllegalArgumentException</technical_language>

Target:
public StreamProperties visitSpatialJoin(SpatialJoinNode node, List<StreamProperties> inputProperties) { StreamProperties leftProperties = inputProperties.get(0); switch (node.getType()) { case INNER: case LEFT: return leftProperties.translate(column -> PropertyDerivations.filterIfMissing(node.getOutputSymbols(), column)); default: throw new IllegalArgumentException("Unsupported spatial join type: " + node.getType()); } }
Source:
<code>public String toString() { return String.format( <START> "access_token=%s; access_type=%s; expires_in=%d; scope=%s; refresh_token=%s", <END> access_token, token_type, expires_in, scope, refresh_token); }</code><technical_language>rename access_type token_type match code</technical_language>

Target:
public String toString() { return String.format( "access_token=%s; token_type=%s; expires_in=%d; scope=%s; refresh_token=%s", access_token, token_type, expires_in, scope, refresh_token); }
Source:
<code><START> private static boolean copyDescription( <END> RtpDescriptionPacketExtension description, ColibriConferenceIQ.Channel channel) { boolean added = false; for (PayloadTypePacketExtension payloadType : description.getPayloadTypes()) { channel.addPayloadType(payloadType); added = true; } for (RTPHdrExtPacketExtension rtpHdrExt : description.getExtmapList()) { channel.addRtpHeaderExtension(rtpHdrExt); added = true; } return added; }</code><technical_language>this a clone method of RtpDescriptionPacketExtension</technical_language>

Target:
private static boolean copyDescription( RtpDescriptionPacketExtension description, ColibriConferenceIQ.Channel channel) { boolean added = false; for (PayloadTypePacketExtension payloadType : description.getPayloadTypes()) { channel.addPayloadType(new PayloadTypePacketExtension(payloadType)); added = true; } for (RTPHdrExtPacketExtension rtpHdrExt : description.getExtmapList()) { channel .addRtpHeaderExtension(new RTPHdrExtPacketExtension(rtpHdrExt)); added = true; } return added; }
Source:
<code><START> public static Optional<String> stringFilter(TupleDomain<Integer> constraint, int index) <END> { checkArgument(!constraint.isNone(), "Constraint is none"); Domain domain = constraint.getDomains().get().get(index); if ((domain == null) || !domain.isSingleValue()) { return Optional.empty(); } Object value = domain.getSingleValue(); if (value instanceof Slice) { return Optional.of(((Slice) value).toStringUtf8()); } return Optional.empty(); }</code><technical_language>code rely this semantics? constraint none? callers fixed too</technical_language>

Target:
public static Optional<String> stringFilter(TupleDomain<Integer> constraint, int index) { if (constraint.isNone()) { return Optional.empty(); } Domain domain = constraint.getDomains().get().get(index); if ((domain == null) || !domain.isSingleValue()) { return Optional.empty(); } Object value = domain.getSingleValue(); if (value instanceof Slice) { return Optional.of(((Slice) value).toStringUtf8()); } return Optional.empty(); }
Source:
<code>static Builder builder() { <START> return Sponge.getRegistry().createBuilder(SoundType.Builder.class); <END> }</code><technical_language>more brief: java return Sponge.getRegistry().createBuilder(Builder.class);</technical_language>

Target:
static Builder builder() { return Sponge.getRegistry().createBuilder(Builder.class); }
Source:
<code>public ResultScanner<FlatRow> readFlatRows(ReadRowsRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } <START> final ResponseQueueReader reader = new ResponseQueueReader(retryOptions.getReadPartialRowTimeoutMillis() + 500); <END> RetryingReadRowsOperation operation = createReadRowsRetryListener(request, reader); operation.setResultObserver(new StreamObserver<ReadRowsResponse>(){ @Override public void onNext(ReadRowsResponse value) { reader.addRequestResultMarker(); } @Override public void onError(Throwable t) @Override public void onCompleted() }); operation.getAsyncResult(); return new ResumingStreamingResultScanner(reader); }</code><technical_language>I 500 deserves a static variable :)</technical_language>

Target:
public ResultScanner<FlatRow> readFlatRows(ReadRowsRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } final ResponseQueueReader reader = new ResponseQueueReader(); RetryingReadRowsOperation operation = createReadRowsRetryListener(request, reader); operation.setResultObserver(new StreamObserver<ReadRowsResponse>(){ @Override public void onNext(ReadRowsResponse value) { reader.addRequestResultMarker(); } @Override public void onError(Throwable t) @Override public void onCompleted() }); operation.getAsyncResult(); return new ResumingStreamingResultScanner(reader); }
Source:
<code>private static byte[] clearZeroBytesFromString(byte[] data, int maxLength) { if (data == null) return null; ByteArrayOutputStream dataOut = new ByteArrayOutputStream() ; int limit = (maxLength < data.length) ? maxLength - MAX_NUMBER_OF_UTF8_BYTES : data.length; for (int i = 0; i < limit; i++) { if (data[i] != 0x00) dataOut.write(data[i]); } <START> if(maxLength < data.length) { <END> if (!isASingleByteUTF8Char(data[limit-1])) { int i = 0; while (!isAStartingByteUTF8Char(data[limit + i])) { if (i == MAX_NUMBER_OF_UTF8_BYTES) { break; } dataOut.write(data[limit + i]); i++; } } } return dataOut.toByteArray(); }</code><technical_language>This boolean is twice. I add a variable good description in name. like: boolean dataExceedMaxLength = maxLength < data.length; this variable in if clause</technical_language>

Target:
private static byte[] clearZeroBytesFromString(byte[] data, int maxLength) { if (data == null) return null; ByteArrayOutputStream dataOut = new ByteArrayOutputStream() ; boolean maxLengthExceeded = maxLength < data.length; int limit = maxLengthExceeded ? maxLength - MAX_NUMBER_OF_UTF8_BYTES : data.length; for (int i = 0; i < limit; i++) { if (data[i] != 0x00) dataOut.write(data[i]); } if(maxLengthExceeded) { if (!isASingleByteUTF8Char(data[limit-1])) { int i = 0; while (!isAStartingByteUTF8Char(data[limit + i])) { if (i == MAX_NUMBER_OF_UTF8_BYTES) { log.error("The message data contains invalid UTF-8 character. The byte limit for one character was exceeded."); break; } dataOut.write(data[limit + i]); i++; } } } return dataOut.toByteArray(); }
Source:
<code>public String toString() { <START> return "SlottedInventoryItem{inventoryId=" + inventoryId + ", item=" + item + "}"; <END> }</code><technical_language>Guavas MoreObjects generate toString() implementations other code</technical_language>

Target:
public String toString() { return MoreObjects.toStringHelper(this) .add("inventoryId", inventoryId) .add("item", item) .toString(); }
Source:
<code>public void afterBegin() throws EJBException, RemoteException { <START> log.info("afterBegin called"); <END> checker.setSynchronizedBegin(); }</code><technical_language>log.trace</technical_language>

Target:
public void afterBegin() throws EJBException, RemoteException { log.trace("afterBegin called"); checker.setSynchronizedBegin(); }
Source:
<code>private MethodDescriptor( Method method, StarlarkMethod annotation, String name, String doc, boolean documented, boolean structField, ParamDescriptor[] parameters, boolean extraPositionals, boolean extraKeywords, boolean selfCall, boolean allowReturnNones, boolean useStarlarkThread, boolean useStarlarkSemantics) { this.method = method; this.annotation = annotation; this.name = name; this.doc = doc; this.documented = documented; this.structField = structField; this.parameters = parameters; this.extraPositionals = extraPositionals; this.extraKeywords = extraKeywords; this.selfCall = selfCall; this.allowReturnNones = allowReturnNones; this.useStarlarkThread = useStarlarkThread; this.useStarlarkSemantics = useStarlarkSemantics; <START> if (method.getReturnType() == void.class) { <END> howToHandleReturn = HowToHandleReturn.RETURN_NONE; } else if (StarlarkValue.class.isAssignableFrom(method.getReturnType()) || String.class == method.getReturnType() || Boolean.class == method.getReturnType()) { howToHandleReturn = allowReturnNones ? HowToHandleReturn.NULL_TO_NONE : HowToHandleReturn.ERROR_ON_NULL; } else if (boolean.class == method.getReturnType()) { howToHandleReturn = HowToHandleReturn.RETURN; } else if (int.class == method.getReturnType()) { howToHandleReturn = HowToHandleReturn.STARLARK_INT_OF_INT; } else { howToHandleReturn = HowToHandleReturn.FROM_JAVA; } }</code><technical_language>For brevity, declare a local ret = getReturnType(). Order comparisons in natural way: if (variable == constant)</technical_language>

Target:
private MethodDescriptor( Method method, StarlarkMethod annotation, String name, String doc, boolean documented, boolean structField, ParamDescriptor[] parameters, boolean extraPositionals, boolean extraKeywords, boolean selfCall, boolean allowReturnNones, boolean useStarlarkThread, boolean useStarlarkSemantics) { this.method = method; this.annotation = annotation; this.name = name; this.doc = doc; this.documented = documented; this.structField = structField; this.parameters = parameters; this.extraPositionals = extraPositionals; this.extraKeywords = extraKeywords; this.selfCall = selfCall; this.allowReturnNones = allowReturnNones; this.useStarlarkThread = useStarlarkThread; this.useStarlarkSemantics = useStarlarkSemantics; Class<?> ret = method.getReturnType(); if (ret == void.class || ret == boolean.class) { howToHandleReturn = HowToHandleReturn.NULL_TO_NONE; } else if (StarlarkValue.class.isAssignableFrom(ret) || ret == String.class || ret == Boolean.class) { howToHandleReturn = allowReturnNones ? HowToHandleReturn.NULL_TO_NONE : HowToHandleReturn.ERROR_ON_NULL; } else if (ret == int.class) { howToHandleReturn = HowToHandleReturn.STARLARK_INT_OF_INT; } else { howToHandleReturn = HowToHandleReturn.FROM_JAVA; } }
Source:
<code>public void next() { <START> RadioDroidApp radioDroidApp = (RadioDroidApp) this.getApplication(); <END> DataRadioStation station = radioDroidApp.getFavouriteManager().getNextById(currentStationID); if (station != null) new RadioDroidBrowserService.GetRealLinkAndPlayTask(itsContext, station, itsBinder).execute(); }</code><technical_language>remove this</technical_language>

Target:
public void next() { RadioDroidApp radioDroidApp = (RadioDroidApp) getApplication(); DataRadioStation station = radioDroidApp.getFavouriteManager().getNextById(currentStationID); if (station != null) new GetRealLinkAndPlayTask(itsContext, station, itsBinder).execute(); }
Source:
<code>private ModelField getModelField(String factName, String fieldName) { ModelField toReturn = null; if (modelFieldsMap.containsKey(factName)) { final ModelField[] modelFields = modelFieldsMap.get(factName); for (ModelField modelField : modelFields) { <START> if (modelField.getName().equals(fieldName)) { <END> toReturn = modelField; break; } } } return toReturn; }</code><technical_language>please Objects.equals</technical_language>

Target:
private ModelField getModelField(String factName, String fieldName) { ModelField toReturn = null; if (modelFieldsMap.containsKey(factName)) { final ModelField[] modelFields = modelFieldsMap.get(factName); for (ModelField modelField : modelFields) { if (Objects.equals(modelField.getName(), fieldName)) { toReturn = modelField; break; } } } return toReturn; }
Source:
<code>public AmbryBlobStorageServiceFactory(VerifiableProperties verifiableProperties, ClusterMap clusterMap, RestResponseHandler responseHandler, Router router, AccountService accountService) { if (verifiableProperties == null || clusterMap == null || responseHandler == null || router == null) { <START> throw new IllegalArgumentException("Null arguments were provided during instantiation!"); <END> } else { frontendConfig = new FrontendConfig(verifiableProperties); frontendMetrics = new FrontendMetrics(clusterMap.getMetricRegistry()); this.verifiableProperties = verifiableProperties; this.clusterMap = clusterMap; this.responseHandler = responseHandler; this.router = router; this.accountService = accountService; } logger.trace("Instantiated AmbryBlobStorageServiceFactory"); }</code><technical_language>if check accountService == null accountService is passed getBlobStorageService method</technical_language>

Target:
public AmbryBlobStorageServiceFactory(VerifiableProperties verifiableProperties, ClusterMap clusterMap, RestResponseHandler responseHandler, Router router, AccountService accountService) { this.verifiableProperties = Objects.requireNonNull(verifiableProperties, "Provided VerifiableProperties is null"); this.clusterMap = Objects.requireNonNull(clusterMap, "Provided ClusterMap is null"); this.responseHandler = Objects.requireNonNull(responseHandler, "Provided RestResponseHandler is null"); this.router = Objects.requireNonNull(router, "Provided Router is null"); this.accountService = Objects.requireNonNull(accountService, "Provided AccountService is null"); frontendConfig = new FrontendConfig(verifiableProperties); frontendMetrics = new FrontendMetrics(clusterMap.getMetricRegistry()); logger.trace("Instantiated AmbryBlobStorageServiceFactory"); }