auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public LoginResponse login(@Valid @RequestBody LoginRequest login, HttpServletRequest request) { if (login == null) { throw new HttpMessageNotReadableException("Missing login"); } if (userIs2fa()) { throw new BadCredentialsException( <START> format("2 factor authentication is [ {0} ], you cannot login via the RESTAPI anymore", <END> appSettings.getTwoFactorAuthentication())); } return runAsSystem(() -> { UsernamePasswordAuthenticationToken authToken = new UsernamePasswordAuthenticationToken(login.getUsername(), login.getPassword()); authToken.setDetails(new WebAuthenticationDetails(request)); Authentication authentication = authenticationManager.authenticate(authToken); if (!authentication.isAuthenticated()) { throw new BadCredentialsException("Unknown username or password"); } User user = dataService.findOne(USER, new QueryImpl<User>().eq(UserMetaData.USERNAME, authentication.getName()), User.class); SecurityContextHolder.getContext().setAuthentication(authentication); String token = tokenService.generateAndStoreToken(authentication.getName(), "Rest api login"); return new LoginResponse(token, user.getUsername(), user.getFirstName(), user.getLastName()); }); }</code><technical_language>I "Two facto authentication is enabled" here, difference enabled enforced of importance user</technical_language>

Target:
public LoginResponse login(@Valid @RequestBody LoginRequest login, HttpServletRequest request) { if (login == null) { throw new HttpMessageNotReadableException("Missing login"); } if (userIs2fa()) { throw new BadCredentialsException( "2 factor authentication is enabled, you cannot use /login via the RESTAPI anymore"); } return runAsSystem(() -> { UsernamePasswordAuthenticationToken authToken = new UsernamePasswordAuthenticationToken(login.getUsername(), login.getPassword()); authToken.setDetails(new WebAuthenticationDetails(request)); Authentication authentication = authenticationManager.authenticate(authToken); if (!authentication.isAuthenticated()) { throw new BadCredentialsException("Unknown username or password"); } User user = dataService.findOne(USER, new QueryImpl<User>().eq(UserMetaData.USERNAME, authentication.getName()), User.class); SecurityContextHolder.getContext().setAuthentication(authentication); String token = tokenService.generateAndStoreToken(authentication.getName(), "Rest api login"); return new LoginResponse(token, user.getUsername(), user.getFirstName(), user.getLastName()); }); }
Source:
<code>public GraphiteEvent druidEventToGraphite(ServiceMetricEvent serviceMetricEvent) { ImmutableList.Builder metricPathBuilder = new ImmutableList.Builder<String>(); <START> metricPathBuilder.add(GraphiteEmitter.sanitize(this.getNamespacePrefix())); <END> if (this.isIgnoreServiceName() == false) { metricPathBuilder.add(GraphiteEmitter.sanitize(serviceMetricEvent.getService())); } if (this.isIgnoreHostname() == false) { metricPathBuilder.add(GraphiteEmitter.sanitize(serviceMetricEvent.getHost())); } ImmutableSortedSet<String> dimNames = ImmutableSortedSet.copyOf(serviceMetricEvent.getUserDims().keySet()); for (String dimName : dimNames) { metricPathBuilder.add(GraphiteEmitter.sanitize(String.valueOf(serviceMetricEvent.getUserDims() .get(dimName)))); } metricPathBuilder.add(GraphiteEmitter.sanitize(serviceMetricEvent.getMetric())); return new GraphiteEvent( Joiner.on(".").join(metricPathBuilder.build()), serviceMetricEvent.getValue().toString(), TimeUnit.MILLISECONDS.toSeconds(serviceMetricEvent.getCreatedTime().getMillis()) ); }</code><technical_language>do sanitization for namespacePrefix in constructor instead of everytime</technical_language>

Target:
public GraphiteEvent druidEventToGraphite(ServiceMetricEvent serviceMetricEvent) { ImmutableList.Builder metricPathBuilder = new ImmutableList.Builder<String>(); metricPathBuilder.add(this.getNamespacePrefix()); if (!this.isIgnoreServiceName()) { metricPathBuilder.add(GraphiteEmitter.sanitize(serviceMetricEvent.getService())); } if (!this.isIgnoreHostname()) { metricPathBuilder.add(GraphiteEmitter.sanitize(serviceMetricEvent.getHost())); } ImmutableSortedSet<String> dimNames = ImmutableSortedSet.copyOf(serviceMetricEvent.getUserDims().keySet()); for (String dimName : dimNames) { metricPathBuilder.add(GraphiteEmitter.sanitize(String.valueOf(serviceMetricEvent.getUserDims() .get(dimName)))); } metricPathBuilder.add(GraphiteEmitter.sanitize(serviceMetricEvent.getMetric())); return new GraphiteEvent( Joiner.on(".").join(metricPathBuilder.build()), serviceMetricEvent.getValue().toString(), TimeUnit.MILLISECONDS.toSeconds(serviceMetricEvent.getCreatedTime().getMillis()) ); }
Source:
<code>public void validate() { validateDictionaries(allWordsDictionaries); validateDictionaries(wordEndDictionaries); <START> validateDictionaries(wordEndDictionaries); <END> validateDictionaries(wordEndDictionaries); }</code><technical_language>a copy paste issue here. 3 times "wordEndDictionaries"</technical_language>

Target:
public void validate() { validateDictionaries(allWordsDictionaries); validateDictionaries(wordDictionaries); validateDictionaries(wordStartDictionaries); validateDictionaries(wordEndDictionaries); }
Source:
<code>public static void connectStepTwo(final long siteId, long keyringConnectionId, final String serviceId, final String externalUserId) { RestRequest.Listener listener = new RestRequest.Listener() { @Override public void onResponse(JSONObject jsonObject) { AppLog.d(AppLog.T.SHARING, "connect succeeded"); PublicizeConnection connection = PublicizeConnection.fromJson(jsonObject); PublicizeTable.addOrUpdateConnection(connection); EventBus.getDefault().post(new ActionCompleted(true, ConnectAction.CONNECT, serviceId)); } }; RestRequest.ErrorListener errorListener = new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError volleyError) { AppLog.e(AppLog.T.SHARING, volleyError); EventBus.getDefault().post(new ActionCompleted(false, ConnectAction.CONNECT, serviceId)); } }; Map<String, String> params = new HashMap<>(); params.put("keyring_connection_ID", Long.toString(keyringConnectionId)); <START> if (!externalUserId.isEmpty() && !serviceId.equals(PublicizeConstants.TWITTER_ID)) { <END> params.put("external_user_ID", externalUserId); } String path = String.format(Locale.ROOT, "/sites/%d/publicize-connections/new", siteId); WordPress.getRestClientUtilsV1_1().post(path, params, null, listener, errorListener); }</code><technical_language>wdyt TextUils.isEmpty(externalUserId) PublicizeConstants.TWITTER_ID.equals(serviceId) avoid potential NPEs</technical_language>

