auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void addAndDismiss(final ReadingList readingList) { final ReadingListPage page = ReadingListDaoProxy.page(readingList, pageTitle); ReadingList.DAO.listContainsTitleAsync(readingList, page, new CallbackTask.Callback<Boolean>() { @Override public void success(Boolean contains) { if (isAdded()) { if (contains) { ((PageActivity) getActivity()) .showReadingListAddedSnackbar(getString(R.string.reading_list_already_exists), isOnboarding); } else { ((PageActivity) getActivity()) .showReadingListAddedSnackbar(TextUtils.isEmpty(readingList.getTitle()) ? getString(R.string.reading_list_added_to_unnamed) : String.format(getString(R.string.reading_list_added_to_named), readingList.getTitle()), isOnboarding); new ReadingListsFunnel(pageTitle.getSite()).logAddToList(readingList, readingLists.size(), invokeSource); ReadingList.DAO.makeListMostRecent(readingList); } } } }); ReadingList.DAO.addTitleToList(readingList, page); <START> page.savedOrSaving(); <END> dismiss(); }</code><technical_language>This is accessor I effect return is unexamined</technical_language>

Target:
private void addAndDismiss(final ReadingList readingList) { final ReadingListPage page = ReadingListDaoProxy.page(readingList, pageTitle); ReadingList.DAO.listContainsTitleAsync(readingList, page, new CallbackTask.Callback<Boolean>() { @Override public void success(Boolean contains) { if (isAdded()) { if (contains) { ((PageActivity) getActivity()) .showReadingListAddedSnackbar(getString(R.string.reading_list_already_exists), isOnboarding); } else { ((PageActivity) getActivity()) .showReadingListAddedSnackbar(TextUtils.isEmpty(readingList.getTitle()) ? getString(R.string.reading_list_added_to_unnamed) : String.format(getString(R.string.reading_list_added_to_named), readingList.getTitle()), isOnboarding); new ReadingListsFunnel(pageTitle.getSite()).logAddToList(readingList, readingLists.size(), invokeSource); ReadingList.DAO.makeListMostRecent(readingList); } } } }); L.d("filename will be: " + getBaseDir(pageTitle)); ReadingList.DAO.addTitleToList(readingList, page, getBaseDir(pageTitle)); page.savedOrSaving(); dismiss(); }
Source:
<code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { final HttpServletRequest req = (HttpServletRequest) request; if (svc.equals(req.getParameter("service"))) { final HttpServletResponse rsp = (HttpServletResponse) response; <START> nocache(rsp); <END> try { final Repository db = getRepository(req); final ByteArrayOutputStream buf = new ByteArrayOutputStream(); final PacketLineOut out = new PacketLineOut(buf); out.writeString("# service=" + svc + "\n"); out.end(); advertise(req, db, new PacketLineOutRefAdvertiser(out)); rsp.setContentType("application/x-" + svc + "-advertisement"); send(buf.toByteArray(), req, rsp); } catch (ServiceNotAuthorizedException e) { rsp.sendError(SC_UNAUTHORIZED); } catch (ServiceNotEnabledException e) { rsp.sendError(SC_FORBIDDEN); } } else { chain.doFilter(request, response); } }</code><technical_language>nocache from? services caching</technical_language>

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { final HttpServletRequest req = (HttpServletRequest) request; if (svc.equals(req.getParameter("service"))) { final HttpServletResponse rsp = (HttpServletResponse) response; try { final Repository db = getRepository(req); final ByteArrayOutputStream buf = new ByteArrayOutputStream(); final PacketLineOut out = new PacketLineOut(buf); out.writeString("# service=" + svc + "\n"); out.end(); advertise(req, db, new PacketLineOutRefAdvertiser(out)); rsp.setContentType("application/x-" + svc + "-advertisement"); send(buf.toByteArray(), req, rsp); } catch (ServiceNotAuthorizedException e) { rsp.sendError(SC_UNAUTHORIZED); } catch (ServiceNotEnabledException e) { rsp.sendError(SC_FORBIDDEN); } } else { chain.doFilter(request, response); } }
Source:
<code>public int hashCode() { <START> return Objects.hashCode(this.getConverters()); <END> }</code><technical_language>hashCode name, is in equals</technical_language>

Target:
public int hashCode() { return Objects.hash(this.getConverters(), this.getName()); }
Source:
<code>public static synchronized @Nullable SegmentStoreTableDataProvider <START> getOrCreate(ITmfTrace <END> trace, @Nullable ISegmentStoreProvider provider) { if (provider == null) { return null; } return PROVIDER_MAP.computeIfAbsent(provider, p -> { if (p instanceof IAnalysisModule) { ((IAnalysisModule) p).schedule(); } return new SegmentStoreTableDataProvider(trace, p); }); }</code><technical_language>secondary id patch merged, genevieve for scatter / is statistics</technical_language>

Target:
public static synchronized @Nullable SegmentStoreTableDataProvider getOrCreate(ITmfTrace trace, @Nullable ISegmentStoreProvider provider) { if (provider == null) { return null; } return PROVIDER_MAP.computeIfAbsent(provider, p -> { if (p instanceof IAnalysisModule) { ((IAnalysisModule) p).schedule(); } return new SegmentStoreTableDataProvider(trace, p, ID); }); }
Source:
<code>public void done(CarbonMessage carbonMessage) { if (carbonMessage.getProperty(JMSConstants.JMS_MESSAGE_DELIVERY_STATUS).toString() .equalsIgnoreCase(JMSConstants.JMS_MESSAGE_DELIVERY_SUCCESS)) { try { message.acknowledge(); } catch (JMSException e) { <START> logger.error("Error while acknowledging the message. " + e.getMessage(), e); <END> throw new RuntimeException("Error while acknowledging the message. " + e.getMessage(), e); } } else { try { session.recover(); } catch (JMSException e) { logger.error("Error while recovering the session. " + e.getMessage(), e); throw new RuntimeException("Error while recovering the session. " + e.getMessage(), e); } } }</code><technical_language>1. Do need include e.getMessage passing exception argument? 2. Also, do need do logging throwing? This result in exception printed in more log locations</technical_language>

