auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void printTableScanInfo(TableScanNode node, int indent) { TableHandle table = node.getTable(); if (node.getLayout().isPresent()) { ConnectorTableLayoutHandle layout = node.getLayout().get().getConnectorHandle(); if (!table.getConnectorHandle().toString().equals(layout.toString())) { print(indent + 2, "LAYOUT: %s", layout); } } TupleDomain<ColumnHandle> predicate = node.getCurrentConstraint(); if (predicate.isNone()) { print(indent + 2, ":: NONE"); } else { for (Map.Entry<Symbol, ColumnHandle> assignment : node.getAssignments().entrySet()) { ColumnHandle column = assignment.getValue(); print(indent + 2, "%s := %s", assignment.getKey(), column); printConstraint(indent + 3, column, predicate); } if (!predicate.isAll()) { Set<ColumnHandle> outputs = ImmutableSet.copyOf(node.getAssignments().values()); predicate.getDomains().get() .entrySet().stream() .filter(entry -> !outputs.contains(entry.getKey())) <START> .sorted(Comparator.comparing(o -> o.getKey().toString())) <END> .forEach(entry -> { ColumnHandle column = entry.getKey(); print(indent + 2, "%s", column); printConstraint(indent + 3, column, predicate); }); } } }</code><technical_language>@kokosing Grzegorz, this functionality requires partitioned tables. TestQueryPlanDeterminism any</technical_language>

Target:
private void printTableScanInfo(TableScanNode node, int indent) { TableHandle table = node.getTable(); if (node.getLayout().isPresent()) { ConnectorTableLayoutHandle layout = node.getLayout().get().getConnectorHandle(); if (!table.getConnectorHandle().toString().equals(layout.toString())) { print(indent + 2, "LAYOUT: %s", layout); } } TupleDomain<ColumnHandle> predicate = node.getCurrentConstraint(); if (predicate.isNone()) { print(indent + 2, ":: NONE"); } else { for (Map.Entry<Symbol, ColumnHandle> assignment : node.getAssignments().entrySet()) { ColumnHandle column = assignment.getValue(); print(indent + 2, "%s := %s", assignment.getKey(), column); printConstraint(indent + 3, column, predicate); } if (!predicate.isAll()) { Set<ColumnHandle> outputs = ImmutableSet.copyOf(node.getAssignments().values()); predicate.getDomains().get() .keySet().stream() .filter(entry -> !outputs.contains(entry)) .sorted(comparing(entry -> entry.toString())) .forEach(column -> { print(indent + 2, "%s", column); printConstraint(indent + 3, column, predicate); }); } } }
Source:
<code>private Immutable(String uri) { _uri = uri; _scheme = null; _user = null; _host = null; _port = -1; _path = uri; _decodedPath = null; _param = null; _query = null; <START> } <END></code><technical_language>Please order of fields declarations, difficult if forgot assign a field</technical_language>

Target:
private Immutable(String uri) { _scheme = null; _user = null; _host = null; _port = -1; _path = uri; _param = null; _query = null; _fragment = null; _uri = uri; _decodedPath = null; }
Source:
<code>public void setFocus() { <START> if (treeViewerManager != null) { super.setFocus(); if (treeModel != null && treeModel.eIsProxy() && session != null) { IEditorInput editorInput = getEditorInput(); if (editorInput instanceof URIEditorInput) { URIEditorInput sessionEditorInput = (URIEditorInput) editorInput; final URI uri = sessionEditorInput.getURI(); setTreeModel(getDTree(uri, false)); IEditingSession uiSession = SessionUIManager.INSTANCE.getUISession(session); if (uiSession != null && treeModel != null) { uiSession.detachEditor(this); uiSession.attachEditor(this); } } } } <END> }</code><technical_language>This identical code added other class, for tableModel/treeModel variable setTable/TreeModel getDTable/DTree. :-( internal, add a protected setRepresentation/getDRepresentation method pair in common parent class, override minimum in dialect</technical_language>

Target:
public void setFocus() { if (treeViewerManager != null) { super.setFocus(); if (treeModel != null && treeModel.eIsProxy() && session != null) { IEditorInput editorInput = getEditorInput(); if (editorInput instanceof URIEditorInput) { URIEditorInput sessionEditorInput = (URIEditorInput) editorInput; final URI uri = sessionEditorInput.getURI(); setTreeModel(getDTree(uri, false)); IEditingSession uiSession = SessionUIManager.INSTANCE.getUISession(session); if (uiSession != null && treeModel != null) { uiSession.detachEditor(this); uiSession.attachEditor(this); } } } checkSemanticAssociation(); } }
Source:
<code><START> public Object getBinJavaPath() { <END> return new Object() { @Override public String toString() { return path() + ("mac".equals(platform()) ? "/Contents/Home" : "") + "/bin/java"; } }; }</code><technical_language>Is this some gradle specific this return a String directly</technical_language>

Target:
public Object getBinJavaPath() { return new Object() { @Override public String toString() { return getJavaHome().getAbsolutePath() + "/bin/java"; } }; }
Source:
<code>public boolean touch(URI uri) throws IOException { try { HeadObjectResponse s3ObjectMetadata = getS3ObjectMetadata(uri); String encodedUrl = null; try { encodedUrl = URLEncoder.encode(uri.getHost() + uri.getPath(), StandardCharsets.UTF_8.toString()); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } String path = sanitizePath(uri.getPath()); Map<String, String> mp = new HashMap<>(); mp.put("lastModified", String.valueOf(System.currentTimeMillis())); CopyObjectRequest.Builder copyReqBuilder = CopyObjectRequest.builder().copySource(encodedUrl) .destinationBucket(uri.getHost()).destinationKey(path) .metadata(mp).metadataDirective(MetadataDirective.REPLACE); CopyObjectRequest request; if (!disableAcl) { request = copyReqBuilder.acl(ObjectCannedACL.BUCKET_OWNER_FULL_CONTROL).build(); } else { request = copyReqBuilder.build(); } _s3Client.copyObject(request); long newUpdateTime = getS3ObjectMetadata(uri).lastModified().toEpochMilli(); return newUpdateTime > s3ObjectMetadata.lastModified().toEpochMilli(); } catch (NoSuchKeyException e) { String path = sanitizePath(uri.getPath()); PutObjectRequest.Builder putReqBuilder = PutObjectRequest.builder().bucket(uri.getHost()).key(path); PutObjectRequest putObjectRequest; if (!disableAcl) { <START> putObjectRequest = putReqBuilder.acl(ObjectCannedACL.BUCKET_OWNER_FULL_CONTROL).build(); <END> } else { putObjectRequest = putReqBuilder.build(); } _s3Client.putObject(putObjectRequest, RequestBody.fromBytes(new byte[0])); return true; } catch (S3Exception e) { throw new IOException(e); } }</code><technical_language>set builder build request later</technical_language>

Target:
public boolean touch(URI uri) throws IOException { try { HeadObjectResponse s3ObjectMetadata = getS3ObjectMetadata(uri); String encodedUrl = null; try { encodedUrl = URLEncoder.encode(uri.getHost() + uri.getPath(), StandardCharsets.UTF_8.toString()); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } String path = sanitizePath(uri.getPath()); Map<String, String> mp = new HashMap<>(); mp.put("lastModified", String.valueOf(System.currentTimeMillis())); CopyObjectRequest.Builder copyReqBuilder = CopyObjectRequest.builder().copySource(encodedUrl) .destinationBucket(uri.getHost()).destinationKey(path) .metadata(mp).metadataDirective(MetadataDirective.REPLACE); if (!disableAcl) { copyReqBuilder.acl(ObjectCannedACL.BUCKET_OWNER_FULL_CONTROL); } CopyObjectRequest request = copyReqBuilder.build(); _s3Client.copyObject(request); long newUpdateTime = getS3ObjectMetadata(uri).lastModified().toEpochMilli(); return newUpdateTime > s3ObjectMetadata.lastModified().toEpochMilli(); } catch (NoSuchKeyException e) { String path = sanitizePath(uri.getPath()); PutObjectRequest.Builder putReqBuilder = PutObjectRequest.builder().bucket(uri.getHost()).key(path); if (!disableAcl) { putReqBuilder.acl(ObjectCannedACL.BUCKET_OWNER_FULL_CONTROL); } PutObjectRequest putObjectRequest = putReqBuilder.build(); _s3Client.putObject(putObjectRequest, RequestBody.fromBytes(new byte[0])); return true; } catch (S3Exception e) { throw new IOException(e); } }
Source:
<code>public void deletePost(Post post) { JCUser user = post.getUserCreated(); user.setPostCount(user.getPostCount() - 1); Topic topic = post.getTopic(); topic.removePost(post); Branch branch = topic.getBranch(); boolean deletedPostIsLastPostInBranch = branch.isLastPost(post); if (deletedPostIsLastPostInBranch) { branch.clearLastPost(); } topicDao.saveOrUpdate(topic); securityService.deleteFromAcl(post); Set<JCUser> topicSubscribers = new HashSet<>(topic.getSubscribers()); <START> topicSubscribers.remove(user); <END> notificationService.subscribedEntityChanged(topic, topicSubscribers); if (deletedPostIsLastPostInBranch) { branchLastPostService.refreshLastPostInBranch(branch); } logger.debug("Deleted post id={}", post.getId()); }</code><technical_language>@vps2 intention of task is user left post needs notified removal. changes do - notify post creator :)</technical_language>

