auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); Object result = null; try { switch (action) { case "start": <START> result = doStartProcess(request); <END> break; case "list": result = doProcessList(); break; case "status": result = doProcessStatusCheck(request); break; case "halt": result = doHaltProcess(request); break; case "haltAll": result = doHaltAllProcesses(request); break; case "purge": result = doPurgeCompleted(request); break; default: throw new Exception("Action not understood."); } } catch (Exception ex) { result = "Exception occurred "+ex.getMessage(); LOG.error(ex.getMessage() + " -- End of line.", ex); } Gson gson = new Gson(); gson.toJson(result, response.getWriter()); }</code><technical_language>this (and possibly of for matter) idempotent happen in context of a GET request. simpler change this POST splitting</technical_language>

Target:
protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException { String action = request.getRequestPathInfo().getSelectorString(); Object result = null; try { switch (action) { case "start": result = doStartProcess(request); break; case "list": result = doProcessList(); break; case "status": result = doProcessStatusCheck(request); break; case "halt": result = doHaltProcess(request); break; case "haltAll": case "halt.all": case "halt-all": result = doHaltAllProcesses(request); break; case "purge": result = doPurgeCompleted(request); break; default: throw new Exception("Action not understood."); } } catch (Exception ex) { result = "Exception occurred " + ex.getMessage(); LOG.error(ex.getMessage() + " -- End of line.", ex); } Gson gson = new Gson(); gson.toJson(result, response.getWriter()); }
Source:
<code>public Set<byte[]> getAllColumnNames() { <START> Set<byte[]> ret = Sets.newTreeSet(UnsignedBytes.lexicographicalComparator()); <END> if (dynamicColumn != null) { for (NameComponentDescription rowPart: dynamicColumn.getColumnNameDesc().getRowParts()) { ret.add(rowPart.getComponentName().getBytes()); } return ret; } for (NamedColumnDescription col : namedColumns) { ret.add(col.getShortName().getBytes()); } return ret; }</code><technical_language>nit: java if (dynamicColumn != null) { return dynamicColumn.getColumnNameDesc().getRowParts().stream() .map(rowPart -> rowPart.getComponentName().getBytes()) .collect(toCollection(() -> Sets.newTreeSet(UnsignedBytes.lexicographicalComparator()))); } else { return namedColumns.stream() .map(column -> getShortName().getBytes()) .collect(toCollection(() -> Sets.newTreeSet(UnsignedBytes.lexicographicalComparator()))); }</technical_language>