Target:
public static void connectStepTwo(final long siteId, long keyringConnectionId, final String serviceId, final String externalUserId) { RestRequest.Listener listener = new RestRequest.Listener() { @Override public void onResponse(JSONObject jsonObject) { AppLog.d(AppLog.T.SHARING, "connect succeeded"); PublicizeConnection connection = PublicizeConnection.fromJson(jsonObject); PublicizeTable.addOrUpdateConnection(connection); EventBus.getDefault().post(new ActionCompleted(true, ConnectAction.CONNECT, serviceId)); } }; RestRequest.ErrorListener errorListener = new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError volleyError) { AppLog.e(AppLog.T.SHARING, volleyError); EventBus.getDefault().post(new ActionCompleted(false, ConnectAction.CONNECT, serviceId)); } }; Map<String, String> params = new HashMap<>(); params.put("keyring_connection_ID", Long.toString(keyringConnectionId)); if (!TextUtils.isEmpty(externalUserId) && !PublicizeConstants.TWITTER_ID.equals(serviceId)) { params.put("external_user_ID", externalUserId); } String path = String.format(Locale.ROOT, "/sites/%d/publicize-connections/new", siteId); WordPress.getRestClientUtilsV1_1().post(path, params, null, listener, errorListener); }
Source:
<code>public static double topologyWorkerCpu(Map conf, TopologyDetails info) { Map topologyConfig = getFullTopologyConfig(conf, info); Object cpuObject = topologyConfig.get(WORKER_CPU_CONF); double topologyWorkerCpu = DEFAULT_WORKER_CPU; if (cpuObject != null && !(cpuObject instanceof Number)) { LOG.warn("Topology has invalid mesos cpu configuration: has type {}, when it should be a Number", info.getId(), cpuObject, cpuObject.getClass()); } else if (cpuObject != null && (cpuObject instanceof Number)) { topologyWorkerCpu = ((Number) cpuObject).doubleValue(); if (topologyWorkerCpu < MESOS_MIN_CPU) { LOG.warn("Topology has invalid mesos cpu configuration: is below which is the mesos minimum", info.getId(), topologyWorkerCpu, MESOS_MIN_CPU); topologyWorkerCpu = DEFAULT_WORKER_CPU; <START> } <END> } return topologyWorkerCpu; }</code><technical_language>nit: add "setting DEFAULT_WORKER_CPU", user a more information</technical_language>

Target:
public static double topologyWorkerCpu(Map conf, TopologyDetails info) { Map topologyConfig = getFullTopologyConfig(conf, info); double topologyWorkerCpu = getScalarTopologyConf(topologyConfig, WORKER_CPU_CONF, info.getId(), DEFAULT_WORKER_CPU).doubleValue(); if (topologyWorkerCpu < MESOS_MIN_CPU) { LOG.warn("Topology has invalid option \'{}\' -- is below {}, which is the minimum defined by Mesos -- Falling back to default of {}", info.getId(), WORKER_CPU_CONF, topologyWorkerCpu, MESOS_MIN_CPU, DEFAULT_WORKER_CPU); topologyWorkerCpu = DEFAULT_WORKER_CPU; } return topologyWorkerCpu; }
Source:
<code>private void createKioskMenu(Menu menu, MenuInflater menuInflater) throws Exception { StreamingService service = NewPipe.getService(currentServiceId); KioskList kl = service.getKioskList(); int i = 0; <START> for(final String ks : kl.getAvailableKisoks()) { <END> menu.add(0, KIOSK_MENU_OFFSETT + i, Menu.NONE, KioskTranslator.getTranslatedKioskName(ks, getContext())) .setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem menuItem) { try { NavigationHelper.openKioskFragment(getFragmentManager(), currentServiceId, ks); } catch (Exception e) { ErrorActivity.reportError(activity, e, activity.getClass(), null, ErrorActivity.ErrorInfo.make(UserAction.UI_ERROR, "none", "", R.string.app_ui_crash)); } return true; } }); i++; } }</code><technical_language>Typo in extractor</technical_language>

Target:
private void createKioskMenu(Menu menu, MenuInflater menuInflater) throws Exception { StreamingService service = NewPipe.getService(currentServiceId); KioskList kl = service.getKioskList(); int i = 0; for(final String ks : kl.getAvailableKiosks()) { menu.add(0, KIOSK_MENU_OFFSETT + i, Menu.NONE, KioskTranslator.getTranslatedKioskName(ks, getContext())) .setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem menuItem) { try { NavigationHelper.openKioskFragment(getFragmentManager(), currentServiceId, ks); } catch (Exception e) { ErrorActivity.reportError(activity, e, activity.getClass(), null, ErrorActivity.ErrorInfo.make(UserAction.UI_ERROR, "none", "", R.string.app_ui_crash)); } return true; } }); i++; } }
Source:
<code>public AssertChecker(Dim[] dimensions) { <START> fDimensions = new HashSet<Dim>(); <END> fDimensions.addAll(Arrays.asList(dimensions)); }</code><technical_language>This creates a warning</technical_language>

Target:
public AssertChecker(Dim[] dimensions) { fDimensions = new HashSet<>(); fDimensions.addAll(Arrays.asList(dimensions)); }
Source:
<code>public static ErraiService initSingleton(final ErraiServiceConfigurator configurator) { synchronized (monitor) { <START> if (isInitialized()) throw new IllegalStateException("service already set into singleton"); <END> service = ErraiServiceFactory.create(configurator); if(!initProxy.isClosed()) { initProxy.closeProxy(service); } for (ErraiInitCallback erraiInitCallback : callbackList) { erraiInitCallback.onInit(service); } callbackList.clear(); return service; } }</code><technical_language>changed implementation of isInitialized assuming problems this method called multiple times, throwing IAE</technical_language>

