auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private String getter() { ImmutableList<String> topSpeciesNames = featuredSpeciesService.getSpeciesNamesSortedByExperimentCount(); return GSON.toJson( ImmutableMap.of( "topSpecies", topSpeciesNames.subList(0, Math.min(topSpeciesNames.size(), FEATURED_SPECIES)), "allSpecies", ImmutableList.sortedCopyOf(topSpeciesNames), <START> "separator", ThreadLocalRandom.current().nextDouble() > 0.999 ? BEST_SEPARATOR : NORMAL_SEPARATOR)); <END> }</code><technical_language>I this random separator logic..</technical_language>

Target:
private String getter() { ImmutableList<String> topSpeciesNames = featuredSpeciesService.getSpeciesNamesSortedByExperimentCount(); return GSON.toJson( ImmutableMap.of( "topSpecies", topSpeciesNames.subList(0, Math.min(topSpeciesNames.size(), FEATURED_SPECIES)), "allSpecies", ImmutableList.sortedCopyOf(topSpeciesNames))); }
Source:
<code>public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) { if (entity instanceof Comment) { Comment comment = (Comment) entity; String commentCreationMessage = String.format("Comment created. URI: %s ", comment.getCommentUri()); kafkaEventProducer.send(new ProducerRecord<>("ambra-comment-created", commentCreationMessage)); } else if (entity instanceof Flag) { Flag flag = (Flag) entity; String flagCreationMessage = String.format("Comment flagged. URI: %s ", flag.getFlaggedComment().getCommentUri()); <START> kafkaEventProducer.send(new ProducerRecord<>("ambra-flag-created", flagCreationMessage)); <END> } return super.onSave(entity, id, state, propertyNames, types); }</code><technical_language>time create a method do sending? As, pattern, like: void sendMessage(String topic, String message);</technical_language>

Target:
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) { if (entity instanceof Comment) { Comment comment = (Comment) entity; String commentCreationMessage = String.format("Comment created. URI: %s ", comment.getCommentUri()); sendMessage("ambra-comment-created", commentCreationMessage); } else if (entity instanceof Flag) { Flag flag = (Flag) entity; String flagCreationMessage = String.format("Comment flagged. URI: %s ", flag.getFlaggedComment().getCommentUri()); sendMessage("ambra-flag-created", flagCreationMessage); } else if (entity instanceof ArticleCategoryAssignmentFlag) { ArticleCategoryAssignmentFlag flag = (ArticleCategoryAssignmentFlag) entity; String flagCreationMessage = String.format("Category flagged. Article DOI: %s , Category: %s", flag.getArticle().getDoi(), flag.getCategory()); sendMessage("ambra-category-flag-created", flagCreationMessage); } return super.onSave(entity, id, state, propertyNames, types); }
Source:
<code>public static Map<String, String> extractParameterFromMediaTypeString(String input) { int idx = input.indexOf(";"); if (idx < 0) { return Collections.emptyMap(); } input = input.substring(idx + 1); <START> Map<String, String> result = Arrays.stream(input.split(",")) <END> .map(s -> s.split("=")) .filter(a -> a.length == 2) .collect(Collectors.toMap( a -> a[0].trim(), a -> a[1].trim())); return result; }</code><technical_language>missing license header</technical_language>

Target:
public static Map<String, String> extractParameterFromMediaTypeString(String input) { int idx = input.indexOf(';'); if (idx < 0) { return Collections.emptyMap(); } input = input.substring(idx + 1); return Arrays.stream(input.split(",")) .map(s -> s.split("=")) .filter(a -> a.length == 2) .collect(Collectors.toMap( a -> a[0].trim(), a -> a[1].trim())); }
Source:
<code>public void doVistRandomArticle() { final Bus bus = app.getBus(); Handler randomHandler = new Handler(new Handler.Callback(){ @Override public boolean handleMessage(Message msg) { RandomArticleIdTask randomTask = new RandomArticleIdTask(app.getAPIForSite(app.getPrimarySite()), app) { @Override public void onFinish(String message) { Log.d("Wikipedia", "Random article title pulled: " + message); if (message != null) { PageTitle title = new PageTitle(null, message, app.getPrimarySite()); HistoryEntry historyEntry = new HistoryEntry(title, HistoryEntry.SOURCE_RANDOM); bus.post(new NewWikiPageNavigationEvent(title, historyEntry)); } else { Toast.makeText(app, app.getString(R.string.error_network_error), Toast.LENGTH_LONG).show(); } } @Override public void onCatch(Throwable caught) { Log.d("Wikipedia", "Random article ID retrieval failed"); <START> curRandomArticleIdTask = null; <END> } }; if (curRandomArticleIdTask != null) { curRandomArticleIdTask.cancel(); } curRandomArticleIdTask = randomTask; curRandomArticleIdTask.execute(); return true; } }); randomHandler.removeMessages(MESSAGE_RND); Message randomMessage = Message.obtain(); randomMessage.what = MESSAGE_RND; randomMessage.obj = "random"; randomHandler.sendMessage(randomMessage); }</code><technical_language>This throw error in some form. Currently silently fails? If want add error handling in a patch, this throw a RuntimeException - ignore on</technical_language>

Target:
public void doVistRandomArticle() { final Bus bus = app.getBus(); Handler randomHandler = new Handler(new Handler.Callback(){ @Override public boolean handleMessage(Message msg) { RandomArticleIdTask randomTask = new RandomArticleIdTask(app.getAPIForSite(app.getPrimarySite()), app) { @Override public void onFinish(String message) { Log.d("Wikipedia", "Random article title pulled: " + message); if (message != null) { PageTitle title = new PageTitle(null, message, app.getPrimarySite()); HistoryEntry historyEntry = new HistoryEntry(title, HistoryEntry.SOURCE_RANDOM); bus.post(new NewWikiPageNavigationEvent(title, historyEntry)); } else { Toast.makeText(app, app.getString(R.string.error_network_error), Toast.LENGTH_LONG).show(); } } @Override public void onCatch(Throwable caught) { Log.d("Wikipedia", "Random article ID retrieval failed"); curRandomArticleIdTask = null; Toast.makeText(app, app.getString(R.string.error_network_error), Toast.LENGTH_LONG).show(); } }; if (curRandomArticleIdTask != null) { curRandomArticleIdTask.cancel(); } curRandomArticleIdTask = randomTask; curRandomArticleIdTask.execute(); return true; } }); randomHandler.removeMessages(MESSAGE_RND); Message randomMessage = Message.obtain(); randomMessage.what = MESSAGE_RND; randomMessage.obj = "random"; randomHandler.sendMessage(randomMessage); }
Source:
<code>public DDMStructure(String name, String description, List<FormPage> pages) { super(); this.name = name; this.description = description; this.pages = pages; this.fields = CollectionsKt.flatMap(pages, new Function1<FormPage, Iterable<? extends Field>>() { @Override public Iterable<? extends Field> invoke(FormPage formPage) { return formPage.getFields(); } <START> }); <END> parsed = true; }</code><technical_language>I this is a bit overkill for combining page fields, a for loop clearer, think</technical_language>

