auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public BackupResponse backupRemotely(Collection<XSiteBackup> backups, XSiteReplicateCommand command) { if (trace) log.tracef("About to send to backups %s, command %s", backups, command); boolean rsvp = isRsvpCommand(command); Map<XSiteBackup, CompletableFuture<ValidResponse>> backupCalls = new HashMap<>(backups.size()); for (XSiteBackup xsb : backups) { Address recipient = JGroupsAddressCache.fromJGroupsAddress(new SiteMaster(xsb.getSiteName())); long requestId = requests.newRequestId(); logRequest(requestId, command, recipient); SingleSiteRequest<ValidResponse> request = new SingleSiteRequest<>(SingleResponseCollector.validOnly(), requestId, requests, xsb.getSiteName()); addRequest(request); backupCalls.put(xsb, request); DeliverOrder order = xsb.isSync() ? DeliverOrder.NONE : DeliverOrder.PER_SENDER; long timeout = xsb.getTimeout(); try { Message message = new Message(toJGroupsAddress(recipient)); marshallRequest(message, command, request.getRequestId()); setMessageFlags(message, order, rsvp, false); <START> remoteExecutor.submit(() -> { <END> try { send(message); } catch (Throwable t) { request.completeExceptionally(t); } }); if (timeout > 0) { request.setTimeout(timeoutExecutor, timeout, TimeUnit.MILLISECONDS); } } catch (Throwable t) { request.completeExceptionally(t); } } return new JGroupsBackupResponse(backupCalls, timeService); }</code><technical_language>1 sending order is important. need a single thread send request risk reordered</technical_language>

Target:
public BackupResponse backupRemotely(Collection<XSiteBackup> backups, XSiteReplicateCommand command) { if (trace) log.tracef("About to send to backups %s, command %s", backups, command); boolean rsvp = isRsvpCommand(command); Map<XSiteBackup, CompletableFuture<ValidResponse>> backupCalls = new HashMap<>(backups.size()); for (XSiteBackup xsb : backups) { Address recipient = JGroupsAddressCache.fromJGroupsAddress(new SiteMaster(xsb.getSiteName())); long requestId = requests.newRequestId(); logRequest(requestId, command, recipient); SingleSiteRequest<ValidResponse> request = new SingleSiteRequest<>(SingleResponseCollector.validOnly(), requestId, requests, xsb.getSiteName()); addRequest(request); backupCalls.put(xsb, request); DeliverOrder order = xsb.isSync() ? DeliverOrder.NONE : DeliverOrder.PER_SENDER; long timeout = xsb.getTimeout(); try { Message message = new Message(toJGroupsAddress(recipient)); marshallRequest(message, command, request.getRequestId()); setMessageFlags(message, order, rsvp, false); Callable<CompletionStage<Void>> sendAction = () -> { try { send(message); } catch (Throwable t) { request.completeExceptionally(t); } return CompletableFutures.completedNull(); }; if (order.preserveOrder()) { backupSequencer.orderOnKey(xsb.getSiteName(), sendAction); } else { remoteExecutor.submit(sendAction); } if (timeout > 0) { request.setTimeout(timeoutExecutor, timeout, TimeUnit.MILLISECONDS); } } catch (Throwable t) { request.completeExceptionally(t); } } return new JGroupsBackupResponse(backupCalls, timeService); }
Source:
<code>private void checkPlayerAlive() { if (!game.getCurrentLevel().getPlayer().isAlive()) { <START> Logger.log("--------------------PLAYER RESTARTED THE GAME--------------------"); <END> game.restart(); renderStatic(); } }</code><technical_language>add a function logger adding "-" signs automatically in right amount log line length? <feature</technical_language>

Target:
private void checkPlayerAlive() { if (!game.getCurrentLevel().getPlayer().isAlive()) { Logger.log("--------------------PLAYER RESTARTED THE GAME"); game.restart(); renderStatic(); } }
Source:
<code><START> public void testJavaSizeString() { <END> assertEquals(ByteSizeStrings.java().makeSizeString(0), "0"); assertEquals(ByteSizeStrings.java().makeSizeString(999), "999"); assertEquals(ByteSizeStrings.java().makeSizeString(1234), "1234"); assertEquals(ByteSizeStrings.java().makeSizeString(2345), "2345"); assertEquals(ByteSizeStrings.java().makeSizeString(4567), "4k"); assertEquals(ByteSizeStrings.java().makeSizeString(65535), "64k"); assertEquals(ByteSizeStrings.java().makeSizeString(23456789), "22m"); assertEquals(ByteSizeStrings.java().makeSizeString(23456789012L), "22g"); assertEquals(ByteSizeStrings.java().makeSizeString(23456789012345L), "21846g"); }</code><technical_language>good testing! test 3456 (i.e. exceeded kb > 2 threshold)</technical_language>

Target:
public void testJavaSizeString() { assertEquals(ByteSizeStrings.java().makeSizeString(-1), "-1"); assertEquals(ByteSizeStrings.java().makeSizeString(0), "0"); assertEquals(ByteSizeStrings.java().makeSizeString(999), "999"); assertEquals(ByteSizeStrings.java().makeSizeString(1024), "1024"); assertEquals(ByteSizeStrings.java().makeSizeString(1234), "1234"); assertEquals(ByteSizeStrings.java().makeSizeString(2345), "2345"); assertEquals(ByteSizeStrings.java().makeSizeString(4096), "4096"); assertEquals(ByteSizeStrings.java().makeSizeString(4567), "4567"); assertEquals(ByteSizeStrings.java().makeSizeString(6789), "6789"); assertEquals(ByteSizeStrings.java().makeSizeString(65535), "64k"); assertEquals(ByteSizeStrings.java().makeSizeString(23456789L), "22m"); assertEquals(ByteSizeStrings.java().makeSizeString(23456789012L), "22g"); assertEquals(ByteSizeStrings.java().makeSizeString(23456789012345L), "21000g"); assertEquals(ByteSizeStrings.java().makeSizeString(Long.MAX_VALUE), "8388608000g"); }
Source:
<code>public void beforeMethod() { <START> HelixDataAccessor dataAccessor = _manager.getHelixDataAccessor(); <END> PropertyKey propertyKey = dataAccessor.keyBuilder() .customizedStates(_participants[0].getInstanceName(), CUSTOMIZE_STATE_NAME); dataAccessor.removeProperty(propertyKey); CustomizedState customizedStates = dataAccessor.getProperty(propertyKey); Assert.assertNull(customizedStates); }</code><technical_language>This beforeClass, right</technical_language>

