auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void executeCommand() { Boolean tranRetVal = TransactionSupport.executeInNewTransaction(new TransactionMethod<Boolean>() { @Override <START> public Boolean runInTransaction() { <END> if (georepSessions != null) { for (GlusterGeoRepSession session : georepSessions) { GlusterVolumeEntity slaveVolume = getDbFacade().getGlusterVolumeDao().getById(session.getSlaveVolumeId()); if (slaveVolume == null) { continue; } VDS slaveUpServer = ClusterUtils.getInstance().getRandomUpServer(slaveVolume.getClusterId()); if (slaveUpServer == null) { handleVdsError(AuditLogType.GLUSTER_VOLUME_SNAPSHOT_RESTORE_FAILED, VdcBllErrors.NoUpServerFoundInRemoteCluster.name()); setSucceeded(false); return false; } if (!deleteGlusterVolumeSnapshot(slaveUpServer.getId(), slaveVolume.getId(), getSnapshot().getSnapshotName())) { return false; } } } return true; } }); if (!tranRetVal) { return; } deleteGlusterVolumeSnapshot(getUpServer().getId(), getGlusterVolumeId(), getSnapshot().getSnapshotName()); }</code><technical_language>is separate transaction required</technical_language>

Target:
public void executeCommand() { if (georepSessions != null) { for (GlusterGeoRepSession session : georepSessions) { GlusterVolumeEntity slaveVolume = getDbFacade().getGlusterVolumeDao().getById(session.getSlaveVolumeId()); if (slaveVolume == null) { continue; } VDS slaveUpServer = ClusterUtils.getInstance().getRandomUpServer(slaveVolume.getClusterId()); if (slaveUpServer == null) { handleVdsError(AuditLogType.GLUSTER_VOLUME_SNAPSHOT_DELETE_FAILED, VdcBllErrors.NoUpServerFoundInRemoteCluster.name()); setSucceeded(false); return; } if (!deleteGlusterVolumeSnapshot(slaveUpServer.getId(), slaveVolume.getId(), getSnapshot().getSnapshotName())) { return; } } } deleteGlusterVolumeSnapshot(getUpServer().getId(), getGlusterVolumeId(), getSnapshot().getSnapshotName()); }
Source:
<code>private static String[] args( String... args ) { List<String> cleanedArgs = Stream.of( args ) <START> .filter( Objects::nonNull ) <END> .filter( not( String::isEmpty ) ) .collect( Collectors.toList() ); String[] returnArgs = new String[cleanedArgs.size()]; cleanedArgs.toArray( returnArgs ); return returnArgs; }</code><technical_language>this replaced Stream.of( args ) .filter( StringUtils::isNotEmpty ) .toArray( String[]::new ) right</technical_language>

Target:
private static String[] args( String... args ) { return Stream.of( args ) .filter( StringUtils::isNoneEmpty ) .toArray( String[]::new ); }
Source:
<code>private List<SnoozeTime> getTimes() { List<SnoozeTime> times = new LinkedList<>(); long now = System.currentTimeMillis(); Calendar cal = new GregorianCalendar(); if (DEBUG) { times.add(new SnoozeTime(now + TimeUnit.MINUTES.toMillis(1))); } times.add(new SnoozeTime(now + TimeUnit.HOURS.toMillis(1))); cal.add(Calendar.DAY_OF_YEAR, 1); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.HOUR_OF_DAY, 9); times.add(new SnoozeTime(formatTimeLabel(cal, R.string.time_tomorrow_morning), cal.getTimeInMillis())); cal.set(Calendar.HOUR_OF_DAY, 13); times.add(new SnoozeTime(formatTimeLabel(cal, R.string.time_tomorrow_afternoon), cal.getTimeInMillis())); cal.set(Calendar.HOUR_OF_DAY, 20); times.add(new SnoozeTime(formatTimeLabel(cal, R.string.time_tomorrow_night), cal.getTimeInMillis())); cal.setTimeInMillis(now); <START> int monday = Calendar.MONDAY; <END> cal.add(Calendar.WEEK_OF_YEAR, 1); cal.set(Calendar.DAY_OF_WEEK, monday); cal.set(Calendar.HOUR_OF_DAY, 9); cal.set(Calendar.MINUTE, 0); times.add(new SnoozeTime(formatTimeLabel(cal, R.string.time_next_week), cal.getTimeInMillis())); times.add(new SnoozeTime(mRes.getString(R.string.pick_a_time), 0)); return times; }</code><technical_language>This is a pointless assignment</technical_language>

Target:
private List<SnoozeTime> getTimes() { List<SnoozeTime> times = new LinkedList<>(); long now = System.currentTimeMillis(); Calendar cal = new GregorianCalendar(); if (DEBUG) { times.add(new SnoozeTime(now + TimeUnit.MINUTES.toMillis(1))); } times.add(new SnoozeTime(now + TimeUnit.HOURS.toMillis(1))); cal.add(Calendar.DAY_OF_YEAR, 1); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.HOUR_OF_DAY, 9); times.add(new SnoozeTime(formatTimeLabel(cal, R.string.time_tomorrow_morning), cal.getTimeInMillis())); cal.set(Calendar.HOUR_OF_DAY, 13); times.add(new SnoozeTime(formatTimeLabel(cal, R.string.time_tomorrow_afternoon), cal.getTimeInMillis())); cal.set(Calendar.HOUR_OF_DAY, 20); times.add(new SnoozeTime(formatTimeLabel(cal, R.string.time_tomorrow_night), cal.getTimeInMillis())); cal.setTimeInMillis(now); cal.add(Calendar.WEEK_OF_YEAR, 1); cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); cal.set(Calendar.HOUR_OF_DAY, 9); cal.set(Calendar.MINUTE, 0); times.add(new SnoozeTime(formatTimeLabel(cal, R.string.time_next_week), cal.getTimeInMillis())); times.add(new SnoozeTime(mRes.getString(R.string.pick_a_time), SNOOZE_TIMESTAMP_CHOOSE_CUSTOM_TIME)); return times; }
Source:
<code>public static ThemeSearchFragment newInstance() { ThemeSearchFragment fragment = new ThemeSearchFragment(); <START> return fragment; <END> }</code><technical_language>nitpick; simplified a return statement</technical_language>