Target:
public DDMStructure(String name, String description, List<FormPage> pages) { this.name = name; this.description = description; this.pages = pages; for (FormPage page : pages) { this.fields.addAll(page.getFields()); } parsed = true; }
Source:
<code>public VdsUpdateRunTimeInfo(VdsManager vdsManager, VDS vds) { _vdsManager = vdsManager; _vds = vds; <START> _firstStatus = _vds.getstatus(); <END> servicePolicy = ServicePolicyFactory.getServicePolicyForVds(vds); _vmDict = TransactionSupport.executeInScope(TransactionScopeOption.Suppress, new TransactionMethod<Map<Guid, VM>>() { @Override public Map<Guid, VM> runInTransaction() { return DbFacade.getInstance().getVmDAO().getAllRunningByVds(_vds.getId()); } }); for (VM vm : _vmDict.values()) { if (vm.isStatusUp() && vm.getstatus() != VMStatus.Up) { runningVmsInTransition++; } } }</code><technical_language>calculate in VdsManager, passing service parameter instead of retaking factory</technical_language>

Target:
public VdsUpdateRunTimeInfo(VdsManager vdsManager, VDS vds) { _vdsManager = vdsManager; _vds = vds; _firstStatus = _vds.getstatus(); monitoringStrategy = MonitoringStrategyFactory.getMonitoringStrategyForVds(vds); _vmDict = TransactionSupport.executeInScope(TransactionScopeOption.Suppress, new TransactionMethod<Map<Guid, VM>>() { @Override public Map<Guid, VM> runInTransaction() { return DbFacade.getInstance().getVmDAO().getAllRunningByVds(_vds.getId()); } }); for (VM vm : _vmDict.values()) { if (vm.isStatusUp() && vm.getstatus() != VMStatus.Up) { runningVmsInTransition++; } } }
Source:
<code>private boolean isThisFlatSynchronization(PerunSession sess, Group group) throws InternalErrorException, WrongAttributeAssignmentException, AttributeNotExistsException { <START> Attribute flatSynchronzationAttr = getPerunBl().getAttributesManagerBl().getAttribute(sess, group, GroupsManager.GROUPFLATSYNCHRONIZATION_ATTRNAME); <END> boolean flatSynchronization = false; if(flatSynchronzationAttr != null && flatSynchronzationAttr.getValue() != null) { flatSynchronization = (Boolean) flatSynchronzationAttr.getValue(); } return flatSynchronization; }</code><technical_language>typo: flatSynchronzationAttr</technical_language>

Target:
private boolean isThisFlatSynchronization(PerunSession sess, Group group) throws InternalErrorException, WrongAttributeAssignmentException, AttributeNotExistsException { Attribute flatSynchronizationAttr = getPerunBl().getAttributesManagerBl().getAttribute(sess, group, GroupsManager.GROUP_FLAT_SYNCHRONIZATION_ATTRNAME); boolean flatSynchronization = false; if(flatSynchronizationAttr != null && flatSynchronizationAttr.getValue() != null) { flatSynchronization = flatSynchronizationAttr.valueAsBoolean(); } return flatSynchronization; }
Source:
<code>AuthenticationResult acquireTokenWithBrokerSilent() throws AuthenticationException { mAuthRequest.setVersion(AuthenticationContext.getVersionName()); mAuthRequest.setBrokerAccountName(mAuthRequest.getLoginHint()); final BrokerEvent brokerEvent = startBrokerTelemetryRequest(EventStrings.BROKER_REQUEST_SILENT); logBrokerVersion(brokerEvent); final AuthenticationResult authenticationResult; if (!StringExtensions.isNullOrBlank(mAuthRequest.getBrokerAccountName()) || !StringExtensions .isNullOrBlank(mAuthRequest.getUserId())) { Logger.v(TAG, "User is specified for background(silent) token request, trying to acquire token silently."); authenticationResult = mBrokerProxy.getAuthTokenInBackground(mAuthRequest, brokerEvent); <START> if (null != authenticationResult) { <END> brokerEvent.setServerErrorCode(authenticationResult.getServerErrorCode()); brokerEvent.setServerSubErrorCode(authenticationResult.getServerSubErrorCode()); brokerEvent.setRefreshTokenAge(authenticationResult.getRefreshTokenAge()); brokerEvent.setSpeRing(authenticationResult.getSpeRing()); } } else { Logger.v(TAG, "User is not specified, skipping background(silent) token request"); authenticationResult = null; } Telemetry.getInstance().stopEvent(brokerEvent.getTelemetryRequestId(), brokerEvent, EventStrings.BROKER_REQUEST_SILENT); return authenticationResult; }</code><technical_language>If AuthenticationException (which server error broker in some cases) is thrown getAuthTokenInBackground calling, this block reached</technical_language>