Target:
public void beforeMethod() { _dataAccessor.removeProperty(_propertyKey); CustomizedState customizedStates = _dataAccessor.getProperty(_propertyKey); Assert.assertNull(customizedStates); }
Source:
<code>protected final void verifyDataProviderType(Class<?> dataProviderType) { Class<?> supportedDataProviderType = getSupportedDataProviderType(); if (!supportedDataProviderType.isAssignableFrom(dataProviderType)) { final String message = String.format( "%s only supports '%s' or it's subclasses, but was given a '%s'." + "%nUse either 'getLazyDataView()', 'getListDataView()'" <START> + " or getDataView() according to the used data type.", <END> this.getClass().getSimpleName(), supportedDataProviderType.getSimpleName(), dataProviderType.getSuperclass().getSimpleName()); throw new IllegalStateException(message); } }</code><technical_language>suggestion + " 'getDataView()' data type.",</technical_language>

Target:
protected final void verifyDataProviderType(Class<?> dataProviderType) { Class<?> supportedDataProviderType = getSupportedDataProviderType(); if (!supportedDataProviderType.isAssignableFrom(dataProviderType)) { final String message = String.format( "%s only supports '%s' or it's subclasses, but was given a '%s'." + "%nUse either 'getLazyDataView()', 'getListDataView()'" + " or 'getDataView()' according to the used data type.", this.getClass().getSimpleName(), supportedDataProviderType.getSimpleName(), dataProviderType.getSuperclass().getSimpleName()); throw new IllegalStateException(message); } }
Source:
<code>public void initialize(IManagedForm form) { super.initialize(form); fwkContentProvider.onContentReady(new Success<List<OSGiFramework>,Void>() { @Override public Promise<Void> call(Promise<List<OSGiFramework>> resolved) throws Exception { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { refreshFromModel(); } }); <START> return Promises.resolved(null); <END> } }); frameworkViewer.setInput(model.getWorkspace()); }</code><technical_language>return null here</technical_language>

Target:
public void initialize(IManagedForm form) { super.initialize(form); fwkContentProvider.onContentReady(new Success<List<OSGiFramework>,Void>() { @Override public Promise<Void> call(Promise<List<OSGiFramework>> resolved) throws Exception { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { refreshFromModel(); } }); return null; } }); frameworkViewer.setInput(model.getWorkspace()); }
Source:
<code>public void testNoTimestampInMessage() { RadixTreeParser oldRadixParser = RadixTreeSyslogParser.getRadixParser(); RadixTreeParser radixParser = new RadixTreeParser(); radixParser.teach(GrokParserStageSequenceBuilder.parseGrok("%{STRING:message}").toArray(new ParserStage[0])); RadixTreeSyslogParser.setRadixParser(radixParser); String syslogMessage = "%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet5/9 " + "(75), with switch.fqdn.com GigabitEthernet2/4/21 (2)"; Date now = new Date(); Event event = parseSyslog("testNoTimestampInMessage", radixConfig, syslogMessage, now); RadixTreeSyslogParser.setRadixParser(oldRadixParser); <START> <END> Date eventTime = event.getTime(); assertNotNull(eventTime); assertEquals(eventTime, now); }</code><technical_language>arguments flipped expected is now, actual is eventTime. assertNotNull is redundant, if now.equals(eventTime) eventTime null</technical_language>

Target:
public void testNoTimestampInMessage() { RadixTreeParser oldRadixParser = RadixTreeSyslogParser.getRadixParser(); RadixTreeParser radixParser = new RadixTreeParser(); radixParser.teach(GrokParserStageSequenceBuilder.parseGrok("%{STRING:message}").toArray(new ParserStage[0])); RadixTreeSyslogParser.setRadixParser(radixParser); String syslogMessage = "%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet5/9 " + "(75), with switch.fqdn.com GigabitEthernet2/4/21 (2)"; Date now = new Date(); Event event = parseSyslog("testNoTimestampInMessage", radixConfig, syslogMessage, now); RadixTreeSyslogParser.setRadixParser(oldRadixParser); Date eventTime = event.getTime(); assertEquals(now, eventTime); }
Source:
<code>public static Method normalizedValueOf(final String method) { <START> return valueOf(Objects.requireNonNull(method, "method").toUpperCase(Locale.ROOT)); <END> }</code><technical_language>@garydgregory Please Args.notNull for consistency rest of code base</technical_language>

Target:
public static Method normalizedValueOf(final String method) { return valueOf(Args.notNull(method, "method").toUpperCase(Locale.ROOT)); }
Source:
<code>private AdhocQueryResponse respondingGatewayCrossGatewayQuery(AdhocQueryRequest request, AssertionType assertion, NhinTargetCommunitiesType targets) { AdhocQueryResponse response = null; if (targets == null) { targets = new ObjectFactory().createNhinTargetCommunitiesType(); } if (StringUtils.isBlank(targets.getUseSpecVersion())) { targets.setUseSpecVersion("3.0"); } response = outboundDocQuery.respondingGatewayCrossGatewayQuery(request, assertion, targets); <START> return response; <END> }</code><technical_language>remove: declare-response, useless-assign return object method-call</technical_language>

Target:
private AdhocQueryResponse respondingGatewayCrossGatewayQuery(AdhocQueryRequest request, AssertionType assertion, NhinTargetCommunitiesType targets) { if (targets == null) { targets = new ObjectFactory().createNhinTargetCommunitiesType(); } if (StringUtils.isBlank(targets.getUseSpecVersion())) { targets.setUseSpecVersion("3.0"); } return outboundDocQuery.respondingGatewayCrossGatewayQuery(request, assertion, targets); }
Source:
<code>public AlarmButtonViewModel(final AlarmCounter alarmCounter, String buttonLabel) { super(buttonLabel); flash = new FlashingButton(this, ALARM_COLOR); flash.setDefaultColour(DEFOCUSSED); alarmCounter.addPropertyChangeListener("alarmCount", arg0 -> { alarmCount = alarmCounter.getCount(); if (!active) { alarmSeen = false; } update(); updateFlashing(); } <START> ); <END> update(); }</code><technical_language>Confusing indentation, delete other bracket</technical_language>