Target:
public void deletePost(Post post) { JCUser postCreator = post.getUserCreated(); postCreator.setPostCount(postCreator.getPostCount() - 1); Topic topic = post.getTopic(); topic.removePost(post); Branch branch = topic.getBranch(); boolean deletedPostIsLastPostInBranch = branch.isLastPost(post); if (deletedPostIsLastPostInBranch) { branch.clearLastPost(); } topicDao.saveOrUpdate(topic); securityService.deleteFromAcl(post); Set<JCUser> excludeFromNotification = new HashSet<>(topic.getSubscribers()); excludeFromNotification.remove(postCreator); notificationService.subscribedEntityChanged(topic, excludeFromNotification); if (deletedPostIsLastPostInBranch) { branchLastPostService.refreshLastPostInBranch(branch); } logger.debug("Deleted post id={}", post.getId()); }
Source:
<code>public FileResponse(String u, Metadata md, FileProtocol fp) throws MalformedURLException, IOException { fileProtocol = fp; metadata = md; URL url = new URL(u); <START> if (LOG.isTraceEnabled()) { <END> LOG.trace("Fetching {}.",url.getPath()); } if (url.getPath() != url.getFile() && LOG.isWarnEnabled()) { LOG.warn("url.getPath() != url.getFile(): {}.",url); } String path = "".equals(url.getPath()) ? "/" : url.getPath(); File file=new File(URLDecoder.decode(path, fileProtocol.getEncoding())); if (!file.exists()) { statusCode = HttpStatus.SC_NOT_FOUND; } if (!file.canRead()) { statusCode = HttpStatus.SC_UNAUTHORIZED; } if (!file.equals(file.getCanonicalFile())) { metadata.setValue(HttpHeaders.LOCATION, file.getCanonicalFile().toURI().toURL().toString()); statusCode = HttpStatus.SC_MULTIPLE_CHOICES; } if (file.isDirectory()) { getDirAsHttpResponse(file); } else if (file.isFile()) { getFileAsHttpResponse(file); } else { statusCode = HttpStatus.SC_INTERNAL_SERVER_ERROR; } }</code><technical_language>checking log level is unnecessary parameterized messages in SLF4J avoid concatenation</technical_language>

