auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public FloatColumnSelector makeFloatColumnSelector( final IncrementalIndexStorageAdapter.EntryHolder currEntry, final IncrementalIndex.DimensionDesc desc ) { final int dimIndex = desc.getIndex(); class IndexerFloatColumnSelector implements FloatColumnSelector { @Override public float get() { final Object[] dims = currEntry.getKey().getDims(); if (dimIndex >= dims.length) { return DimensionHandlerUtils.ZERO_FLOAT; } return (Float) dims[dimIndex]; } @Override public void inspectRuntimeShape(RuntimeShapeInspector inspector) { } } return new IndexerFloatColumnSelector(); }

Target:
public FloatColumnSelector makeFloatColumnSelector( final IncrementalIndexStorageAdapter.EntryHolder currEntry, final IncrementalIndex.DimensionDesc desc ) { final int dimIndex = desc.getIndex(); class IndexerFloatColumnSelector implements FloatColumnSelector { @Override public float get() { final Object[] dims = currEntry.getKey().getDims(); if (dimIndex >= dims.length) { return 0.0f; } return (Float) dims[dimIndex]; } @Override public void inspectRuntimeShape(RuntimeShapeInspector inspector) { } } return new IndexerFloatColumnSelector(); }
Source:
private void getTables() throws SQLException { Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery( "SELECT name, sql FROM sqlite_master " + " WHERE type= 'table' " + " ORDER BY name;"); while (resultSet.next()) { String tableName = resultSet.getString("name"); String tableSQL = resultSet.getString("sql"); dbTablesMap.put(tableName, tableSQL); } resultSet.close(); statement.close(); }

Target:
private void getTables() throws SQLException { Statement statement = null; ResultSet resultSet = null; try { statement = connection.createStatement(); resultSet = statement.executeQuery( "SELECT name, sql FROM sqlite_master " + " WHERE type= 'table' " + " ORDER BY name;"); while (resultSet.next()) { String tableName = resultSet.getString("name"); String tableSQL = resultSet.getString("sql"); dbTablesMap.put(tableName, tableSQL); } } catch(SQLException ex) { throw ex; } finally { if (null != resultSet) { resultSet.close(); } if (null != statement) { statement.close(); } } }
Source:
private ListenableFuture<?> updateDriverBlockedFuture(ListenableFuture<?> sourceBlockedFuture) { checkState(initialized.get(), "Driver is not initialized"); SettableFuture<?> newDriverBlockedFuture = SettableFuture.create(); driverBlockedFuture.set(newDriverBlockedFuture); sourceBlockedFuture.addListener(() -> newDriverBlockedFuture.set(null), newDirectExecutorService()); boolean memoryRevokingRequested = operators.stream() .map(Operator::getOperatorContext) .filter(OperatorContext::isMemoryRevokingRequested) .findAny() .isPresent(); if (memoryRevokingRequested) { newDriverBlockedFuture.set(null); } return newDriverBlockedFuture; }

Target:
private ListenableFuture<?> updateDriverBlockedFuture(ListenableFuture<?> sourceBlockedFuture) { checkState(initialized.get(), "Driver is not initialized"); SettableFuture<?> newDriverBlockedFuture = SettableFuture.create(); driverBlockedFuture.set(newDriverBlockedFuture); sourceBlockedFuture.addListener(() -> newDriverBlockedFuture.set(null), newDirectExecutorService()); boolean memoryRevokingRequested = operators.stream() .filter(operator -> !revokingOperators.containsKey(operator)) .map(Operator::getOperatorContext) .anyMatch(OperatorContext::isMemoryRevokingRequested); if (memoryRevokingRequested) { newDriverBlockedFuture.set(null); } return newDriverBlockedFuture; }
Source:
private void visitKey(Object key, WriteCommand command) { int segment = getSegment(key); if (getOwnership(segment) != Ownership.PRIMARY) { return; } IracMetadata metadata = iracVersionGenerator.generateNewMetadata(segment); if (log.isDebugEnabled()) { log.debugf("[IRAC] New metadata for key '%s' is %s", key, metadata); } IracUtils.updateCommandMetadata(key, command, metadata); if (trace) { log.tracef("[IRAC] Command: %s", command); } }

Target:
private void visitKey(Object key, WriteCommand command) { int segment = getSegment(command, key); if (getOwnership(segment) != Ownership.PRIMARY) { return; } IracMetadata metadata = iracVersionGenerator.generateNewMetadata(segment); updateCommandMetadata(key, command, metadata); if (trace) { log.tracef("[IRAC] New metadata for key '%s' is %s. Command=%s", key, metadata, command); } }
Source:
public MultiTenantRouter(MultiTenantRouterConfiguration routerConfiguration) { this.routerConfiguration = routerConfiguration; routerConfiguration.getHotRodRouterConfiguration().ifPresent(config -> routers.add(new HotRodRouter(config))); routerConfiguration.getRestRouterConfiguration().ifPresent(config -> routers.add(new RestRouter(config))); }

Target:
public MultiTenantRouter(MultiTenantRouterConfiguration routerConfiguration) { this.routerConfiguration = routerConfiguration; if(routerConfiguration.getHotRodRouterConfiguration() != null) { routers.add(new HotRodRouter(routerConfiguration.getHotRodRouterConfiguration())); } if(routerConfiguration.getRestRouterConfiguration() != null) { routers.add(new RestRouter(routerConfiguration.getRestRouterConfiguration())); } }
Source:
public void testVerifyHttpError() throws Exception { wrapper.setHttpClient(this.stubHttpClient(500, "<?xml version='1.0' encoding='UTF-8' ?>\n" + " <verify_response>\n" + " <request_id>not-really-a-request-id</request_id>\n" + " <status>0</status>\n" + " <error_text>error</error_text>\n" + " </verify_response>")); try { VerifyResult r = client.verify( "447700900999", "TestBrand", "15555215554", 6, Locale.US); fail(); } catch (IOException ioe) { } }

