auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
static PipelineObject getEMRCluster(Region region) { String name = "EmrClusterForBackup"; String id = "EmrClusterForBackup"; return new PipelineObject().withName(name).withId(id).withFields( new Field().withKey("type").withStringValue("EmrCluster"), new Field().withKey("amiVersion").withStringValue("3.8.0"), new Field().withKey("masterInstanceType").withStringValue("m3.xlarge"), new Field().withKey("coreInstanceType").withStringValue("m3.xlarge"), new Field().withKey("coreInstanceCount").withStringValue("1"), new Field().withKey("region").withStringValue(region.getName()), new Field().withKey("terminateAfter").withStringValue("12 hours"), new Field().withKey("role").withStringValue("DataPipelineDefaultRole"), new Field().withKey("bootstrapAction").withStringValue("s3://elasticmapreduce" + "/bootstrap-actions/configure-hadoop, --yarn-key-value,yarn.nodemanager.resource" + ".memory-mb=11520," + "--yarn-key-value,yarn.scheduler.maximum-allocation-mb=11520," + "--yarn-key-value,yarn.scheduler.minimum-allocation-mb=1440," + "--yarn-key-value,yarn.app.mapreduce.am.resource.mb=2880," + "--mapred-key-value,mapreduce.map.memory.mb=5760," + "--mapred-key-value,mapreduce.map.java.opts=-Xmx4608M," + "--mapred-key-value,mapreduce.reduce.memory.mb=2880," + "--mapred-key-value,mapreduce.reduce.java.opts=-Xmx2304m," + "--mapred-key-value,mapreduce.map.speculative=false") ); }

Target:
static PipelineObject getEMRCluster(Region region) { String name = "EmrClusterForBackup"; String id = "EmrClusterForBackup"; return new PipelineObject().withName(name).withId(id).withFields( new Field().withKey("type").withStringValue("EmrCluster"), new Field().withKey("amiVersion").withStringValue("3.8.0"), new Field().withKey("masterInstanceType").withStringValue("m1.medium"), new Field().withKey("coreInstanceType").withStringValue("m1.medium"), new Field().withKey("coreInstanceCount").withStringValue("1"), new Field().withKey("region").withStringValue(region.getName()), new Field().withKey("terminateAfter").withStringValue("12 hours"), new Field().withKey("role").withStringValue("DataPipelineDefaultRole"), new Field().withKey("bootstrapAction").withStringValue("s3://elasticmapreduce" + "/bootstrap-actions/configure-hadoop, --yarn-key-value,yarn.nodemanager.resource" + ".memory-mb=11520," + "--yarn-key-value,yarn.scheduler.maximum-allocation-mb=11520," + "--yarn-key-value,yarn.scheduler.minimum-allocation-mb=1440," + "--yarn-key-value,yarn.app.mapreduce.am.resource.mb=2880," + "--mapred-key-value,mapreduce.map.memory.mb=5760," + "--mapred-key-value,mapreduce.map.java.opts=-Xmx4608M," + "--mapred-key-value,mapreduce.reduce.memory.mb=2880," + "--mapred-key-value,mapreduce.reduce.java.opts=-Xmx2304m," + "--mapred-key-value,mapreduce.map.speculative=false") ); }
Source:
private AsyncTaskType internalGetTaskType() { if (hasTaskHandlers()) { System.out.println("has task handlers"); System.out.println("getParameters().getExecutionReason() "+getParameters().getExecutionReason()); if (getParameters().getExecutionReason() == CommandExecutionReason.REGULAR_FLOW) { return getCurrentTaskHandler().getTaskType(); } return getCurrentTaskHandler().getRevertTaskType(); } System.out.println("NO task handlers"); return getTaskType(); }

Target:
private AsyncTaskType internalGetTaskType() { if (hasTaskHandlers()) { if (getParameters().<VdcActionParametersBase.CommandExecutionReason>get(CoreVdcParameters.COMMAND_EXECUTION_REASON) == CommandExecutionReason.REGULAR_FLOW) { return getCurrentTaskHandler().getTaskType(); } return getCurrentTaskHandler().getRevertTaskType(); } return getTaskType(); }
Source:
Set<Integer> getInFlightCorrelationIds() { return correlationIdToPutChunk.keySet(); }

Target:
Set<Integer> getInFlightCorrelationIds() { return Collections.unmodifiableSet(correlationIdToPutChunk.keySet()); }
Source:
public int hashCode() { int result = connectorConfig.hashCode(); result = 31 * result + table.hashCode(); result = 31 * result + keyColumn.hashCode(); result = 31 * result + valueColumn.hashCode(); result = 31 * result + (filter != null ? filter.hashCode() : 0); result = 31 * result + (tsColumn != null ? tsColumn.hashCode() : 0); result = 31 * result + pollPeriod.hashCode(); return result; }

Target:
public int hashCode() { return Objects.hash( connectorConfig, table, filter, keyColumn, valueColumn, tsColumn, pollPeriod ); }
Source:
private boolean switchToNewBuffer(final byte[] array, final int offset, final int size) { if (datalist.isMemoryBlockAvailable() || datalist.canAllocateMemoryBlock()) { final byte[] newBuffer = datalist.newBuffer(size); byteBuffer = ByteBuffer.wrap(newBuffer); if (array == null || array.length - offset == 0) { writeOffset = 0; } else { writeOffset = array.length - offset; System.arraycopy(buffer, offset, newBuffer, 0, writeOffset); byteBuffer.position(writeOffset); } buffer = newBuffer; readOffset = 0; datalist.addBuffer(buffer); return true; } return false; }

Target:
private boolean switchToNewBuffer(final byte[] array, final int offset, final int size) { if ((datalist.isMemoryBlockAvailable() || ((storage == null)) && !datalist.areSubscribersBehindByMax())) { final byte[] newBuffer = datalist.newBuffer(size); byteBuffer = ByteBuffer.wrap(newBuffer); if (array == null || array.length - offset == 0) { writeOffset = 0; } else { writeOffset = array.length - offset; System.arraycopy(buffer, offset, newBuffer, 0, writeOffset); byteBuffer.position(writeOffset); } buffer = newBuffer; readOffset = 0; datalist.addBuffer(buffer); return true; } return false; }
Source:
public int hashCode() { return Objects.hash(entity, type); }

