auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void testDescribe() { for (String region : ec2Api.getConfiguredRegions()) { Set<SecurityGroup> allResults = client.describeSecurityGroupsInRegion(region); assertNotNull(allResults); if (allResults.size() >= 1) { final SecurityGroup group = getLast(allResults); ImmutableSet<SecurityGroup> expected = FluentIterable.from(allResults) .filter(new Predicate<SecurityGroup>() { @Override public boolean apply(SecurityGroup in) { return group.getName().equals(in.getName()); } }).toSet(); ImmutableSet<SecurityGroup> result = ImmutableSet.copyOf(client.describeSecurityGroupsInRegion(region, group.getName())); assertTrue(expected.containsAll(result)); } } }

Target:
void testDescribe() { for (String region : ec2Api.getConfiguredRegions()) { Set<SecurityGroup> allResults = client.describeSecurityGroupsInRegion(region); assertNotNull(allResults); if (!allResults.isEmpty()) { final SecurityGroup group = getLast(allResults); ImmutableSet<SecurityGroup> expected = FluentIterable.from(allResults) .filter(new Predicate<SecurityGroup>() { @Override public boolean apply(SecurityGroup in) { return group.getName().equals(in.getName()); } }).toSet(); ImmutableSet<SecurityGroup> result = ImmutableSet.copyOf(client.describeSecurityGroupsInRegion(region, group.getName())); assertTrue(expected.containsAll(result), "group(s) for name not found"); } } }
Source:
public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException, OperationCanceledException { pm.subTask(Messages.RenameModelChange_LoadingEMF); pm.subTask(Messages.RenameModelChange_DaveDirtyEditor); openedEditors = new ArrayList<IMultiDiagramEditor>(); Display.getDefault().syncExec(new Runnable() { public void run() { IMultiDiagramEditor[] multiEditors = EditorUtils.getRelatedEditors(oldFile); if(multiEditors != null && multiEditors.length > 0) { for(IMultiDiagramEditor editor : multiEditors) { if(editor.isDirty()) { editor.doSave(new NullProgressMonitor()); } openedEditors.add(editor); } } } }); pm.worked(10); resourceSet = new ModelSet(); try { ModelsReader reader = new ModelsReader(); reader.readModel(resourceSet); resourceSet.loadModels(oldFile); for(IResource r : impacted) { if(r instanceof IFile) { IFile file = (IFile)r; try { resourceSet.getResource(URI.createPlatformResourceURI(file.getFullPath().toString(), true), true); } catch (Exception e) { } } } URI stashOldFile = SashUtils.getSashStateLocationURI(oldFile); if(stashOldFile != null) { resourceSet.getResource(stashOldFile, true); } } catch (Exception e) { Activator.log.error(e); } try { EcoreUtil.resolveAll(resourceSet); } catch (Exception ex) { } pm.worked(4); domain = resourceSet.getTransactionalEditingDomain(); return manageResourceSet(pm, resourceSet); }

Target:
public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException, OperationCanceledException { pm.subTask(Messages.RenameModelChange_LoadingEMF); pm.subTask(Messages.RenameModelChange_DaveDirtyEditor); openedEditors = new ArrayList<IMultiDiagramEditor>(); Display.getDefault().syncExec(new Runnable() { public void run() { IMultiDiagramEditor[] multiEditors = EditorUtils.getRelatedEditors(oldFile); if(multiEditors != null && multiEditors.length > 0) { for(IMultiDiagramEditor editor : multiEditors) { if(editor.isDirty()) { editor.doSave(new NullProgressMonitor()); } openedEditors.add(editor); } } } }); pm.worked(10); resourceSet = new ModelSet(); try { ModelsReader reader = new ModelsReader(); reader.readModel(resourceSet); resourceSet.loadModels(oldFile); for(IResource r : impacted) { if(r instanceof IFile) { IFile file = (IFile)r; try { resourceSet.getResource(URI.createPlatformResourceURI(file.getFullPath().toString(), true), true); } catch (Exception e) { } } } } catch (Exception e) { Activator.log.error(e); } try { EcoreUtil.resolveAll(resourceSet); } catch (Exception ex) { } pm.worked(4); domain = resourceSet.getTransactionalEditingDomain(); return manageResourceSet(pm, resourceSet); }
Source:
public Optional<PlanNode> apply(PlanNode node, Lookup lookup, PlanNodeIdAllocator idAllocator, SymbolAllocator symbolAllocator, Session session) { if (!(node instanceof ProjectNode)) { return Optional.empty(); } ProjectNode parent = (ProjectNode) node; PlanNode child = lookup.resolve(parent.getSource()); if (!(child instanceof MarkDistinctNode)) { return Optional.empty(); } MarkDistinctNode markDistinctNode = (MarkDistinctNode) child; Optional<List<Symbol>> prunedOutputs = pruneInputs(child.getOutputSymbols(), parent.getAssignments().getExpressions()); if (!prunedOutputs.isPresent()) { return Optional.empty(); } if (prunedOutputs.get().stream().noneMatch(markDistinctNode.getMarkerSymbol()::equals)) { return Optional.of( node.replaceChildren(ImmutableList.of(markDistinctNode.getSource()))); } Set<Symbol> requiredInputs = Streams.concat( prunedOutputs.get().stream() .filter(symbol -> !symbol.equals(markDistinctNode.getMarkerSymbol())), markDistinctNode.getDistinctSymbols().stream(), markDistinctNode.getHashSymbol().map(Stream::of).orElse(Stream.empty())) .collect(toImmutableSet()); return Optional.of( node.replaceChildren(ImmutableList.of( markDistinctNode.replaceChildren(ImmutableList.of( restrictOutputs(idAllocator, markDistinctNode.getSource(), requiredInputs)))))); }