Target:
public AlarmButtonViewModel(final AlarmCounter alarmCounter, String buttonLabel) { super(buttonLabel); flash = new FlashingButton(this, ALARM_COLOR); flash.setDefaultColour(DEFOCUSSED); alarmCounter.addPropertyChangeListener("alarmCount", ignored -> { alarmCount = alarmCounter.getCount(); if (!active) { alarmSeen = false; } update(); updateFlashing(); }); update(); }
Source:
<code>private Set<IType> getRelatedTypes() { Set<IMethod> methods= getMethodsToRename(); Set<IType> result= new HashSet<>(methods.size()); for (IMethod <START> iMethod : <END> methods) { result.add(iMethod.getDeclaringType()); } return result; }</code><technical_language>rename method</technical_language>

Target:
private Set<IType> getRelatedTypes() { Set<IMethod> methods= getMethodsToRename(); Set<IType> result= new HashSet<>(methods.size()); for (IMethod method : methods) { result.add(method.getDeclaringType()); } return result; }
Source:
<code>public void testComma() throws Exception { checkConfig.addAttribute("option", "EOL"); checkConfig.addAttribute("tokens", "COMMA"); final String[] expected = { "39:17: " + getCheckMessage(MSG_LINE_PREVIOUS, ","), }; <START> verify(checkConfig, getPath("InputSeparatorWrapAfter3904.java"), expected); <END> }</code><technical_language>Separate file for test. Rename avoid misunderstanding. File name short information purpose</technical_language>

Target:
public void testComma() throws Exception { checkConfig.addAttribute("option", "EOL"); checkConfig.addAttribute("tokens", "COMMA"); final String[] expected = { "39:17: " + getCheckMessage(MSG_LINE_PREVIOUS, ","), }; verify(checkConfig, getPath("InputSeparatorWrapForTestComma.java"), expected); }
Source:
<code>protected void addFileProperties(FileSetProperties.Builder propertiesBuilder) { propertiesBuilder <START> .setInputFormat(AvroKeyInputFormat.class) <END> .setOutputFormat(TextOutputFormat.class) .setEnableExploreOnCreate(true) .setExploreFormat("text") .setExploreSchema("text string"); }</code><technical_language>TextInputFormat</technical_language>

Target:
protected void addFileProperties(FileSetProperties.Builder propertiesBuilder) { propertiesBuilder .setInputFormat(TextInputFormat.class) .setOutputFormat(TextOutputFormat.class) .setEnableExploreOnCreate(true) .setExploreFormat("text") .setExploreSchema("text string"); }
Source:
<code>public static Object percent3( ValueMetaInterface metaA, Object dataA, ValueMetaInterface metaB, Object dataB ) throws KettleValueException { if ( dataA == null || dataB == null ) { return null; } switch ( metaA.getType() ) { case ValueMetaInterface.TYPE_NUMBER: return new Double( metaA.getNumber( dataA ).doubleValue() + divideDoubles( multiplyDoubles( metaA.getNumber( dataA ), metaB.getNumber( dataB ) ), 100.0D ) ); case ValueMetaInterface.TYPE_INTEGER: return new Long( metaA.getInteger( dataA ).longValue() + divideLongs( multiplyLongs( metaA.getInteger( dataA ), metaB.getInteger( dataB ) ), 100L ) ); case ValueMetaInterface.TYPE_BIGNUMBER: return metaA.getBigNumber( dataA ).add( divideBigDecimals( multiplyBigDecimals( <START> metaB.getBigNumber( dataB ), metaA.getBigNumber( dataA ), null ), new BigDecimal( 100 ) ) ); <END> default: throw new KettleValueException( "The 'A+B%' function only works on numeric data" ); } }</code><technical_language>Need put this - change API</technical_language>

Target:
public static Object percent3( ValueMetaInterface metaA, Object dataA, ValueMetaInterface metaB, Object dataB ) throws KettleValueException { if ( dataA == null || dataB == null ) { return null; } switch ( metaA.getType() ) { case ValueMetaInterface.TYPE_NUMBER: return new Double( metaA.getNumber( dataA ).doubleValue() + divideDoubles( multiplyDoubles( metaA.getNumber( dataA ), metaB.getNumber( dataB ) ), 100.0D ) ); case ValueMetaInterface.TYPE_INTEGER: return new Long( metaA.getInteger( dataA ).longValue() + divideLongs( multiplyLongs( metaA.getInteger( dataA ), metaB.getInteger( dataB ) ), 100L ) ); case ValueMetaInterface.TYPE_BIGNUMBER: return metaA.getBigNumber( dataA ).add( divideBigDecimals( multiplyBigDecimals( metaB.getBigNumber( dataB ), metaA.getBigNumber( dataA ), null ), new BigDecimal( 100 ), (MathContext) null ) ); default: throw new KettleValueException( "The 'A+B%' function only works on numeric data" ); } }
Source:
<code>public Optional<DyeableData> from(DataHolder dataHolder) { if (supports(dataHolder)) { if (dataHolder instanceof EntitySheep) { return Optional.of(new SpongeDyeableData((DyeColor) (Object) ((EntitySheep) dataHolder).getFleeceColor())); } else if (dataHolder instanceof EntityWolf) { return Optional.of(new SpongeDyeableData((DyeColor) (Object) ((EntityWolf) dataHolder).getCollarColor())); } else if (dataHolder instanceof ItemStack) { if(((ItemStack) dataHolder).getItem().equals(Items.DYE)) { return Optional.of(new SpongeDyeableData((DyeColor) (Object) EnumDyeColor.byDyeDamage(((ItemStack) dataHolder).getItemDamage()))); } else { return Optional.of(new SpongeDyeableData((DyeColor) (Object) EnumDyeColor.byMetadata(((ItemStack) dataHolder).getItemDamage()))); } } else if (dataHolder instanceof TileEntityShulkerBox) { <START> return Optional.ofNullable(((IMixinTileEntityShulkerBox) dataHolder).getColor()).map(enumType -> (DyeColor) (Object) enumType).map <END> (SpongeDyeableData::new); } } return Optional.empty(); }</code><technical_language>this separately lined for legibility</technical_language>