Target:
public void testVerifyHttpError() throws Exception { wrapper.setHttpClient(this.stubHttpClient(500, "<?xml version='1.0' encoding='UTF-8' ?>\n" + " <verify_response>\n" + " <request_id>not-really-a-request-id</request_id>\n" + " <status>0</status>\n" + " <error_text>error</error_text>\n" + " </verify_response>")); try { client.verify( "447700900999", "TestBrand", "15555215554", 6, Locale.US); fail("An IOException should be thrown if an HTTP 500 response is received."); } catch (IOException ioe) { } }
Source:
protected Date calculateInvoiceDueDate(ContractsGrantsInvoiceDocument document) { Calendar calendar = dateTimeService.getCurrentCalendar(); Optional<Integer> customerNetTerms = getCustomerNetTerms(document); int netTermsInDays; if (customerNetTerms.isPresent()) { netTermsInDays = customerNetTerms.get(); } else { String defaultNetTerms = parameterService.getParameterValueAsString( ArConstants.AR_NAMESPACE_CODE, ArConstants.CUSTOMER_COMPONENT, CuArParameterKeyConstants.CG_INVOICE_TERMS_DUE_DATE); try { netTermsInDays = Integer.parseInt(defaultNetTerms); } catch (NumberFormatException e) { LOG.error("calculateInvoiceDueDate, Default net terms parameter is malformed; will use zero as the default instead", e); netTermsInDays = 0; } } calendar.add(Calendar.DATE, netTermsInDays); return new Date(calendar.getTimeInMillis()); }

Target:
protected Date calculateInvoiceDueDate(ContractsGrantsInvoiceDocument document) { Calendar calendar = dateTimeService.getCurrentCalendar(); Optional<Integer> customerNetTerms = getCustomerNetTerms(document); int netTermsInDays; if (customerNetTerms.isPresent()) { netTermsInDays = customerNetTerms.get(); } else { String defaultNetTerms = parameterService.getParameterValueAsString( ArConstants.AR_NAMESPACE_CODE, ArConstants.CUSTOMER_COMPONENT, CuArParameterKeyConstants.CG_INVOICE_TERMS_DUE_DATE); if (StringUtils.isBlank(defaultNetTerms)) { throw new RuntimeException("Could not find a net terms value for parameter " + CuArParameterKeyConstants.CG_INVOICE_TERMS_DUE_DATE); } try { netTermsInDays = Integer.parseInt(defaultNetTerms); } catch (NumberFormatException e) { LOG.error("calculateInvoiceDueDate, Net terms parameter value is malformed", e); throw new RuntimeException("Net terms value is malformed for parameter " + CuArParameterKeyConstants.CG_INVOICE_TERMS_DUE_DATE); } } calendar.add(Calendar.DATE, netTermsInDays); return new Date(calendar.getTimeInMillis()); }
Source:
public void onCompletion(RecordMetadata md, Exception e) { if ( e != null ) { if ( e instanceof RecordTooLargeException ) { LOGGER.error("RecordTooLargeException @ " + position + " -- " + key); LOGGER.error(e.getLocalizedMessage()); LOGGER.error("Considering raising max.request.size broker-side."); if ( isTXCommit ) inflightMessages.completeMessage(position); } else { throw new RuntimeException(e); } } else { try { if ( LOGGER.isDebugEnabled()) { LOGGER.debug("-> key:" + key + ", partition:" +md.partition() + ", offset:" + md.offset()); LOGGER.debug(" " + this.json); LOGGER.debug(" " + position); LOGGER.debug(""); } if ( isTXCommit ) { BinlogPosition newPosition = inflightMessages.completeMessage(position); if ( newPosition != null ) context.setPosition(newPosition); } } catch (SQLException e1) { e1.printStackTrace(); } } }

Target:
public void onCompletion(RecordMetadata md, Exception e) { if ( e != null ) { if ( e instanceof RecordTooLargeException ) { LOGGER.error("RecordTooLargeException @ " + position + " -- " + key); LOGGER.error(e.getLocalizedMessage()); LOGGER.error("Considering raising max.request.size broker-side."); markCompleted(); } else { throw new RuntimeException(e); } } else { if ( LOGGER.isDebugEnabled()) { LOGGER.debug("-> key:" + key + ", partition:" +md.partition() + ", offset:" + md.offset()); LOGGER.debug(" " + this.json); LOGGER.debug(" " + position); LOGGER.debug(""); } markCompleted(); } }
Source:
public List<KeyValue> buildBatchFileLookupDirectories() { LOG.debug("Starting BatchFileDirectoryServiceImpl.buildStagingAndReportsDirectories()."); List<KeyValue> directoryKeyValueList = buildDirectoryKeyValuesList(BatchFileUtils.retrieveBatchFileLookupRootDirectories()); LOG.debug("Finished BatchFileDirectoryServiceImpl.buildStagingAndReportsDirectories()."); return directoryKeyValueList; }

Target:
public List<KeyValue> buildBatchFileLookupDirectories() { LOG.debug("Starting BatchFileDirectoryServiceImpl.buildBatchFileLookupDirectories()."); List<KeyValue> directoryKeyValueList = buildDirectoryKeyValuesList(BatchFileUtils.retrieveBatchFileLookupRootDirectories()); LOG.debug("Finished BatchFileDirectoryServiceImpl.buildBatchFileLookupDirectories()."); return directoryKeyValueList; }
Source:
public StreamProperties visitExchange(ExchangeNode node, List<StreamProperties> inputProperties) { if (node.getScope() == REMOTE) { if (node.getOrderingScheme().isPresent()) { return StreamProperties.ordered(); } return StreamProperties.fixedStreams(); } switch (node.getType()) { case GATHER: if (node.getOrderingScheme().isPresent()) { return StreamProperties.ordered(); } return StreamProperties.singleStream(); case REPARTITION: if (node.getPartitioningScheme().getPartitioning().getHandle().equals(FIXED_ARBITRARY_DISTRIBUTION)) { return new StreamProperties(FIXED, Optional.empty(), false); } return new StreamProperties( FIXED, Optional.of(node.getPartitioningScheme().getPartitioning().getArguments().stream() .map(ArgumentBinding::getColumn) .collect(toImmutableList())), false); case REPLICATE: return new StreamProperties(MULTIPLE, Optional.empty(), false); } throw new UnsupportedOperationException("not yet implemented"); }

Target:
public StreamProperties visitExchange(ExchangeNode node, List<StreamProperties> inputProperties) { if (node.getOrderingScheme().isPresent()) { return StreamProperties.ordered(); } if (node.getScope() == REMOTE) { return StreamProperties.fixedStreams(); } switch (node.getType()) { case GATHER: return StreamProperties.singleStream(); case REPARTITION: if (node.getPartitioningScheme().getPartitioning().getHandle().equals(FIXED_ARBITRARY_DISTRIBUTION)) { return new StreamProperties(FIXED, Optional.empty(), false); } return new StreamProperties( FIXED, Optional.of(node.getPartitioningScheme().getPartitioning().getArguments().stream() .map(ArgumentBinding::getColumn) .collect(toImmutableList())), false); case REPLICATE: return new StreamProperties(MULTIPLE, Optional.empty(), false); } throw new UnsupportedOperationException("not yet implemented"); }
Source:
public void testCopyVersionMismatch() throws Throwable { ChangeTracker tracker = newTracker( ChangeDetectionPolicy.Mode.Server, ChangeDetectionPolicy.Source.ETag, true, objectAttributes("etag", "versionId")); AmazonServiceException awsException = new AmazonServiceException("aws exception"); awsException.setStatusCode(412); expectChangeException(tracker, awsException, "copy", RemoteFileChangedException.PRECONDITIONS_NOT_MET); tracker.processException(new RuntimeException(), "copy"); }