Target:
public Optional<PlanNode> apply(PlanNode node, Lookup lookup, PlanNodeIdAllocator idAllocator, SymbolAllocator symbolAllocator, Session session) { ProjectNode parent = (ProjectNode) node; PlanNode child = lookup.resolve(parent.getSource()); if (!(child instanceof MarkDistinctNode)) { return Optional.empty(); } MarkDistinctNode markDistinctNode = (MarkDistinctNode) child; Optional<List<Symbol>> prunedOutputs = pruneInputs(child.getOutputSymbols(), parent.getAssignments().getExpressions()); if (!prunedOutputs.isPresent()) { return Optional.empty(); } if (!prunedOutputs.get().contains(markDistinctNode.getMarkerSymbol())) { return Optional.of( node.replaceChildren(ImmutableList.of(markDistinctNode.getSource()))); } Set<Symbol> requiredInputs = Streams.concat( prunedOutputs.get().stream() .filter(symbol -> !symbol.equals(markDistinctNode.getMarkerSymbol())), markDistinctNode.getDistinctSymbols().stream(), markDistinctNode.getHashSymbol().map(Stream::of).orElse(Stream.empty())) .collect(toImmutableSet()); return restrictOutputs(idAllocator, markDistinctNode.getSource(), requiredInputs) .map(prunedMarkDistinctSource -> parent.replaceChildren(ImmutableList.of( markDistinctNode.replaceChildren(ImmutableList.of( prunedMarkDistinctSource))))); }
Source:
private ImmutableDruidDataSource getDataSource(final String dataSourceName) { List<ImmutableDruidDataSource> dataSources = serverInventoryView .getInventory() .stream() .map(server -> server.getDataSource(dataSourceName)) .filter(Objects::nonNull) .map(DruidDataSource::toImmutableDruidDataSource) .collect(Collectors.toList()); if (dataSources.isEmpty()) { return null; } Map<String, DataSegment> segmentMap = Maps.newHashMap(); for (ImmutableDruidDataSource dataSource : dataSources) { Iterable<DataSegment> segments = dataSource.getSegments(); for (DataSegment segment : segments) { segmentMap.put(segment.getIdentifier(), segment); } } return new DruidDataSource( dataSourceName, ImmutableMap.of() ).addSegments(segmentMap).toImmutableDruidDataSource(); }

Target:
private ImmutableDruidDataSource getDataSource(final String dataSourceName) { List<ImmutableDruidDataSource> dataSources = serverInventoryView .getInventory() .stream() .map(server -> server.getDataSource(dataSourceName)) .filter(Objects::nonNull) .map(DruidDataSource::toImmutableDruidDataSource) .collect(Collectors.toList()); if (dataSources.isEmpty()) { return null; } Map<String, DataSegment> segmentMap = Maps.newHashMap(); for (ImmutableDruidDataSource dataSource : dataSources) { Iterable<DataSegment> segments = dataSource.getSegments(); for (DataSegment segment : segments) { segmentMap.put(segment.getIdentifier(), segment); } } return new ImmutableDruidDataSource( dataSourceName, ImmutableMap.of(), ImmutableMap.copyOf(segmentMap) ); }
Source:
public Single<List<Media>> getMediaListForUser(String userName) { return responseToMediaList( continuationStore.containsKey("user_" + userName) ? mediaInterface.getMediaListForUser(userName, 10, continuationStore.get("user_" + userName)) : mediaInterface.getMediaListForUser(userName, 10, Collections.emptyMap()), "user_" + userName); }

Target:
public Single<List<Media>> getMediaListForUser(String userName) { Map<String, String> continuation = continuationStore.containsKey("user_" + userName) ? continuationStore.get("user_" + userName) : Collections.emptyMap(); return responseToMediaList(mediaInterface .getMediaListForUser(userName, 10, continuation), "user_" + userName); }
Source:
public boolean updateOH(VeluxBindingProvider provider, EventPublisher eventPublisher) { logger.trace("updateOH() called."); if (channel.existingProducts.isDirty()) { logger.trace("updateOH(): existingProducts have changed."); for (VeluxProduct product : channel.existingProducts.valuesOfModified()) { logger.trace("updateOH(): actuator has changed values.", product.getName().toString()); for (String thisItemName : provider.getInBindingItemNames()) { VeluxBindingConfig thisItemConfig = provider.getConfigForItemName(thisItemName); if (thisItemConfig.getBindingItemType() != VeluxItemType.ACTUATOR_SERIAL) { continue; } if (product.getSerialNumber().equals(thisItemConfig.getBindingConfig())) { logger.trace("updateOH(): product {}/{} used within item {}.", product.getName(), product.getSerialNumber(),thisItemName); try { PercentType positionAsPercent = new VeluxProductPosition(product.getCurrentPosition()).getPositionAsPercentType(); if (positionAsPercent != null) { logger.debug("updateOH(): updating item to position {}%.", thisItemName,positionAsPercent); eventPublisher.postUpdate(thisItemName, positionAsPercent); } else { logger.trace("updateOH(): update of item to position skipped.", thisItemName,positionAsPercent); } } catch (Exception e) { logger.warn("updateOH(): getProducts() exception: {}.", e.getMessage()); } } } } channel.existingProducts.resetDirtyFlag(); } logger.trace("updateOH() finished."); return true; }

Target:
public boolean updateOH(VeluxBindingProvider provider, EventPublisher eventPublisher) { logger.trace("updateOH() called."); if (!channel.existingProducts.isDirty()) { logger.trace("updateOH() finished."); return true; } logger.trace("updateOH(): existingProducts have changed."); for (VeluxProduct product : channel.existingProducts.valuesOfModified()) { logger.trace("updateOH(): actuator has changed values.", product.getProductName().toString()); for (String thisItemName : provider.getInBindingItemNames()) { VeluxBindingConfig thisItemConfig = provider.getConfigForItemName(thisItemName); if (thisItemConfig.getBindingItemType() != VeluxItemType.ACTUATOR_SERIAL) { continue; } if (product.getSerialNumber().equals(thisItemConfig.getBindingConfig())) { logger.trace("updateOH(): product {}/{} used within item {}.", product.getProductName(), product.getSerialNumber(), thisItemName); try { PercentType positionAsPercent = new VeluxProductPosition(product.getCurrentPosition()) .getPositionAsPercentType(); if (positionAsPercent != null) { logger.debug("updateOH(): updating item to position {}%.", thisItemName, positionAsPercent); eventPublisher.postUpdate(thisItemName, positionAsPercent); } else { logger.trace("updateOH(): update of item to position skipped.", thisItemName, positionAsPercent); } } catch (Exception e) { logger.warn("updateOH(): getProducts() exception: {}.", e.getMessage()); } } } } channel.existingProducts.resetDirtyFlag(); logger.trace("updateOH() finished."); return true; }
Source:
public byte[][] transformToBytesValuesSV(ProjectionBlock projectionBlock) { if (_results == null) { _results = new byte[DocIdSetPlanNode.MAX_DOC_PER_CALL][]; } byte[][] argumentValues = _transformFunction.transformToBytesValuesSV(projectionBlock); for (int i = 0; i < projectionBlock.getNumDocs(); i++) { try { Geometry geometry = _reader.read(argumentValues[i]); _results[i] = GeometrySerializer.serialize(geometry); } catch (ParseException e) { throw new RuntimeException(String.format("Failed to parse geometry from bytes %s", argumentValues[i])); } } return _results; }

