auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void likePost(Long postId, String likerUsername) { Post likedPost = postRepository.findOne(postId); if (likedPost == null) { throw new PostNotFoundException(postId); } User user = userService.findUserByUsername(likerUsername).get(); if (likedPost.isNotAlreadyLikedBy(likerUsername)) { likedPost.addLike(user); postRepository.save(likedPost); LikePostEvent likePostEvent = new LikePostEvent(likedPost, likerUsername); if(!likedPost.isOwnedBy(likerUsername)) { domainEvents.raise(likePostEvent); <START> } <END> } }</code><technical_language>java if(!likedPost.isOwnedBy(likerUsername)) { domainEvents.raise(likePostEvent); } i want event is raised . test send notification i put i event handler</technical_language>

Target:
public void likePost(Long postId, String likerUsername) { Post post = postRepository.findOne(postId); if (post == null) { throw new PostNotFoundException(postId); } User user = userService.findUserByUsername(likerUsername).get(); if (post.isNotAlreadyLikedBy(likerUsername)) { post.addLike(user); postRepository.save(post); LikePostEvent likePostEvent = new LikePostEvent(post, likerUsername); domainEvents.raise(likePostEvent); } }
Source:
<code>public void readUpdatedMetadataValue() throws Exception { GraphDatabaseFacade localGraph = neo.getLocalGraph(); <START> try ( Transaction transaction = localGraph.beginTx() ) <END> { String testValue = "testValue"; String testKey = "test"; localGraph.execute( "CALL dbms.setTXMetaData", map( "data", map( testKey, testValue ) ) ); Map<String,Object> metadata = (Map<String,Object>) localGraph.execute( "CALL dbms.getTXMetaData " ).next().get( "metadata" ); assertEquals( testValue, metadata.get( testKey ) ); } }</code><technical_language>do test bypass security, is convention of other tests in this class</technical_language>

Target:
public void readUpdatedMetadataValue() throws Throwable { String testValue = "testValue"; String testKey = "test"; GraphDatabaseFacade graph = neo.getLocalGraph(); try ( InternalTransaction transaction = neo.beginLocalTransactionAsUser( writeSubject, KernelTransaction.Type.explicit ) ) { graph.execute( "CALL dbms.setTXMetaData({" + testKey + ":'" + testValue + "'})" ); Map<String,Object> metadata = (Map<String,Object>) graph.execute( "CALL dbms.getTXMetaData " ).next().get( "metadata" ); assertEquals( testValue, metadata.get( testKey ) ); } }
Source:
<code>public boolean equals(Object o) { <START> new RuntimeException("partitioningHandle equals").printStackTrace(); <END> if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } HivePartitionHandle that = (HivePartitionHandle) o; return bucket == that.bucket; }</code><technical_language>I imagine this leftover debugging</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } HivePartitionHandle that = (HivePartitionHandle) o; return bucket == that.bucket; }
Source:
<code>public void testAttachmentWithUnicode() throws Exception { String osName = System.getProperty("os.name").toLowerCase(); <START> if (!osName.startsWith("mac os x")) { <END> testAttachmentWithSpecialCharacters( "\u00E7\u00F1\u00A5\u20AC\u00A3\u00BD\u00BC\u03B2\u03B8\u53F0\u5317\u3096\u3097\uFF73"); } }</code><technical_language>Assume.isTrue()</technical_language>

Target:
public void testAttachmentWithUnicode() throws Exception { String osName = System.getProperty("os.name").toLowerCase(); assumeTrue(!osName.startsWith("mac os x")); testAttachmentWithSpecialCharacters( "\u00E7\u00F1\u00A5\u20AC\u00A3\u00BD\u00BC\u03B2\u03B8\u53F0\u5317\u3096\u3097\uFF73"); }
Source:
<code>public DayOfWeekConditionHandler(Condition module) { super(module); try { days = new ArrayList<>(); for (String day : (Iterable<String>) module.getConfiguration().get(CFG_DAYS)) { switch (day) { case "SUN": days.add(1); break; case "MON": days.add(2); break; case "TUE": days.add(3); break; case "WED": days.add(4); break; case "THU": days.add(5); break; case "FRI": days.add(6); break; case "SAT": days.add(7); break; } } <START> days.toArray(new Integer[days.size()]); <END> } catch (Exception e) { throw new IllegalArgumentException("'days' parameter must be an array of strings."); } }</code><technical_language>sense assign return anything</technical_language>

Target:
public DayOfWeekConditionHandler(Condition module) { super(module); try { days = new HashSet<>(); for (String day : (Iterable<String>) module.getConfiguration().get(CFG_DAYS)) { switch (day.toUpperCase()) { case "SUN": days.add(Calendar.SUNDAY); break; case "MON": days.add(Calendar.MONDAY); break; case "TUE": days.add(Calendar.TUESDAY); break; case "WED": days.add(Calendar.WEDNESDAY); break; case "THU": days.add(Calendar.THURSDAY); break; case "FRI": days.add(Calendar.FRIDAY); break; case "SAT": days.add(Calendar.SATURDAY); break; default: logger.warn("Ignoring illegal weekday '{}'", day); break; } } } catch (RuntimeException e) { throw new IllegalArgumentException("'days' parameter must be an array of strings."); } }
Source:
<code>public RaptorSessionProperties(StorageManagerConfig config) { sessionProperties = ImmutableList.of( stringProperty( EXTERNAL_BATCH_ID, "Two-phase commit batch ID", null, true), dataSizeSessionProperty( READER_MAX_MERGE_DISTANCE, "Reader: Maximum size of gap between two reads to merge into a single read", config.getOrcMaxMergeDistance(), false), dataSizeSessionProperty( READER_MAX_READ_SIZE, "Reader: Maximum size of a single read", config.getOrcMaxReadSize(), false), dataSizeSessionProperty( READER_STREAM_BUFFER_SIZE, "Reader: Size of buffer for streaming reads", config.getOrcStreamBufferSize(), false), dataSizeSessionProperty( READER_TINY_STRIPE_THRESHOLD, "Reader: Threshold below which an ORC stripe or file will read in its entirety", config.getOrcTinyStripeThreshold(), false), booleanProperty( READER_LAZY_READ_SMALL_RANGES, "Experimental: Reader: Read small file segments lazily", config.isOrcLazyReadSmallRanges(), false), integerProperty( ONE_SPLIT_PER_BUCKET_THRESHOLD, "Experimental: Maximum bucket count at which to produce multiple splits per bucket", config.getOneSplitPerBucketThreshold(), false), booleanProperty( ORC_ZSTD_JNI_DECOMPRESSION_ENABLED, "use JNI based std decompression for reading ORC files", config.isZstdJniDecompressionEnabled(), true), dataSizeSessionProperty( WRITER_MAX_BUFFER_SIZE, <START> "Raptor page writer max buffer size", <END> config.getMaxBufferSize(), false)); }</code><technical_language>nit: "page writer max logical buffer size"</technical_language>