Target:
public FileResponse(String u, Metadata md, FileProtocol fp) throws MalformedURLException, IOException { fileProtocol = fp; metadata = md; URL url = new URL(u); if (!url.getPath().equals(url.getFile())) { LOG.warn("url.getPath() != url.getFile(): {}.", url); } String path = "".equals(url.getPath()) ? "/" : url.getPath(); File file = new File( URLDecoder.decode(path, fileProtocol.getEncoding())); if (!file.exists()) { statusCode = HttpStatus.SC_NOT_FOUND; return; } if (!file.canRead()) { statusCode = HttpStatus.SC_UNAUTHORIZED; return; } if (!file.equals(file.getCanonicalFile())) { metadata.setValue(HttpHeaders.LOCATION, file.getCanonicalFile() .toURI().toURL().toString()); statusCode = HttpStatus.SC_MULTIPLE_CHOICES; return; } if (file.isDirectory()) { getDirAsHttpResponse(file); } else if (file.isFile()) { getFileAsHttpResponse(file); } else { statusCode = HttpStatus.SC_INTERNAL_SERVER_ERROR; return; } if (content == null) { content = new byte[0]; } }
Source:
<code>public void testParentMessageIsCorrect() throws InterruptedException { <START> Log.d("DEBUG", "hello"); <END> MessageActivity messageActivity = getActivity(); EditText inputMessageField = (EditText) messageActivity.findViewById(R.id.inputMessageField); String input = "Mock comment"; onView(withId(R.id.inputMessageField)).perform(typeText(input)); onView(withId(R.id.sendButton)).perform(click()); Fragment fragment = messageActivity.getCurrentFragment(); ListView messageList = (ListView) fragment.getView().findViewById(R.id.groupMessageFragmentList); int tag = 0; messageList.getChildAt(0).setTag((Object) tag); View message = messageList.findViewWithTag((Object) tag); onView(withTagValue(is((Object) tag))).perform(click()); fragment = messageActivity.getCurrentFragment(); LinearLayout messageContainer = (LinearLayout) fragment.getView().findViewById(R.id.messageContainer); MessageView messageView = (MessageView) messageContainer.getChildAt(0); assertEquals("Mock comment", ((TextContent) messageView.getMessage().getContent()).getText()); }</code><technical_language>Unnecessary log</technical_language>

Target:
public void testParentMessageIsCorrect() throws InterruptedException { MessageActivity messageActivity = getActivity(); EditText inputMessageField = (EditText) messageActivity.findViewById(R.id.inputMessageField); String input = "Mock comment"; onView(withId(R.id.inputMessageField)).perform(typeText(input)); onView(withId(R.id.sendButton)).perform(click()); Fragment fragment = messageActivity.getCurrentFragment(); ListView messageList = (ListView) fragment.getView().findViewById(R.id.groupMessageFragmentList); int tag = 0; messageList.getChildAt(0).setTag((Object) tag); View message = messageList.findViewWithTag((Object) tag); onView(withTagValue(is((Object) tag))).perform(click()); fragment = messageActivity.getCurrentFragment(); LinearLayout messageContainer = (LinearLayout) fragment.getView().findViewById(R.id.messageContainer); MessageView messageView = (MessageView) messageContainer.getChildAt(0); assertEquals("Mock comment", ((TextContent) messageView.getMessage().getContent()).getText()); }
Source:
<code>@Override public Call<List<String>> getSpanNames(String serviceName) { if ("".equals(serviceName)) return Call.emptyList(); String q = String.format("SHOW TAG VALUES FROM \"%s\" with key=\"name\" WHERE \"service_name\" = '%s'", this.storage.measurement(), serviceName); Query query = new Query(q, this.storage.database()); QueryResult response = this.storage.get().query(query); if (response.hasError()){ throw new RuntimeException(response.getError()); } List<String> spans = new ArrayList<>(); <START> List<QueryResult.Result> results = response.getResults(); <END> if (results != null) { for (QueryResult.Result result : results) { if (result != null && result.getSeries() != null) { for (QueryResult.Series series : result.getSeries()) { for (List<Object> values : series.getValues()) { spans.add(values.get(1).toString()); } } } } } return Call.create(spans); }</code><technical_language>This a NPE if is a null returned InfluxDB. String.valueOf(...)</technical_language>

Target:
@Override public Call<List<String>> getSpanNames(String serviceName) { if ("".equals(serviceName)) return Call.emptyList(); String q = String.format("SHOW TAG VALUES FROM \"%s\".\"%s\" with key=\"name\" WHERE \"remote_service_name\" = '%s' OR \"local_service_name\" = '%s'", this.storage.retentionPolicy(), this.storage.measurement(), serviceName.toLowerCase(), serviceName.toLowerCase()); Query query = new Query(q, this.storage.database()); QueryResult response = this.storage.get().query(query); if (response.hasError()){ throw new RuntimeException(response.getError()); } List<String> spans = new ArrayList<>(); List<QueryResult.Result> results = response.getResults(); if (results != null) { for (QueryResult.Result result : results) { if (result != null && result.getSeries() != null) { for (QueryResult.Series series : result.getSeries()) { for (List<Object> values : series.getValues()) { spans.add(values.get(1).toString()); } } } } } return Call.create(spans); }
Source:
<code>public boolean match(ChangeData object) throws OrmException { final PatchSet patchSet = object.currentPatchSet(db); if (patchSet == null) { <START> throw new OrmException("Unable to read patchset for " + object.getId()); <END> } final RevId revision = patchSet.getRevision(); if (revision == null) { throw new OrmException("Unable to read revision for " + object.getId()); } final AnyObjectId objectId = ObjectId.fromString(revision.get()); if (objectId == null) { throw new OrmException("Unable to read objectId(SHA-1) for " + object.getId()); } Change change = object.change(db); if (change == null) { throw new OrmException("Unable to get change for " + object.getId()); } final Project.NameKey projectName = change.getProject(); if (projectName == null) { throw new OrmException("Unable to get projectName for " + object.getId()); } try { final Repository repo = repoManager.openRepository(projectName); try { final RevWalk rw = new RevWalk(repo); try { return match(repo, rw, objectId); } finally { rw.release(); } } finally { repo.close(); } } catch (RepositoryNotFoundException e) { log.error(projectName.get() + " does not denote an existing repository", e); } catch (IOException e) { log.error(projectName.get() + " cannot be read as a repository", e); } return false; }</code><technical_language>This change claims refactoring only, changing behaviour. In MessagePredicate code simply returning false in case of object in database, throwing OrmExceptions. wrong change this, if changed separated refactoring change. Means change</technical_language>