Target:
AuthenticationResult acquireTokenWithBrokerSilent() throws AuthenticationException { mAuthRequest.setVersion(AuthenticationContext.getVersionName()); mAuthRequest.setBrokerAccountName(mAuthRequest.getLoginHint()); final BrokerEvent brokerEvent = startBrokerTelemetryRequest(EventStrings.BROKER_REQUEST_SILENT); logBrokerVersion(brokerEvent); final AuthenticationResult authenticationResult; if (!StringExtensions.isNullOrBlank(mAuthRequest.getBrokerAccountName()) || !StringExtensions .isNullOrBlank(mAuthRequest.getUserId())) { Logger.v(TAG, "User is specified for background(silent) token request, trying to acquire token silently."); authenticationResult = mBrokerProxy.getAuthTokenInBackground(mAuthRequest, brokerEvent); if (null != authenticationResult && null != authenticationResult.getCliTelemInfo()) { brokerEvent.setSpeRing(authenticationResult.getCliTelemInfo().getSpeRing()); } } else { Logger.v(TAG, "User is not specified, skipping background(silent) token request"); authenticationResult = null; } Telemetry.getInstance().stopEvent(brokerEvent.getTelemetryRequestId(), brokerEvent, EventStrings.BROKER_REQUEST_SILENT); return authenticationResult; }
Source:
<code>private final void sendIntent() { Intent intent = new Intent(Intent.ACTION_BATTERY_CHANGED); <START> intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); <END> intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); try { mBatteryStats.setOnBattery(mPlugType == BATTERY_PLUGGED_NONE, mBatteryLevel); } catch (RemoteException e) { } int icon = getIcon(mBatteryLevel); intent.putExtra("status", mBatteryStatus); intent.putExtra("health", mBatteryHealth); intent.putExtra("present", mBatteryPresent); intent.putExtra("level", mBatteryLevel); intent.putExtra("scale", BATTERY_SCALE); intent.putExtra("icon-small", icon); intent.putExtra("plugged", mPlugType); intent.putExtra("voltage", mBatteryVoltage); intent.putExtra("temperature", mBatteryTemperature); intent.putExtra("technology", mBatteryTechnology); if (false) { Log.d(TAG, "updateBattery level:" + mBatteryLevel + " scale:" + BATTERY_SCALE + " status:" + mBatteryStatus + " health:" + mBatteryHealth + " present:" + mBatteryPresent + " voltage: " + mBatteryVoltage + " temperature: " + mBatteryTemperature + " technology: " + mBatteryTechnology + " AC powered:" + mAcOnline + " USB powered:" + mUsbOnline + " icon:" + icon ); } ActivityManagerNative.broadcastStickyIntent(intent, null); }</code><technical_language>this out -- FLAG_RECEIVER_REGISTERED_ONLY effect. (Since component receivers flag.)</technical_language>

Target:
private final void sendIntent() { Intent intent = new Intent(Intent.ACTION_BATTERY_CHANGED); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); try { mBatteryStats.setOnBattery(mPlugType == BATTERY_PLUGGED_NONE, mBatteryLevel); } catch (RemoteException e) { } int icon = getIcon(mBatteryLevel); intent.putExtra("status", mBatteryStatus); intent.putExtra("health", mBatteryHealth); intent.putExtra("present", mBatteryPresent); intent.putExtra("level", mBatteryLevel); intent.putExtra("scale", BATTERY_SCALE); intent.putExtra("icon-small", icon); intent.putExtra("plugged", mPlugType); intent.putExtra("voltage", mBatteryVoltage); intent.putExtra("temperature", mBatteryTemperature); intent.putExtra("technology", mBatteryTechnology); if (false) { Log.d(TAG, "updateBattery level:" + mBatteryLevel + " scale:" + BATTERY_SCALE + " status:" + mBatteryStatus + " health:" + mBatteryHealth + " present:" + mBatteryPresent + " voltage: " + mBatteryVoltage + " temperature: " + mBatteryTemperature + " technology: " + mBatteryTechnology + " AC powered:" + mAcOnline + " USB powered:" + mUsbOnline + " icon:" + icon ); } ActivityManagerNative.broadcastStickyIntent(intent, null); }
Source:
<code>public void readData(ObjectDataInput in) throws IOException { port = in.readInt(); type = in.readByte(); int len = in.readInt(); if (len > 0) { byte[] address = new byte[len]; in.readFully(address); host = bytesToString(address); <START> socketAddr = new InetSocketAddress(host, port); <END> } }</code><technical_language>Is intended? compare host instead of IP address reading address</technical_language>

Target:
public void readData(ObjectDataInput in) throws IOException { port = in.readInt(); type = in.readByte(); int len = in.readInt(); if (len > 0) { byte[] address = new byte[len]; in.readFully(address); host = bytesToString(address); inetAddress = InetAddress.getByName(host); } }
Source:
<code>public void onExternalViewChange(List<ExternalView> externalViewList, NotificationContext changeContext) { logger.info("ExternalView change triggered with: " + externalViewList); super.onExternalViewChange(externalViewList, changeContext); <START> if (!externalViewChangeTriggered) { <END> externalViewChangeTriggered = true; initialized.countDown(); } helixClusterManagerMetrics.externalViewChangeTriggerCount.inc(); }</code><technical_language>a bit confused. ClusterChangeListener is DC, initialized counted for 3 times</technical_language>

Target:
public void onExternalViewChange(List<ExternalView> externalViewList, NotificationContext changeContext) { synchronized (notificationLock) { logger.trace("ExternalView change triggered with: {}", externalViewList); if (!externalViewChangeTriggered) { externalViewChangeTriggered = true; initialized.countDown(); } helixClusterManagerMetrics.externalViewChangeTriggerCount.inc(); } }
Source:
<code>public boolean containsAuthToken(String token){ <START> System.out.println("token passed for authentication:" + token); <END> System.out.println("getAuthToken class name:" + getAuthToken().getClass().getName()); System.out.println("getAuthToken(0)" + getAuthToken().get(0).getAuthToken().toString()); System.out.println("getAuthToken(0) class name:" + getAuthToken().get(0).getClass().getName()); Iterator<AuthToken> iterator = getAuthToken().iterator(); while(iterator.hasNext()){ AuthToken t = iterator.next(); if(t.getAuthToken().equals(token)) return true; } return false; }</code><technical_language>More system outs. :)</technical_language>