Target:
public RaptorSessionProperties(StorageManagerConfig config) { sessionProperties = ImmutableList.of( stringProperty( EXTERNAL_BATCH_ID, "Two-phase commit batch ID", null, true), dataSizeSessionProperty( READER_MAX_MERGE_DISTANCE, "Reader: Maximum size of gap between two reads to merge into a single read", config.getOrcMaxMergeDistance(), false), dataSizeSessionProperty( READER_MAX_READ_SIZE, "Reader: Maximum size of a single read", config.getOrcMaxReadSize(), false), dataSizeSessionProperty( READER_STREAM_BUFFER_SIZE, "Reader: Size of buffer for streaming reads", config.getOrcStreamBufferSize(), false), dataSizeSessionProperty( READER_TINY_STRIPE_THRESHOLD, "Reader: Threshold below which an ORC stripe or file will read in its entirety", config.getOrcTinyStripeThreshold(), false), booleanProperty( READER_LAZY_READ_SMALL_RANGES, "Experimental: Reader: Read small file segments lazily", config.isOrcLazyReadSmallRanges(), false), integerProperty( ONE_SPLIT_PER_BUCKET_THRESHOLD, "Experimental: Maximum bucket count at which to produce multiple splits per bucket", config.getOneSplitPerBucketThreshold(), false), booleanProperty( ORC_ZSTD_JNI_DECOMPRESSION_ENABLED, "use JNI based std decompression for reading ORC files", config.isZstdJniDecompressionEnabled(), true), dataSizeSessionProperty( WRITER_MAX_BUFFER_SIZE, "Raptor page writer max logical buffer size", config.getMaxBufferSize(), false)); }
Source:
<code>protected int rwInEqualsInitializer(IASTEqualsInitializer parent, int indirection) { IASTNode grand = parent.getParent(); if (grand instanceof IASTDeclarator) { IBinding binding = ((IASTDeclarator) grand).getName().getBinding(); if (binding instanceof IVariable) { return rwAssignmentToType(((IVariable) binding).getType(), indirection); } } else if (grand instanceof ICPPASTStructuredBindingDeclaration) { return rwInStructuredBinding((ICPPASTStructuredBindingDeclaration) grand); <START> } else if (grand instanceof IASTReturnStatement) { <END> return READ; } return READ | WRITE; }</code><technical_language>understand this change</technical_language>

Target:
protected int rwInEqualsInitializer(IASTEqualsInitializer parent, int indirection) { IASTNode grand = parent.getParent(); if (grand instanceof IASTDeclarator) { IBinding binding = ((IASTDeclarator) grand).getName().getBinding(); if (binding instanceof IVariable) { return rwAssignmentToType(((IVariable) binding).getType(), indirection); } } else if (grand instanceof ICPPASTStructuredBindingDeclaration) { return rwInStructuredBinding((ICPPASTStructuredBindingDeclaration) grand); } return READ | WRITE; }
Source:
<code><START> private static void fileExists(String baseDir, String fileName) throws ValidationException { <END> File file = new File(baseDir, fileName); if (!file.exists()) { throw new ValidationException(format("The file %s should be present.", fileName)); } }</code><technical_language>Is a dependency restriction for smth Files.exists(...)??</technical_language>

Target:
private void fileExists(String baseDir, String fileName) throws ValidationException { File file = new File(baseDir, fileName); if (!file.exists()) { throw new ValidationException(format("The file %s should be present.", fileName)); } }
Source:
<code>public void testEncoded() { SonarQubeServer.Builder builder = SonarQubeServer.newBuilder() .setPassword("pass") .setToken("token"); String encodedPass = builder.getEncodedPassword(); String encodedToken = builder.getEncodedToken(); builder.setEncodedPassword(encodedPass); builder.setEncodedToken(encodedToken); assertThat(builder.getEncodedPassword()).isEqualTo(encodedPass); assertThat(builder.getEncodedToken()).isEqualTo(encodedToken); assertThat(builder.getPassword()).isEqualTo("pass"); <START> assertThat(builder.getToken()).isEqualTo("token"); <END> }</code><technical_language>getters necessary builder? .build() assert built objects</technical_language>

