auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void initVm() { if (!isInitVmRequired()) { return; } fetchVmDisksFromDb(); updateVmDevicesOnRun(); updateGraphicsAndDisplayInfos(); getVm().setRunAndPause(getParameters().getRunAndPause() == null ? getVm().isRunAndPause() : getParameters().getRunAndPause()); getVm().setConsoleUserId(null); updateVmInit(); if (!StringUtils.isEmpty(getParameters().getFloppyPath()) && isPayloadExists(VmDeviceType.FLOPPY)) { vmPayload = null; } updateVmGuestAgentVersion(); if (getVm().getCpuName() == null) { if (getVm().getCustomCpuName() != null) { getVm().setCpuName(getVm().getCustomCpuName()); } else { getVm().setCpuName(getCpuFlagsManagerHandler().getCpuId( getVm().getClusterCpuName(), getVm().getCompatibilityVersion())); } } <START> else if (getVm().isUseHostCpuFlags()) <END> { getVm().setCpuName(getVds().getCpuFlags()); } if (getVm().getEmulatedMachine() == null) { getVm().setEmulatedMachine(getEffectiveEmulatedMachine()); } }</code><technical_language>get this "else" section in code for run & run-once actions getVm().getCpuName() is set NULL this point start VM (a VmDynamic property). set host's cpu flags required, filter fail finding host run on</technical_language>