Target:
public void done(CarbonMessage carbonMessage) { if (carbonMessage.getProperty(JMSConstants.JMS_MESSAGE_DELIVERY_STATUS).toString() .equalsIgnoreCase(JMSConstants.JMS_MESSAGE_DELIVERY_SUCCESS)) { try { message.acknowledge(); } catch (JMSException e) { throw new RuntimeException("Error while acknowledging the message. ", e); } } else { try { session.recover(); } catch (JMSException e) { throw new RuntimeException("Error while recovering the session. ", e); } } }
Source:
<code>private static Map<String, List<JsonNode>> removeDuplicates( Map<String, List<JsonNode>> subClasses) { List<String> ids = new ArrayList<>(subClasses.keySet()); Collections.sort(ids, Comparator.comparingInt(s -> Integer .parseInt(s.substring("<LINK_0>".length())))); <START> for (int i = 0; i < ids.size(); i++) { <END> String key = ids.get(i); final int j = i + 1; subClasses.put(key, subClasses.get(key).stream() .filter(unique(subClasses, ids, j)).collect(Collectors.toList())); } return subClasses; }</code><technical_language>"<LINK_0>" is multiple times a static final</technical_language>

Target:
private static Map<String, List<JsonNode>> removeDuplicates( Map<String, List<JsonNode>> subClasses) { List<String> ids = new ArrayList<>(subClasses.keySet()); Collections.sort(ids, Comparator.comparingInt( s -> Integer.parseInt(s.substring((NWBIB_SPATIAL + "Q").length())))); for (int i = 0; i < ids.size(); i++) { String key = ids.get(i); final int j = i + 1; subClasses.put(key, subClasses.get(key).stream() .filter(unique(subClasses, ids, j)).collect(Collectors.toList())); } return subClasses; }
Source:
<code>public CompletionStage<PreparedStatement> process( PrepareRequest request, DefaultSession session, InternalDriverContext context, String sessionLogPrefix) { try { return cache.get( <START> request, <END> () -> new CqlPrepareHandler(request, session, context, sessionLogPrefix).handle()); } catch (ExecutionException e) { return CompletableFutures.failedFuture(e.getCause()); } }</code><technical_language>this is PrepareRequest entry key. I added equals/hashCode implementations appropriate, a quick implementations shows DefaultPrepareRequest.equals() call SimpleStatement.equals(), DefaultSimpleStatement.equals() a complex equals method compares more query string. This lead a situation non-equal SimpleStatement instances sharing query string generate cache entries. Is this a problem</technical_language>

Target:
public CompletionStage<PreparedStatement> process( PrepareRequest request, DefaultSession session, InternalDriverContext context, String sessionLogPrefix) { try { CompletableFuture<PreparedStatement> result = cache.getIfPresent(request); if (result == null) { CompletableFuture<PreparedStatement> mine = new CompletableFuture<>(); result = cache.get(request, () -> mine); if (result == mine) { new CqlPrepareHandler(request, session, context, sessionLogPrefix) .handle() .whenComplete( (preparedStatement, error) -> { if (error != null) { mine.completeExceptionally(error); cache.invalidate(request); } else { mine.complete(preparedStatement); } }); } } return result; } catch (ExecutionException e) { return CompletableFutures.failedFuture(e.getCause()); } }
Source:
<code>public MiniSet(T... entries) { if (entries.length == 0) { } else if (entries.length == 1) { holder = entries[0]; if (holder == null) throw new IllegalArgumentException(); type = Type.SINGLE; } else if (entries.length < ARRAY_SIZE) { Object[] array = new Object[ARRAY_SIZE]; for (int i = 0; i < ARRAY_SIZE; ++i) { if (i > entries.length) break; if (entries[i] == null) throw new IllegalArgumentException(); <START> array[i] = entries[i]; <END> } holder = array; type = Type.ARRAY; } else { Map<T, Object> map = new HashMap<>(); for (T entry : entries) { if (entry == null) throw new IllegalArgumentException(); map.put(entry, DUMMY); } holder = map; type = Type.MAP; } }</code><technical_language>removing duplicated entries..</technical_language>

Target:
public MiniSet(T... entries) { if (entries.length == 0) { type = Type.EMPTY; } else if (entries.length == 1) { holder = entries[0]; if (holder == null) throw new IllegalArgumentException(); type = Type.SINGLE; } else if (entries.length < ARRAY_SIZE) { holder = new Object[ARRAY_SIZE]; type = Type.ARRAY; for (T entry : entries) { add(entry); } } else { Map<T, Object> map = new HashMap<>(); for (T entry : entries) { if (entry == null) throw new IllegalArgumentException(); map.put(entry, DUMMY); } holder = map; type = Type.MAP; } }
Source:
<code>public static void startOrRestartServer(final IServer liveReloadServer, final int timeout, final TimeUnit unit) throws TimeoutException, InterruptedException, ExecutionException { Future<?> future = Executors.newSingleThreadExecutor().submit(new Runnable() { @Override public void run() { try { if (liveReloadServer.getServerState() == IServer.STATE_STARTED && liveReloadServer.getServerRestartState()) { Logger.info("Restarting the server {}", liveReloadServer.getName()); liveReloadServer.restart(ILaunchManager.RUN_MODE, new NullProgressMonitor()); } else if (liveReloadServer.getServerState() == IServer.STATE_STOPPED) { Logger.info("Starting the server {}", liveReloadServer.getName()); liveReloadServer.start(ILaunchManager.RUN_MODE, new NullProgressMonitor()); } while (liveReloadServer.getServerState() != IServer.STATE_STARTED) { <START> Thread.sleep(500); <END> } } catch (Exception e) { Logger.error("Failed (re)start Livereload Server", e); } } }); future.get(timeout, unit); }</code><technical_language>if server start ? i.e. port is in ? this loop forever.</technical_language>

