auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void forwardTopologyUpdateMessage(OnmsTopologyMessage message) { if (message.getMessagebody() instanceof OnmsTopologyVertex) { OnmsTopologyVertex vertex = (OnmsTopologyVertex) message.getMessagebody(); final OpennmsModelProtos.TopologyVertex mappedTopoMsg = protobufMapper.toVertexTopologyMessage(message.getProtocol().getId(),vertex).build(); forwardTopologyVertexMessage(mappedTopoMsg.getRef().toByteArray(), mappedTopoMsg.toByteArray()); } else if (message.getMessagebody() instanceof OnmsTopologyEdge) { OnmsTopologyEdge edge = (OnmsTopologyEdge) message.getMessagebody(); final OpennmsModelProtos.TopologyEdge mappedTopoMsg = protobufMapper.toEdgeTopologyMessage(message.getProtocol().getId(),edge).build(); forwardTopologyEdgeMessage(mappedTopoMsg.getRef().toByteArray(), mappedTopoMsg.toByteArray()); } else if (message.getMessagebody() instanceof OnmsTopologySegment) { OnmsTopologySegment edge = (OnmsTopologySegment) message.getMessagebody(); final OpennmsModelProtos.TopologySegment mappedTopoMsg = protobufMapper.toSegmentTopologyMessage(message.getProtocol().getId(),edge).build(); <START> forwardTopologySegmentMessage(mappedTopoMsg.getRef().toByteArray(), <END> mappedTopoMsg.toByteArray()); } else { LOG.error("forwardTopologyUpdateMessage: no supported update class {}", message.getMessagebody().getClass().getName()); } }</code><technical_language>model segments vertices send existing "vertex" topic instead of creating a separate topic for segments? segments "special" vertices</technical_language>

Target:
private void forwardTopologyUpdateMessage(OnmsTopologyMessage message) { if (message.getMessagebody() instanceof OnmsTopologyVertex) { OnmsTopologyVertex vertex = (OnmsTopologyVertex) message.getMessagebody(); final OpennmsModelProtos.TopologyVertex mappedTopoMsg = protobufMapper.toVertexTopologyMessage(message.getProtocol().getId(),vertex).build(); forwardTopologyVertexMessage(mappedTopoMsg.getRef().toByteArray(), mappedTopoMsg.toByteArray()); } else if (message.getMessagebody() instanceof OnmsTopologyEdge) { OnmsTopologyEdge edge = (OnmsTopologyEdge) message.getMessagebody(); final OpennmsModelProtos.TopologyEdge mappedTopoMsg = protobufMapper.toEdgeTopologyMessage(message.getProtocol().getId(),edge).build(); forwardTopologyEdgeMessage(mappedTopoMsg.getRef().toByteArray(), mappedTopoMsg.toByteArray()); } else { LOG.error("forwardTopologyUpdateMessage: no supported update class {}", message.getMessagebody().getClass().getName()); } }
Source:
<code>protected void onHandleIntent(@Nullable final Intent intent) { <START> if (Build.VERSION.SDK_INT < 7 || hasActiveNetwork()) { <END> if (intent == null) { return; } final Serializable serializable = intent.getSerializableExtra(KEY_CHOICE); if (!(serializable instanceof Choice)) { return; } Choice playerChoice = (Choice) serializable; handleChoice(playerChoice); } else { NetworkStateReceiver networkStateReceiver = new NetworkStateReceiver(); ConnectivityManager connectivityManager = (ConnectivityManager) getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE); networkStateReceiver.enable(getApplicationContext()); networkStateReceiver.setService(this); connectivityManager.registerDefaultNetworkCallback(networkStateReceiver); } }</code><technical_language>suggestion if (Build.VERSION.SDK_INT < 24 || hasActiveNetwork()) {</technical_language>

Target:
protected void onHandleIntent(@Nullable final Intent intent) { if (Build.VERSION.SDK_INT < 24 || hasActiveNetwork()) { if (intent == null) { return; } final Serializable serializable = intent.getSerializableExtra(KEY_CHOICE); if (!(serializable instanceof Choice)) { return; } Choice playerChoice = (Choice) serializable; handleChoice(playerChoice); } else { NetworkStateReceiver networkStateReceiver = new NetworkStateReceiver(); ConnectivityManager connectivityManager = (ConnectivityManager) getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE); networkStateReceiver.enable(getApplicationContext()); networkStateReceiver.setService(this); connectivityManager.registerDefaultNetworkCallback(networkStateReceiver); } }
Source:
<code>private static void deeplyPrint(IStatus status, PrintStream strm, boolean stackTrace, int level) { appendLevelString(strm, level); String msg = status.getMessage(); strm.println(msg); Throwable cause = status.getException(); if (cause != null) { strm.print("Caused by: "); if (stackTrace || !(msg.equals(cause.getMessage()) || msg.equals(cause.toString()))) deeplyPrint(cause, strm, stackTrace, level); } if (status.isMultiStatus()) { IStatus[] children = status.getChildren(); for (IStatus <START> children1 : <END> children) { deeplyPrint(children1, strm, stackTrace, level + 1); } } }</code><technical_language>child is proper name</technical_language>

Target:
private static void deeplyPrint(IStatus status, PrintStream strm, boolean stackTrace, int level) { appendLevelString(strm, level); String msg = status.getMessage(); strm.println(msg); Throwable cause = status.getException(); if (cause != null) { strm.print("Caused by: "); if (stackTrace || !(msg.equals(cause.getMessage()) || msg.equals(cause.toString()))) deeplyPrint(cause, strm, stackTrace, level); } if (status.isMultiStatus()) { IStatus[] children = status.getChildren(); for (IStatus child : children) { deeplyPrint(child, strm, stackTrace, level + 1); } } }
Source:
<code>public static void copyToFileAndClose(InputStream is, File file, long timeout) throws IOException, TimeoutException { OutputStream os = null; try { file.getParentFile().mkdirs(); os = new BufferedOutputStream(new FileOutputStream(file)); copyWithTimeout(is, os, timeout); } finally { CloseQuietly.close(is); <START> CloseQuietly.close(os); <END> } }</code><technical_language>try resources</technical_language>