Target:
public static ThemeSearchFragment newInstance() { return new ThemeSearchFragment(); }
Source:
<code>public void update(Observable arg0, Object argN) { final String arg1 = OoyalaNotification.getNameOrUnknown(argN); if (arg1 == OoyalaPlayer.TIME_CHANGED_NOTIFICATION_NAME) { return; } String text="Notification Received: " + arg1 + " - state: " + player.getState(); playbacklog.writeToSdcardLog(text); <START> Log.d(TAG, "Notification Received: " + arg1 + " - state: " + player.getState()); <END> }</code><technical_language>Please edit this "text" variable have, for clarify</technical_language>

Target:
public void update(Observable arg0, Object argN) { final String arg1 = OoyalaNotification.getNameOrUnknown(argN); if (arg1 == OoyalaPlayer.TIME_CHANGED_NOTIFICATION_NAME) { return; } String text="Notification Received: " + arg1 + " - state: " + player.getState(); playbacklog.writeToSdcardLog(text); Log.d(TAG, text); }
Source:
<code>public void initialise() { playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThroughNormalized(playerCamera)); initSkysphere(playerCamera.getzFar() < RADIUS ? playerCamera.getzFar() : RADIUS); wireframeStateChange = new SetWireframe(true); RenderingDebugConfig renderingDebugConfig = config.getRendering().getDebug(); new WireframeTrigger(renderingDebugConfig, this); <START> addDesiredStateChange(new SetViewportToSizeOf(WRITEONLY_GBUFFER, displayResolutionDependentFBOs)); <END> addDesiredStateChange(new BindFBO(READONLY_GBUFFER, displayResolutionDependentFBOs)); update(); addDesiredStateChange(new EnableMaterial("engine:prog.sky")); addDesiredStateChange(new DisableDepthWriting()); addDesiredStateChange(new EnableFaceCulling()); addDesiredStateChange(new SetFacesToCull(GL_FRONT)); displayResolutionDependentFBOs.subscribe(this); }</code><technical_language>I this is a problem inherited, I line read READONLY_GBUFFER this stage, eventually change write write-only read read-only one</technical_language>

Target:
public void initialise() { playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThroughNormalized(playerCamera)); initSkysphere(playerCamera.getzFar() < RADIUS ? playerCamera.getzFar() : RADIUS); wireframeStateChange = new SetWireframe(true); RenderingDebugConfig renderingDebugConfig = config.getRendering().getDebug(); new WireframeTrigger(renderingDebugConfig, this); addDesiredStateChange(new BindFBO(READONLY_GBUFFER, displayResolutionDependentFBOs)); update(); displayResolutionDependentFBOs.subscribe(this); addDesiredStateChange(new EnableMaterial("engine:prog.sky")); addDesiredStateChange(new DisableDepthWriting()); addDesiredStateChange(new EnableFaceCulling()); addDesiredStateChange(new SetFacesToCull(GL_FRONT)); }
Source:
<code>public void deleteSilentAfterCancel() { <START> try { <END> if (!Files.deleteIfExists(downloadZipFile)) { logger.error("Could not delete downloaded ZIP file '{}'!", downloadZipFile); } } catch (IOException e) { logger.error("Could not delete downloaded ZIP file '{}'!", downloadZipFile, e); } }</code><technical_language>Another occurrence of deleteSilent(file)</technical_language>

Target:
public void deleteSilentAfterCancel() { FileUtils.deleteFileSilently(downloadZipFile); }
Source:
<code>public void execute() { final long startTime = System.currentTimeMillis(); try { final ResourceBundle compilationProperties = ResourceBundle .getBundle("checkstylecompilation", Locale.ROOT); final String version = compilationProperties .getString("checkstyle.compile.version"); final String compileTimestamp = compilationProperties .getString("checkstyle.compile.timestamp"); log("checkstyle version " + version, Project.MSG_VERBOSE); log("compiled on " + compileTimestamp, Project.MSG_VERBOSE); <START> if (fileName == null && fileSets.isEmpty() && sourcePaths.isEmpty()) { <END> throw new BuildException( "Must specify at least one of 'file' or nested 'fileset' or 'sourcepath'.", getLocation()); } if (configLocation == null) { throw new BuildException("Must specify 'config'.", getLocation()); } realExecute(version); } finally { final long endTime = System.currentTimeMillis(); log("Total execution took " + (endTime - startTime) + TIME_SUFFIX, Project.MSG_VERBOSE); } }</code><technical_language>please, as: java if (condition1 && condition2 && condition3) { } future contributor analyze coverage reports</technical_language>

Target:
public void execute() { final long startTime = System.currentTimeMillis(); try { final ResourceBundle compilationProperties = ResourceBundle .getBundle("checkstylecompilation", Locale.ROOT); final String version = compilationProperties .getString("checkstyle.compile.version"); final String compileTimestamp = compilationProperties .getString("checkstyle.compile.timestamp"); log("checkstyle version " + version, Project.MSG_VERBOSE); log("compiled on " + compileTimestamp, Project.MSG_VERBOSE); if (fileName == null && fileSets.isEmpty() && paths.isEmpty()) { throw new BuildException( "Must specify at least one of 'file' or nested 'fileset' or 'path'.", getLocation()); } if (configLocation == null) { throw new BuildException("Must specify 'config'.", getLocation()); } realExecute(version); } finally { final long endTime = System.currentTimeMillis(); log("Total execution took " + (endTime - startTime) + TIME_SUFFIX, Project.MSG_VERBOSE); } }
Source:
<code>public void testConnectorAbortsHandshakeOnUnknownPskIdentity() throws Exception { final CountDownLatch latch = new CountDownLatch(1); clientConfig = new DtlsConnectorConfig.Builder() .setAddress(clientEndpoint) .setPskStore(new StaticPskStore("unknownIdentity", CLIENT_IDENTITY_SECRET.getBytes())) .build(); client = new DTLSConnector(clientConfig); client.start(); final AtomicReference<AlertMessage> alert = new AtomicReference<>(); MessageCallback callback = new MessageCallback() { @Override public void onSent() { } @Override public void onError(Throwable error) { <START> if (HandshakeException.class.isInstance(error)) { <END> alert.set(((HandshakeException) error).getAlert()); latch.countDown(); } } @Override public void onContextEstablished(EndpointContext context) { } }; RawData data = RawData.outbound("Hello".getBytes(), new AddressEndpointContext(serverEndpoint), callback, false); client.send(data); assertTrue(latch.await(MAX_TIME_TO_WAIT_SECS, TimeUnit.SECONDS)); assertThat(alert.get().getLevel(), is(AlertLevel.FATAL)); }</code><technical_language>Is error instanceof HandshakeException out of style</technical_language>