Target:
public boolean match(ChangeData object) throws OrmException { final PatchSet patchSet = object.currentPatchSet(db); if (patchSet == null) { return false; } final RevId revision = patchSet.getRevision(); if (revision == null) { return false; } final AnyObjectId objectId = ObjectId.fromString(revision.get()); if (objectId == null) { return false; } Change change = object.change(db); if (change == null) { return false; } final Project.NameKey projectName = change.getProject(); if (projectName == null) { return false; } Arguments args = new Arguments(patchSet, revision, objectId, change, projectName); try { final Repository repo = repoManager.openRepository(projectName); try { final RevWalk rw = new RevWalk(repo); try { return match(repo, rw, args); } finally { rw.release(); } } finally { repo.close(); } } catch (RepositoryNotFoundException e) { log.error("Repository \"" + projectName.get() + "\" unknown.", e); } catch (IOException e) { log.error(projectName.get() + " cannot be read as a repository", e); } return false; }
Source:
<code>public void openSignUpPage() { getUrl(Global.DOMAIN+"wiki/Special:UserSignup"); waitForElementByElement(blurryWordField); yearSelect = new Select(birthYearField); daySelect = new Select(birthDayField); monthSelect = new Select(birthMonthField); <START> PageObjectLogging.log("openSignUpPage ", "Sign up page opened " +driver.getCurrentUrl(), true, driver); <END> }</code><technical_language>long line</technical_language>

Target:
public void openSignUpPage() { getUrl(Global.DOMAIN+ URLsContent.specialUserSignup); yearSelect = new Select(birthYearField); daySelect = new Select(birthDayField); monthSelect = new Select(birthMonthField); PageObjectLogging.log( "openSignUpPage ", "Sign up page opened " +driver.getCurrentUrl(), true, driver ); }
Source:
<code>static List<InetAddress> resolve(String host, ClientDnsLookup clientDnsLookup) throws UnknownHostException { InetAddress[] addresses = InetAddress.getAllByName(host); if (ClientDnsLookup.USE_FIRST_DNS_IP == clientDnsLookup) { return Collections.singletonList(addresses[0]); } else { return filterPreferredAddresses(addresses); <START> } <END> }</code><technical_language>Btw, changing behavior of RESOLVE_CANONICAL_BOOTSTRAP_SERVERS_ONLY well, right? Before, DNS IP for option in bootstrap path. good clear in KIP</technical_language>

Target:
static List<InetAddress> resolve(String host, ClientDnsLookup clientDnsLookup) throws UnknownHostException { InetAddress[] addresses = InetAddress.getAllByName(host); switch (clientDnsLookup) { case DEFAULT: return Collections.singletonList(addresses[0]); case USE_ALL_DNS_IPS: case RESOLVE_CANONICAL_BOOTSTRAP_SERVERS_ONLY: return filterPreferredAddresses(addresses); } throw new IllegalStateException("Unhandled ClientDnsLookup instance: " + clientDnsLookup); }
Source:
<code>public IAuthorizationPrincipal getPrincipalForEntity(Entity entity) { <START> if (entity != null) { <END> Class entityType; if (entity.getEntityType().equals(EntityEnum.GROUP.toString())) { entityType = IEntityGroup.class; } else { entityType = EntityEnum.getEntityEnum(entity.getEntityType()).getClazz(); } AuthorizationService authService = AuthorizationService.instance(); IAuthorizationPrincipal p = authService.newPrincipal(entity.getId(), entityType); return p; } return null; }</code><technical_language>art: Personally I lean a guard statement. java if (entity == null) { return null } ..</technical_language>

Target:
public IAuthorizationPrincipal getPrincipalForEntity(Entity entity) { if (entity == null) { return null; } Class entityType; if (entity.getEntityType().equals(EntityEnum.GROUP.toString())) { entityType = IEntityGroup.class; } else { entityType = EntityEnum.getEntityEnum(entity.getEntityType()).getClazz(); } AuthorizationService authService = AuthorizationService.instance(); IAuthorizationPrincipal p = authService.newPrincipal(entity.getId(), entityType); return p; }
Source:
<code>public IRunnableWithProgress getRunnable() { return new WorkspaceModifyDelegatingOperation(imonitor -> { final Exception except[] = new Exception[1]; getShell().getDisplay().syncExec(() -> { IRunnableWithProgress op = new WorkspaceModifyDelegatingOperation(monitor -> { SubMonitor subMonitor = SubMonitor.convert(monitor, 3); <START> subMonitor.subTask(CUIPlugin.getResourceString(OP_DESC)); <END> doRunPrologue(subMonitor.split(1)); try { doRun(subMonitor.split(1)); } catch (CoreException e) { except[0] = e; } doRunEpilogue(subMonitor.split(1)); }); try { getContainer().run(false, true, op); } catch (InvocationTargetException e1) { except[0] = e1; } catch (InterruptedException e2) { except[0] = e2; } }); if (except[0] != null) { if (except[0] instanceof InvocationTargetException) { throw (InvocationTargetException) except[0]; } if (except[0] instanceof InterruptedException) { throw (InterruptedException) except[0]; } throw new InvocationTargetException(except[0]); } }); }</code><technical_language>Sorry, I missed this in PS4 I else ok - this is a case of ditto2 - i.e. string passed convert call</technical_language>

Target:
public IRunnableWithProgress getRunnable() { return new WorkspaceModifyDelegatingOperation(imonitor -> { final Exception except[] = new Exception[1]; getShell().getDisplay().syncExec(() -> { IRunnableWithProgress op = new WorkspaceModifyDelegatingOperation(monitor -> { SubMonitor subMonitor = SubMonitor.convert(monitor, CUIPlugin.getResourceString(OP_DESC), 3); doRunPrologue(subMonitor.split(1)); try { doRun(subMonitor.split(1)); } catch (CoreException e) { except[0] = e; } doRunEpilogue(subMonitor.split(1)); }); try { getContainer().run(false, true, op); } catch (InvocationTargetException e1) { except[0] = e1; } catch (InterruptedException e2) { except[0] = e2; } }); if (except[0] != null) { if (except[0] instanceof InvocationTargetException) { throw (InvocationTargetException) except[0]; } if (except[0] instanceof InterruptedException) { throw (InterruptedException) except[0]; } throw new InvocationTargetException(except[0]); } }); }
Source:
<code>public DocTableInfo build() { DocIndexMetaData md = docIndexMetaData(); List<PartitionName> partitions = buildPartitions(md); <START> Collection<Reference> sysColumns = buildSysColumns(); <END> return new DocTableInfo( ident, md.columns(), sysColumns, md.partitionedByColumns(), md.generatedColumnReferences(), md.notNullColumns(), md.indices(), md.references(), md.analyzers(), md.primaryKey(), md.checkConstraints(), md.routingCol(), md.hasAutoGeneratedPrimaryKey(), concreteIndices, concreteOpenIndices, indexNameExpressionResolver, md.numberOfShards(), md.numberOfReplicas(), md.tableParameters(), md.partitionedBy(), partitions, md.columnPolicy(), md.versionCreated(), md.versionUpgraded(), md.isClosed(), md.supportedOperations()); }</code><technical_language>suggestion</technical_language>

