auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public ReportableEntityHandler getHandler(HandlerKey handlerKey) { return handlers.computeIfAbsent(handlerKey, k -> { switch (handlerKey.getEntityType()) { case POINT: return new ReportPointHandlerImpl(handlerKey.getHandle(), blockedItemsPerBatch, senderTaskFactory.createSenderTasks(handlerKey, defaultFlushThreads), validationConfig, false, true); <START> case DELTA_COUNTER: <END> return new DeltaCounterHandlerImpl(handlerKey.getHandle(), blockedItemsPerBatch, senderTaskFactory.createSenderTasks(handlerKey, defaultFlushThreads), validationConfig, ReportableEntityType.DELTA_COUNTER, true, reportIntervalSeconds); case HISTOGRAM: return new ReportPointHandlerImpl(handlerKey.getHandle(), blockedItemsPerBatch, senderTaskFactory.createSenderTasks(handlerKey, defaultFlushThreads), validationConfig, true, true); case SOURCE_TAG: return new ReportSourceTagHandlerImpl(handlerKey.getHandle(), blockedItemsPerBatch, senderTaskFactory.createSenderTasks(handlerKey, SOURCE_TAGS_NUM_THREADS)); case TRACE: return new SpanHandlerImpl(handlerKey.getHandle(), blockedItemsPerBatch, senderTaskFactory.createSenderTasks(handlerKey, defaultFlushThreads), validationConfig); case TRACE_SPAN_LOGS: return new SpanLogsHandlerImpl(handlerKey.getHandle(), blockedItemsPerBatch, senderTaskFactory.createSenderTasks(handlerKey, defaultFlushThreads)); default: throw new IllegalArgumentException("Unexpected entity type " + handlerKey.getEntityType().name() + " for " + handlerKey.getHandle()); } }); }</code><technical_language>delta counter handler is effectively in place only, I cleaner (and moving parts) if modify ReportableEntityHandlerFactoryImpl WavefrontPortUnificationHandler -- approach PushAgent.startHistogramListeners(), i.e. create a new anonymous inheritor of ReportableEntityHandlerFactory. working entity type</technical_language>

Target:
public ReportableEntityHandler getHandler(HandlerKey handlerKey) { return handlers.computeIfAbsent(handlerKey, k -> { switch (handlerKey.getEntityType()) { case POINT: return new ReportPointHandlerImpl(handlerKey.getHandle(), blockedItemsPerBatch, senderTaskFactory.createSenderTasks(handlerKey, defaultFlushThreads), validationConfig, false, true); case HISTOGRAM: return new ReportPointHandlerImpl(handlerKey.getHandle(), blockedItemsPerBatch, senderTaskFactory.createSenderTasks(handlerKey, defaultFlushThreads), validationConfig, true, true); case SOURCE_TAG: return new ReportSourceTagHandlerImpl(handlerKey.getHandle(), blockedItemsPerBatch, senderTaskFactory.createSenderTasks(handlerKey, SOURCE_TAGS_NUM_THREADS)); case TRACE: return new SpanHandlerImpl(handlerKey.getHandle(), blockedItemsPerBatch, senderTaskFactory.createSenderTasks(handlerKey, defaultFlushThreads), validationConfig); case TRACE_SPAN_LOGS: return new SpanLogsHandlerImpl(handlerKey.getHandle(), blockedItemsPerBatch, senderTaskFactory.createSenderTasks(handlerKey, defaultFlushThreads)); default: throw new IllegalArgumentException("Unexpected entity type " + handlerKey.getEntityType().name() + " for " + handlerKey.getHandle()); } }); }
Source:
<code>public static boolean skipMd5CheckPerRequest(AmazonWebServiceRequest request) { if (System.getProperty("com.amazonaws.services.s3.disableGetObjectMD5Validation") != null) { return true; } if (request instanceof GetObjectRequest) { final GetObjectRequest getObjectRequest = (GetObjectRequest) request; if (getObjectRequest.getRange() != null) { return true; } if (getObjectRequest.getSSECustomerKey() != null) { return true; } } else if (request instanceof PutObjectRequest) { final PutObjectRequest putObjectRequest = (PutObjectRequest) request; final ObjectMetadata om = putObjectRequest.getMetadata(); if (om != null && om.getSSEAlgorithm() != null) { return true; } if (putObjectRequest.getSSECustomerKey() != null) { return true; } if (putObjectRequest.getSSEAwsKeyManagementParams() != null && <START> putObjectRequest.getSSEAwsKeyManagementParams().getAwsKmsKeyId() != null) { <END> return true; } } else if (request instanceof UploadPartRequest) { final UploadPartRequest uploadPartRequest = (UploadPartRequest) request; return uploadPartRequest.getSSECustomerKey() != null; } return false; }</code><technical_language>Include check for getEncryption key is optional. ( putObjectRequest.getSSEAwsKeyManagementParams() != null && ( putObjectRequest.getSSEAwsKeyManagementParams().getAwsKmsKeyId() != null || putObjectRequest.getSSEAwsKeyManagementParams.getEncryption() != null ) )</technical_language>

Target:
public static boolean skipMd5CheckPerRequest(AmazonWebServiceRequest request) { if (System.getProperty("com.amazonaws.services.s3.disableGetObjectMD5Validation") != null) { return true; } if (request instanceof GetObjectRequest) { final GetObjectRequest getObjectRequest = (GetObjectRequest) request; if (getObjectRequest.getRange() != null) { return true; } if (getObjectRequest.getSSECustomerKey() != null) { return true; } } else if (request instanceof PutObjectRequest) { final PutObjectRequest putObjectRequest = (PutObjectRequest) request; final ObjectMetadata om = putObjectRequest.getMetadata(); if (om != null && om.getSSEAlgorithm() != null) { return true; } if (putObjectRequest.getSSECustomerKey() != null) { return true; } if (putObjectRequest.getSSEAwsKeyManagementParams() != null && (putObjectRequest.getSSEAwsKeyManagementParams().getEncryption() != null || putObjectRequest.getSSEAwsKeyManagementParams().getAwsKmsKeyId() != null)) { return true; } } else if (request instanceof UploadPartRequest) { final UploadPartRequest uploadPartRequest = (UploadPartRequest) request; return uploadPartRequest.getSSECustomerKey() != null; } return false; }
Source:
<code>public void testMultiPutsTimeout() { DELAY_BATCH_MUTATE = 600; Put put1 = new Put(ROW); put1.addColumn(FAMILY, QUALIFIER, VALUE); Put put2 = new Put(ROW); put2.addColumn(FAMILY, QUALIFIER, VALUE); List<Put> puts = new ArrayList<>(); puts.add(put1); puts.add(put2); try { TABLE.batch(puts, new Object[2]); <START> throw new AssertionError("should not reach here"); <END> } catch (Exception e) { Assert.assertTrue( e instanceof RetriesExhaustedException && e.getCause() instanceof RetriesExhaustedException && e.getCause().getCause() instanceof CallTimeoutException); } }</code><technical_language>fail("should reach here");</technical_language>