Target:
public void testConnectorAbortsHandshakeOnUnknownPskIdentity() throws Exception { final CountDownLatch latch = new CountDownLatch(1); clientConfig = new DtlsConnectorConfig.Builder() .setAddress(clientEndpoint) .setPskStore(new StaticPskStore("unknownIdentity", CLIENT_IDENTITY_SECRET.getBytes())) .build(); client = new DTLSConnector(clientConfig); client.start(); final AtomicReference<AlertMessage> alert = new AtomicReference<>(); MessageCallback callback = new MessageCallback() { @Override public void onSent() { } @Override public void onError(Throwable error) { if (error instanceof HandshakeException) { alert.set(((HandshakeException) error).getAlert()); latch.countDown(); } } @Override public void onContextEstablished(EndpointContext context) { } }; RawData data = RawData.outbound("Hello".getBytes(), new AddressEndpointContext(serverEndpoint), callback, false); client.send(data); assertTrue(latch.await(MAX_TIME_TO_WAIT_SECS, TimeUnit.SECONDS)); assertThat(alert.get().getLevel(), is(AlertLevel.FATAL)); }
Source:
<code>protected boolean validateDestStorage() { StorageDomainValidator validator = new StorageDomainValidator(getStorageDomain()); if (!validate(validator.isDomainExistAndActive()) || !validate(validator.domainIsValidDestination())) { return false; } boolean moveOrCopy = isMoveOperation() || isCopyOperation(); if (moveOrCopy && getImage().isShareable() && getStorageDomain().getStorageType() == StorageType.GLUSTERFS ) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_CANT_MOVE_SHAREABLE_DISK_TO_GLUSTERFS, String.format("$%1$s %2$s", "diskAlias", getImage().getDiskAlias())); } if (isMoveOperation()) { if <START> (getImage().getStorageIds().contains(getStorageDomain().getId())) <END> { return failValidation(EngineMessage.ACTION_TYPE_FAILED_DESTINATION_STORAGE_DOMAIN_IS_NOT_VALID); } } return true; }</code><technical_language>getStorageDomainId()</technical_language>

Target:
protected boolean validateDestStorage() { StorageDomainValidator validator = new StorageDomainValidator(getStorageDomain()); if (!validate(validator.isDomainExistAndActive()) || !validate(validator.domainIsValidDestination())) { return false; } boolean moveOrCopy = isMoveOperation() || isCopyOperation(); if (moveOrCopy && getImage().isShareable() && getStorageDomain().getStorageType() == StorageType.GLUSTERFS ) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_CANT_MOVE_SHAREABLE_DISK_TO_GLUSTERFS, String.format("$%1$s %2$s", "diskAlias", getImage().getDiskAlias())); } if (isMoveOperation()) { if (getImage().getStorageIds().contains(getStorageDomainId())) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_DESTINATION_STORAGE_DOMAIN_ALREADY_CONTAINS_THE_DISK); } } return true; }
Source:
<code>public static String finishMeasure() { final LogCollector[] threadCollectors = THREAD_COLLECTORS.get(); if (null != threadCollectors) { int idx = -1; for (int i = 0; i < threadCollectors.length; ++i) { if (null != threadCollectors[i]) { idx = i; } else { break; } } final LogCollector collector = idx >= 0 ? threadCollectors[idx] : null; <START> threadCollectors[idx] = null; <END> if (null != collector) { collector.addRecord("finish"); final String result = collector.describe(); collector.reset(); synchronized (threadCollectors) { COLLECTOR_POOL.add(collector); } return result; } } return null; }</code><technical_language>do clean one</technical_language>

Target:
public static String finishMeasure() { final List<LogCollector> threadCollectors = THREAD_COLLECTORS.get(); if (null != threadCollectors && !threadCollectors.isEmpty()) { final LogCollector lastCollector = threadCollectors.remove(threadCollectors.size() - 1); lastCollector.addRecord("finish"); return lastCollector.describe(); } return null; }
Source:
<code>private boolean isUserReferringPhysician() { <START> if (Context.isAuthenticated()) { <END> return Context.getAuthenticatedUser().hasRole(REFERRRING_PHYSICIAN, true); } return false; }</code><technical_language>I this is a good approach API user get a definitive answer if result is false a role user is authenticated. I throw exception for authenticated true/false for role</technical_language>

Target:
private boolean isUserReferringPhysician() { if (!Context.isAuthenticated()) { String[] args = { OpenmrsConstants.PRIV_EDIT_ORDERS }; String message = messageSourceService.getMessage("radiology.privilegesRequired", args, Context.getLocale()); throw new APIAuthenticationException(message); } return Context.getAuthenticatedUser().hasRole(REFERRRING_PHYSICIAN, true); }
Source:
<code>public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ApplicationEvent)) return false; ApplicationEvent that = (ApplicationEvent) o; return getApplicationId() == that.getApplicationId() && <START> getApplicationName().equals(that.getApplicationName()) && <END> getTokenType().equals(that.getTokenType()) && getApplicationPolicy().equals(that.getApplicationPolicy()); }</code><technical_language>need group_id well</technical_language>

Target:
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ApplicationEvent)) return false; ApplicationEvent that = (ApplicationEvent) o; return getApplicationId() == that.getApplicationId() && getApplicationName().equals(that.getApplicationName()) && getTokenType().equals(that.getTokenType()) && getGroupId().equals(that.getGroupId()) && getApplicationPolicy().equals(that.getApplicationPolicy()); }
Source:
<code>private String getActionNameFromUrl(String requestUrl) { Matcher m = PATTERN_ACTION_NAME.matcher(requestUrl); if (m.find()) { return m.group(PATTERN_ACTION_NAME_GROUP); } else { return String.format(Const.ActivityLog.MESSAGE_ERROR_ACTION_NAME, requestUrl); <START> } <END> }</code><technical_language>no-else-return rule: this simplified java if (condition) { return a; } return b;</technical_language>

Target:
private String getActionNameFromUrl(String requestUrl) { Matcher m = PATTERN_ACTION_NAME.matcher(requestUrl); return m.find() ? m.group(PATTERN_ACTION_NAME_GROUP) : String.format(Const.ActivityLog.MESSAGE_ERROR_ACTION_NAME, requestUrl); }
Source:
<code>public long getOffset() { <START> if (currentOpIndex < 0) { return forwardOffsets.get(0); } <END> return backwardsOffsets.get(currentOpIndex); }</code><technical_language>This strange. index is initialized this: currentOpIndex = direction == Direction.Forward ? 0 : forwardOffsets.size() - 1; if direction is forward, call this method init, miss this if case</technical_language>