Target:
public static void copyToFileAndClose(InputStream is, File file, long timeout) throws IOException, TimeoutException { file.getParentFile().mkdirs(); try (OutputStream os = new BufferedOutputStream(new FileOutputStream(file))) { copyWithTimeout(is, os, timeout); } finally { Closeables.closeQuietly(is); } }
Source:
<code>public boolean isAction() { <START> List<String> nonActionMethodNames = new ArrayList<>(Arrays.asList("add", "get", "list", "update", "remove")); <END> if (nonActionMethodNames.contains(getName().toString().toLowerCase()) || (base!=null && nonActionMethodNames.contains(base.getName().toString().toLowerCase()))) { return false; } else { return true; } }</code><technical_language>This a constant, is created once: private static final Set<Name> ACTION_METHOD_NAMES = ...;</technical_language>

Target:
public boolean isAction() { return !(NON_ACTION_METHOD_NAMES.contains(getName()) || (base!=null && NON_ACTION_METHOD_NAMES.contains(base.getName()))); }
Source:
<code>RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { for (;;) { final DepthCommit c = (DepthCommit)pending.next(); if (c == null) return null; if ((c.flags & RevWalk.PARSED) == 0) c.parseHeaders(walk); if (c.depth > depth) { c.flags |= UNINTERESTING; continue; } if (c.depth == depth) c.add(SHALLOW); int newDepth = c.depth + 1; for (final RevCommit p : c.parents) { DepthCommit dp = (DepthCommit)p; boolean add = false; if (dp.depth == -1) { dp.depth = newDepth; add = true; } if ((c.flags & UNINTERESTING) == 0 && ((p.flags & UNINTERESTING) != 0) && (BOUNDARY != null) && !p.has(BOUNDARY)) { <START> if (BOUNDARY != null) <END> p.add(BOUNDARY); add = true; } if (add) pending.add(p); } return c; } }</code><technical_language>This condition is redundant, enter this block true</technical_language>

Target:
RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { for (;;) { final DepthCommit c = (DepthCommit)pending.next(); if (c == null) return null; if ((c.flags & RevWalk.PARSED) == 0) c.parseHeaders(walk); if (c.depth > depth) { c.flags |= UNINTERESTING; continue; } if (c.depth == depth) c.add(SHALLOW); int newDepth = c.depth + 1; for (final RevCommit p : c.parents) { DepthCommit dp = (DepthCommit)p; boolean add = false; if (dp.depth == -1) { dp.depth = newDepth; add = true; } if ((c.flags & UNINTERESTING) == 0 && ((p.flags & UNINTERESTING) != 0) && (BOUNDARY != null) && !p.has(BOUNDARY)) { p.add(BOUNDARY); add = true; } if (add) pending.add(p); } return c; } }
Source:
<code>public URI getWebUri() { if (webUri == null) { try { webUri = new URI("http://localhost:8080"); } catch (URISyntaxException e) { throw new RuntimeException(e); } try { if (undertowSubsystem == null) { <START> undertowSubsystem = readResource(PathAddress.pathAddress("subsystem",UNDERTOW)); <END> } } catch (Exception e) { throw new RuntimeException(e); } if (undertowSubsystem.isDefined()) { List<Property> vhosts = undertowSubsystem.get("server").asPropertyList(); ModelNode socketBinding = new ModelNode(); if (!vhosts.isEmpty()) { socketBinding = vhosts.get(0).getValue().get("http-listener", "default").get("socket-binding"); } if (socketBinding.isDefined()) { webUri = getBinding("http", socketBinding.asString()); } } } return webUri; }</code><technical_language>PathAddress controller a dependency</technical_language>

Target:
public URI getWebUri() { if (webUri == null) { try { webUri = new URI("http://localhost:8080"); } catch (URISyntaxException e) { throw new RuntimeException(e); } try { if (undertowSubsystem == null) { ModelNode address = new ModelNode(); address.add("subsystem", UNDERTOW); undertowSubsystem = readResource(address); } } catch (Exception e) { throw new RuntimeException(e); } if (undertowSubsystem.isDefined()) { List<Property> vhosts = undertowSubsystem.get("server").asPropertyList(); ModelNode socketBinding = new ModelNode(); if (!vhosts.isEmpty()) { socketBinding = vhosts.get(0).getValue().get("http-listener", "default").get("socket-binding"); } if (socketBinding.isDefined()) { webUri = getBinding("http", socketBinding.asString()); } } } return webUri; }
Source:
<code>public void sort() { final int numTuples = table.numTuples(); indexes = new ArrayList<>(); indexes.ensureCapacity(numTuples); for (int i = 0; i < numTuples; i++) { indexes.add(i); } TupleComparator comparator = new TupleComparator(); Collections.sort(indexes, comparator); for (int rowIdx = 0; rowIdx < numTuples; rowIdx++) { for (int columnIdx = 0; columnIdx < getSchema().numColumns(); columnIdx++) { int sourceRow = indexes.get(rowIdx); int tupleIdx = table.getTupleIndexInContainingTB(sourceRow); <START> ans.put(columnIdx, table.getColumn(columnIdx, sourceRow), tupleIdx); <END> } } }</code><technical_language>This usage suggests TupleBatchBuffer/MutableTupleBuffer API high-level enough: ordinary client worry finding correct TupleBatch, extracting correct column it, calculating correct row offset column. source/destination row/column offsets values. I a symptom of this is getTupleIndexInContainingTB() is a public API, I necessary (the implementations handling calculation themselves)</technical_language>

Target:
public void sort() { final int numTuples = table.numTuples(); indexes = new ArrayList<>(); indexes.ensureCapacity(numTuples); for (int i = 0; i < numTuples; i++) { indexes.add(i); } TupleComparator comparator = new TupleComparator(); Collections.sort(indexes, comparator); for (int rowIdx = 0; rowIdx < numTuples; rowIdx++) { ans.append(table, indexes.get(rowIdx)); } }
Source:
<code>private void backupWallet(final String backupPassword) { try { final Protos.Wallet walletProto = new WalletProtobufSerializer().walletToProto(wallet); SecurityGuard securityGuard = new SecurityGuard(); if (wallet.isEncrypted()) { String walletPassword = securityGuard.retrievePassword(); <START> backgroundThread = new HandlerThread("backgroundThread", Process.THREAD_PRIORITY_BACKGROUND); backgroundThread.start(); backgroundHandler = new Handler(backgroundThread.getLooper()); <END> final Wallet decryptedWallet = new WalletProtobufSerializer().readWallet(Constants.NETWORK_PARAMETERS, null, walletProto); new DeriveKeyTask(backgroundHandler, application.scryptIterationsTarget()) { @Override protected void onSuccess(KeyParameter encryptionKey, boolean changed) { decryptedWallet.decrypt(encryptionKey); backupWallet(decryptedWallet, backupPassword); } @Override protected void onFailure(KeyCrypterException ex) { super.onFailure(ex); handleError(ex); } }.deriveKey(decryptedWallet, walletPassword); } else { backupWallet(wallet, backupPassword); } } catch (GeneralSecurityException | IOException | UnreadableWalletException x) { handleError(x); } }</code><technical_language>This (or should) moved BackupWalletDialogFragment.onCreate(...) a one-time operation</technical_language>

