auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected Field(Type type, int repetitionLevel, int definitionLevel, boolean required) { <START> this.type = type; <END> this.repetitionLevel = repetitionLevel; this.definitionLevel = definitionLevel; this.required = required; }</code><technical_language>requireNonNull(type, "type is required");</technical_language>

Target:
protected Field(Type type, int repetitionLevel, int definitionLevel, boolean required) { this.type = requireNonNull(type, "type is required"); this.repetitionLevel = repetitionLevel; this.definitionLevel = definitionLevel; this.required = required; }
Source:
<code>public static long readLongAttribute(String attributeName, long defaultValue) { try { String methodName = "get" + attributeName; <START> if (methodName.equals("getFreePhysicalMemorySize") && GET_FREE_PHYSICAL_MEMORY_SIZE_DISABLED) { <END> return defaultValue; } OperatingSystemMXBean systemMXBean = OPERATING_SYSTEM_MX_BEAN; Method method = systemMXBean.getClass().getMethod(methodName); try { method.setAccessible(true); } catch (Exception e) { return defaultValue; } Object value = method.invoke(systemMXBean); if (value == null) { return defaultValue; } if (value instanceof Long) { return (Long) value; } if (value instanceof Double) { double v = (Double) value; return Math.round(v * PERCENTAGE_MULTIPLIER); } if (value instanceof Number) { return ((Number) value).longValue(); } } catch (RuntimeException re) { throw re; } catch (Exception ignored) { ignore(ignored); } return defaultValue; }</code><technical_language>Minor: consider changing if (GET_FREE_PHYSICAL_MEMORY_SIZE_DISABLED && methodName.equals("getFreePhysicalMemorySize") avoid unnecessary equals() calls (the order is fine in other places)</technical_language>

Target:
public static long readLongAttribute(String attributeName, long defaultValue) { try { String methodName = "get" + attributeName; if (GET_FREE_PHYSICAL_MEMORY_SIZE_DISABLED && methodName.equals("getFreePhysicalMemorySize")) { return defaultValue; } OperatingSystemMXBean systemMXBean = OPERATING_SYSTEM_MX_BEAN; Method method = systemMXBean.getClass().getMethod(methodName); try { method.setAccessible(true); } catch (Exception e) { return defaultValue; } Object value = method.invoke(systemMXBean); if (value == null) { return defaultValue; } if (value instanceof Long) { return (Long) value; } if (value instanceof Double) { double v = (Double) value; return Math.round(v * PERCENTAGE_MULTIPLIER); } if (value instanceof Number) { return ((Number) value).longValue(); } } catch (RuntimeException re) { throw re; } catch (Exception ignored) { ignore(ignored); } return defaultValue; }
Source:
<code>protected Optional<DyeColor> getVal(ItemStack container) { <START> return Optional.of((DyeColor) (Object) EnumDyeColor.byMetadata(container.getItemDamage())); <END> }</code><technical_language>EnumDyeColor.byDyeDamage(stack.getMetadata()) - ItemDye uses. This fix @Aaron1011 mentioned</technical_language>

Target:
protected Optional<DyeColor> getVal(ItemStack container) { if(container.getItem().equals(Items.dye)) { return Optional.of((DyeColor) (Object) EnumDyeColor.byDyeDamage(container.getItemDamage())); } else { return Optional.of((DyeColor) (Object) EnumDyeColor.byMetadata(container.getItemDamage())); } }
Source:
<code>private Map<String, DbParameterAccessor> getParamMap(DbObjectName qn, boolean isFunction) throws SQLException { Map<String, DbParameterAccessor> allParams = new HashMap<>(); try (ResultSet rs = getObjectParameters(qn, isFunction)) { while (rs.next()) { <START> String paramName = defaultIfNull(rs.getString("COLUMN_NAME"), ""); <END> allParams.put(NameNormaliser.normaliseName(paramName), crtProcDbParamAccessor(rs, isFunction)); } } return allParams; }</code><technical_language>avoid code duplication (the line is in crtProcDbParamAccessor)</technical_language>

Target:
private Map<String, DbParameterAccessor> getParamMap(DbObjectName qn, boolean isFunction) throws SQLException { Map<String, DbParameterAccessor> allParams = new HashMap<>(); try (ResultSet rs = getObjectParameters(qn, isFunction)) { while (rs.next()) { String paramName = defaultIfNull(rs.getString("COLUMN_NAME"), ""); allParams.put(NameNormaliser.normaliseName(paramName), createObjectDbParamAccessor(paramName, rs, isFunction)); } } return allParams; }
Source:
<code>public synchronized void reload() { if (directory == null || !directory.isDirectory() || !directory.canRead()) { <START> LOGGER.log(Level.INFO, "plugin directory not found or not readable: {0}. " <END> + "All requests allowed.", directory); return; } LOGGER.log(Level.INFO, "Plugins are being reloaded from " + directory.getAbsolutePath()); removeAll(); loader = (AuthorizationPluginClassLoader) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return new AuthorizationPluginClassLoader(directory); } }); removeAll(); plugins = new ArrayList<>(); List<File> classfiles = listFilesRec(".class"); List<File> jarfiles = listFiles(".jar"); for (File file : classfiles) { String classname = getClassName(file); if (classname.isEmpty()) { continue; } handleLoadClass(classname); } for (File file : jarfiles) { try (JarFile jar = new JarFile(file)) { Enumeration<JarEntry> entries = jar.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); String classname = getClassName(entry); if (!entry.getName().endsWith(".class") || classname.isEmpty()) { continue; } handleLoadClass(classname); } } catch (IOException ex) { LOGGER.log(Level.INFO, "Could not manipulate with file because of: ", ex); } } for (IAuthorizationPlugin plugin : getPlugins()) { try { plugin.load(); } catch (Throwable ex) { LOGGER.log(Level.SEVERE, "Plugin \"" + plugin.getClass().getName() + "\" has failed while loading with exception:", ex); removePlugin(plugin); } } }</code><technical_language>ERROR level I - if configures directory in config, wants treating error is in order</technical_language>