Target:
public Optional<DyeableData> from(DataHolder dataHolder) { if (supports(dataHolder)) { if (dataHolder instanceof EntitySheep) { return Optional.of(new SpongeDyeableData((DyeColor) (Object) ((EntitySheep) dataHolder).getFleeceColor())); } else if (dataHolder instanceof EntityWolf) { return Optional.of(new SpongeDyeableData((DyeColor) (Object) ((EntityWolf) dataHolder).getCollarColor())); } else if (dataHolder instanceof ItemStack) { if(((ItemStack) dataHolder).getItem().equals(Items.DYE)) { return Optional.of(new SpongeDyeableData((DyeColor) (Object) EnumDyeColor.byDyeDamage(((ItemStack) dataHolder).getItemDamage()))); } else { return Optional.of(new SpongeDyeableData((DyeColor) (Object) EnumDyeColor.byMetadata(((ItemStack) dataHolder).getItemDamage()))); } } } return Optional.empty(); }
Source:
<code>public void testAttrToSnakeAndLowerCase() { <START> JmxCollector.Receiver rc = mock(JmxCollector.Receiver.class); <END> when(rc.toSnakeAndLowerCase(anyString())).thenCallRealMethod(); String snakeAndLowerString = rc.toSnakeAndLowerCase(input); assertEquals(expected, snakeAndLowerString); }</code><technical_language>function static</technical_language>

Target:
public void testAttrToSnakeAndLowerCase() { String snakeAndLowerString = JmxCollector.toSnakeAndLowerCase(input); assertEquals(expected, snakeAndLowerString); }
Source:
<code>public boolean is64bit() { <START> return "x64".equals(arch); <END> }</code><technical_language>constant</technical_language>

Target:
public boolean is64bit() { return IS_64_BIT.equals(arch); }
Source:
<code><START> StandardRealmObjectSchema getSchemaForClass(String className) { <END> throw new UnsupportedOperationException(); }</code><technical_language>This return RealmObjectSchema</technical_language>

Target:
OsRealmObjectSchema getSchemaForClass(String className) { throw new UnsupportedOperationException(); }
Source:
<code><START> public void endSuccessfully() { <END> setQcowCompatForQcowImage(); if (getParameters().getImportAsTemplate()) { Guid newTemplateId = createTemplate(); if (newTemplateId != null) { attachDiskToTemplate(newTemplateId); } } updateDiskStatus(ImageStatus.OK); setSucceeded(true); }</code><technical_language>calling super? Is intentional call it? If - why</technical_language>

Target:
public void endSuccessfully() { super.endSuccessfully(); setQcowCompatForQcowImage(); if (getParameters().getImportAsTemplate()) { Guid newTemplateId = createTemplate(); if (newTemplateId != null) { attachDiskToTemplate(newTemplateId); } } updateDiskStatus(ImageStatus.OK); setSucceeded(true); }
Source:
<code>private void cacheDistribution(GridClient client, CacheArguments cacheArgs) throws GridClientException { <START> <END> CacheDistributionTaskArg taskArg = new CacheDistributionTaskArg(cacheArgs.caches()); UUID nodeId = cacheArgs.nodeId() == null ? BROADCAST_UUID : cacheArgs.nodeId(); taskArg.setUserAttributes(cacheArgs.getUserAttributes()); CacheDistributionTaskResult res = executeTaskByNameOnNode(client, CacheDistributionTask.class.getName(), taskArg, nodeId); res.print(System.out); }</code><technical_language>needed empty line</technical_language>

Target:
private void cacheDistribution(GridClient client, CacheArguments cacheArgs) throws GridClientException { CacheDistributionTaskArg taskArg = new CacheDistributionTaskArg(cacheArgs.caches(), cacheArgs.getUserAttributes()); UUID nodeId = cacheArgs.nodeId() == null ? BROADCAST_UUID : cacheArgs.nodeId(); CacheDistributionTaskResult res = executeTaskByNameOnNode(client, CacheDistributionTask.class.getName(), taskArg, nodeId); res.print(System.out); }
Source:
<code>public void doPolling(Guid cmdId, List<Guid> childCmdIds) { boolean anyFailed = false; for (Guid childCmdId : childCmdIds) { CommandStatus commandStatus = CommandCoordinatorUtil.getCommandStatus(childCmdId); switch (commandStatus) { case ACTIVE: log.info("Waiting on CloneCinderDisksCommandCallback child commands to complete"); return; case FAILED: case FAILED_RESTARTED: case UNKNOWN: anyFailed = true; <START> log.error("Unknown command status."); <END> break; default: log.error("Invalid command status: '{}", commandStatus); break; } } T command = getCommand(cmdId); command.getParameters().setTaskGroupSuccess(!anyFailed); command.setCommandStatus(anyFailed ? CommandStatus.FAILED : CommandStatus.SUCCEEDED); log.info("All CloneCinderDisksCommandCallback commands have completed, status '{}'", command.getCommandStatus()); }</code><technical_language>is unknown, failed failed restart also. simply print commandStatus</technical_language>

Target:
public void doPolling(Guid cmdId, List<Guid> childCmdIds) { boolean anyFailed = false; for (Guid childCmdId : childCmdIds) { CommandStatus commandStatus = CommandCoordinatorUtil.getCommandStatus(childCmdId); switch (commandStatus) { case ACTIVE: log.info("Waiting on CloneCinderDisksCommandCallback child commands to complete"); return; case FAILED: case FAILED_RESTARTED: case UNKNOWN: anyFailed = true; default: log.error("Invalid command status: '{}", commandStatus); break; } } T command = getCommand(cmdId); command.getParameters().setTaskGroupSuccess(!anyFailed); command.setCommandStatus(anyFailed ? CommandStatus.FAILED : CommandStatus.SUCCEEDED); log.info("All CloneCinderDisksCommandCallback commands have completed, status '{}'", command.getCommandStatus()); }
Source:
<code>public void assertBinEqual(Key key, Record record, Bin bin) { assertRecordFound(key, record); Object received = record.getValue(bin.name); Object expected = bin.value.getObject(); if (received == null || ! received.equals(expected)) { <START> throw new IllegalArgumentException("Data mismatch: Expected " + expected + ". Received " + received); <END> } }</code><technical_language>asserts</technical_language>

Target:
public void assertBinEqual(Key key, Record record, Bin bin) { assertRecordFound(key, record); Object received = record.getValue(bin.name); Object expected = bin.value.getObject(); assertThat(received).isEqualTo(expected); }
Source:
<code>public String type() { if (ctx == null) return null; <START> switch (ctx.type()) { <END> case ODBC_CLIENT: return "ODBC"; case JDBC_CLIENT: return "JDBC"; case THIN_CLIENT: return "THIN"; default: return "unknown"; } }</code><technical_language>I check class instead of byte. Byte is error-prone. replaced enum (but IMO class check is better)</technical_language>