Target:
public void testEncoded() { SonarQubeServer.Builder builder = SonarQubeServer.newBuilder() .setPassword("pass") .setToken("token"); String encodedPass = builder.build().getEncodedPassword(); String encodedToken = builder.build().getEncodedToken(); builder.setEncodedPassword(encodedPass); builder.setEncodedToken(encodedToken); assertThat(builder.build().getEncodedPassword()).isEqualTo(encodedPass); assertThat(builder.build().getEncodedToken()).isEqualTo(encodedToken); assertThat(builder.build().getPassword()).isEqualTo("pass"); assertThat(builder.build().getToken()).isEqualTo("token"); }
Source:
<code>public void testQueryElementPrecedingSiblingVariableDef() throws Exception { final String xpath = " + "VARIABLE_DEF"; final RootNode rootNode = getRootNode("InputXpathMapperAst.java"); final DetailAST[] actual = convertToArray(getXpathItems(xpath, rootNode)); final DetailAST expectedVariableDefNode1 = getSiblingByType(rootNode.getUnderlyingNode(), TokenTypes.CLASS_DEF) .findFirstToken(TokenTypes.OBJBLOCK) .findFirstToken(TokenTypes.METHOD_DEF) .findFirstToken(TokenTypes.SLIST) .findFirstToken(TokenTypes.VARIABLE_DEF); final DetailAST expectedVariableDefNode2 = expectedVariableDefNode1.getNextSibling() .getNextSibling(); final DetailAST[] expected = {expectedVariableDefNode2, expectedVariableDefNode1}; <START> assertArrayEquals("Result nodes differ from expected", expected, actual); <END> }</code><technical_language>please it: final String xpath = "//VARIABLE_DEF[./IDENT[@text='array']]" + "/preceding-sibling::VARIABLE_DEF"; cut xpath element, easy read</technical_language>

Target:
public void testQueryElementPrecedingSiblingVariableDef() throws Exception { final String xpath = " + "VARIABLE_DEF"; final RootNode rootNode = getRootNode("InputXpathMapperAst.java"); final DetailAST[] actual = convertToArray(getXpathItems(xpath, rootNode)); final DetailAST expectedVariableDefNode1 = getSiblingByType(rootNode.getUnderlyingNode(), TokenTypes.CLASS_DEF) .findFirstToken(TokenTypes.OBJBLOCK) .findFirstToken(TokenTypes.METHOD_DEF) .findFirstToken(TokenTypes.SLIST) .findFirstToken(TokenTypes.VARIABLE_DEF); final DetailAST expectedVariableDefNode2 = expectedVariableDefNode1.getNextSibling() .getNextSibling(); final DetailAST[] expected = {expectedVariableDefNode2, expectedVariableDefNode1}; assertThat("Result nodes differ from expected", actual, equalTo(expected)); }
Source:
<code>public void onEvent(PersistenceProcessorImpl.PersistBatchEvent event) throws Exception { Batch batch = event.getBatch(); <START> handlerBatch = batch; <END> for (int i=0; i < batch.getNumEvents(); ++i) { PersistEvent localEvent = batch.events[i]; switch (localEvent.getType()) { case COMMIT: localEvent.getMonCtx().timerStart("commitPersistProcessor"); writer.addCommittedTransaction(localEvent.getStartTimestamp(), localEvent.getCommitTimestamp()); break; case ABORT: break; case TIMESTAMP: localEvent.getMonCtx().timerStart("timestampPersistProcessor"); break; case LOW_WATERMARK: writer.updateLowWatermark(localEvent.getLowWatermark()); break; default: assert(false); } } flush(event.getBatchID()); }</code><technical_language>handlerBatch attribute is required. remove pass batch flush() method: private void flush(Batch batch, long batchID) { ... }</technical_language>

Target:
public void onEvent(PersistenceProcessorImpl.PersistBatchEvent event) throws Exception { Batch batch = event.getBatch(); for (int i=0; i < batch.getNumEvents(); ++i) { PersistEvent localEvent = batch.getEvent(i); switch (localEvent.getType()) { case COMMIT: localEvent.getMonCtx().timerStart("commitPersistProcessor"); writer.addCommittedTransaction(localEvent.getStartTimestamp(), localEvent.getCommitTimestamp()); break; case ABORT: break; case TIMESTAMP: localEvent.getMonCtx().timerStart("timestampPersistProcessor"); break; case LOW_WATERMARK: writer.updateLowWatermark(localEvent.getLowWatermark()); break; default: assert(false); } } flush(batch, event.getBatchID()); }
Source:
<code>public final Publisher<T> onBackpressureBuffer(long capacity, Action onOverflow, BackpressureOverflowStrategy overflowStrategy) { <START> Objects.requireNonNull(overflowStrategy, "starategy is null"); <END> if (capacity <= 0L) { throw new IllegalArgumentException("capacity > 0 required but it was " + capacity); } return new FlowableOnBackpressureBufferStrategy<T>(this, capacity, onOverflow, overflowStrategy); }</code><technical_language>strategy</technical_language>

Target:
public final Publisher<T> onBackpressureBuffer(long capacity, Action onOverflow, BackpressureOverflowStrategy overflowStrategy) { Objects.requireNonNull(overflowStrategy, "strategy is null"); verifyPositive(capacity, "capacity"); return new FlowableOnBackpressureBufferStrategy<T>(this, capacity, onOverflow, overflowStrategy); }
Source:
<code>public boolean saveFacultyMemberProfile(FacultyMemberProfile facultyMemberProfile) { Session session = getSession(); beginTransaction(); boolean success = false; try { session.saveOrUpdate(facultyMemberProfile); success = true; } <START> catch (NullPointerException e) <END> { _logger.error("Save FacultyMemberProfile error.", e); } finally { if(success) commitTransaction(); else rollbackTransaction(); } return success; }</code><technical_language>catch NullPointerException? situation good catch here</technical_language>

Target:
public boolean saveFacultyMemberProfile(FacultyMemberProfile facultyMemberProfile) { Session session = getSession(); beginTransaction(); boolean success = false; try { session.saveOrUpdate(facultyMemberProfile); success = true; } catch (Exception e) { e.printStackTrace(); } finally { if(success) commitTransaction(); else rollbackTransaction(); } return success; }
Source:
<code>public void keyReleased(KeyEvent e) { if (e.keyCode == SWT.F5) { try { for (IRenderer renderer : RendererManager.getCommonRenderers(getSelectedArtifacts(), PresentationType.F5_DIFF)) { <START> for (Artifact art : getSelectedArtifacts()) { <END> if (renderer.getApplicabilityRating(PresentationType.F5_DIFF, art) == IRenderer.SPECIALIZED_KEY_MATCH) { RendererManager.open(art, PresentationType.F5_DIFF); } } } } catch (OseeCoreException ex) { OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); } } }</code><technical_language>This call getSelectedArtifacts 128. this is in a nested for loop, work is done unnecessarily. Recommend moving call 127 variable in for loops</technical_language>

Target:
public void keyReleased(KeyEvent e) { if (e.keyCode == SWT.F5) { try { List<Artifact> artifacts = getSelectedArtifacts(); for (IRenderer renderer : RendererManager.getCommonRenderers(artifacts, PresentationType.F5_DIFF)) { for (Artifact art : artifacts) { if (renderer.getApplicabilityRating(PresentationType.F5_DIFF, art) == IRenderer.SPECIALIZED_KEY_MATCH) { RendererManager.open(art, PresentationType.F5_DIFF); } } } } catch (OseeCoreException ex) { OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); } } }
Source:
<code>public void deleteBlob(String blobIdString) throws CoordinatorException { try { logger.trace("deleteBlob. " + blobIdString); long startTimeInMs = System.currentTimeMillis(); BlobId blobId = getBlobIdFromString(blobIdString); DeleteOperation deleteOperation = new DeleteOperation(datacenterName, connectionPool, requesterPool, responseFailureHandler, getOperationContext(), blobId, <START> operationTimeoutMs, nodeTimeoutMs); <END> deleteOperation.execute(); notificationSystem.onBlobDeleted(blobIdString); coordinatorMetrics.deleteBlobOperationRate.mark(); coordinatorMetrics.deleteBlobOperationLatencyInMs.update(System.currentTimeMillis() - startTimeInMs); } catch (CoordinatorException e) { logger.trace("deleteBlob re-throwing CoordinatorException", e); coordinatorMetrics.countError(CoordinatorMetrics.CoordinatorOperationType.DeleteBlob, e.getErrorCode()); throw e; } }</code><technical_language>coding guidelines</technical_language>