Target:
public void testMultiPutsTimeout() { DELAY_BATCH_MUTATE = 600; Put put1 = new Put(ROW); put1.addColumn(FAMILY, QUALIFIER, VALUE); Put put2 = new Put(ROW); put2.addColumn(FAMILY, QUALIFIER, VALUE); List<Put> puts = new ArrayList<>(); puts.add(put1); puts.add(put2); try { TABLE.batch(puts, new Object[2]); Assert.fail("should not reach here"); } catch (Exception e) { Assert.assertTrue( e instanceof RetriesExhaustedException && e.getCause() instanceof RetriesExhaustedException && e.getCause().getCause() instanceof CallTimeoutException); } }
Source:
<code>public Map<byte[], List<byte[]>> rollWal(long now) throws IOException { this.isRolling = true; try { this.lastRollTime = now; this.rollRequest.set(false); return wal.rollWriter(true); } finally { this.isRolling = false; synchronized (RollController.class) { <START> RollController.class.notifyAll(); <END> } } }</code><technical_language>a dummy notifyAll flag in synchronized block race... Mind explain a bit is problem want fix here</technical_language>

Target:
public Map<byte[], List<byte[]>> rollWal(long now) throws IOException { this.isRolling = true; try { this.lastRollTime = now; this.rollRequest.set(false); return wal.rollWriter(true); } finally { this.isRolling = false; } }
Source:
<code>public void doFilter(ServletRequest servletRequest, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; <START> if (SecurityContextHolder.getContext().getAuthentication() == null || <END> SecurityContextHolder.getContext().getAuthentication() instanceof AnonymousAuthenticationToken) { Authentication auth = Jenkins.ANONYMOUS; String authenticatedUserFromApiToken = getUserFromAuthorizationHeader(request); String userName = authenticatedUserFromApiToken == null ? getUserFromReverseProxyHeader(request) : authenticatedUserFromApiToken; if (userName != null) { try { UserDetails userDetails = activeDirectorySecurityRealm.getAuthenticationProvider().loadUserByUsername(userName); GrantedAuthority[] authorities = userDetails.getAuthorities(); auth = new UsernamePasswordAuthenticationToken(userName, "", authorities); } catch (UsernameNotFoundException e) { LOGGER.log(Level.FINE, "User from HTTP Header {0} not found in LDAP", userName); } } SecurityContextHolder.getContext().setAuthentication(auth); } chain.doFilter(request, response); }</code><technical_language>Jenkins.getAuthentication()</technical_language>

Target:
public void doFilter(ServletRequest servletRequest, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; if (Jenkins.getAuthentication() instanceof AnonymousAuthenticationToken) { String authenticatedUserFromApiToken = getUserFromAuthorizationHeader(request); String userName = authenticatedUserFromApiToken == null ? getUserFromReverseProxyHeader(request) : authenticatedUserFromApiToken; if (userName != null) { try { UserDetails userDetails = activeDirectorySecurityRealm.getAuthenticationProvider().loadUserByUsername(userName); GrantedAuthority[] authorities = userDetails.getAuthorities(); UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(userName, "", authorities); try (ACLContext _ = ACL.as(auth)) { chain.doFilter(request, response); } return; } catch (UsernameNotFoundException e) { LOGGER.log(Level.FINE, "User from HTTP Header {0} not found in LDAP", userName); } } } chain.doFilter(request, response); }
Source:
<code>CommitUpdate getCommitUpdate(long startTs) { <START> try { return lockWatchEventCache.getCommitUpdate(startTs); } catch (LockWatchFailedException e) { throw new TransactionLockWatchFailedException("Failed to get commit update", e); } <END> }</code><technical_language>explain dependency loop? This is weird a solution. i.e. feels cache code live this class, in this sub-project</technical_language>

Target:
CommitUpdate getCommitUpdate(long startTs) { return lockWatchEventCache.getCommitUpdate(startTs); }
Source:
<code>public SavedPageTimestampCheckService() { <START> super("SavedPageSyncService"); <END> setIntentRedelivery(true); }</code><technical_language>Is this a copy&paste error</technical_language>

Target:
public SavedPageTimestampCheckService() { super("SavedPageTimestampCheckService"); setIntentRedelivery(true); }
Source:
<code>public String loginUser( String username, String password) throws IOException, JSONException { if(username == null || username.isEmpty() || password == null || password.isEmpty()) <START> throw new IOException("invalid input of username or password"); <END> final String url = URL_AUTH + "/" + URL_LOGIN; final JSONObject user = new JSONObject(); user.put("username", username); user.put("password", password); Map<String, String> response = request(url, user, null, HTTP_METHOD_POST); int result = checkResponseCode(response.get(RESPONSE_CODE), "login"); String session_id = response.get("session-id"); if (result != 0 && session_id == null) { Log.w(TAG, "CommonSense login failed: no session id received!"); throw new IOException("login failed with no session id"); } return session_id; }</code><technical_language>@excaliburnan I for ioexception here, IlligalArgumentsException</technical_language>

Target:
public String loginUser( String username, String password) throws IOException, RuntimeException { if(username == null || username.isEmpty() || password == null || password.isEmpty()) throw new IllegalArgumentException("invalid input of username or password"); final String url = URL_AUTH + "/" + URL_LOGIN; final JSONObject user = new JSONObject(); try { user.put("username", username); user.put("password", password); }catch(JSONException JS){ throw new RuntimeException("loginUser failed to create the content for the request"); } Map<String, String> response = request(url, user, null, HTTP_METHOD_POST); int result = checkResponseCode(response.get(RESPONSE_CODE), "login"); if(result != 0) throw new IOException("failed to log in, response code is:" + response.get(RESPONSE_CODE)); String session_id = response.get("session-id"); if (session_id == null) Log.w(TAG, "loginUser returns a null session id"); return session_id; }
Source:
<code>public static long <START> Add0(long <END> arg) { if (doThrow) { throw new Error(); } return 0 + arg; }</code><technical_language>If want this inline, please add $noinline$ marker</technical_language>