Target:
public int hashCode() { return Objects.hash(System.identityHashCode(entity), type); }
Source:
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); mAdbDeviceDetailsController = AdbDeviceDetailsController.newInstance( mPairedDevice, context, this, getSettingsLifecycle()); controllers.add(mAdbDeviceDetailsController); return controllers; }

Target:
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); controllers.add(new AdbDeviceDetailsHeaderController(mPairedDevice, context, this)); controllers.add(new AdbDeviceDetailsActionController(mPairedDevice, context, this)); controllers.add(new AdbDeviceDetailsFingerprintController(mPairedDevice, context, this)); return controllers; }
Source:
private UnwrapMode unwrapMode(Field field, boolean typeArgumentAnnotated) { boolean notIterable = !ReflectionHelper.isIterable( ReflectionHelper.typeOf( field ) ); UnwrapValidatedValue unwrapValidatedValue = field.getAnnotation( UnwrapValidatedValue.class ); if ( unwrapValidatedValue == null && typeArgumentAnnotated && notIterable ) { return UnwrapMode.UNWRAP; } else if ( unwrapValidatedValue != null ) { return unwrapValidatedValue.value() ? UnwrapMode.UNWRAP : UnwrapMode.SKIP_UNWRAP; } return UnwrapMode.AUTOMATIC; }

Target:
private UnwrapMode unwrapMode(Field field, boolean typeArgumentAnnotated) { boolean notIterable = !ReflectionHelper.isIterable( ReflectionHelper.typeOf( field ) ); UnwrapValidatedValue unwrapValidatedValue = field.getAnnotation( UnwrapValidatedValue.class ); return unwrapMode( typeArgumentAnnotated, notIterable, unwrapValidatedValue ); }
Source:
public final <T> T build(Class<T> serviceClass, UserAgent userAgent) { ObjectMapper objectMapper = getObjectMapper(); ObjectMapper cborObjectMapper = getCborObjectMapper(); okhttp3.OkHttpClient okHttpClient = Optional.ofNullable(hostMetricsRegistry) .map(hostMetrics -> OkHttpClients.create(config, userAgent, hostMetrics, serviceClass)) .orElse(OkHttpClients.create(config, userAgent, serviceClass)); return Feign.builder() .contract(createContract()) .encoder( new InputStreamDelegateEncoder( new TextDelegateEncoder( new CborDelegateEncoder( cborObjectMapper, new JacksonEncoder(objectMapper))))) .decoder(createDecoder(objectMapper, cborObjectMapper)) .requestInterceptor(PathTemplateHeaderRewriter.INSTANCE) .client(new OkHttpClient(okHttpClient)) .options(createRequestOptions()) .logLevel(Logger.Level.NONE) .retryer(new Retryer.Default(0, 0, 1)) .target(serviceClass, primaryUri); }

Target:
public final <T> T build(Class<T> serviceClass, UserAgent userAgent) { ObjectMapper objectMapper = getObjectMapper(); ObjectMapper cborObjectMapper = getCborObjectMapper(); okhttp3.OkHttpClient okHttpClient = Optional.ofNullable(hostMetricsRegistry) .map(hostMetrics -> OkHttpClients.create(config, userAgent, hostMetrics, serviceClass)) .orElseGet(() -> OkHttpClients.create(config, userAgent, serviceClass)); return Feign.builder() .contract(createContract()) .encoder( new InputStreamDelegateEncoder( new TextDelegateEncoder( new CborDelegateEncoder( cborObjectMapper, new JacksonEncoder(objectMapper))))) .decoder(createDecoder(objectMapper, cborObjectMapper)) .requestInterceptor(PathTemplateHeaderRewriter.INSTANCE) .client(new OkHttpClient(okHttpClient)) .options(createRequestOptions()) .logLevel(Logger.Level.NONE) .retryer(new Retryer.Default(0, 0, 1)) .target(serviceClass, primaryUri); }
Source:
public CursorProcessorOutput process(ConnectorSession session, DriverYieldSignal yieldSignal, RecordCursor cursor, PageBuilder pageBuilder) { checkArgument(!pageBuilder.isFull(), "page builder can't be full"); requireNonNull(yieldSignal, "yieldSignal is null"); int position = 0; while (true) { if (!cursor.advanceNextPosition()) { return new CursorProcessorOutput(position, true); } if (filter(cursor)) { pageBuilder.declarePosition(); for (int channel = 0; channel < projections.size(); channel++) { project(cursor, channel, pageBuilder); } } position++; if (pageBuilder.isFull() || yieldSignal.isSet()) { return new CursorProcessorOutput(position, false); } } }

Target:
public CursorProcessorOutput process(ConnectorSession session, DriverYieldSignal yieldSignal, RecordCursor cursor, PageBuilder pageBuilder) { checkArgument(!pageBuilder.isFull(), "page builder can't be full"); requireNonNull(yieldSignal, "yieldSignal is null"); int position = 0; while (true) { if (pageBuilder.isFull() || yieldSignal.isSet()) { return new CursorProcessorOutput(position, false); } if (!cursor.advanceNextPosition()) { return new CursorProcessorOutput(position, true); } if (filter(cursor)) { pageBuilder.declarePosition(); for (int channel = 0; channel < projections.size(); channel++) { project(cursor, channel, pageBuilder); } } position++; } }
Source:
public VenusGlobalNavPageObject openHubsMenuViaHover() { Actions actions = new Actions(driver); actions.moveToElement(menuButton); actions.build().perform(); WebDriverWait wait = new WebDriverWait(driver, 5); wait.until(CommonExpectedConditions.elementVisible(hubsMenu)); return this; }

Target:
public VenusGlobalNavPageObject openHubsMenuViaHover() { new Actions(driver) .moveToElement(menuButton) .perform(); new WebDriverWait(driver, 5).until(CommonExpectedConditions.elementVisible(hubsMenu)); return this; }
Source:
public CurrencyAmount presentValueFromCleanPrice( FixedCouponBondTrade trade, LegalEntityDiscountingProvider provider, double cleanPrice) { Security<FixedCouponBond> security = trade.getSecurity(); FixedCouponBond product = security.getProduct(); LocalDate settlementDate = trade.getTradeInfo().getSettlementDate().get(); StandardId securityId = security.getStandardId(); StandardId legalEntityId = product.getLegalEntityId(); double df = provider.repoCurveDiscountFactors( securityId, legalEntityId, product.getCurrency()).discountFactor(settlementDate); double pvPrice = (cleanPrice * product.getNotional() + productPricer.accruedInterest(product, settlementDate)) * df; return CurrencyAmount.of(product.getCurrency(), pvPrice); }