Target:
public long getOffset() { if (currentOpIndex < 0) { return startOffset; } return backwardsOffsets.get(currentOpIndex); }
Source:
<code>public void testEdit() { PageTitle title = new PageTitle(null, "Test_page_for_app_testing/Section1", TEST_WIKI_SITE); String wikitext = "== Section 2 ==\n\nEditing section INSERT RANDOM & HERE test at " + System.currentTimeMillis(); final int sectionId = 3; service.edit(TEST_WIKI_SITE, title, sectionId, wikitext, ANONYMOUS_TOKEN, DEFAULT_SUMMARY, false, null, null, new Edit.Callback() { @Override public void success(@NonNull EditingResult result) { <START> assertThat(result, instanceOf(SuccessEditResult.class)); <END> } @Override public void failure(@NonNull Throwable caught) { throw new RuntimeException(caught); } }); }</code><technical_language>latch</technical_language>

Target:
public void testEdit() { PageTitle title = new PageTitle(null, "Test_page_for_app_testing/Section1", TEST_WIKI_SITE); String wikitext = "== Section 2 ==\n\nEditing section INSERT RANDOM & HERE test at " + System.currentTimeMillis(); final int sectionId = 3; final TestLatch latch = new TestLatch(); client.request(TEST_WIKI_SITE, title, sectionId, wikitext, ANONYMOUS_TOKEN, DEFAULT_SUMMARY, false, null, null, new EditClient.Callback() { @Override public void success(@NonNull Call<Edit> call, @NonNull EditingResult result) { assertThat(result, instanceOf(SuccessEditResult.class)); latch.countDown(); } @Override public void failure(@NonNull Call<Edit> call, @NonNull Throwable caught) { throw new RuntimeException(caught); } }); latch.await(); }
Source:
<code>public void requestHandleWithHealthCheckRequestTest() throws IOException { <START> testHealthCheckRequest(HttpMethod.POST, healthCheckUri, true); <END> testHealthCheckRequest(HttpMethod.POST, healthCheckUri, false); }</code><technical_language>HttpMethod.POST</technical_language>

Target:
public void requestHandleWithHealthCheckRequestTest() throws IOException { testHealthCheckRequest(HttpMethod.GET, true, true); testHealthCheckRequest(HttpMethod.GET, false, true); testHealthCheckRequest(HttpMethod.GET, true, false); testHealthCheckRequest(HttpMethod.GET, false, false); }
Source:
<code>protected WebSocketAlertBuilder setMessage(WebSocketMessageDTO webSocketMessageDTO) { HttpMessage handshakeMessage; try { handshakeMessage = webSocketMessageDTO.channel.getHandshakeReference().getHttpMessage(); } catch (Exception e) { LOGGER.info( "Couldn't get the Handshake Http Message for this specific channel. " + "Channel ID:" + webSocketMessageDTO.channel.id, e); <START> return null; <END> } alert.setMessage(handshakeMessage); alert.setUri(handshakeMessage.getRequestHeader().getURI().toString()); this.webSocketMessageDTO = webSocketMessageDTO; try { alert.setOtherInfo(OTHER_INFO_LABEL + webSocketMessageDTO.getReadablePayload()); } catch (InvalidUtf8Exception e) { alert.setOtherInfo( OTHER_INFO_LABEL + Constant.messages.getString("websocket.payload.invalid_utf8")); } return this; }</code><technical_language>return this still? lead a NPE</technical_language>

Target:
protected WebSocketAlertBuilder setMessage(WebSocketMessageDTO webSocketMessageDTO) { HttpMessage handshakeMessage; try { handshakeMessage = webSocketMessageDTO.channel.getHandshakeReference().getHttpMessage(); } catch (Exception e) { LOGGER.info( "Couldn't get the Handshake Http Message for this specific channel. " + "Channel ID:" + webSocketMessageDTO.channel.id, e); return this; } alert.setMessage(handshakeMessage); alert.setUri(handshakeMessage.getRequestHeader().getURI().toString()); this.webSocketMessageDTO = webSocketMessageDTO; try { alert.setOtherInfo(OTHER_INFO_LABEL + webSocketMessageDTO.getReadablePayload()); } catch (InvalidUtf8Exception e) { alert.setOtherInfo( OTHER_INFO_LABEL + Constant.messages.getString("websocket.payload.invalid_utf8")); } return this; }
Source:
<code>public void bulkImport() throws Exception { MiniAccumuloClusterImpl cluster = SharedMiniClusterBase.getCluster(); FileSystem fs = cluster.getFileSystem(); Path base = cluster.getTemporaryPath(); Path dir = new Path(base, "test"); assertTrue(fs.mkdirs(dir)); String filename = dir + "/bulk/import/rfile.rf"; FileSKVWriter writer = FileOperations.getInstance().openWriter().ofFile(filename, fs, fs.getConf()) <START> .withTableConfiguration(DefaultConfiguration.getInstance()).execute(); <END> writer.startDefaultLocalityGroup(); writer.append(new org.apache.accumulo.core.data.Key(new Text("a"), new Text("b"), new Text("c")), new Value("value".getBytes(UTF_8))); writer.close(); fs.mkdirs(new Path(dir + "/bulk/fail")); client.importDirectory(creds, tableName, dir + "/bulk/import", dir + "/bulk/fail", true); String scanner = client.createScanner(creds, tableName, null); ScanResult more = client.nextK(scanner, 100); client.closeScanner(scanner); assertEquals(1, more.results.size()); ByteBuffer maxRow = client.getMaxRow(creds, tableName, null, null, false, null, false); assertEquals(s2bb("a"), maxRow); }</code><technical_language>If default config returned withTableConfiguration called, calls this removed</technical_language>

