auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void acceptsNoContentLengthOnClosedConnection() throws Exception { final String text = "Close Test"; final ByteArrayOutputStream output = new ByteArrayOutputStream(); final String greetings = "Hi everyone"; try (ServerSocket server = new ServerSocket(0)) { new Thread( new Runnable() { @Override public void run() { try { new BkBasic(new TkText(text)).accept( server.accept() ); } catch (final IOException exception) { throw new IllegalStateException(exception); } } } ).start(); try (Socket socket = new Socket( server.getInetAddress(), server.getLocalPort() ) ) { socket.getOutputStream().write( new JoinedText( BkBasicTest.CRLF, BkBasicTest.POST, BkBasicTest.HOST, "Connection: Close", "", greetings <START> ).asString().getBytes() <END> ); final InputStream input = socket.getInputStream(); final byte[] buffer = new byte[4096]; for (int count = input.read(buffer); count != -1; count = input.read(buffer)) { output.write(buffer, 0, count); } } } MatcherAssert.assertThat( output.toString(), Matchers.containsString(text) ); }</code><technical_language>@Serranya too, please BytesOf</technical_language>

Target:
public void acceptsNoContentLengthOnClosedConnection() throws Exception { final String text = "Close Test"; final ByteArrayOutputStream output = new ByteArrayOutputStream(); final String greetings = "Hi everyone"; try (ServerSocket server = new ServerSocket(0)) { new Thread( new Runnable() { @Override public void run() { try { new BkBasic(new TkText(text)).accept( server.accept() ); } catch (final IOException exception) { throw new IllegalStateException(exception); } } } ).start(); try (Socket socket = new Socket( server.getInetAddress(), server.getLocalPort() ) ) { socket.getOutputStream().write( new BytesOf( new JoinedText( BkBasicTest.CRLF, BkBasicTest.POST, BkBasicTest.HOST, "Connection: Close", "", greetings ) ).asBytes() ); final InputStream input = socket.getInputStream(); final byte[] buffer = new byte[4096]; for (int count = input.read(buffer); count != -1; count = input.read(buffer)) { output.write(buffer, 0, count); } } } MatcherAssert.assertThat( output.toString(), Matchers.containsString(text) ); }
Source:
<code><START> public void init(FeedbackSessionResultsBundle bundle) { <END> if (bundle == null) { return; } questionCommentsMap = new LinkedHashMap<>(); for (Map.Entry<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>> responseEntries : bundle.getQuestionResponseMap().entrySet()) { FeedbackQuestionAttributes question = bundle.questions.get(responseEntries.getKey().getId()); Map<FeedbackParticipantType, Boolean> responseVisibilityMap = getResponseVisibilityMap(question); List<InstructorFeedbackResponseComment> responseCommentList = buildInstructorFeedbackResponseComments( responseEntries.getValue(), bundle, question, responseVisibilityMap); questionCommentsMap.put(question, responseCommentList); } }</code><technical_language>If init is here, private</technical_language>

Target:
private void init(FeedbackSessionResultsBundle bundle) { if (bundle == null) { return; } questionCommentsMap = new LinkedHashMap<>(); for (Map.Entry<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>> responseEntries : bundle.getQuestionResponseMap().entrySet()) { FeedbackQuestionAttributes question = bundle.questions.get(responseEntries.getKey().getId()); Map<FeedbackParticipantType, Boolean> responseVisibilityMap = getResponseVisibilityMap(question); List<InstructorFeedbackResponseComment> responseCommentList = buildInstructorFeedbackResponseComments( responseEntries.getValue(), bundle, question, responseVisibilityMap); questionCommentsMap.put(question, responseCommentList); } }
Source:
<code>protected int run() throws Exception { boolean errorOccurred = false; final Jenkins jenkins = Jenkins.getActiveInstance(); final HashSet<String> hs = new HashSet<String>(); hs.addAll(nodes); List<String> names = null; for (String node_s : hs) { Computer computer = null; try { computer = jenkins.getComputer(node_s); if (computer == null) { if (names == null) { names = new ArrayList<String>(); <START> for (Computer c : jenkins.getComputers()) <END> if (!c.getName().isEmpty()) names.add(c.getName()); } String adv = EditDistance.findNearest(node_s, names); throw new IllegalArgumentException(adv == null ? hudson.model.Messages.Computer_NoSuchSlaveExistsWithoutAdvice(node_s) : hudson.model.Messages.Computer_NoSuchSlaveExists(node_s, adv)); } computer.cliDisconnect(cause); } catch (Exception e) { if (hs.size() == 1) { throw e; } final String errorMsg = String.format(node_s + ": " + e.getMessage()); stderr.println(errorMsg); errorOccurred = true; continue; } } if (errorOccurred) { throw new AbortException("Error occured while performing this command, see previous stderr output."); } return 0; }</code><technical_language>NIT: if nesting multiple line conditionals/loops please { } (I prefer nested liners braces - this more personal!)</technical_language>