Target:
public static void startOrRestartServer(final IServer liveReloadServer, final int timeout, final TimeUnit unit) throws TimeoutException, InterruptedException, ExecutionException { Future<?> future = Executors.newSingleThreadExecutor().submit(new Runnable() { @Override public void run() { try { final Long limitTime = System.currentTimeMillis() + TimeUnit.MILLISECONDS.convert(timeout, unit); if (liveReloadServer.getServerState() == IServer.STATE_STARTED && liveReloadServer.getServerRestartState()) { Logger.info("Restarting the server {}", liveReloadServer.getName()); liveReloadServer.restart(ILaunchManager.RUN_MODE, new NullProgressMonitor()); } else if (liveReloadServer.getServerState() == IServer.STATE_STOPPED) { Logger.info("Starting the server {}", liveReloadServer.getName()); liveReloadServer.start(ILaunchManager.RUN_MODE, new NullProgressMonitor()); } while (liveReloadServer.getServerState() != IServer.STATE_STARTED && System.currentTimeMillis() < limitTime) { TimeUnit.MILLISECONDS.sleep(500); } } catch (Exception e) { Logger.error("Failed (re)start Livereload Server", e); } } }); future.get(timeout, unit); }
Source:
<code>private boolean impl$addNewOfferToTempMap(MerchantOffers merchantOffers, MerchantOffer offer) { if ((Object) this instanceof VillagerEntity) { <START> return this.impl$newOffers.add(offer); <END> } return merchantOffers.add(offer); }</code><technical_language>this, if logic is specific VillagerEntity, overridden in mixin</technical_language>

Target:
protected boolean impl$addNewOfferToTempMap(MerchantOffers merchantOffers, MerchantOffer offer) { return merchantOffers.add(offer); }
Source:
<code><START> protected List<DiskImage> getSnappableVmDisks() { <END> if (!getParameters().getDiskIdsToIgnoreInChecks().isEmpty()) { return Collections.EMPTY_LIST; } List<Disk> disks = getDiskDao().getAllForVm(getVm().getId()); return ImagesHandler.filterImageDisks(disks, false, true, false); }</code><technical_language>future work: * avoid confusion of method usage, consider renaming like: 'getSnappableVmDisksForStorageChecks'. * remove unneeded 'getDiskIdsToIgnoreInChecks' list replace some flag (as discussed...)</technical_language>

Target:
protected List<DiskImage> getSnappableVmDisks() { if (!getParameters().getDiskIdsToIgnoreInChecks().isEmpty()) { return Collections.emptyList(); } List<Disk> disks = getDiskDao().getAllForVm(getVm().getId()); return ImagesHandler.filterImageDisks(disks, false, true, false); }
Source:
<code>public TrackingToken fetchToken(String processorName, int segment) throws UnableToClaimTokenException { RedisTokenEntry redisTokenEntry = redisTokenRepository.fetchTokenEntry(processorName, segment, nodeId, clock.instant(), clock.instant().minus(claimTimeout)); if(redisTokenEntry != null) { return redisTokenEntry.getToken(serializer); } else { <START> throw new UnableToClaimTokenException("Unable to claim token."); <END> } }</code><technical_language>suggest expanding exception a little, currently holding token adding processorName/segment</technical_language>

Target:
public TrackingToken fetchToken(String processorName, int segment) throws UnableToClaimTokenException { RedisTokenEntry redisTokenEntry = redisTokenRepository.fetchTokenEntry(processorName, segment, nodeId, clock.instant(), clock.instant().minus(claimTimeout)); if(redisTokenEntry != null) { if(!nodeId.equals(redisTokenEntry.getOwner())) { throw new UnableToClaimTokenException( format("Unable to claim token '%s[%s]'. It is owned by '%s'", processorName, segment, redisTokenEntry.getOwner())); } return redisTokenEntry.getToken(serializer); } else { throw new UnableToClaimTokenException(format("Unable to claim token '%s[%s]'.", processorName, segment)); } }
Source:
<code><START> private List<ProducerBatch> getChildrenProducerBatch() { <END> if (childrenProducerBatch == null) { return Collections.emptyList(); } return childrenProducerBatch; }</code><technical_language>If get rid of null check, addChildrenProducerBatch getChildrenProducerBatch removed well</technical_language>

Target:
private synchronized List<ProducerBatch> getChildrenProducerBatch() { if (childrenProducerBatch == null) { return Collections.emptyList(); } return childrenProducerBatch; }
Source:
<code>protected PreparedStatement getPreparedStatement(String query) throws SQLException { <START> return (connection.prepareStatement(query)); <END> }</code><technical_language>Unnecessary parenthesis</technical_language>

Target:
protected PreparedStatement getPreparedStatement(String query) throws SQLException { return connection.prepareStatement(query); }
Source:
<code>public static Map<String, Object> readAttributesForPreservation(Path path) throws IOException { Map<String, Object> attrs = new HashMap<>(); if (Files.exists(path)) { Set<String> supportedViews = path.getFileSystem().supportedFileAttributeViews(); if (supportedViews.contains("posix")) { attrs.putAll(Files.readAttributes(path, "posix:permissions") <START> .entrySet().stream().collect(Collectors.toMap(e -> "posix:" + e.getKey(), e -> e.getValue()))); <END> } if (supportedViews.contains("dos")) { attrs.putAll(Files.readAttributes(path, "dos:readonly,hidden,archive,system") .entrySet().stream().collect(Collectors.toMap(e -> "dos:" + e.getKey(), e -> e.getValue()))); } if (supportedViews.contains("acl")) { attrs.putAll(Files.readAttributes(path, "acl:acl") .entrySet().stream().collect(Collectors.toMap(e -> "acl:" + e.getKey(), e -> e.getValue()))); } } return attrs; }</code><technical_language>For code this please traditional for loops / iterators iterate values in collection. This is a command line tool a big deal in this case try avoid streams for collection iteration a number of classes defined / instantiated contributing overhead of application server</technical_language>

Target:
public static Map<String, Object> readAttributesForPreservation(Path path) throws IOException { Map<String, Object> attrs = new HashMap<>(); if (Files.exists(path)) { Set<String> supportedViews = path.getFileSystem().supportedFileAttributeViews(); if (supportedViews.contains("posix")) { readAttributesForView(path, "posix:", "posix:permissions", attrs); } if (supportedViews.contains("dos")) { readAttributesForView(path, "dos:", "dos:readonly,hidden,archive,system", attrs); } if (supportedViews.contains("acl")) { readAttributesForView(path, "acl:", "acl:acl", attrs); } } return attrs; }
Source:
<code>public Work<?> addPage(Page page) { <START> Work<?> work = hash.addPage(page); <END> return work; }</code><technical_language>inline: java return hash.addPage(page);</technical_language>