Target:
public String type() { if (ctx == null) return null; if (ctx instanceof OdbcConnectionContext) return "ODBC"; else if (ctx instanceof JdbcConnectionContext) return "JDBC"; else if (ctx instanceof ClientConnectionContext) return "THIN"; return "unknown"; }
Source:
<code>public void handleDownloadProgressMenuItem(Menu menu) { downloadsMenuItem = menu.findItem(R.id.menu_item_download_progress); final View progressView = downloadsMenuItem.getActionView(); final ProgressWheel progressWheel = (ProgressWheel) progressView.findViewById(R.id.progress_wheel); downloadsMenuItem.setVisible(downloadsMenuItem.isVisible()); progressWheel.setProgress(progressWheel.getProgress()); progressView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { environment.getRouter().showDownloads(getActivity()); } }); if (updateDownloadProgressRunnable == null) { updateDownloadProgressRunnable = new Runnable() { @Override public void run() { <START> logger.debug("KHALID:: updateDownloadProgressRunnable RUNNING"); <END> if (!NetworkUtil.isConnected(getContext()) || !environment.getDatabase().isAnyVideoDownloading(null)) { downloadsMenuItem.setVisible(false); } else { downloadsMenuItem.setVisible(true); environment.getStorage().getAverageDownloadProgress( new DataCallback<Integer>() { @Override public void onResult(Integer result) { int progressPercent = result; if (progressPercent >= 0 && progressPercent <= 100) { progressWheel.setProgressPercent(progressPercent); } } @Override public void onFail(Exception ex) { logger.error(ex); } }); } handler.postDelayed(this, DateUtils.SECOND_IN_MILLIS); } }; updateDownloadProgressRunnable.run(); } }</code><technical_language>logger **KHALID** in name</technical_language>

Target:
public void handleDownloadProgressMenuItem(Menu menu) { downloadsMenuItem = menu.findItem(R.id.menu_item_download_progress); final View progressView = downloadsMenuItem.getActionView(); final ProgressWheel progressWheel = (ProgressWheel) progressView.findViewById(R.id.progress_wheel); downloadsMenuItem.setVisible(downloadsMenuItem.isVisible()); progressWheel.setProgress(progressWheel.getProgress()); progressView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { environment.getRouter().showDownloads(getActivity()); } }); if (updateDownloadProgressRunnable == null) { updateDownloadProgressRunnable = new Runnable() { @Override public void run() { if (!NetworkUtil.isConnected(getContext()) || !environment.getDatabase().isAnyVideoDownloading(null)) { downloadsMenuItem.setVisible(false); } else { downloadsMenuItem.setVisible(true); environment.getStorage().getAverageDownloadProgress( new DataCallback<Integer>() { @Override public void onResult(Integer result) { int progressPercent = result; if (progressPercent >= 0 && progressPercent <= 100) { progressWheel.setProgressPercent(progressPercent); } } @Override public void onFail(Exception ex) { logger.error(ex); } }); } handler.postDelayed(this, DateUtils.SECOND_IN_MILLIS); } }; updateDownloadProgressRunnable.run(); } }
Source:
<code>private InputRow getInputRowFromRow(final Row row, final List<String> dimensions) { return new InputRow() { @Override public List<String> getDimensions() { return dimensions; } @Override public long getTimestampFromEpoch() { return row.getTimestampFromEpoch(); } @Override public DateTime getTimestamp() { return row.getTimestamp(); } @Override public List<String> getDimension(String dimension) { return row.getDimension(dimension); } @Override public Object getRaw(String dimension) { return row.getRaw(dimension); } @Override <START> public Float getFloatMetric(String metric) <END> { return row.getFloatMetric(metric); } @Override public Long getLongMetric(String metric) { return row.getLongMetric(metric); } @Override public Double getDoubleMetric(String metric) { return row.getDoubleMetric(metric); } @Override public int compareTo(Row o) { return row.compareTo(o); } }; }</code><technical_language>Please add @Nullable (same below)</technical_language>

Target:
private InputRow getInputRowFromRow(final Row row, final List<String> dimensions) { return new InputRow() { @Override public List<String> getDimensions() { return dimensions; } @Override public long getTimestampFromEpoch() { return row.getTimestampFromEpoch(); } @Override public DateTime getTimestamp() { return row.getTimestamp(); } @Override public List<String> getDimension(String dimension) { return row.getDimension(dimension); } @Override @Nullable public Object getRaw(String dimension) { return row.getRaw(dimension); } @Override public Number getMetric(String metric) { return row.getMetric(metric); } @Override public int compareTo(Row o) { return row.compareTo(o); } }; }
Source:
<code>private boolean hasAnyImportInCurrentGroup(String currentGroup) { boolean result = false; for (ImportDetails currentImport : importToGroupList) { if (currentGroup.equals(currentImport.getImportGroup())) { <START> result = true; <END> } } return result; }</code><technical_language>if result, break out of loop</technical_language>

Target:
private boolean hasAnyImportInCurrentGroup(String currentGroup) { boolean result = false; for (ImportDetails currentImport : importToGroupList) { if (currentGroup.equals(currentImport.getImportGroup())) { result = true; break; } } return result; }
Source:
<code>public boolean initialize(ServiceProviderConfiguration configuration, PlatformConfiguration platformConfiguration) { <START> LOGGER.info("Initializing LeaseServiceProvider"); <END> leaseDuration = new LeaseDurationImpl(Duration.ofMillis(getLeaseLength(configuration))); TimeSource timeSource = TimeSourceProvider.getTimeSource(); proxyClientConnectionCloser = new ProxyClientConnectionCloser(); leaseState = new LeaseState(timeSource, proxyClientConnectionCloser); leaseMonitorThread = new LeaseMonitorThread(timeSource, leaseState); leaseMonitorThread.start(); LOGGER.info("LeaseServiceProvider initialized"); return true; }</code><technical_language>extraneous logging in this module</technical_language>