Target:
public boolean containsAuthToken(String token){ Iterator<AuthToken> iterator = getAuthToken().iterator(); while(iterator.hasNext()){ AuthToken t = iterator.next(); if(t.getAuthToken().equals(token)) return true; } return false; }
Source:
<code>public static List<Map<Variable, Term>> patternMatch(Term subject, Rule rule, TermContext context) { PatternMatcher matcher = new PatternMatcher(rule.containsAttribute("lemma"), context); <START> <END> boolean failed = true; if (rule.isFunction()) { if (subject instanceof KItem) { KItem kItem = (KItem) subject; Term kLabel = kItem.kLabel(); Term kList = kItem.kList(); if (kLabel.equals(rule.definedKLabel())) { failed = !matcher.patternMatch(kList, ((KItem) rule.leftHandSide()).kList()); } } } else { failed = !matcher.patternMatch(subject, rule.leftHandSide()); } if (failed) { return Collections.emptyList(); } return evaluateConditions(rule, getMultiSubstitutions(matcher.fSubstitution, matcher.multiSubstitutions), context); }</code><technical_language>Attribute.LEMMA_KEY</technical_language>

Target:
public static List<Map<Variable, Term>> patternMatch(Term subject, Rule rule, TermContext context) { PatternMatcher matcher = new PatternMatcher( rule.containsAttribute(Attribute.LEMMA_KEY), context); boolean failed = true; if (rule.isFunction()) { if (subject instanceof KItem) { KItem kItem = (KItem) subject; Term kLabel = kItem.kLabel(); Term kList = kItem.kList(); if (kLabel.equals(rule.definedKLabel())) { failed = !matcher.patternMatch(kList, ((KItem) rule.leftHandSide()).kList()); } } } else { failed = !matcher.patternMatch(subject, rule.leftHandSide()); } if (failed) { return Collections.emptyList(); } return evaluateConditions(rule, getMultiSubstitutions(matcher.fSubstitution, matcher.multiSubstitutions), context); }
Source:
<code>public static ZipExtraField createExtraField(ZipShort headerId) <START> throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { <END> Class<?> c = implementations.get(headerId); if (c != null) { return (ZipExtraField) c.getDeclaredConstructor().newInstance(); } UnrecognizedExtraField u = new UnrecognizedExtraField(); u.setHeaderId(headerId); return u; }</code><technical_language>this changes signature of a public method, afraid do this breaking compatibility</technical_language>

Target:
public static ZipExtraField createExtraField(ZipShort headerId) throws InstantiationException, IllegalAccessException { Class<?> c = implementations.get(headerId); if (c != null) { try { return (ZipExtraField) c.getDeclaredConstructor().newInstance(); } catch (InvocationTargetException e) { throw (InstantiationException) new InstantiationException().initCause(e.getTargetException()); } catch (NoSuchMethodException e) { throw (InstantiationException) new InstantiationException().initCause(e); } } UnrecognizedExtraField u = new UnrecognizedExtraField(); u.setHeaderId(headerId); return u; }
Source:
<code>void dispatchLoadInitial(@Nullable Integer position, int initialLoadSize, int pageSize, boolean enablePlaceholders, @NonNull Executor mainThreadExecutor, @NonNull PageResult.Receiver<Value> receiver) { final int <START> convertPosition = <END> position == null ? 0 : Math.max(0, position - initialLoadSize / 2); if (position == null) { position = 0; } else { initialLoadSize = (Math.max(initialLoadSize / pageSize, 2)) * pageSize; final int idealStart = position - initialLoadSize / 2; position = Math.max(0, idealStart / pageSize * pageSize); } mSource.dispatchLoadInitial(false, position, initialLoadSize, pageSize, mainThreadExecutor, receiver); }</code><technical_language>convertPosition is used</technical_language>

Target:
void dispatchLoadInitial(@Nullable Integer position, int initialLoadSize, int pageSize, boolean enablePlaceholders, @NonNull Executor mainThreadExecutor, @NonNull PageResult.Receiver<Value> receiver) { if (position == null) { position = 0; } else { initialLoadSize = (Math.max(initialLoadSize / pageSize, 2)) * pageSize; final int idealStart = position - initialLoadSize / 2; position = Math.max(0, idealStart / pageSize * pageSize); } mSource.dispatchLoadInitial(false, position, initialLoadSize, pageSize, mainThreadExecutor, receiver); }
Source:
<code>public ActiveFilterItem getActiveFilterFromColumnFilter(ColumnFilter columnFilter) { <START> String lableValue = columnFilter.toString(); <END> if (columnFilter instanceof CoreFunctionFilter) { lableValue = ((CoreFunctionFilter) columnFilter).getLabelValue(); if (lableValue == null || lableValue.length() == 0) { lableValue = columnFilter.toString(); } } return new ActiveFilterItem<>(columnFilter.getColumnId(), lableValue, null, null, v -> removeActiveFilter(columnFilter)); }</code><technical_language>lableValue -> labelValue</technical_language>

Target:
public ActiveFilterItem getActiveFilterFromColumnFilter(ColumnFilter columnFilter) { String labelValue = columnFilter.toString(); if (columnFilter instanceof CoreFunctionFilter) { labelValue = ((CoreFunctionFilter) columnFilter).getLabelValue(); if (labelValue == null || labelValue.isEmpty()) { labelValue = columnFilter.toString(); } } return new ActiveFilterItem<>(columnFilter.getColumnId(), labelValue, null, null, v -> removeActiveFilter(columnFilter)); }
Source:
<code>public void setUp() throws Exception { presenter = new FormEntryPatientListPresenter(view); PowerMockito.mockStatic(StringUtils.class); PowerMockito.mockStatic(FilterUtil.class); <START> patientDAO = Mockito.mock(PatientDAO.class); <END> PowerMockito.whenNew(PatientDAO.class).withNoArguments().thenReturn(patientDAO); }</code><technical_language>I create new constructor in presenter pass patientDAO. Creating patientDAO in presenter new PatientDAO() harder test change that. a other presenters tested</technical_language>

Target:
public void setUp() { super.setUp(); presenter = new FormEntryPatientListPresenter(view, patientDAO); PowerMockito.mockStatic(StringUtils.class); patientList = new ArrayList<Patient>(); }
Source:
<code>CLITerminalConnection(Terminal terminal) { super(terminal); interceptor = (int[] ints) -> { <START> CliLogger.ROOT_LOGGER.writingCodePoints(Parser.stripAwayAnsiCodes(Parser.fromCodePoints(ints))); <END> CLITerminalConnection.super.stdoutHandler().accept(ints); }; }</code><technical_language>"writingToTerminal" instead of writingCodePoints</technical_language>