Target:
public static long $noinline$Add0(long arg) { if (doThrow) { throw new Error(); } return 0 + arg; }
Source:
<code>public void sendsConfirmationEmail() throws Exception { final Postman postman = Mockito.mock(Postman.class); final Alias alias = new EmAlias(new MkBase().randomAlias(), postman); alias.email("mihai@test.com", "netbout.com/test/verification/link"); final ArgumentCaptor<Envelope> captor = ArgumentCaptor.forClass(Envelope.class); Mockito.verify(postman).send(captor.capture()); final Message msg = captor.getValue().unwrap(); MatcherAssert.assertThat(msg.getFrom().length, Matchers.is(1)); MatcherAssert.assertThat( msg.getSubject(), <START> Matchers.equalTo("Netbout email verification") <END> ); MatcherAssert.assertThat( msg.getAllRecipients()[0].toString(), Matchers.containsString("mihai@test") ); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); MimeMultipart.class.cast(msg.getContent()).writeTo(baos); final String content = new String(baos.toByteArray()); MatcherAssert.assertThat( content, Matchers.containsString( "<p>Hi,<br />Your notification e-mail address" ) ); MatcherAssert.assertThat( content, Matchers.containsString( "<a href=\"netbout.com/test/verification/link\">here</a>" ) ); }</code><technical_language>@amihaiemil move in previous line put in a 80 characters line</technical_language>

Target:
public void sendsConfirmationEmail() throws Exception { final Postman postman = Mockito.mock(Postman.class); final Alias alias = new EmAlias(new MkBase().randomAlias(), postman); alias.email("mihai@test.com", "netbout.com/test/verification/link"); final ArgumentCaptor<Envelope> captor = ArgumentCaptor.forClass(Envelope.class); Mockito.verify(postman).send(captor.capture()); final Message msg = captor.getValue().unwrap(); MatcherAssert.assertThat(msg.getFrom().length, Matchers.is(1)); MatcherAssert.assertThat( msg.getSubject(), Matchers.equalTo("Netbout email verification") ); MatcherAssert.assertThat( msg.getAllRecipients()[0].toString(), Matchers.containsString("mihai@test") ); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); MimeMultipart.class.cast(msg.getContent()).writeTo(baos); final String content = new String(baos.toByteArray(), "UTF-8"); MatcherAssert.assertThat( content, Matchers.containsString( "<p>Hi,<br />Your notification e-mail address" ) ); MatcherAssert.assertThat( content, Matchers.containsString( "<a href=\"netbout.com/test/verification/link\">here</a>" ) ); }
Source:
<code><START> private void setCompression(String compression) throws StandardException { <END> if (compression != null) { compression = compression.trim().toUpperCase(); } if (compression != null && compression.length() > 0) { if (compression.compareTo("BZ2") == 0 || compression.compareTo("BZIP2") == 0) { this.compression = COMPRESSION.BZ2; } else if (compression.compareTo("GZ") == 0 || compression.compareTo("GZIP") == 0) { this.compression = COMPRESSION.GZ; } else if (compression.compareTo("NONE") == 0) { this.compression = COMPRESSION.NONE; } else { throw StandardException.newException(SQLState.UNSUPPORTED_COMPRESSION_FORMAT, compression); } } else { this.compression = COMPRESSION.NONE; } }</code><technical_language>This breaks current of Export(), handle true/false</technical_language>

Target:
private void setCompression(String compression) throws StandardException { if (compression != null) { compression = compression.trim().toUpperCase(); } if (compression!= null && compression.length() > 0) { String f = format.trim().toUpperCase(); if (f.compareTo("PARQUET") == 0) { if (compression.compareTo("SNAPPY") == 0 || compression.compareTo("TRUE") == 0) { this.compression = COMPRESSION.SNAPPY; } else if (compression.compareTo("NONE") == 0 || compression.compareTo("FALSE") == 0) { this.compression = COMPRESSION.NONE; } else throw StandardException.newException(SQLState.UNSUPPORTED_COMPRESSION_FORMAT, compression); } else if (f.compareTo("CSV") == 0) { if (compression.compareTo("BZ2") == 0 || compression.compareTo("BZIP2") == 0) { this.compression = COMPRESSION.BZ2; } else if (compression.compareTo("GZ") == 0 || compression.compareTo("GZIP") == 0 || compression.compareTo("TRUE") == 0) { this.compression = COMPRESSION.GZ; } else if (compression.compareTo("NONE") == 0 || compression.compareTo("FALSE") == 0) { this.compression = COMPRESSION.NONE; } else throw StandardException.newException(SQLState.UNSUPPORTED_COMPRESSION_FORMAT, compression); } } else this.compression = COMPRESSION.NONE; }
Source:
<code>private void setValues(Properties properties) { String cacheLevel = properties.getProperty(JMSConstants.PARAM_CACHE_LEVEL); <START> if (null != cacheLevel && !"".equals(cacheLevel)) { <END> this.cacheLevel = Integer.parseInt(cacheLevel); } else { this.cacheLevel = JMSConstants.CACHE_NONE; } }</code><technical_language>cacheLevel.isEmpty()</technical_language>

Target:
private void setValues(Properties properties) { String cacheLevel = properties.getProperty(JMSConstants.PARAM_CACHE_LEVEL); if (null != cacheLevel && !cacheLevel.isEmpty()) { this.cacheLevel = Integer.parseInt(cacheLevel); } else { this.cacheLevel = JMSConstants.CACHE_NONE; } }
Source:
<code>public void validateThatRemoveIsCalledOnTombstoneInRegionThatIsInitialized() { RegionVersionVector regionVersionVector = mock(RegionVersionVector.class); when(region.isInitialized()).thenReturn(true); when(region.getRegionMap()).thenReturn(regionMap); when(region.getVersionVector()).thenReturn(regionVersionVector); when(region.getDataPolicy()).thenReturn(DataPolicy.PERSISTENT_REPLICATE); when(region.getDiskRegion()).thenReturn(mock(DiskRegion.class)); TombstoneService.ReplicateTombstoneSweeper replicateTombstoneSweeper = new TombstoneService.ReplicateTombstoneSweeper(cacheTime, stats, cancelCriterion, executor); TombstoneService.Tombstone tombstone = new TombstoneService.Tombstone(entry, region, destroyedVersion); tombstone.entry = entry; replicateTombstoneSweeper.expireTombstone(tombstone); replicateTombstoneSweeper.expireBatch(); <START> verify(region, Mockito.atLeastOnce()).getVersionVector(); verify(regionVersionVector, Mockito.atLeastOnce()).recordGCVersion(tombstone.getMemberID(), <END> tombstone.getRegionVersion()); }</code><technical_language>For verifications, reasonable assert specific number of invocations of getVersionVector() recordGCVersion() expect Mockito.times(1) one</technical_language>

