auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private SpawnResult downloadAndFinalizeSpawnResult( ActionResult actionResult, boolean cacheHit, Spawn spawn, SpawnExecutionContext context, RemoteOutputsMode remoteOutputsMode) throws ExecException, IOException, InterruptedException { boolean spawnHasTopLevelOutputs = remoteOutputsMode.downloadToplevelOutputsOnly() && hasTopLevelOutputs(spawn.getOutputFiles(), topLevelOutputs); SpawnResult.Status actionStatus = actionResult.getExitCode() == 0 ? Status.SUCCESS : Status.NON_ZERO_EXIT; <START> RemoteOutputsMode effectiveOutputsMode; <END> if (actionStatus != Status.SUCCESS || spawnHasTopLevelOutputs) { effectiveOutputsMode = RemoteOutputsMode.ALL; } else if (remoteOutputsMode == RemoteOutputsMode.TOPLEVEL) { effectiveOutputsMode = RemoteOutputsMode.MINIMAL; } else { effectiveOutputsMode = remoteOutputsMode; } PathFragment inMemoryOutputPath = getInMemoryOutputPath(spawn); InMemoryOutput inMemoryOutput = null; switch (effectiveOutputsMode) { case MINIMAL: try (SilentCloseable c = Profiler.instance().profile(REMOTE_DOWNLOAD, "download outputs minimal")) { inMemoryOutput = remoteCache.downloadMinimal( actionResult, spawn.getOutputFiles(), inMemoryOutputPath, context.getFileOutErr(), execRoot, context.getMetadataInjector()); } break; case ALL: try (SilentCloseable c = Profiler.instance().profile(REMOTE_DOWNLOAD, "download outputs")) { remoteCache.download(actionResult, execRoot, context.getFileOutErr()); } break; default: throw new IllegalStateException("Should never reach this."); } return createSpawnResult(actionResult.getExitCode(), cacheHit, getName(), inMemoryOutput); }</code><technical_language>lines 310-319 nicely extracted a separate method: defineOutputsMode smth this</technical_language>

Target:
private SpawnResult downloadAndFinalizeSpawnResult( ActionResult actionResult, boolean cacheHit, Spawn spawn, SpawnExecutionContext context, RemoteOutputsMode remoteOutputsMode) throws ExecException, IOException, InterruptedException { boolean downloadOutputs = shouldDownloadAllSpawnOutputs(remoteOutputsMode, actionResult.getExitCode(), hasTopLevelOutputs(spawn.getOutputFiles(), topLevelOutputs)); InMemoryOutput inMemoryOutput = null; if (downloadOutputs) { try (SilentCloseable c = Profiler.instance().profile(REMOTE_DOWNLOAD, "download outputs")) { remoteCache.download(actionResult, execRoot, context.getFileOutErr()); } } else { PathFragment inMemoryOutputPath = getInMemoryOutputPath(spawn); try (SilentCloseable c = Profiler.instance().profile(REMOTE_DOWNLOAD, "download outputs minimal")) { inMemoryOutput = remoteCache.downloadMinimal( actionResult, spawn.getOutputFiles(), inMemoryOutputPath, context.getFileOutErr(), execRoot, context.getMetadataInjector()); } } return createSpawnResult(actionResult.getExitCode(), cacheHit, getName(), inMemoryOutput); }
Source:
<code>public void testTruncateInvalidTxBefore() throws Exception { Transaction tx1 = txClient.startLong(); TimeUnit.SECONDS.sleep(1); long beforeTx2 = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()); Transaction tx2 = txClient.startLong(); ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream err = new ByteArrayOutputStream(); TransactionAdmin txAdmin = new TransactionAdmin(new PrintStream(out), new PrintStream(err)); txAdmin.doMain(new String[] {"--truncate-invalid-tx-before", String.valueOf(beforeTx2)}, conf); <START> List<String> expectedOut = ImmutableList.of("Invalid list size before truncation: 0", <END> ""); List<String> expectedErr = ImmutableList.of("Transactions started earlier than " + beforeTx2 + " are in-progress", ""); Assert.assertEquals(Joiner.on("\n").join(expectedOut), Bytes.toString(out.toByteArray())); Assert.assertEquals(Joiner.on("\n").join(expectedErr), Bytes.toString(err.toByteArray())); txClient.invalidate(tx1.getWritePointer()); txClient.invalidate(tx2.getWritePointer()); out.reset(); err.reset(); txAdmin.doMain(new String[]{"--truncate-invalid-tx-before", String.valueOf(beforeTx2)}, conf); expectedOut = ImmutableList.of("Invalid list size before truncation: 2", "Invalid list size after truncation: 1", ""); Assert.assertEquals(Joiner.on("\n").join(expectedOut), Bytes.toString(out.toByteArray())); Assert.assertEquals(0, err.toByteArray().length); }</code><technical_language>above, prefer assert invalid list size (obtained txClient) instead of printed output</technical_language>

Target:
public void testTruncateInvalidTxBefore() throws Exception { Transaction tx1 = txClient.startLong(); TimeUnit.MILLISECONDS.sleep(1); long beforeTx2 = System.currentTimeMillis(); Transaction tx2 = txClient.startLong(); Assert.assertEquals(0, txClient.getInvalidSize()); TransactionAdmin txAdmin = new TransactionAdmin(new PrintStream(System.out), new PrintStream(System.err)); int status = txAdmin.doMain(new String[]{"--truncate-invalid-tx-before", String.valueOf(beforeTx2)}, conf); Assert.assertEquals(1, status); Assert.assertEquals(0, txClient.getInvalidSize()); txClient.invalidate(tx1.getWritePointer()); txClient.invalidate(tx2.getWritePointer()); Assert.assertEquals(2, txClient.getInvalidSize()); status = txAdmin.doMain(new String[]{"--truncate-invalid-tx-before", String.valueOf(beforeTx2)}, conf); Assert.assertEquals(0, status); Assert.assertEquals(1, txClient.getInvalidSize()); }
Source:
<code>AzureClient(String storageConnectionString) { try { account = CloudStorageAccount.parse(storageConnectionString); blobClient = account.createCloudBlobClient(); tableClient = account.createCloudTableClient(); } catch (IllegalArgumentException | URISyntaxException e) { LOG.error("\nConnection string specifies an invalid URI.", storageConnectionString); LOG.error("Please confirm the connection string is in the Azure connection string format."); <START> throw new AzureException(e); <END> } catch (InvalidKeyException e) { LOG.error("\nConnection string specifies an invalid key.", storageConnectionString); LOG.error("Please confirm the AccountName and AccountKey in the connection string are valid."); throw new AzureException(e); } }</code><technical_language>LOG.error default prints in a newline (So necessity add beginning of message). Please change other places well</technical_language>

