auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>return simpleTokenCache.getToken() .map(accessToken -> { String authorization; StringBuilder authorizationBuilder = new StringBuilder() .append(AAD_AUTH_SCHEMA_TYPE_SEGMENT).append("=").append(AAD_AUTH_SCHEMA_TYPE_VALUE) .append(AAD_AUTH_VERSION_SEGMENT).append("=").append(AAD_AUTH_VERSION_VALUE) <START> .append(AAD_AUTH_SIGNATURE_SEGMENT).append("=").append(accessToken.getToken()); <END> try { authorization = URLEncoder.encode(authorizationBuilder.toString(), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new IllegalStateException("Failed to encode authorization token.", e); } return authorization; }); } }</code><technical_language>this constants token. additional overhead. another constant holds private static final String AUTH_PREFIX = AAD_AUTH_SCHEMA_TYPE_SEGMENT +"=" + AAD_AUTH_SCHEMA_TYPE_VALUE + AAD_AUTH_VERSION_SEGMENT + "=" + AAD_AUTH_VERSION_VALUE + AAD_AUTH_SIGNATURE_SEGMENT+ "=";</technical_language>

Target:
return simpleTokenCache.getToken() .map(accessToken -> { String authorization; String authorizationPayload = AUTH_PREFIX + accessToken.getToken(); try { authorization = URLEncoder.encode(authorizationPayload, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new IllegalStateException("Failed to encode authorization token.", e); } return authorization; }); } }
Source:
<code>public void unblock() { <START> synchronized (lock) { <END> lock.set(true); lock.notifyAll(); } }</code><technical_language>for a test, I care but... I prefer higher-level synchronization utils java.util.concurrent possible, synchronize. object.wait() wake prematurely, is wrap in a while block if block</technical_language>

Target:
public void unblock() { lock.countDown(); }
Source:
<code>public TupleWriter(ConfFactory confFactory) throws NumberFormatException, HyracksDataException { this.cf = confFactory; <START> Kmer.setGlobalKmerLength(Integer.parseInt(cf.getConf().get(GenomixJobConf.KMER_LENGTH))); <END> }</code><technical_language>update setGlobalKmerLength references more general GenomixJobConf.setGlobalStaticConstants(cf.getConf());? function sets kmer length other "global constants"-- others right now, I practice</technical_language>

Target:
public TupleWriter(ConfFactory confFactory) throws NumberFormatException, HyracksDataException { this.cf = confFactory; GenomixJobConf.setGlobalStaticConstants(cf.getConf()); }
Source:
<code><START> public void removeScreen(SolUiScreen screen, SolApplication solApplication) { <END> screenToRemove.add(screen); List<SolUiControl> controls = screen.getControls(); for (SolUiControl control : controls) { control.blur(); } screen.blurCustom(solApplication); }</code><technical_language>Is this access modification potentially problematic all? other start randomly removing screens, chance purpose, is badly needed for something</technical_language>

Target:
private void removeScreen(SolUiScreen screen, SolApplication solApplication) { screenToRemove.add(screen); List<SolUiControl> controls = screen.getControls(); for (SolUiControl control : controls) { control.blur(); } screen.blurCustom(solApplication); }
Source:
<code>public Header(String name, String value) { <START> this.name = name; <END> this.value = value; }</code><technical_language>header name null</technical_language>