Target:
public static ErraiService initSingleton(final ErraiServiceConfigurator configurator) { synchronized (monitor) { if (isActive()) throw new IllegalStateException("service already set into singleton"); service = ErraiServiceFactory.create(configurator); proxy.closeProxy(service); Iterator<InitCallbackBlock> it = callbacks.iterator(); while(it.hasNext()) { InitCallbackBlock block = it.next(); block.callback.onInit(service); if(!block.persistent) { it.remove(); } } return service; } }
Source:
<code>private void verifyLogs() { String[] extension = {"log"}; File dir = logDir.toFile(); if (!dir.exists()) { throw new UnrecoverableCorfuError("Stream log data directory doesn't exists"); } Collection<File> files = FileUtils.listFiles(dir, extension, true); for (File file : files) { LogHeader header; EnumSet<StandardOpenOption> options = EnumSet.of( <START> StandardOpenOption.READ, StandardOpenOption.WRITE, <END> StandardOpenOption.SPARSE ); try (FileChannel fileChannel = FileChannel.open(file.toPath(), options)) { header = parseHeader(fileChannel); } catch (IOException e) { throw new IllegalStateException("Invalid header: " + file.getAbsolutePath(), e); } if (header == null) { log.warn("verifyLogs: Ignoring partially written header in {}", file.getAbsoluteFile()); continue; } if (header.getVersion() != VERSION) { String msg = String.format("Log version %s for %s should match the LogUnit log version %s", header.getVersion(), file.getAbsoluteFile(), VERSION); throw new IllegalStateException(msg); } if (verify && !header.getVerifyChecksum()) { String msg = String.format("Log file %s not generated with check sums, can't verify!", file.getAbsoluteFile()); throw new IllegalStateException(msg); } } }</code><technical_language>This is a read operation, please remove StandardOpenOption.WRITE</technical_language>

Target:
private void verifyLogs() { String[] extension = {"log"}; File dir = logDir.toFile(); if (!dir.exists()) { throw new UnrecoverableCorfuError("Stream log data directory doesn't exists"); } Collection<File> files = FileUtils.listFiles(dir, extension, true); for (File file : files) { LogHeader header; try (FileChannel fileChannel = FileChannel.open(file.toPath())) { header = parseHeader(fileChannel); } catch (IOException e) { throw new IllegalStateException("Invalid header: " + file.getAbsolutePath(), e); } if (header == null) { log.warn("verifyLogs: Ignoring partially written header in {}", file.getAbsoluteFile()); continue; } if (header.getVersion() != VERSION) { String msg = String.format("Log version %s for %s should match the LogUnit log version %s", header.getVersion(), file.getAbsoluteFile(), VERSION); throw new IllegalStateException(msg); } if (verify && !header.getVerifyChecksum()) { String msg = String.format("Log file %s not generated with check sums, can't verify!", file.getAbsoluteFile()); throw new IllegalStateException(msg); } } }
Source:
<code>public InputStream openInputStream() throws IOException { <START> return new CloseShieldInputStream(inputStreamSupplier.get()); <END> }</code><technical_language>catch rethrow IOException catch properly handle other exceptions .handled()</technical_language>

Target:
public InputStream openInputStream() throws IOException { try { return new CloseShieldInputStream(inputStreamSupplier.create()); } catch (IOException ioException) { throw ioException; } catch (Exception e) { throw Exceptions.handle() .error(e) .withSystemErrorMessage("Failed to unzip file from an archive: %s (%s)") .handle(); } }
Source:
<code>protected static Optional<String> getEntityIdAsParameter(final Service service) { try { final URIBuilder builder = new URIBuilder(service.getId()); final Optional<NameValuePair> param = builder.getQueryParams() .stream() .filter(p -> p.getName().equals(PARAMETER_ENTITY_ID)) .findFirst(); if (param.isPresent()) { <START> LOGGER.debug("Found Entity Id in Service id = " + param.get().getValue()); <END> return Optional.of(param.get().getValue()); } final HttpServletRequest request = WebUtils.getHttpServletRequestFromExternalWebflowContext(); if (request != null && StringUtils.isNotBlank(request.getQueryString())) { final String[] query = request.getQueryString().split("&"); final Optional<String> paramRequest = Arrays.stream(query) .map(p -> { final List<String> params = Splitter.on("=").splitToList(p); return Pair.of(params.get(0), params.get(1)); }) .filter(p -> p.getKey().equals(PARAMETER_ENTITY_ID)) .map(Pair::getValue) .map(ShibbolethIdPEntityIdAuthenticationServiceSelectionStrategy::decode) .findFirst(); LOGGER.debug("Found entity id as part of request url = " + paramRequest); return paramRequest; } } catch (final Exception e) { LOGGER.error(e.getMessage(), e); } return Optional.empty(); }</code><technical_language>LOGGER.debug("Found Entity Id in Service id = [{}]", param.get().getValue());</technical_language>

Target:
protected static Optional<String> getEntityIdAsParameter(final Service service) { try { final URIBuilder builder = new URIBuilder(service.getId()); final Optional<NameValuePair> param = builder.getQueryParams() .stream() .filter(p -> p.getName().equals(PARAMETER_ENTITY_ID)) .findFirst(); if (param.isPresent()) { LOGGER.debug("Found Entity Id in Service id [{}]", param.get().getValue()); return Optional.of(param.get().getValue()); } final HttpServletRequest request = WebUtils.getHttpServletRequestFromExternalWebflowContext(); if (request != null && StringUtils.isNotBlank(request.getQueryString())) { final String[] query = request.getQueryString().split("&"); final Optional<String> paramRequest = Arrays.stream(query) .map(p -> { final List<String> params = Splitter.on("=").splitToList(p); return Pair.of(params.get(0), params.get(1)); }) .filter(p -> p.getKey().equals(PARAMETER_ENTITY_ID)) .map(Pair::getValue) .map(EncodingUtils::urlDecode) .findFirst(); LOGGER.debug("Found entity id as part of request url [{}]", paramRequest); return paramRequest; } } catch (final Exception e) { LOGGER.error(e.getMessage(), e); } return Optional.empty(); }
Source:
<code>public void getVirtualAttributesByPrimaryHolder() throws Exception { System.out.println(CLASS_NAME + "getVirtualAttributesByPrimaryHolder"); AttributeDefinition memberVirtAttr = setUpVirtualMemberAttribute(); AttributeDefinition memberResourceVirtAttr = setUpVirtualMemberResourceAttribute(); setUpGroupAttribute(); setUpMemberGroupAttributeDefinition(); List<Attribute> attrs = cacheManager.getVirtualAttributes(Holder.HolderType.MEMBER, null); assertTrue("result should contain virtual member attribute definition", attrs.contains(new Attribute(memberVirtAttr))); <START> assertTrue("result should not contain virtual member-resource attribute definition", !attrs.contains(new Attribute(memberResourceVirtAttr))); <END> assertTrue("it should return only 1 attribute", attrs.size() == 1); }</code><technical_language>above</technical_language>