Target:
public void validateThatRemoveIsCalledOnTombstoneInRegionThatIsInitialized() { RegionVersionVector regionVersionVector = mock(RegionVersionVector.class); when(region.isInitialized()).thenReturn(true); when(region.getRegionMap()).thenReturn(regionMap); when(region.getVersionVector()).thenReturn(regionVersionVector); when(region.getDataPolicy()).thenReturn(DataPolicy.PERSISTENT_REPLICATE); when(region.getDiskRegion()).thenReturn(mock(DiskRegion.class)); replicateTombstoneSweeper.expireTombstone(tombstone); replicateTombstoneSweeper.expireBatch(); verify(regionMap, Mockito.times(1)).removeTombstone(tombstone.entry, tombstone, false, true); }
Source:
<code>public static final Component[] filterOutShadows(Component[] shadows) { if (shadows == null || shadows.length == 0) return shadows; int length = shadows.length; doBindChildrenInFilter(shadows); if (length == 1) { if (shadows[0] instanceof ShadowElement) { ShadowElement se = ((ShadowElement) shadows[0]); return se.getDistributedChildren().toArray(new Component[0]); } } else { Component parent = null; Component start = null; if (shadows[0] instanceof ShadowElementCtrl) { ShadowElementCtrl se = ((ShadowElementCtrl) shadows[0]); start = se.getFirstInsertion(); } else { start = shadows[0]; parent = start.getParent(); } if (parent instanceof ComponentCtrl) { ComponentCtrl pCtrl = (ComponentCtrl) parent; if (pCtrl.getShadowRoots().isEmpty()) return shadows; } <START> <END> LinkedList<Component> list = new LinkedList<Component>(); for (Component comp : shadows) { if (comp instanceof HtmlShadowElement) { HtmlShadowElement hse = (HtmlShadowElement) comp; list.addAll(hse.getDistributedChildren()); } else { list.add(comp); } } return list.toArray(new Component[0]); } return shadows; }</code><technical_language>is "start" useless now? if is useless, modify more code in this function (previous lines)</technical_language>

Target:
public static final Component[] filterOutShadows(Component[] shadows) { if (shadows == null || shadows.length == 0) return shadows; int length = shadows.length; doBindChildrenInFilter(shadows); if (length == 1) { if (shadows[0] instanceof ShadowElement) { ShadowElement se = ((ShadowElement) shadows[0]); return se.getDistributedChildren().toArray(new Component[0]); } } else { Component parent = null; if (!(shadows[0] instanceof ShadowElementCtrl)) { parent = shadows[0].getParent(); } if (parent instanceof ComponentCtrl) { ComponentCtrl pCtrl = (ComponentCtrl) parent; if (pCtrl.getShadowRoots().isEmpty()) return shadows; } LinkedList<Component> list = new LinkedList<Component>(); for (Component comp : shadows) { if (comp instanceof HtmlShadowElement) { HtmlShadowElement hse = (HtmlShadowElement) comp; list.addAll(hse.getDistributedChildren()); } else { list.add(comp); } } return list.toArray(new Component[0]); } return shadows; }
Source:
<code>public void verifyPinNotExist(String pinTitle) { <START> Integer pinSize = pinCollection.size() - 1; <END> while (pinSize >= 0) { if (pinCollection.get(pinSize).getText().contains(pinTitle)) { break; } pinSize--; } Assertion.assertEquals(pinSize.intValue(), -1, "Pin was deleted correctly"); }</code><technical_language>is Integer needed instead of int</technical_language>

Target:
public void verifyPinNotExist(String pinTitle) { int pinSize = pinCollection.size() - 1; while (pinSize >= 0) { if (pinCollection.get(pinSize).getText().contains(pinTitle)) { break; } pinSize--; } Assertion.assertEquals(pinSize, -1, "Pin was deleted correctly"); }
Source:
<code>public static int checkAccountExist(String email) { int rv = 0; try { <START> Xclient = new XmlRpcClient(); <END> XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); config.setServerURL(new URL(friendUrl)); Xclient.setTransportFactory(new XmlRpcSun15HttpTransportFactory(Xclient)); Xclient.setConfig(config); Object[] params = new Object[]{new String[] {email}}; Object[] results = (Object[]) Xclient.execute("doAccountsExist", params); if (results != null && results.length == 1) { rv = ((Integer) results[0]).intValue(); } } catch (Exception e) { M_log.warn("Friend checkAccountExist(): email address " + email + " " + e.getMessage()); e.printStackTrace(); } return rv; }</code><technical_language>threads calling checkAccountExit time? If a static variable safe. Is Xclient of method? If need static. If is please clear is safe use. initializing in init method</technical_language>

Target:
public CheckAccountExistsResponse checkAccountExist(String email) { M_log.debug("Friend checkAccountExists() called"); CheckAccountExistsResponse response = CheckAccountExistsResponse.FRIEND_ACCOUNT_DOES_NOT_EXIST; int rv = 0; try { Object[] params = new Object[]{new String[] {email}}; Object[] results = (Object[]) Xclient.execute(DO_ACCOUNT_EXIST_WS, params); if (results != null && results.length == 1) { rv = ((Integer) results[0]).intValue(); } } catch (Exception e) { M_log.warn("Friend checkAccountExist(): email address " + email + " " + e.getMessage()); } if(rv == -1){ response = CheckAccountExistsResponse.INVALID_EMAIL; } if(rv == 0){ response = CheckAccountExistsResponse.FRIEND_ACCOUNT_DOES_NOT_EXIST; } if(rv == 1){ response = CheckAccountExistsResponse.FRIEND_ACCOUNT_ALREADY_EXISTS; } return response; }
Source:
<code><START> public Map<String, String> toNormalizedQueryMap() { <END> Map<String, String> query = Maps.newTreeMap(); for (Map.Entry<String, Predicate> entry : constraints.entrySet()) { String name = entry.getKey(); Schema fieldSchema = SchemaUtil.fieldSchema(schema, strategy, name); query.put(name, Predicates.toNormalizedString(entry.getValue(), fieldSchema)); } return query; }</code><technical_language>Minor: this a bit simpler if a private implementation method passed in map container use. toQueryMap pass in a LinkedHashMap normalized version a TreeMap</technical_language>