Target:
private void backupWallet(final String backupPassword) { try { final Protos.Wallet walletProto = new WalletProtobufSerializer().walletToProto(wallet); SecurityGuard securityGuard = new SecurityGuard(); if (wallet.isEncrypted()) { String walletPassword = securityGuard.retrievePassword(); final Wallet decryptedWallet = new WalletProtobufSerializer().readWallet(Constants.NETWORK_PARAMETERS, null, walletProto); new DeriveKeyTask(backgroundHandler, application.scryptIterationsTarget()) { @Override protected void onSuccess(KeyParameter encryptionKey, boolean changed) { decryptedWallet.decrypt(encryptionKey); backupWallet(decryptedWallet, backupPassword); } @Override protected void onFailure(KeyCrypterException ex) { super.onFailure(ex); handleError(ex); } }.deriveKey(decryptedWallet, walletPassword); } else { backupWallet(wallet, backupPassword); } } catch (GeneralSecurityException | IOException | UnreadableWalletException x) { handleError(x); } }
Source:
<code>private void deliverMessages() { try { log.trace("{} Delivering batch of messages to task", this, messageBatch.size()); long start = time.milliseconds(); task.put(new ArrayList<>(messageBatch)); <START> if (workerErrantRecordReporter != null && workerErrantRecordReporter.mustThrowException()) { throw workerErrantRecordReporter.getExceptionToThrow(); } <END> recordBatch(messageBatch.size()); sinkTaskMetricsGroup.recordPut(time.milliseconds() - start); currentOffsets.putAll(origOffsets); messageBatch.clear(); if (pausedForRedelivery) { if (!shouldPause()) resumeAll(); pausedForRedelivery = false; } } catch (RetriableException e) { log.error("{} RetriableException from SinkTask:", this, e); pausedForRedelivery = true; pauseAll(); } catch (Throwable t) { log.error("{} Task threw an uncaught and unrecoverable exception. Task is being killed and will not " + "recover until manually restarted. Error: {}", this, t.getMessage(), t); throw new ConnectException("Exiting WorkerSinkTask due to unrecoverable exception.", t); } }</code><technical_language>instead, check: if (retryWithToleranceOperator.failed()) { throw retryWithToleranceOperator.error(); } storing error in processing context. expose operator</technical_language>

Target:
private void deliverMessages() { try { log.trace("{} Delivering batch of messages to task", this, messageBatch.size()); long start = time.milliseconds(); task.put(new ArrayList<>(messageBatch)); if (retryWithToleranceOperator.failed() && !retryWithToleranceOperator.withinToleranceLimits()) { throw new ConnectException("Tolerance exceeded in error handler", retryWithToleranceOperator.error()); } recordBatch(messageBatch.size()); sinkTaskMetricsGroup.recordPut(time.milliseconds() - start); currentOffsets.putAll(origOffsets); messageBatch.clear(); if (pausedForRedelivery) { if (!shouldPause()) resumeAll(); pausedForRedelivery = false; } } catch (RetriableException e) { log.error("{} RetriableException from SinkTask:", this, e); pausedForRedelivery = true; pauseAll(); } catch (Throwable t) { log.error("{} Task threw an uncaught and unrecoverable exception. Task is being killed and will not " + "recover until manually restarted. Error: {}", this, t.getMessage(), t); throw new ConnectException("Exiting WorkerSinkTask due to unrecoverable exception.", t); } }
Source:
<code>void insert(BranchInfo info) { <START> if (!match.equals("") || match != null) { <END> if (!info.getShortName().contains(match)) { return; } } if (table.getRowCount() <= pageSize || pageSize == 0) { Comparator<BranchInfo> c = new Comparator<BranchInfo>() { @Override public int compare(BranchInfo a, BranchInfo b) { return a.ref().compareTo(b.ref()); } }; int insertPos = getInsertRow(c, info); if (insertPos >= 0) { table.insertRow(insertPos); applyDataRowStyle(insertPos); populate(insertPos, info); } } else { setupNavigationLink(next, null, ProjectBranchesScreen.this.start + pageSize); } }</code><technical_language>This fully correct. If 'match' null, 'match.equals' fails a NullPointerException, if match null enter if block, if removed. if condition ('!match.equals("")') is false (when match = ""), condition ('match != null') is true, condition effect. this be: match != null && !match.equals("")</technical_language>

Target:
void insert(BranchInfo info) { if (match != null && !match.equals("") && !info.getShortName().contains(match)) { return; } if (table.getRowCount() <= pageSize || pageSize == 0) { Comparator<BranchInfo> c = new Comparator<BranchInfo>() { @Override public int compare(BranchInfo a, BranchInfo b) { return a.ref().compareTo(b.ref()); } }; int insertPos = getInsertRow(c, info); if (insertPos >= 0) { table.insertRow(insertPos); applyDataRowStyle(insertPos); populate(insertPos, info); } } else { setupNavigationLink(next, match, ProjectBranchesScreen.this.start + pageSize); } }
Source:
<code>public CompletableFuture<?> start(IndexManagerStartContext context) { try { lifecycleStrategy = createLifecycleStrategy( context.getConfigurationPropertySource() ); serialOrchestrator.start(); parallelOrchestrator.start(); return lifecycleStrategy.onStart( administrationClient, context ); } catch (RuntimeException e) { new SuppressingCloser( e ) .push( ElasticsearchWorkOrchestratorImplementor::start, parallelOrchestrator ) <START> .push( ElasticsearchWorkOrchestratorImplementor::start, serialOrchestrator ); <END> throw e; } }</code><technical_language>ElasticsearchWorkOrchestratorImplementor::stop</technical_language>