Target:
public DocTableInfo build() { DocIndexMetaData md = docIndexMetaData(); List<PartitionName> partitions = buildPartitions(md); return new DocTableInfo( ident, md.columns(), md.partitionedByColumns(), md.generatedColumnReferences(), md.notNullColumns(), md.indices(), md.references(), md.analyzers(), md.primaryKey(), md.checkConstraints(), md.routingCol(), md.hasAutoGeneratedPrimaryKey(), concreteIndices, concreteOpenIndices, indexNameExpressionResolver, md.numberOfShards(), md.numberOfReplicas(), md.tableParameters(), md.partitionedBy(), partitions, md.columnPolicy(), md.versionCreated(), md.versionUpgraded(), md.isClosed(), md.supportedOperations()); }
Source:
<code>private void preOrderPrint(PrintWriter writer, boolean printIntervals, HTNode currentNode, int curDepth) { writer.println(currentNode.toString()); if (printIntervals) { currentNode.debugPrintIntervals(writer); } switch (currentNode.getNodeType()) { case LEAF: return; case CORE: try { final CoreNode node = (CoreNode) currentNode; int extension = node.getExtensionSequenceNumber(); while (extension != -1) { HTNode nextNode = treeIO.readNode(extension); preOrderPrint(writer, printIntervals, nextNode, curDepth); } for (int i = 0; i < node.getNbChildren(); i++) { HTNode nextNode = treeIO.readNode(node.getChild(i)); for (int j = 0; j < curDepth; j++) { writer.print(" "); } writer.print("+-"); preOrderPrint(writer, printIntervals, nextNode, curDepth + 1); } } catch (ClosedChannelException e) { <START> e.printStackTrace(); <END> } break; default: break; } }</code><technical_language>While here, correct this exception handling Activator.logError() instead</technical_language>

Target:
private void preOrderPrint(PrintWriter writer, boolean printIntervals, HTNode currentNode, int curDepth) { writer.println(currentNode.toString()); if (printIntervals) { currentNode.debugPrintIntervals(writer); } switch (currentNode.getNodeType()) { case LEAF: return; case CORE: try { final CoreNode node = (CoreNode) currentNode; int extension = node.getExtensionSequenceNumber(); while (extension != -1) { HTNode nextNode = treeIO.readNode(extension); preOrderPrint(writer, printIntervals, nextNode, curDepth); } for (int i = 0; i < node.getNbChildren(); i++) { HTNode nextNode = treeIO.readNode(node.getChild(i)); for (int j = 0; j < curDepth; j++) { writer.print(" "); } writer.print("+-"); preOrderPrint(writer, printIntervals, nextNode, curDepth + 1); } } catch (ClosedChannelException e) { Activator.logError(e.getMessage()); } break; default: break; } }
Source:
<code>synchronized Map<String, Double> getTimeLatAvg(long now) { <START> Map<String, Double> ret = new ConcurrentHashMap<>(); <END> long lat; long count; synchronized (currentLock) { lat = currentLatBucket; count = currentCountBucket; } long timeSpent = now - bucketStart; ret.put("600", readApproximateLatAvg(lat, count, timeSpent, tmTime, tmLatBuckets, tmCountBuckets, 600 * 1000)); ret.put("10800", readApproximateLatAvg(lat, count, timeSpent, thTime, thLatBuckets, thCountBuckets, 10800 * 1000)); ret.put("86400", readApproximateLatAvg(lat, count, timeSpent, odTime, odLatBuckets, odCountBuckets, 86400 * 1000)); long allTimeCountSum = count + allTimeCount; ret.put(":all-time", Utils.zeroIfNaNOrInf( (double) lat + allTimeLat) / allTimeCountSum); return ret; }</code><technical_language>ConcurrentHashMap is needed I think. This is a get function is synchronized</technical_language>

Target:
synchronized Map<String, Double> getTimeLatAvg(long now) { Map<String, Double> ret = new HashMap<>(); long lat; long count; synchronized (currentLock) { lat = currentLatBucket; count = currentCountBucket; } long timeSpent = now - bucketStart; ret.put("600", readApproximateLatAvg(lat, count, timeSpent, tmTime, tmLatBuckets, tmCountBuckets, 600 * 1000)); ret.put("10800", readApproximateLatAvg(lat, count, timeSpent, thTime, thLatBuckets, thCountBuckets, 10800 * 1000)); ret.put("86400", readApproximateLatAvg(lat, count, timeSpent, odTime, odLatBuckets, odCountBuckets, 86400 * 1000)); long allTimeCountSum = count + allTimeCount; ret.put(":all-time", Utils.zeroIfNaNOrInf( (double) lat + allTimeLat) / allTimeCountSum); return ret; }
Source:
<code>public void testMigrateUpdateRequest() throws Exception { Result result = mock(Result.class); Metacard workspace = getWorkspaceMetacard("workspaceId"); doReturn(workspace).when(result).getMetacard(); doReturn(Collections.singletonList(result)).when(queryResponse).getResults(); ArgumentCaptor<UpdateRequest> updateRequestArgumentCaptor = ArgumentCaptor.forClass(UpdateRequest.class); workspaceQueryMigration.migrateWorkspaces(); verify(catalogFramework, times(1)).update(updateRequestArgumentCaptor.capture()); UpdateRequest actualUpdateRequest = updateRequestArgumentCaptor.getValue(); Metacard updateMetacard = actualUpdateRequest.getUpdates().get(0).getValue(); <START> assertThat(actualUpdateRequest.getUpdates().get(0).getKey(), is("workspaceId")); <END> assertThat( updateMetacard.getAttribute(WORKSPACE_QUERIES).getValues(), is(ImmutableList.of("queryId1", "queryId2"))); }</code><technical_language>workspaceId a constant</technical_language>