Target:
protected void initVm() { if (!isInitVmRequired()) { return; } fetchVmDisksFromDb(); updateVmDevicesOnRun(); updateGraphicsAndDisplayInfos(); getVm().setRunAndPause(getParameters().getRunAndPause() == null ? getVm().isRunAndPause() : getParameters().getRunAndPause()); getVm().setConsoleUserId(null); updateVmInit(); if (!StringUtils.isEmpty(getParameters().getFloppyPath()) && isPayloadExists(VmDeviceType.FLOPPY)) { vmPayload = null; } updateVmGuestAgentVersion(); if (!getVm().isUseHostCpuFlags() && getVm().getCpuName() == null) { if (getVm().getCustomCpuName() != null) { getVm().setCpuName(getVm().getCustomCpuName()); } else { getVm().setCpuName(getCpuFlagsManagerHandler().getCpuId( getVm().getClusterCpuName(), getVm().getCompatibilityVersion())); } } if (getVm().getEmulatedMachine() == null) { getVm().setEmulatedMachine(getEffectiveEmulatedMachine()); } }
Source:
<code><START> ImmutableList<AnalyzedCheckConstraint> checkConstraints() { <END> return checkConstraints; }</code><technical_language>suggestion List<AnalyzedCheckConstraint> checkConstraints() { I other properties expose ImmutableList, leaking implementation details class boundaries is a good idea. If want change implementation details break API</technical_language>

Target:
List<CheckConstraint<Symbol>> checkConstraints() { return checkConstraints; }
Source:
<code>public void run() { Thread.currentThread().setName( "JobRunner-" + this.jobId + "-" + executionId); if (handleNonReadyStatus()) { return; } createAttachmentFile(); createLogger(); boolean errorFound = false; errorFound |= delayExecution(); errorFound |= blockOnPipeLine(); node.setStartTime(System.currentTimeMillis()); if (!errorFound && !isKilled()) { fireEvent(Event.create(this, Type.JOB_STARTED, null, false)); try { loader.uploadExecutableNode(node, props); } catch (ExecutorManagerException e1) { logger.error("Error writing initial node properties"); } if (prepareJob()) { writeStatus(); fireEvent(Event.create(this, Type.JOB_STATUS_CHANGED), false); runJob(); } else { changeStatus(Status.FAILED); logError("Job run failed preparing the job."); } } node.setEndTime(System.currentTimeMillis()); if (isKilled()) { changeStatus(Status.KILLED); } logInfo("Finishing job " + this.jobId + " attempt: " + node.getAttempt() + " at " + node.getEndTime() + " with status " + node.getStatus()); <START> int attempNo = node.getAttempt(); <END> fireEvent(Event.create(this, Type.JOB_FINISHED), false); finalizeLogFile(attempNo); finalizeAttachmentFile(); writeStatus(); }</code><technical_language>attempNo -> attemptNo move this line line 459 attemptNo in logInfo() call instead of node.getAttempt()</technical_language>

Target:
public void run() { Thread.currentThread().setName( "JobRunner-" + this.jobId + "-" + executionId); if (handleNonReadyStatus()) { return; } createAttachmentFile(); createLogger(); boolean errorFound = false; errorFound |= delayExecution(); errorFound |= blockOnPipeLine(); node.setStartTime(System.currentTimeMillis()); if (!errorFound && !isKilled()) { fireEvent(Event.create(this, Type.JOB_STARTED, null, false)); try { loader.uploadExecutableNode(node, props); } catch (ExecutorManagerException e1) { logger.error("Error writing initial node properties"); } if (prepareJob()) { writeStatus(); fireEvent(Event.create(this, Type.JOB_STATUS_CHANGED), false); runJob(); } else { changeStatus(Status.FAILED); logError("Job run failed preparing the job."); } } node.setEndTime(System.currentTimeMillis()); if (isKilled()) { changeStatus(Status.KILLED); } int attemptNo = node.getAttempt(); logInfo("Finishing job " + this.jobId + " attempt: " + attemptNo + " at " + node.getEndTime() + " with status " + node.getStatus()); fireEvent(Event.create(this, Type.JOB_FINISHED), false); finalizeLogFile(attemptNo); finalizeAttachmentFile(); writeStatus(); }
Source:
<code>public SimpleStatementBuilder builder() { <START> return SimpleStatement.builder(asCql()).setIdempotence(IS_IDEMPOTENT); <END> }</code><technical_language>Please a constant here. setIdempotence(true) is perfectly clear, decide "false" "idempotent" point in future</technical_language>

Target:
public SimpleStatementBuilder builder() { return SimpleStatement.builder(asCql()).setIdempotence(true); }
Source:
<code>public AEBaseSlabBlock( AEBaseBlock block, int meta, EnumSet<AEFeature> features, boolean isDoubleSlab, String name ) { super( isDoubleSlab, block.getMaterial() ); this.block = block; this.meta = meta; this.name = name; this.isDoubleSlab = isDoubleSlab; this.setBlockName( "appliedenergistics2." + name ); this.setHardness( block.getBlockHardness( null, 0, 0, 0 ) ); this.setResistance( block.getExplosionResistance( null ) * 5.0F / 3.0F ); this.setStepSound( block.stepSound ); this.useNeighborBrightness = true; if (!isDoubleSlab) { this.dSlabs = new AEBaseSlabBlock( block, meta, features, true, name + ".double" ).setSlabs(this); this.slabs = this; } else { this.dSlabs = this; } <START> this.features = isDoubleSlab ? new SlabBlockFeatureHandler( features, this ) : new SlabBlockFeatureHandler( features, this ); <END> }</code><technical_language>is difference here</technical_language>

Target:
public AEBaseSlabBlock( AEBaseBlock block, int meta, EnumSet<AEFeature> features, boolean isDoubleSlab, String name ) { super( isDoubleSlab, block.getMaterial() ); this.block = block; this.meta = meta; this.name = name; this.setBlockName( "appliedenergistics2." + name ); this.setHardness( block.getBlockHardness( null, 0, 0, 0 ) ); this.setResistance( block.getExplosionResistance( null ) * 5.0F / 3.0F ); this.setStepSound( block.stepSound ); this.useNeighborBrightness = true; if (!field_150004_a) this.doubleSlabs = new AEBaseSlabBlock( block, meta, features, true, name + ".double" ).setSlabs(this); this.features = !field_150004_a ? new SlabBlockFeatureHandler( features, this ) : null; }
Source:
<code>public void processTextFieldChange(String text) { int curTextFieldLength = text.length(); if (curTextFieldLength > 0) { if (curTextFieldLength > previousTextFieldLength) { char lastChar = text.charAt(curTextFieldLength - 1); String[] textArray = text.trim().split(" "); String finalLabel = textArray[textArray.length - 1]; if (lastChar == ' ') { if (hasHighlightedLabel()) { listOfSpecifiedLabels.add(getHighlightedLabelName().get().getActualName()); toggleHighlightedLabel(); } else { listOfSpecifiedLabels.add(null); listOfRemovedExclusiveLabels.add(null); } } else { updateBottomLabelsWithRawQuery(finalLabel); updatePossibleLabel(); } } else { char lastChar = text.charAt(curTextFieldLength - 1); if (lastChar != ' ' && previousLastChar == ' ' && !listOfSpecifiedLabels.isEmpty()) { int lastIndex = listOfSpecifiedLabels.size() - 1; String lastLabel = listOfSpecifiedLabels.get(lastIndex); listOfSpecifiedLabels.remove(lastIndex); if (lastLabel != null) { updateTopLabels(lastLabel, !resultList.get(lastLabel)); } ArrayList<String> listOfRemovedLabels = listOfRemovedExclusiveLabels.get(lastIndex); listOfRemovedExclusiveLabels.remove(lastIndex); if (listOfRemovedLabels != null) { <START> listOfRemovedLabels.stream() <END> .forEach(labelName -> { updateTopLabels(labelName, true); }); } } if (lastChar == ' ') { removePossibleLabel(); } else { String[] textArray = text.trim().split(" "); String finalLabel = textArray[textArray.length - 1]; updateBottomLabelsWithRawQuery(finalLabel); updatePossibleLabel(); } } previousTextFieldLength = curTextFieldLength; previousLastChar = text.charAt(curTextFieldLength - 1); } else { removePossibleLabel(); } populatePanes(); }</code><technical_language>line lambda need curly braces java listOfRemovedLabels.stream().forEach(labelName -> updateTopLabels(labelName, true));</technical_language>

Target:
public void processTextFieldChange(String text) { if (isEmpty(text)) { handleNoQuery(); } else if (isCharAdded(text)) { handleCharAddition(text); } else { handleCharRemoval(text); } updatePreviousTextFieldInfo(text); populatePanes(); }
Source:
<code>public void getDynamicDocumentCannotAlwaysDetermineCorrectType() { createHotelIndex(); client = getSearchIndexClientBuilder(INDEX_NAME).buildClient(); List<Document> rooms = new ArrayList<>(); rooms.add(new Document(Collections.singletonMap("baseRate", NaN))); Document indexedDoc = new Document(); indexedDoc.put("HotelId", "1"); indexedDoc.put("HotelName", "2015-02-11T12:58:00Z"); indexedDoc.put("Location", GeoPoint.create(40.760586, -73.975403)); indexedDoc.put("Rooms", rooms); Document expectedDoc = new Document(); expectedDoc.put("HotelId", "1"); expectedDoc.put("HotelName", OffsetDateTime.of(2015, 2, 11, 12, 58, 0, 9, ZoneOffset.UTC)); expectedDoc.put("Location", GeoPoint.create(40.760586, -73.975403)); expectedDoc.put("Rooms", Collections.singleton(new Document(Collections.singletonMap("BaseRate", "NaN")))); <START> client.index(new IndexBatch<>().addUploadAction(expectedDoc)); <END> assertEquals(client.getDocumentWithResponse("1", new ArrayList<>(indexedDoc.keySet()), null, Context.NONE).getValue(), expectedDoc); }</code><technical_language>uploading indexedDoc. paranoid this mistake in places copy-pasted</technical_language>

Target:
public void getDynamicDocumentCannotAlwaysDetermineCorrectType() { createHotelIndex(); client = getSearchIndexClientBuilder(INDEX_NAME).buildClient(); Document indexedDoc = new Document(); indexedDoc.put("HotelId", "1"); indexedDoc.put("HotelName", "2015-02-11T12:58:00Z"); indexedDoc.put("Location", GeoPoint.create(40.760586, -73.975403)); indexedDoc.put("Rooms", Collections.singletonList(new Document(Collections.singletonMap("BaseRate", NaN)))); Document expectedDoc = new Document(); expectedDoc.put("HotelId", "1"); expectedDoc.put("HotelName", OffsetDateTime.of(2015, 2, 11, 12, 58, 0, 0, ZoneOffset.UTC)); expectedDoc.put("Location", GeoPoint.create(40.760586, -73.975403)); expectedDoc.put("Rooms", Collections.singletonList(new Document(Collections.singletonMap("BaseRate", "NaN")))); client.index(new IndexBatch<>().addUploadAction(indexedDoc)); List<String> selectedFields = Arrays.asList("HotelId", "HotelName", "Location", "Rooms/BaseRate"); assertEquals(expectedDoc, client.getDocumentWithResponse("1", selectedFields, null, Context.NONE).getValue()); }
Source:
<code>public static <A, B, C> IO<C> bracket(final IO<A> init, final F<A, IO<B>> fin, final F<A, IO<C>> body) { return new IO<C>() { @Override public C run() throws IOException { final A a = init.run(); <START> try(Closeable finAsCloseable = fin.f(a)::run) { <END> return body.f(a).run(); } } }; }</code><technical_language>I realise RetroLambda supported backporting try-with-resources now. :)</technical_language>