Target:
public CompletableFuture<?> start(IndexManagerStartContext context) { try { lifecycleStrategy = createLifecycleStrategy( context.getConfigurationPropertySource() ); serialOrchestrator.start(); parallelOrchestrator.start(); return lifecycleStrategy.onStart( administrationClient, context ); } catch (RuntimeException e) { new SuppressingCloser( e ) .push( ElasticsearchWorkOrchestratorImplementor::stop, parallelOrchestrator ) .push( ElasticsearchWorkOrchestratorImplementor::stop, serialOrchestrator ); throw e; } }
Source:
<code>public void testResource() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(ImportControlCheck.class); checkConfig.addAttribute("file", <START> "/com/puppycrawl/tools/checkstyle/checks/imports/import-control_one.xml"); <END> final String[] expected = {"5:1: " + getCheckMessage(MSG_DISALLOWED, "java.io.File")}; verify(checkConfig, getPath("InputImportControl.java"), expected); }</code><technical_language>declare full path created method getResourcePath this simple? Lets change this new method</technical_language>

Target:
public void testResource() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(ImportControlCheck.class); checkConfig.addAttribute("file", getResourcePath("import-control_one.xml")); final String[] expected = {"5:1: " + getCheckMessage(MSG_DISALLOWED, "java.io.File")}; verify(checkConfig, getPath("InputImportControl.java"), expected); }
Source:
<code>public GsonJsonArray(com.google.gson.JsonArray jsonArray) { <START> this.jsonArray = jsonArray; <END> }</code><technical_language>do a null check ctrs of core.json type takes gson types (same for jackson)? methods in types assume instance wraps is null</technical_language>

Target:
public GsonJsonArray(com.google.gson.JsonArray jsonArray) { this.jsonArray = Objects.requireNonNull(jsonArray, "'jsonArray' cannot be null."); }
Source:
<code>int read() throws IOException; } public static @Nullable String readNextEventString(IReaderWrapper parser) throws IOException { StringBuffer sb = new StringBuffer(); int scope = -1; int arrScope = 0; boolean inQuotes = false; int elem = parser.read(); <START> while (elem != -1 && elem < 128) { <END> if (elem == '"') { inQuotes = !inQuotes; } else { if (inQuotes) { } else if (elem == '[') { arrScope++; } else if (elem == ']') { if (arrScope > 0) { arrScope--; } else { return null; } } else if (elem == '{') { scope++; } else if (elem == '}') { if (scope > 0) { scope--; } else if (scope == 0) { sb.append((char) elem); return sb.toString(); } } } if (scope >= 0) { sb.append((char) elem); } elem = parser.read(); } return null; }</code><technical_language>Try a json accent in it. :)</technical_language>

Target:
int read() throws IOException; } public static @Nullable String readNextEventString(IReaderWrapper parser) throws IOException { StringBuffer sb = new StringBuffer(); int scope = -1; int arrScope = 0; boolean inQuotes = false; int elem = parser.read(); while (elem != -1) { if (elem == '"') { inQuotes = !inQuotes; } else { if (inQuotes) { } else if (elem == '[') { arrScope++; } else if (elem == ']') { if (arrScope > 0) { arrScope--; } else { return null; } } else if (elem == '{') { scope++; } else if (elem == '}') { if (scope > 0) { scope--; } else if (scope == 0) { sb.append((char) elem); return sb.toString(); } } } if (scope >= 0) { sb.append((char) elem); } elem = parser.read(); } return null; }
Source:
<code>public void readFields(DataInput in) throws IOException { String className = WritableUtils.readString(in); Class clazz; if (className.isEmpty()) { clazz = Message.class; } else { try { clazz = Class.forName(className); } catch (ClassNotFoundException ex) { throw new IllegalArgumentException("Byte stream does not have a " + "valid class identifier", ex); } } <START> this.setConverter(clazz); <END> super.readFields(in); }</code><technical_language>pretty setConvert(Message.class) runtime exceptions. I this set a converter if class</technical_language>

Target:
public void readFields(DataInput in) throws IOException { super.readFields(in); String className = WritableUtils.readString(in); if (!className.isEmpty()) { Class clazz; try { clazz = Class.forName(className); } catch (ClassNotFoundException ex) { throw new IllegalArgumentException("Byte stream does not have a " + "valid class identifier", ex); } this.setConverter(clazz); } }
Source:
<code>public GeoEntry queryById(String id) throws GeoEntryQueryException { if (StringUtils.isBlank(id)) { <START> throw new IllegalArgumentException(); <END> } Filter textFilter = filterBuilder.attribute(Core.ID).is().text(id); Filter queryFilter = filterBuilder.allOf(tagFilter, textFilter); QueryResponse queryResponse; try { queryResponse = catalogFramework.query(new QueryRequestImpl(new QueryImpl(queryFilter))); } catch (UnsupportedQueryException | SourceUnavailableException | FederationException e) { throw new GeoEntryQueryException(ERROR_MESSAGE, e); } if (!queryResponse.getResults().isEmpty()) { Result result = queryResponse.getResults().get(0); return transformMetacardToGeoEntry(result.getMetacard()); } return null; }</code><technical_language>include a message</technical_language>

Target:
public GeoEntry queryById(String id) throws GeoEntryQueryException { if (StringUtils.isBlank(id)) { throw new IllegalArgumentException("id cannot be blank or null"); } Filter idFilter = filterBuilder.attribute(Core.ID).is().text(id); Filter queryFilter = filterBuilder.allOf(tagFilter, idFilter); QueryResponse queryResponse; try { queryResponse = catalogFramework.query(new QueryRequestImpl(new QueryImpl(queryFilter))); } catch (UnsupportedQueryException | SourceUnavailableException | FederationException e) { throw new GeoEntryQueryException(ERROR_MESSAGE, e); } if (!queryResponse.getResults().isEmpty()) { Result result = queryResponse.getResults().get(0); return transformMetacardToGeoEntry(result.getMetacard()); } return null; }
Source:
<code>static List<Image> provideWindowIcons() { if (SystemUtils.IS_OS_MAC) { <START> return new ArrayList<>(); <END> } ArrayList<Image> icons = new ArrayList<>(); icons.add(new Image(FxApplicationModule.class.getResourceAsStream("/window_icon_32.png"))); icons.add(new Image(FxApplicationModule.class.getResourceAsStream("/window_icon_512.png"))); return icons; }</code><technical_language>I prefer static utility methods constructors (gives JVM more room for internal optimizations future updates): suggestion return Collections.emptyList();</technical_language>