Target:
public void getVirtualAttributesByPrimaryHolder() throws Exception { System.out.println(CLASS_NAME + "getVirtualAttributesByPrimaryHolder"); AttributeDefinition memberVirtAttr = setUpVirtualMemberAttribute(); AttributeDefinition memberResourceVirtAttr = setUpVirtualMemberResourceAttribute(); setUpGroupAttribute(); setUpMemberGroupAttributeDefinition(); List<Attribute> attrs = cacheManager.getVirtualAttributes(Holder.HolderType.MEMBER, null); assertTrue("result should contain virtual member attribute definition", attrs.contains(memberVirtAttr)); assertTrue("result should not contain virtual member-resource attribute definition", !attrs.contains(memberResourceVirtAttr)); assertTrue("it should return only 1 attribute", attrs.size() == 1); }
Source:
<code>public String replaceSelection(String value, boolean collapseSelection) { Selection selection = getSession().getSelection(); String oldValue = getSession().getTextRange(selection.getRange()); <START> value = StringUtil.normalizeNewLines(value); <END> replaceSelection(value); if (collapseSelection) { collapseSelection(false); } return oldValue; }</code><technical_language>this done in single argument replaceSelection here? (seems open problem if function is called directly)</technical_language>

Target:
public String replaceSelection(String value, boolean collapseSelection) { Selection selection = getSession().getSelection(); String oldValue = getSession().getTextRange(selection.getRange()); replaceSelection(value); if (collapseSelection) { collapseSelection(false); } return oldValue; }
Source:
<code>private void setupMultiExecutorMode() { String filters = azkProps.getString(AZKABAN_EXECUTOR_SELECTOR_FILTERS, ""); if (filters != null) { filterList = Arrays.asList(StringUtils.split(filters, ",")); } Map<String, String> compListStrings = azkProps.getMapByPrefix(AZKABAN_EXECUTOR_SELECTOR_COMPARATOR_PREFIX); if (compListStrings != null) { comparatorWeightsMap = new TreeMap<String, Integer>(); for (Map.Entry<String, String> entry : compListStrings.entrySet()) { comparatorWeightsMap.put(entry.getKey(), Integer.valueOf(entry.getValue())); } } executorInforRefresherService = Executors.newFixedThreadPool(azkProps.getInt( AZKABAN_EXECUTORINFO_REFRESH_MAX_THREADS, 5)); queueProcessor = new QueueProcessorThread(azkProps.getBoolean( AZKABAN_QUEUEPROCESSING_ENABLED, true), azkProps.getLong( AZKABAN_ACTIVE_EXECUTOR_REFRESHINTERVAL_IN_MS, 1000), azkProps.getInt( <START> AZKABAN_ACTIVE_EXECUTOR_REFRESHINTERVAL_IN_NUM_FLOW, 10)); <END> queueProcessor.start(); }</code><technical_language>I INTERVAL part is causing confusion. AZKABAN_ACTIVE_EXECUTOR_REFRESH_BY_NUM_FLOW</technical_language>

Target:
private void setupMultiExecutorMode() { String filters = azkProps.getString(AZKABAN_EXECUTOR_SELECTOR_FILTERS, ""); if (filters != null) { filterList = Arrays.asList(StringUtils.split(filters, ",")); } Map<String, String> compListStrings = azkProps.getMapByPrefix(AZKABAN_EXECUTOR_SELECTOR_COMPARATOR_PREFIX); if (compListStrings != null) { comparatorWeightsMap = new TreeMap<String, Integer>(); for (Map.Entry<String, String> entry : compListStrings.entrySet()) { comparatorWeightsMap.put(entry.getKey(), Integer.valueOf(entry.getValue())); } } executorInforRefresherService = Executors.newFixedThreadPool(azkProps.getInt( AZKABAN_EXECUTORINFO_REFRESH_MAX_THREADS, 5)); queueProcessor = new QueueProcessorThread(azkProps.getBoolean( AZKABAN_QUEUEPROCESSING_ENABLED, true), azkProps.getLong( AZKABAN_ACTIVE_EXECUTOR_REFRESH_IN_MS, 1000), azkProps.getInt( AZKABAN_ACTIVE_EXECUTOR_REFRESH_IN_NUM_FLOW, 10)); queueProcessor.start(); }
Source:
<code>public Optional<Object> nextMarker() { <START> return marker == null ? Optional.absent() : Optional.of((Object) marker); <END> }</code><technical_language>Optional.fromNullable(marker) instead</technical_language>

Target:
public Optional<Object> nextMarker() { return Optional.<Object>fromNullable(marker); }
Source:
<code>private <T extends ObjectId> Iterable<FoundObject<T>> findAll( Iterable<T> objectIds) throws IOException { <START> Collection<T> pending = new LinkedList<>(); <END> for (T id : objectIds) { pending.add(id); } PackList packList = db.getPackList(); List<FoundObject<T>> r = new ArrayList<>(); findAllImpl(packList, pending, r); if (packList.dirty()) { findAllImpl(db.scanPacks(packList), pending, r); } for (T t : pending) { r.add(new FoundObject<T>(t)); } Collections.sort(r, FOUND_OBJECT_SORT); return r; }</code><technical_language>Yea I agree is premature optimization. Lets avoid ugly data shows this is a horrible source of garbage fixed</technical_language>