Target:
public synchronized void reload() { if (pluginDirectory == null || !pluginDirectory.isDirectory() || !pluginDirectory.canRead()) { LOGGER.log(Level.WARNING, "plugin directory not found or not readable: {0}. " + "All requests allowed.", pluginDirectory); return; } LOGGER.log(Level.INFO, "Plugins are being reloaded from {0}", pluginDirectory.getAbsolutePath()); removeAll(); loader = (AuthorizationPluginClassLoader) AccessController.doPrivileged(new PrivilegedAction() { @Override public Object run() { return new AuthorizationPluginClassLoader(pluginDirectory); } }); removeAll(); plugins = new ArrayList<>(); List<File> classfiles = listFilesRec(".class"); List<File> jarfiles = listFiles(".jar"); for (File file : classfiles) { String classname = getClassName(file); if (classname.isEmpty()) { continue; } handleLoadClass(classname); } for (File file : jarfiles) { try (JarFile jar = new JarFile(file)) { Enumeration<JarEntry> entries = jar.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); String classname = getClassName(entry); if (!entry.getName().endsWith(".class") || classname.isEmpty()) { continue; } handleLoadClass(classname); } } catch (IOException ex) { LOGGER.log(Level.INFO, "Could not manipulate with file because of: ", ex); } } for (IAuthorizationPlugin plugin : getPlugins()) { try { plugin.load(); } catch (Throwable ex) { LOGGER.log(Level.SEVERE, "Plugin \"" + plugin.getClass().getName() + "\" has failed while loading with exception:", ex); removePlugin(plugin); } } }
Source:
<code>public String getDisplayName() { <START> return "Cron triggers monitor"; <END> }</code><technical_language>localizable</technical_language>

Target:
public String getDisplayName() { return Messages.SlowTriggerAdminMonitor_DisplayName(); }
Source:
<code>public void testAccessors() { <START> assertEquals("com.bugsnag.android.jvm.test", appData.get("packageName")); <END> assertNull(appData.get("buildUUID")); assertTrue(((Long) appData.get("duration")) > 0); assertEquals(500L, appData.get("durationInForeground")); assertTrue((Boolean) appData.get("inForeground")); }</code><technical_language>Is this correct? a number of references com.bugsnag.android.jvm hanging around</technical_language>

Target:
public void testAccessors() { assertEquals("com.bugsnag.android.core.test", appData.get("packageName")); assertNull(appData.get("buildUUID")); assertTrue(((Long) appData.get("duration")) > 0); assertEquals(500L, appData.get("durationInForeground")); assertTrue((Boolean) appData.get("inForeground")); }
Source:
<code>private void calculateLocation() { try { mLocationManager = (LocationManager) mContext.getSystemService(LOCATION_SERVICE); isGPSEnabled = mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); isNetworkEnabled = mLocationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); String providerName = null; if (isNetworkEnabled) { providerName = LocationManager.NETWORK_PROVIDER; } else if (isGPSEnabled) { providerName = LocationManager.GPS_PROVIDER; } else { String errorMessage = getResources().getString(R.string.unable_location_service_message); Toast.makeText(mContext, errorMessage, Toast.LENGTH_SHORT).show(); return; } obtainCoordinates(providerName); <START> } catch (Exception e) { <END> e.printStackTrace(); } }</code><technical_language>Please catch specific exception</technical_language>

Target:
private void calculateLocation() { mLocationManager = (LocationManager) mContext.getSystemService(LOCATION_SERVICE); isGPSEnabled = mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); isNetworkEnabled = mLocationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); String providerName = null; if (isNetworkEnabled) { providerName = LocationManager.NETWORK_PROVIDER; } else if (isGPSEnabled) { providerName = LocationManager.GPS_PROVIDER; } else { String errorMessage = getResources().getString(R.string.unable_location_service_message); Toast.makeText(mContext, errorMessage, Toast.LENGTH_SHORT).show(); return; } obtainCoordinates(providerName); }
Source:
<code><START> public List<Double> get(@PathParam("toItemID") String toItemID, <END> @PathParam("itemID") List<PathSegment> pathSegmentList) { ALSServingModelManager alsServingModelManager = (ALSServingModelManager) servletContext.getAttribute(ModelManagerListener.MANAGER_KEY); ALSServingModel alsServingModel = alsServingModelManager.getModel(); return Arrays.asList(1.2, 3.4); }</code><technical_language>reason for renaming getEstimatesForAnonymous() get()</technical_language>

Target:
public List<Double> get(@PathParam("toItemID") String toItemID, @PathParam("itemID") List<PathSegment> pathSegmentList) { return Arrays.asList(1.2, 3.4); }
Source:
<code>public Stream<MessageHandlingMember<? super T>> getHandlers(Class<?> type) { <START> return handlers.getOrDefault(type, new TreeSet<>(HandlerComparator.instance())) <END> .stream(); }</code><technical_language>returning empty TreeSet, register of handlers (as case in computeIfAbsent). If want return empty stream, getOrDefault(type, emptySet())</technical_language>

Target:
public Stream<MessageHandlingMember<? super T>> getHandlers(Class<?> type) { return handlers.getOrDefault(type, emptySortedSet()) .stream(); }
Source:
<code>private HashMap<Double, ArrayList<Integer>> orderBookCreator(String symbol) { HashMap<Double, ArrayList<Integer>> orderbook = new HashMap<Double, ArrayList<Integer>>(); ArrayList<Order> buyList = this.buyOrders.get(symbol); ArrayList<Order> sellList = this.sellOrders.get(symbol); for (Order <START> o : <END> buyList){ double key=o.getPrice(); ArrayList<Integer> temp=new ArrayList<Integer>(); if (orderbook.containsKey(key)){ temp.add(o.getSize()+orderbook.get(key).get(0)); temp.add(orderbook.get(key).get(1)); orderbook.replace(key, temp); } else{ temp.add(o.getSize()); temp.add(0); orderbook.put(key, temp); } } for (Order o : sellList){ double key=o.getPrice(); ArrayList<Integer> temp=new ArrayList<Integer>(); if (orderbook.containsKey(key)){ temp.add(orderbook.get(key).get(0)); temp.add(o.getSize()+orderbook.get(key).get(1)); orderbook.replace(key, temp); } else{ temp.add(0); temp.add(o.getSize()); orderbook.put(key, temp); } } return orderbook; }</code><technical_language>a clearer name! "order"</technical_language>