Target:
public void bulkImport() throws Exception { MiniAccumuloClusterImpl cluster = SharedMiniClusterBase.getCluster(); FileSystem fs = cluster.getFileSystem(); Path base = cluster.getTemporaryPath(); Path dir = new Path(base, "test"); assertTrue(fs.mkdirs(dir)); String filename = dir + "/bulk/import/rfile.rf"; FileSKVWriter writer = FileOperations.getInstance().newWriterBuilder().forFile(filename, fs, fs.getConf()) .withTableConfiguration(DefaultConfiguration.getInstance()).build(); writer.startDefaultLocalityGroup(); writer.append(new org.apache.accumulo.core.data.Key(new Text("a"), new Text("b"), new Text("c")), new Value("value".getBytes(UTF_8))); writer.close(); fs.mkdirs(new Path(dir + "/bulk/fail")); client.importDirectory(creds, tableName, dir + "/bulk/import", dir + "/bulk/fail", true); String scanner = client.createScanner(creds, tableName, null); ScanResult more = client.nextK(scanner, 100); client.closeScanner(scanner); assertEquals(1, more.results.size()); ByteBuffer maxRow = client.getMaxRow(creds, tableName, null, null, false, null, false); assertEquals(s2bb("a"), maxRow); }
Source:
<code><START> public BinaryBlockWriter(OutputStream out, Class<M> protoClass, BinaryConverter<M> binaryConverter, int numRecordsPerBlock) { <END> out_ = out; numRecordsPerBlock_ = numRecordsPerBlock; innerClass_ = protoClass; binaryConverter_ = binaryConverter; protoBlobs_ = new ArrayList<ByteString>(numRecordsPerBlock_); }</code><technical_language>Do need this public? a new public below</technical_language>

Target:
protected BinaryBlockWriter(OutputStream out, Class<M> protoClass, BinaryConverter<M> binaryConverter, int numRecordsPerBlock) { out_ = out; numRecordsPerBlock_ = numRecordsPerBlock; innerClass_ = protoClass; binaryConverter_ = binaryConverter; protoBlobs_ = new ArrayList<ByteString>(numRecordsPerBlock_); }
Source:
<code>protected void setDevMode(String mode) { this.devMode = BooleanUtils.toBoolean(mode); if (this.devMode) { int devModeWarnCount = DEVMODESET_WARNCOUNT.get(); if (devModeWarnCount < MAX_DEVMODESET_WARNCOUNT) { devModeWarnCount = DEVMODESET_WARNCOUNT.incrementAndGet(); <START> LOG.warn("Setting development mode affects the safety of your application!", <END> this.devMode); if (devModeWarnCount >= MAX_DEVMODESET_WARNCOUNT) { LOG.warn("Last warning concerning development mode [{}]! These messages will now be trace level only!", this.devMode); } } else { LOG.trace("Setting development mode affects the safety of your application!", this.devMode); } } }</code><technical_language>message extracted reused avoid string duplication</technical_language>

Target:
protected void setDevMode(String mode) { this.devMode = BooleanUtils.toBoolean(mode); }
Source:
<code>private void packetReceived(XBeePacket packet) { notifyPacketReceived(packet); if (!(packet instanceof XBeeAPIPacket)) return; XBeeAPIPacket apiPacket = (XBeeAPIPacket)packet; XBeeAPIType apiType = apiPacket.getAPIID(); if (apiType == null) return; String address; byte[] data; switch(apiType) { <START> case RECEIVE_PACKET: <END> address = ((ReceivePacket)apiPacket).get64bitAddress().toString(); data = ((ReceivePacket)apiPacket).getReceivedData(); notifySerialDataReceived(address, data); break; case RX_64: address = ((RX64Packet)apiPacket).getSourceAddress().toString(); data = ((RX64Packet)apiPacket).getReceivedData(); notifySerialDataReceived(address, data); break; case RX_16: address = ((RX16Packet)apiPacket).getSourceAddress().toString(); data = ((RX16Packet)apiPacket).getReceivedData(); notifySerialDataReceived(address, data); break; default: break; } }</code><technical_language>call notifySerialDataReceived once</technical_language>

Target:
private void packetReceived(XBeePacket packet) { notifyPacketReceived(packet); if (!(packet instanceof XBeeAPIPacket)) return; XBeeAPIPacket apiPacket = (XBeeAPIPacket)packet; APIFrameType apiType = apiPacket.getFrameType(); if (apiType == null) return; String address = null; byte[] data = null; switch(apiType) { case RECEIVE_PACKET: address = ((ReceivePacket)apiPacket).get64bitAddress().toString(); data = ((ReceivePacket)apiPacket).getReceivedData(); break; case RX_64: address = ((RX64Packet)apiPacket).getSourceAddress().toString(); data = ((RX64Packet)apiPacket).getReceivedData(); break; case RX_16: address = ((RX16Packet)apiPacket).getSourceAddress().toString(); data = ((RX16Packet)apiPacket).getReceivedData(); break; default: break; } if (address != null && data != null) notifySerialDataReceived(address, data); }
Source:
<code>protected void begin() { super.begin(); controller = JumpingSumoDeviceController.getInstance(); deviceController = controller.getDeviceController(); if (deviceController != null) { deviceController.getFeatureJumpingSumo().sendAnimationsJump(ARCOMMANDS_JUMPINGSUMO_ANIMATIONS_JUMP_TYPE_ENUM.ARCOMMANDS_JUMPINGSUMO_ANIMATIONS_JUMP_TYPE_LONG); Log.d(TAG, "send jump long command JS down"); <START> } else { <END> Log.d(TAG, "error: send jump long command JS"); } }</code><technical_language>Again: this else branch do logging; is this necessary</technical_language>

Target:
protected void begin() { super.begin(); controller = JumpingSumoDeviceController.getInstance(); deviceController = controller.getDeviceController(); if (deviceController != null) { deviceController.getFeatureJumpingSumo().sendAnimationsJump(ARCOMMANDS_JUMPINGSUMO_ANIMATIONS_JUMP_TYPE_ENUM.ARCOMMANDS_JUMPINGSUMO_ANIMATIONS_JUMP_TYPE_LONG); Log.d(TAG, "send jump long command JS down"); } }
Source:
<code>private void initialize () { viewModel = new PreferencesDialogViewModel(dialogService, taskExecutor, frame, this); <START> getDialogPane().getScene().getStylesheets().add(this.getClass().getResource("PreferencesDialog.css").toExternalForm()); <END> preferencePaneContainer.getStyleClass().add("preferencePaneContainer"); preferenceTabList.itemsProperty().setValue(viewModel.getPreferenceTabs()); PreferencesSearchHandler searchHandler = new PreferencesSearchHandler(viewModel.getPreferenceTabs()); preferenceTabList.itemsProperty().bindBidirectional(searchHandler.filteredPreferenceTabsProperty()); searchBox.textProperty().addListener((observable, previousText, newText) -> { searchHandler.filterTabs(newText.toLowerCase(Locale.ROOT)); preferenceTabList.getSelectionModel().clearSelection(); preferenceTabList.getSelectionModel().selectFirst(); }); searchBox.setPromptText(Localization.lang("Search") + "..."); searchBox.setLeft(IconTheme.JabRefIcons.SEARCH.getGraphicNode()); EasyBind.subscribe(preferenceTabList.getSelectionModel().selectedItemProperty(), tab -> { if (tab != null) { preferencePaneContainer.setContent(tab.getBuilder()); } else { preferencePaneContainer.setContent(null); } }); preferenceTabList.getSelectionModel().selectFirst(); new ViewModelListCellFactory<PrefsTab>() .withText(PrefsTab::getTabName) .install(preferenceTabList); setValues(); }</code><technical_language>css file loaded automatically ViewLoader</technical_language>