Target:
private <T extends ObjectId> Iterable<FoundObject<T>> findAll( Iterable<T> objectIds) throws IOException { Collection<T> pending = new LinkedList<>(); for (T id : objectIds) { pending.add(id); } PackList packList = db.getPackList(); List<FoundObject<T>> r = new ArrayList<>(); findAllImpl(packList, pending, r); if (!pending.isEmpty() && packList.dirty()) { findAllImpl(db.scanPacks(packList), pending, r); } for (T t : pending) { r.add(new FoundObject<T>(t)); } Collections.sort(r, FOUND_OBJECT_SORT); return r; }
Source:
<code><START> private OnHeapValueHolder<V> setAccessTimeAndExpiryThenReturnMappingUnderLock(K key, OnHeapValueHolder<V> valueHolder, long now, <END> StoreEventSink<K, V> eventSink) { Duration duration = Duration.ZERO; try { duration = expiry.getExpiryForAccess(key, valueHolder.value()); } catch (RuntimeException re) { LOG.error("Expiry computation caused an exception - Expiry duration will be 0 ", re); } valueHolder.accessed(now, duration); if (Duration.ZERO.equals(duration)) { onExpiration(key, valueHolder, eventSink); return null; } return valueHolder; }</code><technical_language>UnderLock OutsideLock variants of this method identical (practically so). variants then</technical_language>

Target:
private OnHeapValueHolder<V> setAccessTimeAndExpiryThenReturnMappingUnderLock(K key, OnHeapValueHolder<V> valueHolder, long now, StoreEventSink<K, V> eventSink) { Duration duration = Duration.ZERO; try { duration = expiry.getExpiryForAccess(key, valueHolder.value()); } catch (RuntimeException re) { LOG.error("Expiry computation caused an exception - Expiry duration will be 0 ", re); } valueHolder.accessed(now, duration); if (Duration.ZERO.equals(duration)) { fireOnExpirationEvent(key, valueHolder, eventSink); return null; } return valueHolder; }
Source:
<code>private void plotPlayerStatistics(PlayerStatistics result) { XYChart.Series<Long, Integer> series = new XYChart.Series<>(); series.setName("Player rating"); List<XYChart.Data<Long, Integer>> values = new ArrayList<>(); for (RatingInfo ratingInfo : result.getValues()) { <START> int minRating = RatingUtil.getGlobalRating(ratingInfo); <END> LocalDateTime dateTime = LocalDate.from(ratingInfo.getDate()).atTime(ratingInfo.getTime()); values.add(new XYChart.Data<>(dateTime.atZone(ZoneId.systemDefault()).toEpochSecond(), minRating)); } series.getData().setAll(FXCollections.observableList(values)); rating90DaysChart.getData().setAll(series); }</code><technical_language>RatingInfo contains dev mean, getRating()</technical_language>

Target:
private void plotPlayerStatistics(PlayerStatistics result) { XYChart.Series<Long, Integer> series = new XYChart.Series<>(); series.setName("Player rating"); List<XYChart.Data<Long, Integer>> values = new ArrayList<>(); for (RatingInfo ratingInfo : result.getValues()) { int minRating = RatingUtil.getRating(ratingInfo); LocalDateTime dateTime = LocalDate.from(ratingInfo.getDate()).atTime(ratingInfo.getTime()); values.add(new XYChart.Data<>(dateTime.atZone(ZoneId.systemDefault()).toEpochSecond(), minRating)); } series.getData().setAll(FXCollections.observableList(values)); rating90DaysChart.getData().setAll(series); }
Source:
<code>public void commitBranch(Artifact art, Branch branch, boolean isArchiveSource) { IOperation operation; try { operation = <START> AtsBranchManager.commitWorkingBranch((TeamWorkFlowArtifact) art, false, false, branch, isArchiveSource); <END> Operations.executeAsJob(operation, true); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex); } }</code><technical_language>a catch for ClassCastException? is art checked verify is a teamWorkFlowArtifact</technical_language>

Target:
public void commitBranch(Artifact art, Branch branch, boolean isArchiveSource) { if (art instanceof TeamWorkFlowArtifact) { IOperation operation; try { operation = AtsBranchManager.commitWorkingBranch((TeamWorkFlowArtifact) art, false, false, branch, isArchiveSource); Operations.executeAsJob(operation, true); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex); } } }
Source:
<code>protected void onCollectionLoaded(Collection col) { super.onCollectionLoaded(col); if (mCurrentCard == null) { mCurrentCard = new PreviewerCard(col, mCardList[mIndex]); } displayCardQuestion(); <START> showBackIcon();; <END> }</code><technical_language>Double ;;</technical_language>

Target:
protected void onCollectionLoaded(Collection col) { super.onCollectionLoaded(col); if (mCurrentCard == null) { mCurrentCard = new PreviewerCard(col, mCardList[mOrdinal]); } displayCardQuestion(); showBackIcon(); }
Source:
<code>public static CrateState fromStream(byte[] value) throws IOException { if (value.length == 0) { return new CrateState(); } ByteArrayInputStream in = new ByteArrayInputStream(value); try (ObjectInputStream objectInputStream = new ObjectInputStream(in)) { CrateState state = (CrateState) objectInputStream.readObject(); return state; } catch (ClassNotFoundException e) { <START> LOGGER.error("Could not deserialize ClusterState: {}", e.getMessage()); <END> } return null; }</code><technical_language>pass exception logger.errror</technical_language>

Target:
public static CrateState fromStream(byte[] value) throws IOException { if (value.length == 0) { return new CrateState(); } ByteArrayInputStream in = new ByteArrayInputStream(value); try (ObjectInputStream objectInputStream = new ObjectInputStream(in)) { CrateState state = (CrateState) objectInputStream.readObject(); return state; } catch (ClassNotFoundException e) { LOGGER.error("Could not deserialize ClusterState:", e); } return null; }
Source:
<code>public static LatencyDataStore getResultsFromAnalysis(@Nullable LatencyAnalysis analysis) { if (analysis != null) { ISegmentStore<ISegment> results = analysis.getResults(); if (results != null) { <START> return storeAndGet(results); <END> } } return new LatencyDataStore(new TreeMapStore<>()); }</code><technical_language>If mistaken, analysis results stay in memory long trace is opened. full copy of results in tree map store. copy in memory</technical_language>