Target:
public void testMigrateUpdateRequest() throws Exception { ArgumentCaptor<UpdateRequest> updateRequestArgumentCaptor = ArgumentCaptor.forClass(UpdateRequest.class); workspaceQueryMigration.migrate(); verify(catalogFramework, times(1)).update(updateRequestArgumentCaptor.capture()); UpdateRequest actualUpdateRequest = updateRequestArgumentCaptor.getValue(); Metacard updateMetacard = actualUpdateRequest.getUpdates().get(0).getValue(); assertThat(actualUpdateRequest.getUpdates().get(0).getKey(), is(WORKSPACE_ID)); assertThat( updateMetacard.getAttribute(WORKSPACE_QUERIES).getValues(), is(ImmutableList.of("queryId1", "queryId2"))); }
Source:
<code>public void createPartControl(@Nullable Composite parent) { super.createPartControl(parent); <START> String name = getViewSite().getSecondaryId(); <END> if (name != null) { fViewInfo.setName(name); } setViewTitle(); }</code><technical_language>order need reversed too? I XY charts test with..</technical_language>

Target:
public void createPartControl(@Nullable Composite parent) { String name = getViewSite().getSecondaryId(); if (name != null) { fViewInfo.setName(name); } super.createPartControl(parent); setViewTitle(); }
Source:
<code>public void testWorkflowDAGCWLRequirementMap() throws ApiException { <START> final List<String> strings = getJSON("DockstoreTestUser2/SnapTools", "/snaptools_create_snap_file.cwl", "cwl", "feature/docker_cwl_req_in_main"); <END> int countNode = countNodeInJSON(strings); Assert.assertTrue("JSON should not be blank", strings.size() > 0); Assert.assertEquals("JSON should have eight nodes (including start and end)", countNode, 8); Assert.assertTrue("node data should have snaptools_preprocess_reads as tool", strings.get(0).contains("snaptools_preprocess_reads")); Assert.assertTrue("node data should have snaptools_create_ref_genome_size_file as tool", strings.get(0).contains("snaptools_create_ref_genome_size_file")); Assert.assertTrue("edge should connect snaptools_preprocess_reads and snaptools_create_ref_genome_size_file", strings.get(0).contains("\"source\":\"dockstore_snaptools_create_ref_genome_size_file\",\"target\":\"dockstore_snaptools_preprocess_reads\"")); }</code><technical_language>cwl => DescriptorLanguage.CWL.getShortName()</technical_language>

Target:
public void testWorkflowDAGCWLRequirementMap() throws ApiException { final List<String> strings = getJSON("DockstoreTestUser2/SnapTools", "/snaptools_create_snap_file.cwl", DescriptorLanguage.CWL.getShortName(), "feature/docker_cwl_req_in_main"); int countNode = countNodeInJSON(strings); Assert.assertTrue("JSON should not be blank", strings.size() > 0); Assert.assertEquals("JSON should have eight nodes (including start and end)", 8, countNode); Assert.assertTrue("node data should have snaptools_preprocess_reads as tool", strings.get(0).contains("snaptools_preprocess_reads")); Assert.assertTrue("node data should have snaptools_create_ref_genome_size_file as tool", strings.get(0).contains("snaptools_create_ref_genome_size_file")); Assert.assertTrue("edge should connect snaptools_preprocess_reads and snaptools_create_ref_genome_size_file", strings.get(0).contains("\"source\":\"dockstore_snaptools_create_ref_genome_size_file\",\"target\":\"dockstore_snaptools_preprocess_reads\"")); }
Source:
<code>protected boolean checkExistingStorageDomain() { if (storageDomainStaticDao.get(getStorageDomain().getId()) != null) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST); } Pair<StorageDomainStatic, Guid> domainFromIrs = executeHSMGetStorageDomainInfo( new HSMGetStorageDomainInfoVDSCommandParameters(getVdsId(), getStorageDomain().getId())); if (domainFromIrs == null) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST); } if (!concreteCheckExistingStorageDomain(domainFromIrs)) { return false; } initStorageDomainProperties(domainFromIrs); <START> if (isStorageWithSameNameExists()) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST); } <END> return true; }</code><technical_language>this done in base class? do need too? if do, this method right place</technical_language>

Target:
protected boolean checkExistingStorageDomain() { if (storageDomainStaticDao.get(getStorageDomain().getId()) != null) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST); } Pair<StorageDomainStatic, Guid> domainFromIrs = executeHSMGetStorageDomainInfo( new HSMGetStorageDomainInfoVDSCommandParameters(getVdsId(), getStorageDomain().getId())); if (domainFromIrs == null) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST); } if (!concreteCheckExistingStorageDomain(domainFromIrs)) { return false; } initStorageDomainProperties(domainFromIrs); return true; }
Source:
<code>public ResponseEntity<?> exposeSingleEventType(@PathVariable final String name, final NativeWebRequest nativeWebRequest) { try { final EventType eventType = repository.findByName(name); return status(HttpStatus.OK).body(eventType); } catch (NoSuchEventTypeException e) { LOG.debug("Could not find EventType: " + name); return create(Problem.valueOf(NOT_FOUND, "EventType '" + name + "' does not exist."), <START> nativeWebRequest); <END> } }</code><technical_language>I fit line :-D</technical_language>

Target:
public ResponseEntity<?> exposeSingleEventType(@PathVariable final String name, final NativeWebRequest nativeWebRequest) { try { final EventType eventType = repository.findByName(name); return status(HttpStatus.OK).body(eventType); } catch (NoSuchEventTypeException e) { LOG.debug("Could not find EventType: {}", name); return create(Problem.valueOf(NOT_FOUND, "EventType '" + name + "' does not exist."), nativeWebRequest); } }
Source:
<code>public void removeNodeToken(String nodeUrl, String token) throws RMException { if (allNodes.containsKey(nodeUrl)) { RMNode rmNode = allNodes.get(nodeUrl); rmNode.removeToken(token); } else { <START> throw new RMException("Unkonwn node " + nodeUrl); <END> } }</code><technical_language>Unkonwn => Unknown</technical_language>

Target:
public void removeNodeToken(String nodeUrl, String token) throws RMException { if (allNodes.containsKey(nodeUrl)) { RMNode rmNode = allNodes.get(nodeUrl); checkNodeAdminPermission(rmNode, caller); rmNode.removeToken(token); } else { throw new RMException("Unknown node " + nodeUrl); } }
Source:
<code><START> public static <END> CalledStringFunction create(long start, long end, int depth, String value, @Nullable ICalledFunction parent) { if (start > end) { throw new IllegalArgumentException(Messages.TimeError + '[' + start + ',' + end + ']'); } return new CalledStringFunction(start, end, value, depth, parent); }</code><technical_language>I this protected</technical_language>