Target:
AzureClient(String storageConnectionString) { try { account = CloudStorageAccount.parse(storageConnectionString); blobClient = account.createCloudBlobClient(); tableClient = account.createCloudTableClient(); } catch (IllegalArgumentException | URISyntaxException e) { LOG.error("Connection string specifies an invalid URI.", storageConnectionString); LOG.error("Please confirm the connection string is in the Azure connection string format."); throw new AzureException(e); } catch (InvalidKeyException e) { LOG.error("Connection string specifies an invalid key.", storageConnectionString); LOG.error("Please confirm the AccountName and AccountKey in the connection string are valid."); throw new AzureException(e); } }
Source:
<code>public List<T> load() throws IOException { InputStream input = null; RequestConfig requestConfig = RequestConfig.custom() .setConnectTimeout(connectTimeout) .setConnectionRequestTimeout(connectTimeout) .setSocketTimeout(readTimeout).build(); HttpClientBuilder httpClientBuilder = HttpClientBuilder.create().setDefaultRequestConfig(requestConfig); if (! useCompression) { LOG.info("Not using compression!"); httpClientBuilder.disableContentCompression(); } else { <START> LOG.info("Using compression by default! Trying gzip, deflate"); <END> } CloseableHttpClient httpClient = httpClientBuilder.build(); HttpGet httpGet = new HttpGet(endpointURL); HttpResponse response = httpClient.execute(httpGet); try { input = response.getEntity().getContent(); return (List<T>) JSONUtil.readJson(input, typeRef); } finally { IOUtils.closeQuietly(input); IOUtils.closeQuietly(httpClient); } }</code><technical_language>move debug</technical_language>

Target:
public List<T> load() throws IOException { InputStream input = null; RequestConfig requestConfig = RequestConfig.custom() .setConnectTimeout(connectTimeout) .setConnectionRequestTimeout(connectTimeout) .setSocketTimeout(readTimeout).build(); HttpClientBuilder httpClientBuilder = HttpClientBuilder.create().setDefaultRequestConfig(requestConfig); if (! useCompression) { LOG.info("Not using compression!"); httpClientBuilder.disableContentCompression(); } else { LOG.debug("Using compression by default! Trying gzip, deflate"); } CloseableHttpClient httpClient = httpClientBuilder.build(); HttpGet httpGet = new HttpGet(endpointURL); HttpResponse response = httpClient.execute(httpGet); try { input = response.getEntity().getContent(); return (List<T>) JSONUtil.readJson(input, typeRef); } finally { IOUtils.closeQuietly(input); IOUtils.closeQuietly(httpClient); } }
Source:
<code>public static int floor(double x) { <START> int ix = (int) x; <END> return x < ix ? ix - 1 : ix; }</code><technical_language>Rename floored</technical_language>

Target:
public static int floor(double x) { int floored = (int) x; return x < floored ? floored - 1 : floored; }
Source:
<code>public NoAuthPrincipalInjectedResourceConfig() { <START> super(); <END> register(NoAuthPrincipalEntityResource.class); packages("io.dropwizard.jersey.jackson"); }</code><technical_language>Ditto for super()</technical_language>

Target:
public NoAuthPrincipalInjectedResourceConfig() { register(NoAuthPrincipalEntityResource.class); packages("io.dropwizard.jersey.jackson"); }
Source:
<code>public void setupGroovyHome() { <START> groovyVersion = GroovySystem.getVersion(); <END> Configuration groovyConfig = rootProject.getConfigurations().maybeCreate(GROOVY_DEPS_CONFIG); rootProject .getDependencies() .add(GROOVY_DEPS_CONFIG, "org.codehaus.groovy:groovy:" + groovyVersion); dependencies = new DependencyCache(rootProject, ProjectUtil.getDependencyManager(rootProject)) .build(groovyConfig); }</code><technical_language>this statical method contains state? is coupled lifecycle? If not, groovy version nullable defined line 31</technical_language>

Target:
public void setupGroovyHome() { Configuration groovyConfig = rootProject.getConfigurations().maybeCreate(GROOVY_DEPS_CONFIG); rootProject .getDependencies() .add(GROOVY_DEPS_CONFIG, "org.codehaus.groovy:groovy:" + groovyVersion); dependencies = new DependencyCache(rootProject, ProjectUtil.getDependencyManager(rootProject)) .build(groovyConfig); }
Source:
<code>public Future<T> onComplete(Handler<AsyncResult<T>> h) { <START> if (h == null) { <END> throw new NullPointerException("No null handler accepted"); } synchronized (this) { if (!isComplete()) { if (handler == null) { handler = h; } else { addHandler(h); } return this; } } dispatch(h); return this; }</code><technical_language><LINK_0></technical_language>

Target:
public Future<T> onComplete(Handler<AsyncResult<T>> h) { Objects.requireNonNull(h, "No null handler accepted"); synchronized (this) { if (!isComplete()) { if (handler == null) { handler = h; } else { addHandler(h); } return this; } } dispatch(h); return this; }
Source:
<code><START> public void testAlone() throws Exception { <END> final DefaultConfiguration checkConfig = createModuleConfig(RightCurlyCheck.class); checkConfig.addAttribute("option", RightCurlyOption.ALONE.toString()); final String[] expected = { "93:27: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 27), "97:72: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 72), }; verify(checkConfig, getPath("InputRightCurlyLeft.java"), expected); }</code><technical_language>Do enough examples for show violations for items added in this input? of other inputs changed in violations, enough examples</technical_language>