Target:
public void deleteBlob(String blobIdString) throws CoordinatorException { try { logger.trace("deleteBlob. " + blobIdString); long startTimeInMs = System.currentTimeMillis(); BlobId blobId = getBlobIdFromString(blobIdString); DeleteOperation deleteOperation = new DeleteOperation(datacenterName, connectionPool, requesterPool, getOperationContext(), blobId, operationTimeoutMs); deleteOperation.execute(); notificationSystem.onBlobDeleted(blobIdString); coordinatorMetrics.deleteBlobOperationRate.mark(); coordinatorMetrics.deleteBlobOperationLatencyInMs.update(System.currentTimeMillis() - startTimeInMs); } catch (CoordinatorException e) { logger.trace("deleteBlob re-throwing CoordinatorException", e); coordinatorMetrics.countError(CoordinatorMetrics.CoordinatorOperationType.DeleteBlob, e.getErrorCode()); throw e; } }
Source:
<code>public Map<String, Object> parse(String input) { try { final Object compiled = fn.apply(input); if (!(compiled instanceof Map)) { <START> throw new ParseException("JavaScript parsed value must in {key: value} format!"); <END> } return (Map) compiled; } catch (Exception e) { throw new ParseException(e, "Unable to parse row [%s]", input); } }</code><technical_language>"must in"</technical_language>

Target:
public Map<String, Object> parse(String input) { try { final Object compiled = fn.apply(input); if (!(compiled instanceof Map)) { throw new ParseException("JavaScript parsed value must be in {key: value} format!"); } return (Map) compiled; } catch (Exception e) { throw new ParseException(e, "Unable to parse row [%s]", input); } }
Source:
<code>public void shouldThrowWhenParsingNonNumericNode() throws Exception { exception.expect(JWTDecodeException.class); exception.expectMessage("The claim 'key' contained an unexpected value."); Map<String, JsonNode> tree = new HashMap<>(); TextNode node = new TextNode("123456789"); tree.put("key", node); <START> deserializer.getDateFromSeconds(tree, "key"); <END> }</code><technical_language>assertions caught exception.expect? if getDateFromSeconds explodes</technical_language>

Target:
public void shouldThrowWhenParsingNonNumericNode() throws Exception { exception.expect(JWTDecodeException.class); exception.expectMessage("The claim 'key' contained a non-numeric date value."); Map<String, JsonNode> tree = new HashMap<>(); TextNode node = new TextNode("123456789"); tree.put("key", node); deserializer.getDateFromSeconds(tree, "key"); }
Source:
<code><START> public void testManipulateLogger() throws Exception { <END> RestClient client = SERVER_TEST.rest().create(); RestResponse response = sync(client.raw().put("/rest/v2/logging/loggers/org.infinispan.TESTLOGGER?level=WARN&appender=STDOUT")); assertEquals(204, response.getStatus()); response = sync(client.raw().get("/rest/v2/logging/loggers")); assertTrue("Logger not found", findLogger(response, "org.infinispan.TESTLOGGER", "WARN", "STDOUT")); response = sync(client.raw().put("/rest/v2/logging/loggers/org.infinispan.TESTLOGGER?level=ERROR&appender=File")); assertEquals(204, response.getStatus()); response = sync(client.raw().get("/rest/v2/logging/loggers")); assertTrue("Logger not found", findLogger(response, "org.infinispan.TESTLOGGER", "ERROR", "File")); response = sync(client.raw().delete("/rest/v2/logging/loggers/org.infinispan.TESTLOGGER")); assertEquals(204, response.getStatus()); response = sync(client.raw().get("/rest/v2/logging/loggers")); assertFalse("Logger should not be found", findLogger(response, "org.infinispan.TESTLOGGER", "ERROR")); }</code><technical_language>duplicate test RestLoggingClient? avoid issues in RestLoggingClient :)</technical_language>

Target:
public void testManipulateLogger() throws Exception { RestClient client = SERVER_TEST.rest().create(); RestResponse response = sync(client.server().logging().setLogger("org.infinispan.TESTLOGGER", "WARN", "STDOUT")); assertEquals(204, response.getStatus()); response = sync(client.server().logging().listLoggers()); assertTrue("Logger not found", findLogger(response, "org.infinispan.TESTLOGGER", "WARN", "STDOUT")); response = sync(client.server().logging().setLogger("org.infinispan.TESTLOGGER", "ERROR", "File")); assertEquals(204, response.getStatus()); response = sync(client.server().logging().listLoggers()); assertTrue("Logger not found", findLogger(response, "org.infinispan.TESTLOGGER", "ERROR", "File")); response = sync(client.server().logging().removeLogger("org.infinispan.TESTLOGGER")); assertEquals(204, response.getStatus()); response = sync(client.server().logging().listLoggers()); assertFalse("Logger should not be found", findLogger(response, "org.infinispan.TESTLOGGER", "ERROR")); }
Source:
<code>public Location resolvePlaceLocation(String nameOfLocation) throws InvalidLocationException, LocationDefinitionErrorException { nameOfLocation = nameOfLocation.trim(); <START> if (nameOfLocation.length() == 0) { <END> throw new InvalidLocationException("empty address"); } if (!cache.containsKey(nameOfLocation)) { try { Location result = resolvePlaceLocationGoogle(nameOfLocation); cache.put(nameOfLocation, result); } catch (QueryLimitException e) { try { Location result = resolvePlaceLocationYandex(nameOfLocation); cache.put(nameOfLocation, result); } catch (InvalidLocationException ie) { cache.put(nameOfLocation, null); } } catch (InvalidLocationException e) { cache.put(nameOfLocation, null); } } if (cache.get(nameOfLocation) == null) { throw new InvalidLocationException("Unknown place"); } return cache.get(nameOfLocation); }</code><technical_language>String.isEmpty()</technical_language>