Target:
public static <A, B, C> IO<C> bracket(final IO<A> init, final F<A, IO<B>> fin, final F<A, IO<C>> body) { return () -> { final A a = init.run(); try(Closeable finAsCloseable = fin.f(a)::run) { return body.f(a).run(); } }; }
Source:
<code>public void testExportPublicKey() { String storageLocation = getStoragePathForNewFile(); String storagePassword = "cspassword"; String aliasName = "testalias"; String[] createArgs = { "--location=" + storageLocation, "--create", "--generate-key-pair", aliasName, "--summary", "--password", storagePassword }; executeCommandAndCheckStatus(createArgs); String[] exportArgs = { "--location=" + storageLocation, "--export-key-pair-public-key", aliasName, "--summary", "--password", storagePassword }; <START> executeCommandAndCheckStatus(exportArgs); <END> }</code><technical_language>executeCommandAndCheckStatusAndGetOutput verify output of command is expected</technical_language>

Target:
public void testExportPublicKey() { String storageLocation = getStoragePathForNewFile(); String storagePassword = "cspassword"; String aliasName = "testalias"; String[] createArgs = { "--location=" + storageLocation, "--create", "--generate-key-pair", aliasName, "--summary", "--password", storagePassword }; executeCommandAndCheckStatus(createArgs); String[] exportArgs = { "--location=" + storageLocation, "--export-key-pair-public-key", aliasName, "--summary", "--password", storagePassword }; String output = executeCommandAndCheckStatusAndGetOutput(exportArgs); Assert.assertTrue(output.contains("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ")); }
Source:
<code>public SubTabVirtualMachineGeneralView(DetailModelProvider<VmListModel, VmGeneralModel> modelProvider, ApplicationConstants constants) { super(modelProvider); this.form = new VmGeneralModelForm(modelProvider, constants); resources = ClientGinjectorProvider.getApplicationResources(); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); clearAlerts(); generateIds(); <START> this.form.setElementIdPrefixes(); <END> }</code><technical_language>Instead of manually invoking form.setElementIdPrefixes(), AbstractModelBoundFormWidget implement HasElementId interface, implementation following: * get widget's DOM element set ID * execute code in setElementIdPrefixes (no need for separate method now) This way, manually invoking form.setElementIdPrefixes() needed anymore, HasElementId.setElementId() is called part of generateIds()</technical_language>

Target:
public SubTabVirtualMachineGeneralView(DetailModelProvider<VmListModel, VmGeneralModel> modelProvider, ApplicationConstants constants) { super(modelProvider); this.form = new VmGeneralModelForm(modelProvider, constants); resources = ClientGinjectorProvider.getApplicationResources(); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); clearAlerts(); generateIds(); }
Source:
<code>public void lockImmutableTimestampLocksFreshTimestamp() throws InterruptedException { long immutableTs = 3L; mockImmutableTsLockResponse(); mockMinLockedInVersionIdResponse(immutableTs); LockImmutableTimestampResponse expectedResponse = LockImmutableTimestampResponse.of(immutableTs, LOCK_TOKEN_V2); assertEquals(expectedResponse, timelock.lockImmutableTimestamp(LockImmutableTimestampRequest.create())); <START> } <END></code><technical_language>match</technical_language>

Target:
public void lockImmutableTimestampLocksFreshTimestamp() throws InterruptedException { long immutableTs = 3L; LockRefreshToken expectedToken = mockImmutableTsLockResponse(); mockMinLockedInVersionIdResponse(immutableTs); LockImmutableTimestampResponse expectedResponse = LockImmutableTimestampResponse.of(immutableTs, new LockRefreshTokenV2Adapter(expectedToken)); assertEquals(expectedResponse, timelock.lockImmutableTimestamp(LockImmutableTimestampRequest.create())); }
Source:
<code>public void onResume() { super.onResume(); getActivity().setTitle(R.string.app_name); <START> ActionBar actionBar = ((AppCompatActivity)getActivity()).getSupportActionBar(); <END> if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(false); } }</code><technical_language>This commit appears duplicate changes #430. Is this intentional? branch do changes belong on? other. Please amend of branches fix this</technical_language>

Target:
public void onResume() { super.onResume(); Activity activity = Objects.requireNonNull(getActivity()); activity.setTitle(R.string.app_name); }
Source:
<code>public void testTableSourceWithTableAPI() throws Exception { StreamExecutionEnvironment execEnv = StreamExecutionEnvironment.getExecutionEnvironment(); StreamTableEnvironment tEnv = StreamTableEnvironment.create(execEnv, streamSettings); tEnv.connect(new HBase() <START> .version("1.4.3") <END> .tableName(TEST_TABLE_1) .zookeeperQuorum(getZookeeperQuorum())) .withSchema(new Schema() .field("rowkey", DataTypes.INT()) .field("family2", DataTypes.ROW(DataTypes.FIELD("col1", DataTypes.STRING()), DataTypes.FIELD("col2", DataTypes.BIGINT()))) .field("family3", DataTypes.ROW(DataTypes.FIELD("col1", DataTypes.DOUBLE()), DataTypes.FIELD("col2", DataTypes.BOOLEAN()), DataTypes.FIELD("col3", DataTypes.STRING()))) .field("family1", DataTypes.ROW(DataTypes.FIELD("col1", DataTypes.INT())))) .createTemporaryTable("hTable"); Table table = tEnv.sqlQuery("SELECT * FROM hTable AS h"); List<Row> results = CollectionUtil.iteratorToList(table.execute().collect()); String expected = "1,Hello-1,100,1.01,false,Welt-1,10\n" + "2,Hello-2,200,2.02,true,Welt-2,20\n" + "3,Hello-3,300,3.03,false,Welt-3,30\n" + "4,null,400,4.04,true,Welt-4,40\n" + "5,Hello-5,500,5.05,false,Welt-5,50\n" + "6,Hello-6,600,6.06,true,Welt-6,60\n" + "7,Hello-7,700,7.07,false,Welt-7,70\n" + "8,null,800,8.08,true,Welt-8,80\n"; TestBaseUtils.compareResultAsText(results, expected); }</code><technical_language>suggestion .version("2.2.3")</technical_language>

