auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void checkout(@Nonnull Run<?, ?> build, @Nonnull Launcher launcher, @Nonnull FilePath workspace, @Nonnull TaskListener listener, @CheckForNull File changelogFile, @CheckForNull SCMRevisionState baseline) throws IOException, InterruptedException { final AccurevServer server = getServer(); boolean serverDisabled = server != null && server.isServerDisabled(); <START> if (!serverDisabled) { <END> boolean checkout = AccurevMode.findDelegate(this).checkout(build, launcher, workspace, listener, changelogFile); if (checkout) listener.getLogger().println("Checkout done"); else listener.getLogger().println("Checkout failed"); }else{ listener.getLogger().println("Checkout skipped due to server disabled"); throw new InterruptedException(); } }</code><technical_language>move this check Abstract Delegate access server variable</technical_language>

Target:
public void checkout(@Nonnull Run<?, ?> build, @Nonnull Launcher launcher, @Nonnull FilePath workspace, @Nonnull TaskListener listener, @CheckForNull File changelogFile, @CheckForNull SCMRevisionState baseline) throws IOException, InterruptedException { boolean checkout = AccurevMode.findDelegate(this).checkout(build, launcher, workspace, listener, changelogFile); if (checkout) listener.getLogger().println("Checkout done"); else listener.getLogger().println("Checkout failed"); }
Source:
<code>public Response toResponse(TMUnavailableException exception) { <START> return Response.status(Response.Status.SERVICE_UNAVAILABLE).build(); <END> }</code><technical_language>this detected findbugs</technical_language>

Target:
public Response toResponse(TMUnavailableException exception) { return Response.status(HttpResponseCodes.SC_SERVICE_UNAVAILABLE).build(); }
Source:
<code>protected Builder() { id("profitbricks-rest") .name("Digital Ocean v2 API") .identityName("Not used for OAuth") <START> .credentialName("Must be oauth2 Bearer Token") <END> .documentation(URI.create("<LINK_0>")) .defaultEndpoint("<LINK_1>") .defaultProperties(ProfitBricksApiMetadata.defaultProperties()) .view(typeToken(ComputeServiceContext.class)) .defaultModules(ImmutableSet.<Class<? extends Module>>builder() .add(OkHttpCommandExecutorServiceModule.class) .build()); }</code><technical_language>Change literals accordingly</technical_language>

Target:
protected Builder() { id("profitbricks-rest") .name("ProfitBricks REST API") .identityName("API Username") .credentialName("API Password") .documentation(URI.create("<LINK_0>")) .defaultEndpoint("<LINK_1>") .defaultProperties(ProfitBricksApiMetadata.defaultProperties()) .view(typeToken(ComputeServiceContext.class)) .defaultModules(ImmutableSet.<Class<? extends Module>>builder() .add(OkHttpCommandExecutorServiceModule.class) .add(ProfitBricksHttpApiModule.class) .build()); }
Source:
<code>public boolean isPublic() { <START> return hasModifier(PUBLIC) || (getDeclaringClass().isExtern() && !hasModifier(PRIVATE)); <END> }</code><technical_language>This cover of (from manual): Omitting visibility modifier defaults visibility private, exceptions public instead: If class is declared extern. If field is declared interface. If field overrides a public field. If class metadata @:publicFields, forces class fields of inheriting classes public</technical_language>

Target:
public boolean isPublic() { HaxeClassModel declaringClass = getDeclaringClass(); return hasModifier(PUBLIC) || ((declaringClass.isInterface() || declaringClass.isExtern()) && !hasModifier(PRIVATE)) || isOverriddenPublicMethod() || getDeclaringClass().hasMeta("@:publicFields"); }
Source:
<code>public void shouldReturnDifferentCallHistoryForDifferentTables() throws Exception { final KnoxShellTable table1 = new KnoxShellTable(); final long id1 = KnoxShellTable.getUniqueTableId(); <START> table1.id(id1); <END> KnoxShellTableCallHistory.getInstance().saveCall(id1, new KnoxShellTableCall("class1", "method1", true, Collections.singletonMap("param1", String.class))); final KnoxShellTable table2 = new KnoxShellTable(); final long id2 = KnoxShellTable.getUniqueTableId(); table1.id(id2); KnoxShellTableCallHistory.getInstance().saveCall(id2, new KnoxShellTableCall("class2", "method2", false, Collections.singletonMap("param2", String.class))); assertNotEquals(table1.getCallHistoryList(), table2.getCallHistoryList()); }</code><technical_language>I looked implementation a table get a unique ID automatically? Do need set id table? able ask table for id</technical_language>

Target:
public void shouldReturnDifferentCallHistoryForDifferentTables() throws Exception { final KnoxShellTable table1 = new KnoxShellTable(); KnoxShellTableCallHistory.getInstance().saveCall(table1.getId(), new KnoxShellTableCall("class1", "method1", true, Collections.singletonMap("param1", String.class))); final KnoxShellTable table2 = new KnoxShellTable(); KnoxShellTableCallHistory.getInstance().saveCall(table2.getId(), new KnoxShellTableCall("class2", "method2", false, Collections.singletonMap("param2", String.class))); assertNotEquals(table1.getCallHistoryList(), table2.getCallHistoryList()); }
Source:
<code>protected Promise<? extends T> run(Context context) { _startedAt = System.currentTimeMillis(); <START> Task<T> task = wrap(0); <END> context.run(task); return task; }</code><technical_language>Nope. I missed that</technical_language>

Target:
private Promise<? extends T> run(Context context) { _startedAt = System.currentTimeMillis(); Task<T> task = wrap(0); context.run(task); return task; }
Source:
<code>public CheckpointResult checkpointGroupStates(final Tuple<String, Group> tuple) { final String groupId = tuple.getKey(); final Group group = tuple.getValue(); final GroupCheckpoint checkpoint = group.checkpoint(); try { final File storedFile = getGroupCheckpointFile(groupId); if (storedFile.exists()) { storedFile.delete(); LOG.log(Level.INFO, "Checkpoint deleted for groupId: {0}", groupId); } <START> storedFile.getParentFile().mkdirs(); <END> final DataFileWriter<GroupCheckpoint> dataFileWriter = new DataFileWriter<>(groupCheckpointDatumWriter); dataFileWriter.create(checkpoint.getSchema(), storedFile); dataFileWriter.append(checkpoint); dataFileWriter.close(); LOG.log(Level.INFO, "Checkpoint completed for groupId: {0}", groupId); } catch (final Exception e) { e.printStackTrace(); return CheckpointResult.newBuilder() .setIsSuccess(false) .setMsg("Unsuccessful in checkpointing group " + tuple.getKey()) .setPathToCheckpoint("") .build(); } for (final ExecutionDag ed : group.getExecutionDags().values()) { for (final ExecutionVertex ev : ed.getDag().getVertices()) { if (ev.getType() == ExecutionVertex.Type.OPERATOR) { final Operator op = ((DefaultPhysicalOperatorImpl) ev).getOperator(); if (op instanceof StateHandler) { final StateHandler stateHandler = (StateHandler) op; stateHandler.removeOldStates(checkpoint.getCheckpointTimestamp()); } } } } return CheckpointResult.newBuilder() .setIsSuccess(true) .setMsg("Successfully checkpointed group " + tuple.getKey()) .setPathToCheckpoint(getGroupCheckpointFile(groupId).toString()) .build(); }</code><technical_language>do create directory here</technical_language>