Target:
public CurrencyAmount presentValueFromCleanPrice( FixedCouponBondTrade trade, LegalEntityDiscountingProvider provider, double cleanPrice) { Security<FixedCouponBond> security = trade.getSecurity(); FixedCouponBond product = security.getProduct(); LocalDate standardSettlementDate = product.getSettlementDateOffset().adjust(provider.getValuationDate()); LocalDate tradeSettlementDate = trade.getTradeInfo().getSettlementDate().get(); StandardId securityId = security.getStandardId(); StandardId legalEntityId = product.getLegalEntityId(); Currency currency = product.getCurrency(); double df = provider.repoCurveDiscountFactors(securityId, legalEntityId, currency).discountFactor(standardSettlementDate); double pvStandard = (cleanPrice * product.getNotional() + productPricer.accruedInterest(product, standardSettlementDate)) * df; if (standardSettlementDate.isEqual(tradeSettlementDate)) { return presentValueFromProductPresentValue(trade, provider, CurrencyAmount.of(currency, pvStandard)); } IssuerCurveDiscountFactors discountFactors = provider.issuerCurveDiscountFactors(legalEntityId, currency); ExpandedFixedCouponBond expanded = product.expand(); boolean exCoupon = product.getExCouponPeriod().getDays() != 0; double pvDiff = 0d; if (standardSettlementDate.isAfter(tradeSettlementDate)) { pvDiff = productPricer.presentValueCoupon( expanded, discountFactors, tradeSettlementDate, standardSettlementDate, exCoupon); } else { pvDiff = -productPricer.presentValueCoupon( expanded, discountFactors, standardSettlementDate, tradeSettlementDate, exCoupon); } return presentValueFromProductPresentValue(trade, provider, CurrencyAmount.of(currency, pvStandard + pvDiff)); }
Source:
Value newUniqueValue( RandomRule random, Set<Object> uniqueCompareValues, List<Value> uniqueValues ) { double x, y; PointValue pointValue; Long compareValue; do { x = random.nextDouble() * 360 - 180; y = random.nextDouble() * 180 - 90; pointValue = Values.pointValue( crs, x, y ); compareValue = curve.derivedValueFor( pointValue.coordinate() ); } while ( !uniqueCompareValues.add( compareValue ) ); uniqueValues.add( pointValue ); return pointValue; }

Target:
Value newUniqueValue( RandomRule random, Set<Object> uniqueCompareValues, List<Value> uniqueValues ) { PointValue pointValue; Long compareValue; do { pointValue = randomPoint( random.randoms() ); compareValue = curve.derivedValueFor( pointValue.coordinate() ); } while ( !uniqueCompareValues.add( compareValue ) ); uniqueValues.add( pointValue ); return pointValue; }
Source:
public static ExecutionEnvironmentResolutionHandler adapt(ExecutionEnvironmentConfiguration eeConfiguration) { if (eeConfiguration.isIgnoredByResolver()) { return new AllKnownEEsResolutionHandler(); } else if (eeConfiguration.isCustomProfile()) { return new CustomEEResolutionHandler(eeConfiguration); } else { return new StandardEEResolutionHandler(eeConfiguration.getProfileName()); } }

Target:
public static ExecutionEnvironmentResolutionHandler adapt(ExecutionEnvironmentConfiguration eeConfiguration) { if (eeConfiguration.isIgnoredByResolver()) { return new StandardEEResolutionHandler(new AllKnownEEsResolutionHints()); } else if (eeConfiguration.isCustomProfile()) { return new CustomEEResolutionHandler(eeConfiguration); } else { return new StandardEEResolutionHandler(new StandardEEResolutionHints(eeConfiguration.getProfileName())); } }
Source:
public ClientStats getClientStats() { final long totalConnectionCount = openChannels.size(); final long idleConnectionCount = channelPool.getIdleChannelCount(); final long activeConnectionCount = totalConnectionCount - idleConnectionCount; return new ClientStats(activeConnectionCount, idleConnectionCount); }

Target:
public ClientStats getClientStats() { final Map<String, Long> totalConnectionsPerHost = openChannels .stream() .map(Channel::remoteAddress) .filter(a -> a.getClass() == InetSocketAddress.class) .map(a -> (InetSocketAddress) a) .map(InetSocketAddress::getHostName) .collect(Collectors.groupingBy(Function.identity(), Collectors.counting())); final Map<String, Long> idleConnectionsPerHost = channelPool.getIdleChannelCountPerHost(); final Map<String, HostStats> statsPerHost = totalConnectionsPerHost .entrySet() .stream() .collect(Collectors.toMap( Entry::getKey, entry -> { final long totalConnectionCount = entry.getValue(); final long idleConnectionCount = idleConnectionsPerHost.getOrDefault(entry.getKey(), 0L); final long activeConnectionCount = totalConnectionCount - idleConnectionCount; return new HostStats(activeConnectionCount, idleConnectionCount); } )); return new ClientStats(statsPerHost); }
Source:
public String queryWithSkipQueryDetachDisabled() { if(TestEntityManager.getInvocations().contains("close")) { return "invalid state, entity manager has already been previously closed"; } if(TestEntityManager.getInvocations().contains("clear")) { return "invalid state, entity manager has already been previously cleared"; } Query query = emQueryResultsAreDetached.createQuery("mock query"); if(TestEntityManager.getInvocations().contains("clear")) { return "invalid state, entity manager was cleared (detached) after query was created but before executed," + "which means that 'wildfly.jpa.skipquerydetach=false' (default) behaviour didn't work"; } query.getSingleResult(); if(TestEntityManager.getInvocations().contains("close")) { return "invalid state, entity manager was closed before SFSB1 bean call completed, " + "which means that 'wildfly.jpa.skipquerydetach=true' couldn't work, as the " + "persistence context was closed too early"; } if(!TestEntityManager.getInvocations().contains("clear")) { return "invalid state, entity manager was not cleared (detached) as expected," + "which means that 'wildfly.jpa.skipquerydetach=false' (default) behaviour didn't work"; } return null; }