Target:
static List<Image> provideWindowIcons() { if (SystemUtils.IS_OS_MAC) { return Collections.emptyList(); } try { return List.of(createImageFromResource("/window_icon_32.png"), createImageFromResource("/window_icon_512.png")); } catch (IOException e) { return Collections.emptyList(); } }
Source:
<code>public static void input(@AggregationState AreaUnderRocCurveState state, @SqlType(StandardTypes.BOOLEAN) boolean label, @SqlType(StandardTypes.DOUBLE) double score) { <START> MultiKeyValuePairs pairs = state.get(); <END> if (pairs == null) { pairs = new MultiKeyValuePairs(BOOLEAN, DOUBLE); state.set(pairs); } BlockBuilder labelBlockBuilder = BOOLEAN.createBlockBuilder(new BlockBuilderStatus(), 1); BOOLEAN.writeBoolean(labelBlockBuilder, label); BlockBuilder scoreBlockBuilder = DOUBLE.createBlockBuilder(new BlockBuilderStatus(), 1); DOUBLE.writeDouble(scoreBlockBuilder, score); long startSize = pairs.estimatedInMemorySize(); pairs.add(labelBlockBuilder.build(), scoreBlockBuilder.build(), 0, 0); state.addMemoryUsage(pairs.estimatedInMemorySize() - startSize); }</code><technical_language>elaborate, this (effectively, a set of interleaved linked lists) // entry group. entry is index of element of group // in labels/scores/nextLinks arrays int[] heads; // entry score/label entry. // in nextLinks contains index of next in chain. A of -1 // for group boolean[] labels; double[] scores; int[] nextLinks; // index of next free element in labels/scores/nextLinks arrays. This is needed able // continue adding elements arrays resized. int nextFree; Adding element a group like: labels[nextFree] = label; scores[nextFree] = score; nextLinks[nextFree] = heads[group]; heads[group] = nextFree; nextFree++;</technical_language>

Target:
public static void input(@AggregationState AreaUnderRocCurveState state, @SqlType(StandardTypes.BOOLEAN) boolean label, @SqlType(StandardTypes.DOUBLE) double score) { GroupedAreaUnderRocCurve auc = state.get(); BlockBuilder labelBlockBuilder = BOOLEAN.createBlockBuilder(new BlockBuilderStatus(), 1); BOOLEAN.writeBoolean(labelBlockBuilder, label); BlockBuilder scoreBlockBuilder = DOUBLE.createBlockBuilder(new BlockBuilderStatus(), 1); DOUBLE.writeDouble(scoreBlockBuilder, score); long startSize = auc.estimatedInMemorySize(); auc.add(labelBlockBuilder.build(), scoreBlockBuilder.build(), 0, 0); state.addMemoryUsage(auc.estimatedInMemorySize() - startSize); }
Source:
<code>private boolean valueTypeMatchesParameterType(Object value, MBeanParameterInfo paramInfo) { Class<? extends Object> valueClass = value.getClass(); if (valueClass.getName().equals(paramInfo.getType())) { return true; } else { <START> String primitiveTypeName = primitiveWrapperToPrimitiveTypeName.get(valueClass); <END> return primitiveTypeName != null && primitiveTypeName.equals(paramInfo.getType()); } }</code><technical_language>org.apache.commons.lang.ClassUtils#wrapperToPrimitive(valueClass) instead? com.google.common.primitives.Primitives#unwrap(valueClass) other side org.springframework.util.ClassUtils isPrimitiveWrapper, is unwrap?.. introduce org.springframework.integration.util.ClassUtils#wrapperToPrimitive(Class<T> type)</technical_language>

Target:
private boolean valueTypeMatchesParameterType(Object value, MBeanParameterInfo paramInfo) { Class<? extends Object> valueClass = value.getClass(); if (valueClass.getName().equals(paramInfo.getType())) { return true; } else { Class<?> primitiveType = ClassUtils.resolvePrimitiveType(valueClass); return primitiveType != null && primitiveType.getName().equals(paramInfo.getType()); } }
Source:
<code>private TargetBundle[] readBundleInfosFromConfigIni(URI configArea) { File configIni = new File(configArea); configIni = new File(configIni, CONFIG_INI); if (!configIni.isFile()) { return null; } Properties configProps = new Properties(); try (FileInputStream fis = new FileInputStream(configIni)) { configProps.load(fis); } catch (IOException e) { PDECore.log(e); return null; } String osgiBundles = configProps.getProperty("osgi.bundles"); if (osgiBundles == null || osgiBundles.isEmpty()) { return null; } return Arrays.stream(osgiBundles.split(",")) .map(entry -> entry.split("@")[0]) .map(location -> location.startsWith("reference:") ? location.substring("reference:".length()) : location) .map(URI::create) .map(File::new) .map(file -> { try { return new TargetBundle(file); } catch (CoreException e) { <START> return null; <END> } }).filter(Objects::nonNull) .toArray(TargetBundle[]::new); }</code><technical_language>this return InvalidTargetBundle</technical_language>

Target:
private TargetBundle[] readBundleInfosFromConfigIni(URI configArea) { File configIni = new File(configArea); configIni = new File(configIni, CONFIG_INI); if (!configIni.isFile()) { return null; } Properties configProps = new Properties(); try (FileInputStream fis = new FileInputStream(configIni)) { configProps.load(fis); } catch (IOException e) { PDECore.log(e); return null; } String osgiBundles = configProps.getProperty("osgi.bundles"); if (osgiBundles == null || osgiBundles.isEmpty()) { return null; } String osgiFramework = configProps.getProperty("osgi.framework"); if (osgiFramework != null && !osgiFramework.isEmpty()) { osgiBundles = osgiFramework + ',' + osgiBundles; } return Arrays.stream(osgiBundles.split(",")) .map(entry -> entry.split("@")[0]) .map(location -> location.startsWith("reference:") ? location.substring("reference:".length()) : location) .map(URI::create) .map(File::new) .map(file -> { try { return new TargetBundle(file); } catch (CoreException e) { return new InvalidTargetBundle(new BundleInfo(file.toURI()), e.getStatus()); } }).filter(Objects::nonNull) .toArray(TargetBundle[]::new); }
Source:
<code>public static Path zipDirectory(Path source, Path target, CopyOption... options) throws IOException { <START> if (!source.toFile().isDirectory()) { <END> throw new IllegalArgumentException("Source argument must be a directory to zip"); } URI uri = URI.create("jar:file:" + target.toString()); try (FileSystem zipfs = FileSystems.newFileSystem(uri, Collections.singletonMap("create", "true"))) { Files.walkFileTree(source, new SimpleFileVisitor<java.nio.file.Path>() { @Override public FileVisitResult preVisitDirectory(java.nio.file.Path dir, BasicFileAttributes attrs) throws IOException { if (source.equals(dir)) { return FileVisitResult.CONTINUE; } return visitFile(dir, attrs); } @Override public FileVisitResult visitFile(java.nio.file.Path file, BasicFileAttributes attrs) throws IOException { java.nio.file.Path relativePath = source.relativize(file); java.nio.file.Path pathInZipFile = zipfs.getPath(relativePath.toString()); Files.copy(file, pathInZipFile, options); return FileVisitResult.CONTINUE; } }); } return target; }</code><technical_language>!Files.isDirectory(source)</technical_language>