Target:
protected static CalledStringFunction create(long start, long end, int depth, String value, @Nullable ICalledFunction parent) { if (start > end) { throw new IllegalArgumentException(Messages.TimeError + '[' + start + ',' + end + ']'); } return new CalledStringFunction(start, end, value, depth, parent); }
Source:
<code>public LocalStoreUnavailableException() { super(new StringBuilder().append("Local storage seems unavailable.") .append(System.lineSeparator()) .append("Local storage available: ") <START> .append(Gdx.files.isLocalStorageAvailable()) <END> .append(System.lineSeparator()) .append("Local storage path: ") .append(Gdx.files.getLocalStoragePath()) .toString()); }</code><technical_language>local storage unavailable... local storage available.... mind... is unavailable..</technical_language>

Target:
public LocalStoreUnavailableException() { super(new StringBuilder().append("Local storage seems unavailable.") .append(System.lineSeparator()) .append("Local storage path: ") .append(Gdx.files.getLocalStoragePath()) .toString()); }
Source:
<code>private void batchData() { TreeSet<Data> batchData; long startBatching; <START> synchronized (pendingData) { <END> startBatching = System.currentTimeMillis(); batchData = pendingData; pendingData = new TreeSet<>(); Data previousData = null; for (Iterator<Data> i = batchData.iterator(); i.hasNext();) { Data d = i.next(); if (null == previousData || !(d.getId().equals(previousData.getId()) && d.getTenantId().equals(previousData.getTenantId()))) { previousData = d; } else { i.remove(); if ((d.getTimestamp() - previousData.getTimestamp()) < minReportingInterval) { log.tracef("MinReportingInterval violation, prev: %s, removed: %s", previousData, d); } else { pendingData.add(d); log.tracef("Deferring data, keep: %s, defer: %s", previousData, d); } } } if (!pendingData.isEmpty()) { log.debugf("Deferring [%d] Datum(s) to next firing !!", pendingData.size()); } } batchData.stream().forEach(d -> kSession.insert(d)); long batchingTime = System.currentTimeMillis() - startBatching; log.debugf("Batching Data [%s] took [%s]", batchData.size(), batchingTime); if (batchingTime > PERF_BATCHING_THRESHOLD) { log.warnf("Batching Data [%s] took [%s] ms exceeding [%s] ms", batchData.size(), batchingTime, PERF_BATCHING_THRESHOLD); } }</code><technical_language>I missing this is same. This is a single thread need synchronized here</technical_language>