Target:
public void testAlone() throws Exception { final DefaultConfiguration checkConfig = createModuleConfig(RightCurlyCheck.class); checkConfig.addAttribute("option", RightCurlyOption.ALONE.toString()); checkConfig.addAttribute("tokens", "LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, " + "LITERAL_IF, LITERAL_ELSE, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO"); final String[] expected = { "56:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), "93:27: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 27), "97:72: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 72), "173:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), "175:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), "177:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), "178:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), "183:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), "188:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), "189:53: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 53), }; verify(checkConfig, getPath("InputRightCurlyLeft.java"), expected); }
Source:
<code><START> public Iterator<Node> treeIterator(TreeTraversal traversal) { <END> switch (traversal) { case BREADTHFIRST: return new TreeVisitor.BreadthFirstIterator(this); case POSTORDER: return new TreeVisitor.PostOrderIterator(this); case PREORDER: return new TreeVisitor.PreOrderIterator(this); default: throw new IllegalArgumentException("Unknown traversal choice."); } }</code><technical_language>move logic TreeTraversal enum. Like: enum TreeTraversal { BREADTHFIRST { Iterator<Node> iterator(Node node) { return TreeVisitor.BreadthFirstIterator(node); } } ; abstract Iterator<Node> iterator(Node node); } public Iterator<Node> treeIterator(TreeTraversal traversal) { return traversal.iterator(this); } This avoid switch is overeegineering</technical_language>

Target:
private Iterator<Node> treeIterator(TreeTraversal traversal) { switch (traversal) { case BREADTHFIRST: return new BreadthFirstIterator(this); case POSTORDER: return new PostOrderIterator(this); case PREORDER: return new PreOrderIterator(this); case DIRECT_CHILDREN: return new DirectChildrenIterator(this); case PARENTS: return new ParentsVisitor(this); default: throw new IllegalArgumentException("Unknown traversal choice."); } }
Source:
<code>public void clientDisconnected(ClientDescriptor clientDescriptor) { connectedClients.remove(clientDescriptor); if (managementRegistry != null) { LOGGER.trace("clientDisconnected({})", clientDescriptor); <START> ClusterTierClientStateBinding clientStateBinding = new ClusterTierClientStateBinding(clientDescriptor); <END> managementRegistry.pushServerEntityNotification(clientStateBinding, EHCACHE_SERVER_STORE_RELEASED.name()); managementRegistry.unregisterAndRefresh(clientStateBinding); } }</code><technical_language>rename binding classes</technical_language>

Target:
public void clientDisconnected(ClientDescriptor clientDescriptor) { if (managementRegistry != null) { LOGGER.trace("clientDisconnected({})", clientDescriptor); ClusterTierClientDescriptorBinding clientStateBinding = new ClusterTierClientDescriptorBinding(clientDescriptor); managementRegistry.pushServerEntityNotification(clientStateBinding, EHCACHE_SERVER_STORE_RELEASED.name()); managementRegistry.unregisterAndRefresh(clientStateBinding); } }
Source:
<code>ServicePool<S> buildInternal() { checkNotNull(_serviceFactory); HostDiscovery hostDiscovery = findHostDiscovery(_serviceName); try { if (_cachingPolicy == null) { _cachingPolicy = ServiceCachingPolicyBuilder.NO_CACHING; } boolean shutdownHealthCheckExecutorOnClose = (_healthCheckExecutor == null); if (_healthCheckExecutor == null) { ThreadFactory threadFactory = new ThreadFactoryBuilder() .setNameFormat(_serviceName + "-HealthCheckThread-%d") .setDaemon(true) .build(); _healthCheckExecutor = Executors.newScheduledThreadPool(DEFAULT_NUM_HEALTH_CHECK_THREADS, threadFactory); } ServicePool<S> servicePool = new ServicePool<S>(Ticker.systemTicker(), hostDiscovery, _closeHostDiscovery, _serviceFactory, _cachingPolicy, _partitionFilter, _loadBalanceAlgorithm, _healthCheckExecutor, shutdownHealthCheckExecutorOnClose); _closeHostDiscovery = false; return servicePool; <START> <END> } catch (Throwable t) { try { if (_closeHostDiscovery) { hostDiscovery.close(); } } catch (IOException e) { } finally { _closeHostDiscovery = false; } throw Throwables.propagate(t); } }</code><technical_language>blank line</technical_language>

Target:
ServicePool<S> buildInternal() { checkNotNull(_serviceFactory); HostDiscovery hostDiscovery = findHostDiscovery(_serviceName); boolean shutdownHealthCheckExecutorOnClose = (_healthCheckExecutor == null); try { if (_cachingPolicy == null) { _cachingPolicy = ServiceCachingPolicyBuilder.NO_CACHING; } if (_healthCheckExecutor == null) { ThreadFactory threadFactory = new ThreadFactoryBuilder() .setNameFormat(_serviceName + "-HealthCheckThread-%d") .setDaemon(true) .build(); _healthCheckExecutor = Executors.newScheduledThreadPool(DEFAULT_NUM_HEALTH_CHECK_THREADS, threadFactory); } ServicePool<S> servicePool = new ServicePool<S>(Ticker.systemTicker(), hostDiscovery, _closeHostDiscovery, _serviceFactory, _cachingPolicy, _partitionFilter, _loadBalanceAlgorithm, _healthCheckExecutor, shutdownHealthCheckExecutorOnClose); _closeHostDiscovery = false; return servicePool; } catch (Throwable t) { if (shutdownHealthCheckExecutorOnClose) { _healthCheckExecutor.shutdownNow(); _healthCheckExecutor = null; } try { if (_closeHostDiscovery) { hostDiscovery.close(); } } catch (IOException e) { } finally { _closeHostDiscovery = false; } throw Throwables.propagate(t); } }
Source:
<code>public Citation mapRow(ResultSet rs, int i) { Citation citation = new Citation(); try { citation.id = rs.getInt("id"); citation.citation_number = rs.getString("citation_number"); <START> citation.citation_date = (rs.getDate("citation_date")!=null)?rs.getDate("citation_date").toLocalDate():null; <END> citation.first_name = rs.getString("first_name"); citation.last_name = rs.getString("last_name"); citation.date_of_birth = (rs.getDate("date_of_birth")!=null)?rs.getDate("date_of_birth").toLocalDate():null; citation.defendant_address = rs.getString("defendant_address"); citation.defendant_city = rs.getString("defendant_city"); citation.defendant_state = rs.getString("defendant_state"); citation.drivers_license_number = rs.getString("drivers_license_number"); LocalDate courtDate = (rs.getDate("court_date")!=null)?rs.getDate("court_date").toLocalDate():null; LocalTime courtTime = (rs.getTime("court_date")!=null)?rs.getTime("court_date").toLocalTime():null; if (courtDate==null || courtTime==null){ citation.court_dateTime = null; }else{ citation.court_dateTime = LocalDateTime.of(courtDate, courtTime); } citation.court_location = rs.getString("court_location"); citation.court_address = rs.getString("court_address"); citation.court_id = rs.getLong("court_id"); } catch (Exception e) { LogSystem.LogDBException(e); return null; } return citation; }</code><technical_language>inefficient try get twice. get in a local var check. - "rs" (ResultSet) a "hasProperty" type of call</technical_language>