Target:
public byte[][] transformToBytesValuesSV(ProjectionBlock projectionBlock) { if (_results == null) { _results = new byte[DocIdSetPlanNode.MAX_DOC_PER_CALL][]; } byte[][] argumentValues = _transformFunction.transformToBytesValuesSV(projectionBlock); for (int i = 0; i < projectionBlock.getNumDocs(); i++) { try { Geometry geometry = _reader.read(argumentValues[i]); _results[i] = GeometrySerializer.serialize(geometry); } catch (ParseException e) { throw new RuntimeException( String.format("Failed to parse geometry from bytes %s", BytesUtils.toHexString(argumentValues[i]))); } } return _results; }
Source:
public void close() { _baseDataAccessor.close(); }

Target:
public void close() { if (isCurrentOwner()) { throw new HelixException("Please unlock the lock before closing it."); } _baseDataAccessor.close(); }
Source:
protected void configure(NullPointerTester tester) { super.configure(tester); tester.setDefault(InboxId.class, InboxId.getDefaultInstance()) .setDefault(TypeUrl.class, TypeUrl.of(Calc.class)); tester.testStaticMethods(getUtilityClass(), NullPointerTester.Visibility.PACKAGE); }

Target:
protected void configure(NullPointerTester tester) { super.configure(tester); tester.setDefault(InboxId.class, InboxId.getDefaultInstance()) .setDefault(TypeUrl.class, TypeUrl.of(Calc.class)); }
Source:
public void removeAggregateProvidersTest() throws Exception { String provider1name = randomAlphanumeric(5) + "_1", provider2name = randomAlphanumeric(5) + "_2", aggregateProvidersName = randomAlphanumeric(5); Address provider1address = elyOps.getElytronAddress(PROVIDER_LOADER, provider1name), provider2address = elyOps.getElytronAddress(PROVIDER_LOADER, provider2name), aggregateProvidersAddress = elyOps.getElytronAddress(AGGREGATE_PROVIDERS, aggregateProvidersName); page.navigateToApplication().selectResource(AGGREGATE_PROVIDERS_LABEL); try { ops.add(provider1address).assertSuccess(); ops.add(provider2address).assertSuccess(); ops.add(aggregateProvidersAddress, Values.of(PROVIDERS, new ModelNodeListBuilder() .addNode(new ModelNode(provider1name)) .addNode(new ModelNode(provider2name)).build())); page.navigateToApplication().selectResource(AGGREGATE_PROVIDERS_LABEL).getResourceManager() .removeResource(aggregateProvidersName).confirmAndDismissReloadRequiredMessage().assertClosed(); assertFalse("Removed resource should not be present in the table any more!", page.resourceIsPresentInMainTable(aggregateProvidersName)); new ResourceVerifier(aggregateProvidersAddress, client).verifyDoesNotExist(); } finally { ops.removeIfExists(aggregateProvidersAddress); ops.removeIfExists(provider1address); ops.removeIfExists(provider2address); adminOps.reloadIfRequired(); } }

Target:
public void removeAggregateProvidersTest() throws Exception { String provider1name = randomAlphanumeric(5) + "_1", provider2name = randomAlphanumeric(5) + "_2", aggregateProvidersName = randomAlphanumeric(5); Address provider1address = elyOps.getElytronAddress(PROVIDER_LOADER, provider1name), provider2address = elyOps.getElytronAddress(PROVIDER_LOADER, provider2name), aggregateProvidersAddress = elyOps.getElytronAddress(AGGREGATE_PROVIDERS, aggregateProvidersName); try { ops.add(provider1address).assertSuccess(); ops.add(provider2address).assertSuccess(); ops.add(aggregateProvidersAddress, Values.of(PROVIDERS, new ModelNodeListBuilder() .addNode(new ModelNode(provider1name)) .addNode(new ModelNode(provider2name)).build())); page.navigateToApplication().selectResource(AGGREGATE_PROVIDERS_LABEL).getResourceManager() .removeResource(aggregateProvidersName).confirmAndDismissReloadRequiredMessage().assertClosed(); assertFalse("Removed resource should not be present in the table any more!", page.resourceIsPresentInMainTable(aggregateProvidersName)); new ResourceVerifier(aggregateProvidersAddress, client).verifyDoesNotExist(); } finally { ops.removeIfExists(aggregateProvidersAddress); ops.removeIfExists(provider1address); ops.removeIfExists(provider2address); adminOps.reloadIfRequired(); } }
Source:
public boolean visit(final SwitchStatement node) { List<Pair<List<Statement>, List<Statement>>> switchStructure = getSwitchStructure(node); for (int referenceIndex = 0; referenceIndex < switchStructure.size() - 1; referenceIndex++) { for (int comparedIndex = referenceIndex + 1; comparedIndex < switchStructure.size(); comparedIndex++) { Pair<List<Statement>, List<Statement>> referenceCase = switchStructure.get(referenceIndex); Pair<List<Statement>, List<Statement>> comparedCase = switchStructure.get(comparedIndex); if (!referenceCase.getSecond().isEmpty() && breaksControlFlow(referenceCase.getSecond().get(referenceCase.getSecond().size() - 1)) && isTheSameCode(referenceCase.getSecond(), comparedCase.getSecond())) { List<Statement> precedingStatements = switchStructure.get(comparedIndex - 1).getSecond(); if (breaksControlFlow(precedingStatements.get(precedingStatements.size() - 1))) { refactorByMergingCases(false, referenceCase, comparedCase); return DO_NOT_VISIT_SUBTREE; } else if (referenceIndex == 0) { refactorByMergingCases(true, comparedCase, referenceCase); return DO_NOT_VISIT_SUBTREE; } else { precedingStatements = switchStructure.get(referenceIndex - 1).getSecond(); if (breaksControlFlow(precedingStatements.get(precedingStatements.size() - 1))) { refactorByMergingCases(true, comparedCase, referenceCase); return DO_NOT_VISIT_SUBTREE; } } } } } return VISIT_SUBTREE; }