Target:
public void testTableSourceWithTableAPI() throws Exception { StreamExecutionEnvironment execEnv = StreamExecutionEnvironment.getExecutionEnvironment(); StreamTableEnvironment tEnv = StreamTableEnvironment.create(execEnv, streamSettings); tEnv.connect(new HBase() .version("2.2.3") .tableName(TEST_TABLE_1) .zookeeperQuorum(getZookeeperQuorum())) .withSchema(new Schema() .field("rowkey", DataTypes.INT()) .field("family2", DataTypes.ROW(DataTypes.FIELD("col1", DataTypes.STRING()), DataTypes.FIELD("col2", DataTypes.BIGINT()))) .field("family3", DataTypes.ROW(DataTypes.FIELD("col1", DataTypes.DOUBLE()), DataTypes.FIELD("col2", DataTypes.BOOLEAN()), DataTypes.FIELD("col3", DataTypes.STRING()))) .field("family1", DataTypes.ROW(DataTypes.FIELD("col1", DataTypes.INT())))) .createTemporaryTable("hTable"); Table table = tEnv.sqlQuery("SELECT * FROM hTable AS h"); List<Row> results = CollectionUtil.iteratorToList(table.execute().collect()); String expected = "1,Hello-1,100,1.01,false,Welt-1,10\n" + "2,Hello-2,200,2.02,true,Welt-2,20\n" + "3,Hello-3,300,3.03,false,Welt-3,30\n" + "4,null,400,4.04,true,Welt-4,40\n" + "5,Hello-5,500,5.05,false,Welt-5,50\n" + "6,Hello-6,600,6.06,true,Welt-6,60\n" + "7,Hello-7,700,7.07,false,Welt-7,70\n" + "8,null,800,8.08,true,Welt-8,80\n"; TestBaseUtils.compareResultAsText(results, expected); }
Source:
<code>public boolean connectHostToDomainsInActiveOrUnknownStatus(VDS vds) { StoragePool sp = storagePoolDao.getForVds(vds.getId()); ConnectHostToStoragePoolServersParameters params = <START> new ConnectHostToStoragePoolServersParameters(sp, vds, false); <END> return backend .runInternalAction(VdcActionType.ConnectHostToStoragePoolServers, params) .getSucceeded(); }</code><technical_language>call vds.getStoragePoolId()? good enough</technical_language>

Target:
public boolean connectHostToDomainsInActiveOrUnknownStatus(VDS vds) { StoragePool sp = storagePoolDao.get(vds.getStoragePoolId()); ConnectHostToStoragePoolServersParameters params = new ConnectHostToStoragePoolServersParameters(sp, vds, false); return backend .runInternalAction(VdcActionType.ConnectHostToStoragePoolServers, params) .getSucceeded(); }
Source:
<code>public static JsonFunction createJsDate(Calendar cal) { StringBuilder sb = new StringBuilder("new Date("); <START> sb.append(cal.get(Calendar.YEAR)); <END> sb.append(", ").append(cal.get(Calendar.MONTH)); sb.append(", ").append(cal.get(Calendar.DAY_OF_MONTH)); sb.append(", ").append(cal.get(Calendar.HOUR_OF_DAY)); sb.append(", ").append(cal.get(Calendar.MINUTE)); if ((cal.isSet(Calendar.SECOND) && cal.get(Calendar.SECOND) != 0) || (cal.isSet(Calendar.MILLISECOND) && cal.get(Calendar.MILLISECOND) != 0)) { sb.append(", ").append(cal.get(Calendar.SECOND)); } if (cal.isSet(Calendar.MILLISECOND) && cal.get(Calendar.MILLISECOND) != 0) { sb.append(", ").append(cal.get(Calendar.MILLISECOND)); } sb.append(")"); return new JsonFunction(sb.toString()); }</code><technical_language>easier create Date new Date(milliseconds)</technical_language>

Target:
public static JsonFunction createJsDate(Calendar cal) { StringBuilder sb = new StringBuilder("new Date("); sb.append(cal.getTimeInMillis()); sb.append(")"); return new JsonFunction(sb.toString()); }
Source:
<code>public static TransactionId getPreviousTransactionId(Artifact art, TransactionId trans) { boolean found = false; JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(SELECT_ART_TRANSACTION_IDS, art.getBranch().getId(), art.getArtId()); while (chStmt.next()) { Long transId = chStmt.getLong("transaction_id"); if <START> (trans.equals(transId)) { <END> found = true; } if (found && trans.notEqual(transId)) { return TransactionId.valueOf(transId); } } } finally { chStmt.close(); } return null; }</code><technical_language>add && trans.notEqual(transId)) { return TransactionId.valueOf(transId); } ...and omit next lines, no</technical_language>

Target:
public static TransactionId getPreviousTransactionId(Artifact art, TransactionId trans) { return ConnectionHandler.getJdbcClient().fetch(TransactionId.SENTINEL, SELECT_ART_TRANSACTION_IDS, art.getBranch(), art, trans); }
Source:
<code>private void providers_SelectedItemChanged() { Provider provider = (Provider) getProviders().getSelectedItem(); <START> if (provider != null ) { <END> getProviderSearchFilter().setIsChangable(true); getProviderSearchFilterLabel().setIsChangable(true); getUpdateHostsCommand().setIsExecutionAllowed(true); } else { getProviderSearchFilter().setIsChangable(false); getProviderSearchFilterLabel().setIsChangable(false); getUpdateHostsCommand().setIsExecutionAllowed(false); } getExternalHostName().setItems(null); getExternalHostName().setIsChangable(false); }</code><technical_language>shorten to- getProviderSearchFilter().setIsChangable(provider!=null); getProviderSearchFilterLabel().setIsChangable(provider!=null); getUpdateHostsCommand().setIsExecutionAllowed(provider!=null);</technical_language>