Target:
protected int run() throws Exception { boolean errorOccurred = false; final Jenkins jenkins = Jenkins.getActiveInstance(); final HashSet<String> hs = new HashSet<String>(); hs.addAll(nodes); List<String> names = null; for (String node_s : hs) { Computer computer = null; try { computer = jenkins.getComputer(node_s); if (computer == null) { if (names == null) { names = new ArrayList<String>(); for (Computer c : jenkins.getComputers()) { if (!c.getName().isEmpty()) { names.add(c.getName()); } } } String adv = EditDistance.findNearest(node_s, names); throw new IllegalArgumentException(adv == null ? hudson.model.Messages.Computer_NoSuchSlaveExistsWithoutAdvice(node_s) : hudson.model.Messages.Computer_NoSuchSlaveExists(node_s, adv)); } computer.cliDisconnect(cause); } catch (Exception e) { if (hs.size() == 1) { throw e; } stderr.println(String.format(node_s + ": " + e.getMessage())); errorOccurred = true; continue; } } if (errorOccurred) { throw new AbortException("Error occured while performing this command, see previous stderr output."); } return 0; }
Source:
<code>CacheManagerWrapper() { manager = Caching.getCachingProvider().getCacheManager(); constructCache(manager, ASSET_FILENAME_CACHE, String.class, String.class, config -> { config.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 15))); }); constructCache(manager, ASSET_CONTENT_CACHE, String.class, Object.class, config -> { config.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 15))); }); constructCache(manager, TAXONOMY_GRAPH_CACHE, String.class, TaxonomyGraph.class, config -> { }); constructCache(manager, TAXONOMY_COUNT_TABLE_CACHE, String.class, TaxonomyCountTable.class, config -> { <START> }); <END> constructCache(manager, RECENT_ARTICLE_CACHE, String.class, List.class, config -> { config.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 30))); }); constructCache(manager, REMOTE_SERVICE_CACHE, RemoteCacheKey.class, Object.class, config -> { config.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.HOURS, 1))); }); }</code><technical_language>I realized while I dealing [editorial content TTL problem](<LINK_0> bad taxonomy caches expire all? stores entry journal. if taxonomy graph changes thesaurus update, surely taxonomy count table update new articles ingested, right</technical_language>

Target:
CacheManagerWrapper() { manager = Caching.getCachingProvider().getCacheManager(); constructCache(manager, ASSET_FILENAME_CACHE, String.class, String.class, config -> { config.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 15))); }); constructCache(manager, ASSET_CONTENT_CACHE, String.class, Object.class, config -> { config.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 15))); }); constructCache(manager, TAXONOMY_GRAPH_CACHE, String.class, TaxonomyGraph.class, config -> { config.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(DEFAULT_TTL)); }); constructCache(manager, TAXONOMY_COUNT_TABLE_CACHE, String.class, TaxonomyCountTable.class, config -> { config.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(DEFAULT_TTL)); }); constructCache(manager, RECENT_ARTICLE_CACHE, String.class, List.class, config -> { config.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 30))); }); for (RemoteCacheSpace remoteCacheSpace : RemoteCacheSpace.values()) { constructCache(manager, remoteCacheSpace.getCacheName(), RemoteCacheKey.class, Object.class, config -> { config.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(remoteCacheSpace.getTimeToLive())); }); } }
Source:
<code>public void claim(String deploymentId, Long taskId, String userId) { UserTaskInstanceDesc task = dataService.getTaskById(taskId); validateTask(deploymentId, taskId, task); RuntimeManager manager = getRuntimeManager(task); if (manager == null) { logger.warn("Cannot find runtime manager for task {}", taskId); return; } RuntimeEngine engine = manager.getRuntimeEngine(ProcessInstanceIdContext.get(task.getProcessInstanceId())); try { TaskService taskService = engine.getTaskService(); taskService.claim(taskId, userId); } catch(PermissionDeniedException e){ throw new PermissionDeniedException(e.getMessage()); } catch(TaskNotFoundException e){ <START> throw new TaskNotFoundException(e.getMessage()); <END> } finally { disposeRuntimeEngine(manager, engine); } }</code><technical_language>part } catch(PermissionDeniedException e){ throw new PermissionDeniedException(e.getMessage()); } catch(TaskNotFoundException e){ throw new TaskNotFoundException(e.getMessage()); completely omitted I believe. catch type of exception throwing message, is reason do it, Java do automatically. I delete 4 lines completely leave try {...} finally {...} block</technical_language>

Target:
public void claim(String deploymentId, Long taskId, String userId) { UserTaskInstanceDesc task = dataService.getTaskById(taskId); validateTask(deploymentId, taskId, task); RuntimeManager manager = getRuntimeManager(task); if (manager == null) { logger.warn("Cannot find runtime manager for task {}", taskId); return; } RuntimeEngine engine = manager.getRuntimeEngine(ProcessInstanceIdContext.get(task.getProcessInstanceId())); try { TaskService taskService = engine.getTaskService(); taskService.claim(taskId, userId); } finally { disposeRuntimeEngine(manager, engine); } }
Source:
<code>protected void addHeaders(HttpServletRequest request, HttpServletResponse response, RequestFilterConfig config) { addConfiguredHeaders(response); if (request.getMethod().equals("GET")) { if (config.isCached()) { addCacheHeaders(response, config.isPrivate(), config.getCacheTime()); } else if (config.isPrivate()) { <START> response.setHeader("Cache-Control", "private, no-cache, no-store"); <END> } } }</code><technical_language>move logic addCacheHeaders please</technical_language>

Target:
protected void addHeaders(HttpServletRequest request, HttpServletResponse response, RequestFilterConfig config) { addConfiguredHeaders(response); if (request.getMethod().equals("GET")) { addCacheHeaders(response, config); } }
Source:
<code>public static IIrsServer createIrsServer(VdsProtocol vdsProtocol, String hostname, int port, int clientTimeOut, int connectionTimeOut, int clientRetries, int heartbeat) { IIrsServer irsServer = null; if (VdsProtocol.STOMP == vdsProtocol) { irsServer = new JsonRpcIIrsServer(JsonRpcUtils.createStompClient(hostname, port, connectionTimeOut, clientTimeOut, clientRetries, heartbeat, Config.<Boolean> getValue(ConfigValues.EncryptHostCommunication), <START> Config.<String> getValue(ConfigValues.VdsmSLLProtocol))); <END> } else if (VdsProtocol.XML == vdsProtocol){ Pair<IrsServerConnector, HttpClient> returnValue = XmlRpcUtils.getConnection(hostname, port, clientTimeOut, connectionTimeOut, clientRetries, IrsServerConnector.class, Config.<Boolean> getValue(ConfigValues.EncryptHostCommunication)); irsServer = new IrsServerWrapper(returnValue.getFirst(), returnValue.getSecond()); } return irsServer; }</code><technical_language>XMLRPC is out of game for this configuration, right</technical_language>

Target:
public static IIrsServer createIrsServer(VdsProtocol vdsProtocol, String hostname, int port, int clientTimeOut, int connectionTimeOut, int clientRetries, int heartbeat) { IIrsServer irsServer = null; if (VdsProtocol.STOMP == vdsProtocol) { irsServer = new JsonRpcIIrsServer(JsonRpcUtils.createStompClient(hostname, port, connectionTimeOut, clientTimeOut, clientRetries, heartbeat, Config.<Boolean> getValue(ConfigValues.EncryptHostCommunication), Config.<String> getValue(ConfigValues.VdsmSSLProtocol))); } else if (VdsProtocol.XML == vdsProtocol){ Pair<IrsServerConnector, HttpClient> returnValue = XmlRpcUtils.getConnection(hostname, port, clientTimeOut, connectionTimeOut, clientRetries, IrsServerConnector.class, Config.<Boolean> getValue(ConfigValues.EncryptHostCommunication)); irsServer = new IrsServerWrapper(returnValue.getFirst(), returnValue.getSecond()); } return irsServer; }
Source:
<code>protected void onResume() { super.onResume(); disposable = realm.where(Person.class).isNotNull("githubUserName").findAllSortedAsync("name").asFlowable() .filter(people -> people.isLoaded()) <START> .flatMap(people -> Flowable.fromIterable(people)) <END> .flatMap(person -> api.user(person.getGithubUserName())) .map(gitHubUser -> new UserViewModel(gitHubUser.name, gitHubUser.public_repos, gitHubUser.public_gists)) .observeOn(AndroidSchedulers.mainThread()) .subscribe(user -> { TextView userView = new TextView(RetrofitExample.this); userView.setText( String.format(Locale.US, "%s : %d/%d", user.getUsername(), user.getPublicRepos(), user.getPublicGists())); container.addView(userView); }, throwable -> throwable.printStackTrace()); }</code><technical_language>I if this switchMap()</technical_language>

Target:
protected void onResume() { super.onResume(); disposable = realm.where(Person.class).isNotNull("githubUserName").findAllSortedAsync("name").asFlowable() .filter(people -> people.isLoaded()) .switchMap(people -> Flowable.fromIterable(people)) .flatMap(person -> api.user(person.getGithubUserName())) .map(gitHubUser -> new UserViewModel(gitHubUser.name, gitHubUser.public_repos, gitHubUser.public_gists)) .observeOn(AndroidSchedulers.mainThread()) .subscribe(user -> { TextView userView = new TextView(RetrofitExample.this); userView.setText( String.format(Locale.US, "%s : %d/%d", user.getUsername(), user.getPublicRepos(), user.getPublicGists())); container.addView(userView); }, throwable -> throwable.printStackTrace()); }
Source:
<code>protected Token listToken() { Token token = new Token(); if (SecurityConstants.AUTH_PROVIDER.get() == null || SecurityConstants.NO_PROVIDER.equalsIgnoreCase(SecurityConstants.AUTH_PROVIDER.get())) { return token; } if (SecurityConstants.INTERNAL_AUTH_PROVIDERS.contains(SecurityConstants.AUTH_PROVIDER.get())) { for (TokenCreator tokenCreator : tokenCreators) { if (tokenCreator.isConfigured() && tokenCreator.providerType().equalsIgnoreCase(SecurityConstants.AUTH_PROVIDER.get())) { if (!SecurityConstants.SECURITY.get()) { <START> tokenCreator.reset(); <END> } token = tokenCreator.getCurrentToken(); break; } } return token; } else { if (externalAuthProvider.isConfigured()) { return externalAuthProvider.readCurrentToken(); } } return token; }</code><technical_language>listing tokens this reset</technical_language>

Target:
protected Token listToken() { Token token = new Token(); if (SecurityConstants.AUTH_PROVIDER.get() == null || SecurityConstants.NO_PROVIDER.equalsIgnoreCase(SecurityConstants.AUTH_PROVIDER.get())) { return token; } if (SecurityConstants.INTERNAL_AUTH_PROVIDERS.contains(SecurityConstants.AUTH_PROVIDER.get())) { for (TokenCreator tokenCreator : tokenCreators) { if (tokenCreator.isConfigured() && tokenCreator.providerType().equalsIgnoreCase(SecurityConstants.AUTH_PROVIDER.get())) { token = tokenCreator.getCurrentToken(); break; } } return token; } else { if (externalAuthProvider.isConfigured()) { return externalAuthProvider.readCurrentToken(); } } return token; }
Source:
<code>public void addStreamStoreDefinition(StreamStoreDefinition streamStoreDefinition) { streamStoreDefinition.getTables().forEach(this::addTableDefinition); StreamStoreRenderer renderer = streamStoreDefinition.getRenderer(packageName, name); Multimap<String, Supplier<OnCleanupTask>> streamStoreCleanupTasks = streamStoreDefinition.getCleanupTasks( packageName, name, renderer, namespace); StreamStoreCleanupMetadata metadata = ImmutableStreamStoreCleanupMetadata.builder() .numHashedRowComponents(streamStoreDefinition.getNumberOfRowComponentsHashed()) .streamIdType(streamStoreDefinition.getIdType()) .build(); streamStoreDefinition.getTables().forEach( (tableName, definition) -> { <START> streamStoreCleanupMetadata.put(tableName, metadata); <END> }); cleanupTasks.putAll(streamStoreCleanupTasks); streamStoreRenderers.add(renderer); }</code><technical_language>nit: write a lambda</technical_language>

Target:
public void addStreamStoreDefinition(StreamStoreDefinition streamStoreDefinition) { streamStoreDefinition.getTables().forEach(this::addTableDefinition); StreamStoreRenderer renderer = streamStoreDefinition.getRenderer(packageName, name); Multimap<String, Supplier<OnCleanupTask>> streamStoreCleanupTasks = streamStoreDefinition.getCleanupTasks( packageName, name, renderer, namespace); StreamStoreCleanupMetadata metadata = ImmutableStreamStoreCleanupMetadata.builder() .numHashedRowComponents(streamStoreDefinition.getNumberOfRowComponentsHashed()) .streamIdType(streamStoreDefinition.getIdType()) .build(); streamStoreDefinition.getTables().forEach( (tableName, definition) -> streamStoreCleanupMetadata.put(tableName, metadata)); cleanupTasks.putAll(streamStoreCleanupTasks); streamStoreRenderers.add(renderer); }
Source:
<code>private Object getService() throws InterruptedException { if (timeout < 0) { tracker.open(); try { return tracker.getService(); } finally { tracker.close(); } } <START> return getServiceFromTracker(tracker, timeout); <END> }</code><technical_language>is this supposed do</technical_language>

Target:
private Object getService() throws InterruptedException { if (timeout < 0) { tracker.open(); try { return tracker.getService(); } finally { tracker.close(); } } return waitForServiceFromTracker(tracker, timeout); }
Source:
<code>private IRequirement getRequirement(SiteIU iu) { String id = iu.getID(); String range = iu.getRange(); String type = iu.getQueryType(); String expression = iu.getQueryExpression(); String[] params = iu.getQueryParams(); if (id != null) { VersionRange vRange = new VersionRange(range); return MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, id, vRange, null, false, false); <START> } else if (type.equals("match")) { <END> String[] allArgs = new String[(params == null ? 0 : params.length) + 1]; allArgs[0] = id; if (params != null) System.arraycopy(params, 0, allArgs, 1, params.length); IMatchExpression<IInstallableUnit> iuMatcher = ExpressionUtil.getFactory() .<IInstallableUnit> matchExpression(ExpressionUtil.parse(expression), id); return MetadataFactory.createRequirement(iuMatcher, null, 0, 1, true); } else if (type.equals("context")) { throw new IllegalStateException("Context iu queries are not supported in Tycho. Faulty expression is " + expression); } return null; }</code><technical_language>if type null. If so, reverse equals() order safe side: "match".equals(type)</technical_language>