Target:
public Citation mapRow(ResultSet rs, int i) { Citation citation = new Citation(); try { citation.id = rs.getInt("id"); citation.citation_number = rs.getString("citation_number"); citation.citation_date = DatabaseUtilities.getDatabaseLocalDate(rs.getDate("citation_date")); citation.first_name = rs.getString("first_name"); citation.last_name = rs.getString("last_name"); citation.date_of_birth = DatabaseUtilities.getDatabaseLocalDate(rs.getDate("date_of_birth")); citation.defendant_address = rs.getString("defendant_address"); citation.defendant_city = rs.getString("defendant_city"); citation.defendant_state = rs.getString("defendant_state"); citation.drivers_license_number = rs.getString("drivers_license_number"); LocalDate courtDate = DatabaseUtilities.getDatabaseLocalDate(rs.getDate("court_date")); LocalTime courtTime = DatabaseUtilities.getDatabaseLocalTime(rs.getTime("court_date")); if (courtDate==null || courtTime==null){ citation.court_dateTime = null; }else{ citation.court_dateTime = LocalDateTime.of(courtDate, courtTime); } citation.court_location = rs.getString("court_location"); citation.court_address = rs.getString("court_address"); citation.court_id = new HashableEntity<Court>(Court.class,rs.getLong("court_id")); } catch (Exception e) { LogSystem.LogDBException(e); return null; } return citation; }
Source:
<code>public void trimCache(CorfuPayloadMsg<Long> msg, ChannelHandlerContext ctx, IServerRouter r) { log.info("trimCache: Starting cache eviction"); if (trimMark < msg.getPayload()) { trimMark = msg.getPayload(); cache.invalidateUpTo(trimMark); } for(StreamAddressSpace streamAddressSpace : streamsAddressSpaceMap.values()) { <START> streamAddressSpace.trim(trimMark); <END> } r.sendResponse(ctx, msg, CorfuMsgType.ACK.msg()); }</code><technical_language>StreamAddressSpace belong wire protocol</technical_language>

Target:
public void trimCache(CorfuPayloadMsg<Long> msg, ChannelHandlerContext ctx, IServerRouter r) { log.info("trimCache: Starting cache eviction"); if (trimMark < msg.getPayload()) { trimMark = msg.getPayload(); cache.invalidateUpTo(trimMark); } for(StreamAddressSpace streamAddressSpace : streamsAddressMap.values()) { streamAddressSpace.trim(trimMark); } r.sendResponse(ctx, msg, CorfuMsgType.ACK.msg()); }
Source:
<code>public static void register(ScalarFunctionModule module) { module.register(NAME, new FunctionResolver() { @Override public List<DataType> getSignature(List<? extends FuncArg> funcArgs) { return SIGNATURE.match(funcArgs); } @Override public FunctionImplementation getForTypes(List<DataType> types) throws IllegalArgumentException { int argsLen = types.size(); assert argsLen > 0 && argsLen <= 2 : "number of args must be up to 2"; DataType argType = types.get(0); DataType returnType = DataTypes.getIntegralReturnType(argType); return 1 == argsLen ? <START> new OneParamTrunc(argType, returnType) : new TwoParamTrunc(argType, returnType); <END> } }); }</code><technical_language>Is this worth 2 implementations? 1 a default val of 0</technical_language>

Target:
public static void register(ScalarFunctionModule module) { module.register(NAME, new BaseFunctionResolver(SIGNATURE) { @Override public FunctionImplementation getForTypes(List<DataType> types) throws IllegalArgumentException { DataType argType = types.get(0); DataType returnType = DataTypes.getIntegralReturnType(argType); if (1 == types.size()) { return new UnaryScalar<Number, Number>(NAME, argType, returnType, n -> { double val = n.doubleValue(); Function<Double, Double> f = val >= 0 ? Math::floor : Math::ceil; return (Number) returnType.value(f.apply(val)); }); } else { return new Scalar<Number, Number>() { FunctionInfo info = new FunctionInfo(new FunctionIdent( NAME, types), DataTypes.DOUBLE); @Override public FunctionInfo info() { return info; } @Override public Number evaluate(TransactionContext txnCtx, Input<Number>... args) { Number n = args[0].value(); Number nd = args[1].value(); if (null == n || null == nd) { return null; } double val = n.doubleValue(); int numDecimals = nd.intValue(); RoundingMode mode = val >= 0 ? RoundingMode.FLOOR : RoundingMode.CEILING; return BigDecimal.valueOf(val).setScale(numDecimals, mode).doubleValue(); } }; } } }); }
Source:
<code>public byte[] reEncryptKey(final byte[] externallyEncryptedKey, final SecurityKeyType keyType) throws FunctionalException { if (externallyEncryptedKey == null) { return new byte[0]; } try { final byte[] key = this.rsaEncryptionService.decrypt(externallyEncryptedKey); return this.encryptionService.encrypt(key); } catch (final Exception e) { LOGGER.error("Unexpected exception during encryption", e); <START> throw new FunctionalException(FunctionalExceptionType.ENCRYPTION_EXCEPTION, ComponentType.PROTOCOL_DLMS, <END> new EncrypterException(String.format("Error encryption process with %s key.", keyType))); } }</code><technical_language>FunctionalException thrown is of type ENCRYPTION_EXCEPTION while exception e resulted decryption encryption (and functional exception type DECRYPTION_EXCEPTION exists). this confusing, is intentional, other option missed</technical_language>