Target:
public boolean visit(final SwitchStatement node) { final List<SwitchCaseSection> switchStructure = getSwitchStructure(node); for (int referenceIndex = 0; referenceIndex < switchStructure.size() - 1; referenceIndex++) { for (int comparedIndex = referenceIndex + 1; comparedIndex < switchStructure.size(); comparedIndex++) { final SwitchCaseSection referenceCase = switchStructure.get(referenceIndex); final SwitchCaseSection comparedCase = switchStructure.get(comparedIndex); if (!referenceCase.stmts.isEmpty() && breaksControlFlow(referenceCase.stmts.get(referenceCase.stmts.size() - 1)) && isSameCode(referenceCase.stmts, comparedCase.stmts)) { List<Statement> precedingStatements = switchStructure.get(comparedIndex - 1).stmts; if (breaksControlFlow(precedingStatements.get(precedingStatements.size() - 1))) { mergeCases(false, referenceCase, comparedCase); return DO_NOT_VISIT_SUBTREE; } else if (referenceIndex == 0) { mergeCases(true, comparedCase, referenceCase); return DO_NOT_VISIT_SUBTREE; } else { precedingStatements = switchStructure.get(referenceIndex - 1).stmts; if (breaksControlFlow(precedingStatements.get(precedingStatements.size() - 1))) { mergeCases(true, comparedCase, referenceCase); return DO_NOT_VISIT_SUBTREE; } } } } } return VISIT_SUBTREE; }
Source:
static Protocol resolve(final Protocol protocol) { Protocol result = new Protocol(protocol.getName(), protocol.getDoc(), protocol.getNamespace()); final Collection<Schema> types = protocol.getTypes(); List<Schema> newSchemas = new ArrayList(types.size()); Map<String, Schema> processed = new HashMap<String, Schema>(); for (Schema schema : types) { newSchemas.add(resolve(schema, protocol, processed)); } result.setTypes(newSchemas); for (Map.Entry<String, Protocol.Message> entry : protocol.getMessages().entrySet()) { Protocol.Message value = entry.getValue(); Protocol.Message nvalue; if (value.isOneWay()) { Schema request = value.getRequest(); nvalue = result.createMessage(value.getName(), value.getDoc(), value.getObjectProps(), intern(request, processed)); } else { Schema request = value.getRequest(); Schema response = value.getResponse(); Schema errors = value.getErrors(); nvalue = result.createMessage(value.getName(), value.getDoc(), value.getObjectProps(), intern(request, processed), intern(response, processed), intern(errors, processed)); } result.getMessages().put(entry.getKey(), nvalue); } copyProps(protocol, result); return result; }

Target:
static Protocol resolve(final Protocol protocol) { Protocol result = new Protocol(protocol.getName(), protocol.getDoc(), protocol.getNamespace()); final Collection<Schema> types = protocol.getTypes(); List<Schema> newSchemas = new ArrayList(types.size()); IdentityHashMap<Schema, Schema> replacements = new IdentityHashMap<Schema, Schema>(); for (Schema schema : types) { newSchemas.add(Schemas.visit(schema, new ResolvingVisitor(schema, replacements, new SymbolTable(protocol)))); } result.setTypes(newSchemas); for (Map.Entry<String, Protocol.Message> entry : protocol.getMessages().entrySet()) { Protocol.Message value = entry.getValue(); Protocol.Message nvalue; if (value.isOneWay()) { Schema replacement = resolve(replacements, value.getRequest(), protocol); nvalue = result.createMessage(value.getName(), value.getDoc(), value.getObjectProps(), replacement); } else { Schema request = resolve(replacements, value.getRequest(), protocol); Schema response = resolve(replacements, value.getResponse(), protocol); Schema errors = resolve(replacements, value.getErrors(), protocol); nvalue = result.createMessage(value.getName(), value.getDoc(), value.getObjectProps(), request, response, errors); } result.getMessages().put(entry.getKey(), nvalue); } Schemas.copyProperties(protocol, result); return result; }
Source:
private void initRevisionActions(ChangeInfo info, RevisionInfo revInfo, boolean hasUser) { NativeMap<ActionInfo> actions = revInfo.has_actions() ? revInfo.actions() : NativeMap.<ActionInfo> create(); actions.copyKeysIntoChildren("id"); canSubmit = false; if (hasUser) { canSubmit = actions.containsKey("submit"); if (canSubmit) { ActionInfo actionInfo = actions.get("submit"); submit.setTitle(actionInfo.title()); submit.setText(actionInfo.label()); } a2b(actions, "/", deleteRevision); a2b(actions, "cherrypick", cherrypick); a2b(actions, "publish", publish); a2b(actions, "rebase", rebase); for (String id : filterNonCore(actions)) { add(new ActionButton(info, revInfo, actions.get(id))); } } }

Target:
private void initRevisionActions(ChangeInfo info, RevisionInfo revInfo, boolean hasUser) { NativeMap<ActionInfo> actions = revInfo.has_actions() ? revInfo.actions() : NativeMap.<ActionInfo> create(); actions.copyKeysIntoChildren("id"); canSubmit = false; if (hasUser) { canSubmit = actions.containsKey("submit"); if (canSubmit) { ActionInfo action = actions.get("submit"); submit.setTitle(action.title()); submit.setHTML(new SafeHtmlBuilder() .openDiv() .append(action.label()) .closeDiv()); } a2b(actions, "/", deleteRevision); a2b(actions, "cherrypick", cherrypick); a2b(actions, "publish", publish); a2b(actions, "rebase", rebase); for (String id : filterNonCore(actions)) { add(new ActionButton(info, revInfo, actions.get(id))); } } }
Source:
private static String generateTitle(Collection<IDataChartDescriptor<?, ?>> descriptors, @Nullable IAxis axis) { String title; if (descriptors.size() <= 0) { return StringUtils.EMPTY; } IDataChartDescriptor<?, ?> descriptor = descriptors.iterator().next(); if (descriptors.size() == 1) { title = descriptor.getLabel(); } else { long nbDiffDescriptorName = descriptors.stream() .map(d -> d.getName()) .distinct() .count(); long nbDiffDescriptorUnits = descriptors.stream() .map(d -> d.getUnit()) .distinct() .count(); title = "Value"; if (nbDiffDescriptorName == 1) { title = descriptor.getName(); } String units = null; if (nbDiffDescriptorUnits == 1) { units = descriptor.getUnit(); } if (units != null) { title = title + ' ' + '(' + units + ')'; } } if (axis != null) { Format format = axis.getTick().getFormat(); if (format instanceof ChartTimeStampFormat) { title = title + ' ' + '(' + ((ChartTimeStampFormat) format).getPattern() + ')'; } } return title; }