Target:
private IRequirement getRequirement(SiteIU iu) { String id = iu.getID(); String range = iu.getRange(); String type = iu.getQueryType(); String expression = iu.getQueryExpression(); String[] params = iu.getQueryParams(); if (id != null) { VersionRange vRange = new VersionRange(range); return MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, id, vRange, null, false, false); } else if ("match".equals(type)) { String[] allArgs = new String[(params == null ? 0 : params.length) + 1]; allArgs[0] = id; if (params != null) System.arraycopy(params, 0, allArgs, 1, params.length); IMatchExpression<IInstallableUnit> iuMatcher = ExpressionUtil.getFactory() .<IInstallableUnit> matchExpression(ExpressionUtil.parse(expression), params); return MetadataFactory.createRequirement(iuMatcher, null, 0, 1, true); } else if ("context".equals(type)) { throw new IllegalStateException( "Context iu queries are not supported in Tycho. Faulty expression is " + expression); } return null; }
Source:
<code>public static Logger getLogger(Class<?> key) { <START> return LOGGERS.computeIfAbsent(key.getName(), name -> new FailsafeLogger(LOGGER_ADAPTER.getLogger(key))); <END> }</code><technical_language>I suggest : java return LOGGERS.computeIfAbsent(key.getName(), name -> new FailsafeLogger(LOGGER_ADAPTER.getLogger(name))); for a readability. Note parameter for getLogger changed key name</technical_language>