Target:
public byte[] reEncryptKey(final byte[] externallyEncryptedKey, final SecurityKeyType keyType) throws FunctionalException { if (externallyEncryptedKey == null) { return new byte[0]; } final byte[] key = this.rsaDecrypt(externallyEncryptedKey, keyType); return this.aesEncrypt(key, keyType); }
Source:
<code>public int getId() { try { return id; } catch (RuntimeException e) { throw logAndPrepareForRethrow(e); } catch (Error e) { throw logAndPrepareForRethrow(e); } catch (Throwable t) { throw logAndPrepareForRethrow(t); <START> } <END> }</code><technical_language>I do need this try/catch stuff ))</technical_language>

Target:
public int getId() { return id; }
Source:
<code>public EnergyArc(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}{U}"); this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); this.getSpellAbility().addEffect(new UntapTargetEffect()); this.getSpellAbility().addEffect(new PreventDamageByTargetEffect(Duration.EndOfTurn, true)); <START> this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE, true)); <END> }</code><technical_language>change texts effects. a done Act of Treason</technical_language>

Target:
public EnergyArc(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}{U}"); this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap any number of target creatures. ")); this.getSpellAbility().addEffect(new PreventDamageByTargetEffect(Duration.EndOfTurn, true).setText("Prevent all combat damage that would be dealt to ")); this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, true).setText("and dealt by those creatures this turn.")); }
Source:
<code>private static void addResponseHeaderWithOverride( HttpServletRequest request, HttpServletResponse response, String headerName, String overrideHeaderName, String value) { String override = request.getParameter(overrideHeaderName); if (override != null) { response.addHeader(headerName, override); } else { response.addHeader(headerName, value); <START> } <END> }</code><technical_language>Simplify Objects.firstNonNull</technical_language>

Target:
private static void addResponseHeaderWithOverride( HttpServletRequest request, HttpServletResponse response, String headerName, String overrideHeaderName, String value) { String override = request.getParameter(overrideHeaderName); response.addHeader(headerName, override != null ? override : value); }
Source:
<code>public void onPostValidation(boolean valid) { FormViewUtil.setupBackground(getContext(), valid, textEditText); <START> View errorView = findViewById(R.id.error_view); <END> if (errorView != null) { errorView.setVisibility(valid ? GONE : VISIBLE); } }</code><technical_language>pattern :)</technical_language>

Target:
public void onPostValidation(boolean valid) { FormViewUtil.setupBackground(getContext(), valid, textEditText); FormViewUtil.setupErrorView(valid, findViewById(R.id.error_view)); }
Source:
<code><START> protected DigitalTwinsAsyncClient(HttpPipeline pipeline, DigitalTwinsServiceVersion serviceVersion, String host) { <END> this.protocolLayer = new AzureDigitalTwinsAPIBuilder().host(host).pipeline(pipeline).buildClient(); this.serviceVersion = serviceVersion; }</code><technical_language>a package private scope (no scope keyword)</technical_language>

Target:
DigitalTwinsAsyncClient(HttpPipeline pipeline, DigitalTwinsServiceVersion serviceVersion, String host) { this.protocolLayer = new AzureDigitalTwinsAPIBuilder().host(host).pipeline(pipeline).buildClient(); this.serviceVersion = serviceVersion; }
Source:
<code>public String toString() { <START> return "Alert [triggerId=" + getTriggerId() + ", severity=" + severity + ", status=" + status + ", tenantId=" <END> + tenantId + ", ctime=" + ctime + "]"; }</code><technical_language>This change is purpose ? automatically re-create toString() ? I remember fields helped a lot in debugging scenarios (and IIRC this method is invoked tracing/debugging contexts)</technical_language>

Target:
public String toString() { return "Alert [tenantId=" + tenantId + ", triggerId=" + getTriggerId() + ", severity=" + severity + ", status=" + status + ", ctime=" + ctime + ", lifecycle=" + lifecycle + ", resolvedEvalSets=" + resolvedEvalSets + "]"; }
Source:
<code>public void endDocument() { <START> while (!blockStrategyState.isEmpty()) { <END> endBlock(); } delegate.endDocument(); }</code><technical_language>this close blocks, implicitly created assertOpenBlock()</technical_language>

Target:
public void endDocument() { assertCloseImplicitBlock(); delegate.endDocument(); }
Source:
<code>public void testRemoveContentFromIndexMultilingualContent() throws DotDataException, DotSecurityException, InterruptedException { ContentType contentType = null; try { contentType = new ContentTypeDataGen() .name("testRemoveContentFromIndexMultilingualContent"+System.currentTimeMillis()) .fields(ImmutableList .of(ImmutableTextField.builder().name("Title").variable("title") .build())) .nextPersisted(); final ContentletDataGen contentletDataGen = new ContentletDataGen(contentType.id()); final Contentlet contentInEnglish = contentletDataGen.languageId(languageAPI.getDefaultLanguage().getId()).nextPersisted(); Contentlet contentInSpanish = contentletDataGen.checkout(contentInEnglish); contentInSpanish.setLanguageId(spanishLanguage.getId()); contentInSpanish.setIndexPolicy(IndexPolicy.FORCE); contentInSpanish = contentletDataGen.checkin(contentInSpanish); assertEquals(2, contentletAPI.searchIndex("+identifier:"+contentInEnglish.getIdentifier(),-1,0,"",user,true).size()); contentletDataGen.archive(contentInSpanish); contentletDataGen.delete(contentInSpanish); <START> Thread.sleep(1000); END> assertEquals(1, contentletAPI.searchIndex("+identifier:"+contentInEnglish.getIdentifier(),-1,0,"",user,true).size()); contentletDataGen.archive(contentInEnglish); contentletDataGen.delete(contentInEnglish); Thread.sleep(1000); assertEquals(0, contentletAPI.searchIndex("+identifier:"+contentInEnglish.getIdentifier(),-1,0,"",user,true).size()); } finally { if (contentType != null) { contentTypeAPI.delete(contentType); } } }</code><technical_language>needed</technical_language>