Target:
public String queryWithSkipQueryDetachDisabled() { if(TestEntityManager.getInvocations().contains("close")) { return "invalid state, entity manager has already been previously closed"; } if(TestEntityManager.getInvocations().contains("clear")) { return "invalid state, entity manager has already been previously cleared"; } Query query = emQueryResultsAreDetached.createQuery("mock query"); if(TestEntityManager.getInvocations().contains("clear")) { return "invalid state, entity manager was cleared (detached) after query was created but before executed," + "which means that 'wildfly.jpa.skipquerydetach=false' (default) behaviour didn't work"; } query.getSingleResult(); if(TestEntityManager.getInvocations().contains("close")) { return "invalid state, entity manager was closed before SFSB1 bean call completed, " + "which means that 'wildfly.jpa.skipquerydetach=false' couldn't work, as the " + "persistence context was closed too early"; } if(!TestEntityManager.getInvocations().contains("clear")) { return "invalid state, entity manager was not cleared (detached) as expected," + "which means that 'wildfly.jpa.skipquerydetach=false' (default) behaviour didn't work"; } return null; }
Source:
public Collection<String> aliases() { return Collections.unmodifiableList(Lists.newArrayList("readableSize")); }

Target:
public Collection<String> aliases() { return Collections.unmodifiableList(Arrays.asList("readableSize")); }
Source:
private String dbSpecificPageCacheMemory( File storeDir ) { long total = 0; for ( StoreType type : StoreType.values() ) { if ( type.isRecordStore() ) { File file = new File( storeDir, type.getStoreFile().storeFileName() ); if ( outsideWorld.fileSystem().fileExists( file ) ) { total += outsideWorld.fileSystem().getFileSize( file ); } } } File baseSchemaIndexDir = baseSchemaIndexFolder( storeDir ); total = sumNativeIndexFiles( baseSchemaIndexDir, getNativeIndexFileFilter(), total ); return bytesToString( total ); }

Target:
private String dbSpecificPageCacheMemory( File storeDir ) { long total = 0; total += sumStoreFiles( storeDir ); File baseSchemaIndexDir = baseSchemaIndexFolder( storeDir ); total += sumNativeIndexFiles( baseSchemaIndexDir, getNativeIndexFileFilter( baseSchemaIndexDir.toPath() ) ); return bytesToString( total ); }
Source:
protected OrderBySpec parseOrderBySpec( TokenStream tokens ) { if (tokens.canConsume('@')) { NameTest attributeName = parseQName(tokens); Order order = Order.ASCENDING; if (tokens.canConsume("ascending")) order = Order.ASCENDING; else if (tokens.canConsume("descending")) order = Order.DESCENDING; return new OrderBySpec(order, attributeName); } if (tokens.matches("jcr", ":", "score", "(")) { FunctionCall scoreFunction = parseFunctionCall(tokens); Order order = Order.ASCENDING; if (tokens.canConsume("ascending")) order = Order.ASCENDING; else if (tokens.canConsume("descending")) order = Order.DESCENDING; return new OrderBySpec(order, scoreFunction); } PathExpression path = this.parsePathExpr(tokens); Order order = Order.ASCENDING; if (tokens.canConsume("ascending")) { order = Order.ASCENDING; } else if (tokens.canConsume("descending")) { order = Order.DESCENDING; } return new OrderBySpec(order, path); }

Target:
protected OrderBySpec parseOrderBySpec( TokenStream tokens ) { if (tokens.canConsume('@')) { NameTest attributeName = parseQName(tokens); Order order = Order.ASCENDING; if (tokens.canConsume("ascending")) order = Order.ASCENDING; else if (tokens.canConsume("descending")) order = Order.DESCENDING; return new OrderBySpec(order, attributeName); } if (tokens.matches("jcr", ":", "score", "(")) { FunctionCall scoreFunction = parseFunctionCall(tokens); Order order = Order.ASCENDING; if (tokens.canConsume("ascending")) order = Order.ASCENDING; else if (tokens.canConsume("descending")) order = Order.DESCENDING; return new OrderBySpec(order, scoreFunction); } PathExpression path = this.parsePathExpr(tokens); if (!path.isRelative()) { throw new ParsingException(tokens.nextPosition(), "Expected either 'jcr:score(tableName)', '@<propertyName>', " + "or '<childName>/@<propertyOnChild>' but absolute path was found " + tokens.consume()); } List<StepExpression> steps = path.getSteps(); if (steps.size() != 2) { throw new ParsingException(tokens.nextPosition(), "Expected either 'jcr:score(tableName)', '@<propertyName>', " + "or '<childName>/@<propertyOnChild>' but was found " + tokens.consume()); } if (!(((AxisStep)steps.get(0)).getNodeTest() instanceof NameTest)) { throw new ParsingException(tokens.nextPosition(), "Expected '<childName>/@<propertyOnChild>' but was found " + tokens.consume()); } if (!(((AxisStep)steps.get(1)).getNodeTest() instanceof AttributeNameTest)) { throw new ParsingException(tokens.nextPosition(), "Expected '<childName>/@<propertyOnChild>' but was found " + tokens.consume()); } Order order = Order.ASCENDING; if (tokens.canConsume("ascending")) { order = Order.ASCENDING; } else if (tokens.canConsume("descending")) { order = Order.DESCENDING; } return new OrderBySpec(order, path); }
Source:
public static void addStatementPatternIds(TransactionBase tx, Set<String> ids) { Optional<Bytes> val = Optional.fromNullable(tx.get(Bytes.of(STATEMENT_PATTERN_ID), STATEMENT_PATTERN_IDS)); StringBuilder builder = new StringBuilder(); if (val.isPresent()) { builder.append(val.get().toString()); builder.append(VAR_DELIM); } String idString = builder.append(Joiner.on(VAR_DELIM).join(ids)).toString(); tx.set(Bytes.of(STATEMENT_PATTERN_ID), STATEMENT_PATTERN_IDS, Bytes.of(idString)); tx.set(Bytes.of(STATEMENT_PATTERN_ID), STATEMENT_PATTERN_IDS_HASH, Bytes.of(Hashing.sha256().hashString(idString).toString())); }