Target:
public Work<?> addPage(Page page) { return hash.addPage(page); }
Source:
<code>public static String fromBase64(String base64) { if (base64 == null) { return null; } try { <START> base64 = base64.replaceAll("[\\t\\n\\r ]", ""); <END> return new String(Base64.getDecoder().decode(base64.getBytes(UTF_8)), UTF_8); } catch (IllegalArgumentException e) { return null; } }</code><technical_language>\s is better: docs > \s A whitespace character: [ \t\n\x0B\f\r]</technical_language>

Target:
public static ByteString fromBase64(String base64) { try { base64 = FROM_BASE64_REGEXP.matcher(base64).replaceAll(""); return new ByteString(Base64.getDecoder().decode(base64)); } catch (IllegalArgumentException e) { return null; } }
Source:
<code>public String getServiceUrl() throws MalformedURLException { String context = getContext(); if ("HIVE".equals(getServiceName())) { return String.format(Locale.ROOT, "jdbc:hive2://%s:%d/;?hive.server2.transport.mode=http;hive.server2.thrift.http.path=/%s/%s%s", request.getServerName(), request.getServerPort(), gatewayPath, topologyName, context); } else { final String backendUrlString = getBackendServiceUrl(); if (context.indexOf("{{BACKEND_HOST}}") > -1) { context = context.replace("{{BACKEND_HOST}}", backendUrlString); } <START> if (context.indexOf("{{SCHEME}}") > -1 || context.indexOf("{{HOST}}") > -1 || context.indexOf("{{PORT}}") > -1) { final URL backendUrl = new URL(backendUrlString); if (context.indexOf("{{SCHEME}}") > -1) { context = context.replace("{{SCHEME}}", backendUrl.getProtocol()); } if (context.indexOf("{{HOST}}") > -1) { context = context.replace("{{HOST}}", backendUrl.getHost()); } if (context.indexOf("{{PORT}}") > -1) { context = context.replace("{{PORT}}", String.valueOf(backendUrl.getPort())); } <END> } return String.format(Locale.ROOT, "%s://%s:%s/%s/%s%s", request.getScheme(), request.getServerName(), request.getServerPort(), gatewayPath, topologyName, context); } }</code><technical_language>need double checks? do context.replace(...) if match replace? strings super short. slower do a check replace anyway</technical_language>

Target:
public String getServiceUrl() throws MalformedURLException { String context = getContext(); if ("HIVE".equals(getServiceName())) { return String.format(Locale.ROOT, "jdbc:hive2://%s:%d/;?hive.server2.transport.mode=http;hive.server2.thrift.http.path=/%s/%s%s", request.getServerName(), request.getServerPort(), gatewayPath, topologyName, context); } else { final String backendUrlString = getBackendServiceUrl(); if (context.indexOf("{{BACKEND_HOST}}") > -1) { context = context.replace("{{BACKEND_HOST}}", backendUrlString); } if (context.indexOf("{{SCHEME}}") > -1 || context.indexOf("{{HOST}}") > -1 || context.indexOf("{{PORT}}") > -1) { final URL backendUrl = new URL(backendUrlString); context = context.replace("{{SCHEME}}", backendUrl.getProtocol()); context = context.replace("{{HOST}}", backendUrl.getHost()); context = context.replace("{{PORT}}", String.valueOf(backendUrl.getPort())); } return String.format(Locale.ROOT, "%s://%s:%s/%s/%s%s", request.getScheme(), request.getServerName(), request.getServerPort(), gatewayPath, topologyName, context); } }
Source:
<code>private Text decode(final String text, final boolean decode) { <START> if (text.isBlank()) <END> return null; return decode ? new Text(Base64.getDecoder().decode(text)) : new Text(text); }</code><technical_language>if callers pass non-null, if callers careful, this null. verify with: suggestion if (requireNonNull(text).isBlank()) (with a static import of Objects.requireNonNull)</technical_language>

Target:
private Text decode(final String text, final boolean decode) { if (requireNonNull(text).isBlank()) return null; return decode ? new Text(Base64.getDecoder().decode(text)) : new Text(text); }
Source:
<code>public String getDisplayName() { <START> return this.name; <END> }</code><technical_language>return getName() nicer</technical_language>

Target:
public String getDisplayName() { return getName(); }
Source:
<code>private void clearBitmap(){ if(mSignatureBitmapCanvas != null){ mSignatureBitmapCanvas.setBitmap(null); mSignatureBitmapCanvas = null; } if(mSignatureBitmap != null){ if(!mSignatureBitmap.isRecycled()) { mSignatureBitmap.recycle(); } mSignatureBitmap = null; } <START> System.gc(); <END> }</code><technical_language><LINK_0></technical_language>

Target:
public void clearBitmap(){ if(mSignatureBitmapCanvas != null){ mSignatureBitmapCanvas.setBitmap(null); mSignatureBitmapCanvas = null; } if(mSignatureBitmap != null){ if(!mSignatureBitmap.isRecycled()) { mSignatureBitmap.recycle(); } mSignatureBitmap = null; } System.gc(); }
Source:
<code>public static void setUp() throws Exception { final String key = System.getProperty("failsafe.github.key"); Assume.assumeThat(key, Matchers.notNullValue()); final Github github = new RtGithub(key); repos = github.repos(); repo = repos.create( <START> new Repos.NewRepoSettings( <END> RandomStringUtils.randomAlphanumeric(Tv.TEN), false ).withAutoInit(true) ); }</code><technical_language>@cvrebert add a constructor for this common case of 10 random alphanumeric characters, false true</technical_language>

Target:
public static void setUp() throws Exception { final String key = System.getProperty("failsafe.github.key"); Assume.assumeThat(key, Matchers.notNullValue()); final Github github = new RtGithub(key); repos = github.repos(); repo = repos.create( new Repos.RepoCreate( RandomStringUtils.randomAlphanumeric(Tv.TEN), false ).withAutoInit(true) ); }
Source:
<code>public void setTriggerConfigURL(String triggerConfigURL) { if (triggerConfigURL == null) { if (this.triggerConfigURL != null) { this.dynamicConfigurationChangedFromLastStart = true; } } else { if (!triggerConfigURL.equals(this.triggerConfigURL)) { <START> this.dynamicConfigurationChangedFromLastStart = true; <END> } else { this.dynamicConfigurationChangedFromLastStart = false; } } this.triggerConfigURL = triggerConfigURL; }</code><technical_language>tested this works? IIRC configuring trigger a new instance is created, UI pipeline script, instance stop start calls</technical_language>