Target:
public void testRemoveContentFromIndexMultilingualContent() throws DotDataException, DotSecurityException, InterruptedException { ContentType contentType = null; try { contentType = new ContentTypeDataGen() .name("testRemoveContentFromIndexMultilingualContent"+System.currentTimeMillis()) .fields(ImmutableList .of(ImmutableTextField.builder().name("Title").variable("title") .build())) .nextPersisted(); final ContentletDataGen contentletDataGen = new ContentletDataGen(contentType.id()); final Contentlet contentInEnglish = contentletDataGen.languageId(languageAPI.getDefaultLanguage().getId()).nextPersisted(); Contentlet contentInSpanish = contentletDataGen.checkout(contentInEnglish); contentInSpanish.setLanguageId(spanishLanguage.getId()); contentInSpanish.setIndexPolicy(IndexPolicy.WAIT_FOR); contentInSpanish = contentletDataGen.checkin(contentInSpanish); assertEquals(2, contentletAPI.searchIndex("+identifier:"+contentInEnglish.getIdentifier(),-1,0,"",user,true).size()); contentletDataGen.archive(contentInSpanish); contentletDataGen.delete(contentInSpanish); assertEquals(1, contentletAPI.searchIndex("+identifier:"+contentInEnglish.getIdentifier(),-1,0,"",user,true).size()); contentletDataGen.archive(contentInEnglish); contentletDataGen.delete(contentInEnglish); assertEquals(0, contentletAPI.searchIndex("+identifier:"+contentInEnglish.getIdentifier(),-1,0,"",user,true).size()); } finally { if (contentType != null) { contentTypeAPI.delete(contentType); } } }
Source:
<code>private Optional<String> getGroupIdToCreate(String documentationOptions) { try { Properties docProps = new Properties(); docProps.load(new <START> StringReader(documentationOptions)); <END> String groupId = docProps.getProperty(GROUP_PREFIX); if (groupId != null) { return Optional.of(groupId); } } catch (IOException e) { } return Optional.empty(); }</code><technical_language>closed</technical_language>

Target:
private Optional<String> getGroupIdToCreate(String documentationOptions) { try { Properties docProps = new Properties(); StringReader docReader = new StringReader(documentationOptions); try { docProps.load(docReader); } finally { docReader.close(); } String groupId = docProps.getProperty(GROUP_PREFIX); if (groupId != null) { return Optional.of(groupId); } } catch (IOException e) { } return Optional.empty(); }
Source:
<code>protected void extractAdditionalItemFields(NitroItemSource<Episode> source, Item item, DateTime now) { Episode episode = source.getProgramme(); if (item.getTitle() == null) { item.setTitle(episode.getPresentationTitle()); } <START> if (isHasMoreThanOneSeriesAncestor(episode)) { <END> item.setTitle(compileTitleForSeriesSeriesEpisode(episode)); } if (episode.getEpisodeOf() != null) { org.atlasapi.media.entity.Episode episodeContent = (org.atlasapi.media.entity.Episode) item; BigInteger position = episode.getEpisodeOf().getPosition(); if (position != null) { episodeContent.setEpisodeNumber(position.intValue()); } episodeContent.setSeriesRef(getSeriesRef(episode)); } item.setParentRef(getBrandRef(episode)); item.setGenres(genresExtractor.extract(source.getGenres())); }</code><technical_language>_cough_</technical_language>

Target:
protected void extractAdditionalItemFields(NitroItemSource<Episode> source, Item item, DateTime now) { Episode episode = source.getProgramme(); if (item.getTitle() == null) { item.setTitle(episode.getPresentationTitle()); } if (hasMoreThanOneSeriesAncestor(episode)) { item.setTitle(compileTitleForSeriesSeriesEpisode(episode)); } if (episode.getEpisodeOf() != null) { org.atlasapi.media.entity.Episode episodeContent = (org.atlasapi.media.entity.Episode) item; BigInteger position = episode.getEpisodeOf().getPosition(); if (position != null) { episodeContent.setEpisodeNumber(position.intValue()); } episodeContent.setSeriesRef(getSeriesRef(episode)); } item.setParentRef(getBrandRef(episode)); item.setGenres(genresExtractor.extract(source.getGenres())); }
Source:
<code>public void clearCache() { DotCacheAdministrator cache = CacheLocator.getCacheAdministrator(); <START> for (final String group : getGroups()) { <END> cache.flushGroup(group); } }</code><technical_language>this replaced getGroups().forEach(group -> cache.flushGroup(group));</technical_language>

Target:
public void clearCache() { Arrays.asList(getGroups()).forEach(group -> cache.flushGroup(group)); }
Source:
<code>protected ServiceEndpoint<T> configureBasePort(T port, String url, Integer timeout) { ServiceEndpoint<T> serviceEndpoint = new BaseServiceEndpoint<>(port); serviceEndpoint = new URLServiceEndpointDecorator<>(serviceEndpoint, url); serviceEndpoint = new TimeoutServiceEndpointDecorator<>(serviceEndpoint, timeout); boolean isDisableCNCheck = false; try { isDisableCNCheck = PropertyAccessor.getInstance().getPropertyBoolean(GATEWAY_PROPERTY_FILE, DISABLE_CN_CHECK); } catch (PropertyAccessException ex) { LOG.error("Not able to 'disableCNCheck' from the property file: {}", ex.getLocalizedMessage(), ex); } LOG.info("gateway-property--disableCNCheck: '{}'", isDisableCNCheck); <START> if (isDisableCNCheck) { <END> serviceEndpoint = new TLSClientServiceEndpointDecorator<>(serviceEndpoint); } return serviceEndpoint; }</code><technical_language>ConnectSecureClient TLSClientServiceEndpointDecorator CachingCXFSecuredServicePortBuilder, CN check apply I need turn on/off for secure. add TLSClientServiceEndpointDecorator here. Move yr check TLSClientParametersFactory. Also, verify if need remove TLSClientServiceEndpointDecorator CachingCXFSecuredServicePortBuilder</technical_language>