Target:
public CheckpointResult checkpointGroupStates(final Tuple<String, Group> tuple) { final String groupId = tuple.getKey(); final Group group = tuple.getValue(); final GroupCheckpoint checkpoint = group.checkpoint(); try { final File storedFile = getGroupCheckpointFile(groupId); if (storedFile.exists()) { storedFile.delete(); LOG.log(Level.INFO, "Checkpoint deleted for groupId: {0}", groupId); } final DataFileWriter<GroupCheckpoint> dataFileWriter = new DataFileWriter<>(groupCheckpointDatumWriter); dataFileWriter.create(checkpoint.getSchema(), storedFile); dataFileWriter.append(checkpoint); dataFileWriter.close(); LOG.log(Level.INFO, "Checkpoint completed for groupId: {0}", groupId); } catch (final Exception e) { e.printStackTrace(); return CheckpointResult.newBuilder() .setIsSuccess(false) .setMsg("Unsuccessful in checkpointing group " + tuple.getKey()) .setPathToCheckpoint("") .build(); } for (final ExecutionDag ed : group.getExecutionDags().values()) { for (final ExecutionVertex ev : ed.getDag().getVertices()) { if (ev.getType() == ExecutionVertex.Type.OPERATOR) { final Operator op = ((DefaultPhysicalOperatorImpl) ev).getOperator(); if (op instanceof StateHandler) { final StateHandler stateHandler = (StateHandler) op; stateHandler.removeOldStates(checkpoint.getCheckpointTimestamp()); } } } } return CheckpointResult.newBuilder() .setIsSuccess(true) .setMsg("Successfully checkpointed group " + tuple.getKey()) .setPathToCheckpoint(getGroupCheckpointFile(groupId).toString()) .build(); }
Source:
<code>public AuthnRequest build(final SAML2MessageContext context) { final SingleSignOnService ssoService = context.getIDPSingleSignOnService(this.bindingType); final String idx = this.assertionConsumerServiceIndex > 0 ? String.valueOf(assertionConsumerServiceIndex) : null; final AssertionConsumerService assertionConsumerService = context.getSPAssertionConsumerService(idx); <START> assertionConsumerService.setLocation(this.urlResolver.compute(assertionConsumerService.getLocation(), context.getWebContext())); <END> return buildAuthnRequest(context, assertionConsumerService, ssoService); }</code><technical_language>This right me. I a fan of overriding metadata behavior. change ACS url in metadata based need</technical_language>

Target:
public AuthnRequest build(final SAML2MessageContext context) { final SingleSignOnService ssoService = context.getIDPSingleSignOnService(this.bindingType); final String idx = this.assertionConsumerServiceIndex > 0 ? String.valueOf(assertionConsumerServiceIndex) : null; final AssertionConsumerService assertionConsumerService = context.getSPAssertionConsumerService(idx); return buildAuthnRequest(context, assertionConsumerService, ssoService); }
Source:
<code>public ReleaseWebHookStatus(final String payloadUrl, final int status) { this.payloadUrl = payloadUrl; this.status = status; <START> this.timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date()); <END> }</code><technical_language>need current time</technical_language>

Target:
public ReleaseWebHookStatus(final String payloadUrl, final int status) { this.payloadUrl = payloadUrl; this.statusCode = status; this.timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date()); }
Source:
<code>public JavaImplementationCodeMining(IType element, JavaEditor editor, IDocument document, ICodeMiningProvider provider, boolean showImplementationsAtLeastOne) throws JavaModelException, BadLocationException { <START> super(element, document, provider, e -> new FindImplementorsAction(editor).run(element)); <END> this.showImplementationsAtLeastOne= showImplementationsAtLeastOne; }</code><technical_language>This set if number of implementation is 0. I suggest set this in doResolve() result</technical_language>

Target:
public JavaImplementationCodeMining(IType element, JavaEditor editor, IDocument document, ICodeMiningProvider provider, boolean showImplementationsAtLeastOne) throws JavaModelException, BadLocationException { super(element, document, provider, null); this.editor= editor; this.showImplementationsAtLeastOne= showImplementationsAtLeastOne; }
Source:
<code>private synchronized static SslContext createSslContext() throws SSLException { if (sslBuilder == null) { sslBuilder = GrpcSslContexts.forClient().ciphers(null); if (OpenSsl.isAvailable()) { <START> LOG.info("gRPC is using the OpenSSL provider (tcnactive jar)"); <END> } else { LOG.info("gRPC is using the JDK provder (alpn-boot jar)"); } } return sslBuilder.build(); }</code><technical_language>Do want log this multiple times? If not, log in performWarmup()</technical_language>