Target:
public Header(String name, String value) { Objects.requireNonNull(name, "'name' cannot be null."); this.name = name; this.value = value; }
Source:
<code>public Response getFactoryJson(@ApiParam(value = "Workspace ID", required = true) @PathParam("ws-id") String workspace, @ApiParam(value = "Project path") @QueryParam("path") String path) throws ApiException { final UsersWorkspaceImpl usersWorkspace = workspaceManager.getWorkspace(workspace); final String userId = EnvironmentContext.getCurrent().getUser().getId(); if (!usersWorkspace.getOwner().equals(userId)) { throw new ForbiddenException("User '" + userId + "' doesn't have access to '" + usersWorkspace.getId() + "' workspace"); } <START> Factory factory = DtoFactory.newDto(Factory.class) <END> .withWorkspace(asDto(usersWorkspace, path)) .withV("4.0"); return Response.ok(factory, MediaType.APPLICATION_JSON) .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=factory.json") .build(); }</code><technical_language>static import for newDto method</technical_language>

Target:
public Response getFactoryJson(@ApiParam(value = "Workspace ID", required = true) @PathParam("ws-id") String workspace, @ApiParam(value = "Project path") @QueryParam("path") String path) throws ApiException { final UsersWorkspaceImpl usersWorkspace = workspaceManager.getWorkspace(workspace); final String userId = EnvironmentContext.getCurrent().getUser().getId(); if (!usersWorkspace.getOwner().equals(userId)) { throw new ForbiddenException("User '" + userId + "' doesn't have access to '" + usersWorkspace.getId() + "' workspace"); } Factory factory = newDto(Factory.class) .withWorkspace(asDto(usersWorkspace, path)) .withV("4.0"); return Response.ok(factory, MediaType.APPLICATION_JSON) .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=factory.json") .build(); }
Source:
<code>public String process() throws Exception { String ddl = null; if(this.table.getType().equals(PTableType.TABLE)) { ddl = extractCreateTableDDL(this.table); } else if(this.table.getType().equals(PTableType.INDEX)) { ddl = extractCreateIndexDDL(this.table); } else if(this.table.getType().equals(PTableType.VIEW)) { ddl = extractCreateViewDDL(this.table); } <START> return ddl; <END> }</code><technical_language>object's immutable, reason cache generated DDL return cached copy if process() is called more once</technical_language>

Target:
public String process() throws Exception { if (ddl != null) { return ddl; } if(this.table.getColumnFamilies().size() > 1 ) { throw new RuntimeException(FEATURE_NOT_SUPPORTED_ON_EXTRACTION_TOOL); } if(this.table.getType().equals(PTableType.TABLE)) { ddl = extractCreateTableDDL(this.table); } else if(this.table.getType().equals(PTableType.INDEX)) { ddl = extractCreateIndexDDL(this.table); } else if(this.table.getType().equals(PTableType.VIEW)) { ddl = extractCreateViewDDL(this.table); } return ddl; }
Source:
<code>private void completeTask(WrappedTask wt) throws InterruptedException { try { <START> long waitTime = wt.endTime - System.currentTimeMillis(); <END> successCallback.accept(wt.callable, wt.future.get(waitTime, TimeUnit.MILLISECONDS)); } catch (InterruptedException e) { throw e; } catch (TimeoutException e) { wt.future.cancel(true); timeoutCallback.accept(wt.callable); } catch (Exception e) { exceptionCallback.accept(wt.callable, e); } wt.hasCompleted = true; }</code><technical_language>For sanity, I nice a getEndTime() method ensures endTime set. java long getEndTime(){ long = endTime; //only read volatile Preconditions.checkState(et > 0); return et; } System.currentTimeMillis() result in a negative waitTime. I recommend System.nanotime() avoid this. I reading nanoTime good for thread/cpu, I this true older OS. This code call nanotime in diff threads. I nanoTime and/or handling negative waitTime good. If negative assume a waitTime of zero</technical_language>

Target:
private void completeTask(WrappedTask wt) throws InterruptedException { try { handleSuccess(wt); } catch (InterruptedException e) { throw e; } catch (TimeoutException e) { handleTimeout(wt); } catch (Exception e) { handleException(wt, e); } }
Source:
<code>private ConfigurationItem createConfig(MaintenanceRequestItem config) { return new ConfigurationItem.Builder() .setOlderThanPeriod(config.olderThanPeriod) .setBatchSize(config.batchSize) <START> .setWorkflowTypes(ofNullable(config.workflowTypes).orElseGet(Collections::emptySet)) END> .build(); }</code><technical_language>orElse(emptySet()) is faster. need for lambda</technical_language>

Target:
private ConfigurationItem createConfig(MaintenanceRequestItem config) { return new ConfigurationItem.Builder() .setOlderThanPeriod(config.olderThanPeriod) .setBatchSize(config.batchSize) .setWorkflowTypes(ofNullable(config.workflowTypes).orElse(emptySet())) .build(); }
Source:
<code>public void setNodesChecked(List<ITreeNode> nodes, boolean checked, boolean enabledNodesOnly) { if (!isCheckable()) { return; } List<ITreeNode> changedNodes = new ArrayList<ITreeNode>(); for (ITreeNode node : nodes) { node = resolveNode(node); if (node != null && node.isChecked() != checked && (!enabledNodesOnly || node.isEnabled())) { if (checked) { m_checkedNodes.add(node); } else { m_checkedNodes.remove(node); } changedNodes.add(node); if (checked && !isMultiCheck()) { List<ITreeNode> uncheckedNodes = new ArrayList<ITreeNode>(); Iterator<ITreeNode> checkedNodesIterator = m_checkedNodes.iterator(); while (checkedNodesIterator.hasNext()) { <START> ITreeNode cn = (ITreeNode) checkedNodesIterator.next(); <END> if (cn != node) { m_checkedNodes.remove(cn); uncheckedNodes.add(cn); } } break; } } } if (changedNodes.size() > 0) { if (isAutoCheckChildNodes() && isMultiCheck()) { try { interceptAutoCheckChildNodes(nodes, checked, enabledNodesOnly); } catch (RuntimeException ex) { BEANS.get(ExceptionHandler.class).handle(ex); } } fireNodesChecked(changedNodes); } }</code><technical_language>Unnecessary cast ITreeNode</technical_language>

Target:
public void setNodesChecked(List<ITreeNode> nodes, boolean checked, boolean enabledNodesOnly) { if (!isCheckable()) { return; } List<ITreeNode> changedNodes = new ArrayList<ITreeNode>(); for (ITreeNode node : nodes) { node = resolveNode(node); if (node != null && node.isChecked() != checked && (!enabledNodesOnly || node.isEnabled())) { if (checked) { m_checkedNodes.add(node); } else { m_checkedNodes.remove(node); } changedNodes.add(node); if (checked && !isMultiCheck()) { List<ITreeNode> uncheckedNodes = new ArrayList<ITreeNode>(); Iterator<ITreeNode> checkedNodesIterator = m_checkedNodes.iterator(); while (checkedNodesIterator.hasNext()) { ITreeNode cn = checkedNodesIterator.next(); if (cn != node) { m_checkedNodes.remove(cn); uncheckedNodes.add(cn); } } break; } } } if (changedNodes.size() > 0) { if (isAutoCheckChildNodes() && isMultiCheck()) { try { interceptAutoCheckChildNodes(nodes, checked, enabledNodesOnly); } catch (RuntimeException ex) { BEANS.get(ExceptionHandler.class).handle(ex); } } fireNodesChecked(changedNodes); } }
Source:
<code>public String toString(final String indent) { final Map<SourceNode<?, ?>, List<String>> sourceToTopics = new HashMap<>(); for (final Map.Entry<String, SourceNode<?, ?>> sourceNodeEntry : sourcesByTopic.entrySet()) { final String topic = sourceNodeEntry.getKey(); final SourceNode<?, ?> source = sourceNodeEntry.getValue(); sourceToTopics.computeIfAbsent(source, s -> new ArrayList<>()); sourceToTopics.get(source).add(topic); } final StringBuilder sb = new StringBuilder(indent + "ProcessorTopology:\n"); for (final Map.Entry<SourceNode<?, ?>, List<String>> sourceNodeEntry : sourceToTopics.entrySet()) { <START> final SourceNode<?, ?> source = sourceNodeEntry.getKey(); <END> final List<String> topics = sourceNodeEntry.getValue(); sb.append(source.toString(indent + "\t", topics)).append(childrenToString(indent + "\t", source.children())); } return sb.toString(); }</code><technical_language>nit: space</technical_language>

Target:
public String toString(final String indent) { final Map<SourceNode<?, ?>, List<String>> sourceToTopics = new HashMap<>(); for (final Map.Entry<String, SourceNode<?, ?>> sourceNodeEntry : sourceNodesByTopic.entrySet()) { final String topic = sourceNodeEntry.getKey(); final SourceNode<?, ?> source = sourceNodeEntry.getValue(); sourceToTopics.computeIfAbsent(source, s -> new ArrayList<>()); sourceToTopics.get(source).add(topic); } final StringBuilder sb = new StringBuilder(indent + "ProcessorTopology:\n"); for (final Map.Entry<SourceNode<?, ?>, List<String>> sourceNodeEntry : sourceToTopics.entrySet()) { final SourceNode<?, ?> source = sourceNodeEntry.getKey(); final List<String> topics = sourceNodeEntry.getValue(); sb.append(source.toString(indent + "\t")) .append(topicsToString(indent + "\t", topics)) .append(childrenToString(indent + "\t", source.children())); } return sb.toString(); }
Source:
<code>public void run(IAction action) { IWorkbenchWindow workbenchWindow = DebugUIPlugin.getActiveWorkbenchWindow(); IWorkbenchPage activePage = workbenchWindow != null ? workbenchWindow.getActivePage() : null; IViewPart fViewpart = activePage != null ? activePage.findView(IDebugUIConstants.ID_BREAKPOINT_VIEW) : null; WizardExportBreakpoints wiz = new WizardExportBreakpoints(); IViewSite viewSite = fViewpart != null ? fViewpart.getViewSite() : null; ISelectionProvider selectionProvider = viewSite != null ? viewSite.getSelectionProvider() : null; ISelection selection = <START> selectionProvider != null ? selectionProvider.getSelection() : null; <END> wiz.init(DebugUIPlugin.getDefault().getWorkbench(), (IStructuredSelection) selection); WizardDialog wizdialog = new WizardDialog(DebugUIPlugin.getShell(), wiz); wizdialog.setBlockOnOpen(true); wizdialog.open(); }</code><technical_language>getSelection() returning current selection</technical_language>

Target:
public void run(IAction action) { WizardExportBreakpoints wiz = new WizardExportBreakpoints(); wiz.init(DebugUIPlugin.getDefault().getWorkbench(), getSelection()); WizardDialog wizdialog = new WizardDialog(DebugUIPlugin.getShell(), wiz); wizdialog.setBlockOnOpen(true); wizdialog.open(); }
Source:
<code>public boolean ok(T record, RequestScope requestScope, Optional<ChangeSpec> changeSpec) { <START> return changeSpec.isPresent() <END> && changeSpec.get().getOriginal() != null && changeSpec.get().getModified() == null; }</code><technical_language>optional, map function. like: return changeSpec .map(c -> c.getOriginal() != null && c.getModified() == null) .orElse(false);</technical_language>

Target:
public boolean ok(T record, RequestScope requestScope, Optional<ChangeSpec> changeSpec) { return changeSpec.map((c) -> { return c.getOriginal() != null && c.getModified() == null; }) .orElse(false); }
Source:
<code>public Module getModule(Configuration configuration) { return new AbstractModule() { @Override protected void configure() { bind(HdfsClient.class).toInstance(createHdfsClient()); bind(RevisionStorage.class).toProvider(RevisionStorageProvider.class).in(Scopes.SINGLETON); bind(HdfsDataSourceWriter.class).to(DefaultHdfsDataSourceWriter.class).in(Scopes.SINGLETON); } private HdfsClient createHdfsClient() { HostAndPort nameNodeHostAndPort = getNameNodeHostAndPort(); String username = configuration.getStringMandatory("hdfs.username"); if (spnegoAuthenticationRequired()) { return createSpnegoHdfsClient(nameNodeHostAndPort, username); } else { return createSimpleHdfsClient(nameNodeHostAndPort, username); } } private HostAndPort getNameNodeHostAndPort() { String nameNodeHost = configuration.getStringMandatory("hdfs.webhdfs.host"); int nameNodePort = configuration.getIntMandatory("hdfs.webhdfs.port"); checkArgument(nameNodePort > 0, "Invalid name node WebHDFS port number: %s", nameNodePort); return HostAndPort.fromParts(nameNodeHost, nameNodePort); } private boolean spnegoAuthenticationRequired() { Optional<String> authentication = configuration.getString("hdfs.webhdfs.authentication"); <START> return authentication.isPresent() && authentication.get().equals(AUTHENTICATION_SPNEGO); <END> } private HdfsClient createSpnegoHdfsClient(HostAndPort nameNodeHostAndPort, String username) { Optional<String> keytab = configuration.getString("hdfs.webhdfs.keytab"); checkState(keytab.isPresent(), "In order to use SPNEGO authenticated HDFS " + "you must specify keytab location with the 'hdfs.webhdfs.keytab' property"); return new SpnegoWebHdfsClient(nameNodeHostAndPort, username, keytab.get()); } private HdfsClient createSimpleHdfsClient(HostAndPort nameNodeHostAndPort, String username) { return new SimpleWebHdfsClient(nameNodeHostAndPort, username); } }; }</code><technical_language>equalsIgnoreCase</technical_language>

Target:
public Module getModule(Configuration configuration) { return new PrivateModule() { @Override protected void configure() { install(httpRequestsExecutorModule()); bind(HdfsClient.class).to(WebHdfsClient.class).in(Scopes.SINGLETON); bind(RevisionStorage.class).toProvider(RevisionStorageProvider.class).in(Scopes.SINGLETON); bind(HdfsDataSourceWriter.class).to(DefaultHdfsDataSourceWriter.class).in(Scopes.SINGLETON); expose(HdfsClient.class); expose(RevisionStorage.class); expose(HdfsDataSourceWriter.class); } private Module httpRequestsExecutorModule() { if (spnegoAuthenticationRequired()) { return new SpnegoHttpRequestsExecutor.Module(); } else { return new SimpleHttpRequestsExecutor.Module(); } } private boolean spnegoAuthenticationRequired() { Optional<String> authentication = configuration.getString("hdfs.webhdfs.authentication"); return authentication.isPresent() && authentication.get().equalsIgnoreCase(AUTHENTICATION_SPNEGO); } @Inject @Provides @Singleton CloseableHttpClient createHttpClient() { HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); httpClientBuilder.setRetryHandler(new DefaultHttpRequestRetryHandler(NUMBER_OF_HTTP_RETRIES, true)); return httpClientBuilder.build(); } }; }
Source:
<code>public void showFirebaseLoginPrompt() { mDialog = new FirebaseLoginDialog(); <START> mDialog <END> .addAuthHelper(mGoogleAuthHelper) .addAuthHelper(mFacebookAuthHelper) .addAuthHelper(mTwitterAuthHelper) .show(getFragmentManager(), ""); }</code><technical_language>allow user derives BaseActivity providers want enabled</technical_language>

Target:
public void showFirebaseLoginPrompt() { mDialog.show(getFragmentManager(), ""); }
Source:
<code>public void fileCopied( @NotNull VirtualFileCopyEvent virtualFileCopyEvent) { assert enabled : "the file copied listener was triggered while it was disabled"; VirtualFile copy = virtualFileCopyEvent.getFile(); <START> if (copy.isDirectory()) { <END> LOG.error("Unexpected copying event for directory. This should have" + "been handled by the creation listener."); return; } if (LOG.isTraceEnabled()) { LOG.trace("Reacting to resource copying - original: " + virtualFileCopyEvent.getOriginalFile() + ", copy: " + copy); } SPath copyPath = VirtualFileConverter.convertToSPath(copy); if (copyPath == null || !session.isShared(copyPath.getResource())) { if (LOG.isTraceEnabled()) { LOG.trace("Ignoring non-shared resource copy:" + copy); } return; } User user = session.getLocalUser(); String charset = copy.getCharset().name(); byte[] content = getContent(copy); IActivity activity = new FileActivity(user, Type.CREATED, FileActivity.Purpose.ACTIVITY, copyPath, null, content, charset); fireActivity(activity); }</code><technical_language>assert</technical_language>

Target:
public void fileCopied( @NotNull VirtualFileCopyEvent virtualFileCopyEvent) { assert enabled : "the file copied listener was triggered while it was disabled"; VirtualFile copy = virtualFileCopyEvent.getFile(); assert !copy .isDirectory() : "Unexpected copying event for directory. This should have been handled by the creation listener."; if (LOG.isTraceEnabled()) { LOG.trace("Reacting to resource copying - original: " + virtualFileCopyEvent.getOriginalFile() + ", copy: " + copy); } SPath copyPath = VirtualFileConverter.convertToSPath(copy); if (copyPath == null || !session.isShared(copyPath.getResource())) { if (LOG.isTraceEnabled()) { LOG.trace("Ignoring non-shared resource copy: " + copy); } return; } User user = session.getLocalUser(); String charset = copy.getCharset().name(); byte[] content = getContent(copy); IActivity activity = new FileActivity(user, Type.CREATED, FileActivity.Purpose.ACTIVITY, copyPath, null, content, charset); fireActivity(activity); }
Source:
<code><START> public void setupPreferencesScreen(PreferenceScreen preferenceScreen) { <END> PreferenceCategory preferenceCategory = (PreferenceCategory) preferenceScreen.findPreference( settingsActivity.getResources().getString(R.string.pref_cat_server)); if (preferenceCategory != null) { preferenceCategory.removePreference(preferenceScreen.findPreference( settingsActivity.getResources().getString(R.string.org_unit))); } }</code><technical_language>@idelcano I OrgUnit Preference remove for myanmar for Lao Cambodia</technical_language>

Target:
public void setupPreferencesScreen(PreferenceScreen preferenceScreen) { }
Source:
<code>public synchronized void clear() throws IOException { writeHeader(INITIAL_LENGTH, 0, 0, 0); <START> raf.getChannel().force(true); <END> if (fileLength > INITIAL_LENGTH) raf.setLength(INITIAL_LENGTH); elementCount = 0; first = last = Element.NULL; fileLength = INITIAL_LENGTH; }</code><technical_language>in QueueFile, fsync calls writeHeader(...). that</technical_language>

Target:
public synchronized void clear() throws IOException { writeHeader(INITIAL_LENGTH, 0, 0, 0); elementCount = 0; first = last = Element.NULL; fileLength = INITIAL_LENGTH; if (fileLength > INITIAL_LENGTH) setLength(INITIAL_LENGTH); }
Source:
<code>public void onEntryEviction(Map<K, InternalCacheEntry<K, V>> evicted) { evictionManager.onEntryEviction(evicted); <START> List<CommandInterceptor> interceptors = interceptorChain.getInterceptorsWhichExtend(CacheMgmtInterceptor.class); <END> if (!interceptors.isEmpty()) { CacheMgmtInterceptor mgmtInterceptor = (CacheMgmtInterceptor) interceptors.get(0); mgmtInterceptor.addEvictions(evicted.size()); } }</code><technical_language>This logic a fit in EvictionManager instead of in data container</technical_language>

Target:
public void onEntryEviction(Map<K, InternalCacheEntry<K, V>> evicted) { evictionManager.onEntryEviction(evicted); }
Source:
<code>public Authorization execute(CommandContext commandContext) { final AuthorizationManager authorizationManager = commandContext.getAuthorizationManager(); authorizationManager.validateResourceCompatibility(authorization); if (isHistoricTaskInstanceResource()) { <START> provideRemovalTime(() -> getHistoricTaskInstance(commandContext)); <END> } String operationType = null; AuthorizationEntity previousValues = null; if(authorization.getId() == null) { authorizationManager.insert(authorization); operationType = UserOperationLogEntry.OPERATION_TYPE_CREATE; } else { previousValues = commandContext.getDbEntityManager().selectById(AuthorizationEntity.class, authorization.getId()); authorizationManager.update(authorization); operationType = UserOperationLogEntry.OPERATION_TYPE_UPDATE; } commandContext.getOperationLogManager().logAuthorizationOperation(operationType, authorization, previousValues); return authorization; }</code><technical_language>this a supplier method parameter? method is call #get</technical_language>

Target:
public Authorization execute(CommandContext commandContext) { final AuthorizationManager authorizationManager = commandContext.getAuthorizationManager(); authorizationManager.validateResourceCompatibility(authorization); if (isHistoricTaskInstanceResource()) { HistoryEvent historicTaskInstance = getHistoricTaskInstance(commandContext); provideRemovalTime(historicTaskInstance); } String operationType = null; AuthorizationEntity previousValues = null; if(authorization.getId() == null) { authorizationManager.insert(authorization); operationType = UserOperationLogEntry.OPERATION_TYPE_CREATE; } else { previousValues = commandContext.getDbEntityManager().selectById(AuthorizationEntity.class, authorization.getId()); authorizationManager.update(authorization); operationType = UserOperationLogEntry.OPERATION_TYPE_UPDATE; } commandContext.getOperationLogManager().logAuthorizationOperation(operationType, authorization, previousValues); return authorization; }
Source:
<code>public void setNodeDao(NodeDao nodeDao) { <START> this.m_nodeDao = nodeDao; <END> }</code><technical_language>this.m_</technical_language>

Target:
public void setNodeDao(NodeDao nodeDao) { m_nodeDao = nodeDao; }
Source:
<code>public void announce(final ZToolAddress16 senderAddress, final ZToolAddress64 ieeeAddress, final ZToolAddress16 destinationAddress, final int capabilitiesBitmask) { logger.info("Device announcement received - Network Address: #{}, IEEE Address: {}", senderAddress.get16BitValue(), IEEEAddress.toColonNotation(ieeeAddress.getLong())); queue.push(senderAddress, ieeeAddress); final Thread notifyThread = new Thread(new Runnable() { @Override public void run() { ApplicationFrameworkLayer.getAFLayer(zigbeeNetworkManager).getZigBeeNetwork().notifyDiscoveryAnnounced( new ZigBeeNodeImpl(senderAddress.get16BitValue(), ieeeAddress, (short) zigbeeNetworkManager.getCurrentPanId())); } }); <START> notifyThread.start(); <END> }</code><technical_language>notifyThread is used, suggest removing local variable, simply adding .start() directly</technical_language>

Target:
public void announce(final ZToolAddress16 senderAddress, final ZToolAddress64 ieeeAddress, final ZToolAddress16 destinationAddress, final int capabilitiesBitmask) { logger.info("Device announcement received - Network Address: #{}, IEEE Address: {}", senderAddress.get16BitValue(), IEEEAddress.toColonNotation(ieeeAddress.getLong())); queue.push(senderAddress, ieeeAddress); new Thread(new Runnable() { @Override public void run() { ApplicationFrameworkLayer.getAFLayer(zigbeeNetworkManager).getZigBeeNetwork().notifyDiscoveryAnnounced( new ZigBeeNodeImpl(senderAddress.get16BitValue(), ieeeAddress, (short) zigbeeNetworkManager.getCurrentPanId())); } }).start(); }
Source:
<code><START> public void addRule(RedisFirewallRuleImpl rule) { <END> if (!load) { load = true; cacheCollection(); } this.addChildResource(rule); }</code><technical_language>Is method guaranteed called sync method (at us)</technical_language>

Target:
public void addRule(RedisFirewallRuleImpl rule) { ensureCollectionLoaded(); this.addChildResource(rule); }
Source:
<code>public static JobStatus fromString(String symbol) { <START> return stringToEnum.get(symbol); <END> }</code><technical_language>call CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, symbol) instead</technical_language>

Target:
public static JobStatus fromString(String symbol) { return JobStatus.valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, symbol)); }
Source:
<code>public RecoveryManager(Master master) { this.master = master; executor = Executors.newScheduledThreadPool(4, new NamingThreadFactory("Walog sort starter ")); zooCache = new ZooCache(); try { AccumuloConfiguration aconf = master.getConfiguration(); List<String> workIDs = new DistributedWorkQueue(ZooUtil.getRoot(master.getInstance()) + Constants.ZRECOVERY, aconf).getWorkQueued(); sortsQueued.addAll(workIDs); } catch (Exception e) { <START> log.warn(e.getMessage(), e); <END> } }</code><technical_language>version is a bit better, I think, prevents exception's message interpreted a format string. In other words, if message contains braces, this behave expected. This is (because braces in exception message rare), possible. This change occurs in a other places, well</technical_language>

