auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>void start() { long start_ms = System.currentTimeMillis(); long delta_s = 0; FileInputStream sdPipe = null; if(appConfig.getSDEnabled()) { LOGGER.info("Service Discovery enabled"); sdPipe = newSdPipe(); } while (true) { if (appConfig.getExitWatcher().shouldExit()){ LOGGER.info("Exit file detected: stopping JMXFetch."); System.exit(0); } if(sdPipe == null && appConfig.getSDEnabled()) { sdPipe = newSdPipe(); } <START> try { <END> if(sdPipe != null && sdPipe.available() > 0) { int len = sdPipe.available(); byte[] buffer = new byte[len]; sdPipe.read(buffer); setReinit(processServiceDiscovery(buffer)); } } catch(IOException e) { LOGGER.warn("Unable to read from pipe - Service Discovery configuration may have been skipped."); } long start = System.currentTimeMillis(); if (this.reinit.get()) { init(true); } if (instances.size() > 0) { doIteration(); } else { LOGGER.warn("No instance could be initiated. Retrying initialization."); appConfig.getStatus().flush(); configs = getConfigs(appConfig); init(true); } long length = System.currentTimeMillis() - start; LOGGER.debug("Iteration ran in " + length + " ms"); try { int loopPeriod = appConfig.getCheckPeriod(); LOGGER.debug("Sleeping for " + loopPeriod + " ms."); Thread.sleep(loopPeriod); } catch (InterruptedException e) { LOGGER.warn(e.getMessage(), e); } } }</code><technical_language>nit, do int len = 0 if(sdPipe != null && ((len = sdPipe.available()) > 0)) { byte[] buffer.... need call sdPipe.available in succession</technical_language>

Target:
void start() { long start_ms = System.currentTimeMillis(); long delta_s = 0; FileInputStream sdPipe = null; if(appConfig.getSDEnabled()) { LOGGER.info("Service Discovery enabled"); sdPipe = newSdPipe(); } while (true) { if (appConfig.getExitWatcher().shouldExit()){ LOGGER.info("Exit file detected: stopping JMXFetch."); System.exit(0); } if(sdPipe == null && appConfig.getSDEnabled()) { sdPipe = newSdPipe(); } try { int len; if(sdPipe != null && (len = sdPipe.available()) > 0) { byte[] buffer = new byte[len]; sdPipe.read(buffer); setReinit(processServiceDiscovery(buffer)); } } catch(IOException e) { LOGGER.warn("Unable to read from pipe - Service Discovery configuration may have been skipped."); } long start = System.currentTimeMillis(); if (this.reinit.get()) { init(true); } if (instances.size() > 0) { doIteration(); } else { LOGGER.warn("No instance could be initiated. Retrying initialization."); appConfig.getStatus().flush(); configs = getConfigs(appConfig); init(true); } long length = System.currentTimeMillis() - start; LOGGER.debug("Iteration ran in " + length + " ms"); try { int loopPeriod = appConfig.getCheckPeriod(); LOGGER.debug("Sleeping for " + loopPeriod + " ms."); Thread.sleep(loopPeriod); } catch (InterruptedException e) { LOGGER.warn(e.getMessage(), e); } } }
Source:
<code>private RetryDriver retry() { return RetryDriver.retry() .exponentialBackoff(thriftConfig.getMaxRetries(), thriftConfig.getMinBackoffDelay(), thriftConfig.getMaxBackoffDelay(), thriftConfig.getMaxRetryTime(), <START> thriftConfig.getBackoffScaleFactor(), exceptionMapper, ImmutableList.of(), Optional.empty()).stopOn(PrestoException.class); <END> }</code><technical_language>stopOn() call a separate line for readability</technical_language>

Target:
private RetryDriver retry() { return RetryDriver.retry() .exponentialBackoff( minBackoffDelay, maxBackoffDelay, maxRetryTime, scaleFactor) .maxAttempts(maxRetries + 1) .exceptionMapper(exceptionMapper) .stopOn(PrestoException.class); }
Source:
<code>public void prepareTestInstance(TestContext testContext) throws Exception { <START> LOG.info("@RunWith(CamelSpringBootRunner.class) preparing: {}", testContext.getTestClass()); <END> Class<?> testClass = testContext.getTestClass(); CamelAnnotationsHandler.handleExcludeRoutesForSpringBoot(testClass); SpringCamelContext.setNoStart(true); System.setProperty("skipStartingCamelContext", "true"); ConfigurableApplicationContext context = (ConfigurableApplicationContext) testContext.getApplicationContext(); CamelAnnotationsHandler.handleProvidesBreakpoint(context, testClass); CamelAnnotationsHandler.handleShutdownTimeout(context, testClass); CamelAnnotationsHandler.handleMockEndpoints(context, testClass); CamelAnnotationsHandler.handleMockEndpointsAndSkip(context, testClass); CamelAnnotationsHandler.handleUseOverridePropertiesWithPropertiesComponent(context, testClass); System.clearProperty("skipStartingCamelContext"); SpringCamelContext.setNoStart(false); }</code><technical_language>class name in logs actual class name</technical_language>

Target:
public void prepareTestInstance(TestContext testContext) throws Exception { LOG.info("CamelSpringBootExecutionListener preparing: {}", testContext.getTestClass()); Class<?> testClass = testContext.getTestClass(); CamelAnnotationsHandler.handleExcludeRoutesForSpringBoot(testClass); SpringCamelContext.setNoStart(true); System.setProperty("skipStartingCamelContext", "true"); ConfigurableApplicationContext context = (ConfigurableApplicationContext) testContext.getApplicationContext(); CamelAnnotationsHandler.handleProvidesBreakpoint(context, testClass); CamelAnnotationsHandler.handleShutdownTimeout(context, testClass); CamelAnnotationsHandler.handleMockEndpoints(context, testClass); CamelAnnotationsHandler.handleMockEndpointsAndSkip(context, testClass); CamelAnnotationsHandler.handleUseOverridePropertiesWithPropertiesComponent(context, testClass); System.clearProperty("skipStartingCamelContext"); SpringCamelContext.setNoStart(false); }
Source:
<code><START> public Mono<String> getTableName() { <END> return Mono.empty(); }</code><technical_language>this a synchronous method is returning a property client? java public String getTableName() { return tableName; }</technical_language>

Target:
public String getTableName() { return tableName; }
Source:
<code>public void sortTests() { testEval("sort('commcare is the best tool ever', false())", null, null, "tool the is ever commcare best"); testEval("sort('2222 5555 9999 1111', 'd b c a', true())", null, null, "1111 5555 9999 2222"); testEval("sort('a b c d e f', '4 2 1 5 3 2', false())", null, null, "d a e f b c"); <START> testEval("sort('c c z f z f', '4 2 1 5 3 2', true())", null, null, "z c f z c f"); <END> testEval("sort('a b c d e f', '4 2 1 5 3 2')", null, null, "c b f e a d"); testEval("sort('commcare is the best tool ever')", null, null, "best commcare ever is the tool"); testEval("sort('a b c', '4 2 5 1', true())", null, null, new XPathTypeMismatchException()); }</code><technical_language>test above, include some examples multiple items matching sort orders int list, IE: a b c d : 3 2 1 2 = c b d a c d b a</technical_language>

Target:
public void sortTests() { testEval("sort('commcare is the best tool ever', false())", null, null, "tool the is ever commcare best"); testEval("sort-by('2222 5555 9999 1111', 'd b c a', true())", null, null, "1111 5555 9999 2222"); testEval("sort-by('a b c d e f', '4 2 1 5 3 2', false())", null, null, "d a e f b c"); testEval("sort-by('c c z f z f', '4 2 1 5 3 2', true())", null, null, "z c f z c f"); testEval("sort-by('a b c d e f', '4 2 1 5 3 2')", null, null, "c b f e a d"); testEval("sort('commcare is the best tool ever')", null, null, "best commcare ever is the tool"); testEval("sort-by('a b c', '4 2 5 1', true())", null, null, new XPathTypeMismatchException()); }
Source:
<code>protected FileMonitoringController(FilePath ws) throws IOException, InterruptedException { ws.mkdirs(); <START> FilePath tmpDir = WorkspaceList.tempDir(ws); <END> if (tmpDir != null) { FilePath cd = cd.child("durable-" + Util.getDigestOf(UUID.randomUUID().toString()).substring(0,8)); cd.mkdirs(); controlDir = cd.getRemote(); } else { controlDir = null; } }</code><technical_language>Note this work top of of core PRs discussion. then, tempDir call fail NPE. I know, complained this far, if want handle _current_ core versions suggestion FilePath tmpDir = /* TODO pending JENKINS-61197 fix in baseline */ ws.getParent() != null ? WorkspaceList.tempDir(ws) : null;</technical_language>

Target:
protected FileMonitoringController(FilePath ws) throws IOException, InterruptedException { ws.mkdirs(); FilePath tmpDir = ws.getParent() != null ? WorkspaceList.tempDir(ws) : null; if (tmpDir != null) { FilePath cd = tmpDir.child("durable-" + Util.getDigestOf(UUID.randomUUID().toString()).substring(0,8)); cd.mkdirs(); controlDir = cd.getRemote(); } else { controlDir = null; } }
Source:
<code>public Object execute(final ExecutionEvent event) throws ExecutionException { final List<RefNode> nodes = getSelectedNodes(event); final List<Ref> refs = new ArrayList<Ref>(); for (RefNode refNode : nodes) { refs.add(refNode.getObject()); } Shell shell = getShell(event); MessageDialog messageDialog = new BranchMessageDialog(shell, nodes); <START> if (messageDialog.open() != Window.OK) { <END> return null; } try { new ProgressMonitorDialog(shell).run(false, false, new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { for (RefNode refNode : nodes) { deleteBranch(refNode, refNode.getObject()); } } catch (IOException ioe) { throw new InvocationTargetException(ioe); } } }); } catch (InvocationTargetException e1) { Activator.handleError( UIText.RepositoriesView_BranchDeletionFailureMessage, e1.getCause(), true); e1.printStackTrace(); } catch (InterruptedException e1) { } return null; }</code><technical_language>style nit: braces single line blocks</technical_language>