Target:
public void testCopyVersionMismatch() throws Throwable { ChangeTracker tracker = newTracker( ChangeDetectionPolicy.Mode.Server, ChangeDetectionPolicy.Source.ETag, true, objectAttributes("etag", "versionId")); AmazonServiceException awsException = new AmazonServiceException("aws exception"); awsException.setStatusCode(HttpStatus.SC_PRECONDITION_FAILED); expectChangeException(tracker, awsException, "copy", RemoteFileChangedException.PRECONDITIONS_FAILED); tracker.processException(new RuntimeException(), "copy"); }
Source:
void testDelta(final String[] barcodeRead, final String[] barcodeQuality, final int expectedMismatches, final int expectedSecondMismatches) { Map<String, BarcodeMatch> barcodeMatches = new HashMap<>(); List<String[]> barcodes = Arrays.asList( new String[]{"CTGTGG", "GGCTAG"}, new String[]{"AGGTCG", "AATTGT"}, new String[]{"ACCAAC", "GTATTG"} ); Map<String, ExtractIlluminaBarcodes.BarcodeMetric> barcodeMetrics = barcodes.stream() .collect(Collectors.toMap( s -> s[0] + s[1], s -> new ExtractIlluminaBarcodes.BarcodeMetric(s[0] + s[1], "dummy", "more_dummy", s))); byte[][] reads = new byte[][]{ barcodeRead[0].getBytes(), barcodeRead[1].getBytes() }; byte[][] qualities = new byte[][]{ barcodeQuality[0].getBytes(), barcodeQuality[1].getBytes() }; BarcodeMatch match = ExtractIlluminaBarcodes.PerTileBarcodeExtractor.findBestBarcode(reads, qualities, barcodeMetrics, 2, 2, 2, 20, barcodeMatches, DistanceMetric.HAMMING); Assert.assertFalse(barcodeMatches.isEmpty()); final BarcodeMatch barcodeMatch = barcodeMatches.get(String.join("-",barcodeRead[0], barcodeRead[1])); Assert.assertNotNull(barcodeMatch); Assert.assertEquals(barcodeMatch.mismatches,expectedMismatches); Assert.assertEquals(barcodeMatch.mismatchesToSecondBest,expectedSecondMismatches); }

Target:
void testDelta(final String[] barcodeRead, final String[] barcodeQuality, final int expectedMismatches, final int expectedSecondMismatches) { final List<String[]> barcodes = Arrays.asList( new String[]{"CTGTGG", "GGCTAG"}, new String[]{"AGGTCG", "AATTGT"}, new String[]{"ACCAAC", "GTATTG"} ); final Map<String, ExtractIlluminaBarcodes.BarcodeMetric> barcodeMetrics = barcodes.stream() .collect(Collectors.toMap( s -> s[0] + s[1], s -> new ExtractIlluminaBarcodes.BarcodeMetric("dummy_name","dummy_library", s[0] + s[1], s))); final byte[][] reads = new byte[][]{barcodeRead[0].getBytes(), barcodeRead[1].getBytes()}; final byte[][] qualities = new byte[][]{barcodeQuality[0].getBytes(), barcodeQuality[1].getBytes()}; final BarcodeMatch match = ExtractIlluminaBarcodes.PerTileBarcodeExtractor.calculateBarcodeMatch(reads, qualities, barcodeMetrics, 2, 2, 2, 20, DistanceMetric.HAMMING); Assert.assertEquals(match.mismatches,expectedMismatches); Assert.assertEquals(match.mismatchesToSecondBest,expectedSecondMismatches); }
Source:
public InputStream lookupFile(String filename, ClassLoader cl) { InputStream is = filename == null || filename.length() == 0 ? null : getAsInputStreamFromClassLoader(filename, cl); if (is == null) { if (log.isDebugEnabled()) log.debugf("Unable to find file %s in classpath; searching for this file on the filesystem instead.", filename); try { is = new FileInputStream(filename); } catch (FileNotFoundException e) { return null; } } return is; }

Target:
public InputStream lookupFile(String filename, ClassLoader cl) { try { return lookupFileStrict( filename, cl ); } catch (FileNotFoundException e) { return null; } }
Source:
public static <T> List<T> readLocalAvroDataStore(String outputDirPath) throws IOException { Path outputPath = new Path(new File(outputDirPath).getAbsolutePath()); FileSystem fs = createLocalFileSystem(); List<T> people = DataStore.read(new FileSystemPath(fs, outputPath)); return people; }

Target:
public static <T> List<T> readLocalAvroDataStore(String outputDirPath) throws IOException { Path outputPath = new Path(new File(outputDirPath).getAbsolutePath()); FileSystem fs = createLocalFileSystem(); List<T> records = DataStore.read(new FileSystemPath(fs, outputPath)); return records; }
Source:
public void testUploadFindingsNegativeCase() throws Exception { String token = "db975c97-98b1-4988-8d6a-9c3e044dfff2"; String engagementId = ""; MockServerClient testClient = new MockServerClient("localhost", 1080); testClient.when( request() .withMethod("POST") .withHeader(HttpHeaders.AUTHORIZATION, "Token " + token) .withPath("/defectdojo/api/v2/import-scan/") ) .respond( response() .withStatusCode(400) .withHeader(HttpHeaders.CONTENT_TYPE, "application/json") ); DefectDojoUploader uploader = Mockito.mock( DefectDojoUploader.class, Mockito.CALLS_REAL_METHODS ); DefectDojoClient client = new DefectDojoClient(uploader, new URL("https://localhost/defectdojo")); client.uploadDependencyTrackFindings(token, engagementId, new NullInputStream(16)); testClient.verify( request() .withMethod("POST") .withHeader(HttpHeaders.AUTHORIZATION, "Token " + token) .withPath("/defectdojo/api/v2/import-scan/"), VerificationTimes.exactly(1) ); Mockito.verify(uploader, Mockito.times(1)).handleUnexpectedHttpResponse(Mockito.any(), Mockito.eq("https://localhost/defectdojo/api/v2/import-scan/"), Mockito.eq(400), Mockito.any()); testClient.clear( request() .withPath("/defectdojo/api/v2/import-scan/") ); }