Target:
public Location resolvePlaceLocation(String nameOfLocation) throws InvalidLocationException, LocationDefinitionErrorException, MalformedURLException { nameOfLocation = nameOfLocation.trim(); if (nameOfLocation.isEmpty()) { throw new InvalidLocationException("empty address"); } if (!cache.containsKey(nameOfLocation)) { try { Location result = resolvePlaceLocationGoogle(nameOfLocation); cache.put(nameOfLocation, result); } catch (QueryLimitException | LocationDefinitionErrorException e) { System.err.println(e.getMessage()); try { Location result = resolvePlaceLocationYandex(nameOfLocation); cache.put(nameOfLocation, result); } catch (InvalidLocationException ie) { cache.put(nameOfLocation, null); } } catch (InvalidLocationException e) { cache.put(nameOfLocation, null); } } if (cache.get(nameOfLocation) == null) { throw new InvalidLocationException("Unknown place"); } return cache.get(nameOfLocation); }
Source:
<code>public MutableDocumentRevision mutableCopy() { try { BasicDocumentRevision rev = datastore.getDocument(this.getId()); if (rev == null) { return null; <START> } <END> if (!rev.getRevision().equals(this.getRevision())) { return null; } return rev.mutableCopy(); } catch (DocumentNotFoundException e){ logger.log(Level.SEVERE,String.format("Failed to load document %s rom datastore",this.toString()),e); return null; } }</code><technical_language>remove this now, I thought exception errors nowadays</technical_language>

Target:
public MutableDocumentRevision mutableCopy() { try { BasicDocumentRevision rev = datastore.getDocument(this.getId()); if (!rev.getRevision().equals(this.getRevision())) { return null; } return rev.mutableCopy(); } catch (DocumentNotFoundException e){ logger.log(Level.SEVERE,String.format("Failed to load document %s from datastore",this.toString()),e); return null; } }
Source:
<code>@Override public final void registerUser(final School.ItemType collectionType, final String itemId, final String userId, final String registrationKey) throws AuthenticationException { if (authService == null) { authService = Authentication.AuthenticationService.newBlockingStub(getRpcChannel()); } final Authentication.AuthRequest request = Authentication.AuthRequest.newBuilder() .setAuthId(userId) .setItemId(itemId) .setItemType(collectionType) .build(); final Authentication.UserRegistration.Builder creationRequest = Authentication.UserRegistration.newBuilder() .setItemRequest(request); if (registrationKey != null) { creationRequest.setRegistrationKey(registrationKey); } Message.DefaultResponse response = null; try { response = authService.registerUser(getNewRpcController(), creationRequest.build()); if (response.hasException()) { final AuthenticationException authExcep = new AuthenticationException("Exception with authentication server", AuthenticationException.OTHER); authExcep.setProtoException(response.getException()); throw authExcep; } } catch (ServiceException e) { <START> e.printStackTrace(); <END> throw new AuthenticationException(e); } }</code><technical_language>remove this stacktrace</technical_language>

Target:
@Override public final void registerUser(final School.ItemType collectionType, final String itemId, final String userId, final String registrationKey) throws AuthenticationException { if (authService == null) { authService = Authentication.AuthenticationService.newBlockingStub(getRpcChannel()); } final Authentication.AuthRequest request = Authentication.AuthRequest.newBuilder() .setAuthId(userId) .setItemId(itemId) .setItemType(collectionType) .build(); final Authentication.UserRegistration.Builder creationRequest = Authentication.UserRegistration.newBuilder() .setItemRequest(request); if (registrationKey != null) { creationRequest.setRegistrationKey(registrationKey); } Message.DefaultResponse response = null; try { response = authService.registerUser(getNewRpcController(), creationRequest.build()); if (response.hasException()) { final AuthenticationException authExcep = new AuthenticationException("Exception with authentication server", AuthenticationException.OTHER); authExcep.setProtoException(response.getException()); throw authExcep; } } catch (ServiceException e) { throw new AuthenticationException(e); } }
Source:
<code>private void createButtons() { ButtonType confirmButtonType = new ButtonType("Confirm", ButtonData.OK_DONE); getDialogPane().getButtonTypes().addAll(confirmButtonType, ButtonType.CANCEL); setResultConverter(dialogButton -> { <START> if (dialogButton == confirmButtonType) { <END> if (!issuepickerQueryField.isDisabled()) issuepickerQueryField.appendText(";"); return state.getSelectedIssues().stream().map(TurboIssue::toString).collect(Collectors.toList()); } return null; }); }</code><technical_language>Is == supposed here? check type of button enum value</technical_language>

Target:
private void createButtons() { ButtonType confirmButtonType = new ButtonType("Confirm", ButtonData.OK_DONE); getDialogPane().getButtonTypes().addAll(confirmButtonType, ButtonType.CANCEL); setResultConverter(dialogButton -> { Optional<TurboIssue> selectedIssue = state.getSelectedIssue(); if (dialogButton.getButtonData() == ButtonData.OK_DONE && selectedIssue.isPresent()) { return selectedIssue.get().toString(); } return null; }); }
Source:
<code>private static List<String> readLines(InputFile file) { try { <START> return new BufferedReader(new StringReader(file.contents())).lines().collect(Collectors.toList()); <END> } catch (IOException e) { throw new IllegalStateException("Unable to read " + file, e); } }</code><technical_language>I BufferedReader creation put a try-with-resource ensure is closed end</technical_language>

Target:
private static List<String> readLines(InputFile file) { try (BufferedReader br = new BufferedReader(new StringReader(file.contents()))) { return br.lines().collect(Collectors.toList()); } catch (IOException e) { throw new IllegalStateException("Unable to read " + file, e); } }
Source:
<code>public ContentValuesAssert containsValue(Object expectedValue) { isNotNull(); Set<Map.Entry<String, Object>> entries = actual.valueSet(); List<Object> values = new ArrayList<Object>(entries.size()); for (Map.Entry<String, Object> entry : entries) { values.add(entry.getValue()); } assertThat(values) .overridingErrorMessage("Expected <%s> but was not found", expectedValue.toString()) <START> .contains(expectedValue); <END> return this; }</code><technical_language>spaces :)</technical_language>