Target:
private void initialize() { viewModel = new PreferencesDialogViewModel(dialogService, taskExecutor, frame); preferenceTabList.itemsProperty().setValue(viewModel.getPreferenceTabs()); PreferencesSearchHandler searchHandler = new PreferencesSearchHandler(viewModel.getPreferenceTabs()); preferenceTabList.itemsProperty().bindBidirectional(searchHandler.filteredPreferenceTabsProperty()); searchBox.textProperty().addListener((observable, previousText, newText) -> { searchHandler.filterTabs(newText.toLowerCase(Locale.ROOT)); preferenceTabList.getSelectionModel().clearSelection(); preferenceTabList.getSelectionModel().selectFirst(); }); searchBox.setPromptText(Localization.lang("Search") + "..."); searchBox.setLeft(IconTheme.JabRefIcons.SEARCH.getGraphicNode()); EasyBind.subscribe(preferenceTabList.getSelectionModel().selectedItemProperty(), tab -> { if (tab != null) { preferencePaneContainer.setContent(tab.getBuilder()); } else { preferencePaneContainer.setContent(null); } }); preferenceTabList.getSelectionModel().selectFirst(); new ViewModelListCellFactory<PrefsTab>() .withText(PrefsTab::getTabName) .install(preferenceTabList); viewModel.setValues(); }
Source:
<code>public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { HashSet<BuildTriggerConfig> alreadyFired = new HashSet<BuildTriggerConfig>(); for (BuildTriggerConfig config : configs) { boolean hasNonAbstractProject = false; List<Job> jobs = config.getProjectList(build.getRootBuild().getProject().getParent(), build.getEnvironment(listener)); for (Job j : jobs) { if (!(j instanceof AbstractProject)) { hasNonAbstractProject = true; } } if (hasNonAbstractProject) { config.perform(build, launcher, listener); alreadyFired.add(config); } <START> } <END> if (canDeclare(build.getProject())) { EnvVars env = build.getEnvironment(listener); build.addAction(new CapturedEnvironmentAction(env)); } else { for (BuildTriggerConfig config : configs) { if (!alreadyFired.contains(config)) { config.perform(build, launcher, listener); } } } return true; }</code><technical_language>indentation is completely out of sync rest of method</technical_language>

Target:
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { HashSet<BuildTriggerConfig> alreadyFired = new HashSet<BuildTriggerConfig>(); for (BuildTriggerConfig config : configs) { boolean hasNonAbstractProject = false; List<Job> jobs = config.getJobs(build.getRootBuild().getProject().getParent(), build.getEnvironment(listener)); for (Job j : jobs) { if (!(j instanceof AbstractProject)) { hasNonAbstractProject = true; break; } } if (hasNonAbstractProject) { config.perform(build, launcher, listener); alreadyFired.add(config); } } if (canDeclare(build.getProject())) { EnvVars env = build.getEnvironment(listener); build.addAction(new CapturedEnvironmentAction(env)); } else { for (BuildTriggerConfig config : configs) { if (!alreadyFired.contains(config)) { config.perform(build, launcher, listener); } } } return true; }
Source:
<code>public ZKHelixManager(String clusterName, String instanceName, InstanceType instanceType, String zkAddress, HelixManagerStateListener stateListener) { <START> this(clusterName, instanceName, instanceType, zkAddress,stateListener, null); <END> }</code><technical_language>Is passing null a safe do</technical_language>