Target:
private HashMap<Double, ArrayList<Integer>> orderBookCreator(String symbol) { HashMap<Double, ArrayList<Integer>> orderbook = new HashMap<Double, ArrayList<Integer>>(); ArrayList<Order> buyList = this.buyOrders.get(symbol); ArrayList<Order> sellList = this.sellOrders.get(symbol); for (Order order : buyList){ double key=order.getPrice(); ArrayList<Integer> temp=new ArrayList<Integer>(); if (orderbook.containsKey(key)){ temp.add(order.getSize()+orderbook.get(key).get(0)); temp.add(orderbook.get(key).get(1)); orderbook.replace(key, temp); } else{ temp.add(order.getSize()); temp.add(0); orderbook.put(key, temp); } } for (Order order : sellList){ double key=order.getPrice(); ArrayList<Integer> temp=new ArrayList<Integer>(); if (orderbook.containsKey(key)){ temp.add(orderbook.get(key).get(0)); temp.add(order.getSize()+orderbook.get(key).get(1)); orderbook.replace(key, temp); } else{ temp.add(0); temp.add(order.getSize()); orderbook.put(key, temp); } } return orderbook; }
Source:
<code>protected Blob getContentBlob(Blob original, DocumentModel doc) { if (doc.getProperty(PICTURE_VIEWS_PROPERTY) != null) { <START> MultiviewPicture multiviewPicture = doc.getAdapter(MultiviewPicture.class); <END> for (PictureView view : multiviewPicture.getViews()) { if (view.getTitle().equals("FullHD") && view.getBlob() != null) { return view.getBlob(); } } } return original; }</code><technical_language>need previous check. doc.getAdapter() check if null</technical_language>

Target:
protected Blob getContentBlob(Blob original, DocumentModel doc) { MultiviewPicture multiviewPicture = doc.getAdapter(MultiviewPicture.class); if (multiviewPicture != null) { for (PictureView view : multiviewPicture.getViews()) { if (view.getTitle().equals("FullHD") && view.getBlob() != null) { return view.getBlob(); } } } return original; }
Source:
<code><START> public boolean equals(Object obj) { <END> if (obj == this) { return true; } if (obj instanceof KeycloakStatusDTO) { KeycloakStatusDTO that = (KeycloakStatusDTO) obj; EqualsBuilder builder = new EqualsBuilder() .append(this.getMode(), that.getMode()) .append(this.getModeReason(), that.getModeReason()) .append(this.getModeChangeTime(), that.getModeChangeTime()) .append(this.getResult(), that.getResult()) .append(this.getVersion(), that.getVersion()) .append(this.getRulesVersion(), that.getRulesVersion()) .append(this.getRulesSource(), that.getRulesSource()) .append(this.getRelease(), that.getRelease()) .append(this.getStandalone(), that.getStandalone()) .append(this.getTimeUTC(), that.getTimeUTC()) .append(this.getManagerCapabilities(), that.getManagerCapabilities()) .append(this.getKeycloakRealm(), that.getKeycloakRealm()) .append(this.getKeycloakAuthUrl(), that.getKeycloakAuthUrl()) .append(this.getKeycloakResource(), that.getKeycloakResource()); return builder.isEquals(); } return false; }</code><technical_language>of this replaced a call base equals check super.equals(obj). a of existing DTOs extend TimestampedCandlepinDTO for example</technical_language>

Target:
public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof KeycloakStatusDTO && super.equals(obj)) { KeycloakStatusDTO that = (KeycloakStatusDTO) obj; EqualsBuilder builder = new EqualsBuilder() .append(this.getKeycloakRealm(), that.getKeycloakRealm()) .append(this.getKeycloakAuthUrl(), that.getKeycloakAuthUrl()) .append(this.getKeycloakResource(), that.getKeycloakResource()); return builder.isEquals(); } return false; }
Source:
<code>private boolean isOnBranch(RevCommit commit, String fullBranch) throws IOException { <START> Ref developRef = repository.exactRef(fullBranch); <END> try { List<Ref> list = Git.wrap(repository).branchList().setContains(commit.name()).call(); return list.contains(developRef); } catch (GitAPIException e) { throw new RuntimeException(e); } }</code><technical_language>Naming: this (private) method a general interface; limited develop branch. this named more generally. "ref"? add if (ref == null) { return false; } avoid calculating branch list if is branch name</technical_language>

Target:
private boolean isOnBranch(RevCommit commit, String fullBranch) throws IOException { Ref branchRef = repository.exactRef(fullBranch); if (branchRef == null) { return false; } try { List<Ref> list = Git.wrap(repository).branchList().setContains(commit.name()).call(); return list.contains(branchRef); } catch (GitAPIException e) { throw new IOException(e); } }
Source:
<code>public String getDisplayName() { <START> return Messages.discover_pull_requests_from_origin(); <END> }</code><technical_language>suggestion return Messages.OriginPullRequestDiscoveryTrait_discoverPullRequestsFromOrigin();</technical_language>

Target:
public String getDisplayName() { return Messages.OriginPullRequestDiscoveryTrait_discoverPullRequestsFromOrigin(); }
Source:
<code>public static TriggerUsage of(apex.jorje.data.ast.TriggerUsage apexTriggerUsage) { <START> return APEX_TO_PMD.get(apexTriggerUsage); <END> }</code><technical_language>throw a NoSuchElementException instead of returning null? if Jorje adds a name map build fail instead of returning null silently</technical_language>