Target:
public Object execute(final ExecutionEvent event) throws ExecutionException { final List<RefNode> nodes = getSelectedNodes(event); final List<Ref> refs = new ArrayList<Ref>(); for (RefNode refNode : nodes) { refs.add(refNode.getObject()); } Shell shell = getShell(event); MessageDialog messageDialog = new BranchMessageDialog(shell, nodes); if (messageDialog.open() != Window.OK) return null; try { new ProgressMonitorDialog(shell).run(false, false, new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { for (RefNode refNode : nodes) deleteBranch(refNode, refNode.getObject()); } catch (IOException ioe) { throw new InvocationTargetException(ioe); } } }); } catch (InvocationTargetException e1) { Activator.handleError( UIText.RepositoriesView_BranchDeletionFailureMessage, e1.getCause(), true); e1.printStackTrace(); } catch (InterruptedException e1) { } return null; }
Source:
<code>public String setHmacSeedReturnCode(String seed, String rendezvousServer) { if (firstSeed != null) { if (!firstSeed.equals(seed)) { Notifier.oneButtonAlert(Form.getActiveForm(), "You cannot use two codes with one start up of the Companion. Quit the Companion and try again.", "Warning", "OK"); } return firstHmacSeed; <START> } <END> firstSeed = seed; if (useWebRTC) { WebRTCNativeMgr webRTCNativeMgr = new WebRTCNativeMgr(rendezvousServer); webRTCNativeMgr.initiate((ReplForm) form, (Context)activity, seed); ((ReplForm)form).setWebRTCMgr(webRTCNativeMgr); } else { AppInvHTTPD.setHmacKey(seed); } MessageDigest Sha1; try { Sha1 = MessageDigest.getInstance("SHA1"); } catch (Exception e) { Log.e(LOG_TAG, "Exception getting SHA1 Instance", e); return ""; } Sha1.update(seed.getBytes()); byte result = Sha1.digest(); StringBuffer sb = new StringBuffer(result.length * 2); Formatter formatter = new Formatter(sb); for (byte b : result) { formatter.format("%02x", b); } Log.d(LOG_TAG, "Seed = " + seed); Log.d(LOG_TAG, "Code = " + sb.toString()); firstHmacSeed = sb.toString(); return firstHmacSeed; }</code><technical_language>Is this true? bad UX force user quit app restart it, making a bit smarter in handling multiple codes</technical_language>