Target:
public ContentValuesAssert containsValue(Object expectedValue) { isNotNull(); Set<Map.Entry<String, Object>> entries = actual.valueSet(); List<Object> values = new ArrayList<Object>(entries.size()); for (Map.Entry<String, Object> entry : entries) { values.add(entry.getValue()); } assertThat(values) .overridingErrorMessage("Expected <%s> but was not found.", expectedValue) .contains(expectedValue); return this; }
Source:
<code><START> public EcdhPskServerKeyExchange(ECDHECryptography ecdhe, Random clientRandom, Random serverRandom, <END> int namedCurveId, InetSocketAddress peerAddress) throws GeneralSecurityException { this(namedCurveId, peerAddress); publicKey = ecdhe.getPublicKey(); ECParameterSpec parameters = publicKey.getParams(); point = publicKey.getW(); pointEncoded = ECDHECryptography.encodePoint(point, parameters.getCurve()); }</code><technical_language>null checks</technical_language>

Target:
public EcdhPskServerKeyExchange(ECDHECryptography ecdhe, Random clientRandom, Random serverRandom, int namedCurveId, InetSocketAddress peerAddress) { this(null, ecdhe, clientRandom, serverRandom, namedCurveId, peerAddress); }
Source:
<code>public void onWebGuiAvailable() { mEventPollerFuture = mScheduledExecutor.scheduleAtFixedRate(new Runnable() { private long mLastEventId = 0; private AsyncState currentState = null; @Override public void run() { if ((currentState == null) || (!currentState.isRunning())) { Log.d(TAG, "Reading events starting with id " + mLastEventId); currentState = mApi.getEvents(mLastEventId, new RestApi.OnReceiveEventListener() { @Override public void onEvent(final long id, final String eventType, final Bundle eventData) { Intent intent = new Intent(); intent.setAction(EVENT_BASE_URL + "." + eventType); intent.replaceExtras(eventData); mContext.sendBroadcast(intent); Log.d(TAG, "Event broadcast for " + eventType); } @Override public void onDone(long id) { if (mLastEventId < id) mLastEventId = id; } }); } } <START> }, EVENT_UPDATE_INTERVAL, EVENT_UPDATE_INTERVAL, TimeUnit.MILLISECONDS); <END> }</code><technical_language>initialDelay 0, starts immediately</technical_language>

Target:
public void onWebGuiAvailable() { Log.d(TAG, "WebGUI available. Starting event processor."); updateFolderMap(); synchronized (mMainThreadHandler) { mShutdown = false; mMainThreadHandler.removeCallbacks(this); mMainThreadHandler.postDelayed(this, EVENT_UPDATE_INTERVAL); } }
Source:
<code>public boolean isEmpty() { <START> return groupEntryCount.get(getGroupId()) == 0; <END> }</code><technical_language>original implementation return headBlockIndex.get(getGroupId()) == NULL; idea is this file a refactor. Also, entryCount is reserve list size in output function in multimap_agg, removed adopt multimap_from_entries approach</technical_language>

Target:
public boolean isEmpty() { return headBlockIndex.get(getGroupId()) == NULL; }
Source:
<code>void onSubmitClicked(ClickEvent e) { if (validate()) { if (isTopic) { topic.content = editText.getText(); TopicController.get().updateTopic(topic); } else { if (replyId != null) { <START> ReplyController.get(topic.id).updateReply(replyId, editText.getText()); <END> } else { ReplyController.get(topic.id).addReply(replyId, editText.getText()); } } } }</code><technical_language>reply controller get a parameter. get a singleton getter. This is a bad sign</technical_language>

Target:
void onSubmitClicked(ClickEvent e) { if (validate()) { if (isTopic) { topic.content = editText.getText(); TopicController.get().updateTopic(topic); } else { if (replyId != null) { ReplyController.get().getThread(topic.id).updateReply(replyId, editText.getText()); } else { ReplyController.get().getThread(topic.id).addReply(replyId, editText.getText()); } } } }
Source:
<code>void test(SessionFactoryScope scope) { scope.inTransaction( session -> { final Person person = session.createQuery( "select p from Person p", Person.class ).getSingleResult(); final SortedSet<Phone> phones = person.getPhones(); <START> assertThat( phones.size(), is( 3 ) ); <END> } ); }</code><technical_language>assert phones in fact sorted in proper order</technical_language>

Target:
void test(SessionFactoryScope scope) { scope.inTransaction( session -> { final Person person = session.createQuery( "select p from Person p", Person.class ).getSingleResult(); final SortedSet<Phone> phones = person.getPhones(); assertThat( phones, IsIterableContainingInOrder.contains( new Phone( "123-456-789" ), new Phone( "234-567-891" ), new Phone( "345-678-912" ), new Phone( "456-789-123" ), new Phone( "567-891-234" ), new Phone( "678-912-345" ), new Phone( "789-123-456" ), new Phone( "891-234-567" ), new Phone( "912-345-678" ) ) ); } ); }
Source:
<code>public DLNAMediaDatabase(String name) { String dir = "database"; dbName = name; File fileDir = new File(dir); boolean defaultLocation = fileDir.mkdir() || fileDir.exists(); if (defaultLocation) { String to_delete = "to_delete"; File checkDir = new File(to_delete); if (checkDir.exists()) { defaultLocation = checkDir.delete(); } else { defaultLocation = checkDir.mkdir(); if (defaultLocation) { defaultLocation = checkDir.delete(); } } } if (Platform.isWindows() && !defaultLocation) { String profileDir = PMS.getConfiguration().getProfileDirectory(); url = String.format("jdbc:h2:%s\\%s/%s", profileDir, dir, dbName); fileDir = new File(profileDir, dir); } else { url = "jdbc:h2:" + dir + "/" + dbName; } dbDir = fileDir.getAbsolutePath(); LOGGER.debug("Using database URL: " + url); LOGGER.info("Using database located at: " + dbDir); try { Class.forName("org.h2.Driver"); } catch (ClassNotFoundException e) { <START> LOGGER.debug("Caught exception: " + e.getMessage()); <END> } JdbcDataSource ds = new JdbcDataSource(); ds.setURL(url); ds.setUser("sa"); ds.setPassword(""); cp = JdbcConnectionPool.create(ds); }</code><technical_language>is this error suppressed</technical_language>