Target:
public static TriggerUsage of(apex.jorje.data.ast.TriggerUsage apexTriggerUsage) { TriggerUsage result = APEX_TO_PMD.get(apexTriggerUsage); if (result != null) { return result; } throw new NoSuchElementException("Unknown TriggerUsage value '" + apexTriggerUsage.name() + "'"); }
Source:
<code>protected static ICPPEvaluation maybeApplyConversion(ICPPEvaluation argument, IType targetType, IASTNode point, boolean allowContextualConversion) { IType type = argument.getType(point); IType uqType= SemanticUtil.getNestedType(type, TDEF | REF | CVTYPE); ValueCategory valueCategory = argument.getValueCategory(point); ICPPFunction conversion = null; if (uqType instanceof ICPPClassType) { try { Cost cost = Conversions.initializationByConversion(valueCategory, type, (ICPPClassType) uqType, targetType, false, point, allowContextualConversion); conversion = cost.getUserDefinedConversion(); } catch (DOMException e) { CCorePlugin.log(e); } } if (conversion != null) { if (!conversion.isConstexpr()) { return EvalFixed.INCOMPLETE; } ICPPEvaluation eval; if (conversion instanceof ICPPMethod) { <START> eval = new EvalMemberAccess(uqType, valueCategory, conversion, false, point); <END> } else { eval = new EvalBinding(conversion, null, (IBinding) null); } argument = new EvalFunctionCall(new ICPPEvaluation[] {eval}, null, (IBinding) null); } return argument; }</code><technical_language>issues here. - First, UDC initializationByConversion() a method, is need handle ICPPFunction case. - right correct evaluation for a method is EvalMemberAccess, EvalBinding. - However, this EvalMemberAccess/EvalFunctionCall combination is missing something: incoming of 'argument' is passed in anywhere. This means of object is lost. In test cases, this a problem, return of conversion operator depend of object. However, if change test so: struct BooleanConvertible { bool value; constexpr explicit operator bool() const { return value; } }; constexpr BooleanConvertible TRUE{true}; test start failing. solution is version of EvalMemberAccess constructor takes 'ownerEval' parameter, pass in 'argument' for parameter. - Finally, is a bug in constexpr evaluation engine (for I filed bug 510151) recognize constexpr variables declared so: constexpr Type variable{}; bug is fixed, form instead: constexpr Type variable = Type{};</technical_language>

Target:
protected static ICPPEvaluation maybeApplyConversion(ICPPEvaluation argument, IType targetType, IASTNode point, boolean allowContextualConversion) { IType type = argument.getType(point); IType uqType= SemanticUtil.getNestedType(type, TDEF | REF | CVTYPE); ValueCategory valueCategory = argument.getValueCategory(point); ICPPFunction conversion = null; if (uqType instanceof ICPPClassType) { try { Cost cost = Conversions.initializationByConversion(valueCategory, type, (ICPPClassType) uqType, targetType, false, point, allowContextualConversion); conversion = cost.getUserDefinedConversion(); } catch (DOMException e) { CCorePlugin.log(e); } } if (conversion != null) { if (!conversion.isConstexpr()) { return EvalFixed.INCOMPLETE; } ICPPEvaluation eval = new EvalMemberAccess(uqType, valueCategory, conversion, argument, false, point); argument = new EvalFunctionCall(new ICPPEvaluation[] { eval }, null, (IBinding) null); } return argument; }
Source:
<code>public boolean shouldSuspend(ContractsGrantsInvoiceDocument contractsGrantsInvoiceDocument) { if (shouldValidateOnBudgetTotal()) { LOG.debug("shouldSuspend, validating based on award budget total"); KualiDecimal totalAmountBilledToDate = contractsGrantsInvoiceDocument.getInvoiceGeneralDetail().getTotalAmountBilledToDate(); Award award = (Award) contractsGrantsInvoiceDocument.getInvoiceGeneralDetail().getAward(); AwardExtendedAttribute awardExtension = (AwardExtendedAttribute) award.getExtension(); KualiDecimal budgetTotalAmount = awardExtension.getBudgetTotalAmount(); if (ObjectUtils.isNull(budgetTotalAmount)) { <START> LOG.error("shouldSuspend, no budget amount set, setting budget amount to 0, wich will cause a suspension."); <END> budgetTotalAmount = KualiDecimal.ZERO; } if (LOG.isDebugEnabled()) { LOG.debug("shouldSuspend, award proposal number: " + award.getProposalNumber() + " totalAmountBilledToDate: " + totalAmountBilledToDate + " budgetTotalAmount: " + budgetTotalAmount); } return totalAmountBilledToDate.isGreaterThan(budgetTotalAmount); } else { LOG.debug("shouldSuspend, validating based on award total"); return super.shouldSuspend(contractsGrantsInvoiceDocument); } }</code><technical_language>Minor typo in error message; "which" instead of "wich"</technical_language>

Target:
public boolean shouldSuspend(ContractsGrantsInvoiceDocument contractsGrantsInvoiceDocument) { if (shouldValidateOnBudgetTotal()) { LOG.debug("shouldSuspend, validating based on award budget total"); KualiDecimal totalAmountBilledToDate = contractsGrantsInvoiceDocument.getInvoiceGeneralDetail().getTotalAmountBilledToDate(); Award award = (Award) contractsGrantsInvoiceDocument.getInvoiceGeneralDetail().getAward(); AwardExtendedAttribute awardExtension = (AwardExtendedAttribute) award.getExtension(); KualiDecimal budgetTotalAmount = awardExtension.getBudgetTotalAmount(); if (ObjectUtils.isNull(budgetTotalAmount)) { LOG.error("shouldSuspend, no budget amount set, setting budget amount to 0, which will cause a suspension."); budgetTotalAmount = KualiDecimal.ZERO; } if (LOG.isDebugEnabled()) { LOG.debug("shouldSuspend, award proposal number: " + award.getProposalNumber() + " totalAmountBilledToDate: " + totalAmountBilledToDate + " budgetTotalAmount: " + budgetTotalAmount); } return totalAmountBilledToDate.isGreaterThan(budgetTotalAmount); } else { LOG.debug("shouldSuspend, validating based on award total"); return super.shouldSuspend(contractsGrantsInvoiceDocument); } }
Source:
<code>public static long zip(File directory, OutputStream out) throws IOException { if (!directory.isDirectory()) { throw new IOException(String.format("directory[%s] is not a directory", directory)); } final File[] files = directory.listFiles(); if (files == null) { <START> throw new IAE("Directory not found [%s]", directory.getAbsolutePath()); <END> } long totalSize = 0; try (final ZipOutputStream zipOut = new ZipOutputStream(out)) { for (File file : files) { log.info("Adding file[%s] with size[%,d]. Total size so far[%,d]", file, file.length(), totalSize); if (file.length() >= Integer.MAX_VALUE) { zipOut.finish(); throw new IOException(String.format("file[%s] too large [%,d]", file, file.length())); } zipOut.putNextEntry(new ZipEntry(file.getName())); try (InputStream inputStream = new FileInputStream(file)) { totalSize += ByteStreams.copy(inputStream, zipOut); } } zipOut.closeEntry(); } return totalSize; }</code><technical_language>directory.isDirectory() catch this case already</technical_language>