Target:
public static void addStatementPatternIds(TransactionBase tx, Set<String> ids) { checkNotNull(tx); checkNotNull(ids); Optional<Bytes> val = Optional.fromNullable(tx.get(Bytes.of(STATEMENT_PATTERN_ID), STATEMENT_PATTERN_IDS)); StringBuilder builder = new StringBuilder(); if (val.isPresent()) { builder.append(val.get().toString()); builder.append(VAR_DELIM); } String idString = builder.append(Joiner.on(VAR_DELIM).join(ids)).toString(); tx.set(Bytes.of(STATEMENT_PATTERN_ID), STATEMENT_PATTERN_IDS, Bytes.of(idString)); tx.set(Bytes.of(STATEMENT_PATTERN_ID), STATEMENT_PATTERN_IDS_HASH, Bytes.of(Hashing.sha256().hashString(idString).toString())); }
Source:
public void bridgeStatusChanged(ThingStatusInfo bridgeStatusInfo) { super.bridgeStatusChanged(bridgeStatusInfo); if (ThingStatus.ONLINE.equals(bridgeStatusInfo.getStatus()) && ThingStatus.OFFLINE.equals(getThing().getStatusInfo().getStatus()) && ThingStatusDetail.BRIDGE_OFFLINE.equals(getThing().getStatusInfo().getStatusDetail())) { updateStatus(ThingStatus.ONLINE, ThingStatusDetail.NONE); } }

Target:
public void bridgeStatusChanged(ThingStatusInfo bridgeStatusInfo) { super.bridgeStatusChanged(bridgeStatusInfo); if ((bridgeStatusInfo.getStatus() == ThingStatus.ONLINE) && (getThing().getStatusInfo().getStatus() == ThingStatus.OFFLINE) && (getThing().getStatusInfo().getStatusDetail() == ThingStatusDetail.BRIDGE_OFFLINE)) { updateStatus(ThingStatus.UNKNOWN, ThingStatusDetail.NONE); } }
Source:
public NotesMergeConflictException(NonNoteEntry base, NonNoteEntry ours, NonNoteEntry theirs) { super(MessageFormat.format(JGitText.get().mergeConflictOnNonNoteEntries, base, ours, theirs)); }

Target:
public NotesMergeConflictException(NonNoteEntry base, NonNoteEntry ours, NonNoteEntry theirs) { super(MessageFormat.format( JGitText.get().mergeConflictOnNonNoteEntries, base.name(), ours.name(), theirs.name())); }
Source:
private boolean isContentValid(final RepositoryState repositoryState, final SnomedImportResult result, final String requestingUserId, final ImportConfiguration configuration, final IBranchPath branchPath, final SubMonitor subMonitor) { return getIndex().read(configuration.getBranchPath(), new RevisionIndexRead<Boolean>() { @Override public Boolean execute(RevisionSearcher index) throws IOException { final SnomedValidationContext validator = new SnomedValidationContext(index, requestingUserId, configuration, IMPORT_LOGGER, repositoryState); final Set<SnomedValidationDefect> defects = result.getValidationDefects(); defects.addAll(validator.validate(subMonitor.newChild(1))); if (!isEmpty(defects)) { final String message = String.format("Validation encountered %s issue(s).", defects.size()); LogUtils.logImportActivity(IMPORT_LOGGER, requestingUserId, branchPath, message); final String lineSeparator = System.getProperty("line.separator"); final Map<String, BufferedWriter> defectWriters = newHashMap(); try { for (SnomedValidationDefect defect : defects) { final String filePath = defect.getFileName(); final String defectsFile = String.format("d:/%s_%s_defects.txt", configuration.getArchiveFile().getName(), filePath); if (!defectWriters.containsKey(defectsFile)) { defectWriters.put(defectsFile, Files.newWriter(new File(defectsFile), Charsets.UTF_8)); } for (String lineDefect : defect.getDefects()) { defectWriters.get(defectsFile).write(defect.getDefectType().name() + "\t" + lineDefect); defectWriters.get(defectsFile).write(lineSeparator); } } } finally { for (BufferedWriter writer : defectWriters.values()) { writer.close(); } } return !Iterables.tryFind(defects, new Predicate<SnomedValidationDefect>() { @Override public boolean apply(SnomedValidationDefect input) { return input.getDefectType().isCritical(); } }).isPresent(); } return true; } }); }

Target:
private boolean isContentValid(final RepositoryState repositoryState, final SnomedImportResult result, final String requestingUserId, final ImportConfiguration configuration, final IBranchPath branchPath, final SubMonitor subMonitor) { return getIndex().read(configuration.getBranchPath(), new RevisionIndexRead<Boolean>() { @Override public Boolean execute(RevisionSearcher index) throws IOException { final SnomedValidationContext validator = new SnomedValidationContext(index, requestingUserId, configuration, IMPORT_LOGGER, repositoryState); final Set<SnomedValidationDefect> defects = result.getValidationDefects(); defects.addAll(validator.validate(subMonitor.newChild(1))); if (!isEmpty(defects)) { final String message = String.format("Validation encountered %s issue(s).", defects.size()); LogUtils.logImportActivity(IMPORT_LOGGER, requestingUserId, branchPath, message); return !Iterables.tryFind(defects, new Predicate<SnomedValidationDefect>() { @Override public boolean apply(SnomedValidationDefect input) { return input.getDefectType().isCritical(); } }).isPresent(); } return true; } }); }
Source:
public DataloadProcess getProcessById(Project project, String id) { notEmpty(id, "id"); notNull(project, "project"); return getProcessByUri(DataloadProcess.TEMPLATE.expand(project.getId(), id).toString()); }

Target:
public DataloadProcess getProcessById(Project project, String id) { notEmpty(id, "id"); notNull(project, "project"); return getProcessByUri(getProcessUri(project, id).toString()); }
Source:
private boolean installBDM() { try { getContainer().run(true, false, new IRunnableWithProgress() { @Override public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { new DeployBDMOperation(fStore).run(monitor); } }); } catch (final InvocationTargetException e) { final Throwable targetException = e.getTargetException(); int index = -1; for (int i = 0; i < targetException.getStackTrace().length; i++) { final StackTraceElement element = targetException.getStackTrace()[i]; if (element.getClassName().contains("org.hibernate.HibernateException")) { index = i; break; } } if (index > -1) { targetException.setStackTrace(Arrays.copyOfRange(targetException.getStackTrace(), index, targetException.getStackTrace().length)); } new BonitaErrorDialog(Display.getDefault().getActiveShell(), Messages.installFailedTitle, Messages.installFailedMessage, targetException) .open(); return false; } catch (final InterruptedException e) { return false; } return true; }

