auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void onCreate(Bundle savedInstanceState) { LOG.i(TAG, "Apache Cordova native platform version " + CordovaWebView.CORDOVA_VERSION + " is starting"); LOG.d(TAG, "CordovaActivity.onCreate()"); loadConfig(); if(!preferences.getBoolean("ShowTitle", false)) { getWindow().requestFeature(Window.FEATURE_NO_TITLE); } if(preferences.getBoolean("SetFullscreen", false)) { Log.d(TAG, "The SetFullscreen configuration is deprecated in favor of Fullscreen, and will be removed in a future version."); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } else if (preferences.getBoolean("Fullscreen", false)) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { setSystemUiVisibilityMode(getWindow()); <START> getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() { <END> @Override public void onSystemUiVisibilityChange(int visibility) { if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { setSystemUiVisibilityMode(getWindow()); } } }); } else { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } } else { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); } super.onCreate(savedInstanceState); cordovaInterface = makeCordovaInterface(); if(savedInstanceState != null) { cordovaInterface.restoreInstanceState(savedInstanceState); } }</code><technical_language>I this listener necessary. to: <LINK_0> setting IMMERSIVE_STICKY care of re-entering fullscreen</technical_language>

Target:
public void onCreate(Bundle savedInstanceState) { LOG.i(TAG, "Apache Cordova native platform version " + CordovaWebView.CORDOVA_VERSION + " is starting"); LOG.d(TAG, "CordovaActivity.onCreate()"); loadConfig(); if(!preferences.getBoolean("ShowTitle", false)) { getWindow().requestFeature(Window.FEATURE_NO_TITLE); } if(preferences.getBoolean("SetFullscreen", false)) { Log.d(TAG, "The SetFullscreen configuration is deprecated in favor of Fullscreen, and will be removed in a future version."); preferences.set("Fullscreen", true); } if(preferences.getBoolean("Fullscreen", false)) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { immersiveMode = true; } else { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } } else { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); } super.onCreate(savedInstanceState); cordovaInterface = makeCordovaInterface(); if(savedInstanceState != null) { cordovaInterface.restoreInstanceState(savedInstanceState); } }
Source:
<code>public void validate_shouldPassIfTheNameIsUniqueAmongstAllConceptMapTypeNames() throws Exception { ConceptMapType mapType = new ConceptMapType(); mapType.setName("unique-name"); Errors errors = new BindException(mapType, "mapType"); PowerMockito.when(conceptService.getConceptMapTypeByName(Mockito.argThat(TestUtil.equalsMatcher("unique-name")))) .thenReturn(null); new ConceptMapTypeValidator().validate(mapType, errors); <START> Assert.assertEquals(false, errors.hasErrors()); <END> }</code><technical_language>default matcher tests equals() AFAIK. basically do: this: Assert.assertThat(myVar, Is.is("expected value"))</technical_language>

Target:
public void validate_shouldPassIfTheNameIsUniqueAmongstAllConceptMapTypeNames() throws Exception { ConceptMapType mapType = new ConceptMapType(); mapType.setName("unique-name"); Errors errors = new BindException(mapType, "mapType"); when(conceptService.getConceptMapTypeByName(eq("unique-name"))).thenReturn(null); new ConceptMapTypeValidator().validate(mapType, errors); Assert.assertEquals(false, errors.hasErrors()); }
Source:
<code><START> private PKCS10CertificationRequest getCsr(X500Name subject, <END> PublicKey pubKey, PrivateKey priKey, char[] password) throws GeneralSecurityException, IOException { SubjectPublicKeyInfo pkInfo = SubjectPublicKeyInfo.getInstance(pubKey .getEncoded()); JcaContentSignerBuilder signerBuilder = new JcaContentSignerBuilder( "SHA1withRSA"); ContentSigner signer; try { signer = signerBuilder.build(priKey); } catch (OperatorCreationException e) { IOException ioe = new IOException(); ioe.initCause(e); throw ioe; } PKCS10CertificationRequestBuilder builder = new PKCS10CertificationRequestBuilder(subject, pkInfo); if (password != null) { builder.addAttribute( PKCSObjectIdentifiers.pkcs_9_at_challengePassword, new DERPrintableString(new String(password)) ); } return builder.build(signer); }</code><technical_language>overload this method providing signature PCKS10... getCsr(X500Name, PublicKey, PrivateKey) clients explicitly pass null</technical_language>

Target:
private PKCS10CertificationRequest getCsr( X500Name subject, PublicKey pubKey, PrivateKey priKey, char[] password ) throws GeneralSecurityException, IOException { return csrBuilder(subject, pubKey) .addAttribute( PKCSObjectIdentifiers.pkcs_9_at_challengePassword, new DERPrintableString(new String(password)) ) .build(getContentSigner(priKey)); }
Source:
<code>public void destroy() { destroyToolbar(); destroyPalette(); <START> sessionManager.dispose(); <END> getDisplayer().destroy(); getView().destroy(); diagram = null; }</code><technical_language>nicer terms "dispose" "destroy". "dispose" do expect "destroy" do</technical_language>

Target:
public void destroy() { destroyToolbar(); destroyPalette(); sessionManager.destroy(); getDisplayer().destroy(); getView().destroy(); diagram = null; }
Source:
<code>public static ISchedulingRule getRuleForContainers(Collection<IPath> paths) { List<ISchedulingRule> rules = new ArrayList<ISchedulingRule>(); IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace() .getRuleFactory(); for (IPath path : paths) { IResource resource = ResourceUtil.getResourceForLocation(path); if (resource != null) { IContainer container = resource.getParent(); if (!(container instanceof IWorkspaceRoot)) { ISchedulingRule rule = ruleFactory.modifyRule(container); if (rule != null) rules.add(rule); } <START> } <END> } if (rules.size() == 0) return null; else return new MultiRule(rules.toArray(new ISchedulingRule[rules.size()])); }</code><technical_language>If container is IWorkspaceRoot scheduling rule WorkspaceRoot</technical_language>

