auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected static Strategy parseLocator(FindByCoordinates findByCoordinates, String locator) { String prefix = null; String criteria = locator; if (!locator.startsWith(" String[] locatorParts = locator.split("[=:]", 2); if (locatorParts.length == 2) { <START> if (locator.charAt(locatorParts[0].length()) == "=".charAt(0)) { <END> System.out.println( "*WARN* '=' is deprecated as locator strategy separator. ':' should be used instead"); } prefix = locatorParts[0].trim().toUpperCase(); criteria = locatorParts[1].trim(); } } Strategy strategy = StrategyEnum.DEFAULT; if (prefix != null) { try { strategy = StrategyEnum.valueOf(prefix); } catch (IllegalArgumentException e) { CustomStrategy customStrategy = registeredLocationStrategies.get(prefix); if (customStrategy != null) { strategy = customStrategy; } } } findByCoordinates.criteria = criteria; return strategy; }</code><technical_language>if (locator.charAt(locatorParts[0].length()) == '=') {</technical_language>

Target:
protected static Strategy parseLocator(FindByCoordinates findByCoordinates, String locator) { String prefix = null; String criteria = locator; if (!locator.startsWith(" String[] locatorParts = locator.split("[=:]", 2); if (locatorParts.length == 2) { if (locator.charAt(locatorParts[0].length()) == '=') { System.out.println( "*WARN* '=' is deprecated as locator strategy separator. ':' should be used instead"); } prefix = locatorParts[0].trim().toUpperCase(); criteria = locatorParts[1].trim(); } } Strategy strategy = StrategyEnum.DEFAULT; if (prefix != null) { try { strategy = StrategyEnum.valueOf(prefix); } catch (IllegalArgumentException e) { CustomStrategy customStrategy = registeredLocationStrategies.get(prefix); if (customStrategy != null) { strategy = customStrategy; } } } findByCoordinates.criteria = criteria; return strategy; }
Source:
<code>private void fetchPinotData() { long startTimeNanos = System.nanoTime(); try { Map<ServerInstance, DataTable> dataTableMap = queryPinot(session, split); dataTableMap.values().stream() .filter(table -> table != null && table.getNumberOfRows() > 0) .forEach(dataTable -> { <START> checkExceptions(dataTable, split, this.pinotConfig.isRetryPinotException()); <END> int estimatedTableSizeInBytes = IntStream.rangeClosed(0, dataTable.getDataSchema().size() - 1) .map(i -> getEstimatedColumnSizeInBytes(dataTable.getDataSchema().getColumnDataType(i)) * dataTable.getNumberOfRows()) .reduce(0, Integer::sum); dataTableList.add(new PinotDataTableWithSize(dataTable, estimatedTableSizeInBytes)); estimatedMemoryUsageInBytes += estimatedTableSizeInBytes; }); isPinotDataFetched = true; } finally { readTimeNanos += System.nanoTime() - startTimeNanos; } }</code><technical_language>I presto this. notation for instance variables</technical_language>

Target:
private void fetchPinotData() { long startTimeNanos = System.nanoTime(); try { Map<ServerInstance, DataTable> dataTableMap = queryPinot(session, split); dataTableMap.values().stream() .filter(table -> table != null && table.getNumberOfRows() > 0) .forEach(dataTable -> { checkExceptions(dataTable, split, PinotSessionProperties.isMarkDataFetchExceptionsAsRetriable(session)); int estimatedTableSizeInBytes = IntStream.rangeClosed(0, dataTable.getDataSchema().size() - 1) .map(i -> getEstimatedColumnSizeInBytes(dataTable.getDataSchema().getColumnDataType(i)) * dataTable.getNumberOfRows()) .reduce(0, Integer::sum); dataTableList.add(new PinotDataTableWithSize(dataTable, estimatedTableSizeInBytes)); estimatedMemoryUsageInBytes += estimatedTableSizeInBytes; }); isPinotDataFetched = true; } finally { readTimeNanos += System.nanoTime() - startTimeNanos; } }
Source:
<code>private void initThreadsPerCore() { EnableableFormLabel label = new EnableableFormLabel(); label.setText(constants.threadsPerCore()); threadsPerCoreEditor = new ListModelListBoxOnlyEditor<>(IntegerRenderer.instance(), new ModeSwitchingVisibilityRenderer()); threadsPerCoreEditorWithInfoIcon = new EntityModelDetachableWidgetWithInfo(label, threadsPerCoreEditor); <START> threadsPerCoreEditorWithInfoIcon.setExplanation(templates.italicText(messages.threadsPerCoreInfo())); <END> }</code><technical_language>I this handle properly '\n' in message. need replace <br> (look for example cpuPinningInfo). please extract .asString().replaceAll("(\r\n|\n)", "<br />") a utility method copy pasted</technical_language>

Target:
private void initThreadsPerCore() { EnableableFormLabel label = new EnableableFormLabel(); label.setText(constants.threadsPerCore()); threadsPerCoreEditor = new ListModelListBoxOnlyEditor<>(IntegerRenderer.instance(), new ModeSwitchingVisibilityRenderer()); threadsPerCoreEditorWithInfoIcon = new EntityModelDetachableWidgetWithInfo(label, threadsPerCoreEditor); threadsPerCoreEditorWithInfoIcon.setExplanation(multiLineItalicSafeHtml(messages.threadsPerCoreInfo())); }
Source:
<code>public void testDecode() throws Exception { OpenGtsProtocolDecoder decoder = new OpenGtsProtocolDecoder(new OpenGtsProtocol()); verifyNull(decoder, request( <START> "/?bat=0")); <END> verifyPosition(decoder, request( "/?id=123456789012345&dev=dev_name&acct=account&batt=0&code=0xF020&alt=160.5&gprmc=$GPRMC,191555,A,5025.46624,N,3030.39937,E,0.000000,0.000000,200218,,*2F")); }</code><technical_language>Is this a real test case</technical_language>

Target:
public void testDecode() throws Exception { OpenGtsProtocolDecoder decoder = new OpenGtsProtocolDecoder(new OpenGtsProtocol()); verifyPosition(decoder, request( "/?id=123456789012345&dev=dev_name&acct=account&batt=0&code=0xF020&alt=160.5&gprmc=$GPRMC,191555,A,5025.46624,N,3030.39937,E,0.000000,0.000000,200218,,*2F")); }
Source:
<code>protected void checkPaymentDetailPropertyMaxLength(PaymentDetail paymentDetail, MessageMap errorMap) { for (String propertyName : paymentDetailPropertiesToCheckMaxLength) { String propertyValue = (String) ObjectUtils.getPropertyValue(paymentDetail, propertyName); if (StringUtils.isNotEmpty(propertyValue)) { Integer maxLength = dataDictionaryService.getAttributeMaxLength(PaymentDetail.class, propertyName); <START> if ((maxLength != null) && (maxLength < propertyValue.length())) { <END> String errorLabel = dataDictionaryService.getAttributeErrorLabel(PaymentDetail.class, propertyName); errorLabel += " with the value '" + propertyValue + "'"; errorMap.putError(KFSConstants.GLOBAL_ERRORS, RiceKeyConstants.ERROR_MAX_LENGTH, errorLabel, maxLength.toString()); } } } if (LOG.isDebugEnabled()) { LOG.debug("After checkPaymentDetailPropertyMaxLength: " + printErrorMap(errorMap)); } }</code><technical_language>if max length set, log error condition</technical_language>

Target:
protected void checkPaymentDetailPropertyMaxLength(PaymentDetail paymentDetail, MessageMap errorMap) { for (String propertyName : paymentDetailPropertiesToCheckMaxLength) { String propertyValue = (String) ObjectUtils.getPropertyValue(paymentDetail, propertyName); if (StringUtils.isNotEmpty(propertyValue)) { Integer maxLength = dataDictionaryService.getAttributeMaxLength(PaymentDetail.class, propertyName); if (maxLength == null) { LOG.warn("checkPaymentDetailPropertyMaxLength, PaymentDetail field '" + propertyName + "' does not have a max length specified in the data dictionary"); } else if (maxLength < propertyValue.length()) { String errorLabel = dataDictionaryService.getAttributeErrorLabel(PaymentDetail.class, propertyName); errorLabel += " with the value '" + propertyValue + "'"; errorMap.putError(KFSConstants.GLOBAL_ERRORS, RiceKeyConstants.ERROR_MAX_LENGTH, errorLabel, maxLength.toString()); } } } if (LOG.isDebugEnabled()) { LOG.debug("After checkPaymentDetailPropertyMaxLength: " + printErrorMap(errorMap)); } }
Source:
<code>public boolean handhshake(String host, int port) throws URISyntaxException, InterruptedException { URI uri = new URI(url); EventLoopGroup group = new NioEventLoopGroup(); <START> <END> Bootstrap b = new Bootstrap(); b.group(group) .channel(NioSocketChannel.class) .handler(new WebSocketClientInitializer()); channel = b.connect(host, port).sync().channel(); WebSocketClientHandshaker handshaker = WebSocketClientHandshakerFactory. newHandshaker(uri, WebSocketVersion.V13, null, true, new DefaultHttpHeaders()); boolean isDone = handshaker.handshake(channel).sync().isSuccess(); return isDone; }</code><technical_language>remove unnecessary blank lines</technical_language>

Target:
public boolean handhshake(String host, int port) throws InterruptedException, URISyntaxException { URI uri = new URI(url); EventLoopGroup group = new NioEventLoopGroup(); Bootstrap b = new Bootstrap(); b.group(group) .channel(NioSocketChannel.class) .handler(new WebSocketClientInitializer()); channel = b.connect(host, port).sync().channel(); WebSocketClientHandshaker handshaker = WebSocketClientHandshakerFactory. newHandshaker(uri, WebSocketVersion.V13, null, true, new DefaultHttpHeaders()); boolean isDone = handshaker.handshake(channel).sync().isSuccess(); return isDone; }
Source:
<code>protected Set<String> getFieldsToLoad() { <START> return Stream.of( <END> getIdField(), getTermVectorField(), StatusField.FOLLOWERS_COUNT.name, StatusField.FRIENDS_COUNT.name, StatusField.IN_REPLY_TO_STATUS_ID.name).collect(Collectors.toCollection(HashSet::new)); }</code><technical_language>Is this more clear like? > Set<String> h = new HashSet<>(Arrays.asList("a", "b")); I better..</technical_language>

Target:
protected Set<String> getFieldsToLoad() { return new HashSet<>(Arrays.asList( getIdField(), getTermVectorField(), StatusField.FOLLOWERS_COUNT.name, StatusField.FRIENDS_COUNT.name, StatusField.IN_REPLY_TO_STATUS_ID.name) ); }
Source:
<code>public void testCharTrailingSpace() throws Exception { execute("CREATE TABLE tpch.char_trailing_space (x char(10))"); <START> assertUpdate("INSERT INTO char_trailing_space VALUES ('test')", 1); <END> assertQuery("SELECT * FROM char_trailing_space WHERE x = char 'test'", "VALUES 'test'"); assertQuery("SELECT * FROM char_trailing_space WHERE x = char 'test '", "VALUES 'test'"); assertQuery("SELECT * FROM char_trailing_space WHERE x = char 'test '", "VALUES 'test'"); assertEquals(getQueryRunner().execute("SELECT * FROM char_trailing_space WHERE x = char ' test'").getRowCount(), 0); assertUpdate("DROP TABLE char_trailing_space"); }</code><technical_language>create adhoc query runner test method this instantiate database instance, no</technical_language>

Target:
public void testCharTrailingSpace() throws Exception { execute("CREATE TABLE tpch.char_trailing_space (x char(10))"); assertUpdate("INSERT INTO char_trailing_space VALUES ('test')", 1); assertQuery("SELECT * FROM char_trailing_space WHERE x = char 'test'", "VALUES 'test'"); assertQuery("SELECT * FROM char_trailing_space WHERE x = char 'test '", "VALUES 'test'"); assertQuery("SELECT * FROM char_trailing_space WHERE x = char 'test '", "VALUES 'test'"); assertEquals(getQueryRunner().execute("SELECT * FROM char_trailing_space WHERE x = char ' test'").getRowCount(), 0); Map<String, String> properties = ImmutableMap.of("deprecated.legacy-char-to-varchar-coercion", "true"); Map<String, String> connectorProperties = ImmutableMap.of("connection-url", mysqlServer.getJdbcUrl()); try (QueryRunner queryRunner = new DistributedQueryRunner(getSession(), 3, properties);) { queryRunner.installPlugin(new MySqlPlugin()); queryRunner.createCatalog("mysql", "mysql", connectorProperties); assertEquals(queryRunner.execute("SELECT * FROM char_trailing_space WHERE x = char 'test'").getRowCount(), 0); assertEquals(queryRunner.execute("SELECT * FROM char_trailing_space WHERE x = char 'test '").getRowCount(), 0); assertEquals(queryRunner.execute("SELECT * FROM char_trailing_space WHERE x = char 'test '").getRowCount(), 0); MaterializedResult result = queryRunner.execute("SELECT * FROM char_trailing_space WHERE x = char 'test '"); assertEquals(result.getRowCount(), 1); assertEquals(result.getMaterializedRows().get(0).getField(0), "test "); } assertUpdate("DROP TABLE char_trailing_space"); }
Source:
<code>public Map<String, List<String>> getInfrasToPoliciesMapping() { Map<String, List<String>> mapping = new HashMap<>(); String fileName = null; try { fileName = PAResourceManagerProperties.RM_NODESOURCE_INFRA_POLICY_MAPPING.getValueAsString(); if (!(new File(fileName).isAbsolute())) { fileName = PAResourceManagerProperties.RM_HOME.getValueAsString() + File.separator + fileName; } <START> try (FileReader fr = new FileReader(fileName); BufferedReader br = new BufferedReader(fr)) { <END> String line = br.readLine(); while (line != null) { final String[] split = line.split(","); if (split.length > 1) { List<String> strings = Arrays.asList(split); String infra = strings.get(0).trim(); List<String> policies = strings.subList(1, strings.size()) .stream() .map(String::trim) .collect(Collectors.toList()); mapping.put(infra, policies); } line = br.readLine(); } } } catch (Exception e) { logger.error("Error when loading infrastructure definition file : " + fileName, e); } return mapping; }</code><technical_language>Optionally, Files.readAllLines() provides a smoother read definition file: I bet output a stream</technical_language>

Target:
public Map<String, List<String>> getInfrasToPoliciesMapping() { Map<String, List<String>> mapping = new HashMap<>(); String fileName = null; try { fileName = PAResourceManagerProperties.RM_NODESOURCE_INFRA_POLICY_MAPPING.getValueAsString(); if (!(new File(fileName).isAbsolute())) { fileName = PAResourceManagerProperties.RM_HOME.getValueAsString() + File.separator + fileName; } mapping = Files.readAllLines(Paths.get(fileName)) .stream() .map(line -> line.split(",")) .filter(array -> array.length > 1) .map(Arrays::asList) .collect(Collectors.toMap(list -> list.get(0).trim(), list -> list.subList(1, list.size()) .stream() .map(String::trim) .collect(Collectors.toList()))); } catch (Exception e) { logger.error("Error when loading infrastructure definition file : " + fileName, e); } return mapping; }
Source:
<code>public ApplePayDecrypter(ConnectorConfiguration configuration, ObjectMapper objectMapper) { this.objectMapper = objectMapper; ApplePayConfig applePayConfig = configuration.getWorldpayConfig().getApplePayConfig(); try { privateKey = generatePrivateKey(BASE64_DECODER.decode(applePayConfig.getPrivateKey())); certificate = generateCertificate(BASE64_DECODER.decode(applePayConfig.getPublicCertificate())); } catch (Exception e) { throw new RuntimeException(e); } <START> long daysToExpiry = TimeUnit.MILLISECONDS.toDays(certificate.getNotAfter().getTime() - new Date().getTime()); <END> LOGGER.info("The Apple Pay payment processing cert will expire in days", daysToExpiry); }</code><technical_language>This a bit more readable: java long daysToExpiry = ChronoUnit.DAYS.between(Instant.now(), certificate.getNotAfter().toInstant()); (Not checked if behaves for partial days close enough for purposes renew certificate days before.)</technical_language>

Target:
public ApplePayDecrypter(ConnectorConfiguration configuration, ObjectMapper objectMapper) { this.objectMapper = objectMapper; ApplePayConfig applePayConfig = configuration.getWorldpayConfig().getApplePayConfig(); try { privateKey = generatePrivateKey(BASE64_DECODER.decode(applePayConfig.getPrivateKey())); certificate = generateCertificate(BASE64_DECODER.decode(applePayConfig.getPublicCertificate())); } catch (Exception e) { throw new RuntimeException(e); } long daysToExpiry = DAYS.between(Instant.now(), certificate.getNotAfter().toInstant()); LOGGER.info("The Apple Pay payment processing cert will expire in days", daysToExpiry); }
Source:
<code>public static <T> T createProxy( Optional<TrustContext> trustContext, String uri, Class<T> type, AuxiliaryRemotingParameters parameters) { <START> return Suppliers.memoizeWithExpiration( <END> () -> ConjureJavaRuntimeTargetFactory.DEFAULT.createProxy(trustContext, uri, type, parameters) .instance(), Duration.ofMinutes(10).toMinutes(), TimeUnit.MINUTES).get(); }</code><technical_language>I thought this 30 minutes expiration OOMing. is 30 minutes fine develop, fine here</technical_language>

Target:
public static <T> T createProxy( Optional<TrustContext> trustContext, String uri, Class<T> type, AuxiliaryRemotingParameters parameters) { return Suppliers.memoizeWithExpiration( () -> ConjureJavaRuntimeTargetFactory.DEFAULT.createProxy(trustContext, uri, type, parameters) .instance(), Duration.ofMinutes(30).toMinutes(), TimeUnit.MINUTES).get(); }
Source:
<code>private void listen() { try { socket = new ServerSocket(PORT); logger.info("Started Language Server Protocol (LSP) service on port {}", PORT); while (!socket.isClosed()) { logger.debug("Going to wait for a client to connect"); try { Socket client = socket.accept(); new Thread(() -> { handleConnection(client); }, "Client " + client.getRemoteSocketAddress()).start(); } catch (IOException e) { <START> logger.debug("Error accepting the client connection: {}", e.getMessage()); <END> } } } catch (IOException e) { logger.error("Error starting the Language Server", e); } }</code><technical_language>IMHO depends if a a closed socket is reason for IOException. Do if is one? If is reason, check if exception is instance of java.net.SocketException if socket is closed. In this case debug level logging anything. If other cases is a closed socket, level error. WDYT</technical_language>

Target:
private void listen() { try { socket = new ServerSocket(PORT); logger.info("Started Language Server Protocol (LSP) service on port {}", PORT); while (!socket.isClosed()) { logger.debug("Going to wait for a client to connect"); try { Socket client = socket.accept(); new Thread(() -> { handleConnection(client); }, "Client " + client.getRemoteSocketAddress()).start(); } catch (IOException e) { if (!socket.isClosed()) { logger.error("Error accepting client connection: {}", e.getMessage()); } } } } catch (IOException e) { logger.error("Error starting the Language Server", e); } }
Source:
<code>public String getLargestImage(int minImageWidth) { if (!mContentContainsImages) { return null; } String currentImageUrl = null; int currentMaxWidth = minImageWidth; Matcher imgMatcher = IMG_TAG_PATTERN.matcher(mContent); while (imgMatcher.find()) { String imageTag = imgMatcher.group(0); String imageUrl = imgMatcher.group(1); int width = Math.max(ReaderHtmlUtils.getWidthAttrValue(imageTag), ReaderHtmlUtils.getIntQueryParam(imageUrl, "w")); if (width > currentMaxWidth) { currentImageUrl = imageUrl; currentMaxWidth = width; } else { <START> currentImageUrl = ReaderHtmlUtils.getSrcsetImageForTag(imageTag, minImageWidth); <END> if (currentImageUrl == null && hasSuitableClassForFeaturedImage(imageTag)) { currentImageUrl = imageUrl; } if (currentImageUrl == null) { currentImageUrl = ReaderHtmlUtils.getLargeFileAttr(imageTag); } } } return currentImageUrl; }</code><technical_language>in while (imgMatcher.find()) { loop. AFAIU currentImageUrl holds suitable (largest) image far. this call override want - eg. set null is srcset attribute. Wdyt</technical_language>

Target:
public String getLargestImage(int minImageWidth) { if (!mContentContainsImages) { return null; } String currentImageUrl = null; int currentMaxWidth = minImageWidth; Matcher imgMatcher = IMG_TAG_PATTERN.matcher(mContent); while (imgMatcher.find()) { String imageTag = imgMatcher.group(0); String imageUrl = imgMatcher.group(1); int width = Math.max(ReaderHtmlUtils.getWidthAttrValue(imageTag), ReaderHtmlUtils.getIntQueryParam(imageUrl, "w")); if (width > currentMaxWidth) { currentImageUrl = imageUrl; currentMaxWidth = width; } SrcsetImage bestFromSrcset = ReaderHtmlUtils.getLargestSrcsetImageForTag(imageTag); if (bestFromSrcset != null && bestFromSrcset.getWidth() > currentMaxWidth) { currentMaxWidth = bestFromSrcset.getWidth(); currentImageUrl = bestFromSrcset.getUrl(); } if (currentImageUrl == null && hasSuitableClassForFeaturedImage(imageTag)) { currentImageUrl = imageUrl; } if (currentImageUrl == null) { currentImageUrl = ReaderHtmlUtils.getLargeFileAttr(imageTag); } } return currentImageUrl; }
Source:
<code>Depgraph withNonrootsAsRoots() { Depgraph res = new Depgraph(); res.roots.addAll(roots); res.roots.addAll(nonroots); res.rootExterns.addAll(rootExterns); <START> res.nonrootExterns.addAll(nonrootExterns); <END> return res; }</code><technical_language>is this correct? oddly assymmetric</technical_language>

Target:
Depgraph withNonrootsAsRoots() { Depgraph res = new Depgraph(); res.roots.addAll(roots); res.roots.addAll(nonroots); res.rootExterns.addAll(rootExterns); res.rootExterns.addAll(nonrootExterns); return res; }
Source:
<code>private void setBlindTrustSSLContext() { try { TrustStrategy acceptingTrustStrategy = (cert, authType) -> true; sslContext = SSLContexts.custom().loadTrustMaterial(null, acceptingTrustStrategy).build(); } catch (KeyStoreException | KeyManagementException | NoSuchAlgorithmException e) { <START> e.printStackTrace(); <END> } }</code><technical_language>throwing a runtime exception instead of printStackTrace</technical_language>

Target:
private void setBlindTrustSSLContext() { try { TrustStrategy acceptingTrustStrategy = (cert, authType) -> true; sslContext = SSLContexts.custom().loadTrustMaterial(null, acceptingTrustStrategy).build(); } catch (KeyStoreException | KeyManagementException | NoSuchAlgorithmException e) { throw new RuntimeException(e.getMessage(), e); } }
Source:
<code>public String execute(CommandContext commandContext) { AuthorizationManager authorizationManager = commandContext.getAuthorizationManager(); authorizationManager.checkCamundaAdmin(); ResourceEntity licenseResource = commandContext.getResourceManager().findLicenseKeyResource(); if (licenseResource != null) { <START> return new String(licenseResource.getBytes()); <END> } PropertyEntity licenseProperty = commandContext.getPropertyManager().findPropertyById(LICENSE_KEY_PROPERTY_NAME); if (licenseProperty != null) { return licenseProperty.getValue(); } return null; }</code><technical_language>Do want platform's default charset read this database? I suggest a fix encoding UTF-8? suggestion return new String(licenseResource.getBytes(java.nio.charset.StandardCharsets.UTF_8));</technical_language>

Target:
public String execute(CommandContext commandContext) { AuthorizationManager authorizationManager = commandContext.getAuthorizationManager(); authorizationManager.checkCamundaAdmin(); ResourceEntity licenseResource = commandContext.getResourceManager().findLicenseKeyResource(); if (licenseResource != null) { return new String(licenseResource.getBytes(), StandardCharsets.UTF_8); } PropertyEntity licenseProperty = commandContext.getPropertyManager().findPropertyById(LICENSE_KEY_PROPERTY_NAME); if (licenseProperty != null) { return licenseProperty.getValue(); } return null; }
Source:
<code>public void testAttemptsToStopStartedServicesOnInitFailure() { Service s1 = new ParentTestService(); FancyCacheProvider s2 = new FancyCacheProvider(); ServiceLocator locator = new ServiceLocator(s1, s2); try { locator.startAllServices(); } catch (Exception e) { <START> } <END> assertThat(s2.startStopCounter, is(0)); }</code><technical_language>code funny. Is exception expected not? a fail() in normal exception flow path, no</technical_language>

Target:
public void testAttemptsToStopStartedServicesOnInitFailure() { Service s1 = new ParentTestService(); FancyCacheProvider s2 = new FancyCacheProvider(); ServiceLocator locator = new ServiceLocator(s1, s2); try { locator.startAllServices(); fail(); } catch (Exception e) { assertThat(e, instanceOf(RuntimeException.class)); assertThat(e.getMessage(), is("Implement me!")); } assertThat(s2.startStopCounter, is(0)); }
Source:
<code>public void notifyClusterListeners(Collection<? extends Event> events, UUID uuid) { for (Event event : events) { if (event.isPre()) { throw new IllegalArgumentException("Events for cluster listener should never be pre change"); } switch (event.getType()) { case CACHE_ENTRY_MODIFIED: for (ListenerInvocation listener : cacheEntryModifiedListeners) { <START> if (listener.clustered && uuid.equals(clusterListenerIDs.get(listener.target))) { <END> listener.invoke(event, true, true); } } break; case CACHE_ENTRY_CREATED: for (ListenerInvocation listener : cacheEntryCreatedListeners) { if (listener.clustered && uuid.equals(clusterListenerIDs.get(listener.target))) { listener.invoke(event, true, true); } } break; case CACHE_ENTRY_REMOVED: for (ListenerInvocation listener : cacheEntryRemovedListeners) { if (listener.clustered && uuid.equals(clusterListenerIDs.get(listener.target))) { listener.invoke(event, true, true); } } break; default: throw new IllegalArgumentException("Unexpected event type encountered!"); } } }</code><technical_language>UUID stored in ListenerInvocation object directly</technical_language>

Target:
public void notifyClusterListeners(Collection<? extends Event> events, UUID uuid) { for (Event event : events) { if (event.isPre()) { throw new IllegalArgumentException("Events for cluster listener should never be pre change"); } switch (event.getType()) { case CACHE_ENTRY_MODIFIED: for (ListenerInvocation listener : cacheEntryModifiedListeners) { if (listener.clustered && uuid.equals(listener.generatedId)) { listener.invoke(event, true, true); } } break; case CACHE_ENTRY_CREATED: for (ListenerInvocation listener : cacheEntryCreatedListeners) { if (listener.clustered && uuid.equals(listener.generatedId)) { listener.invoke(event, true, true); } } break; case CACHE_ENTRY_REMOVED: for (ListenerInvocation listener : cacheEntryRemovedListeners) { if (listener.clustered && uuid.equals(listener.generatedId)) { listener.invoke(event, true, true); } } break; default: throw new IllegalArgumentException("Unexpected event type encountered!"); } } }
Source:
<code>public void recoverFromError() { VDS vds = DbFacade.getInstance().getVdsDao().get(getVdsId()); if (vds.getStatus() == VDSStatus.Error) { mFailedToRunVmAttempts.set(0); setStatus(VDSStatus.Up, vds); DbFacade.getInstance().getVdsDynamicDao().updateStatus(getVdsId(), VDSStatus.Up); <START> log.infoFormat("Settings host {0} to up after {1} failed attempts to run a VM", vds.getName(), <END> mFailedToRunVmAttempts); } }</code><technical_language>i wrote this in patch bug fix, here: "does sense log attempts? 0" a log "Recovering host {0} error state"</technical_language>

Target:
public void recoverFromError() { VDS vds = DbFacade.getInstance().getVdsDao().get(getVdsId()); if (vds.getStatus() == VDSStatus.Error) { setStatus(VDSStatus.Up, vds); DbFacade.getInstance().getVdsDynamicDao().updateStatus(getVdsId(), VDSStatus.Up); log.infoFormat("Settings host {0} to up after {1} failed attempts to run a VM", vds.getName(), mFailedToRunVmAttempts); mFailedToRunVmAttempts.set(0); } }
Source:
<code>protected PageableResult doSearch(RequestContext ctx) { <START> List<Drug> drugs = Context.getConceptService().getDrugs(ctx.getParameter("q"), null, true, false, false, ctx.getStartIndex(), ctx.getLimit()); <END> return new AlreadyPaged<Drug>(ctx, drugs, false); }</code><technical_language>"includeRequired" parameter (the boolean ctx.getStartIndex() ctx.getIncludeAll()</technical_language>

Target:
protected PageableResult doSearch(RequestContext ctx) { boolean searchOnPhrase = true; boolean searchDrugConceptNames = false; boolean includeRetired = ctx.getIncludeAll(); Integer startIndex = ctx.getStartIndex(); Integer limit = ctx.getLimit(); String drugName = ctx.getParameter("q"); Integer countOfDrugs = Context.getConceptService().getCountOfDrugs(drugName, null, searchOnPhrase, searchDrugConceptNames, includeRetired); List<Drug> drugs = Context.getConceptService().getDrugs(drugName, null, searchOnPhrase, searchDrugConceptNames, includeRetired, startIndex, limit); boolean hasMore = countOfDrugs > startIndex + limit; return new AlreadyPaged<Drug>(ctx, drugs, hasMore); }
Source:
<code>public ITmfTimestamp normalize(final long offset, final int scale) { long value = fValue; if (fScale == scale && offset == 0) { return this; } if (this.equals(BIG_BANG) || this.equals(BIG_CRUNCH)) { return this; } if (fScale != scale) { final int scaleDiff = Math.abs(fScale - scale); if (scaleDiff >= scalingFactors.length) { throw new ArithmeticException("Scaling exception"); } final long scalingFactor = scalingFactors[scaleDiff]; if (scale < fScale) { value *= scalingFactor; } else { value /= scalingFactor; <START> } <END> } value = saturatedAdd(value, offset); return new TmfTimestamp(value, scale); }</code><technical_language>operations overflow. a saturatedMultiply() saturatedDivide() too</technical_language>

Target:
public ITmfTimestamp normalize(final long offset, final int scale) { long value = getValue(); if (getScale() == scale && offset == 0) { return this; } if (this.equals(BIG_BANG) || this.equals(BIG_CRUNCH)) { return this; } if (value == 0) { return new TmfTimestamp(offset, scale); } if (getScale() != scale) { final int scaleDiff = Math.abs(getScale() - scale); if (scaleDiff >= scalingFactors.length) { if (getScale() < scale) { value = 0; } else { value = value > 0 ? Long.MAX_VALUE : Long.MIN_VALUE; } } else { final long scalingFactor = scalingFactors[scaleDiff]; if (getScale() < scale) { value /= scalingFactor; } else { value = saturatedMult(scalingFactor, value); } } } value = saturatedAdd(value, offset); return new TmfTimestamp(value, scale); }
Source:
<code>public void init() { context.put(ExtensionProperties.AUTHOR, "oVirt"); <START> context.put(ExtensionProperties.EXTENSION_NAME, "Internal Authentication"); <END> context.put(ExtensionProperties.LICENSE, "ASL 2.0"); context.put(ExtensionProperties.HOME, "<LINK_0>"); context.put(ExtensionProperties.VERSION, "1.0"); }</code><technical_language>please add (Built-in)</technical_language>

Target:
public void init() { context.put(ExtensionProperties.AUTHOR, "The oVirt Project"); context.put(ExtensionProperties.EXTENSION_NAME, "Internal Authentication (Built-in)"); context.put(ExtensionProperties.LICENSE, "ASL 2.0"); context.put(ExtensionProperties.HOME, "<LINK_0>"); context.put(ExtensionProperties.VERSION, "N/A"); }
Source:
<code>public void next(EdgeIteratorState edge, int index, int prevEdgeId) { for (i = 0; i < calculators.size(); i++) { calc = calculators.get(i); if (calc.edgeIsDifferentToLastEdge(edge)) { details.get(i).endInterval(numberOfPoints); <START> details.get(i).startInterval(calc.getCurrentValue()); <END> numberOfPoints = 0; } } numberOfPoints += edge.fetchWayGeometry(2).size(); }</code><technical_language>reads a bit strange index is for calculators details. assign calculator PathDetails? avoid stateful stuff .reset call? (if all)</technical_language>

Target:
public void next(EdgeIteratorState edge, int index, int prevEdgeId) { for (PathDetailsBuilder calc : calculators) { if (calc.isEdgeDifferentToLastEdge(edge)) { calc.endInterval(lastIndex); calc.startInterval(lastIndex); } } lastIndex += edge.fetchWayGeometry(2).size(); }
Source:
<code>static int countBitstreamSmallerThanMinSize(Context context, BundleName bundleName, Item item, String mimeList, String prop) { long size = ConfigurationManager.getLongProperty("rest", prop); int count = 0; try { for(Bundle bundle: item.getBundles()){ if (!bundle.getName().equals(bundleName.name())){ continue; } for(Bitstream bit: bundle.getBitstreams()) { for(String mime: mimeList.split(",")) { <START> if (bit.getFormat(context).getMIMEType().equals(mime)) { <END> if (bit.getSize() < size) { count++; } } } } } } catch (SQLException e) { } return count; }</code><technical_language>trim mime ? space occurs commas code work properly</technical_language>

Target:
static int countBitstreamSmallerThanMinSize(Context context, BundleName bundleName, Item item, String mimeList, String prop) { long size = ConfigurationManager.getLongProperty("rest", prop); int count = 0; try { for(Bundle bundle: item.getBundles()){ if (!bundle.getName().equals(bundleName.name())){ continue; } for(Bitstream bit: bundle.getBitstreams()) { for(String mime: mimeList.split(",")) { if (bit.getFormat(context).getMIMEType().equals(mime.trim())) { if (bit.getSize() < size) { count++; } } } } } } catch (SQLException e) { } return count; }
Source:
<code>public static TimestampFormat getTimestampFormat(ReadableConfig config){ String timestampFormat = config.get(TIMESTAMP_FORMAT); switch (timestampFormat){ case SQL: return TimestampFormat.SQL; case ISO_8601: return TimestampFormat.ISO_8601; } <START> throw new TableException( <END> String.format("Unsupported timestamp format '%s'. Validator should have checked that.", timestampFormat)); }</code><technical_language>Put this exception in default branch of swith</technical_language>

Target:
public static TimestampFormat getTimestampFormat(ReadableConfig config){ String timestampFormat = config.get(TIMESTAMP_FORMAT); switch (timestampFormat){ case SQL: return TimestampFormat.SQL; case ISO_8601: return TimestampFormat.ISO_8601; default: throw new TableException( String.format("Unsupported timestamp format '%s'. Validator should have checked that.", timestampFormat)); } }
Source:
<code>private void addToAntiTombstoneCache(DataCell data) throws IOException{ long txnId=data.version(); <START> if(antiTombstonedTxnRows.isEmpty() && !tombstonedTxnRows.contains(txnId) && isVisible(txnId)){ <END> antiTombstonedTxnRows.add(txnId); } }</code><technical_language>Checking for antiTombstonedTxnRows.isEmpty() is new logic here. Effectively, in antiTombstonedTxnRows. Is this intended? If so, antiTombstonedTxnRows implementation simplified match that</technical_language>

Target:
private void addToAntiTombstoneCache(DataCell data) throws IOException{ long txnId=data.version(); boolean empty = antiTombstonedTxnRow == null; boolean tombstoned = tombstonedTxnRow != null && tombstonedTxnRow == txnId; if(empty && !tombstoned && isVisible(txnId)){ antiTombstonedTxnRow = txnId; } }
Source:
<code>private void showNendAdInterstitial() { NendAdInterstitialShowResult result = NendAdInterstitial.showAd(mActivity, new NendAdInterstitial.OnClickListener() { @Override public void onClick(NendAdInterstitialClickType clickType) { switch (clickType) { case CLOSE: adClosed(); break; case DOWNLOAD: adClosed(); <START> adLeftApplication(); <END> break; case INFORMATION: adClosed(); adLeftApplication(); break; default: break; } } }); switch (result) { case AD_SHOW_SUCCESS: adOpened(); break; case AD_SHOW_ALREADY: break; case AD_FREQUENCY_NOT_RECHABLE: break; case AD_REQUEST_INCOMPLETE: break; case AD_LOAD_INCOMPLETE: break; case AD_DOWNLOAD_INCOMPLETE: break; default: break; } }</code><technical_language>adLeftApplication() called if user clicks Ad adClosed() called user returns app.The Publisher assumes user regains control of app adClosed() is called. adLeftApplication() is called adClosed(). Please change accordingly. Similar change is needed [below](<LINK_0></technical_language>

Target:
private void showNendAdInterstitial() { NendAdInterstitialShowResult result = NendAdInterstitial.showAd(mActivity, new NendAdInterstitial.OnClickListener() { @Override public void onClick(NendAdInterstitialClickType clickType) { switch (clickType) { case CLOSE: adClosed(); break; case DOWNLOAD: adLeftApplication(); adClosed(); break; case INFORMATION: adLeftApplication(); adClosed(); break; default: break; } } }); switch (result) { case AD_SHOW_SUCCESS: adOpened(); break; case AD_SHOW_ALREADY: break; case AD_FREQUENCY_NOT_RECHABLE: break; case AD_REQUEST_INCOMPLETE: break; case AD_LOAD_INCOMPLETE: break; case AD_DOWNLOAD_INCOMPLETE: break; default: break; } }
Source:
<code>public CatalogEntitySummary( @JsonProperty("symbolicName") String symbolicName, @JsonProperty("version") String version, @JsonProperty("name") String name, @JsonProperty("javaType") String javaType, @JsonProperty("planYaml") String planYaml, @JsonProperty("description") String description, @JsonProperty("iconUrl") String iconUrl, <START> @JsonProperty("tags") Set<Object> tags, <END> @JsonProperty("config") Set<EntityConfigSummary> config, @JsonProperty("sensors") Set<SensorSummary> sensors, @JsonProperty("effectors") Set<EffectorSummary> effectors, @JsonProperty("deprecated") boolean deprecated, @JsonProperty("links") Map<String, URI> links ) { super(symbolicName, version, name, javaType, planYaml, description, iconUrl, deprecated, links); this.tags = (tags == null) ? ImmutableList.of() : ImmutableList.<Object> copyOf(tags); this.config = config; this.sensors = sensors; this.effectors = effectors; }</code><technical_language>this CatalogItemSummary</technical_language>

Target:
public CatalogEntitySummary( @JsonProperty("symbolicName") String symbolicName, @JsonProperty("version") String version, @JsonProperty("name") String name, @JsonProperty("javaType") String javaType, @JsonProperty("planYaml") String planYaml, @JsonProperty("description") String description, @JsonProperty("iconUrl") String iconUrl, @JsonProperty("tags") Set<Object> tags, @JsonProperty("config") Set<EntityConfigSummary> config, @JsonProperty("sensors") Set<SensorSummary> sensors, @JsonProperty("effectors") Set<EffectorSummary> effectors, @JsonProperty("deprecated") boolean deprecated, @JsonProperty("links") Map<String, URI> links ) { super(symbolicName, version, name, javaType, planYaml, description, iconUrl, tags, deprecated, links); this.config = config; this.sensors = sensors; this.effectors = effectors; }
Source:
<code>public FilterEntry(String eventName, boolean exclude, String transport, String name) { this.eventName = eventName; this.exclude = exclude; this.recipient = new Recipient(transport, name); <START> } <END></code><technical_language>a question... is a rule in styles to: public FilterEntry(String messageName, boolean exclude, Recipient recipient) { this.messageName = messageName; this.exclude = exclude; this.recipient = recipient; } public FilterEntry(String messageName, boolean exclude, String transport, String name) { this(messageName, exclude, new Recipient(transport, name)); }</technical_language>

Target:
public FilterEntry(String eventName, boolean exclude, String transport, String name) { this(eventName, exclude, new Recipient(transport, name)); }
Source:
<code>private HtmlBlockModel getHtmlUnit() throws CourseContentNotValidException { <START> try { <END> courseData = executeStrict(courseAPI.getEnrolledCourses()).get(0); } catch (Exception e) { throw new RuntimeException(e); } String courseId = courseData.getCourse().getId(); CourseStructureV1Model model; try { model = executeStrict(courseAPI.getCourseStructure(config.getApiUrlVersionConfig().getBlocksApiVersion(), courseId)); } catch (Exception e) { throw new RuntimeException(e); } CourseComponent courseComponent = (CourseComponent) CourseAPI.normalizeCourseStructure(model, courseId); List<CourseComponent> htmlBlockUnits = new ArrayList<>(); courseComponent.fetchAllLeafComponents(htmlBlockUnits, EnumSet.of(BlockType.HTML)); return (HtmlBlockModel) htmlBlockUnits.get(0); }</code><technical_language>a separate method initialize courseData</technical_language>

Target:
private HtmlBlockModel getHtmlUnit() throws CourseContentNotValidException { String courseId = courseData.getCourse().getId(); CourseStructureV1Model model; try { model = executeStrict(courseAPI.getCourseStructure(config.getApiUrlVersionConfig().getBlocksApiVersion(), courseId)); } catch (Exception e) { throw new RuntimeException(e); } CourseComponent courseComponent = (CourseComponent) CourseAPI.normalizeCourseStructure(model, courseId); List<CourseComponent> htmlBlockUnits = new ArrayList<>(); courseComponent.fetchAllLeafComponents(htmlBlockUnits, EnumSet.of(BlockType.HTML)); return (HtmlBlockModel) htmlBlockUnits.get(0); }
Source:
<code>static CacheEvictor create(AlluxioConfiguration conf) { return CommonUtils.createNewClassInstance( <START> conf.getClass(PropertyKey.USER_CLIENT_CACHE_EVICTOR_CLASS), new Class[0], new Object[0]); <END> }</code><technical_language>I want null instead of empty arrays</technical_language>

Target:
static CacheEvictor create(AlluxioConfiguration conf) { return CommonUtils.createNewClassInstance( conf.getClass(PropertyKey.USER_CLIENT_CACHE_EVICTOR_CLASS), null, null); }
Source:
<code>public void produceContent(ContentEncoder encoder, IOControl ioctrl) throws IOException { Objects.requireNonNull( encoder ); writer.out = encoder; writer.resumePendingWrites(); if ( writer.flowControlPushingBack ) { return; } while ( nextBodyToEncodeIndex < bodyParts.size() ) { JsonObject bodyPart = bodyParts.get( nextBodyToEncodeIndex++ ); gson.toJson( bodyPart, writer ); writer.insertNewline(); if ( writer.flowControlPushingBack ) { return; } } <START> encoder.complete(); <END> this.contentLength = writer.getTotalWrittenAndReset(); this.nextBodyToEncodeIndex = 0; }</code><technical_language>this implemented efficiently (memory-wise), especially if *client* is responsible of passing a buffered stream (if needed) if add a buffered wrapper ourselves. Of a blocking call, choice of caller, useful sometimes. In particular, mistaken, this method in AWS module generate a digest: client provide a DigestOutputStream similar DigestWriter below, this method wrap in OutputStreamWriter push JSON it. Note do it, I wanted check if this get rid of DigestSelfSigningCapable interface, if worth it</technical_language>

Target:
public void produceContent(ContentEncoder encoder, IOControl ioctrl) throws IOException { Objects.requireNonNull( encoder ); writer.out = encoder; writer.resumePendingWrites(); if ( writer.flowControlPushingBack ) { return; } triggerFullWrite(); if ( writer.flowControlPushingBack ) { return; } writer.flushToOutput(); if ( writer.flowControlPushingBack ) { return; } encoder.complete(); this.nextBodyToEncodeIndex = 0; }
Source:
<code>protected void executeCommand() { VDSStatus lastStatus = getVds().getStatus(); VDSReturnValue vdsReturnValue = null; try { setStatus(); if (StringUtils.isEmpty(getVds().getPmSecondaryIp())){ handleSingleAgent(lastStatus, vdsReturnValue); } else { if (getVds().isPmSecondaryConcurrent()){ handleMultipleConcurrentAgents(lastStatus, vdsReturnValue); } else { handleMultipleSequentialAgents(lastStatus, vdsReturnValue); } } setSucceeded(getFenceSucceeded()); } finally { if (!getSucceeded()) { setStatus(lastStatus); AlertIfPowerManagementOperationFailed(); } <START> else if (EnumSet.of(FenceActionType.Restart, FenceActionType.Stop).contains(getParameters().getAction()) <END> && getParameters().getKeepPolicyPMEnabled() == false){ getVds().setPowerManagementControlledByPolicy(false); DbFacade.getInstance().getVdsDynamicDao().update(getVds().getDynamicData()); } } }</code><technical_language>imo, simple == check is better, enumSet static</technical_language>

Target:
protected void executeCommand() { VDSStatus lastStatus = getVds().getStatus(); VDSReturnValue vdsReturnValue = null; try { setStatus(); if (StringUtils.isEmpty(getVds().getPmSecondaryIp())){ handleSingleAgent(lastStatus, vdsReturnValue); } else { if (getVds().isPmSecondaryConcurrent()){ handleMultipleConcurrentAgents(lastStatus, vdsReturnValue); } else { handleMultipleSequentialAgents(lastStatus, vdsReturnValue); } } setSucceeded(getFenceSucceeded()); } finally { if (!getSucceeded()) { setStatus(lastStatus); AlertIfPowerManagementOperationFailed(); } else if ((getParameters().getAction() == FenceActionType.Restart || getParameters().getAction() == FenceActionType.Stop) && getParameters().getKeepPolicyPMEnabled() == false){ getVds().setPowerManagementControlledByPolicy(false); getDbFacade().getVdsDynamicDao().updateVdsDynamicPowerManagementPolicyFlag( getVdsId(), getVds().getDynamicData().isPowerManagementControlledByPolicy()); } } }
Source:
<code>public String getSourceIP() { try { return InetAddress.getByAddress(getRawSourceIP()).getHostAddress(); <START> } catch (UnknownHostException e) { <END> return null; } }</code><technical_language>final</technical_language>

Target:
public String getSourceIP() { try { return InetAddress.getByAddress(getRawSourceIP()).getHostAddress(); } catch (final UnknownHostException e) { return null; } }
Source:
<code>private void refreshTopicMetadata() { <START> TopicMetadataRequest request = new TopicMetadataRequest(Collections.singletonList(kafkaRequest.getTopic())); <END> TopicMetadataResponse response = simpleConsumer.send(request); TopicMetadata metadata = response.topicsMetadata().get(0); for (PartitionMetadata partitionMetadata : metadata.partitionsMetadata()) { if (partitionMetadata.partitionId() == kafkaRequest.getPartition()) { simpleConsumer = new SimpleConsumer(partitionMetadata.leader().host(), partitionMetadata.leader().port(), CamusJob.getKafkaTimeoutValue(context), CamusJob.getKafkaBufferSize(context), CamusJob.getKafkaClientName(context)); break; } } }</code><technical_language>topic + partition</technical_language>

Target:
private void refreshTopicMetadata() { TopicMetadataRequest request = new TopicMetadataRequest(Collections.singletonList(kafkaRequest.getTopic())); TopicMetadataResponse response; try { response = simpleConsumer.send(request); } catch (Exception e) { log.error("Exception caught when refreshing metadata for topic " + request.topics().get(0) + ": " + e.getMessage()); return; } TopicMetadata metadata = response.topicsMetadata().get(0); for (PartitionMetadata partitionMetadata : metadata.partitionsMetadata()) { if (partitionMetadata.partitionId() == kafkaRequest.getPartition()) { simpleConsumer = new SimpleConsumer(partitionMetadata.leader().host(), partitionMetadata.leader().port(), CamusJob.getKafkaTimeoutValue(context), CamusJob.getKafkaBufferSize(context), CamusJob.getKafkaClientName(context)); break; } } }
Source:
<code>public void testHappyFlow() throws ProtocolAdapterException { BundleMessageDataContainerDto dto = new BundleMessageDataContainerDto(makeActions()); List<ActionResponseDto> result = callExecutors(dto); <START> Assert.assertTrue(result != null); <END> }</code><technical_language>I add check of list size: final List<ActionDto> actionDtoList = this.makeActions(); final BundleMessageDataContainerDto dto = new BundleMessageDataContainerDto(actionDtoList); final List<ActionResponseDto> result = this.callExecutors(dto); Assert.assertTrue(result != null); Assert.assertEquals(actionDtoList.size(), result.size());</technical_language>

Target:
public void testHappyFlow() throws ProtocolAdapterException { final List<ActionDto> actionDtoList = this.makeActions(); BundleMessageDataContainerDto dto = new BundleMessageDataContainerDto(actionDtoList); List<ActionResponseDto> result = callExecutors(dto); Assert.assertTrue(result != null); Assert.assertEquals(actionDtoList.size(), result.size()); }
Source:
<code>public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) { return false; } final GroupByConfig gbconfig = (GroupByConfig) o; final boolean result = Objects.equal(aggregator, gbconfig.getAggregator()) && Objects.equal(infectious_nan, gbconfig.getInfectiousNan()) && Objects.equal(merge_ids, gbconfig.getMergeIds()) && Objects.equal(full_merge, gbconfig.getFullMerge()); if (!result) { return false; } Set<String> otherTagkeys = gbconfig.getTagKeys(); if (!Objects.equal(tag_keys, otherTagkeys)) { return false; } <START> List<byte[]> otherEncodedkeys = gbconfig.getEncodedTagKeys(); <END> if (encoded_tag_keys != null && otherEncodedkeys == null || encoded_tag_keys == null && otherEncodedkeys != null) { return false; } if (encoded_tag_keys != null) { if (!Arrays.deepEquals(encoded_tag_keys.toArray(), otherEncodedkeys.toArray())) { return false; } } return true; }</code><technical_language>Skip encoded</technical_language>

Target:
public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) { return false; } final GroupByConfig gbconfig = (GroupByConfig) o; final boolean result = Objects.equal(aggregator, gbconfig.getAggregator()) && Objects.equal(infectious_nan, gbconfig.getInfectiousNan()) && Objects.equal(merge_ids, gbconfig.getMergeIds()) && Objects.equal(full_merge, gbconfig.getFullMerge()); if (!result) { return false; } Set<String> otherTagkeys = gbconfig.getTagKeys(); if (!Objects.equal(tag_keys, otherTagkeys)) { return false; } return true; }