Target:
public static Logger getLogger(Class<?> key) { return LOGGERS.computeIfAbsent(key.getName(), name -> new FailsafeLogger(LOGGER_ADAPTER.getLogger(name))); }
Source:
<code>public void setResponse(ClearReplyMessage response) { if (response.getException() == null) { <START> this.returnValue = (Boolean) response.getReturnValue(); <END> } }</code><technical_language>is this cast Boolean? returnValue field is primitive waitForResult() method returns a primitive well. feels agree type is</technical_language>

Target:
public void setResponse(ClearReplyMessage response) { if (response.getException() == null) { this.returnValue = (boolean) response.getReturnValue(); } }
Source:
<code>private void displayBrowserCompatibilityWarning() { if (!internalConfiguration.isCurrentBrowserSupported() && DisplayBrowserCompatibilityWarning.getValue()) { final AlertPanel alert = getAlertManager().showAlert(Type.WARNING, SafeHtmlUtils.fromSafeConstant( messages.browserNotSupported(dynamicMessages.compatibleBrowserDocsUrl()))); <START> final Timer timer = new Timer() { <END> @Override public void run() { getAlertManager().detachAlert(alert); } }; alert.getWidget().addCloseHandler(new AlertCloseHandler() { @Override public void onClose(AlertCloseEvent evt) { timer.cancel(); } }); timer.schedule(5000); } }</code><technical_language>This code assumes alert shown right calling AlertManager.showAlert disable alerts AlertManager.setCanShowAlerts effectively timer non-reliable. Also, this kind of auto-hide functionality extracted AlertManager user code mess timers. Please consider change in AlertManager: public void showAlert(Type type, SafeHtml message) { showAlert(type, message, 0); } public void showAlert(final Type type, final SafeHtml message, final int autoHideMs) { ScheduledCommand command = new ScheduledCommand() { @Override public void execute() { final AlertPanel alert = createAlert(type, message); attachAlert(alert); if (autoHideMs > 0) { final Timer timer = new Timer() { @Override public void run() { detachAlert(alert); } }; alert.getWidget().addCloseHandler(new AlertCloseHandler() { @Override public void onClose(AlertCloseEvent evt) { timer.cancel(); } }); timer.schedule(autoHideMs); } } }; if (canShowAlerts) { command.execute(); } else { deferredAlertCommands.add(command); } } void detachAlert(AlertPanel alertPanel) { RootPanel.get().remove(alertPanel); } This way, expose AlertPanel user code - provide auto-hide functionality part of API. timer starts running alert box is shown, is want. Please think</technical_language>

Target:
private void displayBrowserCompatibilityWarning() { if (!internalConfiguration.isCurrentBrowserSupported() && DisplayBrowserCompatibilityWarning.getValue()) { getAlertManager().showAlert(Type.WARNING, SafeHtmlUtils.fromSafeConstant( messages.browserNotSupported(dynamicMessages.compatibleBrowserDocsUrl())), 5000); } }
Source:
<code>public void ensureUnsignedInteger_isDecodedWithCorrectSignum() { byte[] bigNumberByteArray = {-13, -75, 19, 86, -119, 67, 112, -4, 118, -86, 98, -46, 103, -42, -126, 63, -60, -15, -87, 57, 43, 11, -17, -52, 0, 3, -65, 14, -67, -40, 65, 119}; SolidityType testObject = new SolidityType.UnsignedIntType("uint256"); Object decode = testObject.decode(bigNumberByteArray); assertEquals(decode.getClass(), BigInteger.class); BigInteger actualBigInteger = (BigInteger) decode; <START> BigInteger expectedBigInteger = new BigInteger("f3b51356894370fc76aa62d267d6823fc4f1a9392b0befcc0003bf0ebdd84177", 16); <END> assertEquals(expectedBigInteger, actualBigInteger); }</code><technical_language>BigInteger expectedBigInteger = new BigInteger(Hex.toHexString(bigNumberByteArray), 16); here, magic</technical_language>