Target:
public static ISchedulingRule getRuleForContainers(Collection<IPath> paths) { List<ISchedulingRule> rules = new ArrayList<ISchedulingRule>(); IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace() .getRuleFactory(); for (IPath path : paths) { IResource resource = ResourceUtil.getResourceForLocation(path); if (resource != null) { IContainer container = resource.getParent(); ISchedulingRule rule = ruleFactory.modifyRule(container); if (rule != null) rules.add(rule); } } if (rules.size() == 0) return null; else return new MultiRule(rules.toArray(new ISchedulingRule[rules.size()])); }
Source:
<code>protected CronWorkflow(String type) { <START> this(type, new Builder() <END> .setHistoryDeletableAfter(weeks(1)) .build()); }</code><technical_language>need break lines here</technical_language>

Target:
protected CronWorkflow(String type) { this(type, new Builder().setHistoryDeletableAfter(days(45)).setDeleteHistoryCondition(oncePerDay()).build()); }
Source:
<code>public static URL mergeUrl(URL remoteUrl, Map<String, String> localMap) { Map<String, String> remoteMap = remoteUrl.getParameters(); if (remoteMap == null || remoteMap.size() <= 0) { return remoteUrl.addParameters(localMap); } remoteMap.remove(THREAD_NAME_KEY); remoteMap.remove(THREADPOOL_KEY); remoteMap.remove(CORE_THREADS_KEY); remoteMap.remove(THREADS_KEY); remoteMap.remove(QUEUES_KEY); remoteMap.remove(ALIVE_KEY); <START> remoteMap.remove(TRANSPORTER_KEY); <END> if (localMap != null && localMap.size() > 0) { String remoteApplication = remoteMap.get(APPLICATION_KEY); remoteMap.putAll(localMap); remoteMap.put(REMOTE_APPLICATION_KEY, remoteApplication); String remoteFilter = remoteMap.get(REFERENCE_FILTER_KEY); String localFilter = localMap.get(REFERENCE_FILTER_KEY); if (remoteFilter != null && remoteFilter.length() > 0 && localFilter != null && localFilter.length() > 0) { remoteMap.put(REFERENCE_FILTER_KEY, remoteFilter + "," + localFilter); } String remoteListener = remoteMap.get(INVOKER_LISTENER_KEY); String localListener = localMap.get(INVOKER_LISTENER_KEY); if (remoteListener != null && remoteListener.length() > 0 && localListener != null && localListener.length() > 0) { remoteMap.put(INVOKER_LISTENER_KEY, remoteListener + "," + localListener); } } return remoteUrl; }</code><technical_language>if localMap is empty, remoteMap loss entries, if this works expected</technical_language>

Target:
public static URL mergeUrl(URL remoteUrl, Map<String, String> localMap) { Map<String, String> remoteMap = remoteUrl.getParameters(); if (remoteMap == null || remoteMap.size() <= 0) { return remoteUrl.addParameters(localMap); } remoteMap.remove(THREAD_NAME_KEY); remoteMap.remove(THREADPOOL_KEY); remoteMap.remove(CORE_THREADS_KEY); remoteMap.remove(THREADS_KEY); remoteMap.remove(QUEUES_KEY); remoteMap.remove(ALIVE_KEY); remoteMap.remove(TRANSPORTER_KEY); remoteMap.put(REMOTE_APPLICATION_KEY, remoteMap.get(APPLICATION_KEY)); if (isNotEmptyMap(localMap)) { remoteMap.putAll(localMap); String remoteFilter = remoteMap.get(REFERENCE_FILTER_KEY); String localFilter = localMap.get(REFERENCE_FILTER_KEY); if (isNotEmpty(remoteFilter) && isNotEmpty(localFilter)) { remoteMap.put(REFERENCE_FILTER_KEY, remoteFilter + "," + localFilter); } String remoteListener = remoteMap.get(INVOKER_LISTENER_KEY); String localListener = localMap.get(INVOKER_LISTENER_KEY); if (isNotEmpty(remoteListener) && isNotEmpty(localListener)) { remoteMap.put(INVOKER_LISTENER_KEY, remoteListener + "," + localListener); } } return remoteUrl; }
Source:
<code>public boolean isSameDictionary(final SAMSequenceDictionary that) { if (that == null || that.mSequences == null) return false; if (this == that) return true; final Iterator<SAMSequenceRecord> thatSequences = that.mSequences.iterator(); for (final SAMSequenceRecord thisSequence : mSequences) { if (!thatSequences.hasNext()) return false; else { final SAMSequenceRecord thatSequence = thatSequences.next(); <START> if(!thatSequence.isSameSequence(thisSequence)) <END> return false; } } return !thatSequences.hasNext(); }</code><technical_language>space</technical_language>

Target:
public boolean isSameDictionary(final SAMSequenceDictionary that) { if (that == null || that.mSequences == null) return false; if (this == that) return true; final Iterator<SAMSequenceRecord> thatSequences = that.mSequences.iterator(); for (final SAMSequenceRecord thisSequence : mSequences) { if (!thatSequences.hasNext()) { return false; } else { final SAMSequenceRecord thatSequence = thatSequences.next(); if (!thatSequence.isSameSequence(thisSequence)) { return false; } } } return !thatSequences.hasNext(); }
Source:
<code>private boolean isDistributable(AnalysisJob job) { for (ComponentJob componentJob : _sparkJobContext.getComponentList()) { <START> if (componentJob instanceof AnalyzerJob) { <END> AnalyzerJob analyzerJob = (AnalyzerJob) componentJob; if (!analyzerJob.getDescriptor().isDistributable()) { return false; } } } return true; }</code><technical_language>_all_ components a distributable flag, filter analyzers here</technical_language>

Target:
private boolean isDistributable(AnalysisJob job) { for (ComponentJob componentJob : _sparkJobContext.getComponentList()) { if (!componentJob.getDescriptor().isDistributable()) { return false; } } return true; }
Source:
<code>static Long round(Long timeValue, Number roundToNearest) { <START> return (timeValue / roundToNearest.intValue()) * roundToNearest.intValue(); <END> }</code><technical_language>roundToNearest.longValue() cache for performance concern</technical_language>

Target:
static Long round(Long timeValue, Number roundToNearest) { long roundingValue = roundToNearest.longValue(); return (timeValue / roundingValue) * roundingValue; }
Source:
<code>public int getSequenceSize() { if (size() == 0) { return 0; } else { Message<?> message = getOne(); if (message != null) { <START> return message.getHeaders().get(IntegrationMessageHeaderAccessor.SEQUENCE_SIZE, Integer.class); <END> } else { return 0; } } }</code><technical_language>NPE if header missing</technical_language>