Target:
CLITerminalConnection(Terminal terminal) { super(terminal); interceptor = (int[] ints) -> { if (CliLogger.ROOT_LOGGER.isTraceEnabled()) { CliLogger.ROOT_LOGGER.tracef("Writing %s", Parser.stripAwayAnsiCodes(Parser.fromCodePoints(ints))); } CLITerminalConnection.super.stdoutHandler().accept(ints); }; }
Source:
<code>public void beforeStageStarts() { UI.status = new StatusUIStub(); UI.events = new EventDispatcherStub(); Preferences prefs = Preferences.create(TestController.TEST_DIRECTORY, TestController.TEST_SESSION_CONFIG_FILENAME, <START> TestController.TEST_USER_CONFIG_FILENAME); <END> prefs.setLastLoginCredentials("test", "test"); prefs.setLastViewedRepository("test/test"); RepoIO testIO = TestController.createTestingRepoIO(Optional.empty()); testIO.setRepoOpControl(TestUtils.createRepoOpControlWithEmptyModels(testIO)); try { testIO.openRepository("test2/test2").get(); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } }</code><technical_language>is a method do this in TestController</technical_language>

Target:
public void beforeStageStarts() { UI.status = new StatusUIStub(); UI.events = new EventDispatcherStub(); Preferences prefs = TestController.createTestPreferences(); prefs.setLastLoginCredentials("test", "test"); prefs.setLastViewedRepository("test/test"); RepoIO testIO = TestController.createTestingRepoIO(Optional.empty()); testIO.setRepoOpControl(TestUtils.createRepoOpControlWithEmptyModels(testIO)); try { testIO.openRepository("test2/test2").get(); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } }
Source:
<code>public static Charset parseEncoding(final byte[] b) { final int enc = encoding(b, 0); if (enc < 0) return Constants.CHARSET; final int lf = nextLF(b, enc); String decoded = decode(Constants.CHARSET, b, enc, lf - 1); <START> if ("latin-1".equals(decoded)) { <END> return Charset.forName("ISO-8859-1"); } return Charset.forName(decoded); }</code><technical_language>I suspect need other translations here. Lets instead set a map easily add other entries into: private static final Map<String, Charset> encodingAliases; static { encodingAliases = new HashMap<String, String>(); encodingAliases.put("latin-1", Charset.forName("ISO-8859-1")); } String decoded = decode(...); try { return Charset.forName(decoded); } catch (IllegalCharsetNameException badName) { Charset aliased = encodingAliases.get(StringUtils.toLowerCase(decoded)); if (aliased != null) return aliased; throw badName; } catch (UnsupportedCharsetException badName) { Charset aliased = encodingAliases.get(StringUtils.toLowerCase(decoded)); if (aliased != null) return aliased; throw badName; }</technical_language>

Target:
public static Charset parseEncoding(final byte[] b) { final int enc = encoding(b, 0); if (enc < 0) return Constants.CHARSET; final int lf = nextLF(b, enc); String decoded = decode(Constants.CHARSET, b, enc, lf - 1); try { return Charset.forName(decoded); } catch (IllegalCharsetNameException badName) { Charset aliased = encodingAliases.get(StringUtils .toLowerCase(decoded)); if (aliased != null) return aliased; throw badName; } catch (UnsupportedCharsetException badName) { Charset aliased = encodingAliases.get(StringUtils .toLowerCase(decoded)); if (aliased != null) return aliased; throw badName; } }
Source:
<code>public Transfer getSiblingMeta( final String extension ) { if ( resource.isRoot() ) { return null; } <START> final String generatedPath = provider.getGeneratedPath( resource ); <END> final String named = generatedPath + extension; final Transfer tx = this; logger.debug( "Creating meta-transfer sibling for: {}", String.format( "%s with name: %s (parent: %s)", tx, named, tx.getParent() ) ); return provider.getTransfer( new ConcreteResource( getLocation(), named ) ); }</code><technical_language>I this, construct Transfer instance ConcreteResource, contains logical path, calculated storage path (separately). Then, add a new method Transfer called getStoragePath() calculated path. do a getSiblingMeta() call, append extension path construct new Transfer accordingly</technical_language>

Target:
public Transfer getSiblingMeta( final String extension ) { if ( resource.isRoot() ) { return null; } final String named = getStoragePath() + extension; final Transfer tx = this; logger.debug( "Creating meta-transfer sibling for: {}", String.format( "%s with name: %s (parent: %s)", tx, named, tx.getParent() ) ); return provider.getTransfer( new ConcreteResource( getLocation(), named ) ); }
Source:
<code>public long getValue(String path) { return distributedAtomicLongCaches.stream() .map(distAtomicLong -> { <START> try { <END> return distAtomicLong.get(path).get().preValue(); } catch (Exception e) { throw new ZookeeperCounterException(path, e); } }) .reduce(0L, (a, b) -> a + b); }</code><technical_language>extract this code private method name it? In opinion increase a readability :)</technical_language>

Target:
public long getValue(String path) { return distributedAtomicLongCaches.stream() .map(distAtomicLong -> getValue(distAtomicLong, path)) .reduce(0L, (a, b) -> a + b); }
Source:
<code>protected boolean canDoAction() { <START> if (getParameters().getRngDevice() == null) { <END> return failCanDoAction(VdcBllMessages.ACTION_TYPE_RNG_MUST_BE_SPECIFIED); } if (getParameters().getRngDevice().getVmId() == null || cachedEntity == null) { return failCanDoAction(getParameters().isVm() ? VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND : VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST); } VDSGroup cluster = getVdsGroup(); if (cluster == null || !FeatureSupported.virtIoRngSupported(cluster.getcompatibility_version())) { return failCanDoAction(VdcBllMessages.ACTION_NOT_SUPPORTED_FOR_CLUSTER_POOL_LEVEL); } if (getParameters().isVm() && getVm() != null && getVm().isRunningOrPaused()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_RUNNING); } return true; }</code><technical_language>is this needed? i thought entity validation for null? (if is needed)</technical_language>

Target:
protected boolean canDoAction() { if (getParameters().getRngDevice().getVmId() == null || cachedEntity == null) { return failCanDoAction(getParameters().isVm() ? VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND : VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST); } if (getParameters().isVm() && getVm() != null && getVm().isRunningOrPaused()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_RUNNING); } return true; }
Source:
<code>public void testParseSafeCastExpr() { String expr = "this instanceof Person && ((Person)this).name == \"Mark\""; <START> Expression exssion = parseExpression( parser, expr ).getExpr(); <END> }</code><technical_language>Typo? "exssion"</technical_language>