Target:
public ZKHelixManager(String clusterName, String instanceName, InstanceType instanceType, String zkAddress, HelixManagerStateListener stateListener) { this(clusterName, instanceName, instanceType, zkAddress, stateListener, HelixPropertyFactory.getInstance().getHelixManagerProperty(zkAddress, clusterName)); }
Source:
<code>public GlobalVariableNames(@Nullable Settings settings) { ImmutableSet.Builder<String> namesBuilder = ImmutableSet.builder(); <START> namesBuilder.addAll(globalsFromEnvironment("builtin").get()); <END> if (settings != null) { namesBuilder.add(settings.getStringArray(GLOBALS_PROPERTY_KEY)); for (String environmentName : settings.getStringArray(ENVIRONMENTS_PROPERTY_KEY)) { String normalizedEnvName = environmentName.toLowerCase(Locale.ENGLISH); Optional<Set<String>> namesFromCurrentEnvironment = globalsFromEnvironment(normalizedEnvName); if (namesFromCurrentEnvironment.isPresent()) { namesBuilder.addAll(namesFromCurrentEnvironment.get()); } else { LOGGER.warn(ENVIRONMENTS_PROPERTY_KEY + " contains an unknown environment: " + environmentName); } } } this.names = namesBuilder.build(); }</code><technical_language>![MAJOR](<LINK_1> 'Severity: MAJOR') Call "Optional#isPresent()" accessing value. [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
public GlobalVariableNames(@Nullable Settings settings) { ImmutableSet.Builder<String> namesBuilder = ImmutableSet.builder(); namesBuilder.addAll(globalsFromEnvironment("builtin").get()); if (settings != null) { namesBuilder.add(settings.getStringArray(GLOBALS_PROPERTY_KEY)); for (String environmentName : settings.getStringArray(ENVIRONMENTS_PROPERTY_KEY)) { Optional<Set<String>> namesFromCurrentEnvironment = globalsFromEnvironment(environmentName); if (namesFromCurrentEnvironment.isPresent()) { namesBuilder.addAll(namesFromCurrentEnvironment.get()); } else { LOGGER.warn(ENVIRONMENTS_PROPERTY_KEY + " contains an unknown environment: " + environmentName); } } } this.names = namesBuilder.build(); }
Source:
<code><START> public void init(final ImmutableMap<String, Object> execEnvVars) throws DbException { <END> tupleIndices = new TIntObjectHashMap<TIntList>(); tuplesToRemove = new TupleBuffer(getSchema()); }</code><technical_language>a check getLeft() getRight() identical schema</technical_language>

Target:
public void init(final ImmutableMap<String, Object> execEnvVars) throws DbException { if (!getLeft().getSchema().compatible(getRight().getSchema())) { throw new DbException("Incompatible input schemas"); } tupleIndices = new TIntObjectHashMap<TIntList>(); tuplesToRemove = new TupleBuffer(getSchema()); }
Source:
<code>public void newDoc(EditableFileType fileType, final String contents, final ResultCallback<EditingTarget, ServerError> resultCallback) { ensureVisible(false); server_.newDocument( fileType.getTypeId(), contents, JsObject.createJsObject(), new SimpleRequestCallback<SourceDocument>( "Error Creating New Document") { @Override public void onResponseReceived(SourceDocument newDoc) { SourceColumn.applyDocPropertyDefaults(newDoc, true, userPrefs_); EditingTarget target = addTab(newDoc, Source.OPEN_INTERACTIVE); if (activeEditor_ != null) { target.forceSaveCommandActive(); <START> manageSaveCommands(true); <END> } if (resultCallback != null) resultCallback.onSuccess(target); } @Override public void onError(ServerError error) { if (resultCallback != null) resultCallback.onFailure(error); } }); }</code><technical_language>active parameter represents this is this column is current active column. (activeEditor_ is populated for active column) in manageSaveCommands getNextActiveEditor() instead of accessing active editor, this is a function return editor active if column active. open a new doc set active editor this code works fine in case this function called user moved is working a file. a difference, I pass this == manager.getActive() here</technical_language>

Target:
public void newDoc(EditableFileType fileType, final String contents, final ResultCallback<EditingTarget, ServerError> resultCallback) { ensureVisible(false); server_.newDocument( fileType.getTypeId(), contents, JsObject.createJsObject(), new SimpleRequestCallback<SourceDocument>( "Error Creating New Document") { @Override public void onResponseReceived(SourceDocument newDoc) { SourceColumn.applyDocPropertyDefaults(newDoc, true, userPrefs_); EditingTarget target = addTab(newDoc, Source.OPEN_INTERACTIVE); if (SourceColumn.this == manager_.getActive()) { target.forceSaveCommandActive(); manageSaveCommands(true); } if (resultCallback != null) resultCallback.onSuccess(target); } @Override public void onError(ServerError error) { if (resultCallback != null) resultCallback.onFailure(error); } }); }
Source:
<code>public Object call() throws IOException { try (InputStream toClose = pipeSource) { return doResumableUpload(); } catch (IOException e) { throw e; <START> } catch (Exception e) { <END> throw new IOException( String.format("Caught exception during upload for '%s'", resourceId), e); } }</code><technical_language>non-IOExceptions thrown in doResumableUpload method gRPC</technical_language>

Target:
public Object call() throws IOException { try (InputStream toClose = pipeSource) { return doResumableUpload(); } }
Source:
<code>public void onExperienceReceive(PlayerExpChangeEvent e) { <START> if (e.getAmount() <= 0 || !Talisman.checkFor(e, SlimefunItems.TALISMAN_WISE)) return; <END> e.setAmount(e.getAmount() * 2); }</code><technical_language>Mssing curvy brackets</technical_language>

Target:
public void onExperienceReceive(PlayerExpChangeEvent e) { if (e.getAmount() > 0 && Talisman.tryActivate(e, SlimefunItems.TALISMAN_WISE)) { e.setAmount(e.getAmount() * 2); } }
Source:
<code>private void logConcurrentModification(I aggregateId, Message command, int newEventCount) { <START> log().warn("Detected the concurrent modification of {}" + <END> "New events detected while dispatching the command " + "The number of new events is {}. " + "Restarting the command dispatching.", getAggregateClass(), aggregateId, command, newEventCount); }</code><technical_language>A space symbol is missing {}</technical_language>

Target:
private void logConcurrentModification(I aggregateId, Message command, int newEventCount) { final String idStr = Stringifiers.idToString(aggregateId); final Class<? extends Aggregate<I, ?, ?>> aggregateClass = getAggregateClass(); log().warn("Detected the concurrent modification of ID: {}. " + "New events detected while dispatching the command " + "The number of new events is {}. " + "Restarting the command dispatching.", aggregateClass, idStr, command, newEventCount); }
Source:
<code>private void addBooksToCase(EntityRef player, List<BlockRegion> absoluteRegions, int level) { logger.debug("Adding books to laboratory"); <START> Vector3i bookcaseLocation = absoluteRegions.get(MooConstants.BOOKCASE_REGION_INDEX).getMax(new org.joml.Vector3i()); <END> EntityRef bookcaseEntity = blockEntityRegistry.getBlockEntityAt(bookcaseLocation); for (EntityRef book : getBooksToAdd(player, level)) { inventoryManager.giveItem(bookcaseEntity, bookcaseEntity, book); } }</code><technical_language>need for qualified name</technical_language>

Target:
private void addBooksToCase(EntityRef player, List<BlockRegion> absoluteRegions, int level) { logger.debug("Adding books to laboratory"); Vector3i bookcaseLocation = absoluteRegions.get(MooConstants.BOOKCASE_REGION_INDEX).getMax(new Vector3i()); EntityRef bookcaseEntity = blockEntityRegistry.getBlockEntityAt(bookcaseLocation); for (EntityRef book : getBooksToAdd(player, level)) { inventoryManager.giveItem(bookcaseEntity, bookcaseEntity, book); } }
Source:
<code>protected int doStartTagInternal() throws Exception { QualityControllable<?> item = (QualityControllable<?>) this.item; ObjectMapper mapper = new ObjectMapper(); pageContext.getOut().append(String.format( "<br/><h1>QCs</h1><table id='qc%1$d' class='display no-border ui-widget-content'></table><script type='text/javascript'>jQuery(document).ready(function () { ListUtils.createStaticTable('qc%1$d', ListTarget.qc('%2$s'), { ownerId : %3$d }, %4$s);});</script>", <START> id++, item.getQcTarget(), item.getId(), <END> mapper.writeValueAsString(item.getQCs().stream().map(Dtos::asDto).collect(Collectors.toList())))); return SKIP_BODY; }</code><technical_language>Odd of static field. I assume ID is necessary Datatables stuff work together. a default ID "qcTable" allow for alternate ID in case multiple QC tables a page</technical_language>

Target:
protected int doStartTagInternal() throws Exception { QualityControllable<?> qcItem = (QualityControllable<?>) item; ObjectMapper mapper = new ObjectMapper(); pageContext.getOut().append(String.format( "<br/><h1>QCs</h1><table id='%1$s' class='display no-border ui-widget-content'></table><script type='text/javascript'>jQuery(document).ready(function () { ListUtils.createStaticTable('%1$s', ListTarget.qc('%2$s'), { ownerId : %3$d }, %4$s);});</script>", getId(), qcItem.getQcTarget(), qcItem.getId(), mapper.writeValueAsString(qcItem.getQCs().stream().map(Dtos::asDto).collect(Collectors.toList())))); return SKIP_BODY; }
Source:
<code>protected Map<String, Object> getParams() { List<String> properties = new ArrayList<String>(); <START> properties.add("System.ScreenSaverActive"); <END> Map<String, Object> params = new HashMap<String, Object>(); params.put("booleans", properties); return params; }</code><technical_language>please extract constant</technical_language>

Target:
protected Map<String, Object> getParams() { List<String> properties = new ArrayList<String>(); properties.add(SYSTEM_SCREEN_SAVER_ACTIVE); Map<String, Object> params = new HashMap<String, Object>(); params.put("booleans", properties); return params; }
Source:
<code>private RowDataToJsonConverter createMapConverter( <START> String typeSummary, LogicalType keyType, LogicalType valueType) { <END> if (!LogicalTypeChecks.hasFamily(keyType, LogicalTypeFamily.CHARACTER_STRING)) { throw new UnsupportedOperationException( "JSON format doesn't support non-string as key type of map. " + "The map type is: " + typeSummary); } final RowDataToJsonConverter valueConverter = createConverter(valueType); return (mapper, reuse, object) -> { ObjectNode node; if (reuse == null || reuse.isNull()) { node = mapper.createObjectNode(); } else { node = (ObjectNode) reuse; } MapData map = (MapData) object; ArrayData keyArray = map.keyArray(); ArrayData valueArray = map.valueArray(); int numElements = map.size(); for (int i = 0; i < numElements; i++) { String fieldName = keyArray.getString(i).toString(); Object value = ArrayData.get(valueArray, i, valueType); node.set(fieldName, valueConverter.convert(mapper, node.get(fieldName), value)); } return node; }; }</code><technical_language>Add more indent for parameters if start a new line</technical_language>

Target:
private RowDataToJsonConverter createMapConverter( String typeSummary, LogicalType keyType, LogicalType valueType) { if (!LogicalTypeChecks.hasFamily(keyType, LogicalTypeFamily.CHARACTER_STRING)) { throw new UnsupportedOperationException( "JSON format doesn't support non-string as key type of map. " + "The type is: " + typeSummary); } final RowDataToJsonConverter valueConverter = createConverter(valueType); return (mapper, reuse, object) -> { ObjectNode node; if (reuse == null || reuse.isNull()) { node = mapper.createObjectNode(); } else { node = (ObjectNode) reuse; } MapData map = (MapData) object; ArrayData keyArray = map.keyArray(); ArrayData valueArray = map.valueArray(); int numElements = map.size(); for (int i = 0; i < numElements; i++) { String fieldName = keyArray.getString(i).toString(); Object value = ArrayData.get(valueArray, i, valueType); node.set(fieldName, valueConverter.convert(mapper, node.get(fieldName), value)); } return node; }; }
Source:
<code>public void resolveParameters(final Map<String, IElementParameter> settings) { final Iterator<PropertyDefinitionDecorator> expectedParameters = PropertyDefinitionDecorator.wrap(actionRef.getProperties()) .stream() .filter(p -> p.getParameter().isRoot()) .sorted(comparing(p -> p.getParameter().getIndex())) .iterator(); final List<String> relativePaths = getRelativePaths(); relativePaths.forEach(relativePath -> { if (expectedParameters.hasNext()) { final String absolutePath = pathResolver.resolvePath(getOwnerPath(), relativePath); if (absolutePath != null && !absolutePath.isEmpty()) { final List<TaCoKitElementParameter> parameters = findParameters(absolutePath, settings); <START> final SimplePropertyDefinition parameterRoot = expectedParameters.next(); <END> parameters.forEach(parameter -> { parameter.registerListener("value", listener); if (redrawParameter != null) { parameter.setRedrawParameter(redrawParameter); } final String callbackProperty = parameter.getName().replaceFirst(absolutePath, parameterRoot.getPath()); final IActionParameter actionParameter = parameter.createActionParameter(callbackProperty); action.addParameter(actionParameter); }); } } }); }</code><technical_language>Potentially is error. Consider following: parameters = {"incorrectTarget", "correct/target"} action method declaration: action(@Option("i") String incorrect, @Option("c") String correct) incorrectTarget ignored, i parameter in action method is ignored. Thus, 2nd iteration current code try map correct/target i parameter. (maybe need call expectedParameters.next() in else branch)</technical_language>

Target:
public void resolveParameters(final Map<String, IElementParameter> settings) { final Iterator<PropertyDefinitionDecorator> expectedParameters = PropertyDefinitionDecorator.wrap(actionRef.getProperties()) .stream() .filter(p -> p.getParameter().isRoot()) .sorted(comparing(p -> p.getParameter().getIndex())) .iterator(); final List<String> relativePaths = getRelativePaths(); relativePaths.forEach(relativePath -> { if (expectedParameters.hasNext()) { final Optional<String> absolutePath = pathResolver.resolvePath(getOwnerPath(), relativePath); if (absolutePath.isPresent()) { final List<TaCoKitElementParameter> parameters = findParameters(absolutePath.get(), settings); final SimplePropertyDefinition parameterRoot = expectedParameters.next(); parameters.forEach(parameter -> { parameter.registerListener("value", listener); if (redrawParameter != null) { parameter.setRedrawParameter(redrawParameter); } final String callbackProperty = parameter.getName().replaceFirst(absolutePath.get(), parameterRoot.getPath()); final IActionParameter actionParameter = parameter.createActionParameter(callbackProperty); action.addParameter(actionParameter); }); } } }); }