Target:
private synchronized static SslContext createSslContext() throws SSLException { if (sslBuilder == null) { sslBuilder = GrpcSslContexts.forClient().ciphers(null); if (OpenSsl.isAvailable()) { LOG.info("gRPC is using the OpenSSL provider (tcnactive jar)"); } else { LOG.info("gRPC is using the JDK provider (alpn-boot jar)"); } } return sslBuilder.build(); }
Source:
<code>protected LocalSearchForager buildForager(HeuristicConfigPolicy configPolicy) { LocalSearchForagerConfig foragerConfig_; if (foragerConfig != null) { if (localSearchType != null) { throw new IllegalArgumentException("The localSearchType (" + localSearchType + ") must not be configured if the foragerConfig (" + foragerConfig + ") is explicitly configured."); } foragerConfig_ = foragerConfig; } else { LocalSearchType localSearchType_ = defaultIfNull(localSearchType, LocalSearchType.LATE_ACCEPTANCE); foragerConfig_ = new LocalSearchForagerConfig(); switch (localSearchType_) { case HILL_CLIMBING: foragerConfig_.setAcceptedCountLimit(1); break; case TABU_SEARCH: foragerConfig_.setAcceptedCountLimit(1000); break; case SIMULATED_ANNEALING: case LATE_ACCEPTANCE: foragerConfig_.setAcceptedCountLimit(1); break; case GREAT_DELUGE: <START> foragerConfig_.setAcceptedCountLimit(4); <END> case VARIABLE_NEIGHBORHOOD_DESCENT: foragerConfig_.setPickEarlyType(LocalSearchPickEarlyType.FIRST_LAST_STEP_SCORE_IMPROVING); break; default: throw new IllegalStateException("The localSearchType (" + localSearchType_ + ") is not implemented."); } } return foragerConfig_.buildForager(configPolicy); }</code><technical_language>Question: acceptedCountLimit 4? canonical Great Deluge paper suggest a "tournament factor" of 4? In past, overfitted some examples's benchmarks acceptedCountLimit of 4 for SA (cloud balancing for one). This legacy lingers in of benchmark configs. is reliable basis for this, example I it, nurse rostering, worked 1 for 10 medium datasets, a neglectable margin. I 've confirmed this decently other cases. acceptedCountLimit 1, SA in this code, untill is proof 3 examples for 5 datasets 4 works better. @triceo Wdyt</technical_language>

Target:
protected LocalSearchForager buildForager(HeuristicConfigPolicy configPolicy) { LocalSearchForagerConfig foragerConfig_; if (foragerConfig != null) { if (localSearchType != null) { throw new IllegalArgumentException("The localSearchType (" + localSearchType + ") must not be configured if the foragerConfig (" + foragerConfig + ") is explicitly configured."); } foragerConfig_ = foragerConfig; } else { LocalSearchType localSearchType_ = defaultIfNull(localSearchType, LocalSearchType.LATE_ACCEPTANCE); foragerConfig_ = new LocalSearchForagerConfig(); switch (localSearchType_) { case HILL_CLIMBING: foragerConfig_.setAcceptedCountLimit(1); break; case TABU_SEARCH: foragerConfig_.setAcceptedCountLimit(1000); break; case SIMULATED_ANNEALING: case LATE_ACCEPTANCE: foragerConfig_.setAcceptedCountLimit(1); break; case GREAT_DELUGE: foragerConfig_.setAcceptedCountLimit(1); break; case VARIABLE_NEIGHBORHOOD_DESCENT: foragerConfig_.setPickEarlyType(LocalSearchPickEarlyType.FIRST_LAST_STEP_SCORE_IMPROVING); break; default: throw new IllegalStateException("The localSearchType (" + localSearchType_ + ") is not implemented."); } } return foragerConfig_.buildForager(configPolicy); }
Source:
<code>public void fromAction() { Completable.fromAction(new Action() { @Override public void run() throws Exception { <START> <END> } }) .test() .assertResult(); }</code><technical_language>Assert counter</technical_language>

Target:
public void fromAction() { final AtomicInteger atomicInteger = new AtomicInteger(); Completable.fromAction(new Action() { @Override public void run() throws Exception { atomicInteger.incrementAndGet(); } }) .test() .assertResult(); assertEquals(1, atomicInteger.get()); }
Source:
<code>public void revokeToken(final String token) { <START> validateToken(token); <END> removeRevokedExpiredToken(token); log.revokedToken(getTokenDisplayText(token)); }</code><technical_language>If removeToken() invokes validateToken(), skip validateToken() call here</technical_language>

Target:
public void revokeToken(final String token) { removeToken(token); log.revokedToken(getTokenDisplayText(token)); }
Source:
<code>private void syncContents(OwnCloudClient client) { startDirectDownloads(); startContentSynchronizations(mFilesToSyncContentsWithoutUpload, client); startContentSynchronizations(mFavouriteFilesToSyncContents, client); <START> walkSubfolders(mFoldersToWalkDown, client); END> }</code><technical_language>Maybe, mFoldersToWalkDown in walkSubfolders() pass</technical_language>

Target:
private void syncContents(OwnCloudClient client) { startDirectDownloads(); startContentSynchronizations(mFilesToSyncContentsWithoutUpload, client); startContentSynchronizations(mFavouriteFilesToSyncContents, client); walkSubfolders(client); }
Source:
<code>private VmInfoBuilderBase createBuilder() { <START> if (VmDeviceCommonUtils.isOldClusterVersion(vm.getvds_group_compatibility_version())) <END> return new VmOldInfoBuilder(vm, createInfo); else return new VmInfoBuilder(vm, createInfo); }</code><technical_language>please wrap if-else block brackets {}</technical_language>

Target:
private VmInfoBuilderBase createBuilder() { if (VmDeviceCommonUtils.isOldClusterVersion(vm.getvds_group_compatibility_version())) { return new VmOldInfoBuilder(vm, createInfo); } else { return new VmInfoBuilder(vm, createInfo); } }
Source:
<code>private void iterateGroupNodes(long groupdId, NodeReader nodeReader) { int currentPointer = (int) headPointers.get(groupdId); <START> if (currentPointer == NULL) { <END> nodeReader.read(NULL); } else { while (currentPointer != NULL) { checkState(currentPointer < nextNodePointer, "error, corrupt pointer; max valid %s, found %s", nextNodePointer, currentPointer); nodeReader.read(currentPointer); currentPointer = nextPointers.get(currentPointer); } } }</code><technical_language>int for operations related headPointers. IntBigArray instead</technical_language>

Target:
private void iterateGroupNodes(long groupdId, NodeReader nodeReader) { int currentPointer = (int) headPointers.get(groupdId); checkArgument(currentPointer != NULL, "valid group must have non-null head pointer"); while (currentPointer != NULL) { checkState(currentPointer < nextNodePointer, "error, corrupt pointer; max valid %s, found %s", nextNodePointer, currentPointer); nodeReader.read(currentPointer); currentPointer = nextPointers.get(currentPointer); } }
Source:
<code>public void postConstruct(){ jobStorage = (IJobStorage) context.getAttribute(Constants.JOBS_STORAGE); responser = (ResponseBuilder) context.getAttribute(Constants.RESPONSER); <START> initializationTimestamp = DateTime.now(); <END> }</code><technical_language>put this date context attribute</technical_language>