Target:
public RecoveryManager(Master master) { this.master = master; executor = Executors.newScheduledThreadPool(4, new NamingThreadFactory("Walog sort starter ")); zooCache = new ZooCache(); try { AccumuloConfiguration aconf = master.getConfiguration(); List<String> workIDs = new DistributedWorkQueue(ZooUtil.getRoot(master.getInstance()) + Constants.ZRECOVERY, aconf).getWorkQueued(); sortsQueued.addAll(workIDs); } catch (Exception e) { log.warn("{}", e.getMessage(), e); } }
Source:
<code><START> default Map<String, Object> getAttributes() { <END> return Collections.emptyMap(); }</code><technical_language>a SAML Attribute map multiple values, type Map<String, List<Object>></technical_language>

Target:
default Map<String, List<Object>> getAttributes() { return Collections.emptyMap(); }
Source:
<code>private static boolean areSelfJoinKeysUnique(RelMetadataQuery mq, RelNode leftRel, RelNode rightRel, RexNode joinFilters) { final JoinInfo joinInfo = JoinInfo.of(leftRel, rightRel, joinFilters); for (IntPair pair : joinInfo.pairs()) { final RelColumnOrigin leftOrigin = mq.getColumnOrigin(leftRel, pair.source); if (leftOrigin == null) { return false; } final RelColumnOrigin rightOrigin = mq.getColumnOrigin(rightRel, pair.target); if (rightOrigin == null) { return false; } if (leftOrigin.getOriginColumnOrdinal() != rightOrigin.getOriginColumnOrdinal()) { return false; } } return RelMdUtil.areColumnsDefinitelyUnique(mq, leftRel, joinInfo.leftSet()); <START> } <END></code><technical_language>RelMdUtil#areColumnsDefinitelyUniqueWhenNullsFiltered implementation RelMdUtil#areColumnsDefinitelyUnique. ignore null while other not. do behavoirs</technical_language>