Target:
public int getSequenceSize() { if (size() == 0) { return 0; } else { Message<?> message = getOne(); if (message != null) { Integer sequenceSize = message.getHeaders() .get(IntegrationMessageHeaderAccessor.SEQUENCE_SIZE, Integer.class); return (sequenceSize != null ? sequenceSize : 0); } else { return 0; } } }
Source:
<code>public void testDefault() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(LocalFinalVariableNameCheck.class); final String pattern = "^[a-z][a-zA-Z0-9]*$"; final String[] expected = { <START> "17:19: " + getCheckMessage(MSG_INVALID_PATTERN, "CDE", pattern), <END> "23:29: " + getCheckMessage(MSG_INVALID_PATTERN, "BR", pattern), "33:35: " + getCheckMessage(MSG_INVALID_PATTERN, "BR", pattern), }; verify(checkConfig, getPath("InputLocalFinalVariableName.java"), expected); }</code><technical_language>Again, expecting changes this test. Changes for issue in input file other tests avoid this conflict. this feature increase violations, expecting violations for tests stay increase. expect disappear, change line number, is is happening 123</technical_language>

Target:
public void testDefault() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(LocalFinalVariableNameCheck.class); final String pattern = "^[a-z][a-zA-Z0-9]*$"; final String[] expected = { "123:19: " + getCheckMessage(MSG_INVALID_PATTERN, "CDE", pattern), }; verify(checkConfig, getPath("InputLocalFinalVariableName.java"), expected); }
Source:
<code>public String toString() { StringBuilder sb = new StringBuilder("Marker ["); sb.append("On: ").append(resource.getFullPath()); MarkerInfo info = getInfo(); if (info == null) { sb.append(", not found]"); return sb.toString(); } sb.append(", id: ").append(info.getId()); sb.append(", type: ").append(info.getType()); Map<String, Object> attributes = info.getAttributes(); if (attributes != null) { TreeMap<String, Object> tm = new TreeMap<>(attributes); Set<Entry<String, Object>> set = tm.entrySet(); if (!set.isEmpty()) { sb.append(", attributes: ["); for (Entry<String, Object> entry : set) { sb.append(entry.getKey()).append(": ").append(entry.getValue()).append(", "); } sb.setLength(sb.length() - 2); sb.append("]"); } } sb.append(", created: <START> ").append(new Date(info.getCreationTime())); <END> sb.append("]"); return sb.toString(); }</code><technical_language>Default Date.toString() format is pretty ugly. Please DateFormat instead</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder("Marker ["); sb.append("on: ").append(resource.getFullPath()); MarkerInfo info = getInfo(); if (info == null) { sb.append(", not found]"); return sb.toString(); } sb.append(", id: ").append(info.getId()); sb.append(", type: ").append(info.getType()); Map<String, Object> attributes = info.getAttributes(); if (attributes != null) { TreeMap<String, Object> tm = new TreeMap<>(attributes); Set<Entry<String, Object>> set = tm.entrySet(); if (!set.isEmpty()) { sb.append(", attributes: ["); for (Entry<String, Object> entry : set) { sb.append(entry.getKey()).append(": ").append(entry.getValue()).append(", "); } sb.setLength(sb.length() - 2); sb.append(']'); } } sb.append(", created: ").append(DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(new Date(info.getCreationTime()))); sb.append(']'); return sb.toString(); }
Source:
<code>public static Parser createParser() { return new org.apache.batik.css.parser.Parser() { @Override protected boolean isPseudoElement(final String s) { if (super.isPseudoElement(s)) { return true; } else { switch (s.charAt(0)) { case 't': case 'T': <START> return s.equalsIgnoreCase("target"); <END> } return false; } } }; }</code><technical_language>please a constant for "target". measure if switch-case for char is neccessary</technical_language>

Target:
public static Parser createParser() { return new org.apache.batik.css.parser.Parser() { @Override protected boolean isPseudoElement(final String s) { if (super.isPseudoElement(s)) { return true; } else { return s.equalsIgnoreCase(CSS.PSEUDO_TARGET); } } @Override protected Scanner createScanner(final InputSource source) { documentURI = source.getURI(); if (documentURI == null) { documentURI = ""; } final Reader r = source.getCharacterStream(); if (r != null) { return new CssScanner(r); } InputStream is = source.getByteStream(); if (is != null) { return new CssScanner(is, source.getEncoding()); } final String uri = source.getURI(); if (uri == null) { throw new CSSException(formatMessage("empty.source", null)); } try { final ParsedURL purl = new ParsedURL(uri); is = purl.openStreamRaw(CSSConstants.CSS_MIME_TYPE); return new CssScanner(is, source.getEncoding()); } catch (final IOException e) { throw new CSSException(e); } } @Override protected void parseRuleSet() { if (((CssScanner) scanner).getCurrent() == '|') { ((CssScanner) scanner).joinIdentifier(); } super.parseRuleSet(); } }; }
Source:
<code>public void tags() throws IOException { JsonReader reader = newReader("{}"); assertThat(reader.getTag(String.class)).isNull(); <START> assertThat(reader.getTag(Integer.class)).isNull(); <END> assertThat(reader.getTags()).isEmpty(); reader.setTag(String.class, "Foo"); reader.setTag(Integer.class, "Bar"); assertThat(reader.getTag(String.class)).isEqualTo("Foo"); assertThat(reader.getTag(Integer.class)).isEqualTo("Bar"); assertThat(reader.getTags()) .containsOnly( new SimpleEntry<Class<?>, Object>(String.class, "Foo"), new SimpleEntry<Class<?>, Object>(Integer.class, "Bar")); }</code><technical_language>extra constraint - require tag is instance of tag's type. In practice create a type for tag set</technical_language>