Target:
public void setTriggerConfigURL(String triggerConfigURL) { this.triggerConfigURL = triggerConfigURL; }
Source:
<code>public static Optional<HiveBucketProperty> getBucketProperty(Map<String, Object> tableProperties) { List<String> bucketedBy = getBucketedBy(tableProperties); List<HiveSortOrder> sortedBy = getSortedBy(tableProperties); int bucketCount = (Integer) tableProperties.get(BUCKET_COUNT_PROPERTY); if ((bucketedBy.isEmpty()) && (bucketCount == 0)) { if (!sortedBy.isEmpty()) { <START> throw new PrestoException(INVALID_TABLE_PROPERTY, format("%s could be specified only when %s is specified", SORTED_BY_PROPERTY, BUCKETED_BY_PROPERTY)); <END> } return Optional.empty(); } if (bucketCount < 0) { throw new PrestoException(INVALID_TABLE_PROPERTY, format("%s must be greater than zero", BUCKET_COUNT_PROPERTY)); } if (bucketedBy.isEmpty() || bucketCount == 0) { throw new PrestoException(INVALID_TABLE_PROPERTY, format("%s and %s must be specified together", BUCKETED_BY_PROPERTY, BUCKET_COUNT_PROPERTY)); } return Optional.of(new HiveBucketProperty(bucketedBy, bucketCount, sortedBy)); }</code><technical_language>></technical_language>

Target:
public static Optional<HiveBucketProperty> getBucketProperty(Map<String, Object> tableProperties) { List<String> bucketedBy = getBucketedBy(tableProperties); List<HiveSortOrder> sortedBy = getSortedBy(tableProperties); int bucketCount = (Integer) tableProperties.get(BUCKET_COUNT_PROPERTY); if ((bucketedBy.isEmpty()) && (bucketCount == 0)) { if (!sortedBy.isEmpty()) { throw new PrestoException(INVALID_TABLE_PROPERTY, format("%s may be specified only when %s is specified", SORTED_BY_PROPERTY, BUCKETED_BY_PROPERTY)); } return Optional.empty(); } if (bucketCount < 0) { throw new PrestoException(INVALID_TABLE_PROPERTY, format("%s must be greater than zero", BUCKET_COUNT_PROPERTY)); } if (bucketedBy.isEmpty() || bucketCount == 0) { throw new PrestoException(INVALID_TABLE_PROPERTY, format("%s and %s must be specified together", BUCKETED_BY_PROPERTY, BUCKET_COUNT_PROPERTY)); } return Optional.of(new HiveBucketProperty(bucketedBy, bucketCount, sortedBy)); }
Source:
<code>public boolean supports(String feature) { <START> if (properties.containsKey(feature)) { <END> return Boolean.parseBoolean(get(feature).trim()); } return false; }</code><technical_language>if (has(feature))</technical_language>

Target:
public boolean supports(String feature) { if (has(feature)) { return Boolean.parseBoolean(get(feature).trim()); } return false; }
Source:
<code>private Optional<CeTask> tryAndFindTaskToExecute() { try { <START> return queue.peek("uuid" + counter.addAndGet(100)); <END> } catch (Exception e) { LOG.error("Failed to pop the queue of analysis reports", e); } return Optional.empty(); }</code><technical_language>UUID of Worker passed method peek instead of this random</technical_language>

Target:
private Optional<CeTask> tryAndFindTaskToExecute() { try { return queue.peek(uuid); } catch (Exception e) { LOG.error("Failed to pop the queue of analysis reports", e); } return Optional.empty(); }
Source:
<code>private NumericNode getMetric(String query, String ... params) { NumericNode retVal = new IntNode(0); query = String.format(query, params); if (promUrl == null) { return retVal; } <START> CloseableHttpResponse response <END> = request(query); if (response == null) { return retVal; } if (response.getStatusLine().getStatusCode() >= 300) { String body; try { body = EntityUtils.toString(response.getEntity()); log.warn("Failed to fetch metric {}: {}", query, body); } catch (ParseException | IOException e) { log.warn("Failed to parse failed fetch metric for {}", query); } return retVal; } try { JsonNode node = mapper.readTree(EntityUtils.toByteArray(response.getEntity())); if (node.has("status")) { if (node.get("status").asText().equals("success")) { JsonNode result = node.get("data").get("result"); if (result.size() > 0) { JsonNode value = result.get(0).get("value"); return new DoubleNode(Double.parseDouble(value.get(1).asText())); } } else { log.warn("Query '{}' failed to execute: - {}", query, node.get("status"), node.get("error")); } } } catch (JsonProcessingException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } return retVal; }</code><technical_language>this class implements Closeable, wrap try (CloseableHttpResponse response = request(query)) { ... } close method called end of execution</technical_language>

Target:
private NumericNode getMetric(String query, String ... params) { NumericNode retVal = new IntNode(0); query = String.format(query, params); if (promUrl == null) { return retVal; } try (CloseableHttpResponse response = request(query)) { if (response == null) { return retVal; } if (response.getStatusLine().getStatusCode() >= 300) { String body; try { body = EntityUtils.toString(response.getEntity()); log.warn("Failed to fetch metric {}: {}", query, body); } catch (ParseException | IOException e) { log.warn("Failed to parse failed fetch metric for {}", query); } return retVal; } try { JsonNode node = mapper.readTree(EntityUtils.toByteArray(response.getEntity())); if (node.has("status")) { if (node.get("status").asText().equals("success")) { JsonNode result = node.get("data").get("result"); if (result.size() > 0) { JsonNode value = result.get(0).get("value"); return new DoubleNode(Double.parseDouble(value.get(1).asText())); } } else { log.warn("Query '{}' failed to execute: - {}", query, node.get("status"), node.get("error")); } } } catch (JsonProcessingException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } } catch (IOException e) { throw new RuntimeException(e); } return retVal; }
Source:
<code>void authorizeRoleInTree(String roleName, String resourceId, String action, boolean updateCache ) throws UserStoreException { write.lock(); try { SearchResult sr = getNode(root, PermissionTreeUtil.toComponenets(resourceId)); if (sr.getUnprocessedPaths() != null) { List<String> paths = sr.getUnprocessedPaths(); TreeNode tn = sr.getLastNode().create(paths); tn.authorizeRole(roleName, PermissionTreeUtil.actionToPermission(action)); } else { sr.getLastNode().authorizeRole(roleName, PermissionTreeUtil.actionToPermission(action)); } if (updateCache) { invalidateCache(root); } } catch (Exception e) { <START> throw new UserStoreException(e.getMessage(),e); <END> } finally { write.unlock(); } }</code><technical_language>Add context specific message e.getMessage()</technical_language>