Target:
private void batchData() { long startBatching = System.currentTimeMillis(); TreeSet<Data> batchData = pendingData; pendingData = new TreeSet<>(); Data previousData = null; for (Iterator<Data> i = batchData.iterator(); i.hasNext();) { Data d = i.next(); if (!d.same(previousData)) { previousData = d; kSession.insert(d); } else { if ((d.getTimestamp() - previousData.getTimestamp()) < minReportingInterval) { log.tracef("MinReportingInterval violation, prev: %s, removed: %s", previousData, d); } else { pendingData.add(d); log.tracef("Deferring data, keep: %s, defer: %s", previousData, d); } } if (!pendingData.isEmpty()) { log.debugf("Deferring [%d] Datum(s) to next firing !!", pendingData.size()); } } long batchingTime = System.currentTimeMillis() - startBatching; log.debugf("Batching Data [%s] took [%s]", batchData.size(), batchingTime); if (batchingTime > PERF_BATCHING_THRESHOLD) { log.warnf("Batching Data [%s] took [%s] ms exceeding [%s] ms", batchData.size(), batchingTime, PERF_BATCHING_THRESHOLD); } }
Source:
<code>public Response handle(Request request) { try { return this.handleAsync(request).get(); } catch (InterruptedException | ExecutionException ex) { <START> throw new RuntimeException(ex); <END> } }</code><technical_language>Guava, consider [throw Throwables.propagate(ex)](<LINK_0> instead</technical_language>

Target:
public Response handle(Request request) { try { return this.handleAsync(request).get(); } catch (InterruptedException | ExecutionException ex) { throw Throwables.propagate(ex); } }
Source:
<code>protected boolean validateExtensionElement(IConfigurationElement element) { final boolean valid; if (TAG_PROCESSOR.equals(element.getName())) { IConfigurationElement[] nsURIChildren = element.getChildren(TAG_NS_URI); IConfigurationElement[] resourceURIChildren = element.getChildren(TAG_RESOURCE_URI); if (element.getAttribute(ATT_CLASS) == null) { logMissingAttribute(element, ATT_CLASS); valid = false; } else if (element.getAttribute(ATT_ORDINAL) == null) { String ordinalStr = element.getAttribute(ATT_ORDINAL); try { <START> Integer.parseInt(ordinalStr); <END> } catch (NumberFormatException nfe) { log(IStatus.ERROR, element, EMFCompareRCPMessages.getString( "malformed.extension.attribute", ATT_ORDINAL)); } logMissingAttribute(element, ATT_ORDINAL); valid = false; } else if (nsURIChildren.length > 0) { if (nsURIChildren[0].getAttribute(ATT_VALUE) == null) { logMissingAttribute(nsURIChildren[0], ATT_VALUE); valid = false; } else { valid = true; } } else if (resourceURIChildren.length > 0) { if (resourceURIChildren[0].getAttribute(ATT_VALUE) == null) { logMissingAttribute(resourceURIChildren[0], ATT_VALUE); valid = false; } else { valid = true; } } else { log(IStatus.ERROR, element, "Post processor must have an nsURI or a resource URI"); valid = false; } } else { valid = false; } return valid; }</code><technical_language>"ordinalStr" is null, this fail in NPE. content of this if "logMissingAttribute(element, ATT_ORDINAL)" another if added condition " != null" log a potential malformed integer</technical_language>

Target:
protected boolean validateExtensionElement(IConfigurationElement element) { final boolean valid; if (TAG_PROCESSOR.equals(element.getName())) { IConfigurationElement[] nsURIChildren = element.getChildren(TAG_NS_URI); IConfigurationElement[] resourceURIChildren = element.getChildren(TAG_RESOURCE_URI); if (element.getAttribute(ATT_CLASS) == null) { logMissingAttribute(element, ATT_CLASS); valid = false; } else if (element.getAttribute(ATT_ORDINAL) == null) { logMissingAttribute(element, ATT_ORDINAL); valid = false; } else if (element.getAttribute(ATT_ORDINAL) != null) { String ordinalStr = element.getAttribute(ATT_ORDINAL); try { Integer.parseInt(ordinalStr); } catch (NumberFormatException nfe) { log(IStatus.ERROR, element, EMFCompareRCPMessages.getString( "malformed.extension.attribute", ATT_ORDINAL)); return false; } valid = true; } else if (nsURIChildren.length > 0) { if (nsURIChildren[0].getAttribute(ATT_VALUE) == null) { logMissingAttribute(nsURIChildren[0], ATT_VALUE); valid = false; } else { valid = true; } } else if (resourceURIChildren.length > 0) { if (resourceURIChildren[0].getAttribute(ATT_VALUE) == null) { logMissingAttribute(resourceURIChildren[0], ATT_VALUE); valid = false; } else { valid = true; } } else { log(IStatus.ERROR, element, "Post processor must have an nsURI or a resource URI"); valid = false; } } else { valid = false; } return valid; }
Source:
<code>private void determineExcessEntitlements(Pool pool) { List<Pool> pools = new ArrayList<Pool>(); pools.add(pool); pools.addAll(sharedPools.get(pool)); List<Entitlement> freeEntitlements = this.poolCurator.retrieveOrderedEntitlementsOf(pools); long existing = pool.getQuantity(); for (Entitlement ent : freeEntitlements) { if (newConsumed > existing) { if (!ent.getConsumer().isShare()) { if (ent.getPool().getType().equals(Pool.PoolType.SHARE_DERIVED)) { Entitlement source = ent.getPool().getSourceEntitlement(); if (entitlementsToAdjust.get(source) == null) { addEntitlementToAdjust(source, source.getQuantity()); } addEntitlementToAdjust(source, entitlementsToAdjust.get(source) - ent.getQuantity()); } addEntitlementToRevoke(ent); newConsumed -= ent.getQuantity(); } } <START> } <END> }</code><technical_language>apologies if I missing some detail, skipping revokes of shared entitlements here, is covered else where</technical_language>

Target:
private void determineExcessEntitlements(Pool pool) { List<Pool> pools = new ArrayList<Pool>(); pools.add(pool); if (sharedPools.get(pool) != null) { pools.addAll(sharedPools.get(pool)); } List<Entitlement> entitlements = this.poolCurator.retrieveOrderedEntitlementsOf(pools); long newConsumed = poolNewConsumed.get(pool); long existing = pool.getQuantity(); for (Entitlement ent : entitlements) { if (newConsumed > existing) { if (!ent.getConsumer().isShare()) { if (ent.getPool().getType().equals(Pool.PoolType.SHARE_DERIVED)) { Entitlement source = ent.getPool().getSourceEntitlement(); if (shareEntitlementsToAdjust.get(source) == null) { addEntitlementToAdjust(source, source.getQuantity()); } addEntitlementToAdjust(source, shareEntitlementsToAdjust.get(source) - ent.getQuantity()); if (shareEntitlementsToAdjust.get(source) == 0) { shareEntitlementsToAdjust.remove(source); addEntitlmentToRevoke(source); } } addEntitlementToRevoke(ent); newConsumed -= ent.getQuantity(); } } } poolNewConsumed.put(pool, newConsumed); }
Source:
<code>public static void main(String[] args) throws IOException, NoSuchAlgorithmException, InvalidKeyException { try { MinioClient minioClient = MinioClient.builder() .endpoint("<LINK_1>") .credentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG") .build(); VersioningConfiguration config = minioClient.getBucketVersioning( GetBucketVersioningArgs.builder().bucket("my-bucketname").build()); <START> if (config.status() == VersioningConfiguration.Status.OFF) { System.out.println("Versioning on bucket 'my-bucketname' is not enabled"); } else if (config.status() == VersioningConfiguration.Status.ENABLED) { System.out.println("Versioning on bucket 'my-bucketname' is enabled"); } else if (config.status() == VersioningConfiguration.Status.SUSPENDED) { System.out.println("Versioning on bucket 'my-bucketname' is suspended"); } <END> } catch (MinioException e) { System.out.println("Error occurred: " + e); } }</code><technical_language>switch statement here? toString() method this a single statement. suggestion String statusStr = config.status().toString(); System.out.println("Versioning bucket 'my-bucketname' is " + statusStr.isEmpty ? "Off" : statusStr);</technical_language>

Target:
public static void main(String[] args) throws IOException, NoSuchAlgorithmException, InvalidKeyException { try { MinioClient minioClient = MinioClient.builder() .endpoint("<LINK_1>") .credentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG") .build(); VersioningConfiguration config = minioClient.getBucketVersioning( GetBucketVersioningArgs.builder().bucket("my-bucketname").build()); System.out.println("Versioning on bucket 'my-bucketname' is " + config.status()); } catch (MinioException e) { System.out.println("Error occurred: " + e); } }
Source:
<code>public void testSendDateForDisplay() { <START> validAdminEmailAttributesObject.sendDate = Instant.now(); <END> String expectedDate = TimeHelper.formatTime12H(formatDateForAdminEmailAttributesTest( validAdminEmailAttributesObject.sendDate)); String actualDate = validAdminEmailAttributesObject.getSendDateForDisplay(); assertEquals(expectedDate, actualDate); }</code><technical_language>Is this change in logic of test intentional? original test set this field. Ok, I this is for consistency test below</technical_language>

Target:
public void testSendDateForDisplay() { validAdminEmailAttributesObject.sendDate = Instant.now(); String expectedDate = TimeHelper.formatTime12H(convertToAdminTime(validAdminEmailAttributesObject.sendDate)); String actualDate = validAdminEmailAttributesObject.getSendDateForDisplay(); assertEquals(expectedDate, actualDate); }
Source:
<code>public void testUnknownMigration() { <START> assertEquals(null, migrationService.getMigration("fake")); <END> }</code><technical_language>suggestion assertNull(migrationService.getMigration("fake"));</technical_language>

Target:
public void testUnknownMigration() { assertNull(migrationService.getMigration("fake")); }