Target:
public void postConstruct(){ jobStorage = (IJobStorage) context.getAttribute(Constants.JOBS_STORAGE); responser = (ResponseBuilder) context.getAttribute(Constants.RESPONSER); initializationTimestamp = (DateTime) context.getAttribute(Constants.DEPLOY_TIME); }
Source:
<code>public void perform_bulk_read_with_field_mask_operation() { final int count = 10; final List<I> ids = new LinkedList<>(); final String projectDescriptor = Project.getDescriptor() .getFullName(); <START> final FieldMask fieldMask = FieldMask.newBuilder() <END> .addPaths(projectDescriptor + ".id") .addPaths(projectDescriptor + ".status") .build(); for (int i = 0; i < count; i++) { final I id = newId(); final ProjectId projectId = ProjectId.newBuilder() .setId(id.toString()) .build(); final Project state = Project.newBuilder() .setId(projectId) .setName(String.format("project-number-%s", i)) .setStatus(Project.Status.CREATED) .addTask(Task.getDefaultInstance()) .build(); final Any packedState = AnyPacker.pack(state); final EntityStorageRecord record = EntityStorageRecord.newBuilder() .setState(packedState) .setWhenModified(Timestamps.getCurrentTime()) .setVersion(1) .build(); storage.write(id, record); if (i % 2 == 0) { ids.add(id); } } final Iterable<EntityStorageRecord> read = storage.readBulk(ids, fieldMask); assertSize(ids.size(), read); for (EntityStorageRecord record : read) { final Any packedState = record.getState(); final Project state = AnyPacker.unpack(packedState); final ProjectId id = state.getId(); final String stringIdRepr = id.getId(); boolean isIdPresent = false; for (I genericId : ids) { isIdPresent = genericId.toString() .equals(stringIdRepr); if (isIdPresent) { break; } } assertTrue(isIdPresent); assertMatchesMask(state, fieldMask); } }</code><technical_language>Consider extracting some bits of this method: - reusable in other test methods; - code of this method more readable</technical_language>

Target:
public void perform_bulk_read_with_field_mask_operation() { final List<I> ids = fillStorage(10).subList(0, 5); final String projectDescriptor = Project.getDescriptor() .getFullName(); final FieldMask fieldMask = maskForPaths(projectDescriptor + ".id", projectDescriptor + ".status"); final Iterable<EntityStorageRecord> read = storage.readBulk(ids, fieldMask); assertSize(ids.size(), read); for (EntityStorageRecord record : read) { final Project state = checkProjectIdIsInList(record, ids); assertMatchesMask(state, fieldMask); } }
Source:
<code>public String ToInternalString() { String value = ""; String delimiter = ""; <START> for (Map.Entry<String, String> pair : fencingAgentInstanceOptions.entrySet()) { <END> if (pair.getValue().trim().length() > 0) { value = value + delimiter + pair.getKey() + EQUAL + TranslateBoolValue(pair.getValue()); } else if (!fencingSpecialParams.contains(pair.getKey())) { value = value + delimiter + pair.getKey(); } delimiter = (new Character(NEWLINE)).toString(); } return value; }</code><technical_language>If u here, please change string StringBuilder</technical_language>