Target:
void authorizeRoleInTree(String roleName, String resourceId, String action, boolean updateCache ) throws UserStoreException { write.lock(); try { SearchResult sr = getNode(root, PermissionTreeUtil.toComponenets(resourceId)); if (sr.getUnprocessedPaths() != null) { List<String> paths = sr.getUnprocessedPaths(); TreeNode tn = sr.getLastNode().create(paths); tn.authorizeRole(roleName, PermissionTreeUtil.actionToPermission(action)); } else { sr.getLastNode().authorizeRole(roleName, PermissionTreeUtil.actionToPermission(action)); } if (updateCache) { invalidateCache(root); } } catch (IllegalArgumentException e) { throw new UserStoreException("Error while authorizing role: " + roleName + "in permission tree for resource id: " + resourceId + "for action: " + action, e); } finally { write.unlock(); } }
Source:
<code>public List<String> getExpectedInitialColumns() { List<String> initColumns = new ArrayList<String>(); initColumns.add(COL_ID_PROCESSNAME); initColumns.add(COL_ID_PROCESSVERSION); initColumns.add(COL_ID_PROJECT); <START> initColumns.add("Actions"); <END> return initColumns; }</code><technical_language>suggestion initColumns.add(COL_ID_ACTIONS);</technical_language>

Target:
public List<String> getExpectedInitialColumns() { List<String> initColumns = new ArrayList<String>(); initColumns.add(COL_ID_PROCESSNAME); initColumns.add(COL_ID_PROCESSVERSION); initColumns.add(COL_ID_PROJECT); initColumns.add(COL_ID_ACTIONS); return initColumns; }
Source:
<code>static <T> Task<T> withSideEffect(final Callable<Task<T>> func) { <START> return Task.withSideEffect("sideEffect", func); <END> }</code><technical_language>"withSideEffect" description consistent current .withSideEffect</technical_language>

Target:
static <T> Task<Void> withSideEffect(final Callable<Task<T>> func) { return Task.withSideEffect("withSideEffect", func); }
Source:
<code>public void compare() { setUpWithJson(SAMPLE_JSON); List<Element> elements = Arrays.stream(getFeatureByName("Second feature").getElements()) .filter(Element::isScenario) .collect(Collectors.toList()); assertThat(elements.get(0)).usingComparator(new ElementComparator()).isEqualTo(elements.get(0)); assertThat(elements.get(0)).usingComparator(new ElementComparator()).isNotEqualTo(elements.get(1)); <START> assertThat(elements.get(0)).usingComparator(new ElementComparator()).isNotEqualTo(null); <END> }</code><technical_language>isNotNull()</technical_language>

Target:
public void compare() { setUpWithJson(SAMPLE_JSON); List<Element> elements = Arrays.stream(getFeatureByName("Second feature").getElements()) .filter(Element::isScenario) .collect(Collectors.toList()); assertThat(elements.get(0)).usingComparator(new ElementComparator()).isEqualTo(elements.get(0)); assertThat(elements.get(0)).usingComparator(new ElementComparator()).isNotEqualTo(elements.get(1)); assertThat(elements.get(0)).usingComparator(new ElementComparator()).isNotNull(); }
Source:
<code>public void deserializeTest() throws IOException { final DefaultObjectMapper mapper = new DefaultObjectMapper(); final ResponseContext ctx = ResponseContext.deserialize( mapper.writeValueAsString(ImmutableMap.of("ETag", "string-value", "count", 100)), mapper ); Assert.assertEquals("string-value", ctx.get(ResponseContext.Key.ETAG)); Assert.assertEquals(100, ctx.get(ResponseContext.Key.NUM_SCANNED_ROWS)); ctx.add(ResponseContext.Key.NUM_SCANNED_ROWS, 10L); <START> Assert.assertEquals(110L, ctx.get(ResponseContext.Key.NUM_SCANNED_ROWS)); <END> }</code><technical_language>Is add a similar assert for CPU_CONSUMED_NANOS</technical_language>

Target:
public void deserializeTest() throws IOException { final DefaultObjectMapper mapper = new DefaultObjectMapper(); final ResponseContext ctx = ResponseContext.deserialize( mapper.writeValueAsString( ImmutableMap.of( "ETag", "string-value", "count", 100L, "cpuConsumed", 100000L ) ), mapper ); Assert.assertEquals("string-value", ctx.get(ResponseContext.Key.ETAG)); Assert.assertEquals(100, ctx.get(ResponseContext.Key.NUM_SCANNED_ROWS)); Assert.assertEquals(100000, ctx.get(ResponseContext.Key.CPU_CONSUMED_NANOS)); ctx.add(ResponseContext.Key.NUM_SCANNED_ROWS, 10L); Assert.assertEquals(110L, ctx.get(ResponseContext.Key.NUM_SCANNED_ROWS)); ctx.add(ResponseContext.Key.CPU_CONSUMED_NANOS, 100); Assert.assertEquals(100100L, ctx.get(ResponseContext.Key.CPU_CONSUMED_NANOS)); }
Source:
<code><START> public static State forValue( <END> @NotNull(message = "ident is never NULL") final String ident ) { for (final State state : State.values()) { if (state.identifier().equalsIgnoreCase(ident)) { return state; } } throw new IllegalArgumentException( String.format("No enum value found for %s", ident) ); }</code><technical_language>@cvrebert for pass Locale.ENGLISH it..</technical_language>

Target:
public static State forValue( @NotNull(message = "ident is never NULL") final String ident ) { return State.valueOf(ident.toUpperCase(Locale.ENGLISH)); }
Source:
<code>private void announceIfEnabled(MetricAttribute metricAttribute, String metricName, String group, double value, String units) throws GangliaException { <START> if (isMetricAttributeDisabled(metricAttribute)) { <END> return; } final String string = Math.abs(value) < MIN_VAL ? "0" : Double.toString(value); announce(prefix(metricName, metricAttribute.getCode()), group, string, GMetricType.DOUBLE, units); }</code><technical_language>Please, introduce unrelated changes. focus ConsoleReporter</technical_language>