Target:
private void providers_SelectedItemChanged() { Provider provider = (Provider) getProviders().getSelectedItem(); setEnableSearchHost(provider != null); getExternalHostName().setItems(null); getExternalHostName().setIsChangable(false); }
Source:
<code><START> private Dialog createZipCodeDialog() { <END> Drawable icon = getResources().getDrawable(android.R.drawable.ic_dialog_map); DrawableCompat.setTint(icon, getResources().getColor(R.color.theme_primary)); final EditText zipInput = new EditText(this.getContext()); zipInput.setInputType(InputType.TYPE_CLASS_NUMBER); final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()) .setTitle(R.string.main_ziplocation_title) .setIcon(icon) .setCancelable(false) .setMessage(R.string.main_ziplocation) .setView(zipInput) .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { final String zip = zipInput.getText().toString().trim(); if (zip != null && LocationUtils.isValidZipCode(zip)) { mMapFragment.setLocationByZip(zip); } else { createZipCodeDialog().show(); } } } ) .setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { mMapFragment.mController.onLocation(); } } ); return builder.create(); }</code><technical_language>move this UIUtils, return Dialog show - useful elsewhere, BaseMapFragment is pretty huge</technical_language>

Target:
private Dialog createZipCodeDialog() { Drawable icon = getResources().getDrawable(android.R.drawable.ic_dialog_map); DrawableCompat.setTint(icon, getResources().getColor(R.color.theme_primary)); LayoutInflater inflater = LayoutInflater.from(getActivity()); final EditText zipInput = (EditText)inflater.inflate(R.layout.zipcode_text, null, false); final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()) .setTitle(R.string.main_ziplocation_title) .setIcon(icon) .setCancelable(false) .setMessage(R.string.main_ziplocation) .setView(zipInput) .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { final String zip = zipInput.getText().toString().trim(); if (zip != null && LocationUtils.isValidZipCode(zip)) { mMapFragment.setLocationByZip(zip); } else { createZipCodeDialog().show(); } } } ) .setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { mMapFragment.mController.onLocation(); } } ); return builder.create(); }
Source:
<code>public TmfEventsTableHeader(Composite parent, int style, IEventsTableHeaderListener listener) { super(parent, style); fListener = listener; fLayout = new RowLayout(); fLayout.marginTop = 0; fLayout.marginBottom = 0; fLayout.marginLeft = EXPANDED.getBounds().width; setLayout(fLayout); fLabelBackground = new Color(getDisplay(), LABEL_BACKGROUND); getParent().addControlListener(new ControlAdapter() { @Override public void controlResized(ControlEvent e) { getParent().layout(); } }); addPaintListener(e -> { if (fCollapsed) { e.gc.drawImage(COLLAPSED, 0, 0); } else { e.gc.drawImage(EXPANDED, 0, 0); } }); addMouseListener(new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { toggle(); } }); addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) { <START> fLabelBackground.dispose(); <END> } }); }</code><technical_language>lambda</technical_language>

Target:
public TmfEventsTableHeader(Composite parent, int style, IEventsTableHeaderListener listener) { super(parent, style); fListener = listener; fLayout = new RowLayout(); fLayout.marginTop = 0; fLayout.marginBottom = 0; fLayout.marginLeft = EXPANDED.getBounds().width; setLayout(fLayout); fLabelBackground = new Color(getDisplay(), LABEL_BACKGROUND); getParent().addControlListener(new ControlAdapter() { @Override public void controlResized(ControlEvent e) { getParent().layout(); } }); addPaintListener(e -> { if (fCollapsed) { e.gc.drawImage(COLLAPSED, 0, 0); } else { e.gc.drawImage(EXPANDED, 0, 0); } }); addMouseListener(new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { toggle(); } }); addDisposeListener((e) -> { fLabelBackground.dispose(); }); }
Source:
<code>public final int hashCode() { Object key = getKey(); Object value = getValue(); int result = key != null ? key.hashCode() : 0; <START> result = 31 * result + (value != null ? value.hashCode() : 0); <END> return result; }</code><technical_language>I replace code java 31 * Objects.hashCode(key) + Objects.hashCode(value)</technical_language>

Target:
public final int hashCode() { return 31 * Objects.hashCode(getKey()) + Objects.hashCode(getValue()); }
Source:
<code>private void deleteProject() throws Exception { <START> testProjectServiceClient.deleteResource(ws.getId(), currentProjectName); <END> }</code><technical_language>IMHO ignore exception if required resource exist</technical_language>

Target:
private void deleteProject() { try { testProjectServiceClient.deleteResource(ws.getId(), currentProjectName); } catch (Exception e) { LOG.warn(e.getMessage(), e); } }
Source:
<code>public void auth(HotRodHeader header, String mech, byte[] response) { if (!enabled) { UnsupportedOperationException cause = log.invalidOperation(); ByteBuf buf = header.encoder().errorResponse(header, server, channel.alloc(), cause.toString(), OperationStatus.ServerError); int responseBytes = buf.readableBytes(); ChannelFuture future = channel.writeAndFlush(buf); if (header instanceof AccessLoggingHeader) { server.accessLogging().logException(future, (AccessLoggingHeader) header, cause.toString(), responseBytes); } } else { <START> executor.execute(() -> authInternal(header, mech, response)); <END> } }</code><technical_language>While handled declared exceptions, I feel a bit more warm&fuzzy if unexpected exceptions (NPEs...) handled a response..</technical_language>

Target:
public void auth(HotRodHeader header, String mech, byte[] response) { if (!enabled) { UnsupportedOperationException cause = log.invalidOperation(); ByteBuf buf = header.encoder().errorResponse(header, server, channel.alloc(), cause.toString(), OperationStatus.ServerError); int responseBytes = buf.readableBytes(); ChannelFuture future = channel.writeAndFlush(buf); if (header instanceof AccessLoggingHeader) { server.accessLogging().logException(future, (AccessLoggingHeader) header, cause.toString(), responseBytes); } } else { executor.execute(() -> { try { authInternal(header, mech, response); } catch (Throwable t) { writeException(header, t); } }); } }
Source:
<code>private SpecializedBlobClientBuilder getSpecializedBlobClientBuilder(String dfsEndpoint, HttpPipeline pipeline) { String blobEndpoint = BlobUrlParts.parse( <START> DataLakeImplUtils.endpointToDesiredEndpoint(dfsEndpoint, "blob", "dfs")).toUrl().toString(); <END> return new SpecializedBlobClientBuilder() .pipeline(pipeline) .endpoint(blobEndpoint) .serviceVersion(BlobServiceVersion.getLatest()); }</code><technical_language>this simple others</technical_language>