Target:
public static Path zipDirectory(Path source, Path target, CopyOption... options) throws IOException { if (!Files.isDirectory(source)) { throw new IllegalArgumentException("Source argument must be a directory to zip"); } URI uri = URI.create("jar:file:" + target.toString()); try (FileSystem zipfs = FileSystems.newFileSystem(uri, Collections.singletonMap("create", "true"))) { Files.walkFileTree(source, new SimpleFileVisitor<java.nio.file.Path>() { @Override public FileVisitResult preVisitDirectory(java.nio.file.Path dir, BasicFileAttributes attrs) throws IOException { if (source.equals(dir)) { return FileVisitResult.CONTINUE; } return visitFile(dir, attrs); } @Override public FileVisitResult visitFile(java.nio.file.Path file, BasicFileAttributes attrs) throws IOException { java.nio.file.Path relativePath = source.relativize(file); java.nio.file.Path pathInZipFile = zipfs.getPath(relativePath.toString()); Files.copy(file, pathInZipFile, options); return FileVisitResult.CONTINUE; } }); } return target; }
Source:
<code>public static StreamsAddressResponse getStreamsAddressResponse(long tail, List<UuidToStreamAddressSpacePairMsg> map) { return new StreamsAddressResponse(tail, map.stream() .collect(Collectors.<UuidToStreamAddressSpacePairMsg, UUID, StreamAddressSpace>toMap( <START> e -> getUUID(e.getStreamUuid()), <END> e -> getStreamAddressSpace(e.getAddressSpace())) )); }</code><technical_language>please rename e meaningful</technical_language>

Target:
public static StreamsAddressResponse getStreamsAddressResponse(long tail, List<UuidToStreamAddressSpacePairMsg> map) { return new StreamsAddressResponse(tail, map.stream() .collect(Collectors.<UuidToStreamAddressSpacePairMsg, UUID, StreamAddressSpace>toMap( entry -> getUUID(entry.getStreamUuid()), entry -> getStreamAddressSpace(entry.getAddressSpace())) )); }
Source:
<code><START> public void testDeleteCardNoFilter() throws Throwable { <END> int cardIndex = 0; this.expectedCards = new ArrayList<BaseballCard>(this.allCards); this.expectedCards.remove(cardIndex); this.solo.clickOnCheckBox(cardIndex + 1); Assert.assertTrue(this.solo.waitForView(R.id.delete_menu)); View deleteMenu = this.activity.findViewById(R.id.delete_menu); Assert.assertNotNull(deleteMenu); TouchUtils.clickView(this, deleteMenu); BBCTTestUtil.waitForToast(this.solo, BBCTTestUtil.DELETE_MESSAGE); ListView lv = (ListView) this.solo.getCurrentActivity().findViewById(android.R.id.list); BBCTTestUtil.assertListViewContainsItems(this.expectedCards, lv); }</code><technical_language>I remember some discussion for coming this logic of selecting cards randomly. decided remove that</technical_language>

Target:
public void testDeleteCardNoFilter() throws Throwable { int cardIndex = 0; this.expectedCards = new ArrayList<BaseballCard>(this.allCards); this.expectedCards.remove(cardIndex); this.solo.clickOnCheckBox(cardIndex + 1); Assert.assertTrue(this.solo.waitForView(R.id.delete_menu)); deleteCards(); ListView lv = (ListView) this.solo.getCurrentActivity().findViewById(android.R.id.list); BBCTTestUtil.assertListViewContainsItems(this.expectedCards, lv); }
Source:
<code>public LogicalPlan pruneOutputsExcept(Collection<Symbol> outputsToKeep) { HashSet<Symbol> toKeep = new HashSet<>(outputsToKeep); toKeep.removeAll(windowFunctions); List<Symbol> newStandalone = List.copyOf(toKeep); for (WindowFunction windowFunction : windowFunctions) { <START> toKeep.addAll(windowFunction.arguments()); <END> Symbol filter = windowFunction.filter(); if (filter != null) { toKeep.add(filter); } toKeep.addAll(windowFunction.windowDefinition().partitions()); OrderBy orderBy = windowFunction.windowDefinition().orderBy(); if (orderBy != null) { toKeep.addAll(orderBy.orderBySymbols()); } Symbol startOffsetValue = windowFunction.windowDefinition().windowFrameDefinition().start().value(); if (startOffsetValue != null) { toKeep.add(startOffsetValue); } Symbol endOffsetValue = windowFunction.windowDefinition().windowFrameDefinition().end().value(); if (endOffsetValue != null) { toKeep.add(endOffsetValue); } } LogicalPlan newSource = source.pruneOutputsExcept(toKeep); if (newSource == source) { return this; } return new WindowAgg( newSource, windowDefinition, windowFunctions, newStandalone ); }</code><technical_language>define a class extends DefaultTraversalSymbolVisitor in oder visit symbols window function, login in visitWindowFunction</technical_language>