Target:
private static String generateTitle(Collection<IDataChartDescriptor<?, ?>> descriptors, @Nullable IAxis axis) { String title; if (descriptors.isEmpty()) { return StringUtils.EMPTY; } IDataChartDescriptor<?, ?> descriptor = descriptors.iterator().next(); long nbDiffDescriptorName = descriptors.stream() .map(d -> d.getName()) .distinct() .count(); long nbDiffDescriptorUnits = descriptors.stream() .map(d -> d.getUnit()) .distinct() .count(); title = "Value"; if (nbDiffDescriptorName == 1) { title = descriptor.getName(); } String units = null; if (nbDiffDescriptorUnits == 1) { units = descriptor.getUnit(); } if (units != null) { title = title + ' ' + '(' + units + ')'; } if (axis != null) { Format format = axis.getTick().getFormat(); if (format instanceof ChartTimeStampFormat) { title = title + ' ' + '(' + ((ChartTimeStampFormat) format).getPattern() + ')'; } } return title; }
Source:
public List<ErlangCallbackFunction> getOptionalCallbacks() { ErlangFileStub stub = getStub(); if (stub != null) { return getChildrenByType(stub, ErlangTypes.ERL_CALLBACK_FUNCTION, new ArrayFactory<ErlangCallbackFunction>() { @NotNull @Override public ErlangCallbackFunction[] create(int count) { return new ErlangCallbackFunction[count]; } }); } final List<ErlangCallbackFunction> result = ContainerUtil.newArrayList(); for (ErlangAttribute attribute : getAttributes()) { ErlangOptionalCallbacks callbacks = attribute.getOptionalCallbacks(); ErlangOptionalCallbackFunctions functions = callbacks != null ? callbacks.getOptionalCallbackFunctions() : null; if (functions == null) continue; for (ErlangCallbackFunction function : functions.getCallbackFunctionList()) { result.add(function); } } return result; }

Target:
public Collection<ErlangCallbackFunction> getOptionalCallbacks() { return myOptionalCallbacks.getValue(); }
Source:
public IPath getGDBPath() { IPath retVal = getDefaultGDBPath(); try { String gdb = getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME); if (gdb == null) { gdb = getLaunchConfiguration().getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, (String) null); } if (gdb != null) { gdb = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(gdb, false); retVal = new Path(gdb); } } catch (CoreException e) { GdbPlugin.log(e.getStatus()); } return retVal; }

Target:
public IPath getGDBPath() { try { String gdb = getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME); if (gdb == null) { gdb = getLaunchConfiguration().getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, getDefaultGDBPath()); } if (gdb != null) { gdb = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(gdb, false); return new Path(gdb); } else { return null; } } catch (CoreException e) { GdbPlugin.log(e.getStatus()); return null; } }
Source:
private EntityGraph createEntityGraph(RequestScope scope, EntityProjection projection) { EntityDictionary dictionary = scope.getDictionary(); Class<?> entityClass = projection.getType(); List<String> relationshipNames = dictionary.getRelationships(entityClass); for (String relationshipName : relationshipNames) { if (!projection.getIncludedRelationsName().contains(relationshipName)) { continue; } RelationshipType type = dictionary.getRelationshipType(entityClass, relationshipName); if (type.isToMany() && !type.isComputed()) { String relationshipClassName = dictionary.getJsonAliasFor( dictionary.getParameterizedType(entityClass, relationshipName)); boolean isDirtyResource = StreamSupport.stream(scope.getDirtyResources().spliterator(), false) .anyMatch(resource -> resource.getType().equals(relationshipClassName)); if (!isDirtyResource || dictionary.cascadeAll(entityClass, relationshipName)) { EntityGraph entityGraph = em.createEntityGraph(entityClass); entityGraph.addAttributeNodes(relationshipName); return entityGraph; } } } return null; }

Target:
private EntityGraph createEntityGraph(RequestScope scope, EntityProjection projection) { EntityDictionary dictionary = scope.getDictionary(); Class<?> entityClass = projection.getType(); EntityGraph entityGraph = em.createEntityGraph(entityClass); boolean toManyAdded = false; for (Relationship relationship : projection.getRelationships()) { RelationshipType type = dictionary.getRelationshipType(entityClass, relationship.getName()); if (type.isComputed()) { continue; } else if (type.isToOne()) { populateSubGraph(entityGraph.addSubgraph(relationship.getName()), scope, relationship.getProjection(), toManyAdded); } else if (type.isToMany()) { if (!toManyAdded && !checkTransient(scope, entityClass, relationship)) { toManyAdded = true; populateSubGraph(entityGraph.addSubgraph(relationship.getName()), scope, relationship.getProjection(), toManyAdded); } } } for (Attribute attribute : projection.getAttributes()) { if (dictionary.isComputed(entityClass, attribute.getName())) { continue; } if (attribute.getType().isAssignableFrom(Collection.class)) { if (!toManyAdded) { entityGraph.addAttributeNodes(attribute.getName()); toManyAdded = true; } } else { entityGraph.addAttributeNodes(attribute.getName()); } } return entityGraph; }
Source:
public static void main(String[] args) throws XmppStringprepException, FileNotFoundException { PrintWriter pw; boolean breakStateName; switch (args.length) { case 0: pw = new PrintWriter(System.out); breakStateName = false; printStateGraph(pw, breakStateName); pw.flush(); break; case 1: Path outputFilePath = Paths.get(args[0]); File outputFile = outputFilePath.toFile(); if (outputFile.exists()) { outputFile.delete(); } pw = new PrintWriter(outputFile); breakStateName = true; printStateGraph(pw, breakStateName); pw.flush(); break; case 2: Path outputFilePathTcp = Paths.get(args[0]); File outputFileTcp = outputFilePathTcp.toFile(); if (outputFileTcp.exists()) { outputFileTcp.delete(); } pw = new PrintWriter(outputFileTcp); breakStateName = true; printStateGraph(pw, breakStateName); pw.flush(); Path outputFilePathWebsocket = Paths.get(args[1]); File outputFileWebsocket = outputFilePathWebsocket.toFile(); if (outputFileWebsocket.exists()) { outputFileWebsocket.delete(); } pw = new PrintWriter(outputFileWebsocket); breakStateName = true; printWebsocketStateGraph(pw, breakStateName); pw.flush(); break; default: throw new IllegalArgumentException("At most two arguments allowed"); } }