Target:
public String ToInternalString() { StringBuilder value = new StringBuilder(); String delimiter = ""; for (Map.Entry<String, String> pair : fencingAgentInstanceOptions.entrySet()) { if (pair.getValue().trim().length() > 0) { value.append(delimiter).append(pair.getKey()).append(EQUAL).append(TranslateBoolValue(pair.getValue())); } else if (!fencingSpecialParams.contains(pair.getKey())) { value.append(delimiter).append(pair.getKey()); } delimiter = NEWLINE; } return value.toString(); }
Source:
<code><START> public String placeLimitOrder(LimitOrder limitOrder) { <END> LgoPlaceOrder lgoOrder = LgoAdapters.adaptLimitOrder(limitOrder); return placeOrder(lgoOrder); }</code><technical_language>generic method implementations error adaptation in this method surrounded try { // ... } catch (LgoException e) { throw LgoErrorAdapter.adapt(e); }</technical_language>

Target:
public String placeLimitOrder(LimitOrder limitOrder) throws IOException { LgoPlaceOrder lgoOrder = LgoAdapters.adaptLimitOrder(limitOrder); return placeOrder(lgoOrder); }
Source:
<code>public ASTNode visit(Cell cell, Void _) throws ParseFailedException { String sort = context.cellSorts.get(cell.getLabel()); <START> if (cell.getLabel().equals("k") && cell.getEllipses() != Ellipses.NONE) <END> sort = KSorts.K; if (sort == null) { if (cell.getLabel().equals("k")) sort = "K"; else if (cell.getLabel().equals("T")) sort = "Bag"; else if (cell.getLabel().equals("generatedTop")) sort = "Bag"; else if (cell.getLabel().equals("freshCounter")) sort = "K"; else if (cell.getLabel().equals(MetaK.Constants.pathCondition)) sort = "K"; } if (sort != null) { cell.setContents((Term) new CellTypesFilter2(context, sort, cell.getLabel()).visitNode(cell.getContents())); } else { String msg = "Cell '" + cell.getLabel() + "' was not declared in a configuration."; throw new ParseFailedException(new KException(ExceptionType.ERROR, KExceptionGroup.COMPILER, msg, getName(), cell.getFilename(), cell.getLocation())); } return super.visit(cell, _); }</code><technical_language>this is a general solution. if a cell a ksequence in it? if cell Map in it? need a solution special case specific cell</technical_language>

Target:
public ASTNode visit(Cell cell, Void _) throws ParseFailedException { Sort sort = context.getCellSort(cell); if (sort != null) { cell.setContents((Term) new CellTypesFilter2(context, sort, cell.getLabel()).visitNode(cell.getContents())); } else { String msg = "Cell '" + cell.getLabel() + "' was not declared in a configuration."; throw new ParseFailedException(new KException(ExceptionType.ERROR, KExceptionGroup.COMPILER, msg, getName(), cell.getFilename(), cell.getLocation())); } return super.visit(cell, _); }
Source:
<code><START> public Response listServices(@PathParam("clusterId") Long clusterId, @Context UriInfo uriInfo) { <END> List<QueryParam> queryParams = buildClusterIdAwareQueryParams(clusterId, uriInfo); try { Collection<Service> services; services = catalogService.listServices(queryParams); if (services != null) { return WSUtils.respond(OK, SUCCESS, services); } } catch (Exception ex) { return WSUtils.respond(INTERNAL_SERVER_ERROR, EXCEPTION, ex.getMessage()); } return WSUtils.respond(NOT_FOUND, ENTITY_NOT_FOUND_FOR_FILTER, queryParams.toString()); }</code><technical_language>Instead, in addition, internal clusterId, need expose clusterName in REST API. code needs refer code clusterName clusterId is known. In opinion, database (internal) ids internally codebase exposed user. object needs query id, call methods getXxxById(Long id) in StreamCatalogService. If is case, need a REST API exposing ids</technical_language>

Target:
public Response listServices(@PathParam("clusterId") Long clusterId, @Context UriInfo uriInfo) { List<QueryParam> queryParams = buildClusterIdAwareQueryParams(clusterId, uriInfo); try { Collection<Service> services; services = catalogService.listServices(queryParams); if (services != null) { return WSUtils.respond(services, OK, SUCCESS); } } catch (Exception ex) { return WSUtils.respond(INTERNAL_SERVER_ERROR, EXCEPTION, ex.getMessage()); } return WSUtils.respond(NOT_FOUND, ENTITY_NOT_FOUND_FOR_FILTER, queryParams.toString()); }
Source:
<code>public List<Category> removeAllChildren(final Category parentCategory, final User user, final boolean respectFrontendRoles) throws DotDataException, DotSecurityException { <START> List<Category> unableToDelete = new ArrayList<>(); <END> List<Category> categoriesToDelete = getChildren(parentCategory, user, false); categoriesToDelete.forEach((category)-> { try { delete(category, user, false); } catch (DotDataException | DotSecurityException e) { Logger.error(this, "Category has dependencies. Category name: " + category.getCategoryName()); unableToDelete.add(category); } }); return unableToDelete; }</code><technical_language>this immutable list</technical_language>

Target:
public List<Category> removeAllChildren(final Category parentCategory, final User user, final boolean respectFrontendRoles) throws DotDataException, DotSecurityException { List<Category> unableToDelete = Collections.unmodifiableList(new ArrayList<>()); List<Category> categoriesToDelete = getChildren(parentCategory, user, false); categoriesToDelete.forEach((category)-> { try { delete(category, user, false); } catch (DotDataException | DotSecurityException e) { Logger.error(this, "Category has dependencies. Category name: " + category.getCategoryName()); unableToDelete.add(category); } }); return unableToDelete; }
Source:
<code>public void testJoinWithRangePredicatesinJoinClause() { <START> assertQuery("SELECT COUNT(*)\n" + <END> "FROM (SELECT * FROM lineitem WHERE orderkey % 16 = 0 AND partkey % 2 = 0) lineitem\n" + "JOIN (SELECT * FROM orders WHERE orderkey % 16 = 0 AND custkey % 2 = 0) orders\n" + "ON lineitem.orderkey % 8 = orders.orderkey % 8 AND lineitem.linenumber % 2 = 0\n" + "AND orders.custkey % 8 < 7 AND lineitem.suppkey % 10 < orders.custkey % 7 AND lineitem.suppkey % 7 > orders.custkey % 7"); assertQuery("SELECT COUNT(*)\n" + "FROM (SELECT * FROM lineitem WHERE orderkey % 16 = 0 AND partkey % 2 = 0) lineitem\n" + "JOIN (SELECT * FROM orders WHERE orderkey % 16 = 0 AND custkey % 2 = 0) orders\n" + "ON lineitem.orderkey % 8 = orders.orderkey % 8 AND lineitem.linenumber % 2 = 0\n" + "AND orders.custkey % 8 < lineitem.linenumber % 2 AND lineitem.suppkey % 10 < orders.custkey % 7 AND lineitem.suppkey % 7 > orders.custkey % 7"); }</code><technical_language>replace \n in queries</technical_language>

Target:
public void testJoinWithRangePredicatesinJoinClause() { assertQuery("SELECT COUNT(*) " + "FROM (SELECT * FROM lineitem WHERE orderkey % 16 = 0 AND partkey % 2 = 0) lineitem " + "JOIN (SELECT * FROM orders WHERE orderkey % 16 = 0 AND custkey % 2 = 0) orders " + "ON lineitem.orderkey % 8 = orders.orderkey % 8 AND lineitem.linenumber % 2 = 0 " + "AND orders.custkey % 8 < 7 AND lineitem.suppkey % 10 < orders.custkey % 7 AND lineitem.suppkey % 7 > orders.custkey % 7"); assertQuery("SELECT COUNT(*) " + "FROM (SELECT * FROM lineitem WHERE orderkey % 16 = 0 AND partkey % 2 = 0) lineitem " + "JOIN (SELECT * FROM orders WHERE orderkey % 16 = 0 AND custkey % 2 = 0) orders " + "ON lineitem.orderkey % 8 = orders.orderkey % 8 AND lineitem.linenumber % 2 = 0 " + "AND orders.custkey % 8 < lineitem.linenumber % 2 AND lineitem.suppkey % 10 < orders.custkey % 7 AND lineitem.suppkey % 7 > orders.custkey % 7"); }
Source:
<code>private Collection<Ref> getAllRefs() throws IOException { Collection<Ref> refs = refdb.getRefs(RefDatabase.ALL).values(); List<Ref> addl = refdb.getAdditionalRefs(); if (!addl.isEmpty()) { List<Ref> all = new ArrayList<>(refs.size() + addl.size()); all.addAll(refs); for (Ref r : addl) { <START> if (r.getName().startsWith(Constants.R_REFS)) <END> all.add(r); } return all; } return refs; }</code><technical_language>missing braces</technical_language>

Target:
private Collection<Ref> getAllRefs() throws IOException { Collection<Ref> refs = refdb.getRefs(RefDatabase.ALL).values(); List<Ref> addl = refdb.getAdditionalRefs(); if (!addl.isEmpty()) { List<Ref> all = new ArrayList<>(refs.size() + addl.size()); all.addAll(refs); for (Ref r : addl) { if (r.getName().startsWith(Constants.R_REFS)) { all.add(r); } } return all; } return refs; }
Source:
<code>protected void init() { if (!initalized) { initalized = true; validateLibraries = project.getModules().isEmpty(); FilePredicates predicates = fs.predicates(); <START> hasJavaSources = fs.hasFiles(predicates.and(predicates.hasLanguage("java"), predicates.hasType(InputFile.Type.MAIN))); <END> binaries = getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_BINARIES); List<File> libraries = getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_LIBRARIES); boolean useDeprecatedProperties = binaries.isEmpty() && libraries.isEmpty(); if (useDeprecatedProperties) { binaries = getFilesFromProperty("sonar.binaries"); libraries = getFilesFromProperty("sonar.libraries"); } if (pom != null && libraries.isEmpty()) { elements = getLibrariesFromMaven(pom); } else { elements = Lists.newArrayList(binaries); elements.addAll(libraries); if (useDeprecatedProperties && !elements.isEmpty()) { LOG.warn("sonar.binaries and sonar.libraries are deprecated since version 2.5 of sonar-java-plugin, please use sonar.java.binaries and sonar.java.libraries instead"); } } } }</code><technical_language>hasJavaSources is set in JavaClasspath JavaTestClasspath, difference InputFile type (MAIN TEST). A method type parameter put in AbstractJavaClasspath class</technical_language>