Target:
private static boolean areSelfJoinKeysUnique(RelMetadataQuery mq, RelNode leftRel, RelNode rightRel, RexNode joinFilters) { final JoinInfo joinInfo = JoinInfo.of(leftRel, rightRel, joinFilters); for (IntPair pair : joinInfo.pairs()) { final RelColumnOrigin leftOrigin = mq.getColumnOrigin(leftRel, pair.source); if (leftOrigin == null) { return false; } final RelColumnOrigin rightOrigin = mq.getColumnOrigin(rightRel, pair.target); if (rightOrigin == null) { return false; } if (leftOrigin.getOriginColumnOrdinal() != rightOrigin.getOriginColumnOrdinal()) { return false; } } return RelMdUtil.areColumnsDefinitelyUniqueWhenNullsFiltered(mq, leftRel, joinInfo.leftSet()); }
Source:
<code>public static void addShutdownHookWithDelayedForceKill (Runnable func, int numSecs) { Runnable sleepKill = new Runnable() { @Override public void run() { try { <START> LOG.info("Halting after " + numSecs + " seconds"); <END> Time.sleepSecs(numSecs); LOG.warn("Forcing Halt..."); Runtime.getRuntime().halt(20); } catch (Exception e) { LOG.warn("Exception in the ShutDownHook", e); } } }; Runtime.getRuntime().addShutdownHook(new Thread(func)); Runtime.getRuntime().addShutdownHook(new Thread(sleepKill)); }</code><technical_language>slf4j logging format LOG.info("Halting second", numSeconds);</technical_language>