Target:
public static LatencyDataStore getResultsFromAnalysis(@Nullable LatencyAnalysis analysis) { ISegmentStore<ISegment> results = null; if (analysis != null) { results = analysis.getResults(); } return storeAndGet(results); }
Source:
<code><START> private Map<String, Object> getRawCapabilities() { <END> return (Map<String, Object>) asMap(); }</code><technical_language>@ILikeToNguyen change in visibility here</technical_language>

Target:
public Map<String, Object> getRawCapabilities() { return (Map<String, Object>) asMap(); }
Source:
<code>protected void autonomousMain() throws AutonomousModeOverException, InterruptedException { try { Elevator.setBottom.event(); waitUntil(Elevator.atBottom); boolean r = Rollers.running.get(); boolean d = Rollers.direction.get(); <START> boolean o = Rollers.closed.get(); <END> try{ Rollers.closed.set(true); Rollers.direction.set(true); Rollers.running.set(true); waitUntil(BooleanMixing.invert(AutoLoader.crateInPosition)); waitForTime(timeout); } finally { Rollers.running.set(r); Rollers.direction.set(d); Rollers.direction.set(o); } } finally { running.set(false); } }</code><technical_language>more descriptive names for these. "running," "direction," "open" fine</technical_language>

Target:
protected void autonomousMain() throws AutonomousModeOverException, InterruptedException { try { setClampHeight(1.0f); Elevator.setBottom.event(); waitUntil(Elevator.atBottom); float currentClampHeight = Clamp.height.get(); boolean running = Rollers.running.get(); boolean direction = Rollers.direction.get(); boolean open = Rollers.closed.get(); try{ Rollers.closed.set(true); Rollers.direction.set(true); Rollers.running.set(true); waitUntil(BooleanMixing.invert(AutoLoader.crateInPosition)); waitForTime(timeout); } finally { Rollers.running.set(running); Rollers.direction.set(direction); Rollers.direction.set(open); setClampHeight(currentClampHeight); } } finally { running.set(false); } }
Source:
<code>protected void removeNode(final Node<E> node) { <START> Objects.requireNonNull(node,"The new node to remove must not be null."); <END> node.previous.next = node.next; node.next.previous = node.previous; size--; modCount++; }</code><technical_language>Please add a space comma</technical_language>

Target:
protected void removeNode(final Node<E> node) { Objects.requireNonNull(node, "node"); node.previous.next = node.next; node.next.previous = node.previous; size--; modCount++; }
Source:
<code>public Tuple next() throws IOException { if (fragments == null) { return null; } if (scanner == null) { <START> System.out.println("[SeqScanExec/next] "); <END> } Tuple tuple; Tuple outTuple = new VTuple(outColumnNum); if (!plan.hasQual()) { if ((tuple = scanner.next()) != null) { projector.eval(tuple, outTuple); outTuple.setOffset(tuple.getOffset()); return outTuple; } else { return null; } } else { while ((tuple = scanner.next()) != null) { if (qual.eval(tuple).isTrue()) { projector.eval(tuple, outTuple); return outTuple; } } return null; } }</code><technical_language>Please remove debug codes</technical_language>

Target:
public Tuple next() throws IOException { if (fragments == null) { return null; } Tuple tuple; Tuple outTuple = new VTuple(outColumnNum); if (!plan.hasQual()) { if ((tuple = scanner.next()) != null) { projector.eval(tuple, outTuple); outTuple.setOffset(tuple.getOffset()); return outTuple; } else { return null; } } else { while ((tuple = scanner.next()) != null) { if (qual.eval(tuple).isTrue()) { projector.eval(tuple, outTuple); return outTuple; } } return null; } }
Source:
<code>public void call() { try { subscriber.onSuccess(value); } catch (Throwable t) { subscriber.onError(t); <START> return; <END> } }</code><technical_language>need for return</technical_language>

Target:
public void call() { try { subscriber.onSuccess(value); } catch (Throwable t) { subscriber.onError(t); } }
Source:
<code>private boolean isManagementNetworkChanged(List<HostNetwork> networksToConfigure){ Network managementNetwork = getClusterNetworks().stream() .filter(e -> e.getCluster().isManagement()) .collect(Collectors.collectingAndThen(Collectors.toList(), list -> { <START> if (list.size() != 1) { <END> throw new IllegalStateException("There isn't management network for cluster " + getClusterId()); } return list.get(0); })); String managementNetworkName = managementNetwork.getName(); for (HostNetwork network : networksToConfigure) { if (managementNetworkName.equals(network.getNetworkName())){ return true; } } for (CreateOrUpdateBond createOrUpdateBond : getParameters().getCreateOrUpdateBonds()) { VdsNetworkInterface bondNic = getExistingNicsBusinessEntityMap().get(createOrUpdateBond.getId()); if (bondNic != null && managementNetworkName.equals(bondNic.getNetworkName())) { return true; } } return false; }</code><technical_language>fit error message, check 'if (list.size() == 0) '</technical_language>

Target:
private boolean isManagementNetworkChanged(List<HostNetwork> networksToConfigure){ Network managementNetwork = managementNetworkUtil.getManagementNetwork(getClusterNetworks(), getClusterId()); String managementNetworkName = managementNetwork.getName(); for (HostNetwork network : networksToConfigure) { if (managementNetworkName.equals(network.getNetworkName())){ return true; } } for (CreateOrUpdateBond createOrUpdateBond : getParameters().getCreateOrUpdateBonds()) { VdsNetworkInterface bondNic = getExistingNicsBusinessEntityMap().get(createOrUpdateBond.getId()); if (bondNic != null && managementNetworkName.equals(bondNic.getNetworkName())) { return true; } } return false; }
Source:
<code>private static Workspace initializeWorkspace() throws Exception { Workspace ws = null; try { Workspace.setDriver(Constants.BNDDRIVER_ECLIPSE); Workspace.addGestalt(Constants.GESTALT_INTERACTIVE, new Attrs()); <START> ws = Workspace.getWorkspace(getWorkspaceDirectory()); <END> updateResourceChangeListener(ws); ws.addBasicPlugin(new WorkspaceListener(ws)); ws.addBasicPlugin(getInstance().repoListenerTracker); ws.addBasicPlugin(getWorkspaceR5Repository()); ws.addBasicPlugin(new JobProgress()); ws.getBuildOrder(); workspaceRepositoryChangeDetector = new WorkspaceRepositoryChangeDetector(ws); } catch (final Exception e) { if (ws != null) { ws.close(); } throw e; } return ws; }</code><technical_language>Breaking initialize workspace out a method "reset" wont work Workspace.getWorkspace a static cache. I need change this line ws = new Workspace(getWorkspaceDirectory()); ensure a new Workspace object is returned</technical_language>