Target:
public void ensureUnsignedInteger_isDecodedWithCorrectSignum() { byte[] bigNumberByteArray = { -13, -75, 19, 86, -119, 67, 112, -4, 118, -86, 98, -46, 103, -42, -126, 63, -60, -15, -87, 57, 43, 11, -17, -52, 0, 3, -65, 14, -67, -40, 65, 119 }; SolidityType testObject = new SolidityType.UnsignedIntType("uint256"); Object decode = testObject.decode(bigNumberByteArray); assertEquals(decode.getClass(), BigInteger.class); BigInteger actualBigInteger = (BigInteger) decode; BigInteger expectedBigInteger = new BigInteger(Hex.toHexString(bigNumberByteArray), 16); assertEquals(expectedBigInteger, actualBigInteger); }
Source:
<code>public ObjectTable.Writer getObjectWriter(Object obj) { BiConsumer<ObjectOutput, Object> writer = null; Class<?> clazz = obj.getClass(); AdvancedExternalizer internalExt = getExternalizer(internalExts, clazz); if (internalExt != null) writer = (out, object) -> writeInternalClean(object, internalExt, out); AdvancedExternalizer externalExt = getExternalizer(externalExts, clazz); if (externalExt != null) <START> writer = (out, object) -> writeExternalClean(object, externalExt, out); <END> boolean isMarshallable; try { isMarshallable = persistenceMarshaller.isMarshallable(obj); } catch (Exception ignore) { isMarshallable = false; } if (isMarshallable) writer = (out, object) -> writeUnknownClean(persistenceMarshaller, obj, out); return writer != null ? writer::accept : null; }</code><technical_language>is here. code appears is overwrite writer variable, return writer immediately</technical_language>

Target:
public ObjectTable.Writer getObjectWriter(Object obj) { Class<?> clazz = obj.getClass(); AdvancedExternalizer internalExt = getExternalizer(internalExts, clazz); if (internalExt != null) return (out, object) -> writeInternalClean(object, internalExt, out); AdvancedExternalizer externalExt = getExternalizer(externalExts, clazz); if (externalExt != null) return (out, object) -> writeExternalClean(object, externalExt, out); try { if (persistenceMarshaller.isMarshallable(obj)) return (out, object) -> writeUnknownClean(persistenceMarshaller, obj, out); } catch (Exception ignore) { } return null; }
Source:
<code>public void tearDown() throws Exception { <START> workspaceServiceClient.delete(ws.getName(), user.getName()); <END> }</code><technical_language>*ws* is removed automatically pre-destroy step. Instead, of that, need try removal of workspaces name **MIN_WORKSPACE_NAME** **MAX_WORKSPACE_NAME** remain test execution in case of failure</technical_language>

Target:
public void tearDown() throws Exception { workspaceServiceClient.delete(workspaceName, user.getName()); workspaceServiceClient.delete(MIN_WORKSPACE_NAME, user.getName()); workspaceServiceClient.delete(MAX_WORKSPACE_NAME, user.getName()); }
Source:
<code>private LRNLayer(@Parameter(LayerIndex.class) final int index, @Parameter(LayerInputShape.class) final String inputShape, @Parameter(LocalSize.class) final int localSize, @Parameter(Alpha.class) final float alpha, @Parameter(Beta.class) final float beta, @Parameter(K.class) final float k, final MatrixFactory matrixFactory) { super(index, inputShape); this.localSize = localSize; this.alpha = alpha; this.beta = beta; this.k = k; this.paddingSize = (localSize - 1) / 2; this.matrixFactory = matrixFactory; <START> this.scale = null; <END> this.layerError = null; if (getInputShape().length == 2) { this.inputChannel = 1; this.inputSize = getInputShape()[0] * getInputShape()[1]; } else { this.inputChannel = getInputShape()[0]; this.inputSize = getInputShape()[1] * getInputShape()[2]; } }</code><technical_language>scale is equal activation. Need another matrix named activation</technical_language>

Target:
private LRNLayer(@Parameter(LayerIndex.class) final int index, @Parameter(LayerInputShape.class) final String inputShape, @Parameter(LocalSize.class) final int localSize, @Parameter(Alpha.class) final float alpha, @Parameter(Beta.class) final float beta, @Parameter(K.class) final float k, final MatrixFactory matrixFactory) { super(index, inputShape); this.localSize = localSize; this.alpha = alpha; this.beta = beta; this.k = k; this.paddingSize = (localSize - 1) / 2; this.matrixFactory = matrixFactory; if (getInputShape().length == 2) { this.inputChannel = 1; this.inputSize = getInputShape()[0] * getInputShape()[1]; } else { this.inputChannel = getInputShape()[0]; this.inputSize = getInputShape()[1] * getInputShape()[2]; } }
Source:
<code>public Object getAllColumnsModeratelyWideRowWithManyUncommitted( DirtyModeratelyWideRowTable table, Blackhole blackhole) { <START> return getAllRowsAndAssert(table, blackhole, <END> count -> Preconditions.checkState(count == table.getNumReadableCols(), "Should be %s columns, but was: %s", table.getNumReadableCols(), count)); }</code><technical_language>need return consuming columns blackhole, no</technical_language>