Target:
public void testParseSafeCastExpr() { String expr = "this instanceof Person && ((Person) this).name == \"Mark\""; Expression expression = parseExpression( parser, expr ).getExpr(); assertEquals(expr, printConstraint(expression)); }
Source:
<code>public void setComment(String newComment) { if (newComment == null) { this.comment = null; return; } Exception iae = new IllegalArgumentException( MessageFormat.format( JGitText.get().argumentIsNotAValidCommentString, newComment)); <START> if (newComment.contains("\n") || newComment.contains("\r")) { END> throw new JGitInternalException(iae.getMessage(), iae); } if (newComment.trim().length() == 0 || newComment.startsWith("#")) { this.comment = newComment; return; } throw new JGitInternalException(iae.getMessage(), iae); }</code><technical_language>style nit: braces single line block</technical_language>

Target:
public void setComment(String newComment) { if (newComment == null) { this.comment = null; return; } if (newComment.contains("\n") || newComment.contains("\r")) throw createInvalidCommentException(newComment); if (newComment.trim().length() == 0 || newComment.startsWith("#")) { this.comment = newComment; return; } throw createInvalidCommentException(newComment); }
Source:
<code>protected void onError(HttpServletRequest req, HttpServletResponse resp, AuthorizationCodeResponseUrl errorResponse) throws ServletException, IOException { resp.getWriter().print( "<h3>É preciso autorizar o uso do Google+ para ter acesso ao Tech Gallery</h3>"); <START> resp.setStatus(200); <END> resp.addHeader("Content-Type", "text/html"); }</code><technical_language>HTTP responde code 403 Forbidden in this case</technical_language>

Target:
protected void onError(HttpServletRequest req, HttpServletResponse resp, AuthorizationCodeResponseUrl errorResponse) throws ServletException, IOException { resp.getWriter().print( "<h3>É preciso autorizar o uso do Google+ para ter acesso ao Tech Gallery</h3>"); resp.setStatus(403); resp.addHeader("Content-Type", "text/html"); }
Source:
<code>void dispatchDestroy() { mDestroyed = true; execPendingActions(true); dispatchStateChange(Fragment.INITIALIZING); mHost = null; mContainer = null; mParent = null; if (mOnBackPressedDispatcher != null) { mOnBackPressedCallback.remove(); mOnBackPressedDispatcher = null; } <START> if (!mExitAnimationCancellationSignals.isEmpty()) { for (Fragment fragment: mExitAnimationCancellationSignals.keySet()) { cancelExitAnimation(fragment); } } <END> }</code><technical_language>instead call endAnimatingAwayFragments() dispatchStateChange(Fragment.INITIALIZING) call? get animations cancelled correct moveToState() calls done moving destruction</technical_language>

Target:
void dispatchDestroy() { mDestroyed = true; execPendingActions(true); endAnimatingAwayFragments(); dispatchStateChange(Fragment.INITIALIZING); mHost = null; mContainer = null; mParent = null; if (mOnBackPressedDispatcher != null) { mOnBackPressedCallback.remove(); mOnBackPressedDispatcher = null; } }
Source:
<code><START> private AbstractReplyProducingMessageHandler configureHandler(ServiceActivatingHandler handler) { <END> postProcessReplyProducer(handler); return handler; }</code><technical_language>reason return class - MessageHandler interface is OK for use-cases</technical_language>

Target:
private MessageHandler configureHandler(ServiceActivatingHandler handler) { postProcessReplyProducer(handler); return handler; }
Source:
<code>public void destroy() throws Exception { AuthorityServiceFactory.getInstance().getAuthorityIndexingService().cleanIndex(); <START> configurationService.setProperty("plugin.named.org.dspace.content.authority.ChoiceAuthority", null); <END> configurationService.setProperty("solr.authority.server", null); configurationService.setProperty("choices.plugin.dc.contributor.author", null); configurationService.setProperty("choices.presentation.dc.contributor.author", null); configurationService.setProperty("authority.controlled.dc.contributor.author", null); configurationService.setProperty("authority.author.indexer.field.1", null); super.destroy(); }</code><technical_language>this a bit risky essentially fixing configuration of test env in this destroy method. If change test env configuration remember change this method some test run env configuration (pre post this IT)</technical_language>

Target:
public void destroy() throws Exception { AuthorityServiceFactory.getInstance().getAuthorityIndexingService().cleanIndex(); super.destroy(); }
Source:
<code>private void replaceSearchResult(List<MapBean> maps, Pane pane) { JavaFxUtil.assertBackgroundThread(); Platform.runLater(() -> { pane.getChildren().clear(); }); <START> ObservableList<Node> children = pane.getChildren(); <END> List<MapCardController> controllers = maps.parallelStream() .map(map -> { MapCardController controller = uiService.loadFxml("theme/vault/map/map_card.fxml"); controller.setMap(map); controller.setOnOpenDetailListener(this::onShowMapDetail); return controller; }).collect(Collectors.toList()); Iterators.partition(controllers.iterator(), BATCH_SIZE).forEachRemaining(mapCardControllers -> Platform.runLater(() -> { for (MapCardController mapCardController : mapCardControllers) { children.add(mapCardController.getRoot()); } })); }</code><technical_language>Please fill this variable in runLater part is needed</technical_language>

Target:
private void replaceSearchResult(List<MapBean> maps, Pane pane) { List<MapCardController> controllers = maps.parallelStream() .map(map -> { MapCardController controller = uiService.loadFxml("theme/vault/map/map_card.fxml"); controller.setMap(map); controller.setOnOpenDetailListener(this::onShowMapDetail); return controller; }).collect(Collectors.toList()); Platform.runLater(() -> { pane.getChildren().clear(); }); JavaFxUtil.assertBackgroundThread(); Iterators.partition(controllers.iterator(), BATCH_SIZE).forEachRemaining(mapCardControllers -> Platform.runLater(() -> { for (MapCardController mapCardController : mapCardControllers) { pane.getChildren().add(mapCardController.getRoot()); } })); }
Source:
<code><START> public static boolean isMatching(final String filterText, IResource resource) { <END> if (StringUtils.isBlank(filterText)) { return true; } final Set<String> items = new HashSet<>(Arrays.asList( filterText.replaceAll(",", " ").toLowerCase().split(" "))); if (containsAll(resource.getName(), items)) { return true; } return resource.accept(new CapabilityVisitor<ITags, Boolean>() { @Override public Boolean visit(ITags capability) { for (String item : items) { if (!inCollection(item, capability.getTags())) { return false; } } return true; } }, Boolean.FALSE); }</code><technical_language>I guess a guard for resource == null (like for filterText assert vua org.eclipse.core.runtime.Assert throws assertion (runtime-) exception?) a great idea</technical_language>