Target:
protected void init() { if (!initialized) { initialized = true; validateLibraries = project.getModules().isEmpty(); binaries = getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_BINARIES); List<File> libraries = getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_LIBRARIES); boolean useDeprecatedProperties = binaries.isEmpty() && libraries.isEmpty(); if (useDeprecatedProperties) { binaries = getFilesFromProperty("sonar.binaries"); libraries = getFilesFromProperty("sonar.libraries"); } if (pom != null && libraries.isEmpty()) { elements = getLibrariesFromMaven(pom); } else { elements = Lists.newArrayList(binaries); elements.addAll(libraries); if (useDeprecatedProperties && !elements.isEmpty()) { LOG.warn("sonar.binaries and sonar.libraries are deprecated since version 2.5 of sonar-java-plugin, please use sonar.java.binaries and sonar.java.libraries instead"); } } } }
Source:
<code>public Appenderator createRealtimeAppenderatorForTask( String taskId, DataSchema schema, AppenderatorConfig config, FireDepartmentMetrics metrics, DataSegmentPusher dataSegmentPusher, ObjectMapper objectMapper, IndexIO indexIO, IndexMerger indexMerger, QueryRunnerFactoryConglomerate conglomerate, DataSegmentAnnouncer segmentAnnouncer, ServiceEmitter emitter, ExecutorService queryExecutorService, JoinableFactory joinableFactory, Cache cache, CacheConfig cacheConfig, CachePopulatorStats cachePopulatorStats ) { realtimeAppenderator = Appenderators.createRealtime( taskId, schema, config, metrics, dataSegmentPusher, objectMapper, indexIO, indexMerger, conglomerate, segmentAnnouncer, emitter, queryExecutorService, <START> NoopJoinableFactory.INSTANCE, <END> cache, cacheConfig, cachePopulatorStats ); return realtimeAppenderator; }</code><technical_language>I want joinableFactory here</technical_language>

Target:
public Appenderator createRealtimeAppenderatorForTask( String taskId, DataSchema schema, AppenderatorConfig config, FireDepartmentMetrics metrics, DataSegmentPusher dataSegmentPusher, ObjectMapper objectMapper, IndexIO indexIO, IndexMerger indexMerger, QueryRunnerFactoryConglomerate conglomerate, DataSegmentAnnouncer segmentAnnouncer, ServiceEmitter emitter, ExecutorService queryExecutorService, JoinableFactory joinableFactory, Cache cache, CacheConfig cacheConfig, CachePopulatorStats cachePopulatorStats ) { realtimeAppenderator = Appenderators.createRealtime( taskId, schema, config, metrics, dataSegmentPusher, objectMapper, indexIO, indexMerger, conglomerate, segmentAnnouncer, emitter, queryExecutorService, joinableFactory, cache, cacheConfig, cachePopulatorStats ); return realtimeAppenderator; }
Source:
<code>public void deleteOneMemberFromMultipleMembersOfDescription() { final Description description = createDescription(Concepts.FULLY_SPECIFIED_NAME, "Example FSN"); final String referringRefSetId = generateConceptId(); final SnomedRefSetMember member1 = createSimpleMember(description.getId(), referringRefSetId); final SnomedRefSetMember member2 = createSimpleMember(description.getId(), referringRefSetId); registerExistingObject(description); registerExistingObject(member1); registerExistingObject(member2); indexRevision(RevisionBranch.MAIN_PATH, CDOIDUtil.getLong(description.cdoID()), <START> SnomedDescriptionIndexEntry.builder(description).build()); <END> indexRevision(RevisionBranch.MAIN_PATH, CDOIDUtil.getLong(member1.cdoID()), SnomedRefSetMemberIndexEntry.builder(member1).build()); indexRevision(RevisionBranch.MAIN_PATH, CDOIDUtil.getLong(member2.cdoID()), SnomedRefSetMemberIndexEntry.builder(member2).build()); registerDetached(member1.cdoID(), SnomedRefSetPackage.Literals.SNOMED_REF_SET_MEMBER); final SnomedDescriptionIndexEntry expectedDoc = SnomedDescriptionIndexEntry .builder(description) .referringRefSets(Collections.singleton(referringRefSetId)) .build(); final Revision currentDoc = Iterables.getOnlyElement(processor.getChangedMappings().values()); assertDocEquals(expectedDoc, currentDoc); assertEquals(0, processor.getNewMappings().size()); assertEquals(0, processor.getDeletions().size()); }</code><technical_language>Strange need add referringRefSetId here..</technical_language>

Target:
public void deleteOneMemberFromMultipleMembersOfDescription() { final Description description = createDescription(Concepts.FULLY_SPECIFIED_NAME, "Example FSN"); final String referringRefSetId = generateConceptId(); final SnomedRefSetMember member1 = createSimpleMember(description.getId(), referringRefSetId); final SnomedRefSetMember member2 = createSimpleMember(description.getId(), referringRefSetId); registerExistingObject(description); registerExistingObject(member1); registerExistingObject(member2); indexRevision(MAIN, CDOIDUtil.getLong(description.cdoID()), SnomedDescriptionIndexEntry.builder(description) .referringRefSets(ImmutableList.of(referringRefSetId, referringRefSetId)) .build()); indexRevision(MAIN, CDOIDUtil.getLong(member1.cdoID()), SnomedRefSetMemberIndexEntry.builder(member1).build()); indexRevision(MAIN, CDOIDUtil.getLong(member2.cdoID()), SnomedRefSetMemberIndexEntry.builder(member2).build()); registerDetached(member1.cdoID(), member1.eClass()); process(processor); final SnomedDescriptionIndexEntry expectedDoc = SnomedDescriptionIndexEntry .builder(description) .referringRefSets(Collections.singleton(referringRefSetId)) .build(); final Revision currentDoc = Iterables.getOnlyElement(processor.getChangedMappings().values()); assertDocEquals(expectedDoc, currentDoc); assertEquals(0, processor.getNewMappings().size()); assertEquals(0, processor.getDeletions().size()); }
Source:
<code>public void createRelativeDateEvents() { TodorooCursor<ABTestEvent> allEvents = query(Query.select(ABTestEvent.TEST_NAME, ABTestEvent.DATE_RECORDED) .where(ABTestEvent.TIME_INTERVAL.eq(ABTestEvent.TIME_INTERVAL_0))); try { long now = DateUtilities.now(); for (allEvents.moveToFirst(); !allEvents.isAfterLast(); allEvents.moveToNext()) { ABTestEvent event = new ABTestEvent(allEvents); long baseTime = event.getValue(ABTestEvent.DATE_RECORDED); long timeSinceBase = now - baseTime; String testName = event.getValue(ABTestEvent.TEST_NAME); int timeInterval = -1; if (timeSinceBase > 3 * DateUtilities.ONE_WEEK) timeInterval = ABTestEvent.TIME_INTERVAL_21; else if (timeSinceBase > 2 * DateUtilities.ONE_WEEK) timeInterval = ABTestEvent.TIME_INTERVAL_14; else if (timeSinceBase > DateUtilities.ONE_WEEK) timeInterval = ABTestEvent.TIME_INTERVAL_7; else if (timeSinceBase > 3 * DateUtilities.ONE_DAY) <START> timeInterval = ABTestEvent.TIME_INTERVAL_3; <END> if (timeInterval > 0) createTestEventWithTimeInterval(testName, timeInterval); } } finally { allEvents.close(); } }</code><technical_language>int days = timeSinceBase / DateUtilities.ONE_DAY; for(int i = 0; i < ABTestEvent.TIME_INTERVALS.length; i++) if(days >= ABTestEvent.TIME_INTERVALS[i]) timeInterval = ABTestEvent.TIME_INTERVALS[i];</technical_language>