Target:
public String setHmacSeedReturnCode(String seed, String rendezvousServer) { if (seed.equals("")) { return ""; } if (firstSeed != null) { if (!firstSeed.equals(seed)) { Notifier.oneButtonAlert(Form.getActiveForm(), "You cannot use two codes with one start up of the Companion. You should restart the " + "Companion and try again.", "Warning", "OK", new Runnable() { @Override public void run() { Form.getActiveForm().finish(); System.exit(0); } }); } return firstHmacSeed; } firstSeed = seed; if (useWebRTC) { WebRTCNativeMgr webRTCNativeMgr = new WebRTCNativeMgr(rendezvousServer); webRTCNativeMgr.initiate((ReplForm) form, (Context)activity, seed); ((ReplForm)form).setWebRTCMgr(webRTCNativeMgr); } else { AppInvHTTPD.setHmacKey(seed); } MessageDigest Sha1; try { Sha1 = MessageDigest.getInstance("SHA1"); } catch (Exception e) { Log.e(LOG_TAG, "Exception getting SHA1 Instance", e); return ""; } Sha1.update(seed.getBytes()); byte result = Sha1.digest(); StringBuffer sb = new StringBuffer(result.length * 2); Formatter formatter = new Formatter(sb); for (byte b : result) { formatter.format("%02x", b); } Log.d(LOG_TAG, "Seed = " + seed); Log.d(LOG_TAG, "Code = " + sb.toString()); firstHmacSeed = sb.toString(); return firstHmacSeed; }
Source:
<code>public void handleSetEncryptionKeyExchangeOnGMeterResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType responseMessageResultType, final OsgpException exception) { LOGGER.info("handleSetEncryptionKeyExchangeOnGMeterResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); ResponseMessageResultType result = responseMessageResultType; if (exception != null) { LOGGER.error("Set Encryption Key Exchange On G-Meter Response not ok. Unexpected Exception", exception); result = ResponseMessageResultType.NOT_OK; } <START> this.webServiceResponseMessageSender.send(ResponseMessage.newResponseMessageBuilder() <END> .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()).withResult(result) .withOsgpException(exception).withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(), deviceMessageMetadata.getMessageType()); }</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:
public void handleSetEncryptionKeyExchangeOnGMeterResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType responseMessageResultType, final OsgpException exception) { LOGGER.info("handleSetEncryptionKeyExchangeOnGMeterResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); ResponseMessageResultType result = responseMessageResultType; if (exception != null) { LOGGER.error("Set Encryption Key Exchange On G-Meter Response not ok. Unexpected Exception", exception); result = ResponseMessageResultType.NOT_OK; } ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()).withResult(result) .withOsgpException(exception).withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(); this.webServiceResponseMessageSender.send(responseMessage, deviceMessageMetadata.getMessageType()); }
Source:
<code>protected boolean attachUserToSession() { Date validTo = null; if (!StringUtils.isEmpty(getParameters().getSessionId())) { validTo = SessionDataContainer.getInstance() .getValidTo(getParameters().getSessionId()); if (validTo.compareTo(new Date(System.currentTimeMillis())) < 0) { SessionDataContainer.getInstance().removeSession(getParameters().getSessionId()); return failCanDoAction(VdcBllMessages.USER_CANNOT_LOGIN_SESSION_MISSING); } SessionDataContainer.getInstance().setUser(getParameters().getSessionId(), getCurrentUser()); } else { if (!SessionDataContainer.getInstance().setUser(getCurrentUser())) { return failCanDoAction(VdcBllMessages.USER_CANNOT_LOGIN_SESSION_MISSING); } try { validTo = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ").parse(authRecord.<String> get(AuthRecord.VALID_TO)); } catch (ParseException e) { log.warn("Error parsing AuthRecord.VALID_TO . Default VALID_TO value will be set on session"); validTo = DateUtils.addMinutes(new Date(System.currentTimeMillis()), Config.<Integer> getValue(ConfigValues.UserSessionTimeOutInterval)); } <START> SessionDataContainer.getInstance().setValidTo(validTo); <END> } return true; }</code><technical_language>be: valid_to = default if valid_to extesion valid_to = min(valid_to, valid_to_from_extension</technical_language>

Target:
protected boolean attachUserToSession() { Date validTo = null; if (!StringUtils.isEmpty(getParameters().getSessionId())) { validTo = SessionDataContainer.getInstance() .getValidTo(getParameters().getSessionId()); if (validTo.compareTo(new Date(System.currentTimeMillis())) < 0) { SessionDataContainer.getInstance().removeSession(getParameters().getSessionId()); return failCanDoAction(VdcBllMessages.USER_CANNOT_LOGIN_SESSION_MISSING); } SessionDataContainer.getInstance().setUser(getParameters().getSessionId(), getCurrentUser()); } else { if (!SessionDataContainer.getInstance().setUser(getCurrentUser())) { return failCanDoAction(VdcBllMessages.USER_CANNOT_LOGIN_SESSION_MISSING); } validTo = DateUtils.addMinutes(new Date(), Config.<Integer> getValue(ConfigValues.UserSessionTimeOutInterval)); try { Date fromExtension = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ").parse(authRecord.<String> get(AuthRecord.VALID_TO)); validTo = validTo.compareTo(fromExtension) < 0 ? validTo : fromExtension; } catch (ParseException e) { log.warn("Error parsing AuthRecord.VALID_TO . Default VALID_TO value will be set on session"); } SessionDataContainer.getInstance().setValidTo(validTo); } return true; }
Source:
<code><START> public static String getSHA1(InputStream is) { <END> MessageDigest digest; try { digest = MessageDigest.getInstance("SHA1"); } catch (NoSuchAlgorithmException e) { Timber.e(e, "Exception while getting Digest"); return ""; } byte[] buffer = new byte[8192]; int read; try { while ((read = is.read(buffer)) > 0) { digest.update(buffer, 0, read); } byte[] md5sum = digest.digest(); BigInteger bigInt = new BigInteger(1, md5sum); String output = bigInt.toString(16); output = String.format("%40s", output).replace(' ', '0'); Timber.i("File SHA1: %s", output); return output; } catch (IOException e) { Timber.e(e, "IO Exception"); return ""; } finally { try { is.close(); } catch (IOException e) { Timber.e(e, "Exception on closing MD5 input stream"); } } }</code><technical_language>a good practice change access modifiers of a method for writing tests for it</technical_language>

Target:
static String getSHA1(InputStream is) { MessageDigest digest; try { digest = MessageDigest.getInstance("SHA1"); } catch (NoSuchAlgorithmException e) { Timber.e(e, "Exception while getting Digest"); return ""; } byte[] buffer = new byte[8192]; int read; try { while ((read = is.read(buffer)) > 0) { digest.update(buffer, 0, read); } byte[] md5sum = digest.digest(); BigInteger bigInt = new BigInteger(1, md5sum); String output = bigInt.toString(16); output = String.format("%40s", output).replace(' ', '0'); Timber.i("File SHA1: %s", output); return output; } catch (IOException e) { Timber.e(e, "IO Exception"); return ""; } finally { try { is.close(); } catch (IOException e) { Timber.e(e, "Exception on closing MD5 input stream"); } } }
Source:
<code>public void testCreateTwoNodesWithRunScript() throws Exception { try { client.destroyNodesMatching(inGroup(group)); } catch (NoSuchElementException e) { } refreshTemplate(); try { nodes = newTreeSet(client.createNodesInGroup(group, 2, template)); } catch (RunNodesException e) { nodes = newTreeSet(concat(e.getSuccessfulNodes(), e.getNodeErrors().keySet())); throw e; } assertEquals(nodes.size(), 2, "expected two nodes but was " + nodes); checkNodes(nodes, group, "bootstrap"); NodeMetadata node1 = nodes.first(); NodeMetadata node2 = nodes.last(); <START> System.err.println("node 1 baby " + node1); <END> assertLocationSameOrChild(checkNotNull(node1.getLocation(), "location of %s", node1), template.getLocation()); assertLocationSameOrChild(checkNotNull(node2.getLocation(), "location of %s", node2), template.getLocation()); checkImageIdMatchesTemplate(node1); checkImageIdMatchesTemplate(node2); checkOsMatchesTemplate(node1); checkOsMatchesTemplate(node2); }</code><technical_language>Remove this :)</technical_language>

Target:
public void testCreateTwoNodesWithRunScript() throws Exception { try { client.destroyNodesMatching(inGroup(group)); } catch (NoSuchElementException e) { } refreshTemplate(); try { nodes = newTreeSet(client.createNodesInGroup(group, 2, template)); } catch (RunNodesException e) { nodes = newTreeSet(concat(e.getSuccessfulNodes(), e.getNodeErrors().keySet())); throw e; } assertEquals(nodes.size(), 2, "expected two nodes but was " + nodes); checkNodes(nodes, group, "bootstrap"); NodeMetadata node1 = nodes.first(); NodeMetadata node2 = nodes.last(); assertLocationSameOrChild(checkNotNull(node1.getLocation(), "location of %s", node1), template.getLocation()); assertLocationSameOrChild(checkNotNull(node2.getLocation(), "location of %s", node2), template.getLocation()); checkImageIdMatchesTemplate(node1); checkImageIdMatchesTemplate(node2); checkOsMatchesTemplate(node1); checkOsMatchesTemplate(node2); }
Source:
<code>public static void addVideoDevice(VmBase vmBase) { VmDevice vmDevice = new VmDevice(); vmDevice.setId(new VmDeviceId(Guid.newGuid(), vmBase.getId())); vmDevice.setType(VmDeviceGeneralType.VIDEO); if (vmBase.getDefaultDisplayType().getDefaultVmDeviceType() != null) { vmDevice.setDevice(vmBase.getDefaultDisplayType().getDefaultVmDeviceType().getName()); <START> } <END> vmDevice.setIsManaged(true); vmDevice.setIsPlugged(true); vmDevice.setIsReadOnly(false); vmDevice.setAddress(""); vmBase.getManagedDeviceMap().put(vmDevice.getDeviceId(), vmDevice); }</code><technical_language>code beginning of method add a device 'device' property instead: if (vmBase.getDefaultDisplayType().getDefaultVmDeviceType() == null) { return; }</technical_language>

Target:
public static void addVideoDevice(VmBase vmBase) { if (vmBase.getDefaultDisplayType().getDefaultVmDeviceType() == null) { return; } VmDevice vmDevice = new VmDevice(); vmDevice.setId(new VmDeviceId(Guid.newGuid(), vmBase.getId())); vmDevice.setType(VmDeviceGeneralType.VIDEO); vmDevice.setDevice(vmBase.getDefaultDisplayType().getDefaultVmDeviceType().getName()); vmDevice.setIsManaged(true); vmDevice.setIsPlugged(true); vmDevice.setIsReadOnly(false); vmDevice.setAddress(""); vmBase.getManagedDeviceMap().put(vmDevice.getDeviceId(), vmDevice); }
Source:
<code>public BufferedImage run() throws Exception { <START> LOG.info(uri); <END> URL url = new URL(uri); for (int i = 0; i < RETRY_COUNT - 1; i++) { try { return ImageIO.read(url); } catch (IOException e) { LOG.warn(e); } } return ImageIO.read(url); }</code><technical_language>Add some message LOG.info("Loading image from", uri);</technical_language>

Target:
public BufferedImage run() throws Exception { return load(uri); }
Source:
<code>private void updatePanel() { boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning(); ingestRunningWarningLabel.setVisible(ingestIsRunning); boolean isSelected = tagNamesList.getSelectedIndex() != -1; boolean enableEdit = !ingestIsRunning && isSelected; editTagNameButton.setEnabled(enableEdit); if (isSelected) { <START> descriptionTextArea.setText(tagNamesList.getSelectedValue().getDescription()); <END> if (tagNamesList.getSelectedValue().getKnownStatus() == TskData.FileKnown.BAD) { notableYesOrNoLabel.setText("Yes"); } else { notableYesOrNoLabel.setText("No"); } } else { descriptionTextArea.setText(""); notableYesOrNoLabel.setText(""); } }</code><technical_language>removing this altogether allowing deletion of tags ingest is running permitting this before</technical_language>

Target:
private void updatePanel() { boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning(); ingestRunningWarningLabel.setVisible(ingestIsRunning); boolean isSelected = tagNamesList.getSelectedIndex() != -1; boolean enableEdit = !ingestIsRunning && isSelected; editTagNameButton.setEnabled(enableEdit); deleteTagNameButton.setEnabled(enableEdit); if (isSelected) { descriptionTextArea.setText(tagNamesList.getSelectedValue().getDescription()); if (tagNamesList.getSelectedValue().getKnownStatus() == TskData.FileKnown.BAD) { notableYesOrNoLabel.setText("Yes"); } else { notableYesOrNoLabel.setText("No"); } } else { descriptionTextArea.setText(""); notableYesOrNoLabel.setText(""); } }
Source:
<code>public User create(UserDTO userDTO, HttpServletRequest request) throws DataIntegrityViolationException { <START> checkIfFieldsInUse(userDTO); <END> String passwordHash = getPasswordHash(userDTO.getPassword()); User user = new User(userDTO.getUsername(), passwordHash, userDTO.getEmail()); user.addRole(userDTO.getRole()); user.setEnabled(false); user = userRepository.saveAndFlush(user); generateAndSendToken(request, user); return user; }</code><technical_language>A check return a boolean 'blindly' throw Exception in eyes. responsibility is a check, handle check. If case function renamed for code readability "checkIfFieldInUseAndHandleResult" is better. I prefer return a boolean enum returns is in use: "None", "Username" "Email"</technical_language>

Target:
public User create(UserDTO userDTO, HttpServletRequest request) throws DataIntegrityViolationException { handleDuplicateUserFields(userDTO); String passwordHash = getPasswordHash(userDTO.getPassword()); User user = new User(userDTO.getUsername(), passwordHash, userDTO.getEmail()); user.addRole(userDTO.getRole()); user.setEnabled(false); user = userRepository.saveAndFlush(user); generateAndSendToken(request, user); return user; }
Source:
<code>private void writeParagraphAndSetMetadata(String line, Metadata metadata) throws SAXException { if(line.length() < 300) { <START> String[] keyValue = line.split("="); <END> if(keyValue.length != 1) { if (keyValue[0].trim().equals("map info")) { StringBuilder mapInfoValueStringBuilder = new StringBuilder(); String mapInfoValue = keyValue[1]; for (int i = 0; i < keyValue[1].length(); ++i) { if (mapInfoValue.charAt(i) != '{' || mapInfoValue.charAt(i) != '}' || mapInfoValue.charAt(i) != ' ') { mapInfoValueStringBuilder.append(mapInfoValue.charAt(i)); } } String[] mapInfoValues = mapInfoValueStringBuilder.toString().split(","); metadata.set("envi." + keyValue[0].trim().replace(" ", "."), keyValue[1].trim()); String latLonStringArray = convertMapInfoValuesToLatLngAndSetMetadata(mapInfoValues, metadata); String xhtmlLatLongLine = "lat/lon = { " + latLonStringArray[0] + ", " + latLonStringArray[1] + " }"; xhtml.startElement("p"); xhtml.characters(xhtmlLatLongLine); xhtml.endElement("p"); } else { metadata.set("envi." + keyValue[0].trim().replace(" ", "."), keyValue[1].trim()); } } } xhtml.startElement("p"); xhtml.characters(line); xhtml.endElement("p"); }</code><technical_language>@kristencheung please replace this line String[] keyValue = line.split("="); this String[] keyValue = line.split("=", 2); This do drop part of line entry map info = {Sinusoidal, 1.5000, 1.5000, -10007091.3643, 5559289.2856, 4.6331271653e+02, 4.6331271653e+02, , units=Meters} Thanks</technical_language>

Target:
private void writeParagraphAndSetMetadata(String line, Metadata metadata) throws SAXException { if(line.length() < 300) { String[] keyValue = line.split("=", 2); if(keyValue.length != 1) { if (keyValue[0].trim().equals("map info")) { String[] mapInfoValues = parseMapInfoContents(keyValue[1]); if (mapInfoValues[0].equals("UTM")) { metadata.set("envi." + keyValue[0].trim().replace(" ", "."), keyValue[1].trim()); String latLonStringArray = convertMapInfoValuesToLatLngAndSetMetadata(mapInfoValues, metadata); String xhtmlLatLongLine = "lat/lon = { " + latLonStringArray[0] + ", " + latLonStringArray[1] + " }"; xhtml.startElement("p"); xhtml.characters(xhtmlLatLongLine); xhtml.endElement("p"); } else { metadata.set("envi." + keyValue[0].trim().replace(" ", "."), keyValue[1].trim()); } } else { metadata.set("envi." + keyValue[0].trim().replace(" ", "."), keyValue[1].trim()); } } } xhtml.startElement("p"); xhtml.characters(line); xhtml.endElement("p"); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { getDelegate().installViewFactory(); getDelegate().onCreate(savedInstanceState); super.onCreate(savedInstanceState); <START> AnkiDroidApp.updateContextWithLanguage(this); <END> }</code><technical_language>of lines required? expected need attachBaseContext</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { getDelegate().installViewFactory(); getDelegate().onCreate(savedInstanceState); super.onCreate(savedInstanceState); }
Source:
<code>protected boolean turnOnMasterTetherSettings() { final TetheringConfiguration cfg = mConfig; try { if ("ncm0".equals(mNotifyList.get(0).interfaceName())) { <START> Log.d(TAG, "skip IP forwarding for ncm"); <END> } else { mNMService.setIpForwardingEnabled(true); } } catch (Exception e) { mLog.e(e); transitionTo(mSetIpForwardingEnabledErrorState); return false; } final String[] dhcpRanges = cfg.enableLegacyDhcpServer ? cfg.legacyDhcpRanges : new String[0]; try { mNMService.startTethering(dhcpRanges); } catch (Exception e) { try { mNMService.stopTethering(); mNMService.startTethering(dhcpRanges); } catch (Exception ee) { mLog.e(ee); transitionTo(mStartTetheringErrorState); return false; } } mLog.log("SET master tether settings: ON"); return true; }</code><technical_language>reference upstreamWanted() related code is currently for local hotspot skip forwarding</technical_language>

Target:
protected boolean turnOnMasterTetherSettings() { final TetheringConfiguration cfg = mConfig; try { mNMService.setIpForwardingEnabled(true); } catch (Exception e) { mLog.e(e); transitionTo(mSetIpForwardingEnabledErrorState); return false; } final String[] dhcpRanges = cfg.enableLegacyDhcpServer ? cfg.legacyDhcpRanges : new String[0]; try { mNMService.startTethering(dhcpRanges); } catch (Exception e) { try { mNMService.stopTethering(); mNMService.startTethering(dhcpRanges); } catch (Exception ee) { mLog.e(ee); transitionTo(mStartTetheringErrorState); return false; } } mLog.log("SET master tether settings: ON"); return true; }
Source:
<code>private void assertMergeCommit(String branch, String subject) throws IOException { Repository r = repoManager.openRepository(project); try { RevWalk rw = new RevWalk(r); try { RevCommit c = rw.parseCommit(r.getRef(branch).getObjectId()); <START> assertThat(c.getParentCount()).isEqualTo(2); <END> assertThat(c.getShortMessage()).isEqualTo("Merge \"" + subject + "\""); assertThat(c.getAuthorIdent().getEmailAddress()).isEqualTo(admin.email); assertThat(c.getCommitterIdent().getEmailAddress()).isEqualTo( serverIdent.getEmailAddress()); } finally { rw.release(); } } finally { r.close(); } }</code><technical_language>assertThat(c.getParentCount()).is(2);</technical_language>

Target:
private void assertMergeCommit(String branch, String subject) throws IOException { Repository r = repoManager.openRepository(project); try { RevWalk rw = new RevWalk(r); try { RevCommit c = rw.parseCommit(r.getRef(branch).getObjectId()); assertThat(c.getParentCount()).is(2); assertThat(c.getShortMessage()).isEqualTo("Merge \"" + subject + "\""); assertThat(c.getAuthorIdent().getEmailAddress()).isEqualTo(admin.email); assertThat(c.getCommitterIdent().getEmailAddress()).isEqualTo( serverIdent.getEmailAddress()); } finally { rw.release(); } } finally { r.close(); } }
Source:
<code>public boolean onCreateOptionsMenu(Menu menu) { getSupportMenuInflater().inflate(R.menu.guide_view_menu, menu); MenuItem item = menu.findItem(R.id.comments); item.getActionView().setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mGuide != null) { ArrayList<Comment> comments; int stepIndex = getStepIndex(), contextid; String title, context; <START> if (stepIndex < 0 || stepIndex >= mGuide.getNumSteps()) { <END> comments = mGuide.getComments(); title = getString(R.string.guide_comments); context = "guide"; contextid = mGuide.getGuideid(); } else { comments = mGuide.getStep(stepIndex).getComments(); contextid = mGuide.getStep(stepIndex).getStepid(); context = "step"; title = getString(R.string.step_number_comments, stepIndex + 1); } startActivityForResult(CommentsActivity.viewGuideComments(getApplicationContext(), comments, title, context, contextid, mGuide.getGuideid()), COMMENT_REQUEST); } } }); CheatSheet.setup(item.getActionView(), R.string.view_comments); return super.onCreateOptionsMenu(menu); }</code><technical_language>This notOnStep, right</technical_language>

Target:
public boolean onCreateOptionsMenu(Menu menu) { getSupportMenuInflater().inflate(R.menu.guide_view_menu, menu); MenuItem item = menu.findItem(R.id.comments); item.getActionView().setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mGuide != null) { ArrayList<Comment> comments; int stepIndex = getStepIndex(), contextid; String title, context; if (GuideViewActivity.this.notOnStep(stepIndex)) { comments = mGuide.getComments(); title = getString(R.string.guide_comments); context = "guide"; contextid = mGuide.getGuideid(); } else { comments = mGuide.getStep(stepIndex).getComments(); contextid = mGuide.getStep(stepIndex).getStepid(); context = "step"; title = getString(R.string.step_number_comments, stepIndex + 1); } startActivityForResult(CommentsActivity.viewGuideComments(getApplicationContext(), comments, title, context, contextid, mGuide.getGuideid()), COMMENT_REQUEST); } } }); CheatSheet.setup(item.getActionView(), R.string.view_comments); return super.onCreateOptionsMenu(menu); }
Source:
<code>protected void run() { try { if (toolHelp) { <START> showToolHelp(); <END> } else { boolean showPrompt = diffToolMgr.isPrompt(); if (prompt.isConfigured()) { showPrompt = prompt.toBoolean(); } String toolNamePrompt = toolName; if (showPrompt) { if ((toolNamePrompt == null) || toolNamePrompt.isEmpty()) { toolNamePrompt = diffToolMgr.getDefaultToolName(gui); } } List<DiffEntry> files = getFiles(); if (files.size() > 0) { compare(files, showPrompt, toolNamePrompt); } } outw.flush(); } catch (RevisionSyntaxException | IOException e) { throw die(e.getMessage(), e); } finally { diffFmt.close(); } }</code><technical_language>this a separate method in commit introducing this class</technical_language>

Target:
protected void run() { try { if (toolHelp) { showToolHelp(); } else { boolean showPrompt = diffTools.isPrompt(); if (prompt.isConfigured()) { showPrompt = prompt.toBoolean(); } String toolNamePrompt = toolName; if (showPrompt) { if ((toolNamePrompt == null) || toolNamePrompt.isEmpty()) { toolNamePrompt = diffTools.getDefaultToolName(gui); } } List<DiffEntry> files = getFiles(); if (files.size() > 0) { compare(files, showPrompt, toolNamePrompt); } } outw.flush(); } catch (RevisionSyntaxException | IOException e) { throw die(e.getMessage(), e); } finally { diffFmt.close(); } }
Source:
<code><START> protected List<Boolean> getSetColumnsForUpdateQuery() { IElementParameter setColumns = source.getElementParameter("SET_COLUMN"); if (setColumns != null && setColumns.isShow(source.getElementParameters()) && setColumns.getValue() != null) { return ((List<Map<String, ? extends Object>>) setColumns.getValue()) .stream() .map(map -> !Boolean.valueOf(map.get("UPDATE_COLUMN").toString())) .collect(Collectors.toList()); } return Collections.emptyList(); <END> }</code><technical_language>java 8 features, optional</technical_language>

Target:
protected List<Boolean> getSetColumnsForUpdateQuery() { return ofNullable(source.getElementParameter("SET_COLUMN")) .filter(iep -> iep.isShow(source.getElementParameters())) .flatMap(iep -> ofNullable((List<Map<String, ? extends Object>>)iep.getValue())) .orElseGet(Collections::emptyList).stream() .map(m -> !Boolean.valueOf(m.get("UPDATE_COLUMN").toString())) .collect(toList()); }
Source:
<code>private void generateCreated(IResource resource) { saros.filesystem.IResource wrappedResource = ResourceConverter.convertToResource(referencePoint, resource); if (wrappedResource == null) { <START> log.error( <END> "Could not create resource creation activity for " + resource + " as no Saros resource object could be obtained - used reference point: " + referencePoint); return; } if (isFile(resource)) { IFile file = resource.getAdapter(IFile.class); byte[] content = FileUtils.getLocalFileContent(file); String charset = FileUtils.getLocalFileCharset(file); if (content == null || charset == null) { logResourceReadError(resource); return; } addActivity( new FileActivity( user, Type.CREATED, Purpose.ACTIVITY, (saros.filesystem.IFile) wrappedResource, null, content, charset)); } else if (isFolder(resource)) { addActivity(new FolderCreatedActivity(user, (IFolder) wrappedResource)); } else { assert false : "cannot handle resource of IResource#getType() = " + resource.getType(); } }</code><technical_language>If plan introduce unsharing option this longer error</technical_language>

Target:
private void generateCreated(IResource resource) { saros.filesystem.IResource wrappedResource = ResourceConverter.convertToResource(referencePoint, resource); if (wrappedResource == null) { log.error( "Could not create resource creation activity for " + resource + " as no Saros resource object could be obtained - used reference point: " + referencePoint); return; } else if (!session.isShared(wrappedResource)) { log.debug("Ignoring resource creation of ignored resource " + wrappedResource); return; } if (isFile(resource)) { IFile file = resource.getAdapter(IFile.class); byte[] content = FileUtils.getLocalFileContent(file); String charset = FileUtils.getLocalFileCharset(file); if (content == null || charset == null) { logResourceReadError(resource); return; } addActivity( new FileActivity( user, Type.CREATED, Purpose.ACTIVITY, (saros.filesystem.IFile) wrappedResource, null, content, charset)); } else if (isFolder(resource)) { addActivity(new FolderCreatedActivity(user, (IFolder) wrappedResource)); } else { assert false : "cannot handle resource of IResource#getType() = " + resource.getType(); } }
Source:
<code>public static ArviointiasteikkoYleissivistava bestGrade(Collection<ArviointiasteikkoYleissivistava> collection) { ArviointiasteikkoYleissivistavaComparator comparator = new ArviointiasteikkoYleissivistavaComparator(); ArviointiasteikkoYleissivistava bestGrade = null; for (ArviointiasteikkoYleissivistava grade : collection) { if (bestGrade == null || comparator.compare(grade, bestGrade) > 0) <START> bestGrade = grade; <END> } return bestGrade; }</code><technical_language>Braces</technical_language>

Target:
public static ArviointiasteikkoYleissivistava bestGrade(Collection<ArviointiasteikkoYleissivistava> collection) { ArviointiasteikkoYleissivistavaComparator comparator = new ArviointiasteikkoYleissivistavaComparator(); ArviointiasteikkoYleissivistava bestGrade = null; for (ArviointiasteikkoYleissivistava grade : collection) { if (bestGrade == null || comparator.compare(grade, bestGrade) > 0) { bestGrade = grade; } } return bestGrade; }
Source:
<code>public boolean supportsSorting(SortBy[] sortAttributes) { <START> if (super.supportsSorting(sortAttributes)) return true; <END> for (SortBy sort : sortAttributes) { if (!supportsPropertySorting(sort.getPropertyName())) return false; } return true; }</code><technical_language>this @taba90, if default implementation supports want override default check no</technical_language>

Target:
public boolean supportsSorting(SortBy[] sortAttributes) { for (SortBy sort : sortAttributes) { if (!supportsPropertySorting(sort.getPropertyName())) return false; } return true; }
Source:
<code>public int countClauses() { <START> int cnt = components.size(); <END> for(Expression<T> exp : components) { cnt += exp.countClauses(); } return cnt; }</code><technical_language>Expressions immutable, clear if is design current implementations immutable. sense annotate @javax.annotation.concurrent.Immutable intent clear (if is intent). a micro optimization in caching result here, is worth it</technical_language>

Target:
public int countClauses() { if(numClauses >= 0) { return numClauses; } int cnt = components.size(); for(Expression<T> exp : components) { cnt += exp.countClauses(); } numClauses = cnt; return numClauses; }
Source:
<code>public void writeProperties(Map<String, ?> value) throws IOException { if (value.isEmpty() == false) { <START> List<Map.Entry<String, ?>> orderedProperties = value.entrySet().stream() <END> .sorted(Map.Entry.comparingByKey()) .collect(Collectors.toList()); for (Map.Entry<String, ?> entry : orderedProperties) { _jsonGenerator.writeFieldName(entry.getKey()); writeData(entry.getValue()); } } }</code><technical_language>unit tests imply this, confirm; this method is for writing custom properties, right? this is a generic JsonBuilder, sense of "properties" are? is this for writing generic subtree of JSON object</technical_language>

Target:
public void writeProperties(Map<String, ?> value) throws IOException { if (value.isEmpty() == false) { List<Map.Entry<String, ?>> orderedProperties = value.entrySet().stream() .sorted(Map.Entry.comparingByKey()) .collect(Collectors.toList()); for (Map.Entry<String, ?> entry : orderedProperties) { _jsonGenerator.writeFieldName(entry.getKey()); writeDataWithMapEntriesSorted(entry.getValue()); } } }
Source:
<code>private HttpResponse initiateDownload() throws IOException { if (connection == null) { try { lastRequest = new HttpGet(url); connection = clientProvider.getHttpClientSupplier().get().execute(lastRequest); size = connection.getEntity().getContentLength(); <START> } catch (IOException | IllegalArgumentException ex) { <END> size = -1L; throw new IOException("Error with URL " + url + ": " + ex.getMessage(), ex); } } return connection; }</code><technical_language>log this properly too, I think. Errors in this class bubble inspected easily</technical_language>

Target:
private HttpResponse initiateDownload() throws IOException { if (connection == null) { try { lastRequest = new HttpGet(url); connection = clientProvider.getHttpClientSupplier().get().execute(lastRequest); size = connection.getEntity().getContentLength(); } catch (IOException | IllegalArgumentException ex) { String msg = String.format("Error with URL {}", url); LOG.error(msg,ex); size = -1L; throw new IOException(msg, ex); } } return connection; }
Source:
<code>public void onCancel(@CancelReason int cancelReason) { <START> job.onCancel(cancelReason, getThrowable()); <END> }</code><technical_language>reason call getter. field access</technical_language>

Target:
public void onCancel(@CancelReason int cancelReason) { job.onCancel(cancelReason, throwable); }
Source:
<code>public float getMinProcessDistance(MultiblockProcess<MultiblockRecipe> process) { float maxTicks = BottlingProcess.getMaxProcessTick(); <START> return 1f-(BottlingMachineRenderer.getTransportTime(maxTicks)+BottlingMachineRenderer.getLiftTime(maxTicks))/maxTicks; <END> }</code><technical_language>I move functions TE. I suspect current implementation crashes dedicated servers, if I avoid referencing tile render class in server-side code</technical_language>

Target:
public float getMinProcessDistance(MultiblockProcess<MultiblockRecipe> process) { float maxTicks = BottlingProcess.getMaxProcessTick(); return 1f-(getTransportTime(maxTicks)+getLiftTime(maxTicks))/maxTicks; }
Source:
<code>public String getSegmentedId() { String segmentedId = ""; if (getSegmentedFields() != null && getSegmentedFields().size() > 0) { Class<?> clazz = this.getClass(); List<Field> fields = FieldUtils.getFieldsListWithAnnotation(clazz, CsvField.class); for (Field field : fields) { if (field.isAnnotationPresent(CsvField.class)) { CsvField reportFieldAnnotation = field.getAnnotation(CsvField.class); if (getSegmentedFields().contains(reportFieldAnnotation.reportField())) { try { Object value = FieldUtils.readField(field, this, true); <START> if (value != null) { <END> segmentedId += "-" + value.toString(); } } catch (IllegalAccessException e) { e.printStackTrace(); } } } } } return segmentedId; }</code><technical_language>Check for null, empty string, "--" (after trimming leading/tailing whitespaces). considered part of ID</technical_language>

Target:
public String getSegmentedId() { String segmentedId = ""; if (getSegmentedFields() != null && getSegmentedFields().size() > 0) { Class<?> clazz = this.getClass(); List<Field> fields = FieldUtils.getFieldsListWithAnnotation(clazz, CsvField.class); for (Field field : fields) { if (field.isAnnotationPresent(CsvField.class)) { CsvField reportFieldAnnotation = field.getAnnotation(CsvField.class); if (getSegmentedFields().contains(reportFieldAnnotation.reportField())) { try { Object value = FieldUtils.readField(field, this, true); if (value != null) { String valueAsString = value.toString().replaceAll("-", ""); if (StringUtils.isNotBlank(valueAsString)){ segmentedId += "-" + valueAsString.trim(); } } } catch (IllegalAccessException e) { e.printStackTrace(); } } } } } return segmentedId; }
Source:
<code>private RevisionInfo resolveRevisionToDisplay(ChangeInfo info) { if (revision == null) { revision = info.current_revision(); if (revision == null) { JsArray<RevisionInfo> revisions = info.revisions().values(); if (revisions.length() > 0) { RevisionInfo.sortRevisionInfoByNumber(revisions); revision = revisions.get(revisions.length() - 1).name(); } else { new ErrorDialog( Resources.M.changeWithNoRevisions(info.legacy_id().get())).center(); } } } else if (!info.revisions().containsKey(revision)) { JsArray<RevisionInfo> list = info.revisions().values(); for (int i = 0; i < list.length(); i++) { RevisionInfo r = list.get(i); if (revision.equals(String.valueOf(r._number()))) { revision = r.name(); break; } } } <START> return info.revision(revision); <END> }</code><technical_language>return null this method if loop in else if case fails find entry. I pull error dialog fallback logic instead</technical_language>

Target:
private RevisionInfo resolveRevisionToDisplay(ChangeInfo info) { if (revision == null) { revision = info.current_revision(); } else if (!info.revisions().containsKey(revision)) { JsArray<RevisionInfo> list = info.revisions().values(); for (int i = 0; i < list.length(); i++) { RevisionInfo r = list.get(i); if (revision.equals(String.valueOf(r._number()))) { revision = r.name(); break; } } } if (revision != null) { return info.revision(revision); } else { JsArray<RevisionInfo> revisions = info.revisions().values(); if (revisions.length() > 0) { RevisionInfo.sortRevisionInfoByNumber(revisions); RevisionInfo rev = revisions.get(revisions.length() - 1); revision = rev.name(); return rev; } else { new ErrorDialog( Resources.M.changeWithNoRevisions(info.legacy_id().get())).center(); throw new IllegalStateException("no revision, cannot proceed"); } } }
Source:
<code>public void symbol_visitor() { assertThat(context.referencesForSymbolAt(componentKey, 1, 10)).isNull(); <START> verifyUsages(componentKey, 1, 0); <END> verifyUsages(componentKey, 2, 0, reference(10, 4)); verifyUsages(componentKey, 5, 4, reference(6, 4), reference(7, 4), reference(8, 8), reference(13, 9)); verifyUsages(componentKey, 9, 4); verifyUsages(componentKey, 16, 4); verifyUsages(componentKey, 23, 13); verifyUsages(componentKey, 19, 13, reference(22, 13), reference(26, 13)); verifyUsages(componentKey, 18, 17, reference(19, 8)); verifyUsages(componentKey, 21, 18, reference(22, 8), reference(23, 8)); verifyUsages(componentKey, 25, 19, reference(26, 8)); verifyUsages(componentKey, 28, 11, reference(28, 15), reference(28, 17)); }</code><technical_language>I remove componentKey parameter of this method field directly</technical_language>

Target:
public void symbol_visitor() { assertThat(context.referencesForSymbolAt(componentKey, 1, 10)).isNull(); verifyUsages(1, 0); verifyUsages(2, 0, reference(10, 4, 10, 5)); verifyUsages(5, 4, reference(6, 4, 6, 5), reference(7, 4, 7, 5), reference(8, 8, 8, 9), reference(13, 9, 13, 10)); verifyUsages(9, 4); verifyUsages(16, 4); verifyUsages(23, 13); verifyUsages(19, 13, reference(22, 13, 22, 14), reference(26, 13, 26, 14)); verifyUsages(18, 17, reference(19, 8, 19, 12)); verifyUsages(21, 18, reference(22, 8, 22, 12), reference(23, 8, 23, 12)); verifyUsages(25, 19, reference(26, 8, 26, 12)); verifyUsages(28, 11, reference(28, 15, 28, 16), reference(28, 17, 28, 18)); }