Target:
public LogicalPlan pruneOutputsExcept(Collection<Symbol> outputsToKeep) { HashSet<Symbol> toKeep = new HashSet<>(); ArrayList<Symbol> newStandalone = new ArrayList<>(); ArrayList<WindowFunction> newWindowFunctions = new ArrayList<>(); for (Symbol outputToKeep : outputsToKeep) { SymbolVisitors.intersection(outputToKeep, windowFunctions, newWindowFunctions::add); SymbolVisitors.intersection(outputToKeep, standalone, newStandalone::add); } for (WindowFunction newWindowFunction : newWindowFunctions) { SymbolVisitors.intersection(newWindowFunction, source.outputs(), toKeep::add); } toKeep.addAll(newStandalone); LogicalPlan newSource = source.pruneOutputsExcept(toKeep); if (newSource == source) { return this; } return new WindowAgg(newSource, windowDefinition, List.copyOf(newWindowFunctions), List.copyOf(newStandalone)); }
Source:
<code>public List<VariableReferenceExpression> getOrderBy() { <START> return orderBy; <END> }</code><technical_language>Ideally, this helper functions in OrderingScheme. is specifically in LocalExecutionPlanner. move add a utility function</technical_language>

Target:
public List<Ordering> getOrderBy() { return orderBy; }
Source:
<code>public void updateFildsAfterOsChanged() { <START> model.startProgress(null); <END> deactivate(new ActivatedListener() { @Override public void activated() { model.stopProgress(); } }); VmBase vmBase = getSource(); maybeSetSingleQxlPci(vmBase); updateWatchdog(vmBase, false); updateBalloon(vmBase, false); maybeSetSelectedItem(model.getUsbPolicy(), vmBase.getUsbPolicy()); activate(); }</code><technical_language>this start/stop progress mechanism generic enough (and useful...), extracted some helper method</technical_language>

Target:
public void updateFildsAfterOsChanged() { deactivateAndStartProgress(); VmBase vmBase = getSource(); maybeSetSingleQxlPci(vmBase); updateWatchdog(vmBase, false); updateBalloon(vmBase, false); maybeSetSelectedItem(model.getUsbPolicy(), vmBase.getUsbPolicy()); activate(); }
Source:
<code>public void testWriteSamWithEmptyArray(Object emptyArray, Class<?> arrayClass, String fileExtension) throws IOException { Assert.assertEquals(emptyArray.getClass(), arrayClass); Assert.assertEquals(Array.getLength(emptyArray), 0); final String arrayTag = "XA"; final SAMRecordSetBuilder samRecords = new SAMRecordSetBuilder(); samRecords.addFrag("Read",0,100, false); final SAMRecord record = samRecords.getRecords().iterator().next(); record.setAttribute(arrayTag, emptyArray); checkArrayIsEmpty(arrayTag, record, arrayClass); final Path tmp = Files.createTempFile("tmp", fileExtension); IOUtil.deleteOnExit(tmp); <START> <END> final SAMFileWriterFactory writerFactory = new SAMFileWriterFactory() .setCreateMd5File(false) .setCreateIndex(false); final Path reference = IOUtil.getPath("src/test/resources/htsjdk/samtools/one-contig.fasta"); try(final SAMFileWriter samFileWriter = writerFactory.makeWriter(samRecords.getHeader(), false, tmp, reference)) { samFileWriter.addAlignment(record); } try(final SamReader reader = SamReaderFactory.makeDefault() .referenceSequence(reference) .open(tmp)) { final SAMRecordIterator iterator = reader.iterator(); Assert.assertTrue(iterator.hasNext()); final SAMRecord recordFromDisk = iterator.next(); checkArrayIsEmpty(arrayTag, recordFromDisk, arrayClass); } }</code><technical_language>missing space try line 1237</technical_language>