Target:
public DLNAMediaDatabase(String name) { String dir = "database"; dbName = name; File fileDir = new File(dir); boolean defaultLocation = fileDir.mkdir() || fileDir.exists(); if (defaultLocation) { String to_delete = "to_delete"; File checkDir = new File(to_delete); if (checkDir.exists()) { defaultLocation = checkDir.delete(); } else { defaultLocation = checkDir.mkdir(); if (defaultLocation) { defaultLocation = checkDir.delete(); } } } if (Platform.isWindows() && !defaultLocation) { String profileDir = PMS.getConfiguration().getProfileDirectory(); url = String.format("jdbc:h2:%s\\%s/%s", profileDir, dir, dbName); fileDir = new File(profileDir, dir); } else { url = "jdbc:h2:" + dir + "/" + dbName; } dbDir = fileDir.getAbsolutePath(); LOGGER.debug("Using database URL: " + url); LOGGER.info("Using database located at: " + dbDir); try { Class.forName("org.h2.Driver"); } catch (ClassNotFoundException e) { LOGGER.error(null, e); } JdbcDataSource ds = new JdbcDataSource(); ds.setURL(url); ds.setUser("sa"); ds.setPassword(""); cp = JdbcConnectionPool.create(ds); }
Source:
<code>public static void validateSinkTopic(ReadableConfig tableOptions) { String errorMessageTemp = "Flink Kafka sink currently only supports single topic, but got %s: %s."; if (!isSingleTopic(tableOptions)) { if (tableOptions.getOptional(TOPIC_PATTERN).isPresent()) { throw new ValidationException(String.format( errorMessageTemp, "'topic-pattern'", tableOptions.get(TOPIC_PATTERN) )); } else { throw new ValidationException(String.format( <START> errorMessageTemp, "topic-list", tableOptions.get(TOPIC) <END> )); } } }</code><technical_language>"topic-list" -> "topic"? "topic-list" option</technical_language>

Target:
public static void validateSinkTopic(ReadableConfig tableOptions) { String errorMessageTemp = "Flink Kafka sink currently only supports single topic, but got %s: %s."; if (!isSingleTopic(tableOptions)) { if (tableOptions.getOptional(TOPIC_PATTERN).isPresent()) { throw new ValidationException(String.format( errorMessageTemp, "'topic-pattern'", tableOptions.get(TOPIC_PATTERN) )); } else { throw new ValidationException(String.format( errorMessageTemp, "'topic'", tableOptions.get(TOPIC) )); } } }
Source:
<code>public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ShutDownVspCommand)) return false; <START> if (!super.equals(o)) return false; <END> ShutDownVspCommand that = (ShutDownVspCommand) o; if (_dhcpOptions != null ? !_dhcpOptions.equals(that._dhcpOptions) : that._dhcpOptions != null) return false; if (_network != null ? !_network.equals(that._network) : that._network != null) return false; return true; }</code><technical_language>coding standards, please wrap if blocks curly braces</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ShutDownVspCommand)) { return false; } ShutDownVspCommand that = (ShutDownVspCommand) o; return super.equals(that) && Objects.equals(_dhcpOptions, that._dhcpOptions) && Objects.equals(_network, that._network); }
Source:
<code>public void importToKeystore() { if (null == uploadedFileServer || StringUtils.isBlank(alias)) { <START> HelperUtil.addMessageError(null, "Alias and Server upload are required."); <END> return; } SimpleCertificateResponseMessageType response; if (MapUtils.isNotEmpty(listIntermediate) && null != uploadedFileRoot) { response = service.importToKeystore(alias, uploadedFileServer, listIntermediate, uploadedFileRoot); } else { response = service.importToKeystore(alias, uploadedFileServer, null, null); } if (null == response) { HelperUtil.addMessageError(null, "Fail to import to keystore."); } else if (response.isStatus()) { HelperUtil.addMessageInfo(null, "Import to Keystore is successful: " + alias); } else { HelperUtil.addMessageError(null, response.getMessage()); } }</code><technical_language>message more clear</technical_language>

Target:
public void importToKeystore() { if (null == uploadedFileServer || StringUtils.isBlank(alias)) { HelperUtil.addMessageError(null, "Alias and Server Certificate are required."); return; } SimpleCertificateResponseMessageType response; if (MapUtils.isNotEmpty(listIntermediate) && null != uploadedFileRoot) { response = service.importToKeystore(alias, uploadedFileServer, listIntermediate, uploadedFileRoot); } else { response = service.importToKeystore(alias, uploadedFileServer, null, null); } if (null == response) { HelperUtil.addMessageError(null, "Fail to import to temporary keystore."); } else if (response.isStatus()) { HelperUtil.addMessageInfo(null, "Import to temporary keystore is successful: " + alias); } else { HelperUtil.addMessageError(null, response.getMessage()); } }
Source:
<code>public void tearDown() throws Exception { <START> testWorkspaceServiceClient.delete(WORKSPACE_NEW_NAME, workspace.getOwner().getName()); <END> }</code><technical_language>workspaces in this test? names</technical_language>

Target:
public void tearDown() throws Exception { testWorkspaceServiceClient.delete(WORKSPACE_NEW_NAME, testWorkspace.getOwner().getName()); }
Source:
<code><START> public Class<?> getRawType() { <END> return token.getRawType(); }</code><technical_language>this <? super T></technical_language>

Target:
public Class<? super T> getRawType() { return token.getRawType(); }
Source:
<code>public void getRandomPage() { if (getCallback() != null && getCard() != null) { setProgress(true); new RandomSummaryClient().request(getCard().wikiSite(), new RandomSummaryClient.Callback() { @Override public void onSuccess(@NonNull Call<RbPageSummary> call, @NonNull PageTitle title) { setProgress(false); if (getCallback() != null && getCard() != null) { getCallback().onSelectPage(getCard(), new HistoryEntry(title, HistoryEntry.SOURCE_FEED_RANDOM)); } } @Override public void onError(@NonNull Call<RbPageSummary> call, @NonNull Throwable t) { <START> L.w("Failed to get random card from network. Falling back to reading lists.", t); getRandomPageFromCompilation(t); <END> setProgress(false); } }); } }</code><technical_language>If intend this happen offline (rather in general error case), add a check for if (ThrowableUtil.isOffline(t))? update some of logic/verbiage reflect want a page a compilation reading list of of error</technical_language>