Target:
public void testUploadFindingsNegativeCase() throws Exception { String token = "db975c97-98b1-4988-8d6a-9c3e044dfff2"; String engagementId = ""; testClient.when( request() .withMethod("POST") .withHeader(HttpHeaders.AUTHORIZATION, "Token " + token) .withPath("/defectdojo/api/v2/import-scan/") ) .respond( response() .withStatusCode(400) .withHeader(HttpHeaders.CONTENT_TYPE, "application/json") ); DefectDojoUploader uploader = new DefectDojoUploader(); DefectDojoClient client = new DefectDojoClient(uploader, new URL("https://localhost/defectdojo")); client.uploadDependencyTrackFindings(token, engagementId, new NullInputStream(16)); testClient.verify( request() .withMethod("POST") .withHeader(HttpHeaders.AUTHORIZATION, "Token " + token) .withPath("/defectdojo/api/v2/import-scan/"), VerificationTimes.exactly(1) ); }
Source:
public boolean isShowGiverNameToResponseGiver() { return showGiverNameTo.indexOf(FeedbackParticipantType.GIVER) != -1; }

Target:
public boolean isShowGiverNameToResponseGiver() { return showGiverNameTo.contains(FeedbackParticipantType.GIVER); }
Source:
public SolrQuery propertyIsNull(String propertyName) { SolrQuery query = new SolrQuery(); List<String> possibleFields = resolver.getAnonymousField(propertyName); StringBuilder solrQuery = new StringBuilder(); for (String possibleField : possibleFields) { String cleanedField = possibleField.substring(0, possibleField.length()); if (solrQuery.length() == 0){ solrQuery.append(" (*:* -" + cleanedField + ":[* TO *]) "); } else { solrQuery.append(" OR (*:* -" + cleanedField + ":[* TO *]) "); } } query.setQuery(solrQuery.toString()); return query; }

Target:
public SolrQuery propertyIsNull(String propertyName) { List<String> possibleFields = resolver.getAnonymousField(propertyName); if(possibleFields.isEmpty()){ throw new UnsupportedOperationException("Anonymous Field Property does not exist. " + propertyName); } List<String> solrExpressions = new ArrayList<>(); for (String possibleField : possibleFields) { solrExpressions.add(" (*:* -" + possibleField + ":[* TO *]) "); } String fullExpression = StringUtils.join(solrExpressions, " "); return new SolrQuery(fullExpression); }
Source:
public void deleteNodeTestOK() throws NodeExecutionException, CanNotCallChefException, EntityNotFoundException, ClientProtocolException, IOException, KeyManagementException, NoSuchAlgorithmException { when(chefNodeDao.loadNode("testOk", "token")).thenReturn(new ChefNode()); List<ProductInstance> productInstances = new ArrayList<ProductInstance>(); productInstances.add(new ProductInstance()); when(productInstanceDao.findByHostname(anyString())).thenReturn(productInstances); when(httpsClient.doHttpsDelete(Mockito.anyString(), Mockito.anyString(), (Map<String,String>)Mockito.anyObject())).thenReturn(200); when(propertiesProvider.getProperty(anyString())).thenReturn("URL"); nodeManager.nodeDelete("test", "testOk", "token"); verify(httpsClient,times(1)).doHttpsDelete(Mockito.anyString(), Mockito.anyString(), (Map<String,String>)Mockito.anyObject()); }

Target:
public void deleteNodeTestOK() throws NodeExecutionException, CanNotCallChefException, EntityNotFoundException, ClientProtocolException, IOException, KeyManagementException, NoSuchAlgorithmException { when(chefNodeDao.loadNode("testOk", "token")).thenReturn(new ChefNode()); List<ProductInstance> productInstances = new ArrayList<ProductInstance>(); productInstances.add(new ProductInstance()); when(productInstanceDao.findByHostname(anyString())).thenReturn(productInstances); when( httpsClient.doHttps(Mockito.anyString(),Mockito.anyString(), Mockito.anyString(), (Map<String, String>) Mockito.anyObject())).thenReturn(200); when(propertiesProvider.getProperty(anyString())).thenReturn("URL"); nodeManager.nodeDelete("test", "testOk", "token"); verify(httpsClient, times(1)).doHttps(Mockito.anyString(),Mockito.anyString(), Mockito.anyString(), (Map<String, String>) Mockito.anyObject()); }
Source:
public Set<String> getTrashRemovedResources() { if (this._trashRemovedResources == null) { try { this.loadTrashResources(); } catch (Exception e) { logger.error("Error loading trashed resources " + this.getVersionId(), e); throw new RuntimeException("Errore in recupero id risorse rimosse dal cestino (non più ripristinabili) per la versione contenuto corrente " + getVersionId(), e); } } return this._trashRemovedResources; }

Target:
public Set<String> getTrashRemovedResources() { if (this._trashRemovedResources == null) { try { this.loadTrashResources(); } catch (Exception e) { logger.error("Error loading trashed resources for content with version " + this.getVersionId(), e); throw new RuntimeException("Error loading trashed resources for content with version " + getVersionId(), e); } } return this._trashRemovedResources; }
Source:
public QueryRunner<Result<TopNResultValue>> preMergeQueryDecoration(final QueryRunner<Result<TopNResultValue>> runner) { return intervalChunkingQueryRunnerDecorator.decorate( new QueryRunner<Result<TopNResultValue>>() { @Override public Sequence<Result<TopNResultValue>> run( Query<Result<TopNResultValue>> query, Map<String, Object> responseContext ) { if (!(query instanceof TopNQuery)) { return runner.run(query, responseContext); } else { final TopNQuery topNQuery = (TopNQuery) query; if (TopNQueryEngine.useOptimized(topNQuery)) { final DimensionSpec dimensionSpec = topNQuery.getDimensionSpec(); return runner.run( new TopNQuery( topNQuery.getDataSource(), new DefaultDimensionSpec(dimensionSpec.getDimension(), dimensionSpec.getOutputName()), topNQuery.getTopNMetricSpec(), topNQuery.getThreshold(), topNQuery.getQuerySegmentSpec(), topNQuery.getDimensionsFilter(), topNQuery.getGranularity(), topNQuery.getAggregatorSpecs(), topNQuery.getPostAggregatorSpecs(), topNQuery.getContext() ) , responseContext ); } else { return runner.run(query, responseContext); } } } } , this ); }