Target:
public static boolean isMatching(final String filterText, IResource resource) { if(resource == null) { return true; } return resource.accept(new CapabilityVisitor<ITags, Boolean>() { @Override public Boolean visit(ITags capability) { return isMatching(filterText, resource.getName(), capability.getTags()); } }, Boolean.FALSE); }
Source:
<code><START> Optional<Route> findRouteByCost(final Territory start, final Territory end) { <END> Preconditions.checkNotNull(start); Preconditions.checkNotNull(end); if (start.equals(end)) { return Optional.of(new Route(start)); } final Map<Territory, Territory> previous = new HashMap<>(); previous.put(start, null); final Queue<Territory> toVisit = new ArrayDeque<>(); toVisit.add(start); final Map<Territory, BigDecimal> routeCosts = new HashMap<>(); routeCosts.put(start, BigDecimal.ZERO); BigDecimal minCost = new BigDecimal(Integer.MAX_VALUE); while (!toVisit.isEmpty()) { final Territory currentTerritory = toVisit.remove(); if (routeCosts.get(currentTerritory).compareTo(minCost) >= 0) { continue; } for (final Territory neighbor : map.getNeighborsValidatingCanals(currentTerritory, condition, units, player)) { final BigDecimal routeCost = routeCosts.get(currentTerritory).add(getMaxMovementCost(neighbor)); if (!previous.containsKey(neighbor) || routeCost.compareTo(routeCosts.get(neighbor)) < 0) { previous.put(neighbor, currentTerritory); routeCosts.put(neighbor, routeCost); if (neighbor.equals(end) && routeCost.compareTo(minCost) < 0) { minCost = routeCost; break; } toVisit.add(neighbor); } } } return (minCost.compareTo(new BigDecimal(Integer.MAX_VALUE)) == 0) ? Optional.empty() : Optional.of(getRoute(start, end, previous)); }</code><technical_language>Hmm code a common Dijkstra algorithm, performance optimal. worth for A* if performance is bad</technical_language>

Target:
Optional<Route> findRouteByCost(final Territory start, final Territory end) { return findRouteByCost(start, end, this::getMaxMovementCost); }
Source:
<code>public ValueMatcher makeValueMatcher(final FloatColumnSelector selector, final String value) { final float matchVal = DimensionHandlerUtils.convertObjectToFloat(value); return new ValueMatcher() { @Override public boolean matches() { <START> return selector.get() == matchVal; <END> } }; }</code><technical_language>If consider NaNs equal (I should), extract matchValBits = Float.floatToIntBits() compare Float.floatToIntBits(selector.get()) == matchValBits in this line</technical_language>

Target:
public ValueMatcher makeValueMatcher(final FloatColumnSelector selector, final String value) { final Float matchVal = DimensionHandlerUtils.convertObjectToFloat(value); if (matchVal == null) { return BooleanValueMatcher.of(false); } final int matchValIntBits = Float.floatToIntBits(matchVal); return new ValueMatcher() { @Override public boolean matches() { return Float.floatToIntBits(selector.get()) == matchValIntBits; } }; }
Source:
<code>public void showDuplicatePicturePopup() { String uploadTitleFormat = getString(R.string.upload_title_duplicate); DialogUtil.showAlertDialog(getActivity(), getString(R.string.warning), String.format(Locale.getDefault(), uploadTitleFormat, uploadItem.getFileName()), <START> getString(R.string.cancel), <END> getString(R.string.upload_image), () -> { }, () -> { uploadItem.setImageQuality(ImageUtils.IMAGE_KEEP); onNextButtonClicked(); }); }</code><technical_language>in wrong order? Upload right. If post a picture of changes helpful</technical_language>

Target:
public void showDuplicatePicturePopup() { String uploadTitleFormat = getString(R.string.upload_title_duplicate); DialogUtil.showAlertDialog(getActivity(), getString(R.string.duplicate_image_found), String.format(Locale.getDefault(), uploadTitleFormat, uploadItem.getFileName()), getString(R.string.upload), getString(R.string.cancel), () -> { uploadItem.setImageQuality(ImageUtils.IMAGE_KEEP); onNextButtonClicked(); }, null); }
Source:
<code>public Request authenticate(Route route, final Response response) throws IOException { logger.warn(response.toString()); final AuthResponse currentAuth = loginPrefs.getCurrentAuth(); if (null == currentAuth || null == currentAuth.refresh_token) { return null; } String response_body = response.peekBody(200).string(); switch (getErrorCode(response_body)) { case TOKEN_EXPIRED_ERROR_MESSAGE: <START> break; <END> case TOKEN_NONEXISTENT_ERROR_MESSAGE: case TOKEN_INVALID_GRANT_ERROR_MESSAGE: if (!response.request().headers().get("Authorization").split(" ")[1].equals(currentAuth.access_token)) { return response.request().newBuilder() .header("Authorization", currentAuth.token_type + " " + currentAuth.access_token) .build(); } default: return null; } final AuthResponse refreshedAuth; try { refreshedAuth = refreshAccessToken(currentAuth); } catch (HttpResponseStatusException e) { return null; } return response.request().newBuilder() .header("Authorization", refreshedAuth.token_type + " " + refreshedAuth.access_token) .build(); }</code><technical_language>this case breaks, move logic switch statement instead easier follow where</technical_language>