Target:
private boolean installBDM() { try { getContainer().run(true, false, new IRunnableWithProgress() { @Override public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { new DeployBDMOperation(fStore).run(monitor); } }); } catch (final InvocationTargetException e) { new BonitaErrorDialog(Display.getDefault().getActiveShell(), Messages.installFailedTitle, Messages.installFailedMessage, handleTargetExceptionStacktrace(e)) .open(); return false; } catch (final InterruptedException e) { return false; } return true; }
Source:
public static @Nullable Set<Integer> getThreadsOfCpus(KernelAnalysisModule module, Collection<Long> cpus, long rangeStart, long rangeEnd) { ITmfStateSystem ss = module.getStateSystem(); if (ss == null) { return null; } Set<Long> uniqueCpus = (cpus instanceof Set ? (Set<Long>) cpus : ImmutableSet.copyOf(cpus)); int threadsQuark = ss.optQuarkAbsolute(Attributes.THREADS); if (threadsQuark == ITmfStateSystem.INVALID_ATTRIBUTE) { return null; } List<Integer> threadQuarks = ss.getSubAttributes(threadsQuark, false); return threadQuarks.stream() .filter(threadQuark -> { int threadCurrentCpuQuark = ss.optQuarkRelative(threadQuark, Attributes.CURRENT_CPU_RQ); if (threadCurrentCpuQuark == ITmfStateSystem.INVALID_ATTRIBUTE) { return false; } QuarkIterator it = new QuarkIterator(ss, threadCurrentCpuQuark, rangeStart, rangeEnd); return StreamUtils.getStream(it) .map(ITmfStateInterval::getStateValue) .filter(value -> !value.isNull()) .map(value -> Long.valueOf(value.unboxLong())) .anyMatch(uniqueCpus::contains); }) .map(ss::getAttributeName) .filter(attribName -> !attribName.startsWith(Attributes.THREAD_0_PREFIX)) .map(Integer::valueOf) .collect(Collectors.toSet()); }

Target:
public static @Nullable Set<Integer> getThreadsOfCpus(KernelAnalysisModule module, Collection<Long> cpus, long rangeStart, long rangeEnd) { ITmfStateSystem ss = module.getStateSystem(); if (ss == null) { return null; } Set<Long> uniqueCpus = (cpus instanceof Set ? (Set<Long>) cpus : ImmutableSet.copyOf(cpus)); int threadsQuark = ss.optQuarkAbsolute(Attributes.THREADS); if (threadsQuark == ITmfStateSystem.INVALID_ATTRIBUTE) { return null; } List<Integer> threadQuarks = ss.getSubAttributes(threadsQuark, false); return threadQuarks.stream() .filter(threadQuark -> { int threadCurrentCpuQuark = ss.optQuarkRelative(threadQuark, Attributes.CURRENT_CPU_RQ); if (threadCurrentCpuQuark == ITmfStateSystem.INVALID_ATTRIBUTE) { return false; } Iterator<ITmfStateInterval> intervals = new QuarkIterator(ss, threadCurrentCpuQuark, rangeStart, rangeEnd); Iterator<ITmfStateValue> nonNull = Iterators.filter(Iterators.transform(intervals, ITmfStateInterval::getStateValue), v -> !v.isNull()); return Iterators.any(Iterators.transform(nonNull, ITmfStateValue::unboxLong), uniqueCpus::contains); }) .map(ss::getAttributeName) .filter(attribName -> !attribName.startsWith(Attributes.THREAD_0_PREFIX)) .map(Integer::parseInt) .collect(Collectors.toSet()); }
Source:
public SetLicenseKeyCmd(final String licenseKey) { this.LicenseKey = licenseKey; }

Target:
public SetLicenseKeyCmd(final String licenseKey) { this.licenseKey = licenseKey; }
Source:
void testDeleteArtifactAndEmptyTrashForRepository(String acceptHeader, @MavenRepository(repositoryId = REPOSITORY_WITH_TRASH_2) @RepositoryAttributes(trashEnabled = true) Repository repository, @MavenTestArtifact(repositoryId = REPOSITORY_WITH_TRASH_2, id = "org.carlspring.strongbox:test-artifact-to-trash", versions = "1.0") Path artifactPath) { final String storageId = repository.getStorage().getId(); final String repositoryId = repository.getId(); String url = getContextBaseUrl() + "/{storageId}/{repositoryId}"; ValidatableMockMvcResponse response = given().accept(acceptHeader) .when() .delete(url, storageId, repositoryId) .peek() .then() .statusCode(HttpStatus.OK.value()); String message = String.format("The trash for '%s:%s' was removed successfully.", storageId, repositoryId); validateResponseBody(response, acceptHeader, message); assertFalse(Files.exists(getPathToArtifactInTrash(repository, artifactPath)), "Failed to empty trash for repository '" + repositoryId + "'!"); }

Target:
void testDeleteArtifactAndEmptyTrashForRepository(String acceptHeader, @MavenRepository(repositoryId = REPOSITORY_WITH_TRASH_2) @RepositoryAttributes(trashEnabled = true) Repository repository, @MavenTestArtifact(repositoryId = REPOSITORY_WITH_TRASH_2, id = "org.carlspring.strongbox:test-artifact-to-trash", versions = "1.0") Path artifactPath) throws IOException { final String storageId = repository.getStorage().getId(); final String repositoryId = repository.getId(); String url = getContextBaseUrl() + "/{storageId}/{repositoryId}"; ValidatableMockMvcResponse response = given().accept(acceptHeader) .when() .delete(url, storageId, repositoryId) .peek() .then() .statusCode(HttpStatus.OK.value()); String message = String.format("The trash for '%s:%s' was removed successfully.", storageId, repositoryId); validateResponseBody(response, acceptHeader, message); final RepositoryPath artifactRepositoryPath = (RepositoryPath) artifactPath.normalize(); final Path artifactFileInTrash = RepositoryFiles.trash(artifactRepositoryPath); assertFalse(Files.exists(artifactFileInTrash), "Failed to empty trash for repository '" + repositoryId + "'!"); }
Source:
public void setUp() { getVM(0).invoke(() -> { latch.set(null); threadId.set(0L); }); }

