auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> protected <T> Response performCreate(VdcActionType task, <END> VdcActionParametersBase taskParams, IResolver<T, Q> entityResolver, boolean block) { return performCreate(task, taskParams, entityResolver, block, null); }</code><technical_language>final well</technical_language>

Target:
protected final <T> Response performCreate(VdcActionType task, VdcActionParametersBase taskParams, IResolver<T, Q> entityResolver, boolean block) { return performCreate(task, taskParams, entityResolver, block, null); }
Source:
<code>public ResponseEntity removeRepositoryPath(@ApiParam(value = "The path object", required = true) @RequestBody @Validated({ Default.class, ProxyConfigurationFormChecks.class}) <START> PathForm pathForm, <END> BindingResult bindingResult, @RequestHeader(HttpHeaders.ACCEPT) String accept) { if(bindingResult.hasErrors()) { return getFailedResponseEntity(HttpStatus.NOT_FOUND, FAILED_REPOSITORY_PATH_REMOVAL_FORM_ERROR, accept); } try { final RepositoryPath repositoryPath = repositoryPathResolver.resolve(pathForm.getStorageId(), pathForm.getRepositoryId(), pathForm.getPath()); artifactManagementService.delete(repositoryPath, pathForm.isForce()); logger.info("Deleting Path {}:{}/{}...", pathForm.getStorageId(), pathForm.getRepositoryId(), pathForm.getPath()); return getSuccessfulResponseEntity(SUCCESSFUL_REPOSITORY_PATH_REMOVAL, accept); } catch (NullPointerException | RepositoryRelativePathConstructionException e) { return getFailedResponseEntity(HttpStatus.NOT_FOUND, FAILED_REPOSITORY_PATH_REMOVAL_FORM_ERROR, accept); } catch (IOException e) { return getExceptionResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR, FAILED_REPOSITORY_PATH_REMOVAL, e, accept); } }</code><technical_language>Cosmetic: please align this param annotation above</technical_language>

Target:
public ResponseEntity removeRepositoryPath(@ApiParam(value = "The path object", required = true) @RequestBody @Validated({ Default.class, ProxyConfigurationFormChecks.class}) PathForm pathForm, BindingResult bindingResult, @RequestHeader(HttpHeaders.ACCEPT) String accept) { if(bindingResult.hasErrors()) { return getFailedResponseEntity(HttpStatus.NOT_FOUND, FAILED_REPOSITORY_PATH_REMOVAL_FORM_ERROR, accept); } try { final RepositoryPath repositoryPath = repositoryPathResolver.resolve(pathForm.getStorageId(), pathForm.getRepositoryId(), pathForm.getPath()); if (!Files.exists(repositoryPath)) { return getFailedResponseEntity(HttpStatus.NOT_FOUND, FAILED_REPOSITORY_PATH_REMOVAL_PATH_NOT_FOUND, accept); } artifactManagementService.delete(repositoryPath, pathForm.isForce()); logger.info("Deleting Path {}:{}/{}...", pathForm.getStorageId(), pathForm.getRepositoryId(), pathForm.getPath()); return getSuccessfulResponseEntity(SUCCESSFUL_REPOSITORY_PATH_REMOVAL, accept); } catch (NullPointerException | RepositoryRelativePathConstructionException e) { return getFailedResponseEntity(HttpStatus.NOT_FOUND, FAILED_REPOSITORY_PATH_REMOVAL_FORM_ERROR, accept); } catch (IOException e) { return getExceptionResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR, FAILED_REPOSITORY_PATH_REMOVAL, e, accept); } }
Source:
<code>public void unicast(Address address, String subject, byte[] payload) { final InetAddress resolvedAddress = address.address(); if (resolvedAddress == null) { <START> LOGGER.debug("Cannot send unicast message to destination address as it cannot be resolved", address); <END> return; } Message message = new Message(this.address, subject, payload); byte[] bytes = SERIALIZER.encode(message); ByteBuf buf = channel.alloc().buffer(4 + bytes.length); buf.writeInt(bytes.length).writeBytes(bytes); channel.writeAndFlush(new DatagramPacket(buf, new InetSocketAddress(resolvedAddress, address.port()))); }</code><technical_language>this fix a memory leak if writeAndFlush consume bytebuf, nice</technical_language>

Target:
public void unicast(Address address, String subject, byte[] payload) { final InetAddress resolvedAddress = address.address(); if (resolvedAddress == null) { LOGGER.debug("Failed sending unicast message (destination address cannot be resolved)", address); return; } Message message = new Message(this.address, subject, payload); byte[] bytes = SERIALIZER.encode(message); ByteBuf buf = channel.alloc().buffer(4 + bytes.length); buf.writeInt(bytes.length).writeBytes(bytes); channel.writeAndFlush(new DatagramPacket(buf, new InetSocketAddress(resolvedAddress, address.port()))); }
Source:
<code>public void shouldPersistATransaction() throws Exception { GatewayAccountEntity gatewayAccount = new GatewayAccountEntity( defaultTestAccount.getPaymentProvider(), new HashMap<>(), TEST); gatewayAccount.setId(defaultTestAccount.getAccountId()); PaymentRequestEntity paymentRequestEntity = aValidPaymentRequestEntity() .withGatewayAccountEntity(gatewayAccount) .build(); paymentRequestDao.persist(paymentRequestEntity); <START> assertThat(paymentRequestEntity.getChargeTransaction().getId(), is(IsNull.notNullValue())); <END> }</code><technical_language>static import notNullValue() for a readability win</technical_language>

Target:
public void shouldPersistATransaction() throws Exception { GatewayAccountEntity gatewayAccount = new GatewayAccountEntity( defaultTestAccount.getPaymentProvider(), new HashMap<>(), TEST); gatewayAccount.setId(defaultTestAccount.getAccountId()); PaymentRequestEntity paymentRequestEntity = aValidPaymentRequestEntity() .withGatewayAccountEntity(gatewayAccount) .build(); paymentRequestDao.persist(paymentRequestEntity); assertThat(paymentRequestEntity.getChargeTransaction().getId(), is(notNullValue())); }
Source:
<code>public URL create(final Map<String, String> variables) { Assert.requireNonNull(variables, "variables"); final String url = variables.keySet() .stream() .reduce(urlRepresentation, (base, key) -> { final String value = variables.get(key); return replace(base, key, value); }); try { return new URL(url); <START> } catch (MalformedURLException e) { <END> throw new DolphinRuntimeException("Can not create url for '" + url + "'"); } }</code><technical_language>Add final keyword</technical_language>