Target:
private void announceIfEnabled(MetricAttribute metricAttribute, String metricName, String group, double value, String units) throws GangliaException { if (getDisabledMetricAttributes().contains(metricAttribute)) { return; } final String string = Math.abs(value) < MIN_VAL ? "0" : Double.toString(value); announce(prefix(metricName, metricAttribute.getCode()), group, string, GMetricType.DOUBLE, units); }
Source:
<code>public void run() { <START> if (file == null) <END> return; String path = file.getFullPath().toOSString(); try { final URI uri = URI.createPlatformResourceURI(path, true); if (shouldBeAbleToLoad()) { res = set.getResource(uri, true); if (!res.getErrors().isEmpty()) { unload(); } res.load(getOptions()); } } catch (final WrappedException e) { error(path, e); } catch (final RuntimeException e) { error(path, e); } catch (final IOException e) { error(path, e); } }</code><technical_language>This checked construction (using Preconditions.checkNotNull()), throw exception if file is null. fail fast loudly point of origin of fault (here, caller provides a null IFile) silently try recover, worse, asked for do else (or nothing)</technical_language>

Target:
public void run() { String path = file.getFullPath().toOSString(); try { final URI uri = URI.createPlatformResourceURI(path, true); if (shouldBeAbleToLoad()) { res = set.getResource(uri, true); if (!res.getErrors().isEmpty()) { unload(); } res.load(getOptions()); } } catch (final RuntimeException e) { error(path, e); } catch (final IOException e) { error(path, e); } }
Source:
<code>public LocalJournal( String journalLocation, boolean asyncWritesEnabled, int maxDaysToKeepEntries ) { CheckArg.isNotNull(journalLocation, "journalLocation"); this.journalLocation = journalLocation; this.asyncWritesEnabled = asyncWritesEnabled; this.maxTimeToKeepEntriesMillis = TimeUnit.DAYS.toMillis(maxDaysToKeepEntries); this.stopped = true; <START> this.searchTimeDelta = TimeUnit.SECONDS.toMillis(1); <END> }</code><technical_language>is this magic number coming from</technical_language>

Target:
public LocalJournal( String journalLocation, boolean asyncWritesEnabled, int maxDaysToKeepEntries ) { CheckArg.isNotNull(journalLocation, "journalLocation"); this.journalLocation = journalLocation; this.asyncWritesEnabled = asyncWritesEnabled; this.maxTimeToKeepEntriesMillis = TimeUnit.DAYS.toMillis(maxDaysToKeepEntries); this.stopped = true; this.searchTimeDelta = DEFAULT_LOCAL_SEARCH_DELTA; }
Source:
<code>private void onServerEvent(ReplicaId replicaId, ServerErrorCode errorCode) { switch (errorCode) { case IO_Error: case Disk_Unavailable: clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Disk_Error); break; case Partition_ReadOnly: clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Partition_ReadOnly); clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Disk_Ok); clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Replica_Available); break; case Temporarily_Disabled: case Replica_Unavailable: clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Replica_Unavailable); <START> clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Disk_Ok); <END> break; default: clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Disk_Ok); clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Replica_Available); break; } clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Node_Response); }</code><technical_language>generate Disk_Ok for this. discuss you</technical_language>

Target:
private void onServerEvent(ReplicaId replicaId, ServerErrorCode errorCode) { switch (errorCode) { case IO_Error: case Disk_Unavailable: clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Disk_Error); break; case Partition_ReadOnly: clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Partition_ReadOnly); clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Disk_Ok); clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Replica_Available); break; case Temporarily_Disabled: case Replica_Unavailable: clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Disk_Ok); clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Replica_Unavailable); break; default: clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Disk_Ok); clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Replica_Available); break; } clusterMap.onReplicaEvent(replicaId, ReplicaEventType.Node_Response); }
Source:
<code>void addMetrics(Collection<KafkaMetric> metrics) { checkLocked(); if (!beanMetrics.isEmpty()) { unregister(); } for (KafkaMetric metric : metrics) { beanMetrics.put(metric.metricName().name(), metric); <START> } <END> register(); }</code><technical_language>assuming metrics is non-empty</technical_language>

Target:
void addMetrics(Collection<KafkaMetric> metrics) { checkLocked(); if (metrics.isEmpty()) { return; } if (!beanMetrics.isEmpty()) { unregister(); } for (KafkaMetric metric : metrics) { beanMetrics.put(metric.metricName().name(), metric); } register(); }
Source:
<code>public void visitFile(Path source, Path relativePath) { logger.info("Looking into file: ", source); String skipRegex = "\\.tmcrc|metadata\\.yml|(.*)Hidden(.*)"; if (source.getFileName().toString().matches(skipRegex)) { logger.info("Skipping file: ", source); return; } Path destination = toPath.resolve(relativePath); try { copyWithFilters(source, destination); } catch (IOException ex) { <START> throw new IllegalStateException(ex); <END> } }</code><technical_language>IOException is checked want flood throws IOException. I initially wrapped in IllegalStateException. Imo create TmcLangsRuntimeException extends RuntimeException push IOExceptions others want crash for call stack stop command</technical_language>

Target:
private void visitFile(Path source, Path relativePath) throws IOException { Path destination = toPath.resolve(relativePath); if (skipFilename(source)) { return; } if (looksLikeBinary(source)) { justCopy(source, destination); } else { copyWithFilters(source, destination); } }
Source:
<code>public void testAfterPropertiesSet_codeListIdPattern_is_notnull() throws Exception { testTarget.setCodeListIdPattern(Pattern.compile("A_.+")); testTarget.afterPropertiesSet(); List<CodeList> expectedCodeLists = new ArrayList<CodeList>(); expectedCodeLists.add(getApplicationContext().getBean( "A_simpleI18nCodeList", CodeList.class)); expectedCodeLists.add(getApplicationContext().getBean( "A_numberRangeCodeList", CodeList.class)); expectedCodeLists.add(getApplicationContext().getBean( "A_simpleMapCodeList", CodeList.class)); <START> assertThat(testTarget.getCodeLists(), is(containsInAnyOrder(expectedCodeLists.toArray()))); <END> }</code><technical_language>Is toArray required</technical_language>