Target:
public void setUp() { getVM(0).invoke(() -> { LATCH.set(new CountDownLatch(1)); THREAD_ID.set(0L); }); }
Source:
public void execute(CommandLine options) throws Exception { List<String> args = options.getArgList(); List<Path> inputFiles = getInputFiles(args.subList(0, args.size() - 1)); Path outputFile = new Path(args.get(args.size() - 1)); FileMetaData mergedMeta = mergedMetadata(inputFiles); PrintWriter out = new PrintWriter(Main.out, true); ParquetFileWriter writer = new ParquetFileWriter(conf, mergedMeta.getSchema(), outputFile, ParquetFileWriter.Mode.CREATE); writer.start(); boolean tooSmallFilesMerged = false; for (Path input: inputFiles) { if (input.getFileSystem(conf).getFileStatus(input).getLen() < TOO_SMALL_FILE_THRESHOLD) { out.format("Warning: file %s is too small, length: %d\n", input, input.getFileSystem(conf).getFileStatus(input).getLen()); tooSmallFilesMerged = true; } writer.appendFile(conf, input); } if (tooSmallFilesMerged) { out.println("Warning: you merged too small files. " + "Despite the size of the merged file is bigger, it STILL contains small row groups, thus you don't have the advantage of big row groups!"); } writer.end(mergedMeta.getKeyValueMetaData()); }

Target:
public void execute(CommandLine options) throws Exception { List<String> args = options.getArgList(); List<Path> inputFiles = getInputFiles(args.subList(0, args.size() - 1)); Path outputFile = new Path(args.get(args.size() - 1)); FileMetaData mergedMeta = mergedMetadata(inputFiles); PrintWriter out = new PrintWriter(Main.out, true); ParquetFileWriter writer = new ParquetFileWriter(conf, mergedMeta.getSchema(), outputFile, ParquetFileWriter.Mode.CREATE); writer.start(); boolean tooSmallFilesMerged = false; for (Path input: inputFiles) { if (input.getFileSystem(conf).getFileStatus(input).getLen() < TOO_SMALL_FILE_THRESHOLD) { out.format("Warning: file %s is too small, length: %d\n", input, input.getFileSystem(conf).getFileStatus(input).getLen()); tooSmallFilesMerged = true; } writer.appendFile(conf, input); } if (tooSmallFilesMerged) { out.println("Warning: you merged too small files. " + "Although the size of the merged file is bigger, it STILL contains small row groups, thus you don't have the advantage of big row groups, " + "which usually leads to bad query performance!"); } writer.end(mergedMeta.getKeyValueMetaData()); }
Source:
public synchronized void scheduleRequestIfNecessary() { if (isFinished() || isFailed()) { return; } if (noMoreLocations && completedClients.size() == allClients.size()) { if (pageBuffer.peekLast() != NO_MORE_PAGES) { checkState(pageBuffer.add(NO_MORE_PAGES), "Could not add no more pages marker"); } if (pageBuffer.peek() == NO_MORE_PAGES) { close(); } notifyBlockedCallers(); return; } long neededBytes = bufferCapacity - bufferRetainedSizeInBytes; if (neededBytes <= 0) { return; } int clientCount = (int) ((1.0 * neededBytes / averageBytesPerRequest) * concurrentRequestMultiplier); clientCount = Math.max(clientCount, 1); int pendingClients = allClients.size() - queuedClients.size() - completedClients.size(); clientCount -= pendingClients; for (int i = 0; i < clientCount; i++) { HttpPageBufferClient client = queuedClients.poll(); if (client == null) { return; } if (cancelledClients.contains(client)) { continue; } client.scheduleRequest(); } }

Target:
public synchronized void scheduleRequestIfNecessary() { if (isFinished() || isFailed()) { return; } if (noMoreLocations && completedClients.size() == allClients.size()) { if (pageBuffer.peekLast() != NO_MORE_PAGES) { checkState(pageBuffer.add(NO_MORE_PAGES), "Could not add no more pages marker"); } if (pageBuffer.peek() == NO_MORE_PAGES) { close(); } notifyBlockedCallers(); return; } long neededBytes = bufferCapacity - bufferRetainedSizeInBytes; if (neededBytes <= 0) { return; } int clientCount = (int) ((1.0 * neededBytes / averageBytesPerRequest) * concurrentRequestMultiplier); clientCount = Math.max(clientCount, 1); int pendingClients = allClients.size() - queuedClients.size() - completedClients.size(); clientCount -= pendingClients; for (int i = 0; i < clientCount; ) { HttpPageBufferClient client = queuedClients.poll(); if (client == null) { return; } if (removedClients.contains(client)) { continue; } client.scheduleRequest(); i++; } }
Source:
String createAssertionForIdToken( JsonFactory jsonFactory, long currentTime, String audience, String targetAudience) throws IOException { JsonWebSignature.Header header = new JsonWebSignature.Header(); header.setAlgorithm("RS256"); header.setType("JWT"); header.setKeyId(privateKeyId); JsonWebToken.Payload payload = new JsonWebToken.Payload(); payload.setIssuer(clientEmail); payload.setIssuedAtTimeSeconds(currentTime / 1000); payload.setExpirationTimeSeconds(currentTime / 1000 + 3600); payload.setSubject(serviceAccountUser); if (audience == null) { payload.setAudience(OAuth2Utils.TOKEN_SERVER_URI.toString()); } else { payload.setAudience(audience); } payload.set("target_audience", targetAudience); String assertion; try { assertion = JsonWebSignature.signUsingRsaSha256(privateKey, jsonFactory, header, payload); } catch (GeneralSecurityException e) { throw new IOException( "Error signing service account access token request with private key.", e); } return assertion; }

Target:
String createAssertionForIdToken( JsonFactory jsonFactory, long currentTime, String audience, String targetAudience) throws IOException { JsonWebSignature.Header header = new JsonWebSignature.Header(); header.setAlgorithm("RS256"); header.setType("JWT"); header.setKeyId(privateKeyId); JsonWebToken.Payload payload = new JsonWebToken.Payload(); payload.setIssuer(clientEmail); payload.setIssuedAtTimeSeconds(currentTime / 1000); payload.setExpirationTimeSeconds(currentTime / 1000 + 3600); payload.setSubject(serviceAccountUser); if (audience == null) { payload.setAudience(OAuth2Utils.TOKEN_SERVER_URI.toString()); } else { payload.setAudience(audience); } try { payload.set("target_audience", targetAudience); String assertion = JsonWebSignature.signUsingRsaSha256(privateKey, jsonFactory, header, payload); return assertion; } catch (GeneralSecurityException e) { throw new IOException( "Error signing service account access token request with private key.", e); } }
Source:
public static <A> Hash<Zipper<A>> zipperHash(final Hash<A> ha) { return hash(as -> { final int p = 419; int r = 239; Zipper<A> aas = as; aas.move(0); while (true) { r = p * r + ha.hash(aas.focus()); if (aas.atEnd()) { break; } aas = aas.tryNext(); } return r; }); }