Target:
public void tags() throws IOException { JsonReader reader = newReader("{}"); assertThat(reader.tag(Integer.class)).isNull(); assertThat(reader.tag(CharSequence.class)).isNull(); reader.setTag(Integer.class, 1); reader.setTag(CharSequence.class, "Foo"); try { reader.setTag((Class) CharSequence.class, 1); fail(); } catch (IllegalArgumentException expected) { assertThat(expected).hasMessage("Tag value must be of type java.lang.CharSequence"); } assertThat(reader.tag(Integer.class)).isEqualTo(1).isInstanceOf(Integer.class); assertThat(reader.tag(CharSequence.class)).isEqualTo("Foo").isInstanceOf(String.class); assertThat(reader.tag(String.class)).isNull(); }
Source:
<code>public void sendResponse(ReplyHeader h, Record r, String tag) throws IOException { try { if (!channel.isOpen()) { return; } ByteArrayOutputStream baos = new ByteArrayOutputStream(); BinaryOutputArchive bos = BinaryOutputArchive.getArchive(baos); try { baos.write(fourBytes); bos.writeRecord(h, "header"); if (r != null) { bos.writeRecord(r, tag); } baos.close(); <START> } catch (IOException e) { <END> LOG.error("Error serializing response"); } byte b[] = baos.toByteArray(); ByteBuffer bb = ByteBuffer.wrap(b); bb.putInt(b.length - 4).rewind(); sendBuffer(bb); if (h.getXid() > 0) { if (!zkServer.shouldThrottle(outstandingCount.decrementAndGet())) { enableRecv(); } } } catch (Exception e) { throw new IOException(e); } }</code><technical_language>This IOException is swallowed either, re-throw it</technical_language>

Target:
public void sendResponse(ReplyHeader h, Record r, String tag) throws IOException { try { if (!channel.isOpen()) { return; } ByteArrayOutputStream baos = new ByteArrayOutputStream(); BinaryOutputArchive bos = BinaryOutputArchive.getArchive(baos); baos.write(fourBytes); bos.writeRecord(h, "header"); if (r != null) { bos.writeRecord(r, tag); } baos.close(); byte b[] = baos.toByteArray(); ByteBuffer bb = ByteBuffer.wrap(b); bb.putInt(b.length - 4).rewind(); sendBuffer(bb); if (h.getXid() > 0) { if (!zkServer.shouldThrottle(outstandingCount.decrementAndGet())) { enableRecv(); } } } catch (Exception e) { throw new IOException(e); } }
Source:
<code>public String toString() { <START> return toStringHelper(this) <END> .add("setSessionProperties", setSessionProperties) .add("clearSessionProperties", clearSessionProperties) .add("addedPreparedStatements", addedPreparedStatements) .add("deallocatedPreparedStatements", deallocatedPreparedStatements) .add("startedTransactionId", startedTransactionId) .add("clearTransactionId", clearTransactionId) .toString(); }</code><technical_language>omit null values</technical_language>

Target:
public String toString() { return toStringHelper(this) .add("setSessionProperties", setSessionProperties) .add("clearSessionProperties", clearSessionProperties) .add("addedPreparedStatements", addedPreparedStatements) .add("deallocatedPreparedStatements", deallocatedPreparedStatements) .add("startedTransactionId", startedTransactionId) .add("clearTransactionId", clearTransactionId) .omitNullValues() .toString(); }
Source:
<code>private void buildIndex() { int i = 0; index.clear(); Entry q = head; while (q != null) { <START> if (++i % 100 == 0) { <END> index.add(q); } q = q.next; } }</code><technical_language>style nit: braces single line blocks</technical_language>

Target:
private void buildIndex() { int i = 0; index.clear(); Entry q = head; while (q != null) { if (++i % 100 == 0) index.add(q); q = q.next; } }
Source:
<code>public void onStartup(final ObservablePath path, final PlaceRequest place) { super.init(path, place, type); <START> testRunnerReportingPanel.reset(); <END> scenarioSimulationEditorPresenter.init(this, (ObservablePath) place.getPath()); }</code><technical_language>Is a single reset init method invoke startup</technical_language>

Target:
public void onStartup(final ObservablePath path, final PlaceRequest place) { super.init(path, place, type); scenarioSimulationEditorPresenter.setWrapper(this); scenarioSimulationEditorPresenter.setPath(path); }
Source:
<code>public Set<Link> getLinks() { List<String> links = this.headers.get(HttpHeaders.LINK); if (links == null || links.isEmpty()) { return Collections.emptySet(); } try { Set<Link> result = new HashSet<Link>(links.size()); for (String l : links) { <START> for (String p : l.split(",")) { <END> result.add(Link.valueOf(p.trim())); } } return result; } catch (IllegalArgumentException e) { throw exception(HttpHeaders.LINK, links, e); } }</code><technical_language>I splitting is enough. URI , means this code produce invalid result</technical_language>

Target:
public Set<Link> getLinks() { List<String> links = this.headers.get(HttpHeaders.LINK); if (links == null || links.isEmpty()) { return Collections.emptySet(); } try { Set<Link> result = new HashSet<Link>(links.size()); StringBuilder linkString; for (String link : links) { linkString = new StringBuilder(); StringTokenizer st = new StringTokenizer(link, "<>,", true); boolean linkOpen = false; while (st.hasMoreTokens()) { String n = st.nextToken(); if (n.equals("<")) { linkOpen = true; } else if (n.equals(">")) { linkOpen = false; } else if (!linkOpen && n.equals(",")) { result.add(Link.valueOf(linkString.toString().trim())); linkString = new StringBuilder(); continue; } linkString.append(n); } if (linkString.length() > 0) { result.add(Link.valueOf(linkString.toString().trim())); } } return result; } catch (IllegalArgumentException e) { throw exception(HttpHeaders.LINK, links, e); } }
Source:
<code>public void handlingException() { List<DetectLanguageInput> inputs = Arrays.asList( new DetectLanguageInput("1", "This is written in English.", "us"), new DetectLanguageInput("1", "Este es un document escrito en Español.", "es") ); try { <START> textAnalyticsClient.detectLanguageBatch(inputs, null, Context.NONE); <END> } catch (HttpResponseException e) { System.out.println(e.getMessage()); } }</code><technical_language>if method takes Context parameter, withResponse</technical_language>

Target:
public void handlingException() { List<DetectLanguageInput> inputs = Arrays.asList( new DetectLanguageInput("1", "This is written in English.", "us"), new DetectLanguageInput("1", "Este es un documento escrito en Español.", "es") ); try { textAnalyticsClient.detectLanguageBatch(inputs, null, Context.NONE); } catch (HttpResponseException e) { System.out.println(e.getMessage()); } }
Source:
<code>public void visitCallExpression(CallExpressionTree tree) { if (tree.types().contains(ObjectType.FrameworkType.JQUERY_SELECTOR_OBJECT)) { LiteralTree parameter = getSelectorParameter(tree); if (parameter != null) { <START> Map<String, List<CallExpressionTree>> currentSelectors = selectors.peek(); <END> String value = parameter.value(); if (!currentSelectors.containsKey(value)) { currentSelectors.put(value, new ArrayList<>()); } currentSelectors.get(value).add(tree); } } super.visitCallExpression(tree); }</code><technical_language>@vilchik-elena a ListMultimap simplify code a bit</technical_language>