Target:
public Map<String, String> toNormalizedQueryMap() { Map<String, String> query = Maps.newTreeMap(); return toQueryMap(query, true); }
Source:
<code>protected void addVmNumaNodes() { <START> List<VmNumaNode> vmList = DbFacade.getInstance().getVmNumaNodeDAO().getAllVmNumaNodeByVmId(getVmId()); <END> if (vmList != null && vmList.size() > 0) { List<VmNumaNode> templateList = new ArrayList<>(); for (VmNumaNode vnode : vmList) { List<Pair<Guid, Pair<Boolean, Integer>>> pairs = vnode.getVdsNumaNodeList(); if (pairs != null && pairs.size() > 0) { for (Pair<Guid, Pair<Boolean, Integer>> pair : pairs) { pair.setFirst(null); pair.getSecond().setFirst(false); } } templateList.add(vnode); } VmNumaNodeOperationParameters params = new VmNumaNodeOperationParameters(getVmTemplateId(), templateList); getBackend().runInternalAction(VdcActionType.AddVmNumaNodes, params); } }</code><technical_language>rename vmNumaList</technical_language>

Target:
protected void addVmNumaNodes() { List<VmNumaNode> vmNumaList = DbFacade.getInstance().getVmNumaNodeDAO().getAllVmNumaNodeByVmId(getVmId()); if (vmNumaList != null && vmNumaList.size() > 0) { List<VmNumaNode> templateList = new ArrayList<>(); for (VmNumaNode vnode : vmNumaList) { List<Pair<Guid, Pair<Boolean, Integer>>> pairs = vnode.getVdsNumaNodeList(); if (pairs != null && pairs.size() > 0) { for (Pair<Guid, Pair<Boolean, Integer>> pair : pairs) { pair.setFirst(null); } } templateList.add(vnode); } VmNumaNodeOperationParameters params = new VmNumaNodeOperationParameters(getVmTemplateId(), templateList); getBackend().runInternalAction(VdcActionType.AddVmNumaNodes, params); } }
Source:
<code>private boolean buildingPlowThroughRequired(Entity entity, MovementType relevantMovementType, Coords coords) { IBoard board = entity.getGame().getBoard(); IHex hex = board.getHex(coords); if (!hex.containsTerrain(Terrains.BLDG_CF) && !hex.containsExit(Terrains.FUEL_TANK_CF)) { return false; } else if (relevantMovementType == MovementType.Walker) { int buildingCF = board.getBuildingAt(coords).getCurrentCF(coords); return entity.getWeight() > buildingCF; <START> } else if (relevantMovementType != MovementType.Flyer && relevantMovementType != MovementType.Jump && relevantMovementType != MovementType.None && relevantMovementType != MovementType.Water) { <END> return true; } else { return false; } }</code><technical_language>suggestion } else if ((relevantMovementType != MovementType.Flyer) && (relevantMovementType != MovementType.Jump) && (relevantMovementType != MovementType.None) && (relevantMovementType != MovementType.Water)) {</technical_language>

Target:
private boolean buildingPlowThroughRequired(Entity entity, MovementType relevantMovementType, Coords coords) { IBoard board = entity.getGame().getBoard(); IHex hex = board.getHex(coords); if (!hex.containsTerrain(Terrains.BLDG_CF) && !hex.containsExit(Terrains.FUEL_TANK_CF)) { return false; } else if (relevantMovementType == MovementType.Walker) { int buildingCF = board.getBuildingAt(coords).getCurrentCF(coords); return entity.getWeight() > buildingCF; } else if ((relevantMovementType != MovementType.Flyer) && (relevantMovementType != MovementType.Jump) && (relevantMovementType != MovementType.None) && (relevantMovementType != MovementType.Water)) { return true; } else { return false; } }
Source:
<code>protected boolean isSafeMethod(String method) { <START> return GET.equals(method) || HEAD.equals(method) || OPTIONS.equals(method) || TRACE.equals(method); <END> }</code><technical_language>Alternatively a static constant Set<String> do a contains(). nicely a Set.of</technical_language>

Target:
protected boolean isSafeMethod(String method) { return SAFE_METHODS.contains(method); }
Source:
<code>protected abstract void test() throws IOException; public void runTest() { try { final File input = createInputFile(); output = new File(outputDir, "output.sam"); args.add("INPUT=" + input.getAbsoluteFile()); args.add("OUTPUT=" + output.getAbsoluteFile()); Assert.assertEquals(runPicardCommandLine(args), 0); test(); } catch (IOException ex) { <START> ex.printStackTrace(); <END> } }</code><technical_language>Is this wanted here? conditions do want a test ignore a thrown error</technical_language>

Target:
protected abstract void test() throws IOException; public void runTest() { try { final File input = createInputFile(); output = new File(outputDir, "output.sam"); args.add("INPUT=" + input.getAbsoluteFile()); args.add("OUTPUT=" + output.getAbsoluteFile()); Assert.assertEquals(runPicardCommandLine(args), 0); test(); } catch (IOException ex) { throw new RuntimeException(ex); } }
Source:
<code>public void saveBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { IFD ifd = new IFD(); if (!sequential) { TiffParser parser = new TiffParser(currentId); try { long[] ifdOffsets = parser.getIFDOffsets(); if (no < ifdOffsets.length) { ifd = parser.getIFD(ifdOffsets[no]); } saveBytes(no, buf, ifd, x, y, w, h); } finally { RandomAccessInputStream tiffParserStream = parser.getStream(); if (tiffParserStream != null) { tiffParserStream.close(); } } } <START> } <END></code><technical_language>this saveBytes(int, byte[], int, int, int, int) is longer supported setWriteSequentially(true) is called TiffWriter</technical_language>

Target:
public void saveBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { IFD ifd = new IFD(); if (!sequential) { TiffParser parser = new TiffParser(currentId); try { long[] ifdOffsets = parser.getIFDOffsets(); if (no < ifdOffsets.length) { ifd = parser.getIFD(ifdOffsets[no]); } saveBytes(no, buf, ifd, x, y, w, h); } finally { RandomAccessInputStream tiffParserStream = parser.getStream(); if (tiffParserStream != null) { tiffParserStream.close(); } } } else { saveBytes(no, buf, ifd, x, y, w, h); } }
Source:
<code>public void changePasswordAsync_nonLooperThreadThrows() { SyncUser user = createTestUser(); <START> thrown.expect(IllegalArgumentException.class); <END> user.changePasswordAsync(null, new SyncUser.Callback() { @Override public void onSuccess(SyncUser user) { fail(); } @Override public void onError(ObjectServerError error) { fail(); } }); }</code><technical_language>IllegalStateException</technical_language>

Target:
public void changePasswordAsync_nonLooperThreadThrows() { SyncUser user = createTestUser(); thrown.expect(IllegalStateException.class); user.changePasswordAsync(null, new SyncUser.Callback() { @Override public void onSuccess(SyncUser user) { fail(); } @Override public void onError(ObjectServerError error) { fail(); } }); }
Source:
<code>char[] getExplorerTheme() { String enableDarkScrollBar = <START> System.getProperty("org.eclipse.swt.internal.win32.enableDarkScrollbars"); <END> if (enableDarkScrollBar != null && Boolean.valueOf(enableDarkScrollBar)) { return DARKMODE_EXPLORER; } return EXPLORER; }</code><technical_language>constant Display.ENABLE_DARK_SCROLLBARS here</technical_language>

Target:
char[] getExplorerTheme() { String enableDarkScrollBar = System.getProperty(ENABLE_DARK_SCROLLBARS); if (enableDarkScrollBar != null && Boolean.valueOf(enableDarkScrollBar)) { return DARKMODE_EXPLORER; } return EXPLORER; }
Source:
<code>private boolean parseCustomFormat(Object customFormat) { if (customFormat == null) { return false; } if (customFormat instanceof Boolean) { return (Boolean) customFormat; } if (customFormat instanceof String) { return Boolean.parseBoolean((String) customFormat); } <START> throw new RuntimeException("Unexpected customFormat in property file."); <END> }</code><technical_language>I append customFormat object exception reader idea of accidentally passed</technical_language>

Target:
private boolean parseCustomFormat(Object customFormat) { if (customFormat == null) { return false; } if (customFormat instanceof Boolean) { return (Boolean) customFormat; } if (customFormat instanceof String) { return Boolean.parseBoolean((String) customFormat); } throw new RuntimeException("Unexpected customFormat in property file: " + customFormat); }
Source:
<code>public void testDisabledByDefault() throws Exception { DisabledBaseTargetPreparer preparer = new DisabledBaseTargetPreparer(); assertTrue(preparer.isDisabled()); IConfiguration config = new Configuration("test", "test"); config.setTargetPreparer(preparer); File configFile = FileUtil.createTempFile("base-target-prep-config", ".xml"); try (PrintWriter pw = new PrintWriter(configFile)) { config.dumpXml(pw, new ArrayList<>(), false, true); String value = FileUtil.readStringFromFile(configFile); <START> CLog.e("%s", value); <END> assertTrue(value.contains("<option name=\"disable\" value=\"true\" />")); assertTrue(value.contains("<option name=\"disable-tear-down\" value=\"false\" />")); } finally { FileUtil.deleteFile(configFile); } }</code><technical_language>remove this</technical_language>

Target:
public void testDisabledByDefault() throws Exception { DisabledBaseTargetPreparer preparer = new DisabledBaseTargetPreparer(); assertTrue(preparer.isDisabled()); IConfiguration config = new Configuration("test", "test"); config.setTargetPreparer(preparer); File configFile = FileUtil.createTempFile("base-target-prep-config", ".xml"); try (PrintWriter pw = new PrintWriter(configFile)) { config.dumpXml(pw, new ArrayList<>(), false, true); String value = FileUtil.readStringFromFile(configFile); assertTrue(value.contains("<option name=\"disable\" value=\"true\" />")); assertTrue(value.contains("<option name=\"disable-tear-down\" value=\"false\" />")); } finally { FileUtil.deleteFile(configFile); } }
Source:
<code>public Range setCellValue(final int rowIndex, final int columnIndex, final GridCellValue<?> value) { return doSetCell(rowIndex, columnIndex, <START> (p) -> { <END> final Optional<BaseGridCell> cell = Optional.ofNullable((BaseGridCell) getCell(p.getK1(), p.getK2())); final BaseGridCell c = cell.orElse(new BaseGridCell<>(value)); c.setValue(value); return c; }); }</code><technical_language>Idea, I small chance guess this is Pair, pair instead of p</technical_language>

Target:
public Range setCellValue(final int rowIndex, final int columnIndex, final GridCellValue<?> value) { return doSetCell(rowIndex, columnIndex, (pair) -> { final Optional<BaseGridCell> cell = Optional.ofNullable((BaseGridCell) getCell(pair.getK1(), pair.getK2())); final BaseGridCell c = cell.orElse(new BaseGridCell<>(value)); c.setValue(value); return c; }); }
Source:
<code>private BayeuxClient makeClient() throws Exception { httpClient.setConnectTimeout(connectionTimeout); httpClient.setTimeout(readTimeout); httpClient.start(); SoapLoginUtil.login(httpClient, userName, password); final String sessionId = SoapLoginUtil.getSessionId(); String endpoint = SoapLoginUtil.getEndpoint(); <START> log.info("Login successful! to Salesforce Streaming Endpoint: " + endpoint); <END> Map<String, Object> options = new HashMap<String, Object>(); options.put(ClientTransport.TIMEOUT_OPTION, readTimeout); LongPollingTransport transport = new LongPollingTransport(options, httpClient) { @Override protected void customize(ContentExchange exchange) { super.customize(exchange); exchange.addRequestHeader("Authorization", "OAuth " + sessionId); } }; BayeuxClient client = new BayeuxClient(salesforceStreamingEndpoint(endpoint), transport); if (useCookies) establishCookies(client, userName, sessionId); return client; }</code><technical_language>need print logs in happy path</technical_language>

Target:
private BayeuxClient makeClient() throws MalformedURLException { httpClient.setConnectTimeout(connectionTimeout); httpClient.setTimeout(readTimeout); try { httpClient.start(); SoapLoginUtil.login(httpClient, userName, password); final String sessionId = SoapLoginUtil.getSessionId(); String endpoint = SoapLoginUtil.getEndpoint(); log.info("Login to Salesforce Streaming Endpoint: " + endpoint); Map<String, Object> options = new HashMap<String, Object>(); options.put(ClientTransport.TIMEOUT_OPTION, readTimeout); LongPollingTransport transport = new LongPollingTransport(options, httpClient) { @Override protected void customize(ContentExchange exchange) { super.customize(exchange); exchange.addRequestHeader("Authorization", "OAuth " + sessionId); } }; BayeuxClient client = new BayeuxClient(salesforceStreamingEndpoint(endpoint), transport); if (useCookies) establishCookies(client, userName, sessionId); return client; } catch (MalformedURLException e) { handleException("Error while building URL: " + e.getMessage(), e); } catch (Exception e) { handleException("Error while starting the Http Client" + e.getMessage(), e); } return null; }
Source:
<code><START> protected TaskProcessingTask( <END> TaskStore taskStore, TaskProcessor processor, DestinationType destinationType, TelescopeReporterName reporterName ) { this.taskStore = checkNotNull(taskStore); this.processor = checkNotNull(processor); this.destinationType = checkNotNull(destinationType); this.telescope = FeedsTelescopeReporterFactory.getInstance() .getTelescopeReporter(reporterName); }</code><technical_language>this public one, other protected (indicate name is normal entry point)</technical_language>

Target:
TaskProcessingTask( TaskStore taskStore, TaskProcessor processor, DestinationType destinationType, TelescopeReporterName reporterName ) { this( taskStore, processor, destinationType, FeedsTelescopeReporterFactory.getInstance().getTelescopeReporter(reporterName) ); }
Source:
<code><START> public static String getMessage(final String key, final Locale locale) { <END> String result = ""; if (key != null && key.startsWith(BRAND_PREFIX + ".")) { String[] splitString = key.split("\\."); String prefix = null; if (splitString.length >= 2) { prefix = key.split("\\.")[1]; } if (prefix != null && prefix.length() > 0) { result = getInstance().getMessageMap(prefix, locale). get(key.substring(key.indexOf(prefix) + prefix.length() + 1)); } } return result; }</code><technical_language>is this method static? singleton access methods getInstance() static</technical_language>

Target:
public String getMessage(final String key, final Locale locale) { String result = ""; if (key != null && key.startsWith(BRAND_PREFIX + ".")) { String[] splitString = key.split("\\."); String prefix = (splitString.length >= 2) ? splitString[1] : ""; if (prefix.length() > 0) { result = getMessageMap(prefix, locale).get(key.substring(key.indexOf(prefix) + prefix.length() + 1)); } } return result; }
Source:
<code>public Number nextValue(NextValueRequest request) { if ( returnTheInitialValue.compareAndSet( true, false ) ) { return request.getInitialValue(); } try { return counter.addAndGet( request.getIncrement() ).get(); } catch (ExecutionException | InterruptedException e) { <START> throw new HibernateException( "Interrupting Operation " + e.getMessage(), e ); <END> } }</code><technical_language>exception for this one, in Log interface. I I prefer a message related interruption occurred, "Exception generating for counter ${counterNameOrTableName}". way, do log system works</technical_language>

Target:
public Number nextValue(NextValueRequest request) { if ( returnTheInitialValue.compareAndSet( true, false ) ) { return request.getInitialValue(); } try { return counter.addAndGet( request.getIncrement() ).get(); } catch (ExecutionException | InterruptedException e) { LOG.exceptionGeneratingValueForCounter( counter.getName() ); return null; } }
Source:
<code>private void populateNestedPositions(ColumnarArray columnarArray) { valuesBuffers.resetPositions(); if (positionCount == 0) { return; } offsets = ensureCapacity(offsets, positionCount + 1, SMALL, NONE, bufferAllocator); offsets[0] = 0; int[] positions = getPositions(); for (int i = 0; i < positionCount; i++) { offsets[i + 1] = offsets[i] + columnarArray.getLength(positions[i]); } <START> valuesBuffers.setPositions(ensureCapacity(valuesBuffers.getPositions(), offsets[positionCount], SMALL, NONE, bufferAllocator)); <END> for (int i = 0; i < positionCount; i++) { valuesBuffers.appendPositionRange(columnarArray.getOffset(positions[i]), offsets[i + 1] - offsets[i]); } }</code><technical_language>@yingsu00 perhaps, a cleaner design valuesBuffers.ensureCapacity(offsets[positionCount])</technical_language>

Target:
private void populateNestedPositions(ColumnarArray columnarArray) { valuesBuffers.resetPositions(); if (positionCount == 0) { return; } offsets = ensureCapacity(offsets, positionCount + 1, SMALL, NONE, bufferAllocator); offsets[0] = 0; int[] positions = getPositions(); for (int i = 0; i < positionCount; i++) { offsets[i + 1] = offsets[i] + columnarArray.getLength(positions[i]); } valuesBuffers.ensurePositionsCapacity(offsets[positionCount]); for (int i = 0; i < positionCount; i++) { valuesBuffers.appendPositionRange(columnarArray.getOffset(positions[i]), offsets[i + 1] - offsets[i]); } }
Source:
<code>public Map<String, Set<String>> readPluginsStorages() { log.debug("Reading extensions storages from plugins"); Map<String, Set<String>> result = new LinkedHashMap<>(); List<PluginWrapper> plugins = pluginManager.getPlugins(); for (PluginWrapper plugin : plugins) { String pluginId = plugin.getDescriptor().getPluginId(); log.debug("Reading extensions storages for plugin '{}'", pluginId); final Set<String> bucket = new HashSet<>(); try { Enumeration<URL> urls = ((PluginClassLoader) plugin.getPluginClassLoader()).findResources(getExtensionsResource()); if (urls == null || !urls.hasMoreElements()) { log.debug("Cannot find '{}'", getExtensionsResource()); } else { while (urls.hasMoreElements()) { URL url = urls.nextElement(); <START> if (url != null) { <END> Path extensionPath; if (url.toURI().getScheme().equals("jar")) { extensionPath = FileUtils.getPath(url.toURI(), getExtensionsResource()); } else { extensionPath = Paths.get(url.toURI()); } bucket.addAll(readExtensions(extensionPath)); } else { log.debug("Cannot find '{}'", getExtensionsResource()); } } } debugExtensions(bucket); result.put(pluginId, bucket); } catch (IOException | URISyntaxException e) { log.error(e.getMessage(), e); } } return result; }</code><technical_language>(no need for null check)</technical_language>

Target:
public Map<String, Set<String>> readPluginsStorages() { log.debug("Reading extensions storages from plugins"); Map<String, Set<String>> result = new LinkedHashMap<>(); List<PluginWrapper> plugins = pluginManager.getPlugins(); for (PluginWrapper plugin : plugins) { String pluginId = plugin.getDescriptor().getPluginId(); log.debug("Reading extensions storages for plugin '{}'", pluginId); final Set<String> bucket = new HashSet<>(); try { Enumeration<URL> urls = ((PluginClassLoader) plugin.getPluginClassLoader()).findResources(getExtensionsResource()); if (urls == null || !urls.hasMoreElements()) { log.debug("Cannot find '{}'", getExtensionsResource()); } else { while (urls.hasMoreElements()) { URL url = urls.nextElement(); Path extensionPath; if (url.toURI().getScheme().equals("jar")) { extensionPath = FileUtils.getPath(url.toURI(), getExtensionsResource()); } else { extensionPath = Paths.get(url.toURI()); } bucket.addAll(readExtensions(extensionPath)); } } debugExtensions(bucket); result.put(pluginId, bucket); } catch (IOException | URISyntaxException e) { log.error(e.getMessage(), e); } } return result; }
Source:
<code>long getTotalBufferedSize() { long bloomBufferSize = bloomFilter == null ? 0 : bloomFilter.getBitsetSize(); return repetitionLevelColumn.getBufferedSize() + definitionLevelColumn.getBufferedSize() + dataColumn.getBufferedSize() + pageWriter.getMemSize() <START> + bloomBufferSize; <END> }</code><technical_language>I if want count bloom filter in. statistics is counted either</technical_language>

Target:
long getTotalBufferedSize() { return repetitionLevelColumn.getBufferedSize() + definitionLevelColumn.getBufferedSize() + dataColumn.getBufferedSize() + pageWriter.getMemSize(); }
Source:
<code>private static void updateRequiredPlugins(IJavaProject javaProject, IProgressMonitor monitor, IPluginModelBase model) throws CoreException { IClasspathEntry[] entries = javaProject.getRawClasspath(); List<IClasspathEntry> classpath = new ArrayList<>(); List<IClasspathEntry> requiredProjects = new ArrayList<>(); for (int i = 0; i < entries.length; i++) { if (isPluginProjectEntry(entries[i])) { requiredProjects.add(entries[i]); } else { classpath.add(entries[i]); } } if (requiredProjects.size() <= 0) return; IFile file = PDEProject.getManifest(javaProject.getProject()); try { Manifest manifest = new Manifest(file.getContents()); String value = manifest.getMainAttributes().getValue(Constants.REQUIRE_BUNDLE); StringBuffer sb = value != null ? new StringBuffer(value) : new StringBuffer(); if (sb.length() > 0) sb.append(","); for (int i = 0; i < requiredProjects.size(); i++) { IClasspathEntry entry = requiredProjects.get(i); if (i > 0) sb.append(","); sb.append(entry.getPath().segment(0)); if (entry.isExported()) sb.append(";visibility:=reexport"); } manifest.getMainAttributes().putValue(Constants.REQUIRE_BUNDLE, sb.toString()); ByteArrayOutputStream content = new ByteArrayOutputStream(); manifest.write(content); file.setContents(new ByteArrayInputStream(content.toByteArray()), true, false, monitor); <START> javaProject.setRawClasspath(classpath.toArray(new IClasspathEntry[classpath.size()]), monitor); <END> } catch (IOException e) { } catch (CoreException e) { } }</code><technical_language>entire monitor consumed call file.setContents. Fix splitting progress SubMonitor</technical_language>

Target:
private static void updateRequiredPlugins(IJavaProject javaProject, IProgressMonitor monitor, IPluginModelBase model) throws CoreException { IClasspathEntry[] entries = javaProject.getRawClasspath(); List<IClasspathEntry> classpath = new ArrayList<>(); List<IClasspathEntry> requiredProjects = new ArrayList<>(); for (int i = 0; i < entries.length; i++) { if (isPluginProjectEntry(entries[i])) { requiredProjects.add(entries[i]); } else { classpath.add(entries[i]); } } if (requiredProjects.size() <= 0) return; IFile file = PDEProject.getManifest(javaProject.getProject()); try { Manifest manifest = new Manifest(file.getContents()); String value = manifest.getMainAttributes().getValue(Constants.REQUIRE_BUNDLE); StringBuffer sb = value != null ? new StringBuffer(value) : new StringBuffer(); if (sb.length() > 0) sb.append(","); for (int i = 0; i < requiredProjects.size(); i++) { IClasspathEntry entry = requiredProjects.get(i); if (i > 0) sb.append(","); sb.append(entry.getPath().segment(0)); if (entry.isExported()) sb.append(";visibility:=reexport"); } manifest.getMainAttributes().putValue(Constants.REQUIRE_BUNDLE, sb.toString()); ByteArrayOutputStream content = new ByteArrayOutputStream(); manifest.write(content); SubMonitor subMonitor = SubMonitor.convert(monitor, 2); file.setContents(new ByteArrayInputStream(content.toByteArray()), true, false, subMonitor.newChild(1)); javaProject.setRawClasspath(classpath.toArray(new IClasspathEntry[classpath.size()]), subMonitor.newChild(1)); } catch (IOException e) { } catch (CoreException e) { } }
Source:
<code>public TkFailure(final Scalar<IOException> err) { super( new Take() { @Override <START> public Response act(final Request request) throws Exception { <END> throw err.value(); } } ); }</code><technical_language>@andreoss throw Exception instead of original IOException</technical_language>

Target:
public TkFailure(final Scalar<IOException> err) { super( new Take() { @Override public Response act(final Request request) throws IOException { throw new IoChecked<>(err).value(); } } ); }