Target:
protected ServiceEndpoint<T> configureBasePort(T port, String url, Integer timeout) { ServiceEndpoint<T> serviceEndpoint = new BaseServiceEndpoint<>(port); serviceEndpoint = new URLServiceEndpointDecorator<>(serviceEndpoint, url); serviceEndpoint = new TimeoutServiceEndpointDecorator<>(serviceEndpoint, timeout); serviceEndpoint = new TLSClientServiceEndpointDecorator<>(serviceEndpoint); return serviceEndpoint; }
Source:
<code>protected T doCreateAggregate(String aggregateIdentifier, DomainEventMessage firstEvent) { return aggregateModel.type(firstEvent.getType()) .map(this::newInstance) <START> .orElseThrow(() -> new IncompatibleAggregateException(format( <END> "The [%s] aggregate does not exist.", firstEvent.getType()))); }</code><technical_language>This a breaking change. now, "type" of a DomainEventMessage used. I suggest accepting unmatched types aggregateModel define polymorphic types. In case, silently accept "mistypes". If model _does_ define multiple polymorphic types, throw exception</technical_language>

Target:
protected T doCreateAggregate(String aggregateIdentifier, DomainEventMessage firstEvent) { Class<?> type = aggregateModel().type(firstEvent.getType()) .orElse(getAggregateType()); return newInstance(type, constructors.get(type)); }
Source:
<code>private Collection<String> getKeywords() { <START> List<String> klist = new ArrayList<>(); <END> klist.addAll(Arrays.asList(SQLKeywords.keywords)); for (String db: client.getAllDatabaseNames()) { klist.add(db); klist.addAll(client.getTableList(db)); } return klist; }</code><technical_language>a ambiguous name. rename keywords keywordList</technical_language>

Target:
private Collection<String> getKeywords() { Stream<String> tokens = Arrays.stream(SQLLexer.tokenNames); Stream<String> rules = Arrays.stream(SQLLexer.ruleNames); List<String> keywords = Stream.concat(tokens, rules) .filter((str) -> str.matches("[A-Z_]+") && str.length() > 1) .distinct() .map(String::toLowerCase) .collect(Collectors.toList()); for (String db: client.getAllDatabaseNames()) { keywords.add(db); keywords.addAll(client.getTableList(db)); } tokens.close(); rules.close(); return keywords; }
Source:
<code>public VirtualConsole(@Assisted Element parent, final Preferences prefs) { prefs_ = prefs; parent_ = parent; if (prefs_.limitConsoleVisible() && parent_ != null && <START> !VirtualConsole.virtualScrollerInitialized_ && <END> !VirtualConsole.loadingVirtualScroller_) { VirtualConsole.loadingVirtualScroller_ = true; virtualScrollerLoader_.addCallback(() -> { try { virtualScrollerNative_ = new VirtualScrollerNative(); virtualScrollerNative_.setup(parent_); VirtualConsole.virtualScrollerInitialized_ = true; VirtualConsole.loadingVirtualScroller_ = false; } catch (JavaScriptException e) { Debug.log(e.getMessage()); } }); } }</code><technical_language>Nit: VirtualConsole. prefix is unnecessary (here elsewhere)</technical_language>