Target:
public void getAllColumnsModeratelyWideRowWithManyUncommitted( DirtyModeratelyWideRowTable table, Blackhole blackhole) { getAllRowsAndAssert(table, blackhole, count -> Preconditions.checkState(count == table.getNumReadableCols(), "Should be %s columns, but was: %s", table.getNumReadableCols(), count)); }
Source:
<code>protected void createClient(Section section, FormToolkit toolkit) { section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.verticalAlignment = SWT.TOP; data.horizontalSpan = 2; section.setLayoutData(data); section.setText(PDEUIMessages.InformationSection_0); Composite client = toolkit.createComposite(section); client.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 2)); client.setLayoutData(new GridData(GridData.FILL_BOTH)); fNameText = toolkit.createText(client, getTarget().getName()); fNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fNameText.addModifyListener(e -> { String value = fNameText.getText().trim(); String name = getTarget().getName(); <START> if(value!=null) { <END> if (!value.equals(name)) { getTarget().setName(value.length() > 0 ? value : null); markDirty(); } } }); fNameTextValidator = new TextValidator(fPage.getManagedForm(), fNameText, null, true) { @Override protected boolean autoEnable() { if (getText().getEditable() == false) { return false; } return true; } @Override protected boolean validateControl() { return ControlValidationUtility.validateRequiredField(fNameText.getText(), fNameTextValidator, IMessageProvider.ERROR); } }; toolkit.paintBordersFor(client); section.setClient(client); }</code><technical_language>I is null this point a result of String#trim</technical_language>

Target:
protected void createClient(Section section, FormToolkit toolkit) { section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.verticalAlignment = SWT.TOP; data.horizontalSpan = 2; section.setLayoutData(data); section.setText(PDEUIMessages.InformationSection_0); Composite client = toolkit.createComposite(section); client.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 2)); client.setLayoutData(new GridData(GridData.FILL_BOTH)); fNameText = toolkit.createText(client, getTarget().getName()); fNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fNameText.addModifyListener(e -> { String value = fNameText.getText().trim(); String name = getTarget().getName(); if (!value.equals(name)) { getTarget().setName(value.length() > 0 ? value : null); markDirty(); } }); fNameTextValidator = new TextValidator(fPage.getManagedForm(), fNameText, null, true) { @Override protected boolean autoEnable() { if (getText().getEditable() == false) { return false; } return true; } @Override protected boolean validateControl() { return ControlValidationUtility.validateRequiredField(fNameText.getText(), fNameTextValidator, IMessageProvider.ERROR); } }; toolkit.paintBordersFor(client); section.setClient(client); }
Source:
<code><START> public void testComplexTypeWithProperties() <END> { RecordDataSchema mainRecordSchema = (RecordDataSchema) parsePdlSchema("ComplexTypeWithProperties.pdl"); RecordDataSchema.Field arrayField = mainRecordSchema.getField("arrayField"); Assert.assertNotNull(arrayField); Assert.assertFalse(arrayField.getType().getProperties().isEmpty()); DataMap expectedProperty = new DataMap(); DataMap validate = new DataMap(); validate.put("minSize", 1); expectedProperty.put("validate", validate); Assert.assertEquals(arrayField.getType().getProperties(), expectedProperty); RecordDataSchema.Field mapField = mainRecordSchema.getField("mapField"); Assert.assertNotNull(mapField); Assert.assertFalse(mapField.getType().getProperties().isEmpty()); Assert.assertEquals(mapField.getType().getProperties(), expectedProperty); RecordDataSchema.Field unionField = mainRecordSchema.getField("unionField"); Assert.assertNotNull(unionField); Assert.assertFalse(unionField.getType().getProperties().isEmpty()); validate.clear(); validate.put("minValue", 0); Assert.assertEquals(unionField.getType().getProperties(), expectedProperty); }</code><technical_language>overkill, test fields properties</technical_language>

Target:
public void testComplexTypeWithProperties() { RecordDataSchema mainRecordSchema = (RecordDataSchema) parsePdlSchema("ComplexTypeWithProperties.pdl"); RecordDataSchema.Field arrayField = mainRecordSchema.getField("arrayField"); Assert.assertNotNull(arrayField); Assert.assertFalse(arrayField.getType().getProperties().isEmpty()); DataMap expectedProperty = new DataMap(); DataMap validate = new DataMap(); validate.put("minSize", 1); expectedProperty.put("validate", validate); Assert.assertTrue(arrayField.getProperties().isEmpty()); Assert.assertEquals(arrayField.getType().getProperties(), expectedProperty); RecordDataSchema.Field mapField = mainRecordSchema.getField("mapField"); Assert.assertNotNull(mapField); Assert.assertTrue(mapField.getProperties().isEmpty()); Assert.assertFalse(mapField.getType().getProperties().isEmpty()); Assert.assertEquals(mapField.getType().getProperties(), expectedProperty); RecordDataSchema.Field unionField = mainRecordSchema.getField("unionField"); Assert.assertNotNull(unionField); Assert.assertTrue(unionField.getProperties().isEmpty()); Assert.assertFalse(unionField.getType().getProperties().isEmpty()); validate.clear(); validate.put("minValue", 0); Assert.assertEquals(unionField.getType().getProperties(), expectedProperty); }
Source:
<code>public boolean add(Object o) { if(!(o instanceof Profile)) { return false; } Profile profile = EMFHelper.reloadIntoContext((Profile)o, umlSource); Command command = new ApplyProfileCommand(umlSource, profile, (TransactionalEditingDomain)domain); commands.add(command); <START> commands.add(new ApplyProfileCommand(umlSource, profile, (TransactionalEditingDomain)domain)); <END> return wrappedList.add(o); }</code><technical_language>Again, applying profile package. this time it?s command</technical_language>

Target:
public boolean add(Object o) { if(!(o instanceof Profile)) { return false; } Profile profile = EMFHelper.reloadIntoContext((Profile)o, umlSource); Command command = new ApplyProfileCommand(umlSource, profile, (TransactionalEditingDomain)domain); commands.add(command); return wrappedList.add(o); }
Source:
<code>private JobModel generateNewJobModel(List<String> processors) { <START> Map<TaskName, Integer> changeLogToPartitionMap = new HashMap<>(); <END> String existingJobModelVersion = zkUtils.getJobModelVersion(); if (existingJobModelVersion != null) { JobModel existingJobModel = zkUtils.getJobModel(existingJobModelVersion); for (ContainerModel containerModel : existingJobModel.getContainers().values()) { containerModel.getTasks().forEach((taskName, taskModel) -> changeLogToPartitionMap.put(taskName, taskModel.getChangelogPartition().getPartitionId())); } } return JobModelManager.readJobModel(this.config, changeLogToPartitionMap, null, streamMetadataCache, processors); }</code><technical_language>I try avoid job model generation</technical_language>