Target:
public static <A> Hash<Zipper<A>> zipperHash(final Hash<A> ha) { Hash<Stream<A>> sh = streamHash(ha); return hash(as -> { final int p = 419; int r = 239; r = p * r + sh.hash(as.lefts()); r = p * r + ha.hash(as.focus()); r = p * r + sh.hash(as.rights()); return r; }); }
Source:
private void initVmTemplate() { OvfHelper ovfHelper = new OvfHelper(); ovfEntityData = getUnregisteredOVFDataDao().getByEntityIdAndStorageDomain(getParameters().getContainerId(), getParameters().getStorageDomainId()); if (ovfEntityData != null) { try { vmTemplateFromConfiguration = ovfHelper.readVmTemplateFromOvf(ovfEntityData.getOvfData()); vmTemplateFromConfiguration.setVdsGroupId(getParameters().getVdsGroupId()); setVmTemplate(vmTemplateFromConfiguration); getParameters().setVmTemplate(vmTemplateFromConfiguration); getParameters().setDestDomainId(ovfEntityData.getStorageDomainId()); getParameters().setSourceDomainId(ovfEntityData.getStorageDomainId()); if (getParameters().getDiskTemplateMap() != null) { ArrayList imageList = new ArrayList<>(getParameters().getDiskTemplateMap().values()); vmTemplateFromConfiguration.setDiskList(imageList); ensureDomainMap(imageList, getParameters().getDestDomainId()); } } catch (OvfReaderException e) { log.error("Failed to parse a given ovf configuration: '{}':\n{}", e.getMessage(), ovfEntityData.getOvfData()); log.debug("Exception", e); } } setVdsGroupId(getParameters().getVdsGroupId()); setStoragePoolId(getVdsGroup().getStoragePoolId()); }

Target:
private void initVmTemplate() { OvfHelper ovfHelper = new OvfHelper(); ovfEntityData = getUnregisteredOVFDataDao().getByEntityIdAndStorageDomain(getParameters().getContainerId(), getParameters().getStorageDomainId()); if (ovfEntityData != null) { try { vmTemplateFromConfiguration = ovfHelper.readVmTemplateFromOvf(ovfEntityData.getOvfData()); vmTemplateFromConfiguration.setVdsGroupId(getParameters().getVdsGroupId()); setVmTemplate(vmTemplateFromConfiguration); getParameters().setVmTemplate(vmTemplateFromConfiguration); getParameters().setDestDomainId(ovfEntityData.getStorageDomainId()); getParameters().setSourceDomainId(ovfEntityData.getStorageDomainId()); if (getParameters().getDiskTemplateMap() != null) { ArrayList imageList = new ArrayList<>(getParameters().getDiskTemplateMap().values()); vmTemplateFromConfiguration.setDiskList(imageList); ensureDomainMap(imageList, getParameters().getDestDomainId()); } } catch (OvfReaderException e) { log.error("Failed to parse a given ovf configuration: {}:\n'{}'", e.getMessage(), ovfEntityData.getOvfData()); log.debug("Exception", e); } } setVdsGroupId(getParameters().getVdsGroupId()); setStoragePoolId(getVdsGroup().getStoragePoolId()); }
Source:
public Object evaluate(EObject target, String expression) throws EvaluationException { Object evaluation = null; if (target != null && expression != null && expression.startsWith(PREFIX)) { String serviceCall = expression.substring(PREFIX.length()); Option<String> receiverVariableName = getReceiverVariableName(serviceCall); EObject receiver = target; String serviceName = serviceCall; if (receiverVariableName.some()) { serviceCall = serviceCall.substring(receiverVariableName.get().length() + 1); Object objectReceiver = evaluateVariable(target, receiverVariableName.get().trim()); if (objectReceiver instanceof EObject) { receiver = (EObject) objectReceiver; } else { throw new EvaluationException("The receiver of the service call " + serviceCall + "."); } } int indexOfParenthesis = serviceCall.indexOf("("); serviceName = serviceCall.substring(0, indexOfParenthesis == -1 ? serviceCall.length() : indexOfParenthesis); Object[] parameters = new Object[] { receiver }; if (indexOfParenthesis != -1) { String[] values = serviceCall.split("[(,)]"); parameters = new Object[values.length]; parameters[0] = receiver; for (int i = 1; i < values.length; i++) { parameters[i] = evaluateVariable(target, values[i].trim()); } } evaluation = callService(parameters, serviceName); } return evaluation; }

Target:
public Object evaluate(EObject target, String expression) throws EvaluationException { Object evaluation = null; if (target != null && expression != null && expression.startsWith(PREFIX)) { String serviceCall = expression.substring(PREFIX.length()); Option<String> receiverVariableName = getReceiverVariableName(serviceCall); EObject receiver = target; String serviceName = serviceCall; if (receiverVariableName.some()) { serviceCall = serviceCall.substring(receiverVariableName.get().length() + 1); Object objectReceiver = evaluateVariable(target, receiverVariableName.get().trim()); if (objectReceiver instanceof EObject) { receiver = (EObject) objectReceiver; } else { throw new EvaluationException("The receiver of the service call " + serviceCall + " is not an EObject."); } } int indexOfParenthesis = serviceCall.indexOf("("); serviceName = serviceCall.substring(0, indexOfParenthesis == -1 ? serviceCall.length() : indexOfParenthesis); Object[] parameters = new Object[] { receiver }; if (indexOfParenthesis != -1) { String[] values = serviceCall.split("[(,)]"); parameters = new Object[values.length]; parameters[0] = receiver; for (int i = 1; i < values.length; i++) { parameters[i] = evaluateVariable(target, values[i].trim()); } } evaluation = callService(parameters, serviceName); } return evaluation; }
Source:
public long getOperationCount() { try { Long count = invokeMethod((operationCountWorkerInstance != null) ? operationCountWorkerInstance : testClassInstance, operationCountMethod); return (count == null ? -1 : count); } catch (Exception ignored) { return -1; } }

Target:
public long getOperationCount() { try { Long count = invokeMethod((operationCountWorkerInstance != null) ? operationCountWorkerInstance : testClassInstance, operationCountMethod); return (count == null ? -1 : count); } catch (Exception e) { LOGGER.debug("Exception while retrieving operation count from " + testCase.getId() + ": " + e.getMessage()); return -1; } }