Target:
public static void addShutdownHookWithDelayedForceKill (Runnable func, int numSecs) { Runnable sleepKill = new Runnable() { @Override public void run() { try { LOG.info("Halting after seconds", numSecs); Time.sleepSecs(numSecs); LOG.warn("Forcing Halt..."); Runtime.getRuntime().halt(20); } catch (Exception e) { LOG.warn("Exception in the ShutDownHook", e); } } }; Runtime.getRuntime().addShutdownHook(new Thread(func)); Runtime.getRuntime().addShutdownHook(new Thread(sleepKill)); }
Source:
<code>private Session getSessionFromSrmResource(Resource srmResource) { Resource airdResource = new <START> EObjectQuery(srmResource.getContents().get(0)).getDAnalysis().eResource(); <END> return getSessionFromAirdResource(airdResource); }</code><technical_language>handle case getDAnalysis() returns null</technical_language>

Target:
private Session getSessionFromSrmResource(Resource srmResource) { return Optional.ofNullable(new EObjectQuery(srmResource.getContents().get(0)).getDAnalysis()).map(EObject::eResource).map(res -> getSessionFromAirdResource(res)).orElse(null); }
Source:
<code>public PredefinedScopeHibernateValidatorConfiguration initializeLocales(Set<Locale> localesToInitialize) { Contracts.assertNotNull( localesToInitialize, MESSAGES.parameterMustNotBeNull( "localesToInitialize" ) ); <START> this.localesToInitialize = localesToInitialize; <END> return thisAsT(); }</code><technical_language>CollectionHelper.toImmutableSet anymore</technical_language>