Target:
public QueryRunner<Result<TopNResultValue>> preMergeQueryDecoration(final QueryRunner<Result<TopNResultValue>> runner) { return intervalChunkingQueryRunnerDecorator.decorate( new QueryRunner<Result<TopNResultValue>>() { @Override public Sequence<Result<TopNResultValue>> run( Query<Result<TopNResultValue>> query, Map<String, Object> responseContext ) { if (!(query instanceof TopNQuery)) { return runner.run(query, responseContext); } else { final TopNQuery topNQuery = (TopNQuery) query; if (TopNQueryEngine.canApplyExtractionInPost(topNQuery)) { final DimensionSpec dimensionSpec = topNQuery.getDimensionSpec(); return runner.run( topNQuery.withDimensionSpec( new DefaultDimensionSpec( dimensionSpec.getDimension(), dimensionSpec.getOutputName() ) ), responseContext ); } else { return runner.run(query, responseContext); } } } } , this ); }
Source:
private RemoteConfig selectDefaultRemoteConfig() { for (final RemoteConfig rc : configuredRemotes) if (getTextForRemoteConfig(rc) == Constants.DEFAULT_REMOTE_NAME) return rc; return configuredRemotes.get(0); }

Target:
private RemoteConfig selectDefaultRemoteConfig() { for (final RemoteConfig rc : configuredRemotes) if (Constants.DEFAULT_REMOTE_NAME.equals(getTextForRemoteConfig(rc))) return rc; return configuredRemotes.get(0); }
Source:
private Object invokeMethod(Object interceptor, Method stepMethod, Object... params) { try { Object returnObject = new Mirror().on(interceptor).invoke().method(stepMethod).withArgs(params); return returnObject; } catch (MirrorException e) { if(e.getCause() != null && e.getCause() instanceof ControllerInvocationException) { throw (ControllerInvocationException) e.getCause(); } throw new InterceptionException(e.getCause()); } }

Target:
private Object invokeMethod(Object interceptor, Method stepMethod, Object... params) { try { Object returnObject = new Mirror().on(interceptor).invoke().method(stepMethod).withArgs(params); return returnObject; } catch (MirrorException e) { Throwables.propagateIfInstanceOf(e.getCause(), ControllerInvocationException.class); throw new InterceptionException(e.getCause()); } }
Source:
@Override public String getBroadcastAddress() { String sensorName = getConfig(BROADCAST_ADDRESS_SENSOR); if (Strings.isNonBlank(sensorName)) return Entities.submit(this, DependentConfiguration.attributeWhenReady(this, Sensors.newStringSensor(sensorName))).getUnchecked(); String snitchName = getConfig(CassandraNode.ENDPOINT_SNITCH_NAME); if (snitchName.equals("Ec2MultiRegionSnitch") || snitchName.contains("MultiCloudSnitch")) { return getAttribute(CassandraNode.ADDRESS); } else if (!getDriver().isClustered()) { return getListenAddress(); } else { String hostname = getAttribute(CassandraNode.HOSTNAME); try { String resolvedAddress = getDriver().getResolvedAddress(hostname); if (resolvedAddress==null) { log.debug("Cassandra using broadcast address "+getListenAddress()+" for "+this+" because hostname "+hostname+" could not be resolved at remote machine"); return getListenAddress(); } if (resolvedAddress.equals("127.0.0.1")) { log.debug("Cassandra using broadcast address "+getListenAddress()+" for "+this+" because hostname "+hostname+" resolves to 127.0.0.1"); return getListenAddress(); } return hostname; } catch (Exception e) { log.warn("Error resolving hostname "+hostname+" for "+this+": "+e, e); return hostname; } } }

Target:
@Override public String getBroadcastAddress() { String sensorName = getConfig(BROADCAST_ADDRESS_SENSOR); if (Strings.isNonBlank(sensorName)) return Entities.submit(this, DependentConfiguration.attributeWhenReady(this, Sensors.newStringSensor(sensorName))).getUnchecked(); String snitchName = getConfig(CassandraNode.ENDPOINT_SNITCH_NAME); if (snitchName.equals("Ec2MultiRegionSnitch") || snitchName.contains("MultiCloudSnitch")) { return getAttribute(CassandraNode.ADDRESS); } else if (!getDriver().isClustered()) { return getListenAddress(); } else { String hostname = getAttribute(CassandraNode.HOSTNAME); try { String resolvedAddress = getDriver().getResolvedAddress(hostname); if (resolvedAddress==null) { log.debug("Cassandra using broadcast address "+getListenAddress()+" for "+this+" because hostname "+hostname+" could not be resolved at remote machine"); return getListenAddress(); } if (resolvedAddress.equals("127.0.0.1")) { log.debug("Cassandra using broadcast address "+getListenAddress()+" for "+this+" because hostname "+hostname+" resolves to 127.0.0.1"); return getListenAddress(); } return hostname; } catch (Exception e) { Exceptions.propagateIfFatal(e); log.warn("Error resolving hostname "+hostname+" for "+this+": "+e, e); return hostname; } } }
Source:
public void checkAndSendAsync(boolean withAttachment) { this.asyncMailSender.submit(() -> { try { boolean sent = doCheckAndSend(withAttachment); if (sent) { jlogger.info(jobState.getId(), "sent notification email for finished job to " + getTo()); } } catch (JobEmailNotificationException e) { jlogger.warn(jobState.getId(), "failed to send email notification to " + e.getEmailTarget() + ": " + e.getMessage()); logger.trace("Stack trace:", e); } catch (Exception e) { logger.trace("Stack trace:", e); } }); }

Target:
public void checkAndSendAsync(boolean withAttachment) { this.asyncMailSender.submit(() -> { try { boolean sent = doCheckAndSend(withAttachment); if (sent) { jlogger.info(jobState.getId(), "sent notification email for finished job to " + getTo()); } } catch (JobEmailNotificationException e) { jlogger.warn(jobState.getId(), "failed to send email notification to " + e.getEmailTarget() + ": " + e.getMessage()); logger.trace("Stack trace:", e); } catch (Exception e) { jlogger.warn(jobState.getId(), "failed to send email notification: " + e.getMessage()); logger.trace("Stack trace:", e); } }); }
Source:
public static < T extends RealType< T > > IntervalView< T > expandValue( final RandomAccessibleInterval< T > source, final T t, final long... border ) { return expandValue( ( RandomAccessibleInterval ) source, ( Object ) t, border ); }