Target:
public boolean initialize(ServiceProviderConfiguration configuration, PlatformConfiguration platformConfiguration) { LOGGER.info("Initializing LeaseServiceProvider"); leaseConfiguration = configuration instanceof LeaseConfiguration ? (LeaseConfiguration) configuration: new LeaseConfigurationImpl(LeaseConstants.DEFAULT_LEASE_LENGTH); TimeSource timeSource = TimeSourceProvider.getTimeSource(); proxyClientConnectionCloser = new ProxyClientConnectionCloser(); leaseState = new LeaseState(timeSource, proxyClientConnectionCloser); leaseMonitorThread = new LeaseMonitorThread(timeSource, leaseState); leaseMonitorThread.start(); return true; }
Source:
<code>public void testDeleteClientDeleteMutationPlan() throws Exception { String tableName = generateUniqueName(); String indexName = generateUniqueName(); String tagValue = "customer-delete"; String delete = "DELETE FROM " + tableName + " WHERE v1 = 'foo'"; Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); props.setProperty(ConnectionQueryServices.SOURCE_OPERATION_ATTRIB, tagValue); createAndUpsertTable(tableName, indexName, props); <START> verifyDeletePlan(delete, "ClientSelectDeleteMutationPlan", props); <END> executeDelete(delete, props, 1); String startRowKeyForBaseTable = "1"; String startRowKeyForIndexTable = "foo"; checkTagPresentInDeleteMarker(tableName, startRowKeyForBaseTable, true, tagValue); checkTagPresentInDeleteMarker(indexName, startRowKeyForIndexTable, false, null); }</code><technical_language>hardcode string, classname</technical_language>

Target:
public void testDeleteClientDeleteMutationPlan() throws Exception { String tableName = generateUniqueName(); String indexName = generateUniqueName(); String tagValue = "customer-delete"; String delete = "DELETE FROM " + tableName + " WHERE v1 = 'foo'"; Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); props.setProperty(ConnectionQueryServices.SOURCE_OPERATION_ATTRIB, tagValue); createAndUpsertTable(tableName, indexName, props); verifyDeletePlan(delete, DeleteCompiler.ClientSelectDeleteMutationPlan.class, props); executeDelete(delete, props, 1); String startRowKeyForBaseTable = "1"; String startRowKeyForIndexTable = "foo"; checkTagPresentInDeleteMarker(tableName, startRowKeyForBaseTable, true, tagValue); checkTagPresentInDeleteMarker(indexName, startRowKeyForIndexTable, false, null); }
Source:
<code>protected void syncRefresh() { final Runnable pending; synchronized (this) { pending = refreshRunnable; } if (pending != null) { Control control = getControl(); <START> Display display = (control == null) ? null : control.getDisplay(); <END> display.syncExec(pending); } }</code><technical_language>a NPE-check display is missing (NPE-safety point of initial null-check of control)</technical_language>

Target:
protected void syncRefresh() { final Runnable pending; synchronized (this) { pending = refreshRunnable; } if (pending != null) { Control control = getControl(); Display display = ((control == null) || control.isDisposed()) ? null : control.getDisplay(); if (display != null) { display.syncExec(pending); } } }
Source:
<code>public static void minCombine(Type type, BlockPositionState state, BlockPositionState otherState) { if (state.getBlock() == null) { state.setBlock(otherState.getBlock()); state.setPosition(otherState.getPosition()); return; } <START> if (type.compareTo(otherState.getBlock(), otherState.getPosition(), state.getBlock(), state.getPosition()) < 0) { <END> state.setBlock(otherState.getBlock()); state.setPosition(otherState.getPosition()); } }</code><technical_language>Put this condition state.getBlock() == null; for maxCombine</technical_language>

Target:
public static void minCombine(Type type, BlockPositionState state, BlockPositionState otherState) { if (state.getBlock() == null || type.compareTo(otherState.getBlock(), otherState.getPosition(), state.getBlock(), state.getPosition()) < 0) { state.setBlock(otherState.getBlock()); state.setPosition(otherState.getPosition()); } }
Source:
<code><START> public DefDeclaration(String name, Type returnType, List<NameBinding> argNames, <END> TypedAST body, boolean isClassDef, FileLocation location) { if (argNames == null) { argNames = new LinkedList<NameBinding>(); } this.type = getMethodType(argNames, returnType); this.name = name; this.body = (ExpressionAST) body; this.argNames = argNames; this.isClass = isClassDef; this.location = location; }</code><technical_language>constructor call new (with a default for additional parameter)</technical_language>

Target:
public DefDeclaration(String name, Type returnType, List<NameBinding> argNames, TypedAST body, boolean isClassDef, FileLocation location) { this(name, returnType, null, argNames, body, isClassDef, location); }
Source:
<code>public long getEstimatedSizeBytes(PipelineOptions options) { if (isRemoteFileFromLaunchSite) { return 0; } <START> long size = 0; <END> try { if (serializableSplit != null) { return serializableSplit.getSplit().getLength(); } Job job = Job.getInstance(getDeserializerConfiguration()); for (FileStatus st : listStatus(createFormat(job), job)) { size += st.getLen(); } return size; } catch (IOException | NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException | InterruptedException e) { SOURCE_LOG.error("Got exception while trying to getEstimatedSizeBytes().", e); return 0; } }</code><technical_language>long size ... moved right Job job = ...</technical_language>

Target:
public long getEstimatedSizeBytes(PipelineOptions options) { if (isRemoteFileFromLaunchSite) { return 0; } try { if (serializableSplit != null) { return serializableSplit.getSplit().getLength(); } Job job = Job.getInstance(getDeserializerConfiguration()); long size = 0; for (FileStatus st : listStatus(createFormat(job), job)) { size += st.getLen(); } return size; } catch (IOException | NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException | InterruptedException e) { SOURCE_LOG.error("Got exception while trying to getEstimatedSizeBytes().", e); return 0; } }
Source:
<code>public void testNotAllInputsReferenced() throws Exception { tester().assertThat(new PruneAggregationColumns()) .on(p -> buildProjectedAggregation(p, symbol -> symbol.getName().equals("b"))) .matches( strictProject( ImmutableMap.of("b", expression("b")), <START> aggregation( <END> ImmutableList.of(ImmutableList.of()), ImmutableMap.of( Optional.of("b"), functionCall("count", false, ImmutableList.of())), ImmutableMap.of(), Optional.empty(), SINGLE, values()))); }</code><technical_language>[optional] port this method builder-like style</technical_language>