Target:
public VirtualConsole(@Assisted Element parent, final Preferences prefs) { prefs_ = prefs; parent_ = parent; VirtualScrollerManager.init(); }
Source:
<code>public void setSuccessActionStatus(int successActionStatus) throws InvalidArgumentException { if (!(successActionStatus == 200 || successActionStatus == 201 || successActionStatus == 204)) { <START> throw new InvalidArgumentException("Success action status accepts the values as 200, 201, or " <END> + "204 (the default) only"); } this.successActionStatus = successActionStatus; }</code><technical_language>suggestion throw new InvalidArgumentException("Invalid action status, acceptable values 200, 201, 204"</technical_language>

Target:
public void setSuccessActionStatus(int successActionStatus) throws InvalidArgumentException { if (!(successActionStatus == SuccessActionStatus.SuccessActionStatus200.getValue() || successActionStatus == SuccessActionStatus.SuccessActionStatus201.getValue() || successActionStatus == SuccessActionStatus.SuccessActionStatus204.getValue())) { throw new InvalidArgumentException("Invalid action status, acceptable values are 200, 201, or 204"); } this.successActionStatus = successActionStatus; }
Source:
<code>private Properties getNodeConf(String node) { try { <START> String homeDir = InstancedConfiguration.defaults().get(PropertyKey.HOME); <END> String remoteCommand = String.format( "%s/bin/alluxio getConf", homeDir); String localCommand = String.format( "ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no -tt %s \"bash %s\"", node, remoteCommand); String[] command = {"bash", "-c", localCommand}; Properties properties = new Properties(); Process process = Runtime.getRuntime().exec(command); properties.load(process.getInputStream()); return properties; } catch (IOException e) { System.err.format("Unable to retrieve configuration for %s: %s.", node, e.getMessage()); return null; } }</code><technical_language>pass in conf object</technical_language>

Target:
private Properties getNodeConf(String node) { try { String homeDir = mConf.get(PropertyKey.HOME); String remoteCommand = String.format( "%s/bin/alluxio getConf", homeDir); String localCommand = String.format( "ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no -tt %s \"bash %s\"", node, remoteCommand); String[] command = {"bash", "-c", localCommand}; Properties properties = new Properties(); Process process = Runtime.getRuntime().exec(command); properties.load(process.getInputStream()); return properties; } catch (IOException e) { System.err.format("Unable to retrieve configuration for %s: %s.", node, e.getMessage()); return null; } }
Source:
<code><START> public static <U, V extends U> ValueSupplier<U> supplierOf(final V value) { <END> return new ValueSupplier<U>() { @Override public U value() { return value; } }; }</code><technical_language>need for of generic types here, ? extends V usage</technical_language>

Target:
public static <V> ValueSupplier<V> supplierOf(final V value) { return new ValueSupplier<V>() { @Override public V value() { return value; } }; }
Source:
<code>public CommandStatus runTimed(long timeout, IRunUtil.IRunnableResult runnable, boolean logErrors) { mInterrupter.checkInterrupted(); RunnableNotifier runThread = new RunnableNotifier(runnable, logErrors); if (logErrors) { if (timeout > 0l) { CLog.d("Running command with timeout: %dms", timeout); } else { CLog.d("Running command without timeout."); } } try { runThread.start(); long startTime = System.currentTimeMillis(); long pollInterval = 0; if (timeout > 0L && timeout < THREAD_JOIN_POLL_INTERVAL) { pollInterval = timeout; } else { pollInterval = THREAD_JOIN_POLL_INTERVAL; } do { try { runThread.join(pollInterval); } catch (InterruptedException e) { if (isInterruptAllowed()) { CLog.i("runTimed: interrupted while joining the runnable"); break; } else { CLog.i( <START> "runTimed: received an interrupt but uninterruptible mode, ignoring"); <END> } } mInterrupter.checkInterrupted(); } while ((timeout == 0L || (System.currentTimeMillis() - startTime) < timeout) && runThread.isAlive()); CommandStatus status = runThread.getStatus(); if (CommandStatus.TIMED_OUT.equals(status) || CommandStatus.EXCEPTION.equals(status)) { CLog.i("runTimed: Calling interrupt, status is %s", status); runThread.cancel(); } mInterrupter.checkInterrupted(); return status; } catch (RunInterruptedException e) { runThread.cancel(); throw e; } }</code><technical_language>nit: long line</technical_language>

Target:
public CommandStatus runTimed(long timeout, IRunUtil.IRunnableResult runnable, boolean logErrors) { mInterrupter.checkInterrupted(); RunnableNotifier runThread = new RunnableNotifier(runnable, logErrors); if (logErrors) { if (timeout > 0l) { CLog.d("Running command with timeout: %dms", timeout); } else { CLog.d("Running command without timeout."); } } try { runThread.start(); long startTime = System.currentTimeMillis(); long pollInterval = 0; if (timeout > 0L && timeout < THREAD_JOIN_POLL_INTERVAL) { pollInterval = timeout; } else { pollInterval = THREAD_JOIN_POLL_INTERVAL; } do { try { runThread.join(pollInterval); } catch (InterruptedException e) { if (isInterruptAllowed()) { CLog.i("runTimed: interrupted while joining the runnable"); break; } else { CLog.i("runTimed: currently uninterruptible, ignoring interrupt"); } } mInterrupter.checkInterrupted(); } while ((timeout == 0L || (System.currentTimeMillis() - startTime) < timeout) && runThread.isAlive()); CommandStatus status = runThread.getStatus(); if (CommandStatus.TIMED_OUT.equals(status) || CommandStatus.EXCEPTION.equals(status)) { CLog.i("runTimed: Calling interrupt, status is %s", status); runThread.cancel(); } mInterrupter.checkInterrupted(); return status; } catch (RunInterruptedException e) { runThread.cancel(); throw e; } }
Source:
<code>public boolean onOptionsItemSelected(MenuItem item) { if (!super.onOptionsItemSelected(item)) { if (item.getItemId() == R.id.clear_history_item) { DBWriter.clearDownloadLog(); <START> return true; <END> } return false; } else { return true; } }</code><technical_language>This a merge conflict #4244. Please do change this file</technical_language>

Target:
public boolean onOptionsItemSelected(MenuItem item) { if (!super.onOptionsItemSelected(item)) { switch (item.getItemId()) { case R.id.clear_history_item: DBWriter.clearDownloadLog(); return true; default: return false; } } else { return true; } }
Source:
<code>public void deleteBucket(String name) throws RepoException { Lock writeLock = this.rwLocks.get(name).writeLock(); writeLock.lock(); boolean rollback = false; Bucket bucket = new Bucket(name); try { sqlService.getConnection(); if (sqlService.getBucket(name) == null) throw new RepoException(RepoException.Type.BucketNotFound); if (Boolean.FALSE.equals(objectStore.bucketExists(bucket))) throw new RepoException("Bucket exists in database but not in object store: " + name); if (sqlService.listObjects(name, 0, 1, true, false, null).size() != 0) throw new RepoException(RepoException.Type.CantDeleteNonEmptyBucket); rollback = true; <START> if (sqlService.removeBucketContent(name) == 0) <END> throw new RepoException("Unable to delete bucket in database: " + name); if (Boolean.FALSE.equals(objectStore.deleteBucket(bucket))) throw new RepoException("Unable to delete bucket in object store: " + name); sqlService.transactionCommit(); rollback = false; } catch (SQLException e) { throw new RepoException(e); } finally { if (rollback) { sqlRollback("bucket " + name); objectStore.createBucket(bucket); } sqlReleaseConnection(); writeLock.unlock(); } }</code><technical_language>in removeBucketContent function, check status of objects. we</technical_language>

Target:
public void deleteBucket(String name) throws RepoException { Lock writeLock = this.rwLocks.get(name).writeLock(); writeLock.lock(); boolean rollback = false; boolean bucketDeletion = false; Bucket bucket = new Bucket(name); try { sqlService.getConnection(); rollback = true; if (sqlService.getBucket(name) == null) throw new RepoException(RepoException.Type.BucketNotFound); if (Boolean.FALSE.equals(objectStore.bucketExists(bucket))) throw new RepoException("Bucket exists in database but not in object store: " + name); if (sqlService.listObjects(name, 0, 1, true, false, null).size() != 0) throw new RepoException(RepoException.Type.CantDeleteNonEmptyBucket); if (sqlService.removeBucketContent(name) == 0) throw new RepoException("Unable to delete bucket in database: " + name); bucketDeletion = objectStore.deleteBucket(bucket); if (!bucketDeletion){ throw new RepoException("Unable to delete bucket in object store: " + name); } sqlService.transactionCommit(); rollback = false; } catch (SQLException e) { throw new RepoException(e); } finally { if (rollback) { sqlRollback("bucket " + name); if (bucketDeletion) { objectStore.createBucket(bucket); } } sqlReleaseConnection(); writeLock.unlock(); } }