Target:
public static long zip(File directory, OutputStream out) throws IOException { if (!directory.isDirectory()) { throw new IOException(String.format("directory[%s] is not a directory", directory)); } final File[] files = directory.listFiles(); long totalSize = 0; try (final ZipOutputStream zipOut = new ZipOutputStream(out)) { for (File file : files) { log.info("Adding file[%s] with size[%,d]. Total size so far[%,d]", file, file.length(), totalSize); if (file.length() >= Integer.MAX_VALUE) { zipOut.finish(); throw new IOException(String.format("file[%s] too large [%,d]", file, file.length())); } zipOut.putNextEntry(new ZipEntry(file.getName())); totalSize += Files.asByteSource(file).copyTo(zipOut); } zipOut.closeEntry(); } return totalSize; }
Source:
<code>private void setBehaviour(PathOutageStatusProvider statusProvider) { Mockito.when(statusProvider.getStatusForSingleVertex(Matchers.any(PathOutageProvider.class), Matchers.any(VertexRef.class))). <START> thenReturn(new Status() { <END> @Override public String computeStatus() { return OnmsSeverity.NORMAL.getLabel(); } @Override public Map<String, String> getStatusProperties() { return null; } @Override public Map<String, String> getStyleProperties() { return null; } }); }</code><technical_language>is a DefaultStatus object instead</technical_language>

Target:
private void setBehaviour(PathOutageStatusProvider statusProvider) { Mockito.when(statusProvider.getStatusForVertices( Matchers.any(PathOutageProvider.class), Matchers.anyCollection(), Matchers.any())) .thenReturn(new HashMap()); }
Source:
<code>private void updateMatchSystemThemeSwitch() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { matchSystemSwitch.setVisibility(View.VISIBLE); matchSystemSwitch.setChecked(Prefs.shouldMatchSystemTheme()); conditionallyDisableThemeButtons(); <START> } <END> }</code><technical_language>For consistency explicitness, set switch if shown, remove visibility="gone" attribute XML</technical_language>

Target:
private void updateMatchSystemThemeSwitch() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { matchSystemThemeSwitch.setVisibility(View.VISIBLE); matchSystemThemeSwitch.setChecked(Prefs.shouldMatchSystemTheme()); conditionallyDisableThemeButtons(); } else { matchSystemThemeSwitch.setVisibility(View.GONE); } }
Source:
<code>protected void updateQuota(DiskImage diskImage) { <START> if (isDiskImage() || isCinderDisk()) { <END> DiskImage oldDisk = (DiskImage) getOldDisk(); if (!Objects.equals(oldDisk.getQuotaId(), diskImage.getQuotaId())) { getImageStorageDomainMapDao().updateQuotaForImageAndSnapshots(diskImage.getId(), diskImage.getStorageIds().get(0), diskImage.getQuotaId()); } } }</code><technical_language>Please consider extract a method (like isInternalManagedDisk)</technical_language>

Target:
protected void updateQuota(DiskImage diskImage) { if (isInternalManagedDisk()) { DiskImage oldDisk = (DiskImage) getOldDisk(); if (!Objects.equals(oldDisk.getQuotaId(), diskImage.getQuotaId())) { getImageStorageDomainMapDao().updateQuotaForImageAndSnapshots(diskImage.getId(), diskImage.getStorageIds().get(0), diskImage.getQuotaId()); } } }
Source:
<code>public static boolean isSudoAccessNeededForHostCertRotation(ClouderaManagerRepo clouderaManagerRepoDetails) { LOGGER.info("ClouderaManagerRepo is compared for Host certs rotation Sudo access"); <START> return isVersionOlderThanLimited(clouderaManagerRepoDetails::getVersion, CLOUDERAMANAGER_VERSION_7_2_3) || <END> isVersionNewerOrEqualThanLimited(clouderaManagerRepoDetails::getVersion, CLOUDERAMANAGER_VERSION_7_1_0); }</code><technical_language>condition, it</technical_language>

Target:
public static boolean isSudoAccessNeededForHostCertRotation(ClouderaManagerRepo clouderaManagerRepoDetails) { LOGGER.info("ClouderaManagerRepo is compared for Host certs rotation Sudo access"); return isVersionOlderThanLimited(clouderaManagerRepoDetails::getVersion, CLOUDERAMANAGER_VERSION_7_2_3); }
Source:
<code>private void printAnyOperator(Function function, SymbolPrinterContext context) { List<Symbol> args = function.arguments(); <START> assert args.size() == 2 || args.size() == 3 : "function's number of arguments must be 2"; <END> context.builder.append(PAREN_OPEN); args.get(0).accept(this, context); boolean ignoreCase = extractIgnoreCase(function); String functionName = function.info().ident().name(); String operatorName = caseSensitiveOperatorName(anyOperatorName(functionName), ignoreCase); context.builder .append(WS) .append(operatorName) .append(WS); context.builder.append(ANY).append(PAREN_OPEN); args.get(1).accept(this, context); context.builder.append(PAREN_CLOSE) .append(PAREN_CLOSE); }</code><technical_language>assertion message fit anymore</technical_language>

Target:
private void printAnyOperator(Function function, SymbolPrinterContext context) { List<Symbol> args = function.arguments(); assert args.size() == 2 || args.size() == 3 : "function's number of arguments must be 2, or 3"; context.builder.append(PAREN_OPEN); args.get(0).accept(this, context); boolean ignoreCase = extractIgnoreCase(function); String functionName = function.info().ident().name(); String operatorName = caseSensitiveOperatorName(anyOperatorName(functionName), ignoreCase); context.builder .append(WS) .append(operatorName) .append(WS); context.builder.append(ANY).append(PAREN_OPEN); args.get(1).accept(this, context); context.builder.append(PAREN_CLOSE) .append(PAREN_CLOSE); }
Source:
<code>protected List<Resolver<Account>> getResolvers(Config config) throws ServletException { List<String> locations = null; String val = config.get(ACCOUNT_RESOLVER_LOCATIONS); if (Strings.hasText(val)) { String[] locs = Strings.split(val); locations = Arrays.asList(locs); } Assert.notEmpty(locations, "At least one " + ACCOUNT_RESOLVER_LOCATIONS + " must be specified."); assert locations != null; Map<String, Resolver> resolverMap = config.getInstances(ACCOUNT_RESOLVER_PROPERTY_PREFIX, Resolver.class); List<Resolver<Account>> resolvers = new ArrayList<Resolver<Account>>(resolverMap.size()); for (String location : locations) { Resolver resolver = resolverMap.get(location); Assert.notNull(resolver, "There is no configured Account Resolver named " + location); Resolver<Account> accountResolver = (Resolver<Account>) resolver; resolvers.add(accountResolver); } <START> return java.util.Collections.unmodifiableList(resolvers); <END> }</code><technical_language>Change import fully qualified class name</technical_language>