Target:
public URL create(final Map<String, String> variables) { Assert.requireNonNull(variables, "variables"); final String url = variables.keySet() .stream() .reduce(urlRepresentation, (base, key) -> replace(base, key, variables.get(key))); try { return new URL(url); } catch (final MalformedURLException e) { throw new DolphinRuntimeException("Can not create url for '" + url + "'"); } }
Source:
<code>public ColorColumn getColumnById(String id) { <START> System.err.println(id); <END> for (ColorColumn column : colorColumns) { if (column.getColumnId().equals(id)) { return column; } } return null; }</code><technical_language>this logged instead? removed if needed</technical_language>

Target:
public ColorColumn getColumnById(String id) { for (ColorColumn column : colorColumns) { if (column.getColumnId().equals(id)) { return column; } } return null; }
Source:
<code>public void run() { final NetworkRequest networkReq = new NetworkRequest.Builder() .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) .addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED) .addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN) .build(); final ConnectivityManager cm = ConnectivityManager.from(mContext); <START> cm.requestNetwork(networkReq, <END> mNetworkCallback); }</code><technical_language>sgtm</technical_language>

Target:
public void run() { final NetworkRequest networkReq = new NetworkRequest.Builder() .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) .addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED) .addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN) .addCapability(NetworkCapabilities.NET_CAPABILITY_TRUSTED) .build(); final ConnectivityManager cm = ConnectivityManager.from(mContext); cm.requestNetwork(networkReq, mNetworkCallback); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NamesInSection other = (NamesInSection) obj; <START> if (section == null) { <END> if (other.section != null) return false; } else if (!section.equals(other.section)) return false; if (subsection == null) { if (other.subsection != null) return false; } else if (!subsection.equals(other.subsection)) return false; return true; }</code><technical_language>in hashCode, I OK assume section != null</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NamesInSection other = (NamesInSection) obj; if (!section.equals(other.section)) return false; if (subsection == null) { if (other.subsection != null) return false; } else if (!subsection.equals(other.subsection)) return false; return true; }
Source:
<code>public static String toOpenSshPublicKey(final String keyStr) { try { final StringBuilder strBuf = new StringBuilder(); final BufferedReader br = new BufferedReader(new StringReader(keyStr)); String line = br.readLine(); <START> if (line != null && !line.equals("---- BEGIN SSH2 PUBLIC KEY ----")) { <END> return keyStr; } while ((line = br.readLine()) != null) { if (line.indexOf(':') == -1) { strBuf.append(line); break; } } while ((line = br.readLine()) != null) { if (line.startsWith("---- ")) { break; } strBuf.append(line); } final PublicKey key = new Buffer(Base64.decodeBase64(Constants.encodeASCII(strBuf .toString()))).getRawPublicKey(); if (key instanceof RSAPublicKey) { strBuf.insert(0, KeyPairProvider.SSH_RSA + " "); } else if (key instanceof DSAPublicKey) { strBuf.insert(0, KeyPairProvider.SSH_DSS + " "); } else { return keyStr; } strBuf.append(' '); strBuf.append("converted-key"); return strBuf.toString(); } catch (IOException e) { return keyStr; } catch (RuntimeException re) { return keyStr; } }</code><technical_language>if (line == null || !line.equals("---- SSH2 PUBLIC KEY ----")) { ? if line is null sense proceed</technical_language>

Target:
public static String toOpenSshPublicKey(final String keyStr) { try { final StringBuilder strBuf = new StringBuilder(); final BufferedReader br = new BufferedReader(new StringReader(keyStr)); String line = br.readLine(); if (line == null || !line.equals("---- BEGIN SSH2 PUBLIC KEY ----")) { return keyStr; } while ((line = br.readLine()) != null) { if (line.indexOf(':') == -1) { strBuf.append(line); break; } } while ((line = br.readLine()) != null) { if (line.startsWith("---- ")) { break; } strBuf.append(line); } final PublicKey key = new Buffer(Base64.decodeBase64(Constants.encodeASCII(strBuf .toString()))).getRawPublicKey(); if (key instanceof RSAPublicKey) { strBuf.insert(0, KeyPairProvider.SSH_RSA + " "); } else if (key instanceof DSAPublicKey) { strBuf.insert(0, KeyPairProvider.SSH_DSS + " "); } else { return keyStr; } strBuf.append(' '); strBuf.append("converted-key"); return strBuf.toString(); } catch (IOException e) { return keyStr; } catch (RuntimeException re) { return keyStr; } }
Source:
<code>private static boolean hasValidMigrationTag(RuleContext ruleContext) { return ruleContext .attributes() .get("tags", Type.STRING_LIST) <START> .contains("__PROTO_RULES_MIGRATION_DO_NOT_USE_WILL_BREAK__"); <END> }</code><technical_language>nit: extract string a private static final constant</technical_language>

Target:
private static boolean hasValidMigrationTag(RuleContext ruleContext) { return ruleContext .attributes().get("tags", Type.STRING_LIST).contains(PROTO_RULES_MIGRATION_LABEL); }
Source:
<code>public static void printHelp(PrintStream stream) { stream.println(); stream.println("Voldemort Coordinator Admin Tool"); stream.println("--------------------------------"); stream.println("get Get store client config for stores."); <START> stream.println("put Put store client config for stroes from input string or given avro file"); <END> stream.println("delete Delete store client config for stores"); stream.println(); stream.println("To get more information on each command, please try \'help <command-name>\'."); stream.println(); }</code><technical_language>Type : stroes instead of stores</technical_language>

Target:
public static void printHelp(PrintStream stream) { stream.println(); stream.println("Voldemort Coordinator Admin Tool"); stream.println("--------------------------------"); stream.println("get Get store client config for stores."); stream.println("put Put store client config for stores from input string or given avro file"); stream.println("delete Delete store client config for stores"); stream.println(); stream.println("To get more information on each command, please try \'help <command-name>\'."); stream.println(); }
Source:
<code><START> public void attachTransport(NettyServerTransport transport) { <END> log.debug("Attaching %s observer to %s", getClass().getSimpleName(), transport == null ? "null" : transport.getClass().getSimpleName()); this.transportRef.set(transport); watcher.start(ImmutableSet.of(ticketSeedFile, keyFile, certFile), this::onFilesUpdated); }</code><technical_language>attach/detach used/tested anywhere? do this if transport is null? requireNonNull get rid of null handling code</technical_language>

Target:
public void attachTransport(NettyServerTransport transport) { log.debug("Attaching %s observer to %s", getClass().getSimpleName(), requireNonNull(transport).getClass().getSimpleName()); this.transportRef.set(transport); watcher.start(ImmutableSet.of(ticketSeedFile, keyFile, certFile), this::onFilesUpdated); }
Source:
<code>protected Iterable<ITmfTrace> getTracesToBuild(ITmfTrace trace) { Element viewElement = fViewInfo.getViewElement(TmfXmlUiStrings.TIME_GRAPH_VIEW); if (viewElement == null) { return super.getTracesToBuild(trace); } Set<String> analysisIds = fViewInfo.getViewAnalysisIds(viewElement); Set<ITmfTrace> traces = new HashSet<>(); for (ITmfTrace aTrace : TmfTraceManager.getTraceSetWithExperiment(trace)) { if (analysisIds.isEmpty()) { <START> if (aTrace.getAnalysisModulesOfClass(ITmfAnalysisModuleWithStateSystems.class).iterator().hasNext()) { <END> traces.add(aTrace); } } else { for (String moduleId : analysisIds) { if (aTrace.getAnalysisModuleOfClass(ITmfAnalysisModuleWithStateSystems.class, moduleId) != null) { traces.add(aTrace); } } } } if (traces.isEmpty()) { return super.getTracesToBuild(trace); } return traces; }</code><technical_language>merge if's a &&</technical_language>

Target:
protected Iterable<ITmfTrace> getTracesToBuild(ITmfTrace trace) { Element viewElement = fViewInfo.getViewElement(TmfXmlUiStrings.TIME_GRAPH_VIEW); if (viewElement == null) { return super.getTracesToBuild(trace); } Set<String> analysisIds = fViewInfo.getViewAnalysisIds(viewElement); Set<ITmfTrace> traces = new HashSet<>(); for (ITmfTrace aTrace : TmfTraceManager.getTraceSetWithExperiment(trace)) { if ((analysisIds.isEmpty() && aTrace.getAnalysisModulesOfClass(ITmfAnalysisModuleWithStateSystems.class).iterator().hasNext())) { traces.add(aTrace); } else { for (String moduleId : analysisIds) { if (aTrace.getAnalysisModuleOfClass(ITmfAnalysisModuleWithStateSystems.class, moduleId) != null) { traces.add(aTrace); } } } } if (traces.isEmpty()) { return super.getTracesToBuild(trace); } return traces; }
Source:
<code>private static BiFunction<HttpClientResponse, Connection, Publisher<HttpResponse>> responseDelegate( final HttpRequest restRequest, final boolean disableBufferCopy) { return (reactorNettyResponse, reactorNettyConnection) -> Mono.defer(() -> Mono.using(() -> new ReactorNettyHttpResponse(reactorNettyResponse, reactorNettyConnection, restRequest, disableBufferCopy), <START> Mono::just, HttpResponse::close)); <END> }</code><technical_language>discussed this result in early disposal of response response-body is fully consumed</technical_language>

Target:
private static BiFunction<HttpClientResponse, Connection, Publisher<HttpResponse>> responseDelegate( final HttpRequest restRequest, final boolean disableBufferCopy) { return (reactorNettyResponse, reactorNettyConnection) -> { HttpResponse response = new ReactorNettyHttpResponse(reactorNettyResponse, reactorNettyConnection, restRequest, disableBufferCopy); NettyResponseCloser.trackResponse(response); return Mono.just(response); }; }
Source:
<code>public static EmbeddedBroker create() throws Exception { final Injector injector = GuiceInjectors.makeStartupInjector(); CliBroker broker = new CliBroker(); injector.injectMembers(broker); <START> Injector brokerInjector = broker.makeInjector(); <END> broker.initLifecycle(brokerInjector); return brokerInjector.getInstance(EmbeddedBroker.class); }</code><technical_language>Do need modules CliBroker? this class is for running canceling queries calling runQuery cancelQuery. In case, I Jetty-related stuff (e.g. QueryJettyServerInitializer, QueryResource) removed</technical_language>

Target:
public static EmbeddedResource create() throws Exception { final Injector injector = GuiceInjectors.makeStartupInjector(); EmbeddedBroker broker = new EmbeddedBroker(); injector.injectMembers(broker); Injector brokerInjector = broker.makeInjector(); broker.initLifecycle(brokerInjector); return brokerInjector.getInstance(EmbeddedResource.class); }
Source:
<code>public void testCalculateSubscriptions() throws Exception { CloudSigma2Api api = requestSendsResponse( postBuilder() .endpoint(endpoint + "subscriptioncalculator/") .payload(payloadFromResourceWithContentType("/subscriptioncalculator-request.json" , MediaType.APPLICATION_JSON)) .build() , responseBuilder() .payload(payloadFromResourceWithContentType("/subscriptioncalculator.json", MediaType.APPLICATION_JSON)) .build() ); SubscriptionCalculator subscriptionCalculator = api.calculateSubscriptions(ImmutableList.of( new CalcSubscription.Builder() .resource(SubscriptionResource.IP) .endTime(new SimpleDateFormatDateService().iso8601SecondsDateParse("2013-12-27T12:00:00+00:00")) .build() , new CalcSubscription.Builder() .resource(SubscriptionResource.VLAN) .endTime(new SimpleDateFormatDateService().iso8601SecondsDateParse("2013-12-27T12:00:00+00:00")) .build() , new CalcSubscription.Builder() .resource(SubscriptionResource.VLAN) .endTime(new SimpleDateFormatDateService().iso8601SecondsDateParse("2013-12-27T12:00:00+00:00")) .build() )); assertNotNull(subscriptionCalculator); for (CalcSubscription subscription : subscriptionCalculator.getSubscriptions()) { <START> assertNotNull(subscription); <END> } }</code><technical_language>Assert that, least, price field expected value? deserialization works expected (and give a bit more meaning test)</technical_language>

Target:
public void testCalculateSubscriptions() throws Exception { List<CalcSubscription> subscriptionsToCalculate = ImmutableList.of( new CalcSubscription.Builder() .amount(1) .resource(SubscriptionResource.IP) .endTime(new Date(1388145600000l)) .price(5.5) .startTime(new Date(1385547361440l)) .build(), new CalcSubscription.Builder() .amount(1) .resource(SubscriptionResource.VLAN) .endTime(new Date(1388145600000l)) .price(11) .startTime(new Date(1385547361440l)) .build(), new CalcSubscription.Builder() .amount(250) .resource(SubscriptionResource.CPU) .endTime(new Date(1388145600000l)) .price(3.366) .startTime(new Date(1385547361440l)) .build()); CloudSigma2Api api = requestSendsResponse( postBuilder() .endpoint(endpoint + "subscriptioncalculator/") .payload(payloadFromResourceWithContentType("/subscriptioncalculator-request.json", MediaType.APPLICATION_JSON)) .build(), responseBuilder() .payload(payloadFromResourceWithContentType("/subscriptioncalculator.json", MediaType.APPLICATION_JSON)) .build()); SubscriptionCalculator subscriptionCalculator = api.calculateSubscriptions(subscriptionsToCalculate); assertNotNull(subscriptionCalculator); for (int i = 0; i < subscriptionsToCalculate.size(); i++) { checkCalcSubscription(subscriptionCalculator.getSubscriptions().get(i), subscriptionsToCalculate.get(i)); } }
Source:
<code>protected boolean canDoAction() { StorageServerConnectionExtension newConnExt = getParameters().getStorageServerConnectionExtension(); <START> return validate(getConnectionExtensionValidator().isConnectionDoesNotExistForHostAndTarget(newConnExt.getHostId(), <END> newConnExt.getIqn())); }</code><technical_language>do this in previous patch</technical_language>

Target:
protected boolean canDoAction() { StorageServerConnectionExtension newConnExt = getParameters().getStorageServerConnectionExtension(); return validate(getConnectionExtensionValidator().isConnectionDoesNotExistForHostAndTarget(newConnExt)); }
Source:
<code>public static URL get(final String name) { File temp; try { <START> if(!map.containsKey(name)) { <END> temp = File.createTempFile("java-resource", ".tmp"); Path path = Paths.get(temp.getAbsolutePath()); Files.copy(Resources.class.getResourceAsStream(name), path, StandardCopyOption.REPLACE_EXISTING); URL url = temp.toURI().toURL(); map.put(name, url); return url; } else { return map.get(name); } } catch (IOException e) { throw Throwables.propagate(e); } }</code><technical_language>construct java URL url = map.get(name); if(url == null){ //... }</technical_language>

Target:
public static URL get(final String name) { File temp; try { URL url = map.get(name); if(url == null) { temp = File.createTempFile("java-resource", ".tmp"); Path path = Paths.get(temp.getAbsolutePath()); Files.copy(Resources.class.getResourceAsStream(name), path, StandardCopyOption.REPLACE_EXISTING); url = temp.toURI().toURL(); map.put(name, url); return url; } else { return url; } } catch (IOException e) { throw Throwables.propagate(e); } }
Source:
<code>public LiftOver(File chainFile){ <START> this(toInputStream(chainFile), chainFile.toString()); <END> }</code><technical_language>java constructor constraints forced some slightly awkward behavior here. I restructure this in order avoid some awkwardness. /** * Load UCSC chain file in order lift Intervals. */ public LiftOver(File chainFile){ this(Chain.loadChains(chainFile)); } /** * Load UCSC chain file in order lift Intervals. */ public LiftOver(InputStream chainFileInputStream, String sourceName) { this(Chain.loadChains(new BufferedLineReader(chainFileInputStream), sourceName)); } private LiftOver(OverlapDetector<Chain> chains) { this.chains = chains; for (final Chain chain : this.chains.getAll()) { final String = chain.fromSequenceName; final String = chain.toSequenceName; final Set<String> names; if (contigMap.containsKey(from)) { names = contigMap.get(from); } else { names = new HashSet<>(); contigMap.put(from, names); } names.add(to); } } question responsibility is close streams. (sorry harp this issue, a bunch in mind...)</technical_language>

Target:
public LiftOver(File chainFile){ this(Chain.loadChains(chainFile)); }
Source:
<code>public PaxosTimestampBoundStore( PaxosProposer proposer, PaxosLearner knowledge, PaxosAcceptorNetworkClient acceptorNetworkClient, PaxosLearnerNetworkClient learnerClient, long maximumWaitBeforeProposalMs) { this.acceptorNetworkClient = acceptorNetworkClient; this.learnerClient = learnerClient; DebugLogger.logger.info("Creating PaxosTimestampBoundStore. The UUID of my proposer is {}. " + "Currently, I believe the timestamp bound is {}.", SafeArg.of("proposerUuid", proposer.getUuid()), SafeArg.of("timestampBound", knowledge.getGreatestLearnedValue())); this.proposer = proposer; this.knowledge = knowledge; <START> this.maximumWaitBeforeProposalMs = maximumWaitBeforeProposalMs; <END> }</code><technical_language>nit: please order assignments consistently parameters</technical_language>

Target:
public PaxosTimestampBoundStore( PaxosProposer proposer, PaxosLearner knowledge, PaxosAcceptorNetworkClient acceptorNetworkClient, PaxosLearnerNetworkClient learnerClient, long maximumWaitBeforeProposalMs) { DebugLogger.logger.info("Creating PaxosTimestampBoundStore. The UUID of my proposer is {}. " + "Currently, I believe the timestamp bound is {}.", SafeArg.of("proposerUuid", proposer.getUuid()), SafeArg.of("timestampBound", knowledge.getGreatestLearnedValue())); this.proposer = proposer; this.knowledge = knowledge; this.acceptorNetworkClient = acceptorNetworkClient; this.learnerClient = learnerClient; this.maximumWaitBeforeProposalMs = maximumWaitBeforeProposalMs; }
Source:
<code>public int compare(Viewer viewer, Object e1, Object e2) { if (WorkbenchSWTMessages.ICategory_general.equals(e1)) return -1; if (WorkbenchSWTMessages.ICategory_general.equals(e2)) return 1; String str1; if (e1 instanceof MPartDescriptor) <START> str1 = ((MPartDescriptor) e1).getLocalizedLabel(); <END> else str1 = e1.toString(); String str2; if (e2 instanceof MPartDescriptor) str2 = ((MPartDescriptor) e2).getLocalizedLabel(); else str2 = e2.toString(); if (str1 == null) str1 = EMPTY_STRING; if (str2 == null) str2 = EMPTY_STRING; return getComparator().compare(str1, str2); }</code><technical_language>mnemonics in them</technical_language>

Target:
public int compare(Viewer viewer, Object e1, Object e2) { if (WorkbenchSWTMessages.ICategory_general.equals(e1)) { return -1; } if (WorkbenchSWTMessages.ICategory_general.equals(e2)) { return 1; } String str1; if (e1 instanceof MPartDescriptor) { str1 = ((MPartDescriptor) e1).getLocalizedLabel(); } else { str1 = e1.toString(); } String str2; if (e2 instanceof MPartDescriptor) { str2 = ((MPartDescriptor) e2).getLocalizedLabel(); } else { str2 = e2.toString(); } if (str1 == null) { str1 = EMPTY_STRING; } if (str2 == null) { str2 = EMPTY_STRING; } String s1 = DialogUtil.removeAccel(str1); String s2 = DialogUtil.removeAccel(str2); return getComparator().compare(s1, s2); }
Source:
<code>public static void setup() { <START> textAreaFormFieldValueProcessor = new TextAreaFormFieldValueProcessor(); <END> multipleSubFormFieldValueProcessor = new MultipleSubFormFieldValueProcessor(); subFormFieldValueProcessor = new SubFormFieldValueProcessor(); localDateFieldValueProcessor = new LocalDateFieldValueProcessor(); localDateFieldValueProcessor.init(); formSerializer = new FormDefinitionSerializerImpl(new FieldSerializer(), new FormModelSerializer(), new TestMetaDataEntryManager()); textAreaTaskForm = getFormDefinition("TextareaTask-taskform.frm"); localDateTaskForm = getFormDefinition("LocalDateFieldTask-taskform.frm"); subformTaskForm = getFormDefinition("SubformTask-taskform.frm"); }</code><technical_language>initialize of fields declaration site? This @BeforeClass in opinion add value. (It sense if of constructors threw exceptions.)</technical_language>

Target:
public static void setup() throws IOException { textAreaTaskForm = getFormDefinition("TextareaTask-taskform.frm"); localDateTaskForm = getFormDefinition("LocalDateFieldTask-taskform.frm"); subformTaskForm = getFormDefinition("SubformTask-taskform.frm"); }
Source:
<code>public static void addRecipe(String recipeName, ItemStack itemstack, Object... obj) { <START> if (Config.isDebug && itemstack.getMetadata() > 15) { <END> Log.error("Tried to register a recipe %s for item %s with invalid metadata", recipeName, itemstack.getUnlocalizedName()); } ShapedRecipeCustom recipe = new ShapedRecipeCustom(itemstack, obj); recipe.setRegistryName(Constants.MOD_ID, recipeName); ForgeRegistries.RECIPES.register(recipe); }</code><technical_language>Items metadatas higher 15. blocks them</technical_language>

Target:
public static void addRecipe(String recipeName, ItemStack itemstack, Object... obj) { ShapedRecipeCustom recipe = new ShapedRecipeCustom(itemstack, obj); recipe.setRegistryName(Constants.MOD_ID, recipeName); ForgeRegistries.RECIPES.register(recipe); }
Source:
<code>protected void performDefaults() { <START> for(int i=0; i<envVariables.length; i++) <END> envVariables[i].loadDefault(); super.performDefaults(); }</code><technical_language>add braces for loop</technical_language>

Target:
protected void performDefaults() { for (StringFieldEditor envVariable : envVariables) { envVariable.loadDefault(); } super.performDefaults(); }
Source:
<code>private static void alignStreamNode(StreamNode streamNode, StreamGraph streamGraph) { if (streamNode.getOperatorName().equals(KEYED_STREAM_VALUE_OPERATOR_NAME)) { StreamEdge downStreamEdge = streamNode.getOutEdges().get(0); StreamNode downStreamNode = streamGraph.getStreamNode(downStreamEdge.getTargetId()); chainStreamNode(downStreamEdge, streamNode, downStreamNode); downStreamEdge.setPartitioner(new ForwardPartitioner()); } if (streamNode.getOperatorName().equals(STREAM_KEY_BY_MAP_OPERATOR_NAME) || streamNode.getOperatorName().equals(STREAM_PARTITION_CUSTOM_MAP_OPERATOR_NAME) || <START> streamNode.getOperatorName().equals(STREAM_TIMESTAMP_AND_WATERMARK_OPERATOR_NAME)) { <END> StreamEdge upStreamEdge = streamNode.getInEdges().get(0); StreamNode upStreamNode = streamGraph.getStreamNode(upStreamEdge.getSourceId()); chainStreamNode(upStreamEdge, streamNode, upStreamNode); } }</code><technical_language>this is necessary</technical_language>

Target:
private static void alignStreamNode(StreamNode streamNode, StreamGraph streamGraph) { if (streamNode.getOperatorName().equals(KEYED_STREAM_VALUE_OPERATOR_NAME)) { StreamEdge downStreamEdge = streamNode.getOutEdges().get(0); StreamNode downStreamNode = streamGraph.getStreamNode(downStreamEdge.getTargetId()); chainStreamNode(downStreamEdge, streamNode, downStreamNode); downStreamEdge.setPartitioner(new ForwardPartitioner()); } if (streamNode.getOperatorName().equals(STREAM_KEY_BY_MAP_OPERATOR_NAME) || streamNode.getOperatorName().equals(STREAM_PARTITION_CUSTOM_MAP_OPERATOR_NAME)) { StreamEdge upStreamEdge = streamNode.getInEdges().get(0); StreamNode upStreamNode = streamGraph.getStreamNode(upStreamEdge.getSourceId()); chainStreamNode(upStreamEdge, streamNode, upStreamNode); } }
Source:
<code>private Environment readEnvironment(final Properties properties) { final String envName = read(ENV_KEY, properties); if (envName == null) { return DEFAULT_ENV; <START> } <END> for (Environment env : Environment.values()) { if (env.name().toLowerCase().equals(envName)) { return env; } } throw new InvalidEnvironmentException(envName); }</code><technical_language>Minor: blank envName default env? (This consistent user.)</technical_language>

Target:
private Environment readEnvironment(final Properties properties) { final String envName = read(ENV_KEY, properties); if (Strings.isNullOrEmpty(envName)) { return DEFAULT_ENV; } for (Environment env : Environment.values()) { if (env.name().toLowerCase().equals(envName)) { return env; } } throw new InvalidEnvironmentException(envName); }
Source:
<code>public ProcessInstance createAndStartProcessInstanceWithInitialFlowElement(ProcessDefinition processDefinition, String businessKey, String processInstanceName, FlowElement initialFlowElement, Process process, Map<String, Object> variables, Map<String, Object> transientVariables, boolean startProcessInstance) { if (processExtensionService.hasExtensionsFor(processDefinition)) { <START> Map<String, Object> processedVariables=getVariablesFromExtensionFile(processDefinition,variables); <END> return super.createAndStartProcessInstanceWithInitialFlowElement(processDefinition, businessKey, processInstanceName, initialFlowElement, process, processedVariables, transientVariables, startProcessInstance); } return super.createAndStartProcessInstanceWithInitialFlowElement(processDefinition, businessKey, processInstanceName, initialFlowElement, process, variables, transientVariables, startProcessInstance); }</code><technical_language>Please, spaces = operator</technical_language>

Target:
public ProcessInstance createAndStartProcessInstanceWithInitialFlowElement(ProcessDefinition processDefinition, String businessKey, String processInstanceName, FlowElement initialFlowElement, Process process, Map<String, Object> variables, Map<String, Object> transientVariables, boolean startProcessInstance) { if (processExtensionService.hasExtensionsFor(processDefinition)) { Map<String, Object> processedVariables = calculateVariablesFromExtensionFile(processDefinition, variables); return super.createAndStartProcessInstanceWithInitialFlowElement(processDefinition, businessKey, processInstanceName, initialFlowElement, process, processedVariables, transientVariables, startProcessInstance); } return super.createAndStartProcessInstanceWithInitialFlowElement(processDefinition, businessKey, processInstanceName, initialFlowElement, process, variables, transientVariables, startProcessInstance); }
Source:
<code>public String toString() { StringBuilder sb = new StringBuilder(); sb.append("version: ").append(version); sb.append(" lastUpdateTime: ").append(lastUpdateTime); sb.append(" bytesRead: ").append(bytesRead); <START> sb.append(" numLastUpdateTimeBlobsRead: ").append(lastUpdateTimeReadBlobIds); <END> return sb.toString(); }</code><technical_language>print set of ids size of set? (The header match.)</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("version: ").append(version); sb.append(" lastUpdateTime: ").append(lastUpdateTime); sb.append(" bytesRead: ").append(bytesRead); sb.append(" lastUpdateTimeReadBlobIds: ").append(lastUpdateTimeReadBlobIds); return sb.toString(); }
Source:
<code>public Optional<DecorrelationResult> visitProject(ProjectNode node, Void context) { Optional<DecorrelationResult> childDecorrelationResultOptional = lookup.resolve(node.getSource()).accept(this, null); if (!childDecorrelationResultOptional.isPresent()) { return Optional.empty(); } DecorrelationResult childDecorrelationResult = childDecorrelationResultOptional.get(); List<Symbol> symbolsToAdd = childDecorrelationResult.symbolsToPropagate.stream() <START> .filter(symbol -> !node.getOutputSymbols().contains(symbol)) <END> .collect(toImmutableList()); Assignments assignments = Assignments.builder() .putAll(node.getAssignments()) .putIdentities(symbolsToAdd) .build(); return Optional.of(new DecorrelationResult( new ProjectNode(idAllocator.getNextId(), childDecorrelationResult.node, assignments), childDecorrelationResult.symbolsToPropagate, childDecorrelationResult.correlatedPredicates)); }</code><technical_language>is a O(N^2)</technical_language>

Target:
public Optional<DecorrelationResult> visitProject(ProjectNode node, Void context) { Optional<DecorrelationResult> childDecorrelationResultOptional = lookup.resolve(node.getSource()).accept(this, null); if (!childDecorrelationResultOptional.isPresent()) { return Optional.empty(); } DecorrelationResult childDecorrelationResult = childDecorrelationResultOptional.get(); Set<Symbol> nodeOutputSymbols = ImmutableSet.copyOf(node.getOutputSymbols()); List<Symbol> symbolsToAdd = childDecorrelationResult.symbolsToPropagate.stream() .filter(symbol -> !nodeOutputSymbols.contains(symbol)) .collect(toImmutableList()); Assignments assignments = Assignments.builder() .putAll(node.getAssignments()) .putIdentities(symbolsToAdd) .build(); return Optional.of(new DecorrelationResult( new ProjectNode(idAllocator.getNextId(), childDecorrelationResult.node, assignments), childDecorrelationResult.symbolsToPropagate, childDecorrelationResult.correlatedPredicates, childDecorrelationResult.correlatedSymbolsMapping, childDecorrelationResult.atMostSingleRow)); }
Source:
<code>public boolean reacquireLocks() { <START> return acquireLock(); <END> }</code><technical_language>acquireLockAsyncTask(), need acquire locks for commands require hold for entire execution flow (including endAction())</technical_language>

Target:
public boolean reacquireLocks() { return acquireLockAsyncTask(); }
Source:
<code>public void tearDown() throws Exception { <START> if (factoryWsName != null) { <END> workspaceServiceClient.delete(factoryWsName, user.getName()); } }</code><technical_language>factoryWsName null</technical_language>

Target:
public void tearDown() throws Exception { workspaceServiceClient.deleteFactoryWorkspaces(testWorkspace.getName(), user.getName()); factoryServiceClient.deleteFactory(FACTORY_NAME); }
Source:
<code>protected boolean isCreatingNamespace(String workspaceId) throws InfrastructureException { boolean legacyWithPlaceholders = isNullOrEmpty(legacyNamespaceName) || hasPlaceholders(legacyNamespaceName); boolean legacyExists = checkNamespaceExists( resolveLegacyNamespaceName(EnvironmentContext.getCurrent().getSubject(), workspaceId)); if (isNullOrEmpty(defaultNamespaceName) && !legacyExists) { throw new InfrastructureException( <START> "Cannot determine whether a new namespace and service account should be" <END> + " created for workspace %s. There is no pre-existing workspace namespace to be found using the legacy" + " `che.infra.kubernetes.namespace` property yet the `che.infra.kubernetes.namespace.default` property" + " is undefined."); } boolean defaultHasPlaceholders = hasPlaceholders(defaultNamespaceName); return (legacyWithPlaceholders && legacyExists) || (!legacyExists && defaultHasPlaceholders); }</code><technical_language>a bit confused. message determine a new namespace created created invoking isCreatingNamespace method: java public KubernetesNamespace create(String workspaceId) throws InfrastructureException { KubernetesNamespace namespace = doCreateNamespace(workspaceId, namespaceName); namespace.prepare(); if (isCreatingNamespace(workspaceId) && !isNullOrEmpty(serviceAccountName)) { java void prepare() throws InfrastructureException { KubernetesClient client = clientFactory.create(workspaceId); if (get(name, client) == null) { create(name, client); } } some refactoring thinkgs simpler. try propose something</technical_language>

Target:
protected boolean isCreatingNamespace(String workspaceId) throws InfrastructureException { boolean legacyExists = checkNamespaceExists( resolveLegacyNamespaceName(EnvironmentContext.getCurrent().getSubject(), workspaceId)); if (legacyExists) { return isNullOrEmpty(legacyNamespaceName) || hasPlaceholders(legacyNamespaceName); } if (isNullOrEmpty(defaultNamespaceName)) { throw new InfrastructureException( "Cannot determine whether a new namespace and service account should be" + " created for workspace %s. There is no pre-existing workspace namespace to be" + " found using the legacy `che.infra.kubernetes.namespace` property yet the" + " `che.infra.kubernetes.namespace.default` property is undefined."); } return hasPlaceholders(defaultNamespaceName); }
Source:
<code>protected void executeQueryCommand() { <START> log.info("arik " <END> + getParameters().getOvf()); VM vm = new VM(); vm.setClusterArch(ArchitectureType.x86_64); Pattern p = Pattern.compile("<Name>(.*?)</Name>"); Matcher m = p.matcher(getParameters().getOvf()); if (m.find()) { String name = m.group(1); vm.setName(name); } setReturnValue(vm); }</code><technical_language>get history :)</technical_language>

Target:
protected void executeQueryCommand() { String ovfstring = getParameters().getOvf(); log.info("arik " + ovfstring); ovfstring = ovfstring.replaceAll("[\r\n]+", "").replaceAll("xmlns=[^-\\s]*", ""); VM vm = new VM(); List<DiskImage> images = new ArrayList<>(); List<VmNetworkInterface> interfaces = new ArrayList<>(); try { ovfManager.importVm(ovfstring, vm, images, interfaces); } catch (OvfReaderException e) { } setReturnValue(vm); }
Source:
<code>private LineConsumer[] appendTo(LineConsumer[] base, LineConsumer... toAppend ) { <START> List<LineConsumer> allElements = new ArrayList<>(Arrays.asList(base)); <END> allElements.addAll(Arrays.asList(toAppend)); return allElements.toArray(new LineConsumer[allElements.size()]); }</code><technical_language>I add base element in head of list creation of a list other elements instead</technical_language>

Target:
private LineConsumer[] appendTo(LineConsumer[] base, LineConsumer... toAppend ) { List<LineConsumer> allElements = new ArrayList<>(); allElements.addAll(Arrays.asList(base)); allElements.addAll(Arrays.asList(toAppend)); return allElements.toArray(new LineConsumer[allElements.size()]); }
Source:
<code>public LinkedMultiValueMap<String, String> getSubscriptions(String destination, Message<?> message) { LinkedMultiValueMap<String, String> copiedSubscriptions = new LinkedMultiValueMap<>(); if (notSubscriptionCache.asMap().keySet().contains(destination)) { return copiedSubscriptions; } this.accessCache.compute(destination, (key, value) -> { if (value == null) { LinkedMultiValueMap<String, String> result = new LinkedMultiValueMap<>(); <START> for (SessionSubscriptionInfo info : subscriptionRegistry.getAllSubscriptions()) { <END> for (String destinationPattern : info.getDestinations()) { if (destinationPattern.equals(destination)) { for (Subscription subscription : info.getSubscriptions(destinationPattern)) { result.add(info.sessionId, subscription.getId()); } } } } if (!result.isEmpty()) { copiedSubscriptions.addAll(result.deepCopy()); return result; } else { notSubscriptionCache.put(destination, ""); return null; } } else { copiedSubscriptions.addAll(value.deepCopy()); return value; } }); return copiedSubscriptions; }</code><technical_language>I see, in places start actively streams - reason do - in spirit of similarity</technical_language>

Target:
public LinkedMultiValueMap<String, String> getSubscriptions(String destination, Message<?> message) { LinkedMultiValueMap<String, String> copiedSubscriptions = new LinkedMultiValueMap<>(); if (notSubscriptionCache.asMap().keySet().contains(destination)) { return copiedSubscriptions; } this.accessCache.compute(destination, (key, value) -> { if (value == null) { LinkedMultiValueMap<String, String> result = new LinkedMultiValueMap<>(); subscriptionRegistry.getAllSubscriptions().forEach((info) -> { info.getDestinations().forEach((destinationPattern) -> { if (destinationPattern.equals(destination)) { info.getSubscriptions(destinationPattern).forEach((subscription) -> { result.add(info.sessionId, subscription.getId()); }); } }); }); if (!result.isEmpty()) { copiedSubscriptions.addAll(result.deepCopy()); return result; } else { notSubscriptionCache.put(destination, ""); return null; } } else { copiedSubscriptions.addAll(value.deepCopy()); return value; } }); return copiedSubscriptions; }
Source:
<code>public <T> T getMetadataNode(Class<T> fieldClass) { T field = (T) customNodes.get(fieldClass.getName()); if (field == null) { try { field = fieldClass.newInstance(); customNodes.put(field.getClass().getName(), field); } catch (InstantiationException e) { <START> } catch (IllegalAccessException e) { <END> } } return field; }</code><technical_language>Consolidate a multi-catch log exception details DEBUG explaining exceptions ignored</technical_language>

Target:
public <T> T getMetadataNode(Class<T> fieldClass) { T field = (T) customNodes.get(fieldClass.getName()); if (field == null) { try { field = fieldClass.newInstance(); customNodes.put(field.getClass().getName(), field); } catch (InstantiationException | IllegalAccessException e) { s_logger.debug("No default constructor available in class " + fieldClass.getName() + ", ignoring exception", e); } } return field; }
Source:
<code>public void redraw () { if (display.inPaint) { <START> display.asyncExec(() <END> -> redraw()); return; } checkWidget(); view.setNeedsDisplay(true); }</code><technical_language>widget disposed time outer redraw() invoked time asyncExec runs, in case this trigger exception. - widget repainted for other reasons this time, in case this repaint redundant</technical_language>

Target:
public void redraw() { checkWidget(); if (display.inPaint) { display.asyncExec(() -> { if (!isDisposed()) setNeedsDisplay(); }); return; } setNeedsDisplay(); }
Source:
<code>private KLabelConstant(String label, Definition definition) { this.label = label; productions = definition != null ? ImmutableList.<Production>copyOf(definition.context().productionsOf(label)) : ImmutableList.<Production>of(); boolean isFunction = false; boolean isPattern = false; if (!label.startsWith("is")) { predicateSort = null; Iterator<Production> iterator = productions.iterator(); if (iterator.hasNext()) { Production fstProd = iterator.next(); isFunction = fstProd.containsAttribute(Attribute.FUNCTION.getKey()) || fstProd.containsAttribute(Attribute.PREDICATE.getKey()); <START> isPattern = fstProd.containsAttribute("pattern"); <END> } while (iterator.hasNext()) { Production production = iterator.next(); assert isFunction == (production .containsAttribute(Attribute.FUNCTION.getKey()) || production .containsAttribute(Attribute.PREDICATE.getKey())) : "Cannot determine if the KLabel " + label + " is a function symbol because there are multiple productions associated with this KLabel: " + productions; assert isPattern == production.containsAttribute("pattern") : "Cannot determine if the KLabel " + label + " is a pattern symbol because there are multiple productions associated with this KLabel: " + productions; } } else { isFunction = true; predicateSort = Sort.of(label.substring("is".length())); } this.isSortPredicate = predicateSort != null; this.isFunction = isFunction; this.isPattern = isPattern; this.listTerminator = buildListTerminator(definition); this.isListLabel = listTerminator != null; }</code><technical_language>Attribute.PATTERN_KEY</technical_language>

Target:
private KLabelConstant(String label, Definition definition) { this.label = label; productions = definition != null ? ImmutableList.<Production>copyOf(definition.context().productionsOf(label)) : ImmutableList.<Production>of(); boolean isFunction = false; boolean isPattern = false; if (!label.startsWith("is")) { predicateSort = null; Iterator<Production> iterator = productions.iterator(); if (iterator.hasNext()) { Production fstProd = iterator.next(); isFunction = fstProd.containsAttribute(Attribute.FUNCTION.getKey()) || fstProd.containsAttribute(Attribute.PREDICATE.getKey()); isPattern = fstProd.containsAttribute(Attribute.PATTERN_KEY); } while (iterator.hasNext()) { Production production = iterator.next(); assert isFunction == (production .containsAttribute(Attribute.FUNCTION.getKey()) || production .containsAttribute(Attribute.PREDICATE.getKey())) : "Cannot determine if the KLabel " + label + " is a function symbol because there are multiple productions associated with this KLabel: " + productions; assert isPattern == production.containsAttribute(Attribute.PATTERN_KEY) : "Cannot determine if the KLabel " + label + " is a pattern symbol because there are multiple productions associated with this KLabel: " + productions; } } else { isFunction = true; predicateSort = Sort.of(label.substring("is".length())); } this.isSortPredicate = predicateSort != null; this.isFunction = isFunction; this.isPattern = isPattern; this.listTerminator = buildListTerminator(definition); this.isListLabel = listTerminator != null; }
Source:
<code>public CloudConfig getCloudConfig(String clusterName) { if (!ZKUtil.isClusterSetup(clusterName, zkClient)) { throw new HelixException("fail to get config. cluster: " + clusterName + " is NOT setup."); } HelixConfigScope scope = new HelixConfigScopeBuilder(ConfigScopeProperty.CLOUD).forCluster(clusterName).build(); ZNRecord record = getConfigZnRecord(scope); if (record == null) { <START> LOG.warn("No cloud config found at " + scope.getZkPath()); <END> return null; } return new CloudConfig(record); }</code><technical_language>slf4j style {}</technical_language>

Target:
public CloudConfig getCloudConfig(String clusterName) { if (!ZKUtil.isClusterSetup(clusterName, zkClient)) { throw new HelixException( String.format("Failed to get config. cluster: %s is not setup.", clusterName)); } HelixConfigScope scope = new HelixConfigScopeBuilder(ConfigScopeProperty.CLOUD).forCluster(clusterName).build(); ZNRecord record = getConfigZnRecord(scope); if (record == null) { LOG.warn("No cloud config found at {}.", scope.getZkPath()); return null; } return new CloudConfig(record); }
Source:
<code>public Status isMet(AbstractBuild<?,?> build) { List<PromotionBadge> badges = new ArrayList<PromotionBadge>(); for (PromotionCondition cond : conditions) { PromotionBadge b = cond.isMet(this, build); <START> LOGGER.log(Level.INFO, "PromotionProcess.isMet(): any_met_condition={0}", this.any_met_condition); <END> if (this.any_met_condition) { if (b!=null) badges.add(b); } else { if(b==null) return null; badges.add(b); } } if (badges.isEmpty()) { return null; } else { return new Status(this,badges); } }</code><technical_language>This logging - PromotionProcess is references in entry</technical_language>

Target:
public Status isMet(AbstractBuild<?,?> build) { List<PromotionBadge> badges = new ArrayList<PromotionBadge>(); for (PromotionCondition cond : conditions) { PromotionBadge b = cond.isMet(this, build); if (this.anyMetCondition) { if (b!=null) { badges.add(b); } } else { if(b==null) { return null; } badges.add(b); } } if (badges.isEmpty()) { return null; } else { return new Status(this,badges); } }