Target:
public static void main(String[] args) throws XmppStringprepException, FileNotFoundException { final PrintWriter pw; final boolean breakStateName; switch (args.length) { case 0: pw = new PrintWriter(System.out); breakStateName = false; break; case 1: Path outputFilePath = Paths.get(args[0]); File outputFile = outputFilePath.toFile(); if (outputFile.exists()) { outputFile.delete(); } pw = new PrintWriter(outputFile); breakStateName = true; break; default: throw new IllegalArgumentException("At most one argument allowed"); } printStateGraph(pw, breakStateName); pw.flush(); }
Source:
public void addStatus(AlluxioURI path, UfsStatus status) { UfsStatus prev = mStatuses.putIfAbsent(path, status); if (!path.getName().equals(status.getName())) { throw new IllegalArgumentException( String.format("path name %s does not match ufs status name %s", path.getName(), status.getName())); } }

Target:
public UfsStatus addStatus(AlluxioURI path, UfsStatus status) { if (!path.getName().equals(status.getName())) { throw new IllegalArgumentException( String.format("path name %s does not match ufs status name %s", path.getName(), status.getName())); } return mStatuses.put(path, status); }
Source:
public void addContents(@NonNull Container container, FileListCap fileListCap) { synchronized (fileListCap) { File[] files = fileListCap.getFolder().listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(".txt"); } }); for (File f : Util.fixNull(Arrays.asList(files))) { if (f.length() < MAX_FILE_SIZE) container.add(new FileContent(fileListCap.getFolder().getName() + "/" + f.getName(), f)); else LOGGER.log(Level.INFO, "File : " + f.getAbsolutePath() + " is too large. Max file size is " + MAX_FILE_SIZE + " bytes."); } } }

Target:
public void addContents(@NonNull Container container, FileListCap fileListCap) { synchronized (fileListCap) { File[] files = fileListCap.getFolder().listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(".txt"); } }); for (File f : Util.fixNull(Arrays.asList(files))) { if (f.length() < MAX_FILE_SIZE) container.add(new FileContent(fileListCap.getFolder().getName() + "/" + f.getName(), f)); else { LOGGER.log(Level.INFO, "File : " + f.getAbsolutePath() + " is too large. Max file size is " + MAX_FILE_SIZE + " bytes. Truncating the thread dump."); File truncatedFile = new File(f.getParent(), "truncated-" + f.getName()); FileChannel fileChannel = null; try { FileUtils.copyFile(f, truncatedFile); fileChannel = new FileOutputStream(truncatedFile, true).getChannel(); fileChannel.truncate(MAX_FILE_SIZE * 1l); } catch (FileNotFoundException e) { LOGGER.log(Level.INFO, "Unable to find file.", e); } catch (IOException e) { LOGGER.log(Level.INFO, "Failed to write to file", e); } finally { if (fileChannel != null) { try { fileChannel.close(); } catch (IOException e) { LOGGER.log(Level.FINE, "Failed to close file.", e); } } } if (truncatedFile.exists()) { container.add(new FileContent(fileListCap.getFolder().getName() + "/" + truncatedFile.getName(), truncatedFile)); } else { LOGGER.fine("Issue with truncating file: " + f.getAbsolutePath()); } } } } }
Source:
public static void initializeFromOptions(DebugOptions options, boolean pluginIsDebugging) { if (pluginIsDebugging) { myTrace = new DebugTrace() { public void trace(String location, String message, Throwable error) { } public void trace(String location, String message) { } }; for (GitTraceLocation loc : values()) { boolean active = options.getBooleanOption(loc.getFullPath(), false); loc.setActive(active); } } else { for (GitTraceLocation loc : values()) { loc.setActive(false); } } }

Target:
public static void initializeFromOptions(DebugOptions options, boolean pluginIsDebugging) { if (pluginIsDebugging) { myTrace = new DebugTraceImpl(); for (GitTraceLocation loc : values()) { boolean active = options.getBooleanOption(loc.getFullPath(), false); loc.setActive(active); } } else { for (GitTraceLocation loc : values()) { loc.setActive(false); } } }
Source:
public TObject sumKey(String key, AccessToken creds, TransactionToken transaction, String environment) throws SecurityException, TransactionException, TException { checkAccess(creds, transaction); AtomicSupport store = getStore(transaction, environment); AtomicOperation atomic = null; BigDecimal result = new BigDecimal(0); while (atomic == null || !atomic.commit()) { atomic = store.startAtomicOperation(); try { Map<TObject, Set<Long>> map = atomic.browse(key); for (TObject k : map.keySet()) { Set<Long> records = map.get(k); Object obj = Convert.thriftToJava(k); BigDecimal val = null; if(!(obj instanceof Number)) { throw new UnsupportedOperationException(); } else { Number number = (Number) obj; if(number instanceof Byte || number instanceof Short) { throw new UnsupportedOperationException(); } else { val = Numbers.toBigDecimal(number); } } for (int i = 0; i < records.size(); i++) { result = result.add(val); } } } catch (AtomicStateException e) { atomic = null; result = null; } } return Convert.javaToThrift(result); }

Target:
public TObject sumKey(String key, AccessToken creds, TransactionToken transaction, String environment) throws TException { checkAccess(creds, transaction); AtomicSupport store = getStore(transaction, environment); AtomicOperation atomic = null; Number sum = 0; while (atomic == null || !atomic.commit()) { atomic = store.startAtomicOperation(); try { sum = sumKeyAtomic(key, Time.NONE, sum, atomic); } catch (AtomicStateException e) { atomic = null; sum = 0; } } return Convert.javaToThrift(sum); }
Source:
public Map<String,byte[]> findScriptResources( String targetId ) throws IOException { Map<String,byte[]> result = new HashMap<String,byte[]> (); File targetDir = findTargetDirectory( targetId ); if( targetDir.isDirectory()){ File scriptFile = new File( targetDir, Constants.TARGET_SCRIPT_FILE_NAME ); if( scriptFile.exists()) { ByteArrayOutputStream os = new ByteArrayOutputStream(); Utils.copyStream( scriptFile, os ); result.put( scriptFile.getName(), os.toByteArray()); } } return result; }