Target:
protected List<Resolver<Account>> getResolvers(Config config) throws ServletException { List<String> locations = null; String val = config.get(ACCOUNT_RESOLVER_LOCATIONS); if (Strings.hasText(val)) { String[] locs = Strings.split(val); locations = Arrays.asList(locs); } Assert.notEmpty(locations, "At least one " + ACCOUNT_RESOLVER_LOCATIONS + " must be specified."); assert locations != null; Map<String, Resolver> resolverMap = config.getInstances(ACCOUNT_RESOLVER_PROPERTY_PREFIX, Resolver.class); List<Resolver<Account>> resolvers = new ArrayList<Resolver<Account>>(resolverMap.size()); for (String location : locations) { Resolver resolver = resolverMap.get(location); Assert.notNull(resolver, "There is no configured Account Resolver named " + location); Resolver<Account> accountResolver = (Resolver<Account>) resolver; resolvers.add(accountResolver); } return Collections.unmodifiableList(resolvers); }
Source:
<code>public MobilePreviewEditModePageObject openMobilePreview(String articleName) { EditMode editMode = new ArticlePageObject().open(articleName).navigateToArticleEditPage(); <START> editMode.mobilePreviewArticle(); <END> wait.forElementVisible(previewModal); driver.switchTo().frame(mobilePreviewIframe); return this; }</code><technical_language>editMode is once, please this: > new ArticlePageObject() > .open(articleName) > .navigateToArticleEditPage() > .mobilePreviewArticle();</technical_language>

Target:
public MobilePreviewEditModePageObject openMobilePreview(String articleName) { new ArticlePageObject() .open(articleName) .navigateToArticleEditPage() .openMobilePreviewArticle(); wait.forElementVisible(previewModal); driver.switchTo().frame(mobilePreviewIframe); return this; }
Source:
<code>public void setup() { <START> MockitoAnnotations.initMocks(this); <END> msgUtil = Mockito.mock(ErrorMessageUtil.class); Mockito.when(msgUtil.getMessage(ArgumentMatchers.eq("listing.duplicateIcsSource"), ArgumentMatchers.anyString())) .thenAnswer(i -> String.format(ERR_MSG, i.getArgument(1), "")); reviewer = new IcsSourceDuplicateReviewer(msgUtil); }</code><technical_language>above. I note other instances</technical_language>

Target:
public void setup() { msgUtil = Mockito.mock(ErrorMessageUtil.class); Mockito.when(msgUtil.getMessage(ArgumentMatchers.eq("listing.duplicateIcsSource"), ArgumentMatchers.anyString())) .thenAnswer(i -> String.format(ERR_MSG, i.getArgument(1), "")); reviewer = new IcsSourceDuplicateReviewer(msgUtil); }
Source:
<code>public void dispose() { for (Entry<Integer, ImageMosaicReader> element : readers.entrySet()) { <START> element.getValue().dispose(); <END> } readers.clear(); }</code><technical_language>wrap this is try/catch dispose readers in case of failure</technical_language>

Target:
public void dispose() { for (Entry<Integer, ImageMosaicReader> element : readers.entrySet()) { try { element.getValue().dispose(); } catch (Exception e) { if (LOGGER.isLoggable(Level.FINE)) LOGGER.log(Level.FINE, e.getLocalizedMessage(), e); } } readers.clear(); }
Source:
<code>void unpark() { <START> if (unsafe.compareAndSwapInt(this, parkedOffset, 0, 2)) { <END> return; } LockSupport.unpark(thread); }</code><technical_language>I if check time if yielded... spinning a lot, delay thread termination (which is this is primarily for) much. OTOH, nanoTime() is effectively acting onSpinWait() in this case; total time spent spinning significantly higher version of loop this call... anyway</technical_language>

Target:
void unpark() { if (unsafe.compareAndSwapInt(this, parkedOffset, STATE_NORMAL, STATE_UNPARKED)) { return; } LockSupport.unpark(thread); }
Source:
<code>public String runTask(StressBenchConfig config, ArrayList<String> args, RunTaskContext runTaskContext) throws Exception { LOG.info("Args: {}", args); <START> System.out.println("Running here "+ args); <END> List<String> command = new ArrayList<>(3 + config.getArgs().size()); command.add(ServerConfiguration.get(PropertyKey.HOME) + "/bin/alluxio"); command.add("runClass"); command.add(config.getClassName()); command.addAll(config.getArgs()); command.add(BaseParameters.DISTRIBUTED_FLAG); command.add(BaseParameters.IN_PROCESS_FLAG); if (config.getArgs().stream().noneMatch((s) -> s.equals(BaseParameters.START_MS_FLAG))) { command.add(BaseParameters.START_MS_FLAG); command.add(Long.toString((System.currentTimeMillis() + 5000))); } command.addAll(args); LOG.info("running command: " + String.join(" ", command)); System.out.println("Commands here "+ command); String output = ShellUtils.execCommand(command.toArray(new String[0])); return output; }</code><technical_language>remove this our.println</technical_language>