Target:
public PredefinedScopeHibernateValidatorConfiguration initializeLocales(Set<Locale> localesToInitialize) { Contracts.assertNotNull( localesToInitialize, MESSAGES.parameterMustNotBeNull( "localesToInitialize" ) ); locales( localesToInitialize ); return thisAsT(); }
Source:
<code>public int compare(Viewer compareViewer, Object o1, Object o2) { long date1 = getModificationDate(o1); long date2 = getModificationDate(o2); int result = 0; if (date1 == -1 || date2 == -1) { result = super.compare(compareViewer, o1, o2); } else { for (int <START> element : <END> SORT_ORDERS_BY_COLUMN[columnNumber]) { result = compareColumnValue(element, date1, date2); if (result != 0) break; } } if (reversed) result = -result; return result; }</code><technical_language>rename columnSortOrder</technical_language>

Target:
public int compare(Viewer compareViewer, Object o1, Object o2) { long date1 = getModificationDate(o1); long date2 = getModificationDate(o2); int result = 0; if (date1 == -1 || date2 == -1) { result = super.compare(compareViewer, o1, o2); } else { for (int columnSortOrder : SORT_ORDERS_BY_COLUMN[columnNumber]) { result = compareColumnValue(columnSortOrder, date1, date2); if (result != 0) break; } } if (reversed) result = -result; return result; }
Source:
<code>private void performSimilarSegmentMergingStep(final ACNVModeller modeller) { logger.info("Initial number of segments before similar-segment merging: " + modeller.getACNVModeledSegments().size()); <START> int prevNumSegments; <END> for (int numIterations = 1; numIterations <= maxNumSimilarSegmentMergingIterations; numIterations++) { logger.info("Similar-segment merging iteration: " + numIterations); prevNumSegments = modeller.getACNVModeledSegments().size(); modeller.performSimilarSegmentMergingIteration(intervalThresholdCopyRatio, intervalThresholdAlleleFraction); if (modeller.getACNVModeledSegments().size() == prevNumSegments) { break; } final File modeledSegmentsFile = new File(outputPrefix + "-" + INTERMEDIATE_SEG_FILE_TAG + "-" + numIterations + ".seg"); modeller.writeACNVModeledSegmentFile(modeledSegmentsFile); } logger.info("Final number of segments after similar-segment merging: " + modeller.getACNVModeledSegments().size()); }</code><technical_language>this variable local for loop</technical_language>

Target:
private void performSimilarSegmentMergingStep(final ACNVModeller modeller) { logger.info("Initial number of segments before similar-segment merging: " + modeller.getACNVModeledSegments().size()); for (int numIterations = 1; numIterations <= maxNumSimilarSegmentMergingIterations; numIterations++) { logger.info("Similar-segment merging iteration: " + numIterations); final int prevNumSegments = modeller.getACNVModeledSegments().size(); modeller.performSimilarSegmentMergingIteration(intervalThresholdCopyRatio, intervalThresholdAlleleFraction); if (modeller.getACNVModeledSegments().size() == prevNumSegments) { break; } final File modeledSegmentsFile = new File(outputPrefix + "-" + INTERMEDIATE_SEG_FILE_TAG + "-" + numIterations + ".seg"); modeller.writeACNVModeledSegmentFile(modeledSegmentsFile); } logger.info("Final number of segments after similar-segment merging: " + modeller.getACNVModeledSegments().size()); }
Source:
<code>public int loadTable(String namespace, String tablename, int numItems, int batchSize) { verifyNamespaceAndTablename(namespace, tablename); CorfuStore store = new CorfuStore(runtime); try { TableOptions.TableOptionsBuilder<Object, Object> optionsBuilder = TableOptions.builder(); if (diskPath != null) { optionsBuilder.persistentDataPath(Paths.get(diskPath)); } store.openTable(namespace, tablename, TableName.getDefaultInstance().getClass(), TableName.getDefaultInstance().getClass(), TableName.getDefaultInstance().getClass(), optionsBuilder.build()); TableName dummyVal = TableName.newBuilder().setNamespace(namespace).setTableName(tablename).build(); log.info("Loading items in batchSized transactions into {}${}", numItems, batchSize, namespace, tablename); while (numItems > 0) { log.info("loadTable: Items left {}", numItems); TxBuilder tx = store.tx(namespace); for (int j = batchSize; j > 0 && numItems > 0; j--, numItems--) { TableName dummyKey = TableName.newBuilder().setNamespace(Integer.toString(numItems)) .setTableName(Integer.toString(j)).build(); tx.update(tablename, dummyKey, dummyVal, dummyVal); } tx.commit(); } } catch (Exception e) { log.error("loadTable: failed.", namespace, tablename, numItems, batchSize, e); } <START> return numItems/batchSize; <END> }</code><technical_language>(int)Math.ceil((double)numItems/batchSize); Imagine 10 entries, in batches of 8, return 1, instead of 2</technical_language>