Target:
public void testNotAllInputsReferenced() throws Exception { tester().assertThat(new PruneAggregationColumns()) .on(p -> buildProjectedAggregation(p, symbol -> symbol.getName().equals("b"))) .matches( strictProject( ImmutableMap.of("b", expression("b")), aggregation( ImmutableList.of(ImmutableList.of("key")), ImmutableMap.of( Optional.of("b"), functionCall("count", false, ImmutableList.of())), ImmutableMap.of(), Optional.empty(), SINGLE, values("key")))); }
Source:
<code>public void onStart() throws Exception { try { startDispatcherServices(); } catch (Throwable t) { <START> getTerminationFuture().completeExceptionally(t); <END> final DispatcherException exception = new DispatcherException(String.format("Could not start the Dispatcher %s", getAddress()), t); onFatalError(exception); throw exception; } dispatcherBootstrap.initialize(this, this.getRpcService().getScheduledExecutor()); }</code><technical_language>This necessary</technical_language>

Target:
public void onStart() throws Exception { try { startDispatcherServices(); } catch (Throwable t) { final DispatcherException exception = new DispatcherException(String.format("Could not start the Dispatcher %s", getAddress()), t); onFatalError(exception); throw exception; } dispatcherBootstrap.initialize(this, this.getRpcService().getScheduledExecutor()); }
Source:
<code>private boolean containsHtmlText(ArrayList<Object> list) { for (Iterator<Object> it = list.iterator(); it.hasNext(); ) { Object o = it.next(); if (o instanceof String) { String mediaType = (String) o; String[] parts = mediaType.split("/"); <START> if (parts.length >= 2 && parts[0].trim().equals("text") && parts[1].trim().startsWith("html")) { <END> return true; } } } return false; }</code><technical_language>MediaTypeHelper.isTextLike(...) .equalsIgnoreCase .toLowerCase() needed ? This noticed @kanovotn</technical_language>