Target:
private SpecializedBlobClientBuilder getSpecializedBlobClientBuilder(String dfsEndpoint, HttpPipeline pipeline) { String blobEndpoint = DataLakeImplUtils.endpointToDesiredEndpoint(dfsEndpoint, "blob", "dfs"); return new SpecializedBlobClientBuilder() .pipeline(pipeline) .endpoint(blobEndpoint) .serviceVersion(BlobServiceVersion.getLatest()); }
Source:
<code>private void printCacheHelp() { log(i("The '" + CACHE + " subcommand' is used to get information about and perform actions with caches. The command has the following syntax:")); nl(); log(i(UTILITY_NAME_WITH_COMMON_OPTIONS + " " + CACHE + "[subcommand] <subcommand_parameters>")); nl(); log(i("The subcommands that take " + OP_NODE_ID + " as an argument ('" + LIST + "', '" + CONTENTION + "' and '" + VALIDATE_INDEXES + "') will be executed on the given node or on all server nodes if the option is not specified. Other commands will run on a random server node.")); nl(); nl(); log(i("Subcommands:")); usageCache(LIST, "regexPattern", op(or("groups", "seq")), OP_NODE_ID, op(CONFIG), op(OUTPUT_FORMAT, MULTI_LINE)); usageCache(CONTENTION, "minQueueSize", OP_NODE_ID, op("maxPrint")); usageCache(IDLE_VERIFY, op(CMD_DUMP), op(CMD_SKIP_ZEROS), "[cache1,...,cacheN]", op(CACHE_FILTER, or(CacheFilterEnum.values()))); usageCache(VALIDATE_INDEXES, "[cache1,...,cacheN]", OP_NODE_ID, op(or(VI_CHECK_FIRST + " N", VI_CHECK_THROUGH + " K"))); <START> usageCache(DISTRIBUTION, or(NODE_ID, NULL), "[cacheName1,...,cacheNameN]", op(CMD_USER_ATTRIBUTES, "attName1,...,attrNameN")); <END> usageCache(RESET_LOST_PARTITIONS, "cacheName1,...,cacheNameN"); nl(); }</code><technical_language>typo attName1 "attrName1"</technical_language>

Target:
private void printCacheHelp() { log(i("The '" + CACHE + " subcommand' is used to get information about and perform actions with caches. The command has the following syntax:")); nl(); log(i(UTILITY_NAME_WITH_COMMON_OPTIONS + " " + CACHE + "[subcommand] <subcommand_parameters>")); nl(); log(i("The subcommands that take " + OP_NODE_ID + " as an argument ('" + LIST + "', '" + CONTENTION + "' and '" + VALIDATE_INDEXES + "') will be executed on the given node or on all server nodes if the option is not specified. Other commands will run on a random server node.")); nl(); nl(); log(i("Subcommands:")); usageCache(LIST, "regexPattern", op(or("groups", "seq")), OP_NODE_ID, op(CONFIG), op(OUTPUT_FORMAT, MULTI_LINE)); usageCache(CONTENTION, "minQueueSize", OP_NODE_ID, op("maxPrint")); usageCache(IDLE_VERIFY, op(CMD_DUMP), op(CMD_SKIP_ZEROS), "[cache1,...,cacheN]", op(CACHE_FILTER, or(CacheFilterEnum.values()))); usageCache(VALIDATE_INDEXES, "[cache1,...,cacheN]", OP_NODE_ID, op(or(VI_CHECK_FIRST + " N", VI_CHECK_THROUGH + " K"))); usageCache(DISTRIBUTION, or(NODE_ID, NULL), "[cacheName1,...,cacheNameN]", op(CMD_USER_ATTRIBUTES, "attrName1,...,attrNameN")); usageCache(RESET_LOST_PARTITIONS, "cacheName1,...,cacheNameN"); nl(); }
Source:
<code>public synchronized Future<Future<BuildDiffInfo>> importBuildIfNewAndScheduleHiPrioComparison(AvailableBuildsList availableBuilds, BuildIdentifier buildIdentifier, BuildIdentifier comparisonBuildIdentifier, String comparisonName) { BuildImportSummary buildImportSummary = buildImportSummaries.get(buildIdentifier); if (buildImportSummary == null) { LOGGER.info("Build not exists yet, submitting new import with additional task for hi prio comparison calculation."); buildImportSummary = createBuildImportSummary(buildIdentifier); buildImportSummaries.put(buildIdentifier, buildImportSummary); <START> CompletableFuture<Future<BuildDiffInfo>> submittedFutureComparison = new CompletableFuture<>(); <END> submitBuildForImport(availableBuilds, buildIdentifier); Future<Future<BuildDiffInfo>> futureResult = submitSingleBuildComparisonAfterLastImport(buildIdentifier, comparisonBuildIdentifier, comparisonName); saveBuildImportSummaries(buildImportSummaries); return futureResult; } else { LOGGER.info("Build already exists, only triggering comparison dirextly, not waiting for any other build import to finish first."); CompletableFuture<Future<BuildDiffInfo>> submittedFutureComparison = new CompletableFuture<>(); submittedFutureComparison.complete( submitSingleBuildComparison(buildIdentifier, comparisonBuildIdentifier, comparisonName) ); return submittedFutureComparison; } }</code><technical_language>Unused variable</technical_language>

Target:
public synchronized Future<Future<BuildDiffInfo>> importBuildIfNewAndScheduleHiPrioComparison(AvailableBuildsList availableBuilds, BuildIdentifier buildIdentifier, BuildIdentifier comparisonBuildIdentifier, String comparisonName) { BuildImportSummary buildImportSummary = buildImportSummaries.get(buildIdentifier); if (buildImportSummary == null) { LOGGER.info("Build not exists yet, submitting new import with additional task for hi prio comparison calculation."); buildImportSummary = createBuildImportSummary(buildIdentifier); buildImportSummaries.put(buildIdentifier, buildImportSummary); submitBuildForImport(availableBuilds, buildIdentifier); Future<Future<BuildDiffInfo>> futureResult = submitSingleBuildComparisonAfterLastImport(buildIdentifier, comparisonBuildIdentifier, comparisonName); saveBuildImportSummaries(buildImportSummaries); return futureResult; } else { LOGGER.info("Build already exists, only triggering comparison dirextly, not waiting for any other build import to finish first."); CompletableFuture<Future<BuildDiffInfo>> submittedFutureComparison = new CompletableFuture<>(); submittedFutureComparison.complete( submitSingleBuildComparison(buildIdentifier, comparisonBuildIdentifier, comparisonName) ); return submittedFutureComparison; } }
Source:
<code>private Optional<Map<String, String>> findFailures(String errorOutput, int fails) { Map<String, String> result = new HashMap<>(); String[] lines = errorOutput.split("\\r?\\n"); for (String line : lines) { Matcher matcher = FAILURES.matcher(line); if (matcher.matches()) { result.put(matcher.group("name"), matcher.group("description")); } } <START> return Optional.of(result); <END> }</code><technical_language>return Optional.absent(), result is non-null. Unwrap Optional</technical_language>