Target:
private JobModel generateNewJobModel(List<String> processors) { String zkJobModelVersion = zkUtils.getJobModelVersion(); if (zkJobModelVersion != null && !Objects.equals(cachedJobModelVersion, zkJobModelVersion)) { JobModel jobModel = zkUtils.getJobModel(zkJobModelVersion); for (ContainerModel containerModel : jobModel.getContainers().values()) { containerModel.getTasks().forEach((taskName, taskModel) -> changeLogPartitionMap.put(taskName, taskModel.getChangelogPartition().getPartitionId())); } cachedJobModelVersion = zkJobModelVersion; } return JobModelManager.readJobModel(this.config, changeLogPartitionMap, null, streamMetadataCache, processors); }
Source:
<code>public Status insert(String tableName, String key, HashMap<String, ByteIterator> values) { try { int numFields = values.size(); OrderedFieldInfo fieldInfo = getFieldInfo(values); StatementType type = new StatementType(StatementType.Type.INSERT, tableName, numFields, fieldInfo.getFieldKeys(), getShardIndexByKey(key)); PreparedStatement insertStatement = cachedStatements.get(type); if (insertStatement == null) { insertStatement = createAndCacheInsertStatement(type, key); } insertStatement.setString(1, key); int index = 2; for (String value: fieldInfo.getFieldValues()) { insertStatement.setString(index++, value); } int result; if (batchSize > 0) { insertStatement.addBatch(); if (++numRowsInBatch % batchSize == 0) { <START> int[] results = insertStatement.executeBatch(); <END> for (int r : results) { if (r != 1) { return Status.ERROR; } } } return Status.OK; } else { result = insertStatement.executeUpdate(); } if (result == 1) { return Status.OK; } return Status.UNEXPECTED_STATE; } catch (SQLException e) { System.err.println("Error in processing insert to table: " + tableName + e); return Status.ERROR; } }</code><technical_language>do this in cleanup, if outstanding batched inserts. rely record count for insert multiple of batch size, I think</technical_language>

Target:
public Status insert(String tableName, String key, HashMap<String, ByteIterator> values) { try { int numFields = values.size(); OrderedFieldInfo fieldInfo = getFieldInfo(values); StatementType type = new StatementType(StatementType.Type.INSERT, tableName, numFields, fieldInfo.getFieldKeys(), getShardIndexByKey(key)); PreparedStatement insertStatement = cachedStatements.get(type); if (insertStatement == null) { insertStatement = createAndCacheInsertStatement(type, key); } insertStatement.setString(1, key); int index = 2; for (String value: fieldInfo.getFieldValues()) { insertStatement.setString(index++, value); } int result; if (batchSize > 0) { insertStatement.addBatch(); if (++numRowsInBatch % batchSize == 0) { int[] results = insertStatement.executeBatch(); for (int r : results) { if (r != 1) { return Status.ERROR; } } return Status.OK; } return Status.BATCHED_OK; } else { result = insertStatement.executeUpdate(); } if (result == 1) { return Status.OK; } return Status.UNEXPECTED_STATE; } catch (SQLException e) { System.err.println("Error in processing insert to table: " + tableName + e); return Status.ERROR; } }
Source:
<code>T convert(@Nonnull JarFile jarFile, @Nonnull JarEntry entry) throws IOException; } <START> private <T> T storeAndConvert(JarFile jarFile, File file, String resourceName, Converter<T> converter) throws IOException { <END> if (jarFile == null) { if (file.exists()) { jarFile = new JarFile(file); jarFiles.put(file, jarFile); } else { return null; } jarFile = (JarFile) jarFiles.get(file); } JarEntry entry = jarFile.getJarEntry(resourceName); if (entry == null) return null; return converter.convert(jarFile, entry); }</code><technical_language>suggestion @CheckForNull private <T> T storeAndConvert(JarFile jarFile, File file, String resourceName, Converter<T> converter) throws IOException {</technical_language>

Target:
T convert(@Nonnull JarFile jarFile, @Nonnull JarEntry entry) throws IOException; } @CheckForNull private <T> T storeAndConvert(JarFile jarFile, File file, String resourceName, Converter<T> converter) throws IOException { if (jarFile == null) { if (file.exists()) { jarFile = new JarFile(file); jarFiles.put(file, jarFile); } else { return null; } jarFile = (JarFile) jarFiles.get(file); } JarEntry entry = jarFile.getJarEntry(resourceName); if (entry == null) return null; return converter.convert(jarFile, entry); }
Source:
<code>public void close() { if (loggerThread == null) { return; } try { run = false; synchronized (sync) { sync.notify(); } <START> loggerThread.join(0); <END> } catch (InterruptedException e) { logger.log(Level.WARNING, "logger thread interrupted"); } }</code><technical_language>Is join() more understandable remember 0 means "wait forever"</technical_language>