Target:
public int loadTable(String namespace, String tablename, int numItems, int batchSize) { verifyNamespaceAndTablename(namespace, tablename); CorfuStore store = new CorfuStore(runtime); try { TableOptions.TableOptionsBuilder<Object, Object> optionsBuilder = TableOptions.builder(); if (diskPath != null) { optionsBuilder.persistentDataPath(Paths.get(diskPath)); } store.openTable(namespace, tablename, TableName.getDefaultInstance().getClass(), TableName.getDefaultInstance().getClass(), TableName.getDefaultInstance().getClass(), optionsBuilder.build()); TableName dummyVal = TableName.newBuilder().setNamespace(namespace).setTableName(tablename).build(); log.info("Loading items in batchSized transactions into {}${}", numItems, batchSize, namespace, tablename); int itemsRemaining = numItems; while (itemsRemaining > 0) { log.info("loadTable: Items left {}", itemsRemaining); TxBuilder tx = store.tx(namespace); for (int j = batchSize; j > 0 && itemsRemaining > 0; j--, itemsRemaining--) { TableName dummyKey = TableName.newBuilder() .setNamespace(Integer.toString(itemsRemaining)) .setTableName(Integer.toString(j)).build(); tx.update(tablename, dummyKey, dummyVal, dummyVal); } tx.commit(); } } catch (Exception e) { log.error("loadTable: failed.", namespace, tablename, numItems, batchSize, e); } return (int)(Math.ceil((double)numItems/batchSize)); }
Source:
<code>public Resolver getResolver(String input) { if (input == null) { return null; } if (input.startsWith(SYSTEM_VARIABLE_PREFIX)) { Matcher matcher = rePattern.matcher(input); Resolver resolverObject = null; if (matcher.find()) { Class<? extends Resolver> resolverClass = resolverMap.get(matcher.group(RESOLVER_INDEX).toLowerCase()); if (resolverClass != null) { try { resolverObject = resolverClass.newInstance(); resolverObject.setVariable(matcher.group(3)); return resolverObject; } catch (IllegalAccessException | InstantiationException e) { throw new ResolverException("Resolver could not be found"); } } else { throw new ResolverException("Resolver could not be found"); } } } else if(input.startsWith(FILE_PROPERTY_VARIABLE_PREFIX)){ Matcher matcher = rePattern.matcher(input); Resolver resolverObject = null; if (matcher.find()){ Class<? extends Resolver> resolverClass = resolverMap.get(matcher.group(RESOLVER_INDEX).toLowerCase()); if (resolverClass != null) { try { resolverObject = resolverClass.newInstance(); resolverObject.setVariable(matcher.group(3)); return resolverObject; } catch (IllegalAccessException | InstantiationException e) { <START> throw new ResolverException("Resolver could not be found"); <END> } } else { throw new ResolverException("Resolver could not be found"); } } } Resolver resolver = new DefaultResolver(); resolver.setVariable(input); return resolver; }</code><technical_language>append exception message, error message modified "Error instantiating resolver?"</technical_language>

Target:
public Resolver getResolver(String input) { if (input == null) { return null; } if (input.startsWith(SYSTEM_VARIABLE_PREFIX)) { Matcher matcher = rePattern.matcher(input); Resolver resolverObject = null; if (matcher.find()) { Class<? extends Resolver> resolverClass = resolverMap.get(matcher.group(RESOLVER_INDEX).toLowerCase()); if (resolverClass != null) { try { resolverObject = resolverClass.newInstance(); resolverObject.setVariable(matcher.group(3)); return resolverObject; } catch (IllegalAccessException | InstantiationException e) { throw new ResolverException("Resolver could not be found"); } } else { throw new ResolverException("Resolver could not be found"); } } } else if(input.startsWith(FILE_PROPERTY_VARIABLE_PREFIX)){ Matcher matcher = rePattern.matcher(input); Resolver resolverObject = null; if (matcher.find()){ Class<? extends Resolver> resolverClass = resolverMap.get(matcher.group(RESOLVER_INDEX).toLowerCase()); if (resolverClass != null) { try { resolverObject = resolverClass.newInstance(); resolverObject.setVariable(matcher.group(3)); return resolverObject; } catch (IllegalAccessException | InstantiationException e) { throw new ResolverException("Resolver could not be initialized", e); } } else { throw new ResolverException("Resolver could not be found"); } } } Resolver resolver = new DefaultResolver(); resolver.setVariable(input); return resolver; }
Source:
<code>public void generateOutputSchema(Database db) { if (m_outputSchema == null) { m_outputSchema = new NodeSchema(); } else { assert(getOutputSchema().size() == 0); } assert(m_children.size() == 1); m_children.get(0).generateOutputSchema(db); NodeSchema inputSchema = m_children.get(0).getOutputSchema(); TupleValueExpression tve = new TupleValueExpression(AbstractParsedStmt.TEMP_TABLE_NAME, AbstractParsedStmt.TEMP_TABLE_NAME, AbstractParsedStmt.WINDOWED_AGGREGATE_COLUMN_NAME, AbstractParsedStmt.WINDOWED_AGGREGATE_COLUMN_NAME, 0); tve.setExpressionType(ExpressionType.VALUE_TUPLE); tve.setValueType(m_windowedExpression.getValueType()); tve.setValueSize(m_windowedExpression.getValueSize()); <START> tve.setColumnIndex(0); <END> SchemaColumn aggCol = new SchemaColumn(tve.getTableName(), tve.getTableAlias(), tve.getColumnName(), tve.getColumnAlias(), tve); getOutputSchema().addColumn(aggCol); for (SchemaColumn col : inputSchema.getColumns()) { getOutputSchema().addColumn(col.clone()); } m_hasSignificantOutputSchema = true; }</code><technical_language>I thought this windowed expression, instead of a TVE? I missing</technical_language>