Target:
public void createRelativeDateEvents() { TodorooCursor<ABTestEvent> allEvents = query(Query.select(ABTestEvent.TEST_NAME, ABTestEvent.DATE_RECORDED) .where(ABTestEvent.TIME_INTERVAL.eq(0))); try { long now = DateUtilities.now(); ABTestEvent event = new ABTestEvent(); for (allEvents.moveToFirst(); !allEvents.isAfterLast(); allEvents.moveToNext()) { event.readFromCursor(allEvents); long baseTime = event.getValue(ABTestEvent.DATE_RECORDED); long timeSinceBase = now - baseTime; String testName = event.getValue(ABTestEvent.TEST_NAME); int timeInterval = -1; long days = timeSinceBase / DateUtilities.ONE_DAY; for(int i = 0; i < ABTestEvent.TIME_INTERVALS.length; i++) if(days >= ABTestEvent.TIME_INTERVALS[i]) timeInterval = ABTestEvent.TIME_INTERVALS[i]; if (timeInterval > 0) createTestEventWithTimeInterval(testName, timeInterval); } } finally { allEvents.close(); } }
Source:
<code>private static String skipFirstProperty(String text) { <START> String newText = text.substring(text.indexOf(POM_PROPERTY_PREFIX)); <END> return newText.substring(newText.indexOf(POM_PROPERTY_SUFFIX)); }</code><technical_language>need do substring, search for index of suffix starting index of prefix</technical_language>

Target:
private static String skipFirstProperty(String text) { return text.substring(text.indexOf(POM_PROPERTY_SUFFIX, text.indexOf(POM_PROPERTY_PREFIX))); }
Source:
<code>public boolean execute(CommandContext ctx) throws Exception { log.info("Update is done @ {}, my state {}", ctx.getSource(), lifecycleService.getCurrentState()); if(manager != null) { try { <START> manager.logEvent(ctx.getMessage().getProtocolParameters().get("BranchName"), ctx.getMessage().getProtocolParameters().get("CurrentRevision"), "SYNC".equals(ctx.getMessage().getProtocolParameters().get("comment")) ? "AUTO" : ctx.getMessage().getProtocolParameters().get("openId"), configProperties.getProperty("com.meltmedia.cadmium.lastUpdated"), ctx.getMessage().getProtocolParameters().get("uuid"), ctx.getMessage().getProtocolParameters().get("comment"), !new Boolean(ctx.getMessage().getProtocolParameters().get("nonRevertible")), false); <END> } catch(Exception e){ log.warn("Failed to update log", e); } } lifecycleService.sendStateUpdate(null, ctx.getMessage().getProtocolParameters().get("uuid")); return true; }</code><technical_language>This line is a long, I do is. string "ctx.getMessage().getProtocolParameters().get(" is repeated times, making a helper method CommandContext is in order. For now, please format this 160 characters</technical_language>

Target:
public boolean execute(CommandContext ctx) throws Exception { log.info("Update is done @ {}, my state {}", ctx.getSource(), lifecycleService.getCurrentState()); if(manager != null) { try { Map<String, String> props = ctx.getMessage().getProtocolParameters(); String branch = props.get("BranchName"); String rev = props.get("CurrentRevision"); String openId = props.get("openId"); String lastUpdated = configProperties.getProperty("com.meltmedia.cadmium.lastUpdated"); String uuid = props.get("uuid"); String comment = props.get("comment"); boolean revertible = !new Boolean(props.get("nonRevertible")); manager.logEvent(branch, rev, openId, lastUpdated, uuid, comment, revertible, false); } catch(Exception e){ log.warn("Failed to update log", e); } } lifecycleService.sendStateUpdate(null, ctx.getMessage().getProtocolParameters().get("uuid")); return true; }
Source:
<code>Publisher<CoreEvent> getDownstreamPublisher() { return downstreamFlux <START> .compose(downstreamPublisher -> Mono.subscriberContext() <END> .flatMapMany(downstreamContext -> downstreamPublisher.doOnSubscribe(s -> { innerFlux.subscriberContext(downstreamContext).subscribe(); upstreamFlux.subscriberContext(downstreamContext).subscribe(); }))); }</code><technical_language>static import</technical_language>

Target:
Publisher<CoreEvent> getDownstreamPublisher() { return downstreamFlux .compose(downstreamPublisher -> subscriberContext() .flatMapMany(downstreamContext -> downstreamPublisher.doOnSubscribe(s -> { innerFlux.subscriberContext(downstreamContext).subscribe(); upstreamFlux.subscriberContext(downstreamContext).subscribe(); }))); }
Source:
<code><START> public void convertDouble() { <END> }</code><technical_language>ignored? I guess do int/double</technical_language>

Target:
public void convertDouble() { assertThat(converting(ATTR_NAME_NUMBER, numberAsDoubleMapper)).isEqualTo("5.0"); }
Source:
<code>static Drivers getDriverFor(String scheme) { <START> for (Drivers driver : values()) { <END> for (String supportedScheme : driver.schemes) { if (supportedScheme.equalsIgnoreCase(scheme)) { return driver; } } } throw new RuntimeException("A URI Scheme must be one of http/https, bolt or file."); }</code><technical_language>I values() Drivers.values() nice</technical_language>