Target:
public void getRandomPage() { if (getCallback() != null && getCard() != null) { setProgress(true); new RandomSummaryClient().request(getCard().wikiSite(), new RandomSummaryClient.Callback() { @Override public void onSuccess(@NonNull Call<RbPageSummary> call, @NonNull PageTitle title) { setProgress(false); if (getCallback() != null && getCard() != null) { getCallback().onSelectPage(getCard(), new HistoryEntry(title, HistoryEntry.SOURCE_FEED_RANDOM)); } } @Override public void onError(@NonNull Call<RbPageSummary> call, @NonNull Throwable t) { L.w("Failed to get random card from network. Falling back to compilations.", t); getRandomPageFromCompilation(t); setProgress(false); } }); } }
Source:
<code>protected void handleError(final Exception e, final String correlationUid, final String organisationIdentification, final String deviceIdentification, final String messageType) { LOGGER.error("Handling error for message type: " + messageType, e); OsgpException osgpException = null; if (e instanceof OsgpException) { osgpException = (OsgpException) e; } else { osgpException = new TechnicalException(ComponentType.DOMAIN_ADMIN, "An unknown error occurred", e); } <START> this.webServiceResponseMessageSender.send(ResponseMessage.newResponseMessageBuilder() <END> .withCorrelationUid(correlationUid).withOrganisationIdentification(organisationIdentification) .withDeviceIdentification(deviceIdentification).withResult(ResponseMessageResultType.NOT_OK) .withOsgpException(osgpException).withDataObject(e).build()); }</code><technical_language>Extract building of ResponseMessage variable (in eclipse, select text, right-click > refactor > extract local variable / select code + shift+alt+L). This code a bit more readable, especially passing in other besides ResponseMessage</technical_language>

Target:
protected void handleError(final Exception e, final String correlationUid, final String organisationIdentification, final String deviceIdentification, final String messageType) { LOGGER.error("Handling error for message type: " + messageType, e); OsgpException osgpException = null; if (e instanceof OsgpException) { osgpException = (OsgpException) e; } else { osgpException = new TechnicalException(ComponentType.DOMAIN_ADMIN, "An unknown error occurred", e); } ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(correlationUid).withOrganisationIdentification(organisationIdentification) .withDeviceIdentification(deviceIdentification).withResult(ResponseMessageResultType.NOT_OK) .withOsgpException(osgpException).withDataObject(e).build(); this.webServiceResponseMessageSender.send(responseMessage); }
Source:
<code>public static Map<String, String> constructMap(Properties properties) { <START> Map<String, String> propsMap = null; <END> Properties combinedProperties = ConfigManager.combineDefaultProperties(properties); propsMap = new HashMap<String, String>(); Enumeration<?> keys = combinedProperties.propertyNames(); while (keys.hasMoreElements()) { String key = keys.nextElement().toString().trim(); String value = combinedProperties.getProperty(key).trim(); propsMap.put(key, value); } return propsMap; }</code><technical_language>combine this line HashMap declaration? Setting null is useful</technical_language>

Target:
public static Map<String, String> constructMap(Properties properties) { Properties combinedProperties = ConfigManager.combineDefaultProperties(properties); Map<String, String> propsMap = new HashMap<String, String>(); Enumeration<?> keys = combinedProperties.propertyNames(); while (keys.hasMoreElements()) { String key = keys.nextElement().toString().trim(); String value = combinedProperties.getProperty(key).trim(); propsMap.put(key, value); } return propsMap; }
Source:
<code>private static RegularArgument getSecureArgument(List<Argument> arguments, int nArg) { return arguments.stream() .map(RegularArgument.class::cast) .filter(argument -> { Name keywordArgument = argument.keywordArgument(); return keywordArgument != null && keywordArgument.name().equals(SECURE); }) <START> .findFirst().orElse(checkSensitivePositionalArgument(arguments, nArg)); <END> }</code><technical_language>Optional#orElseGet instead of orElse ? is evaluated matter is present not</technical_language>

Target:
private static RegularArgument getSecureArgument(List<Argument> arguments, int nArg) { return arguments.stream() .map(RegularArgument.class::cast) .filter(argument -> { Name keywordArgument = argument.keywordArgument(); return keywordArgument != null && keywordArgument.name().equals(SECURE); }) .findFirst().orElseGet(() -> checkSensitivePositionalArgument(arguments, nArg)); }
Source:
<code>public void processStream(InputStream input) throws IOException { RuntimeEnvironment env = RuntimeEnvironment.getInstance(); try (BufferedReader in = new BufferedReader(new InputStreamReader(input))) { String line; while ((line = in.readLine()) != null) { <START> if (line.startsWith("R")) { <END> String[] parts = line.split("\t"); if (parts.length < 3 || parts[1].length() <= 0 || renamedFiles.contains(parts[1])) { continue; } renamedFiles.add(parts[2]); } } } }</code><technical_language>more strict - preferably regexp matching</technical_language>

Target:
public void processStream(InputStream input) throws IOException { RuntimeEnvironment env = RuntimeEnvironment.getInstance(); try (BufferedReader in = new BufferedReader(new InputStreamReader(input))) { String line; Pattern pattern = Pattern.compile("^R\\d+\\s.*"); while ((line = in.readLine()) != null) { if (pattern.matcher(line).matches()) { String[] parts = line.split("\t"); if (parts.length < 3 || parts[1].length() <= 0 || renamedFiles.contains(parts[1])) { continue; } renamedFiles.add(parts[2]); } } } }
Source:
<code>public void testIteratorCloseHandleOnError() throws Exception { Spiffy s = dbi.onDemand(Spiffy.class); try { s.crashNow(); fail("Should throw a JDBIException"); } catch (JdbiException e) { <START> assertThat(e).isNotNull(); <END> } assertThat(tracker.hasOpenedHandle()).isFalse(); }</code><technical_language>converted AssertJ exception handling</technical_language>

Target:
public void testIteratorCloseHandleOnError() throws Exception { Spiffy s = dbi.onDemand(Spiffy.class); assertThatExceptionOfType(JdbiException.class).isThrownBy(s::crashNow); assertThat(tracker.hasOpenedHandle()).isFalse(); }