Target:
public Map<String,byte[]> findScriptResources( String targetId ) throws IOException { Map<String,byte[]> result = new HashMap<String,byte[]> (); File targetDir = findTargetDirectory( targetId ); String prefix = Utils.removeFileExtension(findTargetFile(targetId, Constants.TARGET_PROPERTIES_FILE_NAME).getName()); if( targetDir.isDirectory()){ List<File> scriptFiles = Utils.listAllFiles(targetDir); for( File scriptFile : scriptFiles) { String name = scriptFile.getName(); if( ! CREATED_BY.equals(name) && name.startsWith(prefix) && ! name.toLowerCase().endsWith(Constants.FILE_EXT_PROPERTIES)) { ByteArrayOutputStream os = new ByteArrayOutputStream(); Utils.copyStream( scriptFile, os ); result.put( scriptFile.getName(), os.toByteArray()); } } } return result; }
Source:
private void updateExternalNics(){ for (VmNetworkInterface nic : vmNetworkInterfaceDao.getAllForVm(getVmId())) { VnicProfile vnicProfile = vnicProfileDao.get(nic.getVnicProfileId()); Network network = networkDao.get(vnicProfile.getNetworkId()); if (network.isExternal()) { Provider<?> provider = providerDao.get(network.getProvidedBy().getProviderId()); NetworkProviderProxy providerProxy = providerProxyFactory.create(provider); providerProxy.allocate(network, vnicProfile, nic, destinationVds); } } }

Target:
private void updateExternalNics(){ Map<VmDeviceId, VmDevice> nicDevices = Entities.businessEntitiesById(vmDeviceDao.getVmDeviceByVmIdAndType(getVmId(), VmDeviceGeneralType.INTERFACE)); for (VmNetworkInterface nic : vmNetworkInterfaceDao.getAllForVm(getVmId())) { VnicProfile vnicProfile = vnicProfileDao.get(nic.getVnicProfileId()); Network network = networkDao.get(vnicProfile.getNetworkId()); if (network.isExternal()) { Provider<?> provider = providerDao.get(network.getProvidedBy().getProviderId()); NetworkProviderProxy providerProxy = providerProxyFactory.create(provider); Map<String, String> deviceProperties = providerProxy.allocate( network, vnicProfile, nic, destinationVds); VmDevice vmDevice = nicDevices.get(new VmDeviceId(nic.getId(), getVmId())); getVm().getRuntimeDeviceCustomProperties().put(vmDevice.getId(), deviceProperties); } } }
Source:
protected void upgradeNexusVersion() throws IOException { final String currentVersion = checkNotNull( applicationStatusSource.getSystemStatus().getVersion() ); final String previousVersion = getConfiguration().getNexusVersion(); if ( currentVersion.equals( previousVersion ) ) { setInstanceUpgraded( false ); } else { setInstanceUpgraded( true ); getConfiguration().setNexusVersion( currentVersion ); storeConfiguration(); eventMulticaster.notifyEventListeners( new NexusVersionChangedEvent( this, previousVersion, currentVersion ) ); } }

Target:
protected void upgradeNexusVersion() throws IOException { final String currentVersion = checkNotNull( applicationStatusSource.getSystemStatus().getVersion() ); final String previousVersion = getConfiguration().getNexusVersion(); if ( currentVersion.equals( previousVersion ) ) { setInstanceUpgraded( false ); } else { setInstanceUpgraded( true ); getConfiguration().setNexusVersion( currentVersion ); storeConfiguration(); } }
Source:
private AmazonS3 getS3Client() { AmazonS3 amazonS3 = null; AWSCredentials awsCredentials = null; AwsClientBuilder.EndpointConfiguration endpointConfiguration = new AwsClientBuilder.EndpointConfiguration(s3Endpoint, getS3Region()); if (StringUtils.isNotBlank(s3AccessKey)) { awsCredentials = new BasicAWSCredentials(s3AccessKey, s3SecretKey); AWSCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(awsCredentials); amazonS3 = AmazonS3ClientBuilder.standard() .withCredentials(credentialsProvider) .withEndpointConfiguration(endpointConfiguration) .build(); } if (amazonS3 == null) { amazonS3 = AmazonS3ClientBuilder.standard().withEndpointConfiguration(endpointConfiguration).build(); } return amazonS3; }

Target:
private AmazonS3 getS3Client() { AwsClientBuilder.EndpointConfiguration endpointConfiguration = new AwsClientBuilder.EndpointConfiguration(s3Endpoint, getS3Region()); if (StringUtils.isNotBlank(s3AccessKey)) { AWSCredentials awsCredentials = new BasicAWSCredentials(s3AccessKey, s3SecretKey); AWSCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(awsCredentials); return AmazonS3ClientBuilder.standard() .withCredentials(credentialsProvider) .withEndpointConfiguration(endpointConfiguration) .build(); } return AmazonS3ClientBuilder.standard() .withEndpointConfiguration(endpointConfiguration) .build(); }
Source:
static void call(final Button b, final String project) { b.setEnabled(false); ChangeApi.createDraftChange(project, "refs/meta/config", Util.C.editConfigMessage(), null, new GerritCallback<ChangeInfo>() { @Override public void onSuccess(ChangeInfo result) { Gerrit.display(Dispatcher.toEditScreen( new PatchSet.Id(result.legacy_id(), 1), "project.config")); } @Override public void onFailure(Throwable caught) { b.setEnabled(true); super.onFailure(caught); } }); }

Target:
static void call(final Button b, final String project) { b.setEnabled(false); ChangeApi.createChange(project, "refs/meta/config", Util.C.editConfigMessage(), null, new GerritCallback<ChangeInfo>() { @Override public void onSuccess(ChangeInfo result) { Gerrit.display(Dispatcher.toEditScreen( new PatchSet.Id(result.legacy_id(), 1), "project.config")); } @Override public void onFailure(Throwable caught) { b.setEnabled(true); super.onFailure(caught); } }); }
Source:
public void checkinProjects(List<Project> projects) { EKBCommit commit = getEKBCommit(); preparePersistenceAccess(); for (Project project : projects) { List<Project> result = queryService.queryByString(Project.class, "name:\"" + project.getName() + "\""); if (result.size() == 0) { commit.addInsert(project); } else { commit.addUpdate(project); } } persistService.commit(commit); revokePersistenceAccess(); }