Target:
static Drivers getDriverFor(String scheme) { for (Drivers driver : Drivers.values()) { for (String supportedScheme : driver.schemes) { if (supportedScheme.equalsIgnoreCase(scheme)) { return driver; } } } throw new RuntimeException(UNSUPPORTED_SCHEME_MESSAGE); }
Source:
<code><START> public OpenALManager(AudioConfig config) throws Exception { <END> logger.info("Initializing OpenAL audio manager"); config.subscribe(configListener); AL.create(); AL10.alGetError(); logger.info("OpenAL initialized!", AL10.alGetString(AL10.AL_VERSION)); ALCcontext context = ALC10.alcGetCurrentContext(); ALCdevice device = ALC10.alcGetContextsDevice(context); logger.info("Using OpenAL: by {}", AL10.alGetString(AL10.AL_RENDERER), AL10.alGetString(AL10.AL_VENDOR)); logger.info("Using device: {}", ALC10.alcGetString(device, ALC10.ALC_DEVICE_SPECIFIER)); logger.info("Available AL extensions: {}", AL10.alGetString(AL10.AL_EXTENSIONS)); logger.info("Available ALC extensions: {}", ALC10.alcGetString(device, ALC10.ALC_EXTENSIONS)); IntBuffer buffer = BufferUtils.createIntBuffer(1); ALC10.alcGetInteger(device, ALC11.ALC_MONO_SOURCES, buffer); logger.info("Max mono sources: {}", buffer.get(0)); buffer.rewind(); ALC10.alcGetInteger(device, ALC11.ALC_STEREO_SOURCES, buffer); logger.info("Max stereo sources: {}", buffer.get(0)); buffer.rewind(); ALC10.alcGetInteger(device, ALC10.ALC_FREQUENCY, buffer); logger.info("Mixer frequency: {}", buffer.get(0)); buffer.rewind(); AL10.alDistanceModel(AL10.AL_INVERSE_DISTANCE_CLAMPED); pools.put("sfx", new OpenALSoundPool(30)); pools.put("music", new OpenALStreamingSoundPool(2)); pools.get("sfx").setVolume(config.getSoundVolume()); pools.get("music").setVolume(config.getMusicVolume()); }</code><technical_language>throw "Exception". Throw a more specific exception type</technical_language>

Target:
public OpenALManager(AudioConfig config) throws OpenALException, LWJGLException { logger.info("Initializing OpenAL audio manager"); config.subscribe(configListener); AL.create(); AL10.alGetError(); logger.info("OpenAL initialized!", AL10.alGetString(AL10.AL_VERSION)); ALCcontext context = ALC10.alcGetCurrentContext(); ALCdevice device = ALC10.alcGetContextsDevice(context); logger.info("Using OpenAL: by {}", AL10.alGetString(AL10.AL_RENDERER), AL10.alGetString(AL10.AL_VENDOR)); logger.info("Using device: {}", ALC10.alcGetString(device, ALC10.ALC_DEVICE_SPECIFIER)); logger.info("Available AL extensions: {}", AL10.alGetString(AL10.AL_EXTENSIONS)); logger.info("Available ALC extensions: {}", ALC10.alcGetString(device, ALC10.ALC_EXTENSIONS)); IntBuffer buffer = BufferUtils.createIntBuffer(1); ALC10.alcGetInteger(device, ALC11.ALC_MONO_SOURCES, buffer); logger.info("Max mono sources: {}", buffer.get(0)); buffer.rewind(); ALC10.alcGetInteger(device, ALC11.ALC_STEREO_SOURCES, buffer); logger.info("Max stereo sources: {}", buffer.get(0)); buffer.rewind(); ALC10.alcGetInteger(device, ALC10.ALC_FREQUENCY, buffer); logger.info("Mixer frequency: {}", buffer.get(0)); buffer.rewind(); AL10.alDistanceModel(AL10.AL_INVERSE_DISTANCE_CLAMPED); pools.put("sfx", new OpenALSoundPool(30)); pools.put("music", new OpenALStreamingSoundPool(2)); pools.get("sfx").setVolume(config.getSoundVolume()); pools.get("music").setVolume(config.getMusicVolume()); }
Source:
<code>private void addBuiltInTypes() { final OptGroup group = GWT.create(OptGroup.class); group.setLabel(translationService.format(DMNEditorConstants.DataTypeSelectView_DefaultTitle)); Stream.of(BuiltInType.values()) .sorted(BUILT_IN_TYPE_COMPARATOR) .map(this::makeTypeSelector) .filter(Optional::isPresent) .forEach(o -> group.add(o.get())); <START> typeSelector.add(group); <END> }</code><technical_language>I this change is _really_ covered tests</technical_language>

Target:
void addBuiltInTypes() { final OptGroup group = GWT.create(OptGroup.class); group.setLabel(translationService.getTranslation(DMNEditorConstants.DataTypeSelectView_DefaultTitle)); Stream.of(BuiltInType.values()) .sorted(BUILT_IN_TYPE_COMPARATOR) .map(this::makeTypeSelector) .filter(Optional::isPresent) .forEach(o -> group.add(o.get())); typeSelector.add(group); }
Source:
<code>public ChangeApi id(String id) throws RestApiException { return new ChangeApiRestClient(gerritRestClient, this, changesParser, commentsParser, <START> fileInfoParser, diffInfoParser, suggestedReviewerInfoParser, null, id); <END> }</code><technical_language>I pass AccountsParser - is null result in NullPointerException in ChangeApiRestClient?</technical_language>

Target:
public ChangeApi id(String id) throws RestApiException { return new ChangeApiRestClient(gerritRestClient, this, changesParser, commentsParser, fileInfoParser, diffInfoParser, suggestedReviewerInfoParser, id); }
Source:
<code>public void testGetParameter() { Url url = new Url("<LINK_0>"); assertEquals("value1", url.get("key1")); assertEquals("value2", url.get("key2")); assertEquals("value3", url.get("key3")); <START> assertEquals(null, url.get("key4")); <END> }</code><technical_language>This method contains a regex right? If yes, test cases try poke holes in regex. e.g. search for key1 url contains key2key1=value1</technical_language>

Target:
public void testGetParameter() { Url url = new Url("<LINK_1>"); assertEquals("value1", url.get("key1")); assertEquals("value2", url.get("key2")); assertEquals(null, url.get("y1")); assertEquals(null, url.get("key4")); }