Target:
private Map<String, String> findFailures(String errorOutput, int fails) { Map<String, String> result = new HashMap<>(); String[] lines = errorOutput.split("\\r?\\n"); for (String line : lines) { Matcher matcher = FAILURES.matcher(line); if (matcher.matches()) { result.put(matcher.group("name"), matcher.group("description")); } } return result; }
Source:
<code>public void freeAfterFilePersisted() throws Exception { URIStatus status = createAsyncFile(); <START> System.out.println(status); <END> IntegrationTestUtils.waitForPersist(sLocalAlluxioClusterResource, mUri); System.out.println("Finished waiting for persist"); sFileSystem.free(mUri); System.out.println("Freed file"); IntegrationTestUtils.waitForBlocksToBeFreed( sLocalAlluxioClusterResource.get().getWorkerProcess().getWorker(BlockWorker.class), status.getBlockIds().toArray(new Long[status.getBlockIds().size()])); status = sFileSystem.getStatus(mUri); Assert.assertEquals(0, status.getInMemoryPercentage()); FileOutStreamTestUtils.checkFileInAlluxio(sFileSystem, mUri, LEN); FileOutStreamTestUtils.checkFileInUnderStorage(sFileSystem, mUri, LEN); }</code><technical_language>debugging</technical_language>

Target:
public void freeAfterFilePersisted() throws Exception { URIStatus status = createAsyncFile(); IntegrationTestUtils.waitForPersist(sLocalAlluxioClusterResource, mUri); mFileSystem.free(mUri); IntegrationTestUtils.waitForBlocksToBeFreed( sLocalAlluxioClusterResource.get().getWorkerProcess().getWorker(BlockWorker.class), status.getBlockIds().toArray(new Long[status.getBlockIds().size()])); status = mFileSystem.getStatus(mUri); Assert.assertEquals(0, status.getInMemoryPercentage()); FileOutStreamTestUtils.checkFileInAlluxio(mFileSystem, mUri, LEN); FileOutStreamTestUtils.checkFileInUnderStorage(mFileSystem, mUri, LEN); }
Source:
<code>protected DependencyResolver getJarResolver() { if (dependencyResolver == null) { if (Boolean.getBoolean("robolectric.offline")) { String dependencyDir = System.getProperty("robolectric.dependency.dir", "."); dependencyResolver = new LocalDependencyResolver(new File(dependencyDir)); } else { File cacheDir = new File(new File(System.getProperty("java.io.tmpdir")), "robolectric"); DependencyResolver dependencyResolver = null; try { <START> dependencyResolver = (DependencyResolver) Class.forName("org.robolectric.internal.dependency.MavenDependencyResolver").newInstance(); <END> } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) { throw new RuntimeException("Error creating MavenDependencyResolver"); } if (cacheDir.exists() || cacheDir.mkdir()) { Logger.info("Dependency cache location: %s", cacheDir.getAbsolutePath()); this.dependencyResolver = new CachedDependencyResolver(dependencyResolver, cacheDir, 60 * 60 * 24 * 1000); } else { this.dependencyResolver = dependencyResolver; } } URL buildPathPropertiesUrl = getClass().getClassLoader().getResource("robolectric-deps.properties"); if (buildPathPropertiesUrl != null) { Logger.info("Using Robolectric classes from %s", buildPathPropertiesUrl.getPath()); FsFile propertiesFile = Fs.fileFromPath(buildPathPropertiesUrl.getFile()); try { dependencyResolver = new PropertiesDependencyResolver(propertiesFile, dependencyResolver); } catch (IOException e) { throw new RuntimeException("couldn't read " + buildPathPropertiesUrl, e); } } } return dependencyResolver; }</code><technical_language>cache result of this reflection call</technical_language>

Target:
protected DependencyResolver getJarResolver() { if (dependencyResolver == null) { if (Boolean.getBoolean("robolectric.offline")) { String dependencyDir = System.getProperty("robolectric.dependency.dir", "."); dependencyResolver = new LocalDependencyResolver(new File(dependencyDir)); } else { File cacheDir = new File(new File(System.getProperty("java.io.tmpdir")), "robolectric"); Class<?> mavenDependencyResolverClass = ReflectionHelpers.loadClass(RobolectricTestRunner.class.getClassLoader(), "org.robolectric.internal.dependency.MavenDependencyResolver"); DependencyResolver dependencyResolver = (DependencyResolver) ReflectionHelpers.callConstructor(mavenDependencyResolverClass); if (cacheDir.exists() || cacheDir.mkdir()) { Logger.info("Dependency cache location: %s", cacheDir.getAbsolutePath()); this.dependencyResolver = new CachedDependencyResolver(dependencyResolver, cacheDir, 60 * 60 * 24 * 1000); } else { this.dependencyResolver = dependencyResolver; } } URL buildPathPropertiesUrl = getClass().getClassLoader().getResource("robolectric-deps.properties"); if (buildPathPropertiesUrl != null) { Logger.info("Using Robolectric classes from %s", buildPathPropertiesUrl.getPath()); FsFile propertiesFile = Fs.fileFromPath(buildPathPropertiesUrl.getFile()); try { dependencyResolver = new PropertiesDependencyResolver(propertiesFile, dependencyResolver); } catch (IOException e) { throw new RuntimeException("couldn't read " + buildPathPropertiesUrl, e); } } } return dependencyResolver; }
Source:
<code><START> public boolean hasDownloads() { <END> return !getDownloadedPluginFilenames().isEmpty(); }</code><technical_language>public</technical_language>