Target:
public String runTask(StressBenchConfig config, ArrayList<String> args, RunTaskContext runTaskContext) throws Exception { List<String> command = new ArrayList<>(3 + config.getArgs().size()); command.add(ServerConfiguration.get(PropertyKey.HOME) + "/bin/alluxio"); command.add("runClass"); command.add(config.getClassName()); command.addAll(config.getArgs()); command.add(BaseParameters.DISTRIBUTED_FLAG); command.add(BaseParameters.IN_PROCESS_FLAG); if (config.getArgs().stream().noneMatch((s) -> s.equals(BaseParameters.START_MS_FLAG))) { command.add(BaseParameters.START_MS_FLAG); command.add(Long.toString((System.currentTimeMillis() + config.getStartDelayMs()))); } command.addAll(args); LOG.info("running command: " + String.join(" ", command)); String output = ShellUtils.execCommand(command.toArray(new String[0])); return output; }
Source:
<code>public void onApplicationEvent(ApplicationEvent event) { if (event instanceof ContextRefreshedEvent) { this.applicationContext = ((ContextRefreshedEvent) event).getApplicationContext(); if (this.zkConnection.isConnected()) { requestLeadership(this.zkConnection.getClient()); if (this.applicationContext.equals(((ContextRefreshedEvent) event).getApplicationContext())) { registerWithZooKeeper(zkConnection.getClient()); } } this.zkConnection.addListener(connectionListener); } else if (event instanceof ContextStoppedEvent) { if (this.leaderSelector != null) { this.leaderSelector.close(); } } else if (event instanceof EmbeddedServletContainerInitializedEvent) { String namespace = ((EmbeddedServletContainerInitializedEvent) event).getApplicationContext().getNamespace(); int port = ((EmbeddedServletContainerInitializedEvent) event).getEmbeddedServletContainer().getPort(); if (MGMT_CONTEXT_NAMESPACE.equals(namespace)) { <START> runtimeAttributes.setManagementPort(port); <END> } else { runtimeAttributes.setPort(port); } if (zkConnection.isConnected() && runtimeRepository.exists(runtimeAttributes.getId())) { runtimeRepository.update(new ContainerRuntime(runtimeAttributes.getId(), runtimeAttributes)); } } }</code><technical_language>In ContainerRegistar (where this code originated), updates runtimeAttributes performed in a synchronized block protect thread updating attributes while another writes ZK</technical_language>

Target:
public void onApplicationEvent(ApplicationEvent event) { if (event instanceof ContextRefreshedEvent) { this.applicationContext = ((ContextRefreshedEvent) event).getApplicationContext(); if (this.zkConnection.isConnected()) { if (this.applicationContext.equals(((ContextRefreshedEvent) event).getApplicationContext())) { registerWithZooKeeper(zkConnection.getClient()); } requestLeadership(this.zkConnection.getClient()); } this.zkConnection.addListener(connectionListener); } else if (event instanceof ContextStoppedEvent) { if (this.leaderSelector != null) { this.leaderSelector.close(); } } else if (event instanceof EmbeddedServletContainerInitializedEvent) { String namespace = ((EmbeddedServletContainerInitializedEvent) event).getApplicationContext().getNamespace(); int port = ((EmbeddedServletContainerInitializedEvent) event).getEmbeddedServletContainer().getPort(); synchronized (adminAttributes) { if (MGMT_CONTEXT_NAMESPACE.equals(namespace)) { adminAttributes.setManagementPort(port); } else { adminAttributes.setPort(port); } if (zkConnection.isConnected() && adminRepository.exists(adminAttributes.getId())) { adminRepository.update(new Admin(adminAttributes.getId(), adminAttributes)); } } } }
Source:
<code>public void setRestoreToRemoteUser(String username, String password) { this.username = username; this.password = password; <START> String domain = PropertyManager.instance().getSingularProperty("cc_user_domain"); <END> this.qualifiedUsername = username + "@" + domain; mRestoreStrategySet = true; }</code><technical_language>I thought a more centralized location do this addition in code days, is true? (I done a cli change merged yet)</technical_language>

Target:
public void setRestoreToRemoteUser(String username, String password) { this.username = username; this.password = password; String domain = mPlatform.getPropertyManager().getSingularProperty("cc_user_domain"); this.qualifiedUsername = username + "@" + domain; mRestoreStrategySet = true; }
Source:
<code>public boolean runForSingleConnectionInHost(storage_domains storageDomain, Guid storagePoolId, int type) { storage_pool pool = DbFacade.getInstance().getStoragePoolDao().get(storagePoolId); if (pool.getspm_vds_id() != null) { return runConnectionStorageToDomain(storageDomain, pool.getspm_vds_id().getValue(), type); <START> } else { <END> log.errorFormat("Pool {0} does not have spm vds id to connect storage to domain.", pool.getname()); return false; } }</code><technical_language>return terminates if - remove else</technical_language>

Target:
public boolean runForSingleConnectionInHost(storage_domains storageDomain, Guid storagePoolId, int type) { storage_pool pool = DbFacade.getInstance().getStoragePoolDao().get(storagePoolId); if (pool.getspm_vds_id() == null) { log.errorFormat("Pool {0} does not have spm vds id to connect storage to domain.", pool.getname()); return false; } return runConnectionStorageToDomain(storageDomain, pool.getspm_vds_id().getValue(), type); }
Source:
<code>public String putBlob(final String containerName, final Blob blob) throws IOException { String blobKey = blob.getMetadata().getName(); Payload payload = blob.getPayload(); filesystemContainerNameValidator.validate(containerName); filesystemBlobKeyValidator.validate(blobKey); File outputFile = getFileForBlobKey(containerName, blobKey); HashingInputStream his = null; try { Files.createParentDirs(outputFile); his = new HashingInputStream(Hashing.md5(), payload.openStream()); Files.asByteSink(outputFile).writeFrom(his); HashCode actualHashCode = his.hash(); byte[] expectedHashCodeBytes = payload.getContentMetadata().getContentMD5(); if (expectedHashCodeBytes != null) { HashCode expectedHashCode = HashCode.fromBytes(expectedHashCodeBytes); if (!actualHashCode.equals(expectedHashCode)) { throw new IOException("MD5 hash code mismatch, actual: " + actualHashCode + " expected: " + expectedHashCode); } } byte[] actualHashCodeBytes = actualHashCode.asBytes(); <START> payload.getContentMetadata().setContentMD5(actualHashCodeBytes); <END> return base16().lowerCase().encode(actualHashCodeBytes); } catch (IOException ex) { if (outputFile != null) { if (!outputFile.delete()) { logger.debug("Could not delete %s", outputFile); } } throw ex; } finally { Closeables.closeQuietly(his); payload.release(); } }</code><technical_language>Do need this if actualHashCode.equals(expectedHashCode)? guarantee payload.getContentMetadata().getContentMD5() = expectedHashCodeBytes == actualHashCode.asBytes()</technical_language>