Target:
public void visitCallExpression(CallExpressionTree tree) { if (tree.types().contains(ObjectType.FrameworkType.JQUERY_SELECTOR_OBJECT)) { LiteralTree parameter = getSelectorParameter(tree); if (parameter != null) { String value = parameter.value(); selectors.peek().put(value, tree); } } super.visitCallExpression(tree); }
Source:
<code>private Function<PollingContext<OperationResult>, Mono<OperationResult>> contentAnalyzeActivationOperation( <START> String sourceUrl) { <END> return (pollingContext) -> { try { return service.analyzeLayoutAsyncWithResponseAsync(new SourcePath().setSource(sourceUrl)) .map(response -> new OperationResult(parseModelId(response.getDeserializedHeaders().getOperationLocation()))); } catch (RuntimeException ex) { return monoError(logger, ex); } }; }</code><technical_language>Other activation method result poller helper methods different? combined a single helper method</technical_language>

Target:
private Function<PollingContext<OperationResult>, Mono<OperationResult>> contentAnalyzeActivationOperation( String sourceUrl) { return (pollingContext) -> { try { Objects.requireNonNull(sourceUrl, "'sourceUrl' is required and cannot be null."); return service.analyzeLayoutAsyncWithResponseAsync(new SourcePath().setSource(sourceUrl)) .map(response -> new OperationResult(parseModelId(response.getDeserializedHeaders().getOperationLocation()))); } catch (RuntimeException ex) { return monoError(logger, ex); } }; }
Source:
<code>protected double getOperandCost() throws StandardException { <START> return operand == null ? 0.0f : operand.getBaseOperationCost(); <END> }</code><technical_language>(nitpic) 0.0f is float, 0.0 (double)</technical_language>

Target:
protected double getOperandCost() throws StandardException { return operand == null ? 0.0 : operand.getBaseOperationCost(); }
Source:
<code>private List<Mempool> getMemPools() { <START> List<Mempool> memPoolList = new ArrayList<Mempool>(); <END> Mempool memPool = new Mempool(); memPool.setAllocCount(0); memPool.setColdCount(1024); memPool.setHotCount(0); memPool.setMaxAlloc(0); memPool.setMaxStdAlloc(0); memPool.setName("v1-server:fd_t"); memPool.setPadddedSize(100); memPool.setPoolMisses(0); memPoolList.add(memPool); return memPoolList; }</code><technical_language>create memPool ant return Collections.singletonList(memPool);</technical_language>

Target:
private List<Mempool> getMemPools() { Mempool memPool = new Mempool(); memPool.setAllocCount(0); memPool.setColdCount(1024); memPool.setHotCount(0); memPool.setMaxAlloc(0); memPool.setMaxStdAlloc(0); memPool.setName("v1-server:fd_t"); memPool.setPadddedSize(100); memPool.setPoolMisses(0); return Collections.singletonList(memPool); }
Source:
<code>public void testContainerSnapWithArrange() throws Exception { final UIDiagramRepresentation diagramRepresentation = localSession.newDiagramRepresentation("new Top/Bottom Container Ports And Edges", "Top/Bottom Container Ports And Edges").on(mainEPackage) .withDefaultName().ok(); final SWTBotSiriusDiagramEditor editor = diagramRepresentation.open().getEditor(); SWTBotUtils.waitAllUiEvents(); IGraphicalEditPart LF6 = (IGraphicalEditPart) editor.getEditPart("LF6", DNodeContainer2EditPart.class).part(); IGraphicalEditPart LF7 = (IGraphicalEditPart) editor.getEditPart("LF7", DNodeContainer2EditPart.class).part(); assertTrue("For container, the x coordinate or y coordinate of top left corner should be on the <START> grid should be on the grid.", <END> checkLocationAlignOnGrid(LF6)); assertTrue("For container, the x coordinate or y coordinate of top left corner should be on the grid should be on the grid.", checkLocationAlignOnGrid(LF7)); }</code><technical_language>repeated (this is case for messages)</technical_language>

Target:
public void testContainerSnapWithArrange() throws Exception { final UIDiagramRepresentation diagramRepresentation = localSession.newDiagramRepresentation("new Top/Bottom Container Ports And Edges", "Top/Bottom Container Ports And Edges").on(mainEPackage) .withDefaultName().ok(); final SWTBotSiriusDiagramEditor editor = diagramRepresentation.open().getEditor(); SWTBotUtils.waitAllUiEvents(); IGraphicalEditPart LF6 = (IGraphicalEditPart) editor.getEditPart("LF6", DNodeContainer2EditPart.class).part(); checkLocationAlignOnGrid(LF6, "container LF6"); IGraphicalEditPart LF7 = (IGraphicalEditPart) editor.getEditPart("LF7", DNodeContainer2EditPart.class).part(); checkLocationAlignOnGrid(LF7, "container LF7"); }
Source:
<code>private TupleMappers(TupleMappers that) { <START> this.columns = that.columns; <END> }</code><technical_language>that.columns.clone(), this a global column list, instead of statement in a separate scope</technical_language>

Target:
private TupleMappers(TupleMappers that) { System.arraycopy(that.columns, 0, this.columns, 0, Tuple.MAX_ARITY); }
Source:
<code>public void testBroadcastBatchTranslationThrowsException() throws Exception { final MapStateDescriptor<Long, Long> utterDescriptor = new MapStateDescriptor<>( "broadcast-state", BasicTypeInfo.LONG_TYPE_INFO, BasicTypeInfo.LONG_TYPE_INFO ); final List<Long> input = new ArrayList<>(); input.add(1L); input.add(2L); input.add(3L); final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.setRuntimeMode(RuntimeExecutionMode.BATCH); final DataStream<Long> srcOne = env.fromCollection(input); final DataStream<Long> srcTwo = env.fromCollection(input); final BroadcastStream<Long> broadcast = srcTwo.broadcast(utterDescriptor); srcOne.connect(broadcast).process( new BroadcastProcessFunction<Long, Long, Long>() { @Override public void processElement(Long value, ReadOnlyContext ctx, Collector<Long> out) { } @Override public void processBroadcastElement(Long value, Context ctx, Collector<Long> out) { } }); try { env.execute(); <START> fail("Execution should have failed during job graph creation."); <END> } catch (UnsupportedOperationException e) { assertEquals(e.getMessage(), "The Broadcast State Pattern is not support in BATCH execution mode."); } }</code><technical_language>ExpectedException rule instead? I find more concise. @Rule public ExpectedException thrown = ExpectedException.none(); thrown.expect(UnsupportedOperationException.class); thrown.expectMessage("The Broadcast State Pattern is support in BATCH execution mode.");</technical_language>