Target:
public void close() { if (loggerThread == null) { return; } try { run = false; synchronized (sync) { sync.notify(); } loggerThread.join(); } catch (InterruptedException e) { logger.log(Level.WARNING, "logger thread interrupted"); } }
Source:
<code>private boolean updateCategory(PopulatorContext context,CourseCategoryDAO category, String assessmentunitCode) throws IOException { boolean created = false; <START> if (null == category.getCategoryId() && "".equals(category.getCategoryId())) { <END> logMs(context, "Category ["+category.getCategoryType()+":"+category.getCategoryName()+"] ignored - invalid identifier"); return created; } if (null != dao) { CourseCategoryDAO categoryDao = dao.findCourseCategory(category.getCategoryId()); if (categoryDao == null) { categoryDao = category; created = true; } CourseGroupDAO courseDao = dao.findCourseGroupById(assessmentunitCode); categoryDao.getGroups().add(courseDao); dao.save(categoryDao); } return created; }</code><technical_language>Java6, String.isEmpty() introduced (and is more efficient a String.equals(""). category.getCategoryId().isEmpty() more appropriate. category.getCategoryId() null obviously, is fine checked earlier in stament</technical_language>

Target:
private boolean updateCategory(PopulatorContext context,CourseCategoryDAO category, String assessmentunitCode) throws IOException { boolean created = false; if (null == category.getCategoryId() && category.getCategoryId().isEmpty()) { logMs(context, "Category ["+category.getCategoryType()+":"+category.getCategoryName()+"] ignored - invalid identifier"); return created; } if (null != dao) { CourseCategoryDAO categoryDao = dao.findCourseCategory(category.getCategoryId()); if (categoryDao == null) { categoryDao = category; created = true; } CourseGroupDAO courseDao = dao.findCourseGroupById(assessmentunitCode); categoryDao.getGroups().add(courseDao); dao.save(categoryDao); } return created; }
Source:
<code>getResponsesSortedByGiverRecipientQuestion(boolean sortByTeam) { if (sortByTeam) { responses.sort(compareByTeamGiverRecipientQuestion); } else { responses.sort(compareByGiverRecipientQuestion); } Map<String, Map<String, List<FeedbackResponseAttributes>>> sortedMap = new LinkedHashMap<>(); for (FeedbackResponseAttributes response : responses) { String giverEmail = response.giver; <START> Map<String, List<FeedbackResponseAttributes>> responsesFromOneGiver = sortedMap.computeIfAbsent(giverEmail, <END> (String key) -> new LinkedHashMap<>()); String recipientEmail = response.recipient; responsesFromOneGiver.computeIfAbsent(recipientEmail, (String key) -> new ArrayList<>()) .add(response); } return sortedMap; }</code><technical_language>java Map<String, List<FeedbackResponseAttributes>> responsesFromOneGiver = sortedMap.computeIfAbsent(giverEmail, (String key) -> new LinkedHashMap<>()); Prefer high-level breaking :)</technical_language>

Target:
getResponsesSortedByGiverRecipientQuestion(boolean sortByTeam) { if (sortByTeam) { responses.sort(compareByTeamGiverRecipientQuestion); } else { responses.sort(compareByGiverRecipientQuestion); } Map<String, Map<String, List<FeedbackResponseAttributes>>> sortedMap = new LinkedHashMap<>(); for (FeedbackResponseAttributes response : responses) { String giverEmail = response.giver; Map<String, List<FeedbackResponseAttributes>> responsesFromOneGiver = sortedMap.computeIfAbsent(giverEmail, key -> new LinkedHashMap<>()); String recipientEmail = response.recipient; responsesFromOneGiver.computeIfAbsent(recipientEmail, key -> new ArrayList<>()) .add(response); } return sortedMap; }
Source:
<code>protected void onResume() { Intent intent = getIntent(); DBNote note = (DBNote) intent.getSerializableExtra(PARAM_NOTE); if ((note.getId()) != fragment.getNote().getId()) { <START> db.updateNoteAndSync(fragment.getNote(), fragment.getNote().getContent(), null); <END> originalNote = note; createEditFragment(note); } super.onResume(); }</code><technical_language>I need this, NoteEditFragment.getNote() saves note automatically, called (I this, currently works)</technical_language>

Target:
protected void onResume() { super.onResume(); Intent intent = getIntent(); DBNote note = (DBNote) intent.getSerializableExtra(PARAM_NOTE); if ((note.getId()) != fragment.getNote().getId()) { originalNote = note; createEditFragment(note); } }
Source:
<code>public void assertState(ModelClass instance, Class<?> state) { Class<?> currentState = ((SeqDiagModelClassRuntime) ((DefaultSeqDiagRuntime) getModelRuntime()) .getRuntimeOf(instance)).getCurrentState(); if (!currentState.equals(state)) { root.getExecutor().addError( <START> new ModelStateAssertError(state.getCanonicalName(), currentState.getClass().getCanonicalName())); <END> } }</code><technical_language>I parameter currentState.getCanonicalName()</technical_language>

Target:
public void assertState(ModelClass instance, Class<?> state) { Class<?> currentState = getModelRuntime().getRuntimeOf(instance).getCurrentState(); if (!currentState.equals(state)) { root.getExecutor() .addError(new ModelStateAssertError(state.getCanonicalName(), currentState.getCanonicalName())); } }
Source:
<code>public synchronized void init(FilterConfig config) throws ServletException { super.init(config); setDefaultFields(config); for (GitilesView.Type type : GitilesView.Type.values()) { <START> if (!servlets.containsKey(type) && type != GitilesView.Type.SHOW) { <END> servlets.put(type, getDefaultHandler(type)); } } Filter repositoryFilter = new RepositoryFilter(resolver); Filter viewFilter = new ViewFilter(accessFactory, urls, visibilityCache); Filter dispatchFilter = new DispatchFilter(filters, servlets); ServletBinder root = serveRegex(ROOT_REGEX).through(viewFilter); if (gitwebRedirect != null) { root.through(gitwebRedirect); } root.through(dispatchFilter); serveRegex(REPO_REGEX) .through(repositoryFilter) .through(viewFilter) .through(dispatchFilter); serveRegex(REPO_PATH_REGEX) .through(repositoryFilter) .through(viewFilter) .through(dispatchFilter); initialized = true; }</code><technical_language>Instead of special-casing SHOW PathServlet default for SHOW? rename ShowServlet if feel better</technical_language>

Target:
public synchronized void init(FilterConfig config) throws ServletException { super.init(config); setDefaultFields(config); for (GitilesView.Type type : GitilesView.Type.values()) { if (!servlets.containsKey(type)) { servlets.put(type, getDefaultHandler(type)); } } Filter repositoryFilter = new RepositoryFilter(resolver); Filter viewFilter = new ViewFilter(accessFactory, urls, visibilityCache); Filter dispatchFilter = new DispatchFilter(filters, servlets); ServletBinder root = serveRegex(ROOT_REGEX).through(viewFilter); if (gitwebRedirect != null) { root.through(gitwebRedirect); } root.through(dispatchFilter); serveRegex(REPO_REGEX) .through(repositoryFilter) .through(viewFilter) .through(dispatchFilter); serveRegex(REPO_PATH_REGEX) .through(repositoryFilter) .through(viewFilter) .through(dispatchFilter); initialized = true; }