Target:
public void generateOutputSchema(Database db) { if (m_outputSchema == null) { m_outputSchema = new NodeSchema(); } else { assert(getOutputSchema().size() == 0); } assert(m_children.size() == 1); m_children.get(0).generateOutputSchema(db); NodeSchema inputSchema = m_children.get(0).getOutputSchema(); TupleValueExpression tve = m_windowedExpression.getDisplayListExpression(); SchemaColumn aggCol = new SchemaColumn(tve.getTableName(), tve.getTableAlias(), tve.getColumnName(), tve.getColumnAlias(), tve); getOutputSchema().addColumn(aggCol); for (SchemaColumn col : inputSchema.getColumns()) { getOutputSchema().addColumn(col.clone()); } m_hasSignificantOutputSchema = true; }
Source:
<code>private InputStream doLoadMetadataStreamByDiagramPath( final Path dPath ) { org.uberfire.java.nio.file.Path path = null; try { path = getDiagramsPath().resolve( getMetadataFileName( dPath.getFileName() ) ); } catch ( org.uberfire.java.nio.file.NoSuchFileException e ) { <START> return null; <END> } if ( null != path ) { try { return loadPath( path ); } catch ( Exception e ) { LOG.warn( "Cannot load metadata for [" + dPath.toString() + "].", e ); } } return null; }</code><technical_language>worth throwing exception if file found, no</technical_language>

Target:
private InputStream doLoadMetadataStreamByDiagramPath( final Path dPath ) { org.uberfire.java.nio.file.Path path = getDiagramsPath().resolve( getMetadataFileName( dPath.getFileName() ) ); if ( null != path ) { try { return loadPath( path ); } catch ( Exception e ) { LOG.warn( "Cannot load metadata for [" + dPath.toString() + "].", e ); } } return null; }
Source:
<code>public ObservableList<Theme> getThemes() { <START> return themes; <END> }</code><technical_language>this for member variables</technical_language>

Target:
public ObservableList<Theme> getThemes() { return this.themes; }
Source:
<code>public void testFtpService() throws IOException { PreferenceManager.getDefaultSharedPreferences(service).edit() .putBoolean(FtpService.KEY_PREFERENCE_SECURE, false).commit(); service.onStartCommand(new Intent(FtpService.ACTION_START_FTPSERVER) <START> .setPackage("com.amaze.filemanager") <END> .putExtra(FtpService.TAG_STARTED_BY_TILE, false), 0, 0); assertTrue(FtpService.isRunning()); waitForServer(); FTPClient ftpClient = new FTPClient(); loginAndVerifyWith(ftpClient); testUploadWith(ftpClient); testDownloadWith(ftpClient); }</code><technical_language>malicious app set package set here</technical_language>

Target:
public void testFtpService() throws IOException { PreferenceManager.getDefaultSharedPreferences(service).edit() .putBoolean(FtpService.KEY_PREFERENCE_SECURE, false).commit(); service.onStartCommand(new Intent(FtpService.ACTION_START_FTPSERVER) .putExtra(FtpService.TAG_STARTED_BY_TILE, false), 0, 0); assertTrue(FtpService.isRunning()); waitForServer(); FTPClient ftpClient = new FTPClient(); loginAndVerifyWith(ftpClient); testUploadWith(ftpClient); testDownloadWith(ftpClient); }
Source:
<code>public void initialize(Server server, Injector injector) { final ServletContextHandler root = new ServletContextHandler(ServletContextHandler.SESSIONS); root.addServlet(new ServletHolder(new DefaultServlet()), "/*"); final AuthConfig authConfig = injector.getInstance(AuthConfig.class); final ObjectMapper jsonMapper = injector.getInstance(Key.get(ObjectMapper.class, Json.class)); final AuthenticatorMapper authenticatorMapper = injector.getInstance(AuthenticatorMapper.class); AuthenticationUtils.addSecuritySanityCheckFilter(root, jsonMapper); AuthenticationUtils.addNoopAuthorizationFilters(root, UNSECURED_PATHS); AuthenticationUtils.addNoopAuthorizationFilters(root, authConfig.getUnsecuredPaths()); <START> List<Authenticator> authenticators = authenticatorMapper.getAuthenticatorChain(); <END> AuthenticationUtils.addAuthenticationFilterChain(root, authenticators); AuthenticationUtils.addAllowOptionsFilter(root, authConfig.isAllowUnauthenticatedHttpOptions()); JettyServerInitUtils.addExtensionFilters(root, injector); AuthenticationUtils.addPreResponseAuthorizationCheckFilter( root, authenticators, jsonMapper ); root.addFilter(GuiceFilter.class, "/*", null); final HandlerList handlerList = new HandlerList(); handlerList.setHandlers( new Handler[]{ JettyServerInitUtils.getJettyRequestLogHandler(), JettyServerInitUtils.wrapWithDefaultGzipHandler( root, serverConfig.getInflateBufferSize(), serverConfig.getCompressionLevel() ), new DefaultHandler() } ); server.setHandler(handlerList); }</code><technical_language>final</technical_language>

Target:
public void initialize(Server server, Injector injector) { final ServletContextHandler root = new ServletContextHandler(ServletContextHandler.SESSIONS); root.addServlet(new ServletHolder(new DefaultServlet()), "/*"); final AuthConfig authConfig = injector.getInstance(AuthConfig.class); final ObjectMapper jsonMapper = injector.getInstance(Key.get(ObjectMapper.class, Json.class)); final AuthenticatorMapper authenticatorMapper = injector.getInstance(AuthenticatorMapper.class); AuthenticationUtils.addSecuritySanityCheckFilter(root, jsonMapper); AuthenticationUtils.addNoopAuthorizationFilters(root, UNSECURED_PATHS); AuthenticationUtils.addNoopAuthorizationFilters(root, authConfig.getUnsecuredPaths()); final List<Authenticator> authenticators = authenticatorMapper.getAuthenticatorChain(); AuthenticationUtils.addAuthenticationFilterChain(root, authenticators); AuthenticationUtils.addAllowOptionsFilter(root, authConfig.isAllowUnauthenticatedHttpOptions()); JettyServerInitUtils.addExtensionFilters(root, injector); AuthenticationUtils.addPreResponseAuthorizationCheckFilter( root, authenticators, jsonMapper ); root.addFilter(GuiceFilter.class, "/*", null); final HandlerList handlerList = new HandlerList(); handlerList.setHandlers( new Handler[]{ JettyServerInitUtils.getJettyRequestLogHandler(), JettyServerInitUtils.wrapWithDefaultGzipHandler( root, serverConfig.getInflateBufferSize(), serverConfig.getCompressionLevel() ), new DefaultHandler() } ); server.setHandler(handlerList); }