Target:
public void testBroadcastBatchTranslationThrowsException() throws Exception { final MapStateDescriptor<Long, Long> utterDescriptor = new MapStateDescriptor<>( "broadcast-state", BasicTypeInfo.LONG_TYPE_INFO, BasicTypeInfo.LONG_TYPE_INFO ); final List<Long> input = new ArrayList<>(); input.add(1L); input.add(2L); input.add(3L); final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.setRuntimeMode(RuntimeExecutionMode.BATCH); final DataStream<Long> srcOne = env.fromCollection(input); final DataStream<Long> srcTwo = env.fromCollection(input); final BroadcastStream<Long> broadcast = srcTwo.broadcast(utterDescriptor); srcOne.connect(broadcast).process( new BroadcastProcessFunction<Long, Long, Long>() { @Override public void processElement(Long value, ReadOnlyContext ctx, Collector<Long> out) { } @Override public void processBroadcastElement(Long value, Context ctx, Collector<Long> out) { } }); thrown.expect(UnsupportedOperationException.class); thrown.expectMessage("The Broadcast State Pattern is not support in BATCH execution mode."); env.execute(); }
Source:
<code>protected void executeCommand() { List<VmNumaNode> vmNumaNodes = getParameters().getVmNumaNodeList(); Guid vdsId = getDedicatedHostList().get(0); List<VdsNumaNode> vdsNumaNodes = new ArrayList<>(); if (vdsId != null) { vdsNumaNodes = getVdsNumaNodeDao().getAllVdsNumaNodeByVdsId(vdsId); } int startIndex = 0; List<VmNumaNode> existingNodes = getExistingNumaNodes(); if (!existingNodes.isEmpty()) { startIndex = Collections.max(existingNodes, new NumaNodeComparator()).getIndex() + 1; } List<VdsNumaNode> nodes = new ArrayList<>(); for (VmNumaNode vmNumaNode : vmNumaNodes) { vmNumaNode.setId(Guid.newGuid()); <START> vmNumaNode.setIndex(startIndex++); <END> for (Pair<Guid, Pair<Boolean, Integer>> pair : vmNumaNode.getVdsNumaNodeList()) { if (pair.getSecond() != null && pair.getSecond().getSecond() != null) { int index = pair.getSecond().getSecond(); if (pair.getSecond().getFirst()) { for (VdsNumaNode vdsNumaNode : vdsNumaNodes) { if (vdsNumaNode.getIndex() == index) { pair.setFirst(vdsNumaNode.getId()); break; } } } } } nodes.add(vmNumaNode); } getVmNumaNodeDao().massSaveNumaNode(nodes, null, getVm().getId()); setActionReturnValue(nodes.get(0).getId()); setSucceeded(true); }</code><technical_language>overriding user pinning? needs a check rest code check if user index, is node is set pinning</technical_language>

Target:
protected void executeCommand() { List<VmNumaNode> vmNumaNodes = getParameters().getVmNumaNodeList(); List<VdsNumaNode> vdsNumaNodes = getVdsNumaNodes(); List<VmNumaNode> nodes = new ArrayList<>(); for (VmNumaNode vmNumaNode : vmNumaNodes) { vmNumaNode.setId(Guid.newGuid()); for (Pair<Guid, Pair<Boolean, Integer>> pair : vmNumaNode.getVdsNumaNodeList()) { if (pair.getSecond() != null && pair.getSecond().getSecond() != null) { int index = pair.getSecond().getSecond(); if (pair.getSecond().getFirst()) { for (VdsNumaNode vdsNumaNode : vdsNumaNodes) { if (vdsNumaNode.getIndex() == index) { pair.setFirst(vdsNumaNode.getId()); break; } } } } } nodes.add(vmNumaNode); } getVmNumaNodeDao().massSaveNumaNode(nodes, null, getVm().getId()); setActionReturnValue(nodes.get(0).getId()); setSucceeded(true); }
Source:
<code>public void testHttpPostAsciiText() throws InterruptedException, IOException { final HttpSource httpSource = newHttpSource(); final String stringToPost = "hello"; final FileSink fileSink = newFileSink().binary(true); <START> final String streamName = getRandomStreamName(); <END> final String stream = String.format("%s | %s", httpSource, fileSink); logger.info("Creating Stream: " + stream); stream().create(streamName, stream); logger.info("Posting String: " + stringToPost); httpSource.ensureReady().postData(stringToPost); assertThat(fileSink, eventually(hasContentsThat(equalTo(stringToPost)))); }</code><technical_language>for debugging purposes, is worth providing a String getRandomStreamName simply adding a unique suffix it?... is ok random stream names lack context whatsoever</technical_language>

Target:
public void testHttpPostAsciiText() throws InterruptedException, IOException { final HttpSource httpSource = newHttpSource(); final String stringToPost = "hello"; final FileSink fileSink = newFileSink().binary(true); final String streamName = getStreamName(); final String stream = String.format("%s | %s", httpSource, fileSink); logger.info("Creating Stream: " + stream); stream().create(streamName, stream); logger.info("Posting String: " + stringToPost); httpSource.ensureReady().postData(stringToPost); assertThat(fileSink, eventually(hasContentsThat(equalTo(stringToPost)))); }
Source:
<code>private int calculateDigits(long time0, long time1) { int numDigits = 5; long timeRange = time1 - time0; if (fTimeProvider.getTimeFormat() == TimeFormat.CALENDAR) { numDigits += 8; if (timeRange < 10000) { numDigits += 10; } else if (timeRange < 10000000) { numDigits += 6; } } else { long sec = time1 / SEC_IN_NS; numDigits = Long.toString(sec).length(); int thousandGroups = (numDigits - 1) / 3; numDigits += thousandGroups; numDigits += 12; if (fTimeProvider.getTimeFormat() == TimeFormat.CYCLES) { <START> numDigits += Messages.Utils_ClockCyclesUnit.length(); <END> } } return numDigits; }</code><technical_language>This guessing worst-case tick label length is a bit clunky, for now, add digits TimeFormat.RELATIVE for " s"</technical_language>