Target:
public static < T > IntervalView< T > expandValue( final RandomAccessibleInterval< T > source, final T t, final long... border ) { return interval( extendValue( source, t ), Intervals.expand( source, border ) ); }
Source:
public ItemInteractionHandler getItemHandler() { return (e, p, item) -> { if (isItem(item)) { if(e.getClickedBlock() != null) { String target = BlockStorage.checkID(e.getClickedBlock()); if ("ANCIENT_PEDESTAL".equals(target) || "ANCIENT_ALTAR".equals(target)) return false; } if (p.getGameMode() != GameMode.CREATIVE) ItemUtils.consumeItem(item, false); p.getWorld().playSound(p.getLocation(), Sound.ENTITY_GENERIC_EAT, 1, 1); p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 600, 3)); return true; } else return false; }; }

Target:
public ItemInteractionHandler getItemHandler() { return (e, p, item) -> { if (isItem(item)) { if (e.getClickedBlock() != null) if (e.getClickedBlock().getType() == Material.DISPENSER || e.getClickedBlock().getType() == Material.ENCHANTING_TABLE) return true; if (p.getGameMode() != GameMode.CREATIVE) ItemUtils.consumeItem(item, false); p.getWorld().playSound(p.getLocation(), Sound.ENTITY_GENERIC_EAT, 1, 1); p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 600, 3)); return true; } else return false; }; }
Source:
public void registerAt(Class<? extends Filter> filter, Class<? extends Filter> atFilter) { Integer position = getOrder(atFilter); if (position == null) { throw new IllegalArgumentException( "Cannot register after unregistered Filter " + atFilter); } put(filter, position + 1); }

Target:
public void registerAt(Class<? extends Filter> filter, Class<? extends Filter> atFilter) { Integer position = getOrder(atFilter); if (position == null) { throw new IllegalArgumentException( "Cannot register after unregistered Filter " + atFilter); } put(filter, position); }
Source:
public NodeSet select(int number, List<Node> matchedNodes) { if (number <= 0 || matchedNodes.size() == 0) { return new NodeSet(); } HashMap<Integer, List<InetAddress>> hostsMap = new HashMap<>(); for (InetAddress host : nodesOnHost.keySet()) { boolean busyNode = false; for (Node nodeOnHost : nodesOnHost.get(host)) { if (!matchedNodes.contains(nodeOnHost)) { busyNode = true; break; } } if (!busyNode) { int nodesNumber = nodesOnHost.get(host).size(); if (!hostsMap.containsKey(nodesNumber)) { hostsMap.put(nodesNumber, new LinkedList<InetAddress>()); } hostsMap.get(nodesNumber).add(host); } } if (hostsMap.size() == 0) { return new NodeSet(); } List<Integer> sortedCapacities = new LinkedList<>(hostsMap.keySet()); Collections.sort(sortedCapacities); NodeSet result = new NodeSet(); for (Integer i : sortedCapacities) { for (InetAddress host : hostsMap.get(i)) { Set<Node> hostNodes = nodesOnHost.get(host); int sz = hostNodes.size(); if (sz > 0) { result.add(hostNodes.iterator().next()); if (sz > 1) { List<Node> newExtraNodes = new LinkedList<>(subListLHS(hostNodes, 1, sz)); if (result.getExtraNodes() == null) { result.setExtraNodes(new LinkedList<Node>()); } result.getExtraNodes().addAll(newExtraNodes); } if (--number <= 0) { return result; } } } } return result; }

Target:
public NodeSet select(int number, List<Node> matchedNodes) { if (number <= 0 || matchedNodes.size() == 0) { return new NodeSet(); } HashMap<Integer, List<InetAddress>> hostsMap = new HashMap<>(); for (InetAddress host : nodesOnHost.keySet()) { boolean busyNode = false; for (Node nodeOnHost : nodesOnHost.get(host)) { if (!matchedNodes.contains(nodeOnHost)) { busyNode = true; break; } } if (!busyNode) { int nodesNumber = nodesOnHost.get(host).size(); if (!hostsMap.containsKey(nodesNumber)) { hostsMap.put(nodesNumber, new LinkedList<InetAddress>()); } hostsMap.get(nodesNumber).add(host); } } if (hostsMap.size() == 0) { return new NodeSet(); } List<Integer> sortedCapacities = new LinkedList<>(hostsMap.keySet()); Collections.sort(sortedCapacities); NodeSet result = new NodeSet(); for (Integer i : sortedCapacities) { for (InetAddress host : hostsMap.get(i)) { Set<Node> hostNodes = nodesOnHost.get(host); int nbNodes = hostNodes.size(); if (nbNodes > 0) { result.add(hostNodes.iterator().next()); if (nbNodes > 1) { List<Node> newExtraNodes = new LinkedList<>(subListLHS(hostNodes, 1, nbNodes)); if (result.getExtraNodes() == null) { result.setExtraNodes(new LinkedList<Node>()); } result.getExtraNodes().addAll(newExtraNodes); } if (--number <= 0) { return result; } } } } return result; }
Source:
public void HiViBTFShouldRequestForMEGAAdUnitVAST() throws UnsupportedEncodingException { final String adUnit = "/5441/wka1a.VIDEO/uap_bfaa/desktop/oasis-article/_project43-life"; checkRequestForAdUnit(AdsDataProvider.UAP_HIVI_PAGE, adUnit); }

Target:
public void HiViBTFShouldRequestForMEGAAdUnitVAST() throws UnsupportedEncodingException { final String adUnit = "/5441/wka1a.VIDEO/uap_bfab/desktop/oasis-article/_project43-life"; checkRequestForAdUnit(AdsDataProvider.UAP_HIVI_PAGE, adUnit, new String[]{AdsContent.BOTTOM_LB}); }
Source:
public boolean isValid(CruiseConfig preprocessedConfig) { boolean isValid = validateRemovePipelines(preprocessedConfig); isValid = isValid && validateRemoveAgents(preprocessedConfig); isValid = isValid && validateRemoveEnvironmentVariables(preprocessedConfig); return isValid && super.isValid(preprocessedConfig); }

Target:
public boolean isValid(CruiseConfig preprocessedConfig) { EnvironmentConfig preprocessedEnvironmentConfig = preprocessedConfig.getEnvironments().find(environmentConfig.name()); boolean isValid = validateRemovalOfInvalidEntities(); if (preprocessedEnvironmentConfig instanceof MergeEnvironmentConfig) { isValid = validateRemovalOfRemoteEntities(preprocessedEnvironmentConfig); } return isValid && super.isValid(preprocessedConfig); }
Source:
public void editBuffersPerSliceInvalid() throws Exception { final int value = -1; ModelNodeResult modelNodeResult = operations.readAttribute(BUFFER_POOL_ADDRESS, BUFFERS_PER_SLICE); modelNodeResult.assertSuccess(); try { new ConfigChecker.Builder(client, BUFFER_POOL_ADDRESS) .configFragment(page.getConfigFragment()) .editAndSave(ConfigChecker.InputType.TEXT, BUFFERS_PER_SLICE, String.valueOf(value)) .verifyFormNotSaved(); } finally { operations.writeAttribute(BUFFER_POOL_ADDRESS, BUFFERS_PER_SLICE, modelNodeResult.value()); } }