Target:
private static Workspace initializeWorkspace() throws Exception { Workspace ws = null; try { Workspace.setDriver(Constants.BNDDRIVER_ECLIPSE); Workspace.addGestalt(Constants.GESTALT_INTERACTIVE, new Attrs()); ws = new Workspace(getWorkspaceDirectory()); updateResourceChangeListener(ws); ws.addBasicPlugin(new WorkspaceListener(ws)); ws.addBasicPlugin(getInstance().repoListenerTracker); ws.addBasicPlugin(getWorkspaceR5Repository()); ws.addBasicPlugin(new JobProgress()); ws.getBuildOrder(); workspaceRepositoryChangeDetector = new WorkspaceRepositoryChangeDetector(ws); } catch (final Exception e) { if (ws != null) { ws.close(); } throw e; } return ws; }
Source:
<code>public void onNext(final TaskStop taskStop) { <START> LOG.log(Level.FINE, "Sends a msg to deregister itself to stop subscribing updates in routing table"); <END> sender.sendWorkerDeregisterMsg(); }</code><technical_language>I including taskStop.getId() log message more informative</technical_language>

Target:
public void onNext(final TaskStop taskStop) { LOG.log(Level.FINE, "Task {0} sends a msg to deregister itself to stop subscribing updates in routing table", taskStop.getId()); sender.sendWorkerDeregisterMsg(); }
Source:
<code>protected void processAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { String key = URLDecoder.decode(request.getHeader("Authorization").substring(7), "UTF-8").trim(); <START> NuxeoOAuth2Token token = TransactionHelper.runInNewTransaction(() -> getTokenStore().getToken(key)); <END> ClientRegistry clientRegistry = Framework.getService(ClientRegistry.class); if (token == null || token.isExpired() || !clientRegistry.hasClient(token.getClientId())) { response.setStatus(401); return; } LoginContext loginContext = buildLoginContext(token); if (loginContext != null) { Principal principal = (Principal) loginContext.getSubject().getPrincipals().toArray()[0]; try { chain.doFilter(new NuxeoSecuredRequestWrapper(request, principal), response); } finally { try { loginContext.logout(); } catch (LoginException e) { log.warn("Error when logging out", e); } } } }</code><technical_language>Simply runInTransaction. need start a separate if exists</technical_language>

Target:
protected void processAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { String key = URLDecoder.decode( request.getHeader(AUTHORIZATION_HEADER).substring(BEARER_AUTHENTICATION_SCHEME.length()), "UTF-8") .trim(); NuxeoOAuth2Token token = TransactionHelper.runInTransaction(() -> tokenStore.getToken(key)); ClientRegistry clientRegistry = Framework.getService(ClientRegistry.class); if (token == null || token.isExpired() || !clientRegistry.hasClient(token.getClientId())) { response.setStatus(SC_UNAUTHORIZED); return; } LoginContext loginContext = buildLoginContext(token); if (loginContext != null) { Principal principal = (Principal) loginContext.getSubject().getPrincipals().toArray()[0]; try { chain.doFilter(new NuxeoSecuredRequestWrapper(request, principal), response); } finally { try { loginContext.logout(); } catch (LoginException e) { log.warn("Error when logging out", e); } } } }
Source:
<code><START> public void start(BootstrapContext ctx) <END> throws ResourceAdapterInternalException { if (engine == null) { engine = new ModeShapeEngine(); engine.start(); } }</code><technical_language>This method synchronized</technical_language>

Target:
public synchronized void start(BootstrapContext ctx) throws ResourceAdapterInternalException { if (engine == null) { engine = new ModeShapeEngine(); engine.start(); } }
Source:
<code>public RetriableCommitFailedException(Throwable t) { super("Offset commit failed with a retriable exception. This is usually because the consumer is no longer " + <START> "part of a group or is participating a rebalance right now. You should first call poll to complete " + <END> "the rebalance and then commit the latest consumed offsets.", t); }</code><technical_language>suggestion "part of a group is participating in a rebalance right now. call poll complete " +</technical_language>

Target:
public RetriableCommitFailedException(Throwable t) { super("Offset commit failed with a retriable exception. You should retry committing " + "the latest consumed offsets.", t); }
Source:
<code>private List<MethodSpec> getMethods() { <START> ArrayList<MethodSpec> results = new ArrayList<>(); <END> results.addAll(definitions.entrySet() .stream() .map(entry -> getTableMethod(entry.getKey(), entry.getValue())) .collect(Collectors.toList())); results.addAll(definitions.entrySet() .stream() .filter(entry -> entry.getValue().hasV2TableEnabled()) .map(entry -> getSimpleTableMethod(entry.getKey(), entry.getValue())) .collect(Collectors.toList())); return results; }</code><technical_language>nit: List ArrayList</technical_language>

Target:
private List<MethodSpec> getMethods() { List<MethodSpec> results = new ArrayList<>(); results.addAll(definitions.entrySet() .stream() .map(entry -> getTableMethod(entry.getKey(), entry.getValue())) .collect(Collectors.toList())); results.addAll(definitions.entrySet() .stream() .filter(entry -> entry.getValue().hasV2TableEnabled()) .map(entry -> getV2TableMethod(entry.getKey(), entry.getValue())) .collect(Collectors.toList())); return results; }
Source:
<code>private void emitRow(@Nullable GenericRowData physicalKeyRow, @Nullable GenericRowData physicalValueRow) { final int metadataArity = metadataConverters.length; final int physicalArity = keyProjection.length + valueProjection.length; <START> final RowKind rowkind = physicalValueRow == null ? RowKind.DELETE : physicalValueRow.getRowKind(); <END> final GenericRowData producedRow = new GenericRowData( rowkind, physicalArity + metadataArity); for (int keyPos = 0; keyPos < keyProjection.length; keyPos++) { producedRow.setField(keyProjection[keyPos], physicalKeyRow.getField(keyPos)); } if (physicalValueRow != null) { for (int valuePos = 0; valuePos < valueProjection.length; valuePos++) { producedRow.setField(valueProjection[valuePos], physicalValueRow.getField(valuePos)); } } for (int i = 0; i < metadataArity; i++) { producedRow.setField(i + physicalArity, metadataConverters[i].read(inputRecord)); } outputCollector.collect(producedRow); }</code><technical_language>upsertMode==true</technical_language>