Target:
private int calculateDigits(long time0, long time1) { int numDigits = 5; long timeRange = time1 - time0; TimeFormat timeFormat = fTimeProvider.getTimeFormat(); if (timeFormat == TimeFormat.CALENDAR) { numDigits += 8; if (timeRange < 10000) { numDigits += 10; } else if (timeRange < 10000000) { numDigits += 6; } } else { long sec = time1 / SEC_IN_NS; numDigits = Long.toString(sec).length(); int thousandGroups = (numDigits - 1) / 3; numDigits += thousandGroups; numDigits += 12; if (timeFormat == TimeFormat.CYCLES) { numDigits += Messages.Utils_ClockCyclesUnit.length(); } else if (fTimeProvider.getTimeFormat() == TimeFormat.RELATIVE) { numDigits += 2; } } return numDigits; }
Source:
<code>public int[] transformToIntValuesSV(ProjectionBlock projectionBlock) { int[] selected = getSelectedArray(projectionBlock); if (_intResults == null) { _intResults = new int[DocIdSetPlanNode.MAX_DOC_PER_CALL]; } for (int i = 0; i < _elseThenStatements.size(); i++) { TransformFunction transformFunction = _elseThenStatements.get(i); FieldSpec.DataType dataType = transformFunction.getResultMetadata().getDataType(); int blockNumDocs = projectionBlock.getNumDocs(); int[] evalInts; <START> if (dataType == FieldSpec.DataType.INT) { evalInts = transformFunction.transformToIntValuesSV(projectionBlock); } else { evalInts = new int[blockNumDocs]; switch (dataType) { case LONG: ArrayCopyUtils.copy(transformFunction.transformToLongValuesSV(projectionBlock), evalInts, blockNumDocs); break; case FLOAT: ArrayCopyUtils.copy(transformFunction.transformToFloatValuesSV(projectionBlock), evalInts, blockNumDocs); break; case DOUBLE: ArrayCopyUtils.copy(transformFunction.transformToDoubleValuesSV(projectionBlock), evalInts, blockNumDocs); break; case STRING: ArrayCopyUtils.copy(transformFunction.transformToStringValuesSV(projectionBlock), evalInts, blockNumDocs); break; default: throw new IllegalStateException(String .format("Cannot convert result type [%s] to [INT] for transform function [%s]", dataType, transformFunction)); } } for (int j = 0; j < blockNumDocs; j++) { if (selected[j] == i) { _intResults[j] = evalInts[j]; <END> } } } return _intResults; }</code><technical_language>need check data type here, call evalInts = transformFunction.transformToIntValuesSV(projectionBlock);. transformFunction handle type casting. for other places</technical_language>

Target:
public int[] transformToIntValuesSV(ProjectionBlock projectionBlock) { if (_resultMetadata.getDataType() != FieldSpec.DataType.INT) { return super.transformToIntValuesSV(projectionBlock); } int[] selected = getSelectedArray(projectionBlock); if (_intResults == null) { _intResults = new int[DocIdSetPlanNode.MAX_DOC_PER_CALL]; } for (int i = 0; i < _elseThenStatements.size(); i++) { TransformFunction transformFunction = _elseThenStatements.get(i); int blockNumDocs = projectionBlock.getNumDocs(); int[] evalInts = transformFunction.transformToIntValuesSV(projectionBlock); for (int j = 0; j < blockNumDocs; j++) { if (selected[j] == i) { _intResults[j] = evalInts[j]; } } } return _intResults; }
Source:
<code>public void finish(){ String shellTitle = new DefaultShell().getText(); new PushButton("Finish").click(); <START> new WaitWhile(new ShellIsActive(shellTitle)); <END> }</code><technical_language>ShellIsAvailable</technical_language>

Target:
public void finish(){ String shellTitle = new DefaultShell().getText(); new PushButton("Finish").click(); new WaitWhile(new ShellIsAvailable(shellTitle)); }
Source:
<code>private static AbstractBitmap load(String string) { try { BufferedImage bi = ImageIO.read(MojamComponent.class.getResource(string)); <START> if (bi != null) <END> return mojam.screen.load(bi); } catch (IOException e) { e.printStackTrace(); } return null; }</code><technical_language>{ } please :)</technical_language>

Target:
private static AbstractBitmap load(String string) { try { BufferedImage bi = ImageIO.read(MojamComponent.class.getResource(string)); if (bi != null) { return mojam.screen.load(bi); } } catch (IOException e) { e.printStackTrace(); } return null; }
Source:
<code><START> public IExecutionDMContext createExecContextFromThreadId(String tid) { <END> assert tid != null; if (tid == null) {return null;} IContainerDMContext parentContainer = fProcesses.createContainerContextFromThreadId(fCommandControl.getContext(), tid); IProcessDMContext processDmc = DMContexts.getAncestorOfType(parentContainer, IProcessDMContext.class); IThreadDMContext threadDmc = fProcesses.createThreadContext(processDmc, tid); return fProcesses.createExecutionContext(parentContainer, threadDmc, tid); }</code><technical_language>This private if want public offer IGDBProcesses interface</technical_language>

Target:
private IExecutionDMContext createExecContextFromThreadId(String tid) { assert tid != null; IContainerDMContext parentContainer = fProcesses.createContainerContextFromThreadId(fCommandControl.getContext(), tid); IProcessDMContext processDmc = DMContexts.getAncestorOfType(parentContainer, IProcessDMContext.class); IThreadDMContext threadDmc = fProcesses.createThreadContext(processDmc, tid); return fProcesses.createExecutionContext(parentContainer, threadDmc, tid); }
Source:
<code>protected ExprEval eval(ExprEval x, ExprEval y) { <START> if (x.type() == ExprType.STRING && y.type() == ExprType.STRING) { <END> return ExprEval.of(null); } if (x.type() == ExprType.LONG && y.type() == ExprType.LONG) { return eval(x.asLong(), y.asLong()); } else { return eval(x.asDouble(), y.asDouble()); } }</code><technical_language>this x.type() == ExprType.STRING || y.type() == ExprType.STRING</technical_language>