Target:
public Set<byte[]> getAllColumnNames() { if (dynamicColumn != null) { return dynamicColumn.getColumnNameDesc().getRowParts().stream() .map(rowPart -> rowPart.getComponentName().getBytes()) .collect(Collectors.toCollection(() -> Sets.newTreeSet(UnsignedBytes.lexicographicalComparator()))); } else { return namedColumns.stream() .map(column -> column.getShortName().getBytes()) .collect(Collectors.toCollection(() -> Sets.newTreeSet(UnsignedBytes.lexicographicalComparator()))); } }
Source:
<code>public synchronized void doExecute() throws SQLException { if (isDryRun() || shouldSkipTask()) { return; } initializeExecutor(); try { while(true) { MyRowCallbackHandler rch = new MyRowCallbackHandler(); getTxTemplate().execute(t -> { JdbcTemplate jdbcTemplate = newJdbcTemplate(); jdbcTemplate.setMaxRows(100000); <START> String sql = "SELECT * FROM " + getTableName() + " WHERE " + getColumnName() + " IS NULL"; <END> logInfo(ourLog, "Finding up to rows in that requires calculations", myBatchSize, getTableName()); jdbcTemplate.query(sql, rch); rch.done(); return null; }); rch.submitNext(); List<Future<?>> futures = rch.getFutures(); if (futures.isEmpty()) { break; } logInfo(ourLog, "Waiting for tasks to complete", futures.size()); for (Future<?> next : futures) { try { next.get(); } catch (Exception e) { throw new SQLException(e); } } } } finally { destroyExecutor(); } }</code><technical_language>this work for dates.. reason is for of dates (either SP_VALUE_HIGH SP_VALUE_LOW saved null if other isn't. For example if indexing a Period a start date finish date... gonna require SELECT HFJ_SPIDX_DATE SP_VALUE_LOW IS NULL SP_VALUE_LOW_ORDINAL IS NULL</technical_language>

Target:
public synchronized void doExecute() throws SQLException { if (isDryRun() || shouldSkipTask()) { return; } initializeExecutor(); try { while(true) { MyRowCallbackHandler rch = new MyRowCallbackHandler(); getTxTemplate().execute(t -> { JdbcTemplate jdbcTemplate = newJdbcTemplate(); jdbcTemplate.setMaxRows(100000); String sql = "SELECT * FROM " + getTableName() + " WHERE " + getWhereClause(); logInfo(ourLog, "Finding up to rows in that requires calculations, using query: {}", myBatchSize, getTableName(), sql); jdbcTemplate.query(sql, rch); rch.done(); return null; }); rch.submitNext(); List<Future<?>> futures = rch.getFutures(); if (futures.isEmpty()) { break; } logInfo(ourLog, "Waiting for tasks to complete", futures.size()); for (Future<?> next : futures) { try { next.get(); } catch (Exception e) { throw new SQLException(e); } } } } finally { destroyExecutor(); } }
Source:
<code>public void addOrUpdate(Storable storable) { if (storable == null) { throw new IllegalArgumentException("Invalid " + Storable.class.getSimpleName() + " : null"); } Connection connection = null; try { connection = getConnection(); PreparedStatement preparedStatement = new MySqlInsertUpdateDuplicate(storable) <START> .getPreparedStatement(connection, queryTimeoutSecs); <END> preparedStatement.executeUpdate(); } catch (SQLException e) { throw new StorageException(e); } finally { closeConnection(connection); } }</code><technical_language>couple connection, queryTimeout queryBuilder</technical_language>

Target:
public void addOrUpdate(Storable storable) throws StorageException { log.debug("Adding or updating storable [{}]", storable); sqlExecutor.insertOrUpdate(storable); }
Source:
<code>private Dialog getCheckListDialog() { CharSequence[] items = new CharSequence[mListItems.size()]; boolean[] checkedItems = new boolean[mListItems.size()]; for (int i = 0; i < mListItems.size(); i++) { items[i] = mListItems.get(i).mItemName; checkedItems[i] = mListItems.get(i).mIsChecked; } AlertDialog.Builder builder = new MaterialAlertDialogBuilder(getContext()) .setTitle(mTitleTextView.getText()) .setNegativeButton(android.R.string.cancel, null) .setPositiveButton(android.R.string.ok, (dialog, which) -> { <START> SparseBooleanArray checkedItems1 = <END> ((AlertDialog) dialog).getListView().getCheckedItemPositions(); mListItems.setCheckedItems(checkedItems1); doPrefChanged(); }) .setMultiChoiceItems(items, checkedItems, null); return builder.create(); }</code><technical_language>Nitpick: name checkedItems1 else? do this: mListItems.setCheckedItems(((AlertDialog) dialog).getListView().getCheckedItemPositions()); _P.S: Android Studio find MaterialAlertDialogBuilder for me, I play it._</technical_language>

Target:
private Dialog getCheckListDialog() { CharSequence[] items = new CharSequence[mListItems.size()]; boolean[] checkedItems = new boolean[mListItems.size()]; for (int i = 0; i < mListItems.size(); i++) { items[i] = mListItems.get(i).mItemName; checkedItems[i] = mListItems.get(i).mIsChecked; } AlertDialog.Builder builder = new MaterialAlertDialogBuilder(getContext()) .setTitle(mTitleTextView.getText()) .setNegativeButton(android.R.string.cancel, null) .setPositiveButton(android.R.string.ok, (dialog, which) -> { SparseBooleanArray userCheckedItems = ((AlertDialog) dialog).getListView().getCheckedItemPositions(); mListItems.setCheckedItems(userCheckedItems); doPrefChanged(); }) .setMultiChoiceItems(items, checkedItems, null); return builder.create(); }
Source:
<code>public void addDeferredTask(TaskWrapper task, long countdownTime) { Queue requiredQueue = QueueFactory.getQueue(task.getQueueName()); TaskOptions taskToBeAdded = TaskOptions.Builder.withUrl(task.getWorkerUrl()); if (countdownTime > 0) { taskToBeAdded.countdownMillis(countdownTime); <START> } <END> if (task.getRequestBody() == null) { for (Map.Entry<String, String[]> entry : task.getParamMap().entrySet()) { String name = entry.getKey(); String[] values = entry.getValue(); for (String value : values) { taskToBeAdded = taskToBeAdded.param(name, value); } } } else { taskToBeAdded = taskToBeAdded.payload(JsonUtils.toJson(task.getRequestBody())); } requiredQueue.add(taskToBeAdded); }</code><technical_language>If allow parameters body, more consistent REST API</technical_language>

Target:
public void addDeferredTask(TaskWrapper task, long countdownTime) { Queue requiredQueue = QueueFactory.getQueue(task.getQueueName()); TaskOptions taskToBeAdded = TaskOptions.Builder.withUrl(task.getWorkerUrl()); if (countdownTime > 0) { taskToBeAdded.countdownMillis(countdownTime); } if (task.getRequestBody() == null) { task.getParamMap().forEach((key, value) -> taskToBeAdded.param(key, value)); } else { taskToBeAdded.payload(JsonUtils.toJson(task.getRequestBody())); } requiredQueue.add(taskToBeAdded); }
Source:
<code>public void provideDynamicMetrics(MetricDescriptor descriptor, MetricsCollectionContext context) { <START> descriptor.withPrefix("nearCache"); <END> for (NearCache nearCache : nearCacheManager.listAllNearCaches()) { String nearCacheName = nearCache.getName(); NearCacheStatsImpl nearCacheStats = (NearCacheStatsImpl) nearCache.getNearCacheStats(); context.collect(descriptor.copy().withDiscriminator("name", nearCacheName), nearCacheStats); } }</code><technical_language>previously prefix nearcache, nearCache. if matters</technical_language>

Target:
public void provideDynamicMetrics(MetricDescriptor descriptor, MetricsCollectionContext context) { descriptor.withPrefix("nearcache"); for (NearCache nearCache : nearCacheManager.listAllNearCaches()) { String nearCacheName = nearCache.getName(); NearCacheStatsImpl nearCacheStats = (NearCacheStatsImpl) nearCache.getNearCacheStats(); context.collect(descriptor.copy().withDiscriminator("name", nearCacheName), nearCacheStats); } }
Source:
<code>public void initialize() { if (initialized.compareAndSet(false, true)) { taskStateMachine.addStateChangeListener(new StateChangeListener<TaskState>() { @Override <START> public void stateChanged(TaskState newState) <END> { if (newState.isDone()) { executionEndTime.set(DateTime.now()); endNanos.set(System.nanoTime()); } } }); } }</code><technical_language>this turned lambda</technical_language>

Target:
private void initialize() { taskStateMachine.addStateChangeListener(newState -> { if (newState.isDone()) { executionEndTime.set(DateTime.now()); endNanos.set(System.nanoTime()); } }); }
Source:
<code><START> public void testGetOsImage_404() throws Exception { <END> server.enqueue(response404()); OsImage osImage = api.getServerImageApi().getOsImage("id"); assertNull(osImage); assertSent(HttpMethod.GET, getImageUrl().appendPath("/osImage/id").toString()); }</code><technical_language>Configure tests assertions in this class properly verify DatacenterIdFilter is applied needed</technical_language>

Target:
public void testGetOsImage_404() throws Exception { server.enqueue(response404()); OsImage osImage = api.getServerImageApi().getOsImage("id"); assertNull(osImage); assertSent(HttpMethod.GET, getOsImageUrl().appendPath("/id").toString()); }
Source:
<code>private static WaitAllTracesOpened openTraceIfNecessary(IProject project, List<Path> tracePaths, Collection<TmfCommonProjectElement> existingTraces, IProgressMonitor monitor) { WaitAllTracesOpened waitService = new WaitAllTracesOpened(tracePaths, existingTraces); if (!existingTraces.isEmpty()) { Display.getDefault().asyncExec(() -> { for (TmfCommonProjectElement existingTrace : existingTraces) { if (monitor.isCanceled()) { return; } try { IStatus status = TmfOpenTraceHelper.openFromElement(existingTrace); <START> if (!status.isOK()) { <END> waitService.registerStatus(new Path(existingTrace.getLocation().getPath()), status); } } catch (Exception e) { waitService.registerException(new Path(existingTrace.getLocation().getPath()), e); } } }); } if (tracePaths.isEmpty()) { return waitService; } TmfTraceFolder destinationFolder = TmfProjectRegistry.getProject(project, true).getTracesFolder(); if (!tracePaths.isEmpty()) { Display.getDefault().asyncExec(() -> { for (Path tracePath : tracePaths) { if (monitor.isCanceled()) { return; } try { IStatus status = TmfOpenTraceHelper.openTraceFromPath(destinationFolder, tracePath.toOSString(), TracingRcpPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell()); if (!status.isOK()) { waitService.registerStatus(tracePath, status); } else if (status.getCode() == IStatus.OK) { waitService.registerStatus(tracePath, status); } } catch (CoreException e) { waitService.registerException(tracePath, e); } } }); } return waitService; }</code><technical_language>need check of INFO well</technical_language>

Target:
private static WaitAllTracesOpened openTraceIfNecessary(IProject project, List<Path> tracePaths, Collection<TmfCommonProjectElement> existingTraces, IProgressMonitor monitor) { WaitAllTracesOpened waitService = new WaitAllTracesOpened(tracePaths, existingTraces); if (!existingTraces.isEmpty()) { Display.getDefault().asyncExec(() -> { for (TmfCommonProjectElement existingTrace : existingTraces) { if (monitor.isCanceled()) { return; } try { IStatus status = TmfOpenTraceHelper.openFromElement(existingTrace); if (!status.isOK() || (status.getCode() != IStatus.OK)) { waitService.registerStatus(new Path(existingTrace.getLocation().getPath()), status); } } catch (Exception e) { waitService.registerException(new Path(existingTrace.getLocation().getPath()), e); } } }); } if (tracePaths.isEmpty()) { return waitService; } TmfTraceFolder destinationFolder = TmfProjectRegistry.getProject(project, true).getTracesFolder(); if (!tracePaths.isEmpty()) { Display.getDefault().asyncExec(() -> { for (Path tracePath : tracePaths) { if (monitor.isCanceled()) { return; } try { IStatus status = TmfOpenTraceHelper.openTraceFromPath(destinationFolder, tracePath.toOSString(), TracingRcpPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell()); if (!status.isOK() || (status.getCode() != IStatus.OK)) { waitService.registerStatus(tracePath, status); } } catch (CoreException e) { waitService.registerException(tracePath, e); } } }); } return waitService; }
Source:
<code>public boolean addOrUpdate(ConstructorItem item, String autocompleteSection) throws ConstructorException { <START> return add(item.getItemName(), autocompleteSection, item.toJsonParams()); <END> }</code><technical_language>This addOrUpdate, right</technical_language>

Target:
public boolean addOrUpdate(ConstructorItem item, String autocompleteSection) throws ConstructorException { return addOrUpdate(item.getItemName(), autocompleteSection, item.toJsonParams()); }
Source:
<code>public synchronized void refresh() { try { _propertyStore.subscribeChildChanges(PROPERTYSTORE_TABLE_CONFIGS_PREFIX, _tableConfigChangeListener); _propertyStore.subscribeDataChanges(PROPERTYSTORE_TABLE_CONFIGS_PREFIX, _tableConfigChangeListener); List<ZNRecord> children = _propertyStore.getChildren(PROPERTYSTORE_TABLE_CONFIGS_PREFIX, null, AccessOption.PERSISTENT); if (children != null) { for (ZNRecord znRecord : children) { try { TableConfig tableConfig = TableConfigUtils.fromZNRecord(znRecord); String tableNameWithType = tableConfig.getTableName(); <START> _tableConfigMap.put(tableNameWithType.toLowerCase(), tableConfig); <END> String rawTableName = TableNameBuilder.extractRawTableName(tableNameWithType); _tableNameMap.put(tableNameWithType.toLowerCase(), tableNameWithType); _tableNameMap.put(rawTableName.toLowerCase(), rawTableName); _table2SchemaConfigMap.put(tableNameWithType.toLowerCase(), rawTableName); _table2SchemaConfigMap.put(rawTableName.toLowerCase(), rawTableName); } catch (Exception e) { LOGGER.warn("Exception loading table config for: {}: {}", znRecord.getId(), e.getMessage()); } } } } catch (Exception e) { LOGGER.warn("Exception subscribing/reading tableconfigs", e); } }</code><technical_language>case here. elaborate</technical_language>

Target:
public synchronized void refresh() { try { _propertyStore.subscribeChildChanges(PROPERTYSTORE_TABLE_CONFIGS_PREFIX, _tableConfigChangeListener); _propertyStore.subscribeDataChanges(PROPERTYSTORE_TABLE_CONFIGS_PREFIX, _tableConfigChangeListener); List<ZNRecord> children = _propertyStore.getChildren(PROPERTYSTORE_TABLE_CONFIGS_PREFIX, null, AccessOption.PERSISTENT); if (children != null) { for (ZNRecord znRecord : children) { try { TableConfig tableConfig = TableConfigUtils.fromZNRecord(znRecord); String tableNameWithType = tableConfig.getTableName(); _tableConfigMap.put(tableNameWithType, tableConfig); String rawTableName = TableNameBuilder.extractRawTableName(tableNameWithType); _tableNameMap.put(tableNameWithType.toLowerCase(), tableNameWithType); _tableNameMap.put(rawTableName.toLowerCase(), rawTableName); _table2SchemaConfigMap.put(tableNameWithType.toLowerCase(), rawTableName); _table2SchemaConfigMap.put(rawTableName.toLowerCase(), rawTableName); } catch (Exception e) { LOGGER.warn("Exception loading table config for: {}: {}", znRecord.getId(), e.getMessage()); } } } } catch (Exception e) { LOGGER.warn("Exception subscribing/reading tableconfigs", e); } }
Source:
<code>long menuForEvent (long id, long sel, long theEvent) { if (!isEnabled ()) return 0; NSPoint pt = NSEvent.mouseLocation(); pt.y = (int) (display.getPrimaryFrame().height - pt.y); int x = (int) pt.x; int y = (int) pt.y; Event event = new Event (); event.x = x; event.y = y; NSEvent nsEvent = new NSEvent(theEvent); event.detail = nsEvent.buttonNumber() > 0 ? SWT.MENU_MOUSE : SWT.MENU_KEYBOARD; int count = 0; boolean menuAlreadyHandledByDisplay = false; if (display.popups != null) { while (count < display.popups.length && display.popups[count] != null) { if (display.popups[count] == menu) { menuAlreadyHandledByDisplay = true; } count++; } } sendEvent(SWT.MenuDetect, event); if (isDisposed ()) return 0; Menu menu = getMenu (); <START> if (event.doit && menu != null && !menu.isDisposed () && !menuAlreadyHandledByDisplay) { <END> if (x != event.x || y != event.y) { menu.setLocation (event.x, event.y); } return menu.nsMenu.id; } int count2 = 0; if (display.popups != null) { while (count2 < display.popups.length && display.popups[count2] != null) { count2++; } } if (count2 != count && count2 > 0) { Menu menu1 = display.popups[count2 - 1]; display.popups[count2 - 1] = null; return menu1.nsMenu.id; } if (!event.doit) return 0; return super.menuForEvent (id, sel, theEvent); }</code><technical_language>For solves this: * Move lines 2533 2538 lines 2523/24 (i.e., this line) * Add line 2524 (i.e., "if"): if (count2 != count && count2 > 0 && display.popups[count2 - 1] == menu) { display.popups[count2 - 1] = null; } if "&& display.popups[count2 - 1] == menu" necessary true always</technical_language>

Target:
long menuForEvent (long id, long sel, long theEvent) { if (!isEnabled ()) return 0; NSPoint pt = NSEvent.mouseLocation(); pt.y = (int) (display.getPrimaryFrame().height - pt.y); int x = (int) pt.x; int y = (int) pt.y; Event event = new Event (); event.x = x; event.y = y; NSEvent nsEvent = new NSEvent(theEvent); event.detail = nsEvent.buttonNumber() > 0 ? SWT.MENU_MOUSE : SWT.MENU_KEYBOARD; int initialNofPopups = 0; boolean menuAlreadyHandledByDisplay = false; if (display.popups != null) { while (initialNofPopups < display.popups.length && display.popups[initialNofPopups] != null) { if (display.popups[initialNofPopups] == menu) { menuAlreadyHandledByDisplay = true; } initialNofPopups++; } } sendEvent(SWT.MenuDetect, event); if (isDisposed ()) return 0; Menu menu = getMenu (); int newNofPopups = 0; if (display.popups != null) { while (newNofPopups < display.popups.length && display.popups[newNofPopups] != null) { newNofPopups++; } } if (event.doit && menu != null && !menu.isDisposed () && !menuAlreadyHandledByDisplay) { if (newNofPopups != initialNofPopups && newNofPopups > 0 && display.popups[newNofPopups - 1] == menu) { display.popups[newNofPopups - 1] = null; } if (x != event.x || y != event.y) { menu.setLocation (event.x, event.y); } return menu.nsMenu.id; } if (newNofPopups != initialNofPopups && newNofPopups > 0) { Menu menu1 = display.popups[newNofPopups - 1]; display.popups[newNofPopups - 1] = null; return menu1.nsMenu.id; } if (!event.doit) return 0; return super.menuForEvent (id, sel, theEvent); }
Source:
<code>public MessagesCreated apply(HttpResponse from) { MessagesCreated rawMessagesCreated = json.apply(from); List<String> messageIds = new ArrayList<String>(rawMessagesCreated.getMessageIds().size()); for (String rawMessageHref: rawMessagesCreated.getMessageIds()) { messageIds.add(ParseMessages.getMessageId(rawMessageHref)); } MessagesCreated messagesCreated = MessagesCreated.builder() .partial(rawMessagesCreated.isPartial()) .messageIds(messageIds) <START> .build(); <END> return messagesCreated; }</code><technical_language>Builder (yay!), a transform messageIds Iterable</technical_language>

Target:
public MessagesCreated apply(HttpResponse from) { MessagesCreated rawMessagesCreated = json.apply(from); List<String> messageIds = Lists.transform(rawMessagesCreated.getMessageIds(), TO_MESSAGE_ID); MessagesCreated messagesCreated = MessagesCreated.builder() .messageIds(messageIds) .build(); return messagesCreated; }
Source:
<code>static private String buildQuery(List<DataSource> dataSources, boolean showAll, int cntDaysFromRecent, boolean noTimeStamp) { String mostRecentQuery = ""; if (!showAll && cntDaysFromRecent > 0) { mostRecentQuery = String.format("AND value_int64 > (%s)", String.format(MOST_RECENT_TIME, cntDaysFromRecent, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID(), getWaypointListQuery(dataSources) )); } String query = String.format(GEO_ARTIFACT_QUERY, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID()); query += String.format("AND artifact_id IN(%s)", getWaypointListQuery(dataSources)); query += mostRecentQuery; if (noTimeStamp) { <START> query = String.format("%s UNION %s", buildQueryForWaypointsWOTimeStamps(dataSources), query); END> } return query; }</code><technical_language>Currently items do a timestamp included show is selected time stamp checkbox is checked, time stamp checkbox is disabled show is selected this results in a user experience is desirable</technical_language>

Target:
static private String buildQuery(List<DataSource> dataSources, boolean showAll, int cntDaysFromRecent, boolean noTimeStamp) { String mostRecentQuery = ""; if (!showAll && cntDaysFromRecent > 0) { mostRecentQuery = String.format("AND value_int64 > (%s)", String.format(MOST_RECENT_TIME, cntDaysFromRecent, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID(), getWaypointListQuery(dataSources) )); } String query = String.format(GEO_ARTIFACT_QUERY, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID()); query += String.format("AND artifact_id IN(%s)", getWaypointListQuery(dataSources)); query += mostRecentQuery; if (showAll || noTimeStamp) { query = String.format("%s UNION %s", buildQueryForWaypointsWOTimeStamps(dataSources), query); } return query; }
Source:
<code>public GetTaskListCommandParameters() { storagePoolId = null; <START> compatbilityVersion = null; <END> }</code><technical_language>reason explicitly set null, default behavior</technical_language>

Target:
public GetTaskListCommandParameters() { }
Source:
<code>protected final void registerRemoveRevisionDelta(CDOObject object, EStructuralFeature feature, int index) { <START> final CDORemoveFeatureDeltaImpl featureDelta = new CDORemoveFeatureDeltaImpl(feature, 0); <END> getRevisionDelta(object).addFeatureDelta(featureDelta); }</code><technical_language>index is passed in argument, 0 is in remove delta</technical_language>

Target:
protected final void registerRemoveRevisionDelta(CDOObject object, EStructuralFeature feature, int index) { final CDORemoveFeatureDeltaImpl featureDelta = new CDORemoveFeatureDeltaImpl(feature, index); getRevisionDelta(object).addFeatureDelta(featureDelta); }
Source:
<code>protected Map<String, SubType> getCoreAllowedSubtypes(Type type) { SchemaManagerImpl schemaManager = (SchemaManagerImpl) Framework.getService(SchemaManager.class); Collection<String> coreAllowedSubtypes = schemaManager.getAllowedSubTypes(type.getId()); Map<String, SubType> ecmSubTypes = type.getAllowedSubTypes(); Map<String, SubType> allowedSubTypes = new HashMap<>(); SubType subtype; <START> if (coreAllowedSubtypes != null) { <END> for (String name : coreAllowedSubtypes) { if (ecmSubTypes.containsKey(name)) { subtype = ecmSubTypes.get(name); } else { subtype = new SubType(); subtype.setName(name); } allowedSubTypes.put(name, subtype); } } return allowedSubTypes; }</code><technical_language>early exit: if (coreAllowedSubtypes == null) { // subtypes care of return Collections.emptyMap(); } rest unindented. move allowedSubTypes subtype declarations closer actual use</technical_language>

Target:
protected Map<String, SubType> getCoreAllowedSubtypes(Type type) { SchemaManager schemaManager = Framework.getService(SchemaManager.class); Collection<String> coreAllowedSubtypes = schemaManager.getAllowedSubTypes(type.getId()); if (coreAllowedSubtypes == null) { return Collections.emptyMap(); } Map<String, SubType> ecmSubTypes = type.getAllowedSubTypes(); Map<String, SubType> allowedSubTypes = new HashMap<>(); SubType subtype; for (String name : coreAllowedSubtypes) { if (ecmSubTypes.containsKey(name)) { subtype = ecmSubTypes.get(name); } else { subtype = new SubType(); subtype.setName(name); } allowedSubTypes.put(name, subtype); } return allowedSubTypes; }
Source:
<code><START> public static Map<Object, Object> singularMap(Object key, Object value) { <END> Map<Object, Object> query = new HashMap<Object, Object>(); query.put(key, value); return query; }</code><technical_language>This private plans class</technical_language>

Target:
private static Map<Object, Object> singularMap(Object key, Object value) { Map<Object, Object> query = new HashMap<Object, Object>(); query.put(key, value); return query; }
Source:
<code><START> public void nonRackAwareAllocationTest() <END> throws JSONException, IOException { int replicaCountPerDataCenter = 2; long replicaCapacityInBytes = 100 * 1024 * 1024 * 1024L; TestUtils.TestHardwareLayout testHardwareLayout = new TestUtils.TestHardwareLayout("Alpha"); PartitionLayout partitionLayout = new PartitionLayout(testHardwareLayout.getHardwareLayout()); ClusterMapManager clusterMapManager = new ClusterMapManager(partitionLayout); List<PartitionId> allocatedPartitions; allocatedPartitions = clusterMapManager.allocatePartitions(5, replicaCountPerDataCenter, replicaCapacityInBytes, true); assertEquals(allocatedPartitions.size(), 5); assertEquals(clusterMapManager.getWritablePartitionIds().size(), 5); allocatedPartitions = clusterMapManager.allocatePartitions(1000 * 1000, replicaCountPerDataCenter, replicaCapacityInBytes, true); assertEquals(allocatedPartitions.size() + 5, clusterMapManager.getWritablePartitionIds().size()); System.out.println(freeCapacityDump(clusterMapManager, testHardwareLayout.getHardwareLayout())); allocatedPartitions = clusterMapManager.allocatePartitions(5, replicaCountPerDataCenter, replicaCapacityInBytes, true); assertEquals(allocatedPartitions.size(), 0); }</code><technical_language>is this called "nonRackAware"</technical_language>

Target:
public void nonRackAwareAllocationTest() throws JSONException, IOException { int replicaCountPerDataCenter = 2; long replicaCapacityInBytes = 100 * 1024 * 1024 * 1024L; TestUtils.TestHardwareLayout testHardwareLayout = new TestUtils.TestHardwareLayout("Alpha"); PartitionLayout partitionLayout = new PartitionLayout(testHardwareLayout.getHardwareLayout()); ClusterMapManager clusterMapManager = new ClusterMapManager(partitionLayout); List<PartitionId> allocatedPartitions; try { clusterMapManager.allocatePartitions(5, replicaCountPerDataCenter, replicaCapacityInBytes, false); Assert.fail("allocatePartitions should not succeed when datacenters are missing rack info " + "and retryIfNotRackAware is false"); } catch (IllegalArgumentException e) { } allocatedPartitions = clusterMapManager.allocatePartitions(5, replicaCountPerDataCenter, replicaCapacityInBytes, true); assertEquals(allocatedPartitions.size(), 5); assertEquals(clusterMapManager.getWritablePartitionIds().size(), 5); allocatedPartitions = clusterMapManager.allocatePartitions(1000 * 1000, replicaCountPerDataCenter, replicaCapacityInBytes, true); assertEquals(allocatedPartitions.size() + 5, clusterMapManager.getWritablePartitionIds().size()); System.out.println(freeCapacityDump(clusterMapManager, testHardwareLayout.getHardwareLayout())); allocatedPartitions = clusterMapManager.allocatePartitions(5, replicaCountPerDataCenter, replicaCapacityInBytes, true); assertEquals(allocatedPartitions.size(), 0); }
Source:
<code>public void scan(HttpMessage msg, String param, String value) { SinkDetectionStorage storage = getStorage(); List<HttpMessage> possibleSinks = storage.getPossibleSinksForValue(value); try { HttpMessage inputMsg = msg.cloneRequest(); String injectedValue = getRandomString(); this.setParameter(inputMsg, param, injectedValue); sendAndReceive(inputMsg, false); for (HttpMessage possibleSink : possibleSinks) { <START> if (inputMsg.hashCode() != possibleSink.hashCode()) { <END> HttpMessage possibleSink1 = possibleSink.cloneRequest(); sendAndReceive(possibleSink1, false); if (possibleSink1.getResponseBody().toString().contains(injectedValue)) { ParamSinksUtils.setSinkForSource(msg, param, possibleSink1); } } } } catch (Exception e) { log.error(e.getMessage(), e); } }</code><technical_language>question, reason for comparing hashcode</technical_language>

Target:
public void scan(HttpMessage msg, String param, String value) { SinkDetectionStorage storage = getStorage(); Set<HttpMessage> possibleSinks = storage.getPossibleSinksForValue(value); try { HttpMessage inputMsg = msg.cloneRequest(); String injectedValue = getRandomString(); this.setParameter(inputMsg, param, injectedValue); sendAndReceive(inputMsg, false); for (HttpMessage possibleSink : possibleSinks) { if (inputMsg.hashCode() != possibleSink.hashCode()) { HttpMessage possibleSinkClone = possibleSink.cloneRequest(); sendAndReceive(possibleSinkClone, false); if (possibleSinkClone.getResponseBody().toString().contains(injectedValue)) { ParamSinksUtils.setSinkForSource(msg, param, possibleSinkClone); } } } } catch (Exception e) { log.error(e.getMessage(), e); } }
Source:
<code>private int getSectionOver(Vector2i mousePos) { logger.info(mousePos.toString()); mousePos.x -= radius; mousePos.y -= radius; logger.info(mousePos.toString()); <START> double angle = Math.atan2(mousePos.y(), mousePos.y()); logger.info(angle + " ang"); <END> angle += angle < 0 ? Math.PI * 2 : 0; return (int) Math.floor(angle * 1.5); }</code><technical_language>accidentally lost a newline here</technical_language>

Target:
private int getSectionOver(Vector2i mousePos) { mousePos.x -= radius; mousePos.y -= radius; double angle = Math.atan2(mousePos.y(), mousePos.x()); angle = angle < 0 ? angle + Math.PI * 2 : angle; double dist = Math.sqrt(mousePos.x() * mousePos.x() + mousePos.y() * mousePos.y()); if (dist < radius / 2 || dist > radius) { return -1; } return (int) Math.floor(angle / sectionAngle); }
Source:
<code>private static Date calculateDefaultDueDate() { Calendar cal = Calendar.getInstance(); <START> cal.add(Calendar.DATE, 1);; <END> return new Date(cal.getTimeInMillis()); }</code><technical_language>Unneeded extra semicolon</technical_language>

Target:
private static DateTime calculateDefaultDueDate() { Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, 1); return new DateTime(cal.getTimeInMillis()); }
Source:
<code><START> protected Shell getShell(ExecutionEvent event) { <END> IWorkbenchPart part = (IWorkbenchPart) ((IEvaluationContext) event .getApplicationContext()).getRoot().getVariable("activePart"); return part.getSite().getShell(); }</code><technical_language>Matthias, HandlerUtil.getActiveShell(event); instead. Note null returned swap getActiveShellChecked(ExecutionEvent) instead</technical_language>

Target:
protected Shell getShell(ExecutionEvent event) throws ExecutionException { return HandlerUtil.getActiveShellChecked(event); }
Source:
<code>private void checkMasterStatus() { try { if (conf.getBoolVar(TajoConf.ConfVars.TAJO_MASTER_HA_ENABLE)) { <START> if (!HAServiceUtil.isMasterAlive(conf.get(TajoConf.ConfVars.TAJO_MASTER_CLIENT_RPC_ADDRESS <END> .varname), conf)) { String baseDatabase = client.getBaseDatabase(); conf.set(ConfVars.TAJO_MASTER_CLIENT_RPC_ADDRESS.varname, HAServiceUtil.getMasterClientName(conf)); client.close(); commands.clear(); client = new TajoClient(conf, baseDatabase); context.setCurrentDatabase(client.getCurrentDatabase()); initHistory(); initCommands(); } } } catch (Exception e) { } }</code><technical_language>conf.getVar() instead of conf.get()</technical_language>

Target:
private void checkMasterStatus() throws IOException, ServiceException { String sessionId = client.getSessionId() != null ? client.getSessionId().getId() : null; client = TajoHAClientUtil.getTajoClient(conf, client, context); if(sessionId != null && (client.getSessionId() == null || !sessionId.equals(client.getSessionId().getId()))) { commands.clear(); initHistory(); initCommands(); } }
Source:
<code>public void startReplicationService() throws IOException { this.replicationSink = new ReplicationSink(this.conf); this.server.getChoreService().scheduleChore( new ReplicationStatisticsChore("ReplicationSinkStatistics", server, <START> 1000 * statsPeriodInSecond)); <END> }</code><technical_language>TimeUnit.SECONDS.toMillis(statsPeriodInSecond)</technical_language>

Target:
public void startReplicationService() throws IOException { this.replicationSink = new ReplicationSink(this.conf); this.server.getChoreService().scheduleChore( new ReplicationStatisticsChore("ReplicationSinkStatistics", server, (int) TimeUnit.SECONDS.toMillis(statsPeriodInSecond))); }
Source:
<code>public void basicConsume(String queue, String address, boolean autoAck, Handler<AsyncResult<Void>> resultHandler) { forChannel(resultHandler, channel -> { <START> channel.basicConsume(queue, new ConsumerHandler(vertx, channel, includeProperties, autoAck, ar -> { <END> if (ar.succeeded()) { vertx.eventBus().send(address, ar.result()); } else { log.error("Exception occurred inside rabbitmq service consumer.", ar.cause()); } })); return null; }); }</code><technical_language>Hm call basicConsume(queue, true, new ConsumerHandler(....)); in case want autoAck? This is more performant rabbitmq broker wait for ACKs received this consumer sending additional messages (in case qos > 0 this helps throughput latency). In case ConsumerHandler refrain acking message</technical_language>

Target:
public void basicConsume(String queue, String address, boolean autoAck, Handler<AsyncResult<Void>> resultHandler) { forChannel(resultHandler, channel -> { channel.basicConsume(queue, autoAck, new ConsumerHandler(vertx, channel, includeProperties, ar -> { if (ar.succeeded()) { vertx.eventBus().send(address, ar.result()); } else { log.error("Exception occurred inside rabbitmq service consumer.", ar.cause()); } })); return null; }); }
Source:
<code>private String parseUsingGrobid(String plainText) { try { return grobidService.processCitation(plainText, GrobidService.ConsolidateCitations.WITH_METADATA); } catch (IOException e) { <START> LOGGER.atDebug().setCause(e).log(e.getMessage()); <END> return ""; } }</code><technical_language>complicated? LOGGER.debug("Could process citation", e");</technical_language>

Target:
private String parseUsingGrobid(String plainText) { try { return grobidService.processCitation(plainText, GrobidService.ConsolidateCitations.WITH_METADATA); } catch (IOException e) { LOGGER.debug("Could not process citation", e); return ""; } }
Source:
<code><START> private void handleEviction(long address, ILogData entry, RemovalCause cause) { <END> log.trace("Eviction[{}]: {}", address, cause); streamLog.release(address, (LogData) entry); }</code><technical_language>if implementations of release changes op</technical_language>

Target:
private void handleEviction(long address, ILogData entry, RemovalCause cause) { log.trace("Eviction[{}]: {}", address, cause); }
Source:
<code>public void visitNode(Tree tree) { if (!hasSemantic()) { return; } ClassTree classTree = (ClassTree) tree; <START> if (!hasMethodsAnnotatedWithTransactional(classTree)) { <END> return; } Map<Symbol, String> methodsPropagationMap = collectMethodsPropagation(classTree); if (hasSameValues(methodsPropagationMap)) { return; } methodsPropagationMap .forEach((symbol, propagation) -> checkMethodInvocation((MethodTree) symbol.declaration(), propagation, methodsPropagationMap)); }</code><technical_language>This check is useful loop methods of class is done afterwards. this dropped method deleted</technical_language>

Target:
public void visitNode(Tree tree) { if (!hasSemantic()) { return; } ClassTree classTree = (ClassTree) tree; Map<Symbol, String> methodsPropagationMap = collectMethodsPropagation(classTree); if (hasSameValues(methodsPropagationMap.values())) { return; } methodsPropagationMap .forEach((symbol, propagation) -> checkMethodInvocations((MethodTree) symbol.declaration(), propagation, methodsPropagationMap)); }
Source:
<code>private void logFailedUpgrades() { <START> TransactionSupport.executeInNewTransaction(() -> { <END> for (Map.Entry<String, String> entry : failedUpgradeVms.entrySet()) { addCustomValue("VmName", entry.getKey()); addCustomValue("Message", entry.getValue()); auditLogDirector.log(this, AuditLogType.CLUSTER_CANNOT_UPDATE_VM_COMPATIBILITY_VERSION); } return null; }); }</code><technical_language>I this of auditLogDirector - is a common issue for users of this class. a followup patch there</technical_language>

Target:
private void logFailedUpgrades() { for (Map.Entry<String, String> entry : failedUpgradeEntities.entrySet()) { addCustomValue("VmName", entry.getKey()); addCustomValue("Message", entry.getValue()); auditLogDirector.log(this, AuditLogType.CLUSTER_CANNOT_UPDATE_VM_COMPATIBILITY_VERSION); } }
Source:
<code>void randomEmit(T record, int targetChannelIndex) throws IOException, InterruptedException { tryFinishCurrentBufferBuilder(targetChannelIndex); randomTriggered = true; emit(record, targetChannelIndex); randomTriggered = false; if (bufferBuilder != null) { <START> for (int index = 0; index < numberOfChannels; index++) { <END> if (index != targetChannelIndex) { addBufferConsumer(randomTriggeredConsumer.copyAndSync(bufferBuilder), index); } } } }</code><technical_language>re-introduced checkState(!bufferConsumerCreated) removed <LINK_0></technical_language>

Target:
void randomEmit(T record, int targetChannelIndex) throws IOException, InterruptedException { tryFinishCurrentBufferBuilder(targetChannelIndex); randomTriggered = true; emit(record, targetChannelIndex); randomTriggered = false; if (bufferBuilder != null) { for (int index = 0; index < numberOfChannels; index++) { if (index != targetChannelIndex) { addBufferConsumer(randomTriggeredConsumer.copyWithReaderPosition(bufferBuilder.getCommittedBytes()), index); } } } }
Source:
<code><START> protected Object fromByteBuffer(ByteBuffer byteBuffer) { <END> return serDes.deserialize(byteBuffer); }</code><technical_language>I need change BluefloodEnumRollup Object</technical_language>

Target:
protected BluefloodEnumRollup fromByteBuffer(ByteBuffer byteBuffer) { return serDes.deserialize(byteBuffer); }
Source:
<code><START> public List<VdsNetworkInterface> getAllMigrationNetworkInterfacesInCluster(Guid clusterId) { <END> return getCallsHandler().executeReadList("GetAllMigrationNetworkInterfacesInCluster", vdsNetworkInterfaceRowMapper, getCustomMapSqlParameterSource().addValue("cluster_id", clusterId)); }</code><technical_language>This is relevant one:)</technical_language>

Target:
public List<VdsNetworkInterface> getAllMigrationNetworkInterfacesInCluster(Guid clusterId) { MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource() .addValue("cluster_id", clusterId); return readVdsNetworkInterfaces(parameterSource, "GetAllMigrationNetworkInterfacesInCluster"); }
Source:
<code>protected void compileJavaParser(boolean leftRecursive) throws IOException { <START> String grammarFileName = leftRecursive ? "JavaLR.g4" : "Java.g4"; <END> String sourceName = leftRecursive ? "JavaLR.g4" : "Java.g4"; String parserName = leftRecursive ? "JavaLRParser" : "JavaParser"; String lexerName = leftRecursive ? "JavaLRLexer" : "JavaLexer"; String body = load(sourceName, null); List<String> extraOptions = new ArrayList<String>(); extraOptions.add("-Werror"); if (FORCE_ATN) { extraOptions.add("-Xforce-atn"); } if (EXPORT_ATN_GRAPHS) { extraOptions.add("-atn"); } if (DEBUG_TEMPLATES) { extraOptions.add("-XdbgST"); if (DEBUG_TEMPLATES_WAIT) { extraOptions.add("-XdbgSTWait"); } } extraOptions.add("-visitor"); String[] extraOptionsArray = extraOptions.toArray(new String[extraOptions.size()]); boolean success = rawGenerateAndBuildRecognizer(grammarFileName, body, parserName, lexerName, true, extraOptionsArray); assertTrue(success); }</code><technical_language>bulb: is need separate grammarFileName sourceName variables anymore. grammarFileName for both</technical_language>

Target:
protected void compileJavaParser(boolean leftRecursive) throws IOException { String grammarFileName = leftRecursive ? "JavaLR.g4" : "Java.g4"; String parserName = leftRecursive ? "JavaLRParser" : "JavaParser"; String lexerName = leftRecursive ? "JavaLRLexer" : "JavaLexer"; String body = load(grammarFileName, null); List<String> extraOptions = new ArrayList<String>(); extraOptions.add("-Werror"); if (FORCE_ATN) { extraOptions.add("-Xforce-atn"); } if (EXPORT_ATN_GRAPHS) { extraOptions.add("-atn"); } if (DEBUG_TEMPLATES) { extraOptions.add("-XdbgST"); if (DEBUG_TEMPLATES_WAIT) { extraOptions.add("-XdbgSTWait"); } } extraOptions.add("-visitor"); String[] extraOptionsArray = extraOptions.toArray(new String[extraOptions.size()]); boolean success = rawGenerateAndBuildRecognizer(grammarFileName, body, parserName, lexerName, true, extraOptionsArray); assertTrue(success); }
Source:
<code>void setAsyncLockRemoval(final String path) throws IOException { LightWeightRequestHandler handler = new LightWeightRequestHandler( HDFSOperationType.SET_ASYNC_SUBTREE_RECOVERY_FLAG) { @Override public Object performTask() throws IOException { OngoingSubTreeOpsDataAccess<SubTreeOperation> dataAccess = (OngoingSubTreeOpsDataAccess) HdfsStorageFactory.getDataAccess(OngoingSubTreeOpsDataAccess.class); SubTreeOperation op = dataAccess.findByPath(getSubTreeLockPathPrefix(path)); <START> if (op != null) { <END> op.setAsyncLockRecoveryTime(System.currentTimeMillis()); List<SubTreeOperation> modified = new ArrayList<SubTreeOperation>(); modified.add(op); dataAccess.prepare(Collections.EMPTY_LIST, Collections.EMPTY_LIST, modified); } return null; } }; handler.handle(); }</code><technical_language>set if is set a trace of is set</technical_language>

Target:
void setAsyncLockRemoval(final String path) throws IOException { LightWeightRequestHandler handler = new LightWeightRequestHandler( HDFSOperationType.SET_ASYNC_SUBTREE_RECOVERY_FLAG) { @Override public Object performTask() throws IOException { OngoingSubTreeOpsDataAccess<SubTreeOperation> dataAccess = (OngoingSubTreeOpsDataAccess) HdfsStorageFactory.getDataAccess(OngoingSubTreeOpsDataAccess.class); SubTreeOperation op = dataAccess.findByPath(getSubTreeLockPathPrefix(path)); if (op != null && op.getAsyncLockRecoveryTime() == 0) { op.setAsyncLockRecoveryTime(System.currentTimeMillis()); List<SubTreeOperation> modified = new ArrayList<SubTreeOperation>(); modified.add(op); dataAccess.prepare(Collections.EMPTY_LIST, Collections.EMPTY_LIST, modified); } return null; } }; handler.handle(); }
Source:
<code>public Response getHistogram(@QueryParam("queryId") final Long queryId, @QueryParam("fragmentId") final Long fragmentId, @Context final UriInfo uriInfo) throws DbException { if (queryId == null) { throw new WebApplicationException(Response.status(HttpURLConnection.HTTP_BAD_REQUEST).entity("queryId missing") .build()); } if (fragmentId == null) { throw new WebApplicationException(Response.status(HttpURLConnection.HTTP_BAD_REQUEST) .entity("fragmentId missing").build()); } ResponseBuilder response = Response.ok(); response.type(MediaType.TEXT_PLAIN); PipedOutputStream writerOutput = new PipedOutputStream(); PipedInputStream input; try { input = new PipedInputStream(writerOutput, MyriaConstants.DEFAULT_PIPED_INPUT_STREAM_SIZE); } catch (IOException e) { throw new DbException(e); } PipedStreamingOutput entity = new PipedStreamingOutput(input); response.entity(entity); TupleWriter writer = new CsvTupleWriter(writerOutput); try { <START> server.startHistorgramDataStream(queryId, fragmentId, writer); <END> } catch (IllegalArgumentException e) { throw new MyriaApiException(Status.BAD_REQUEST, e); } return response.build(); }</code><technical_language>histogram is spelled wrong</technical_language>

Target:
public Response getHistogram(@QueryParam("queryId") final Long queryId, @QueryParam("fragmentId") final Long fragmentId, @Context final UriInfo uriInfo) throws DbException { if (queryId == null) { throw new MyriaApiException(Status.BAD_REQUEST, "Query ID missing."); } if (fragmentId == null) { throw new MyriaApiException(Status.BAD_REQUEST, "Fragment ID missing."); } ResponseBuilder response = Response.ok(); response.type(MediaType.TEXT_PLAIN); PipedOutputStream writerOutput = new PipedOutputStream(); PipedInputStream input; try { input = new PipedInputStream(writerOutput, MyriaConstants.DEFAULT_PIPED_INPUT_STREAM_SIZE); } catch (IOException e) { throw new DbException(e); } PipedStreamingOutput entity = new PipedStreamingOutput(input); response.entity(entity); TupleWriter writer = new CsvTupleWriter(writerOutput); try { server.startHistogramDataStream(queryId, fragmentId, writer); } catch (IllegalArgumentException e) { throw new MyriaApiException(Status.BAD_REQUEST, e); } return response.build(); }
Source:
<code>public int hashCode() { final HashCodeBuilder hashCodeBuilder = new HashCodeBuilder(); hashCodeBuilder.append(_filterOutcome); hashCodeBuilder.append(_from); hashCodeBuilder.append(_requirement); hashCodeBuilder.append(_to); hashCodeBuilder.append(_outputDataStream); <START> return hashCodeBuilder.toHashCode(); <END> }</code><technical_language>stock Objects.hash(...)</technical_language>

Target:
public int hashCode() { return Objects.hash(_filterOutcome, _from, _requirement, _to, _outputDataStream); }
Source:
<code>@Override public void connectionClosed(final RpcClientChannel rpcClientChannel) { <START> socketHandler.rpcOnClose(new RpcSession(rpcClientChannel), -1, "Idk"); <END> }</code><technical_language>Change "Idk" message "for unknown reason". yet, message other time in a file this occurred</technical_language>

Target:
@Override public void connectionClosed(final RpcClientChannel rpcClientChannel) { socketHandler.rpcOnClose(new RpcSession(rpcClientChannel), -1, "for an unknown reason"); }