Target:
boolean hasDownloads() { return !getDownloadedPluginFilenames().isEmpty(); }
Source:
<code>public static Map<String, String> createStructFromConnection(final StorageServerConnections connection, final StoragePool storagePool) { DefaultValueMap con = new DefaultValueMap(); con.put("id", connection.getid(), Guid.Empty.toString()); con.put("connection", connection.getconnection(), ""); con.put("tpgt", connection.getportal(), ""); con.put("port", connection.getport(), ""); con.put("iqn", connection.getiqn(), ""); con.put("user", connection.getuser_name(), ""); con.put("password", connection.getpassword(), ""); con.putIfNotEmpty("ifaceName", connection.getIface()); <START> con.putIfNotEmpty("netIfacename", connection.getNetIfacename()); <END> if (storagePool == null || Config.<Boolean> getValue(ConfigValues.AdvancedNFSOptionsEnabled, storagePool.getcompatibility_version().getValue())) { con.putIfNotEmpty("mnt_options", connection.getMountOptions()); con.putIfNotEmpty("vfs_type", connection.getVfsType()); if (connection.getNfsVersion() != null) { con.put("protocol_version", connection.getNfsVersion().getValue()); } con.putIfNotEmpty("timeout", connection.getNfsTimeo()); con.putIfNotEmpty("retrans", connection.getNfsRetrans()); } return con; }</code><technical_language>This is consistent other argument names. Please "netIfaceName" for parameter name</technical_language>

Target:
public static Map<String, String> createStructFromConnection(final StorageServerConnections connection, final StoragePool storagePool) { DefaultValueMap con = new DefaultValueMap(); con.put("id", connection.getid(), Guid.Empty.toString()); con.put("connection", connection.getconnection(), ""); con.putIfNotEmpty("tpgt", connection.getportal()); con.put("port", connection.getport(), ""); con.put("iqn", connection.getiqn(), ""); con.put("user", connection.getuser_name(), ""); con.put("password", connection.getpassword(), ""); con.putIfNotEmpty("ifaceName", connection.getIface()); con.putIfNotEmpty("netIfaceName", connection.getNetIfaceName()); if (storagePool == null || Config.<Boolean> getValue(ConfigValues.AdvancedNFSOptionsEnabled, storagePool.getcompatibility_version().getValue())) { con.putIfNotEmpty("mnt_options", connection.getMountOptions()); con.putIfNotEmpty("vfs_type", connection.getVfsType()); if (connection.getNfsVersion() != null) { con.put("protocol_version", connection.getNfsVersion().getValue()); } con.putIfNotEmpty("timeout", connection.getNfsTimeo()); con.putIfNotEmpty("retrans", connection.getNfsRetrans()); } return con; }
Source:
<code>void drainRegular(Subscriber<? super T> a) { int missed = 1; final Queue<T> q = queue; for (;;) { long r = requested.get(); long e = 0L; while (r != e) { boolean d = done; T t = q.poll(); boolean empty = t == null; if (checkTerminated(d, empty, a, q)) { return; } if (empty) { break; } a.onNext(t); e++; } if (r == e) { <START> if (checkTerminated(done, q.isEmpty(), a, q)) { <END> return; } } if (e != 0 && r != Long.MAX_VALUE) { requested.addAndGet(-e); } missed = wip.addAndGet(-missed); if (missed == 0) { break; } } }</code><technical_language>nit: nested ifs collapsed &&</technical_language>

Target:
void drainRegular(Subscriber<? super T> a) { int missed = 1; final Queue<T> q = queue; for (;;) { long r = requested.get(); long e = 0L; while (r != e) { boolean d = done; T t = q.poll(); boolean empty = t == null; if (checkTerminated(d, empty, a, q)) { return; } if (empty) { break; } a.onNext(t); e++; } if (r == e && checkTerminated(done, q.isEmpty(), a, q)) { return; } if (e != 0 && r != Long.MAX_VALUE) { requested.addAndGet(-e); } missed = wip.addAndGet(-missed); if (missed == 0) { break; } } }
Source:
<code><START> public DatabaseChunkedReaderMetrics(String source, String key) { <END> super(CLASS_NAME, key); _source = source; _readerQueryExecutionTimeMs = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, key, QUERY_EXECUTION_TIME, Histogram.class); _readerQueriesExecutedRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, key, QUERY_EXECUTION_RATE, Meter.class); _readerErrorRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, key, ERROR_RATE, Meter.class); _readerSkippedBadMessagesRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, key, SKIPPED_BAD_MESSAGES_RATE, Meter.class); _sourceQueryExecutionTimeMs = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, source, QUERY_EXECUTION_TIME, Histogram.class); _sourceQueriesExecutedRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, source, QUERY_EXECUTION_RATE, Meter.class); _sourceErrorRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, source, ERROR_RATE, Meter.class); _sourceSkippedBadMessagesRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, source, SKIPPED_BAD_MESSAGES_RATE, Meter.class); }</code><technical_language>doc source key supposed be</technical_language>

Target:
public DatabaseChunkedReaderMetrics(String source, String key) { super(CLASS_NAME, key); _source = source; _readerQueryExecutionDurationMs = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, key, QUERY_EXECUTION_DURATION, Histogram.class); _readerQueryExecutionRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, key, QUERY_EXECUTION_RATE, Meter.class); _readerErrorRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, key, ERROR_RATE, Meter.class); _readerSkippedBadMessagesRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, key, SKIPPED_BAD_MESSAGES_RATE, Meter.class); _sourceQueryExecutionDurationMs = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, source, QUERY_EXECUTION_DURATION, Histogram.class); _sourceQueryExecutionRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, source, QUERY_EXECUTION_RATE, Meter.class); _sourceErrorRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, source, ERROR_RATE, Meter.class); _sourceSkippedBadMessagesRate = DYNAMIC_METRICS_MANAGER.registerMetric(CLASS_NAME, source, SKIPPED_BAD_MESSAGES_RATE, Meter.class); }
Source:
<code>public Structure getReply() { <START> return Structure.objectFor(GSTPROMISE_API.gst_promise_get_reply(this), false, false); <END> }</code><technical_language>suggestion return Structure.objectFor(GSTPROMISE_API.ptr_gst_promise_get_reply(this), false, false); Thanks</technical_language>

Target:
public Structure getReply() { return Structure.objectFor(GSTPROMISE_API.ptr_gst_promise_get_reply(this), false, false); }