Target:
protected final ExprEval eval(ExprEval x, ExprEval y) { if (x.type() == ExprType.STRING || y.type() == ExprType.STRING) { return ExprEval.of(null); } if (x.type() == ExprType.LONG && y.type() == ExprType.LONG) { return eval(x.asLong(), y.asLong()); } else { return eval(x.asDouble(), y.asDouble()); } }
Source:
<code><START> public PercentileDistributionSummary build() { <END> long min = 0L; if (max < Long.MAX_VALUE) { int maxPos = PercentileBuckets.indexOf(max); int num = Math.round(Math.max(100, maxPos) * accuracy); if (num < 4) { num = 4; } int minPos = maxPos - num; min = (minPos > 0) ? PercentileBuckets.get(minPos) : 0L; } final Id id = baseId.withTags(extraTags); return new PercentileDistributionSummary(registry, id, min, max); }</code><technical_language>Is refactor this remove duplication PercentileTimer#build()</technical_language>

Target:
public PercentileDistributionSummary build() { final Id id = baseId.withTags(extraTags); return new PercentileDistributionSummary(registry, id, min, max); }
Source:
<code>private String getAuthHeader() { String auth = env.getProperty("qstore.admin.username") + ":" + env.getProperty("qstore.admin.password"); <START> byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(Charset.forName("US-ASCII"))); <END> return "Basic " + new String(encodedAuth); }</code><technical_language>this is a bad idea, necessarily assumption this correct charset. For now, I default platform charset, set if this fails. (and utf-8)</technical_language>

Target:
private String getAuthHeader() { String auth = env.getProperty("qstore.admin.username") + ":" + env.getProperty("qstore.admin.password"); byte[] encodedAuth = Base64.encodeBase64(auth.getBytes()); return "Basic " + new String(encodedAuth); }
Source:
<code>public WsAgentHealthStateDto checkAgentHealth(@ApiParam(value = "Workspace id") @PathParam("id") String key) throws NotFoundException, ServerException, ForbiddenException, BadRequestException, UnauthorizedException, IOException, ConflictException { validateKey(key); final WorkspaceImpl workspace = workspaceManager.getWorkspace(key); if (WorkspaceStatus.RUNNING != workspace.getStatus()) { return newDto(WsAgentHealthStateDto.class).withWorkspaceStatus(workspace.getStatus()); } final MachineImpl devMachine = workspace.getRuntime().getDevMachine(); if (devMachine == null) { return newDto(WsAgentHealthStateDto.class) .withWorkspaceStatus(workspace.getStatus()) .withCode(NOT_FOUND.getStatusCode()) .withReason("Workspace Agent isn't available if Dev machine isn't RUNNING"); } final WsAgentHealthStateDto check = agentHealthChecker.check(devMachine); <START> <END> check.setWorkspaceStatus(workspace.getStatus()); return check; }</code><technical_language>extra space</technical_language>

Target:
public WsAgentHealthStateDto checkAgentHealth(@ApiParam(value = "Workspace id") @PathParam("id") String key) throws NotFoundException, ServerException{ final WorkspaceImpl workspace = workspaceManager.getWorkspace(key); if (WorkspaceStatus.RUNNING != workspace.getStatus()) { return newDto(WsAgentHealthStateDto.class).withWorkspaceStatus(workspace.getStatus()); } final MachineImpl devMachine = workspace.getRuntime().getDevMachine(); if (devMachine == null) { return newDto(WsAgentHealthStateDto.class) .withWorkspaceStatus(workspace.getStatus()) .withCode(NOT_FOUND.getStatusCode()) .withReason("Workspace Agent isn't available if Dev machine isn't RUNNING"); } final WsAgentHealthStateDto check = agentHealthChecker.check(devMachine); check.setWorkspaceStatus(workspace.getStatus()); return check; }
Source:
<code>private void initiateChunkDeletesIfAny(final String blobId, final String serviceId) { Callback<GetBlobResultInternal> callback = (GetBlobResultInternal result, Exception exception) -> { if (exception != null) { logger.trace( <START> "Encountered exception when attempting to get chunks of a possibly composite deleted blob " + blobId, <END> exception); } else if (result.getBlobResult != null) { logger.error("Unexpected result returned by background get operation to fetch chunk ids."); } else if (result.storeKeys != null) { List<BackgroundDeleteRequest> deleteRequests = new ArrayList<>(result.storeKeys.size()); for (StoreKey storeKey : result.storeKeys) { logger.trace("Initiating delete of chunk blob: " + storeKey); deleteRequests.add(new BackgroundDeleteRequest(storeKey, serviceId)); } initiateBackgroundDeletes(deleteRequests); } currentBackgroundOperationsCount.decrementAndGet(); }; currentOperationsCount.incrementAndGet(); currentBackgroundOperationsCount.incrementAndGet(); GetBlobOptionsInternal options = new GetBlobOptionsInternal(new GetBlobOptions(GetBlobOptions.OperationType.Data, GetOption.Include_All, null), true); backgroundDeleter.getBlob(blobId, options, callback); }</code><technical_language>log formatting</technical_language>

Target:
private void initiateChunkDeletesIfAny(final String blobId, final String serviceId) { Callback<GetBlobResultInternal> callback = (GetBlobResultInternal result, Exception exception) -> { if (exception != null) { logger.trace("Encountered exception when attempting to get chunks of a possibly composite deleted blob ", blobId, exception); } else if (result.getBlobResult != null) { logger.error("Unexpected result returned by background get operation to fetch chunk ids."); } else if (result.storeKeys != null) { List<BackgroundDeleteRequest> deleteRequests = new ArrayList<>(result.storeKeys.size()); for (StoreKey storeKey : result.storeKeys) { logger.trace("Initiating delete of chunk blob: {}", storeKey); deleteRequests.add(new BackgroundDeleteRequest(storeKey, serviceId)); } initiateBackgroundDeletes(deleteRequests); } currentBackgroundOperationsCount.decrementAndGet(); }; currentOperationsCount.incrementAndGet(); currentBackgroundOperationsCount.incrementAndGet(); GetBlobOptionsInternal options = new GetBlobOptionsInternal(new GetBlobOptions(GetBlobOptions.OperationType.Data, GetOption.Include_All, null), true); backgroundDeleter.getBlob(blobId, options, callback); }