Target:
public void checkinProjects(List<Project> projects) { EKBCommit commit = getEKBCommit(); preparePersistenceAccess(); for (Project project : projects) { List<Project> result = queryService.query(Project.class, QueryRequest.query("name", project.getName())); if (result.size() == 0) { commit.addInsert(project); } else { commit.addUpdate(project); } } persistService.commit(commit); revokePersistenceAccess(); }
Source:
public ExtensionJobList getExtensionJobs(String extensionName, String sortOrder, String doAsUser) { Comparator<ExtensionJobsBean> compareByJobName = new Comparator<ExtensionJobsBean>() { @Override public int compare(ExtensionJobsBean o1, ExtensionJobsBean o2) { return o1.getJobName().compareToIgnoreCase(o2.getJobName()); } }; Map<String, String> jobAndExtensionNames = new HashMap<>(); List<ExtensionJobsBean> extensionJobs = null; if (extensionName != null) { extensionJobs = new ArrayList<>(ExtensionStore.getMetaStore().getJobsForAnExtension(extensionName)); } else { extensionJobs = new ArrayList<>(ExtensionStore.getMetaStore().getAllExtensionJobs()); } sortOrder = (sortOrder == null) ? ASCENDING_SORT_ORDER : sortOrder; switch (sortOrder.toLowerCase()) { case DESCENDING_SORT_ORDER: Collections.sort(extensionJobs, Collections.reverseOrder(compareByJobName)); break; default: Collections.sort(extensionJobs, compareByJobName); } for (ExtensionJobsBean job : extensionJobs) { jobAndExtensionNames.put(job.getJobName(), job.getExtensionName()); } return new ExtensionJobList(extensionJobs.size(), jobAndExtensionNames); }

Target:
public ExtensionJobList getExtensionJobs(String extensionName, String sortOrder, String doAsUser) { Comparator<ExtensionJobsBean> compareByJobName = new Comparator<ExtensionJobsBean>() { @Override public int compare(ExtensionJobsBean o1, ExtensionJobsBean o2) { return o1.getJobName().compareToIgnoreCase(o2.getJobName()); } }; Map<String, String> jobAndExtensionNames = new HashMap<>(); List<ExtensionJobsBean> extensionJobs = null; if (extensionName != null) { extensionJobs = ExtensionStore.getMetaStore().getJobsForAnExtension(extensionName); } else { extensionJobs = ExtensionStore.getMetaStore().getAllExtensionJobs(); } sortOrder = (sortOrder == null) ? ASCENDING_SORT_ORDER : sortOrder; switch (sortOrder.toLowerCase()) { case DESCENDING_SORT_ORDER: Collections.sort(extensionJobs, Collections.reverseOrder(compareByJobName)); break; default: Collections.sort(extensionJobs, compareByJobName); } for (ExtensionJobsBean job : extensionJobs) { jobAndExtensionNames.put(job.getJobName(), job.getExtensionName()); } return new ExtensionJobList(extensionJobs.size(), jobAndExtensionNames); }
Source:
private static void loadProvider() { try { Class<KieStoreServices> cls = (Class<KieStoreServices>) Class.forName( System.getProperty( "org.kie.store.services.class", "org.drools.persistence.jpa.KnowledgeStoreServiceImpl" ) ); setJPAKnowledgeServiceProvider( cls.newInstance() ); } catch ( Exception e ) { throw new RuntimeException( "Provider org.drools.persistence.jpa.KnowledgeStoreServiceImpl could not be set.", e ); } }

Target:
private static void loadProvider() { String className = System.getProperty( "org.kie.store.services.class", "org.drools.persistence.jpa.KnowledgeStoreServiceImpl" ); try { Class<KieStoreServices> cls = (Class<KieStoreServices>) Class.forName( className ); setJPAKnowledgeServiceProvider( cls.newInstance() ); } catch ( Exception e ) { throw new RuntimeException( "Provider " + className + " could not be set.", e ); } }
Source:
public void toJSONString(JSONStringer stringer) throws JSONException { super.toJSONString(stringer); stringer.keySymbolValuePair(Members.LOOKUP_TYPE.name(), m_lookupType.toString()); stringer.keySymbolValuePair(Members.SORT_DIRECTION.name(), m_sortDirection.toString()); if (m_purpose != FOR_SCANNING_PERFORMANCE_OR_ORDERING) { stringer.keySymbolValuePair(Members.PURPOSE.name(), m_purpose); } stringer.keySymbolValuePair(Members.TARGET_INDEX_NAME.name(), m_targetIndexName); if (m_searchkeyExpressions.size() > 0) { stringer.key(Members.SEARCHKEY_EXPRESSIONS.name()).array(m_searchkeyExpressions); stringer.key(Members.COMPARE_NOTDISTINCT.name()).array(); for (Boolean ignoreNullCandidateValue : m_compareNotDistinct) { stringer.value(ignoreNullCandidateValue); } stringer.endArray(); } if (m_endExpression != null) { stringer.key(Members.END_EXPRESSION.name()); stringer.value(m_endExpression); } if (m_initialExpression != null) { stringer.key(Members.INITIAL_EXPRESSION.name()).value(m_initialExpression); } if (m_skip_null_predicate != null) { stringer.key(Members.SKIP_NULL_PREDICATE.name()).value(m_skip_null_predicate); } }

Target:
public void toJSONString(JSONStringer stringer) throws JSONException { super.toJSONString(stringer); stringer.keySymbolValuePair(Members.LOOKUP_TYPE.name(), m_lookupType.toString()); stringer.keySymbolValuePair(Members.SORT_DIRECTION.name(), m_sortDirection.toString()); if (m_purpose != FOR_SCANNING_PERFORMANCE_OR_ORDERING) { stringer.keySymbolValuePair(Members.PURPOSE.name(), m_purpose); } stringer.keySymbolValuePair(Members.TARGET_INDEX_NAME.name(), m_targetIndexName); if (m_searchkeyExpressions.size() > 0) { stringer.key(Members.SEARCHKEY_EXPRESSIONS.name()).array(m_searchkeyExpressions); booleanArrayToJSONString(stringer, Members.COMPARE_NOTDISTINCT.name(), m_compareNotDistinct); } if (m_endExpression != null) { stringer.key(Members.END_EXPRESSION.name()); stringer.value(m_endExpression); } if (m_initialExpression != null) { stringer.key(Members.INITIAL_EXPRESSION.name()).value(m_initialExpression); } if (m_skip_null_predicate != null) { stringer.key(Members.SKIP_NULL_PREDICATE.name()).value(m_skip_null_predicate); } }
Source:
public LzoProtobufB64LineScheme(Class protoClass) { super(protoClass); }

Target:
public LzoProtobufB64LineScheme(Class protoClass) { super(protoClass); LOG.warn("LzoProtobufB64LineScheme is deprecated, please use LzoProtobufScheme"); }