Target:
public synchronized Request authenticate(Route route, final Response response) throws IOException { logger.warn(response.toString()); final AuthResponse currentAuth = loginPrefs.getCurrentAuth(); if (null == currentAuth || null == currentAuth.refresh_token) { return null; } String errorCode = getErrorCode(response.peekBody(200).string()); if (errorCode != null) { switch (errorCode) { case TOKEN_EXPIRED_ERROR_MESSAGE: final AuthResponse refreshedAuth; try { refreshedAuth = refreshAccessToken(currentAuth); } catch (HttpResponseStatusException e) { return null; } return response.request().newBuilder() .header("Authorization", refreshedAuth.token_type + " " + refreshedAuth.access_token) .build(); case TOKEN_NONEXISTENT_ERROR_MESSAGE: case TOKEN_INVALID_GRANT_ERROR_MESSAGE: if (!response.request().headers().get("Authorization").split(" ")[1].equals(currentAuth.access_token)) { return response.request().newBuilder() .header("Authorization", currentAuth.token_type + " " + currentAuth.access_token) .build(); } } } return null; }
Source:
<code>public void parse() { URI workingDirURI = null; try { workingDirURI = new URI(workingDir.toPortableString()); } catch (URISyntaxException e) { <START> e.printStackTrace(); <END> } String cmd = getCommand(workingDirURI.getPath()); performCommand(cmd, 1); }</code><technical_language>Please do printStackTrace handle in some way</technical_language>

Target:
public void parse() { URI workingDirURI = null; try { workingDirURI = new URI(workingDir.toPortableString()); } catch (URISyntaxException e) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.MsgProxyError, Messages.MsgProxyError); } String cmd = getCommand(workingDirURI.getPath()); performCommand(cmd, 1); }
Source:
<code>public void setNumThreads(final Integer numThreads) { <START> m_threads = ConfigUtils.assertNotNull(numThreads, "threads"); <END> }</code><technical_language>do allow this field null</technical_language>

Target:
public void setNumThreads(final Integer numThreads) { m_threads = numThreads; }
Source:
<code><START> public static void killAllSpawnedHadoopJobs(String logFilePath, Logger log) { <END> Set<String> allSpawnedJobs = findApplicationIdFromLog(logFilePath, log); log.info("applicationIds to kill: " + allSpawnedJobs); for (String appId : allSpawnedJobs) { try { killJobOnCluster(appId, log); } catch (Throwable t) { log.warn("something happened while trying to kill this job: " + appId, t); } } }</code><technical_language>is useful for this method return a list of Hadoop jobs killed this method caller print out</technical_language>

Target:
public static Set<String> killAllSpawnedHadoopJobs(String logFilePath, Logger log) { Set<String> allSpawnedJobs = findApplicationIdFromLog(logFilePath, log); log.info("applicationIds to kill: " + allSpawnedJobs); for (String appId : allSpawnedJobs) { try { killJobOnCluster(appId, log); } catch (Throwable t) { log.warn("something happened while trying to kill this job: " + appId, t); } } return allSpawnedJobs; }
Source:
<code>public static void main(String[] args) throws Exception { ConfigurationBuilder builder = new ConfigurationBuilder(); builder.addServer().host("127.0.0.1") .port(ConfigurationProperties.DEFAULT_HOTROD_PORT); RemoteCacheManager cacheManager = new RemoteCacheManager(builder.build()); cacheManager.administration() .withFlags(CacheContainerAdmin.AdminFlag.VOLATILE) <START> .getOrCreateCache("people-multimap", "org.infinispan.DIST_SYNC"); <END> MultimapCacheManager multimapCacheManager = RemoteMultimapCacheManagerFactory.from(cacheManager); RemoteMultimapCache<Integer, String> people = multimapCacheManager.get("people"); people.put(2016, "Alberto"); people.put(2016, "Oihana"); people.put(2016, "Roman"); people.put(2016, "Ane"); people.put(2017, "Paula"); people.put(2017, "Aimar"); people.put(2018, "Elaia"); people.get(2016).whenComplete((v, ex) -> { System.out.println(v); }).join(); cacheManager.stop(); }</code><technical_language>cache name is incorrect. people</technical_language>

Target:
public static void main(String[] args) throws Exception { ConfigurationBuilder builder = new ConfigurationBuilder(); builder.addServer().host("127.0.0.1") .port(ConfigurationProperties.DEFAULT_HOTROD_PORT); RemoteCacheManager cacheManager = new RemoteCacheManager(builder.build()); cacheManager.administration() .withFlags(CacheContainerAdmin.AdminFlag.VOLATILE) .getOrCreateCache(PEOPLE_MULTIMAP, "org.infinispan.DIST_SYNC"); MultimapCacheManager multimapCacheManager = RemoteMultimapCacheManagerFactory.from(cacheManager); RemoteMultimapCache<Integer, String> people = multimapCacheManager.get(PEOPLE_MULTIMAP); people.put(2016, "Alberto"); people.put(2016, "Oihana"); people.put(2016, "Roman"); people.put(2016, "Ane"); people.put(2017, "Paula"); people.put(2017, "Aimar"); people.put(2018, "Elaia"); people.get(2016).whenComplete((v, ex) -> { System.out.println(v); }).join(); cacheManager.stop(); }
Source:
<code>public int countIssuesShown() throws InterruptedException, ExecutionException { <START> FutureTask countIssues = new FutureTask(((ListPanel) <END> TestController.getUI().getPanelControl().getPanel(0))::getIssueCount); PlatformEx.runAndWait(countIssues); return (int) countIssues.get(); }</code><technical_language>FutureTask parameterised result type (Integer?)</technical_language>

Target:
public int countIssuesShown() throws InterruptedException, ExecutionException { FutureTask<Integer> countIssues = new FutureTask<Integer>(((ListPanel) TestController.getUI().getPanelControl().getPanel(0))::getIssueCount); PlatformEx.runAndWait(countIssues); return (int) countIssues.get(); }
Source:
<code>public void pushAdd(CollectorRegistry registry, String job, Map<String, String> groupingKey) throws IOException { HttpPost request = new HttpPost(); <START> request.setEntity(createOutputEntity(registry)); <END> doRequest(registry, job, groupingKey, request); }</code><technical_language>I this code function inlined in doRequest</technical_language>

Target:
public void pushAdd(CollectorRegistry registry, String job, Map<String, String> groupingKey) throws IOException { HttpPost request = new HttpPost(); request.setEntity(createOutputEntity(registry)); doRequest(job, groupingKey, request); }