Target:
public void editBuffersPerSliceInvalid() throws Exception { final int value = -1; final ModelNodeResult originalNodeResult = operations.readAttribute(BUFFER_POOL_ADDRESS, BUFFERS_PER_SLICE); originalNodeResult.assertSuccess(); try { new ConfigChecker.Builder(client, BUFFER_POOL_ADDRESS) .configFragment(page.getConfigFragment()) .editAndSave(ConfigChecker.InputType.TEXT, BUFFERS_PER_SLICE, String.valueOf(value)) .verifyFormNotSaved(); } finally { operations.writeAttribute(BUFFER_POOL_ADDRESS, BUFFERS_PER_SLICE, originalNodeResult.value()); } }
Source:
public KafkaMessageDrivenChannelAdapter kafkaMessageDrivenChannelAdapter() throws IllegalAccessException, InstantiationException, ClassNotFoundException { final KafkaMessageDrivenChannelAdapter kafkaMessageDrivenChannelAdapter = new KafkaMessageDrivenChannelAdapter(container()); kafkaMessageDrivenChannelAdapter.setKeyDecoder(getKeyDecoder()); kafkaMessageDrivenChannelAdapter.setPayloadDecoder(getPayloadDecoder()); kafkaMessageDrivenChannelAdapter.setOutputChannel(source.output()); return kafkaMessageDrivenChannelAdapter; }

Target:
public KafkaMessageDrivenChannelAdapter kafkaMessageDrivenChannelAdapter() throws IllegalAccessException, InstantiationException { final KafkaMessageDrivenChannelAdapter kafkaMessageDrivenChannelAdapter = new KafkaMessageDrivenChannelAdapter(container()); kafkaMessageDrivenChannelAdapter.setKeyDecoder(getKeyDecoder()); kafkaMessageDrivenChannelAdapter.setPayloadDecoder(getPayloadDecoder()); kafkaMessageDrivenChannelAdapter.setOutputChannel(source.output()); return kafkaMessageDrivenChannelAdapter; }
Source:
private void updateClanMenu(Player player) { clanService.getClanByTag(player.getClan()) .thenAccept(optionalClan -> JavaFxUtil.runLater(() -> updateClanMenu(optionalClan))) .exceptionally(throwable -> { log.error("Clan was not updated", throwable); return null; }); }

Target:
private void updateClanMenu(Player player) { clanService.getClanByTag(player.getClan()) .thenAccept(optionalClan -> JavaFxUtil.runLater(() -> updateClanMenu(optionalClan))) .exceptionally(throwable -> { log.warn("Clan was not updated", throwable); return null; }); }
Source:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || !(obj instanceof QueryState)) { return false; } QueryState other = (QueryState) obj; if (metaDataOperation != other.metaDataOperation) { return false; } if (!Arrays.equals(operationArgs, other.operationArgs)) { return false; } if (sql == null) { if (other.sql != null) { return false; } } else if (!sql.equals(other.sql)) { return false; } return true; }

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof QueryState)) { return false; } QueryState other = (QueryState) obj; if (metaDataOperation != other.metaDataOperation) { return false; } if (!Arrays.deepEquals(operationArgs, other.operationArgs)) { return false; } if (sql == null) { if (other.sql != null) { return false; } } else if (!sql.equals(other.sql)) { return false; } return true; }
Source:
public static byte evalCRC(byte[] data, int length) { int crc = 0; int i, j; for (j = 0; j < length; j++) { crc ^= (data[j] << 8); for (i = 0; i < 8; i++) { if ((crc & 0x8000) != 0) { crc ^= (0x1070 << 3); } crc <<= 1; } } byte result = (byte) (crc >> 8); if (logger.isTraceEnabled()) { logger.trace("Counting CRC8 of: " + arrayToString(data, length)); logger.trace("CRC8 result: 0x" + Integer.toHexString(result & 0xFF).toUpperCase()); } return result; }

Target:
public static byte evalCRC(byte[] data, int length) { int crc = 0; int i, j; for (j = 0; j < length; j++) { crc ^= (data[j] << 8); for (i = 0; i < 8; i++) { if ((crc & 0x8000) != 0) { crc ^= (0x1070 << 3); } crc <<= 1; } } byte result = (byte) (crc >> 8); if (logger.isTraceEnabled()) { logger.trace("Counting CRC8 of: {}", arrayToString(data, length)); logger.trace("CRC8 result: 0x{}", Integer.toHexString(result & 0xFF).toUpperCase()); } return result; }
Source:
static void writeToFileInDirectory(String data, String directory, String filename) { File file = new File(directory, filename); FileOutputStream outputStream = null; try { file.createNewFile(); outputStream = new FileOutputStream(file, true); outputStream.write(data.getBytes()); outputStream.flush(); outputStream.close(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (outputStream != null) { outputStream.flush(); outputStream.close(); } } catch (IOException e) { Log.e("Exception", "File write failed: " + e.toString()); } } }

Target:
static void writeToFileInDirectory(String data, String directory, String filename) { File file = new File(directory, filename); FileOutputStream outputStream = null; try { file.createNewFile(); outputStream = new FileOutputStream(file); outputStream.write(data.getBytes()); outputStream.flush(); outputStream.close(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (outputStream != null) { outputStream.flush(); outputStream.close(); } } catch (IOException e) { Log.e("Exception", "File write failed: " + e.toString()); } } }
Source:
public void testWritingEmptySymbol() throws Exception { iw = makeWriter(); iw.writeSymbol("a"); IonReader in = reread(); in.next(); IonAssert.checkSymbol("a", in); }