Target:
private boolean containsHtmlText(ArrayList<Object> list) { for (Iterator<Object> it = list.iterator(); it.hasNext(); ) { Object o = it.next(); if (o instanceof String) { String mediaType = (String) o; String[] partsType = mediaType.split("/"); if (partsType.length >= 2) { String[] partsSubtype = partsType[1].split(";"); if (partsType[0].trim().equalsIgnoreCase("text") && partsSubtype[0].trim().toLowerCase().equals("html")) { return true; } } } } return false; }
Source:
<code>public boolean onStartJob(JobParameters params) { Log.d(TAG, "Job started"); ClientConfig.initialize(getApplicationContext()); <START> DBTasks.refreshAllFeeds(getApplicationContext(), null); <END> UserPreferences.restartUpdateAlarm(false); return true; }</code><technical_language>This JobScheduler version of feed update obey mobile update user preference. In contrast, AlarmManager version in FeedUpdateReceiver check: java if (NetworkUtils.networkAvailable() && NetworkUtils.isDownloadAllowed()) { In fact, suggest consolidate actual refresh logic FeedUpdateReceiver FeedUpdateJobService a common method</technical_language>

Target:
public boolean onStartJob(JobParameters params) { Log.d(TAG, "Job started"); ClientConfig.initialize(getApplicationContext()); FeedUpdateUtils.startAutoUpdate(getApplicationContext(), () -> { UserPreferences.restartUpdateAlarm(false); jobFinished(params, false); }); return true; }
Source:
<code>public ObjectInspector initialize(ObjectInspector[] arguments) <START> throws UDFArgumentException { <END> if (arguments.length != 1) { throw new UDFArgumentLengthException( "Ex2 takes 1 mandatory argument"); } GenericUDFUtils.ReturnObjectInspectorResolver keyOIResolver = new GenericUDFUtils.ReturnObjectInspectorResolver( true); GenericUDFUtils.ReturnObjectInspectorResolver valueOIResolver = new GenericUDFUtils.ReturnObjectInspectorResolver( true); ObjectInspector keyOI = keyOIResolver.get(); ObjectInspector valueOI = valueOIResolver.get(); if (keyOI == null) { keyOI = PrimitiveObjectInspectorFactory .getPrimitiveJavaObjectInspector(PrimitiveObjectInspector.PrimitiveCategory.STRING); } if (valueOI == null) { valueOI = PrimitiveObjectInspectorFactory .getPrimitiveJavaObjectInspector(PrimitiveObjectInspector.PrimitiveCategory.STRING); } try { p = new CachingParser(); } catch (IOException e) { e.printStackTrace(); } argumentOIs = arguments; return ObjectInspectorFactory.getStandardMapObjectInspector(keyOI, valueOI); }</code><technical_language>Arguments 1 element array. Type ObjectInspector for string abstract</technical_language>

Target:
public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException{ if (arguments.length != 1) throw new UDFArgumentLengthException( "Arguments array has more than 1 element"); for (int i = 0; i < arguments.length; i++) { if (arguments[i].getCategory() != Category.PRIMITIVE) { throw new UDFArgumentTypeException(i, "A string argument was expected but an argument of type " + arguments[i].getTypeName() + " was given."); } PrimitiveCategory primitiveCategory = ((PrimitiveObjectInspector) arguments[i]) .getPrimitiveCategory(); if (primitiveCategory != PrimitiveCategory.STRING && primitiveCategory != PrimitiveCategory.VOID) { throw new UDFArgumentTypeException(i, "A string argument was expected but an argument of type " + arguments[i].getTypeName() + " was given."); } } try { p = new CachingParser(); } catch (IOException e) { e.printStackTrace(); } argumentOIs = arguments; return ObjectInspectorFactory.getStandardMapObjectInspector( PrimitiveObjectInspectorFactory.javaStringObjectInspector, PrimitiveObjectInspectorFactory.javaStringObjectInspector); }
Source:
<code>protected TmfXmlStateValue(ITmfXmlModelFactory modelFactory, Element node, IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes, @Nullable String eventField) { fPath = attributes; fContainer = container; fEventField = eventField; if (!node.getNodeName().equals(TmfXmlStrings.STATE_VALUE)) { throw new IllegalArgumentException("TmfXmlStateValue constructor: Element is not a stateValue"); } String id = node.getAttribute(TmfXmlStrings.ID); <START> fID = id.isEmpty() ? null : id; <END> fIncrement = Boolean.parseBoolean(node.getAttribute(TmfXmlStrings.INCREMENT)); fUpdate = Boolean.parseBoolean(node.getAttribute(TmfXmlStrings.UPDATE)); fStateValue = initializeStateValue(modelFactory, node); String forcedTypeName = node.getAttribute(TmfXmlStrings.FORCED_TYPE); fForcedType = !forcedTypeName.isEmpty() ? TmfXmlUtils.getTmfStateValueByName(forcedTypeName): ITmfStateValue.Type.NULL; String stack = node.getAttribute(TmfXmlStrings.ATTRIBUTE_STACK); fStackType = ValueTypeStack.getTypeFromString(stack); fMappingGroup = node.getAttribute(TmfXmlStrings.MAPPING_GROUP); }</code><technical_language>a positive test</technical_language>

Target:
protected TmfXmlStateValue(ITmfXmlModelFactory modelFactory, Element node, IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes, @Nullable String eventField) { fPath = attributes; fContainer = container; fEventField = eventField; if (!node.getNodeName().equals(TmfXmlStrings.STATE_VALUE)) { throw new IllegalArgumentException("TmfXmlStateValue constructor: Element is not a stateValue"); } String id = node.getAttribute(TmfXmlStrings.ID); fID = id.isEmpty() ? null : id; fIncrement = Boolean.parseBoolean(node.getAttribute(TmfXmlStrings.INCREMENT)); fUpdate = Boolean.parseBoolean(node.getAttribute(TmfXmlStrings.UPDATE)); fStateValue = initializeStateValue(modelFactory, node); String forcedTypeName = node.getAttribute(TmfXmlStrings.FORCED_TYPE); fForcedType = forcedTypeName.isEmpty() ? ITmfStateValue.Type.NULL : TmfXmlUtils.getTmfStateValueByName(forcedTypeName); String stack = node.getAttribute(TmfXmlStrings.ATTRIBUTE_STACK); fStackType = ValueTypeStack.getTypeFromString(stack); fMappingGroup = node.getAttribute(TmfXmlStrings.MAPPING_GROUP); }
Source:
<code>public boolean execute(String rawCommand, EntityRef callingClient) { String commandName = processCommandName(rawCommand); List<String> processedParameters = processParameters(rawCommand); ClientComponent cc = callingClient.getComponent(ClientComponent.class); if (cc.local) { <START> if (!rawCommand.isEmpty() && (localCommandHistory.isEmpty() || localCommandHistory.getLast() != rawCommand)) <END> localCommandHistory.add(rawCommand); } return execute(new Name(commandName), processedParameters, callingClient); }</code><technical_language>!= work for interned strings . !str1.equals(str2)</technical_language>

Target:
public boolean execute(String rawCommand, EntityRef callingClient) { String commandName = processCommandName(rawCommand); List<String> processedParameters = processParameters(rawCommand); ClientComponent cc = callingClient.getComponent(ClientComponent.class); if (cc.local) { if (!rawCommand.isEmpty() && (localCommandHistory.isEmpty() || !localCommandHistory.getLast().equals(rawCommand))) { localCommandHistory.add(rawCommand); } } return execute(new Name(commandName), processedParameters, callingClient); }
Source:
<code>public ValidationResult invalidBiosType() { return ValidationResult.failWith(EngineMessage.BIOS_TYPE_INVALID_FOR_CLUSTER) .when(newCluster != null && newCluster.getBiosType() == null <START> || cluster.getBiosType() == null); <END> }</code><technical_language>wrong need able save type 'null', autodetect</technical_language>

Target:
public ValidationResult invalidBiosType() { return ValidationResult.failWith(EngineMessage.BIOS_TYPE_INVALID_FOR_CLUSTER) .when(newCluster != null && newCluster.getBiosType() == BiosType.CLUSTER_DEFAULT || cluster.getBiosType() == BiosType.CLUSTER_DEFAULT); }
Source:
<code>public void execute(ProgressMonitor pm) throws SQLException { if(!pk_name.isEmpty()) { resultSetHolder.setCommand(getCommand()+" LIMIT 0"); cachePrimaryKey(pm); } else { <START> LOGGER.warn(I18N.tr("The table {0} does not contain a primary key, a vast amount of memory may be required", location)); <END> resultSetHolder.setCommand(getCommand()); PropertyChangeListener listener = EventHandler.create(PropertyChangeListener.class, resultSetHolder, "cancel"); pm.addPropertyChangeListener(ProgressMonitor.PROP_CANCEL, listener); try { resultSetHolder.getResource(); } finally { pm.removePropertyChangeListener(listener); } } }</code><technical_language>"Table {0} a primary key. A vast amount of memory required."</technical_language>

Target:
public void execute(ProgressMonitor pm) throws SQLException { if(!pk_name.isEmpty()) { resultSetHolder.setCommand(getCommand()+" LIMIT 0"); cachePrimaryKey(pm); } else { LOGGER.warn(I18N.tr("Table {0} does not contain a primary key. A vast amount of memory may be required.", location)); resultSetHolder.setCommand(getCommand()); PropertyChangeListener listener = EventHandler.create(PropertyChangeListener.class, resultSetHolder, "cancel"); pm.addPropertyChangeListener(ProgressMonitor.PROP_CANCEL, listener); try { resultSetHolder.getResource(); } finally { pm.removePropertyChangeListener(listener); } } }
Source:
<code>private FmsGroup umsGroupToGroup(Group umsGroup) { FmsGroup fmsGroup = new FmsGroup(); fmsGroup.withName(umsGroup.getGroupName()); <START> fmsGroup.withAzureObjectId(getOptionalAzureObjectId(umsGroup.getCloudIdentitiesList())); <END> return fmsGroup; }</code><technical_language>FmsGroups suffer issue FmsUsers. need calculate group mapping line 71 add UmsUsersState line 78</technical_language>

Target:
private FmsGroup umsGroupToGroup(Group umsGroup) { FmsGroup fmsGroup = new FmsGroup(); fmsGroup.withName(umsGroup.getGroupName()); return fmsGroup; }
Source:
<code>Block makeBlock(int positionCount, boolean includeNulls, boolean[] nulls, long[] values) { <START> Block block = new Int128ArrayBlock(positionCount, Optional.ofNullable(includeNulls ? nulls : null), values); <END> return block; }</code><technical_language>nit: inline block variable</technical_language>

Target:
protected Block makeBlock(int positionCount, boolean includeNulls, boolean[] nulls, long[] values) { return new Int128ArrayBlock(positionCount, Optional.ofNullable(includeNulls ? nulls : null), values); }