Target:
public String putBlob(final String containerName, final Blob blob) throws IOException { String blobKey = blob.getMetadata().getName(); Payload payload = blob.getPayload(); filesystemContainerNameValidator.validate(containerName); filesystemBlobKeyValidator.validate(blobKey); File outputFile = getFileForBlobKey(containerName, blobKey); HashingInputStream his = null; try { Files.createParentDirs(outputFile); his = new HashingInputStream(Hashing.md5(), payload.openStream()); Files.asByteSink(outputFile).writeFrom(his); HashCode actualHashCode = his.hash(); HashCode expectedHashCode = payload.getContentMetadata().getContentMD5AsHashCode(); if (expectedHashCode != null && !actualHashCode.equals(expectedHashCode)) { throw new IOException("MD5 hash code mismatch, actual: " + actualHashCode + " expected: " + expectedHashCode); } payload.getContentMetadata().setContentMD5(actualHashCode); return base16().lowerCase().encode(actualHashCode.asBytes()); } catch (IOException ex) { if (outputFile != null) { if (!outputFile.delete()) { logger.debug("Could not delete %s", outputFile); } } throw ex; } finally { Closeables.closeQuietly(his); payload.release(); } }
Source:
<code>public void addValue(@Nullable Long value) { <START> fValues.add(value); <END> }</code><technical_language>Reset fLabel null clear invalid cache</technical_language>

Target:
public void addValue(@Nullable Long value) { fValues.add(value); fLabel = null; }
Source:
<code>public void onMythicMobSpawns(MythicMobSpawnEvent event) { mob = new MythicMobsMobTag(event.getMob()); <START> entity = new EntityTag(event.getEntity()); <END> location = new LocationTag(event.getLocation()); EntityTag.rememberEntity(entity.getBukkitEntity()); this.event = event; fire(event); EntityTag.forgetEntity(entity.getBukkitEntity()); }</code><technical_language>entity grabbed in context method (other fields too?)</technical_language>

Target:
public void onMythicMobSpawns(MythicMobSpawnEvent event) { mythicmob = new MythicMobsMobTag(event.getMob()); location = new LocationTag(event.getLocation()); this.event = event; EntityTag.rememberEntity(event.getEntity()); fire(event); EntityTag.forgetEntity(event.getEntity()); }
Source:
<code>public VisualizationObject(final String title, final String visualizationClassUri) { <START> this(new Content(visualizationClassUri, emptyList()), new Meta(title)); <END> }</code><technical_language>validate params</technical_language>

Target:
public VisualizationObject(final String title, final String visualizationClassUri) { this(new Content(notEmpty(visualizationClassUri), emptyList()), new Meta(notEmpty(title))); }
Source:
<code>private void doPut() throws Exception { requestParallelism = 3; successTarget = 2; mockSelectorState.set(MockSelectorState.Good); VerifiableProperties vprops = new VerifiableProperties(getNonBlockingRouterProperties()); routerConfig = new RouterConfig(vprops); mockClusterMap = new MockClusterMap(); routerMetrics = new NonBlockingRouterMetrics(mockClusterMap.getMetricRegistry()); mockServerLayout = new MockServerLayout(mockClusterMap); <START> replicasCount = mockClusterMap.getWritablePartitionIds().get(0).getReplicaIds().size(); <END> responseHandler = new ResponseHandler(mockClusterMap); networkClientFactory = new MockNetworkClientFactory(vprops, mockSelectorState, MAX_PORTS_PLAIN_TEXT, MAX_PORTS_SSL, CHECKOUT_TIMEOUT_MS, mockServerLayout, time); router = new NonBlockingRouter(routerConfig, new NonBlockingRouterMetrics(new MetricRegistry()), networkClientFactory, new LoggingNotificationSystem(), mockClusterMap, time); blobProperties = new BlobProperties(blobSize, "serviceId", "memberId", "contentType", false, Utils.Infinite_Time); userMetadata = new byte[BLOB_USER_METADATA_SIZE]; random.nextBytes(userMetadata); putContent = new byte[blobSize]; random.nextBytes(putContent); ReadableStreamChannel putChannel = new ByteBufferReadableStreamChannel(ByteBuffer.wrap(putContent)); blobIdStr = router.putBlob(blobProperties, userMetadata, putChannel).get(); router.close(); networkClient = networkClientFactory.getNetworkClient(); resetConfigsForGet(); }</code><technical_language>minor: this a bit awkward (even cluster map partition). more natural get count blob id instead</technical_language>

Target:
private void doPut() throws Exception { BlobProperties blobProperties = new BlobProperties(blobSize, "serviceId", "memberId", "contentType", false, Utils.Infinite_Time); byte[] userMetadata = new byte[10]; random.nextBytes(userMetadata); putContent = new byte[blobSize]; random.nextBytes(putContent); ReadableStreamChannel putChannel = new ByteBufferReadableStreamChannel(ByteBuffer.wrap(putContent)); blobIdStr = router.putBlob(blobProperties, userMetadata, putChannel).get(); }
Source:
<code><START> public Map<String, ExtensionVariableType> variableTypeMap(){ <END> Map<String, ExtensionVariableType> variableTypeMap = new HashMap<>(); variableTypeMap.put("boolean", new JavaObjectExtensionVariableType(Boolean.class)); variableTypeMap.put("string", new JavaObjectExtensionVariableType(String.class)); variableTypeMap.put("integer", new JavaObjectExtensionVariableType(Integer.class)); variableTypeMap.put("date", new DateExtensionVariableType(Date.class,new SimpleDateFormat(DateExtensionVariableType.defaultFormat))); return variableTypeMap; }</code><technical_language>@ryandawsonuk right.. variableTypeMap +1</technical_language>

Target:
public Map<String, VariableType> variableTypeMap(){ Map<String, VariableType> variableTypeMap = new HashMap<>(); variableTypeMap.put("boolean", new JavaObjectVariableType(Boolean.class)); variableTypeMap.put("string", new JavaObjectVariableType(String.class)); variableTypeMap.put("integer", new JavaObjectVariableType(Integer.class)); variableTypeMap.put("date", new DateVariableType(Date.class, new SimpleDateFormat(DateVariableType.defaultFormat))); return variableTypeMap; }
Source:
<code>public TaskActivity(String message, Long task, TaskActivityType activityType) { <START> this(message, new ArrayList<>(), task, activityType, 0); <END> }</code><technical_language>a task 0 actions if I recall correctly</technical_language>

Target:
public TaskActivity(String message, Long task, TaskActivityType activityType) { this(message, new ArrayList<>(), task, activityType, (TaskExecutionProgress) null); }