Target:
public void testWriteSamWithEmptyArray(Object emptyArray, Class<?> arrayClass, String fileExtension) throws IOException { Assert.assertEquals(emptyArray.getClass(), arrayClass); Assert.assertEquals(Array.getLength(emptyArray), 0); final SAMRecordSetBuilder samRecords = new SAMRecordSetBuilder(); samRecords.addFrag("Read", 0, 100, false); final SAMRecord record = samRecords.getRecords().iterator().next(); record.setAttribute(ARRAY_TAG, emptyArray); checkArrayIsEmpty(ARRAY_TAG, record, arrayClass); final Path tmp = Files.createTempFile("tmp", fileExtension); IOUtil.deleteOnExit(tmp); final SAMFileWriterFactory writerFactory = new SAMFileWriterFactory() .setCreateMd5File(false) .setCreateIndex(false); final Path reference = IOUtil.getPath("src/test/resources/htsjdk/samtools/one-contig.fasta"); try (final SAMFileWriter samFileWriter = writerFactory.makeWriter(samRecords.getHeader(), false, tmp, reference)) { samFileWriter.addAlignment(record); } try (final SamReader reader = SamReaderFactory.makeDefault() .referenceSequence(reference) .open(tmp)) { final SAMRecordIterator iterator = reader.iterator(); Assert.assertTrue(iterator.hasNext()); final SAMRecord recordFromDisk = iterator.next(); checkArrayIsEmpty(ARRAY_TAG, recordFromDisk, arrayClass); } }
Source:
<code>public static boolean isSpecialDevice(String device, VmDeviceGeneralType type) { switch(type) { case SOUND: return true; case CONSOLE: return VmDeviceType.CONSOLE.getName().equals(device); case SMARTCARD: return VmDeviceType.SMARTCARD.getName().equals(device); case REDIR: return VmDeviceType.SPICEVMC.getName().equals(device); case BALLOON: return VmDeviceType.MEMBALLOON.getName().equals(device); case WATCHDOG: return VmDeviceType.WATCHDOG.getName().equals(device); case RNG: return VmDeviceType.VIRTIO.getName().equals(device); case CONTROLLER: if (VmDeviceType.VIRTIOSERIAL.getName().equals(device)) { return true; } <START> if (VmDeviceType.VIRTIOSCSI.getName().equals(device)) { <END> return true; } return false; default: return VmDeviceType.USB.getName().equals(device); } }</code><technical_language>onle liner condition in line 305? this : if (VmDeviceType.VIRTIOSERIAL.getName().equals(device) || VmDeviceType.VIRTIOSCSI.getName().equals(device)) {</technical_language>

Target:
public static boolean isSpecialDevice(String device, VmDeviceGeneralType type) { switch(type) { case SOUND: return true; case CONSOLE: return VmDeviceType.CONSOLE.getName().equals(device); case SMARTCARD: return VmDeviceType.SMARTCARD.getName().equals(device); case REDIR: return VmDeviceType.SPICEVMC.getName().equals(device); case BALLOON: return VmDeviceType.MEMBALLOON.getName().equals(device); case WATCHDOG: return VmDeviceType.WATCHDOG.getName().equals(device); case RNG: return VmDeviceType.VIRTIO.getName().equals(device); case CONTROLLER: return VmDeviceType.VIRTIOSERIAL.getName().equals(device) || VmDeviceType.VIRTIOSCSI.getName().equals(device); default: return VmDeviceType.USB.getName().equals(device); } }
Source:
<code>public void WindowedWordCountTest() { LocalMode lma = LocalMode.newInstance(); Configuration conf = new Configuration(false); WindowedWordCount app = new WindowedWordCount(); try { lma.prepareDAG(app, conf); } catch (Exception e) { e.printStackTrace(); } LocalMode.Controller lc = lma.getController(); <START> lc.run(10000); <END> }</code><technical_language>ditto, exception handling verification. Please fix for occurrences</technical_language>

Target:
public void WindowedWordCountTest() throws Exception { LocalMode lma = LocalMode.newInstance(); Configuration conf = new Configuration(false); lma.prepareDAG(new WindowedWordCount(), conf); LocalMode.Controller lc = lma.getController(); ((StramLocalCluster)lc).setExitCondition(new Callable<Boolean>() { @Override public Boolean call() throws Exception { return WindowedWordCount.TextInput.isDone(); } }); lc.run(60000); Assert.assertEquals(127, countSum(WindowedWordCount.Collector.getResult())); Assert.assertEquals(28, countSumWord(WindowedWordCount.Collector.getResult(), "word2")); Assert.assertEquals(7, countSumWord(WindowedWordCount.Collector.getResult(), "error")); Assert.assertEquals(21, countSumWord(WindowedWordCount.Collector.getResult(), "word9")); Assert.assertEquals(1, countSumWord(WindowedWordCount.Collector.getResult(), "bye")); }
Source:
<code>public void findAll() throws Exception { getClient().perform(get("/api/config/submissionuploads")) <START> .andExpect(status().isForbidden()); <END> String token = getAuthToken(admin.getEmail(), password); getClient(token).perform(get("/api/config/submissionuploads")) .andExpect(status().isOk()) .andExpect(content().contentType(contentType)) .andExpect(jsonPath("$.page.size", is(20))) .andExpect(jsonPath("$.page.totalElements", greaterThanOrEqualTo(1))) .andExpect(jsonPath("$.page.totalPages", greaterThanOrEqualTo(1))) .andExpect(jsonPath("$.page.number", is(0))) .andExpect(jsonPath("$._links.self.href", Matchers.startsWith(REST_SERVER_URL + "config/submissionuploads"))) .andExpect(jsonPath("$._embedded.submissionuploads", hasSize(greaterThanOrEqualTo(1)))) ; }</code><technical_language>isUnauthorized 401</technical_language>

Target:
public void findAll() throws Exception { getClient().perform(get("/api/config/submissionuploads")) .andExpect(status().isUnauthorized()); String token = getAuthToken(admin.getEmail(), password); getClient(token).perform(get("/api/config/submissionuploads")) .andExpect(status().isOk()) .andExpect(content().contentType(contentType)) .andExpect(jsonPath("$.page.size", is(20))) .andExpect(jsonPath("$.page.totalElements", greaterThanOrEqualTo(1))) .andExpect(jsonPath("$.page.totalPages", greaterThanOrEqualTo(1))) .andExpect(jsonPath("$.page.number", is(0))) .andExpect(jsonPath("$._links.self.href", Matchers.startsWith(REST_SERVER_URL + "config/submissionuploads"))) .andExpect(jsonPath("$._embedded.submissionuploads", hasSize(greaterThanOrEqualTo(1)))) ; }
Source:
<code>private Converter newMessageConverter(final Message.Builder parentBuilder, final Descriptors.FieldDescriptor fieldDescriptor, Type parquetType) { boolean isRepeated = fieldDescriptor.isRepeated(); ParentValueContainer parent; if (isRepeated) { parent = new ParentValueContainer() { @Override public void add(Object value) { parentBuilder.addRepeatedField(fieldDescriptor, value); } }; } else { parent = new ParentValueContainer() { @Override public void add(Object value) { parentBuilder.setField(fieldDescriptor, value); } }; } <START> OriginalType originalType = parquetType.getOriginalType() == null ? OriginalType.UTF8 : parquetType.getOriginalType(); <END> switch (originalType) { case LIST: return new ListConverter(parentBuilder, fieldDescriptor, parquetType); case MAP: return new MapConverter(parentBuilder, fieldDescriptor, parquetType); default: return newScalarConverter(parent, parentBuilder, fieldDescriptor, parquetType); } }</code><technical_language>is condition ? original type null</technical_language>

Target:
private Converter newMessageConverter(final Message.Builder parentBuilder, final Descriptors.FieldDescriptor fieldDescriptor, Type parquetType) { boolean isRepeated = fieldDescriptor.isRepeated(); ParentValueContainer parent; if (isRepeated) { parent = new ParentValueContainer() { @Override public void add(Object value) { parentBuilder.addRepeatedField(fieldDescriptor, value); } }; } else { parent = new ParentValueContainer() { @Override public void add(Object value) { parentBuilder.setField(fieldDescriptor, value); } }; } if (OriginalType.LIST == parquetType.getOriginalType()) { return new ListConverter(parentBuilder, fieldDescriptor, parquetType); } if (OriginalType.MAP == parquetType.getOriginalType()) { return new MapConverter(parentBuilder, fieldDescriptor, parquetType); } return newScalarConverter(parent, parentBuilder, fieldDescriptor, parquetType); }
Source:
<code>public final void put(final int destColumn, final Column<?> sourceColumn, final int sourceRow) { Type t = sourceColumn.getType(); switch (t) { case BOOLEAN_TYPE: memSize++; break; case DATETIME_TYPE: break; case DOUBLE_TYPE: case LONG_TYPE: memSize += 8; break; case FLOAT_TYPE: case INT_TYPE: memSize += 4; break; case STRING_TYPE: <START> memSize += sourceColumn.getString(sourceRow).length(); <END> break; } TupleUtils.copyValue(sourceColumn, sourceRow, this, destColumn); }</code><technical_language>1. code tracks memSize needs run resource profiling is enabled. 2. handle mutation of strings. string is replaced</technical_language>

Target:
public final void put(final int destColumn, final Column<?> sourceColumn, final int sourceRow) { TupleUtils.copyValue(sourceColumn, sourceRow, this, destColumn); }