Target:
private void emitRow(@Nullable GenericRowData physicalKeyRow, @Nullable GenericRowData physicalValueRow) { final int metadataArity = metadataConverters.length; final RowKind rowKind; if (physicalValueRow == null) { if (upsertMode) { rowKind = RowKind.DELETE; } else { throw new DeserializationException( "Get null value in non-upsert mode. Could not to set rowkind for input record."); } } else { rowKind = physicalValueRow.getRowKind(); } final GenericRowData producedRow = new GenericRowData( rowKind, physicalArity + metadataArity); for (int keyPos = 0; keyPos < keyProjection.length; keyPos++) { producedRow.setField(keyProjection[keyPos], physicalKeyRow.getField(keyPos)); } if (physicalValueRow != null) { for (int valuePos = 0; valuePos < valueProjection.length; valuePos++) { producedRow.setField(valueProjection[valuePos], physicalValueRow.getField(valuePos)); } } for (int metadataPos = 0; metadataPos < metadataArity; metadataPos++) { producedRow.setField(physicalArity + metadataPos, metadataConverters[metadataPos].read(inputRecord)); } outputCollector.collect(producedRow); }
Source:
<code>public static void initCreateElementTest() { try { <START> Bundle bundle = Platform.getBundle("org.eclipse.papyrus.infra.elementtypesconfigurations.ui.tests"); <END> workspaceTestFile = PapyrusProjectUtils.copyIFile("/model/WorkspaceTest.elementtypesconfigurations", bundle, createProject, "/model/WorkspaceTest.elementtypesconfigurations"); Assert.assertTrue(workspaceTestFile.isAccessible()); } catch (CoreException e) { fail(e.getMessage()); } catch (IOException e) { fail(e.getMessage()); } }</code><technical_language>a variable a string ? refactoring is working add resolvable dependencies</technical_language>

Target:
public static void initCreateElementTest() { try { Bundle bundle = FrameworkUtil.getBundle(ElementTypesRegistryTests.class); workspaceTestFile = PapyrusProjectUtils.copyIFile("/model/WorkspaceTest.elementtypesconfigurations", bundle, createProject, "/model/WorkspaceTest.elementtypesconfigurations"); Assert.assertTrue(workspaceTestFile.isAccessible()); } catch (CoreException e) { fail(e.getMessage()); } catch (IOException e) { fail(e.getMessage()); } }
Source:
<code><T extends ColumnMapper> List<T> getColumnMappers(Class<T> mapperType) { List<T> attributeMappers = new ArrayList<>(); for (ColumnMapper columnMapper : this.columnMappers) { if (mapperType.isInstance(columnMapper)) { <START> attributeMappers.add((T) columnMapper); <END> } } return attributeMappers; }</code><technical_language>another unsafe cast changed mapperType.cast() instead</technical_language>

Target:
<T extends ColumnMapper> List<T> getColumnMappers(Class<T> mapperType) { List<T> attributeMappers = new ArrayList<>(); for (ColumnMapper columnMapper : this.columnMappers) { if (mapperType.isInstance(columnMapper)) { attributeMappers.add(mapperType.cast(columnMapper)); } } return attributeMappers; }
Source:
<code>public CompoundInClause(Iterable<String> names, Iterable<?> valueLists) { if (valueLists == null) throw new IllegalArgumentException("Missing values for IN clause"); if (names == null) throw new IllegalArgumentException("Missing names for IN clause"); this.names = Lists.newArrayList(names); <START> this.valueLists = Lists.newArrayListWithExpectedSize(this.names.size()); <END> for (Object value : valueLists) { if (value instanceof Iterable) { List<?> tuple = Lists.newArrayList((Iterable<?>) value); if (tuple.size() != this.names.size()) { throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", this.names.size(), tuple.size())); } this.valueLists.add(tuple); } else if (!(value instanceof BindMarker)) { throw new IllegalArgumentException(String.format("Wrong element type for values list, expected List or BindMarker, got %s", value.getClass().getName())); } else { this.valueLists.add(value); } } if (this.valueLists.size() > 65535) throw new IllegalArgumentException("Too many values for IN clause, the maximum allowed is 65535"); }</code><technical_language>Nit: valueLists.size(). size of list of tuples is related number of values, for example (a,b) IN ((1,2),(3,4),(5,6)) => 2 values, 3 tuples. care of this while merging</technical_language>

Target:
public CompoundInClause(Iterable<String> names, Iterable<?> valueLists) { if (valueLists == null) throw new IllegalArgumentException("Missing values for IN clause"); if (names == null) throw new IllegalArgumentException("Missing names for IN clause"); this.names = Lists.newArrayList(names); this.valueLists = Lists.newArrayList(); for (Object value : valueLists) { if (value instanceof Iterable) { List<?> tuple = Lists.newArrayList((Iterable<?>) value); if (tuple.size() != this.names.size()) { throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", this.names.size(), tuple.size())); } this.valueLists.add(tuple); } else if (!(value instanceof BindMarker)) { throw new IllegalArgumentException(String.format("Wrong element type for values list, expected List or BindMarker, got %s", value.getClass().getName())); } else { this.valueLists.add(value); } } if (this.valueLists.size() > 65535) throw new IllegalArgumentException("Too many values for IN clause, the maximum allowed is 65535"); }
Source:
<code>public int compareTo(RankedEntity o) { <START> return new Float(this.score).compareTo(new Float(o.score)); <END> }</code><technical_language>Careful float comparison. minor accuracy issues a big deal here</technical_language>

Target:
public int compareTo(RankedEntity o) { return Float.compare(score, o.score); }
Source:
<code>public MakeBlob(boolean produceImmediate) { <START> super(NAME, 1, 3); <END> this.produceImmediate = produceImmediate; }</code><technical_language>1 3? Please constants meaningful names</technical_language>

Target:
public MakeBlob(boolean produceImmediate) { super(NAME, NB_OUTPUT_STREAMS); this.produceImmediate = produceImmediate; }