Target:
public void testWritingEmptySymbol() throws Exception { iw = makeWriter(); iw.writeSymbol(""); IonReader in = reread(); in.next(); IonAssert.checkSymbol("", in); }
Source:
void fillChunks() { try { PutChunk chunkToFill; if (!chunkFillingCompleted && !operationCompleted) { do { if (channelReadBuffer == null) { channelReadBuffer = chunkFillerChannel.getNextChunk(0); } if (channelReadBuffer != null) { chunkToFill = getChunkToFill(); if (chunkToFill == null) { maybeStartTrackingWaitTime(); break; } else { maybeUpdateTrackedWaitTime(); bytesFilledSoFar += chunkToFill.fillFrom(channelReadBuffer); if (chunkToFill.isReady()) { routerMetrics.waitTimeForFreeChunkAvailabilityMs.update(waitTimeForNextChunkAvailabilityMs); resetWaitTimeTracking(); } if (!channelReadBuffer.hasRemaining()) { chunkFillerChannel.resolveOldestChunk(null); channelReadBuffer = null; } } } else { break; } } while (bytesFilledSoFar < blobSize); if (bytesFilledSoFar == blobSize) { chunkFillingCompleted = true; } } } catch (Exception e) { setOperationExceptionAndComplete(new RouterException("PutOperation fillChunks encountered unexpected error", e, RouterErrorCode.UnexpectedInternalError)); } }

Target:
void fillChunks() { try { PutChunk chunkToFill; if (!chunkFillingCompleted && !operationCompleted) { do { if (channelReadBuffer == null) { channelReadBuffer = chunkFillerChannel.getNextChunk(0); } if (channelReadBuffer != null) { maybeStopTrackingWaitForChannelDataTime(); chunkToFill = getChunkToFill(); if (chunkToFill == null) { maybeStartTrackingWaitForChunkTime(); break; } else { maybeStopTrackingWaitForChunkTime(); bytesFilledSoFar += chunkToFill.fillFrom(channelReadBuffer); if (chunkToFill.isReady()) { updateChunkFillerWaitTimeMetrics(); } if (!channelReadBuffer.hasRemaining()) { chunkFillerChannel.resolveOldestChunk(null); channelReadBuffer = null; } } } else { if (getFreeChunk() != null) { maybeStartTrackingWaitForChannelDataTime(); } break; } } while (bytesFilledSoFar < blobSize); if (bytesFilledSoFar == blobSize) { chunkFillingCompleted = true; } } } catch (Exception e) { setOperationExceptionAndComplete(new RouterException("PutOperation fillChunks encountered unexpected error", e, RouterErrorCode.UnexpectedInternalError)); } }
Source:
public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); Dimension currentSize = getSize(); if (myGraphicsLayoutRenderer != null && !currentSize.equals(myLastSize)) { myGraphicsLayoutRenderer.setSize(currentSize); myLastSize = currentSize; } }

Target:
public void setBounds(int x, int y, int width, int height) { Dimension previousSize = getSize(); super.setBounds(x, y, width, height); Dimension currentSize = getSize(); if (myGraphicsLayoutRenderer != null && !currentSize.equals(previousSize)) { myGraphicsLayoutRenderer.setSize(currentSize); } }
Source:
public boolean shouldAudit(StructuredEvent structuredEvent) { OperationDetails operation = structuredEvent.getOperation(); FlowResourceAuditEventConverter flowResourceAuditEventConverter = getConverter(operation.getResourceType()); if (flowResourceAuditEventConverter == null) { return false; } boolean crn = Crn.isCrn(operation.getResourceCrn()); return flowResourceAuditEventConverter.shouldAudit((StructuredFlowEvent) structuredEvent) && crn; }

Target:
public boolean shouldAudit(StructuredEvent structuredEvent) { OperationDetails operation = structuredEvent.getOperation(); FlowResourceAuditEventConverter flowResourceAuditEventConverter = getConverter(operation.getResourceType()); if (flowResourceAuditEventConverter == null) { return false; } boolean crn = Crn.isCrn(operation.getResourceCrn()); return crn && flowResourceAuditEventConverter.shouldAudit((StructuredFlowEvent) structuredEvent); }
Source:
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("DataTableName: ").append(dataTableName).append(","); sb.append("IndexTableName: ").append(indexTableName).append(","); sb.append("ScanMaxTimestamp: ").append(scanMaxTimestamp).append(","); sb.append("DataTableRowKey: ").append(Bytes.toString(dataTableRowKey)).append(","); sb.append("IndexTableRowKey: ").append(Bytes.toString(indexTableRowKey)).append(","); sb.append("DataTableRowTimestamp: ").append(dataTableRowTimestamp).append(","); sb.append("IndexTableRowTimestamp: ").append(indexTableRowTimestamp).append(","); sb.append("ErrorMessage: ").append(errorMessage).append(","); sb.append("ExpectedValue: ").append(Bytes.toString(expectedValue)).append(","); sb.append("ActualValue: ").append(Bytes.toString(actualValue)).append(","); sb.append("PhaseValue: ").append(Bytes.toString(phaseValue)); return sb.toString(); }

Target:
public String toString() { StringBuilder sb = new StringBuilder(); sb.append(IndexVerificationOutputRepository.DATA_TABLE_NAME + ": ").append(dataTableName).append(","); sb.append(IndexVerificationOutputRepository.INDEX_TABLE_NAME + ": ").append(indexTableName).append(","); sb.append(SCAN_MAX_TIMESTAMP).append(": ").append(scanMaxTimestamp).append(","); sb.append(IndexVerificationOutputRepository.DATA_TABLE_ROW_KEY + ": ").append(Bytes.toString(dataTableRowKey)).append(","); sb.append(IndexVerificationOutputRepository.INDEX_TABLE_ROW_KEY + ": ").append(Bytes.toString(indexTableRowKey)).append(","); sb.append(IndexVerificationOutputRepository.DATA_TABLE_TS + ": ").append(dataTableRowTimestamp).append(","); sb.append(IndexVerificationOutputRepository.INDEX_TABLE_TS + ": ").append(indexTableRowTimestamp).append(","); sb.append(IndexVerificationOutputRepository.ERROR_MESSAGE + ": ").append(errorMessage).append(","); sb.append(IndexVerificationOutputRepository.EXPECTED_VALUE + ": ").append(Bytes.toString(expectedValue)).append(","); sb.append(IndexVerificationOutputRepository.ACTUAL_VALUE + ": ").append(Bytes.toString(actualValue)).append( ","); sb.append(IndexVerificationOutputRepository.VERIFICATION_PHASE + ": ").append(Bytes.toString(phaseValue)); return sb.toString(); }
Source:
public Map<String, ShardingKeyTrieNode> getChildren() { return Collections.unmodifiableMap(_children); }

Target:
public Map<String, ShardingKeyTrieNode> getChildren() { return _children; }
Source:
private void reconnectExceptionally(final String message) throws DatabaseEngineException { try { getConnection(); } catch (final Exception e) { throw new DatabaseEngineException(message, e); } }

Target:
protected void reconnectExceptionally(final String message) throws DatabaseEngineException { try { getConnection(); } catch (final Exception e) { throw new DatabaseEngineException(message, e); } }