Target:
public void testAfterPropertiesSet_codeListIdPattern_is_notnull() throws Exception { testTarget.setCodeListIdPattern(Pattern.compile("A_.+")); testTarget.afterPropertiesSet(); assertThat(testTarget.getCodeLists(), is(containsInAnyOrder( getApplicationContext().getBean("A_simpleI18nCodeList", CodeList.class), getApplicationContext().getBean("A_numberRangeCodeList", CodeList.class), getApplicationContext().getBean("A_simpleMapCodeList", CodeList.class)))); }
Source:
<code>public Mono<MsalToken> authenticateWithDeviceCode(TokenRequestContext request, Consumer<DeviceCodeInfo> deviceCodeConsumer) { return Mono.fromFuture(() -> { DeviceCodeFlowParameters parameters = DeviceCodeFlowParameters.builder(new HashSet<>(request.getScopes()), dc -> deviceCodeConsumer.accept(new DeviceCodeInfo(dc.userCode(), dc.deviceCode(), dc.verificationUri(), OffsetDateTime.now().plusSeconds(dc.expiresIn()), dc.message()))).build(); return getPublicClientApplication(false).acquireToken(parameters); <START> }).onErrorResume(t -> Mono.error(new ClientAuthenticationException("Failed to acquire token with device code", <END> null, t))).map(ar -> new MsalToken(ar, options)); }</code><technical_language>onErrorMap</technical_language>

Target:
public Mono<MsalToken> authenticateWithDeviceCode(TokenRequestContext request, Consumer<DeviceCodeInfo> deviceCodeConsumer) { return Mono.fromFuture(() -> { DeviceCodeFlowParameters parameters = DeviceCodeFlowParameters.builder(new HashSet<>(request.getScopes()), dc -> deviceCodeConsumer.accept(new DeviceCodeInfo(dc.userCode(), dc.deviceCode(), dc.verificationUri(), OffsetDateTime.now().plusSeconds(dc.expiresIn()), dc.message()))).build(); return getPublicClientApplication(false).acquireToken(parameters); }).onErrorMap(t -> new ClientAuthenticationException("Failed to acquire token with device code", null, t)) .map(ar -> new MsalToken(ar, options)); }
Source:
<code>public void testForceGarbageCollection() throws Exception { ServerConfiguration conf = newServerConfiguration(); conf.setGcWaitTime(60000); conf.setMinorCompactionInterval(120000); conf.setMajorCompactionInterval(240000); LedgerDirsManager dirManager = new LedgerDirsManager(conf, conf.getLedgerDirs(), new DiskChecker(conf.getDiskUsageThreshold(), conf.getDiskUsageWarnThreshold())); CheckpointSource cp = new CheckpointSource() { @Override public Checkpoint newCheckpoint() { return null; } @Override public void checkpointComplete(Checkpoint checkPoint, boolean compact) throws IOException { } }; for (File journalDir : conf.getJournalDirs()) { Bookie.checkDirectoryStructure(journalDir); } for (File dir : dirManager.getAllLedgerDirs()) { Bookie.checkDirectoryStructure(dir); } InterleavedLedgerStorage storage = new InterleavedLedgerStorage(); storage.initialize( conf, LedgerManagerFactory .newLedgerManagerFactory( conf, <START> new ZkLayoutManager( <END> zkc, conf.getZkLedgersRootPath(), ZkUtils.getACLs(conf))) .newLedgerManager(), dirManager, dirManager, cp, Checkpointer.NULL, NullStatsLogger.INSTANCE); storage.start(); long startTime = MathUtils.now(); storage.gcThread.enableForceGC(); storage.gcThread.triggerGC().get(); storage.gcThread.triggerGC().get(); assertTrue("Minor or major compaction did not trigger even on forcing.", storage.gcThread.lastMajorCompactionTime > startTime && storage.gcThread.lastMinorCompactionTime > startTime); storage.shutdown(); }</code><technical_language>try new layout manager registration manager</technical_language>

Target:
public void testForceGarbageCollection() throws Exception { ServerConfiguration conf = newServerConfiguration(); conf.setGcWaitTime(60000); conf.setMinorCompactionInterval(120000); conf.setMajorCompactionInterval(240000); LedgerDirsManager dirManager = new LedgerDirsManager(conf, conf.getLedgerDirs(), new DiskChecker(conf.getDiskUsageThreshold(), conf.getDiskUsageWarnThreshold())); CheckpointSource cp = new CheckpointSource() { @Override public Checkpoint newCheckpoint() { return null; } @Override public void checkpointComplete(Checkpoint checkPoint, boolean compact) throws IOException { } }; for (File journalDir : conf.getJournalDirs()) { Bookie.checkDirectoryStructure(journalDir); } for (File dir : dirManager.getAllLedgerDirs()) { Bookie.checkDirectoryStructure(dir); } InterleavedLedgerStorage storage = new InterleavedLedgerStorage(); storage.initialize( conf, LedgerManagerFactory .newLedgerManagerFactory( conf, RegistrationManager.instantiateRegistrationManager(conf).getLayoutManager()) .newLedgerManager(), dirManager, dirManager, null, cp, Checkpointer.NULL, NullStatsLogger.INSTANCE); storage.start(); long startTime = MathUtils.now(); storage.gcThread.enableForceGC(); storage.gcThread.triggerGC().get(); storage.gcThread.triggerGC().get(); assertTrue("Minor or major compaction did not trigger even on forcing.", storage.gcThread.lastMajorCompactionTime > startTime && storage.gcThread.lastMinorCompactionTime > startTime); storage.shutdown(); }
Source:
<code><START> public synchronized void setValue(int index, Object value) { <END> if (index < 0 || index >= size()) { throw new IndexOutOfBoundsException(); } values.set(index, value); }</code><technical_language>for avoiding putting synchronized stating in docs. another sync'd variant created builder</technical_language>

Target:
public void setValue(int index, Object value) { if (index < 0 || index >= size()) { throw new IndexOutOfBoundsException(); } values.set(index, value); }