id
stringlengths
7
14
text
stringlengths
1
106k
229738_75
@SuppressWarnings("unchecked") static RowMapperFactory factory() { return (type, config) -> { if (type instanceof ParameterizedType && getErasedType(type).equals(Map.Entry.class)) { Type keyType = resolveType(KEY_PARAM, type); Type valueType = resolveType(VALUE_PARAM, type); ...
229738_76
@SuppressWarnings("unchecked") static RowMapperFactory factory() { return (type, config) -> { if (type instanceof ParameterizedType && getErasedType(type).equals(Map.Entry.class)) { Type keyType = resolveType(KEY_PARAM, type); Type valueType = resolveType(VALUE_PARAM, type); ...
229738_77
@SuppressWarnings("unchecked") static RowMapperFactory factory() { return (type, config) -> { if (type instanceof ParameterizedType && getErasedType(type).equals(Map.Entry.class)) { Type keyType = resolveType(KEY_PARAM, type); Type valueType = resolveType(VALUE_PARAM, type); ...
229738_78
public static RowMapperFactory factory(Class<?> clazz) { return RowMapperFactory.of(clazz, ConstructorMapper.of(clazz)); }
229738_79
public static RowMapperFactory factory(Class<?> clazz) { return RowMapperFactory.of(clazz, ConstructorMapper.of(clazz)); }
229738_80
public static RowMapperFactory factory(Class<?> clazz) { return RowMapperFactory.of(clazz, ConstructorMapper.of(clazz)); }
229738_81
public static RowMapperFactory factory(Class<?> clazz) { return RowMapperFactory.of(clazz, ConstructorMapper.of(clazz)); }
229738_82
public static RowMapperFactory factory(Class<?> clazz) { return RowMapperFactory.of(clazz, ConstructorMapper.of(clazz)); }
229738_83
public static RowMapperFactory factory(Class<?> clazz) { return RowMapperFactory.of(clazz, ConstructorMapper.of(clazz)); }
229738_84
public static RowMapperFactory factory(Class<?> clazz) { return RowMapperFactory.of(clazz, ConstructorMapper.of(clazz)); }
229738_85
public static RowMapperFactory factory(Class<?> clazz) { return RowMapperFactory.of(clazz, ConstructorMapper.of(clazz)); }
229738_86
public static RowMapperFactory factory(Class<?> clazz) { return RowMapperFactory.of(clazz, ConstructorMapper.of(clazz)); }
229738_87
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_88
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_89
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_90
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_91
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_92
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_93
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_94
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_95
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_96
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_97
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_98
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
229738_99
public static RowMapperFactory factory(Class<?> type) { return RowMapperFactory.of(type, FieldMapper.of(type)); }
2304277_0
public MemberTypeAdditions getMemberTypeAdditions(final String callerMID, final String methodIdentifier, final JavaType targetEntity, final JavaType idType, final MethodParameter... callerParameters) { return getMemberTypeAdditions(callerMID, methodIdentifier, targetEntity, idType, true, callerParameter...
2304277_1
public MemberTypeAdditions getMemberTypeAdditions(final String callerMID, final String methodIdentifier, final JavaType targetEntity, final JavaType idType, final MethodParameter... callerParameters) { return getMemberTypeAdditions(callerMID, methodIdentifier, targetEntity, idType, true, callerParameter...
2304277_2
public static String replaceVars(final CommandTransformation trafo, String text) { /* * TODO: This could also be done the other way around: iterate over all * arguments of the input command and replace the corresponding ${} * occurrences. >> Think about which makes more sense. */ final Map<String, Strin...
2304277_3
public static String replaceVars(final CommandTransformation trafo, String text) { /* * TODO: This could also be done the other way around: iterate over all * arguments of the input command and replace the corresponding ${} * occurrences. >> Think about which makes more sense. */ final Map<String, Strin...
2304277_4
public static String replaceVars(final CommandTransformation trafo, String text) { /* * TODO: This could also be done the other way around: iterate over all * arguments of the input command and replace the corresponding ${} * occurrences. >> Think about which makes more sense. */ final Map<String, Strin...
2304277_5
public static String replaceVars(final CommandTransformation trafo, String text) { /* * TODO: This could also be done the other way around: iterate over all * arguments of the input command and replace the corresponding ${} * occurrences. >> Think about which makes more sense. */ final Map<String, Strin...
2306348_0
public String sayHello( String who ) { return "Hello " + who; }
2306900_0
int getLoadFailures() { return failures; }
2306900_1
@Override public List<String> getAddressesForApplication(String jid) { return delegateStore.getAddressesForApplication(jid); }
2306900_2
@Override public List<String> getAddressesForApplication(String jid) { return delegateStore.getAddressesForApplication(jid); }
2306900_3
@Override public List<String> getAddressesForApplication(String jid) { return delegateStore.getAddressesForApplication(jid); }
2306900_4
public String lookup(URI uri) { Lock lock = this.lock.readLock(); try { lock.lock(); for(String key: map.keySet()) { PropertiesValue entry = map.get(key); Matcher matcher = entry.getPattern().matcher(uri.toString()); if (matcher.matches()) { String value = entry.getApplication(); if (logger.isD...
2306900_5
public String lookup(URI uri) { Lock lock = this.lock.readLock(); try { lock.lock(); for(String key: map.keySet()) { PropertiesValue entry = map.get(key); Matcher matcher = entry.getPattern().matcher(uri.toString()); if (matcher.matches()) { String value = entry.getApplication(); if (logger.isD...
2306900_6
public String lookup(URI uri) { Lock lock = this.lock.readLock(); try { lock.lock(); for(String key: map.keySet()) { PropertiesValue entry = map.get(key); Matcher matcher = entry.getPattern().matcher(uri.toString()); if (matcher.matches()) { String value = entry.getApplication(); if (logger.isD...
2306900_7
public RayoNode next(List<RayoNode> nodes) { lock.lock(); try { boolean recalculate = false; for (RayoNode node: nodes) { Entry stored = nodeKeys.get(node.getHostname()); if (stored == null) { RayoNode clone = clone(node); Entry entry = new Entry(); entry.expected = node.getWeight(); entr...
2306900_8
public RayoNode next(List<RayoNode> nodes) { lock.lock(); try { boolean recalculate = false; for (RayoNode node: nodes) { Entry stored = nodeKeys.get(node.getHostname()); if (stored == null) { RayoNode clone = clone(node); Entry entry = new Entry(); entry.expected = node.getWeight(); entr...
2306900_9
public RayoNode next(List<RayoNode> nodes) { lock.lock(); try { boolean recalculate = false; for (RayoNode node: nodes) { Entry stored = nodeKeys.get(node.getHostname()); if (stored == null) { RayoNode clone = clone(node); Entry entry = new Entry(); entry.expected = node.getWeight(); entr...
2311431_0
public final int orientation(Vertex a, Vertex b, Vertex c) { double result = Geometry.leftOfPlane(a.x, a.y, a.z, b.x, b.y, b.z, c.x, c.y, c.z, x, y, z); if (result > 0.0) { return 1; } else if (result < 0.0) { return -1; } return 0; }
2311431_1
protected Tetrahedron flip4to1(Vertex n) { Deque<OrientedFace> star = getStar(n); ArrayList<Tetrahedron> deleted = new ArrayList<Tetrahedron>(); for (OrientedFace f : star) { deleted.add(f.getIncident()); } assert star.size() == 4; OrientedFace base = star.pop(); Vertex a = base.getV...
2311431_2
public Tetrahedron[] flip2to3() { assert adjacentVertexOrdinal != null; Tetrahedron incident = getIncident(); Vertex opposingVertex = getAdjacentVertex(); Vertex incidentVertex = getIncidentVertex(); Tetrahedron t0 = new Tetrahedron(getVertex(0), incidentVertex, ...
2311431_3
;
2311431_4
;
2316136_0
@Override protected boolean eval( String fieldName, String alias ) { if ( super.eval( fieldName, alias ) ) { return true; } else if ( fieldName.endsWith( getMatchSeparator() + alias ) ) { prefix = fieldName.substring( 0, fieldName.indexOf( getMatchSeparator() + alias ) ); return true; } return false...
2316136_1
public static GeoContext create( GeoContextConfigProvider configProvider ) throws ModelerException { GeoContext geo = new GeoContext(); if ( configProvider == null ) { throw new IllegalArgumentException( "GeoContextConfigProvider cannot be null" ); } String dimName = configProvider.getDimensionName(); if ...
2316136_2
public static GeoContext create( GeoContextConfigProvider configProvider ) throws ModelerException { GeoContext geo = new GeoContext(); if ( configProvider == null ) { throw new IllegalArgumentException( "GeoContextConfigProvider cannot be null" ); } String dimName = configProvider.getDimensionName(); if ...
2316136_3
public static GeoContext create( GeoContextConfigProvider configProvider ) throws ModelerException { GeoContext geo = new GeoContext(); if ( configProvider == null ) { throw new IllegalArgumentException( "GeoContextConfigProvider cannot be null" ); } String dimName = configProvider.getDimensionName(); if ...
2316136_4
public static GeoContext create( GeoContextConfigProvider configProvider ) throws ModelerException { GeoContext geo = new GeoContext(); if ( configProvider == null ) { throw new IllegalArgumentException( "GeoContextConfigProvider cannot be null" ); } String dimName = configProvider.getDimensionName(); if ...
2316136_5
public void addGeoRole( GeoRole geoRole ) { if ( geoRole != null ) { children.add( geoRole ); } }
2316136_6
public GeoRole matchFieldToGeoRole( AvailableField field ) { for ( GeoRole role : this ) { if ( role.evaluate( field.getPhysicalColumn().getId() ) ) { return role; } else if ( field.getPhysicalColumn().getId().startsWith( "pc__" ) ) { // sql data sources prefix the column ids with pc__, if that is...
2316136_7
protected AvailableField determineLocationField( AvailableTable table, LocationRole locationRole, int latColIndex, int lonColIndex, String locale ) { AvailableField locationField = null; int count = table.getAvailableFields().size(); // if the lat&longs where detected with a prefix, use that to try to find a ...
2316136_8
@Override public boolean evaluate( String fieldName ) { boolean result = false; if ( latitudeRole != null ) { result = latitudeRole.evaluate( fieldName ); if ( result ) { return result; } } if ( longitudeRole != null ) { return result || longitudeRole.evaluate( fieldName ); } return re...
2316136_9
public boolean evaluate( String fieldName ) { if ( commonAliases == null || fieldName == null || fieldName.length() == 0 ) { return false; } for ( String alias : commonAliases ) { String testName = fieldName.toLowerCase(); String testAlias = alias.toLowerCase(); if ( eval( testName, testAlias ) ) ...
2316191_0
@GET @Path( "/getDatasourcePermissions" ) @Produces( { APPLICATION_JSON } ) public String getDatasourcePermissions() { boolean canEdit = hasManageAccess(); boolean canView = hasViewAccess(); if ( canEdit ) { return "EDIT"; //$NON-NLS-1$ } else if ( canView ) { return "VIEW"; //$NON-NLS-1$ } return "...
2316191_1
public ModelInfo[] listBusinessModels( String domainName ) throws IOException { List<ModelInfo> models = new ArrayList<ModelInfo>(); // get hold of the metadata repository IMetadataDomainRepository repo = getMetadataRepository(); if ( repo == null ) { error( Messages.getErrorString( "MetadataService.ERROR_0...
2316191_2
public String listBusinessModelsJson( String domainName ) throws IOException { ModelInfo[] models = listBusinessModels( domainName ); JSONSerializer serializer = new JSONSerializer(); String json = serializer.deepSerialize( models ); return json; }
2316191_3
public Model loadModel( String domainId, String modelId ) { if ( domainId == null ) { // we can't do this without a model error( Messages.getErrorString( "MetadataService.ERROR_0003_NULL_DOMAIN" ) ); //$NON-NLS-1$ return null; } if ( modelId == null ) { // we can't do this without a model erro...
2316191_4
public String loadModelJson( String domainId, String modelId ) { Model model = loadModel( domainId, modelId ); JSONSerializer serializer = new JSONSerializer(); String json = serializer.deepSerialize( model ); return json; }
2316191_5
public MarshallableResultSet doQuery( Query query, Integer rowLimit ) { MetadataServiceUtil util = getMetadataServiceUtil(); org.pentaho.metadata.query.model.Query fullQuery = util.convertQuery( query ); QueryXmlHelper helper = new QueryXmlHelper(); String xml = helper.toXML( fullQuery ); return doXmlQuery( x...
2316191_6
public MarshallableResultSet doXmlQuery( String xml, Integer rowLimit ) { IPentahoResultSet resultSet = executeQuery( xml, rowLimit ); if ( resultSet == null ) { return null; } MarshallableResultSet result = getMarshallableResultSet(); result.setResultSet( resultSet ); return result; }
2316191_7
public String doXmlQueryToCdaJson( String xml, int rowLimit ) { IPentahoResultSet resultSet = executeQuery( xml, rowLimit ); if ( resultSet == null ) { return null; } String json = null; try { MetadataServiceUtil util = getMetadataServiceUtil(); Domain domain = util.getDomainObject( xml ); uti...
2316191_8
@DELETE @Path( "/{name : .+}" ) @StatusCodes( { @ResponseCode( code = 204, condition = "JDBC datasource removed successfully." ), @ResponseCode( code = 304, condition = "User is not authorized to remove the JDBC datasource or the connection does not exist." ), @ResponseCode( code = 500, condition = "An unexpe...
2316191_9
@DELETE @Path( "/{name : .+}" ) @StatusCodes( { @ResponseCode( code = 204, condition = "JDBC datasource removed successfully." ), @ResponseCode( code = 304, condition = "User is not authorized to remove the JDBC datasource or the connection does not exist." ), @ResponseCode( code = 500, condition = "An unexpe...
2316200_0
@Override public void notifyAboutReindexComponent(String jCommuneUrl) throws NoConnectionToJcommuneException, JcommuneRespondedWithErrorException, JcommuneUrlNotConfiguredException { checkUrlIsConfigured(jCommuneUrl); notifyJCommune(jCommuneUrl + REINDEX_URL_PART, Method.POST); }
2316200_1
@Override public void notifyAboutReindexComponent(String jCommuneUrl) throws NoConnectionToJcommuneException, JcommuneRespondedWithErrorException, JcommuneUrlNotConfiguredException { checkUrlIsConfigured(jCommuneUrl); notifyJCommune(jCommuneUrl + REINDEX_URL_PART, Method.POST); }
2316200_2
@Override public void notifyAboutReindexComponent(String jCommuneUrl) throws NoConnectionToJcommuneException, JcommuneRespondedWithErrorException, JcommuneUrlNotConfiguredException { checkUrlIsConfigured(jCommuneUrl); notifyJCommune(jCommuneUrl + REINDEX_URL_PART, Method.POST); }
2316200_3
@Override public void notifyAboutReindexComponent(String jCommuneUrl) throws NoConnectionToJcommuneException, JcommuneRespondedWithErrorException, JcommuneUrlNotConfiguredException { checkUrlIsConfigured(jCommuneUrl); notifyJCommune(jCommuneUrl + REINDEX_URL_PART, Method.POST); }
2316200_4
@Override public void notifyAboutSectionDelete(String jCommuneUrl, PoulpeSection section) throws NoConnectionToJcommuneException, JcommuneRespondedWithErrorException, JcommuneUrlNotConfiguredException { checkUrlIsConfigured(jCommuneUrl); notifyJCommune(jCommuneUrl + SECTIONS_URL_PA...
2316200_5
@Override public void notifyAboutSectionDelete(String jCommuneUrl, PoulpeSection section) throws NoConnectionToJcommuneException, JcommuneRespondedWithErrorException, JcommuneUrlNotConfiguredException { checkUrlIsConfigured(jCommuneUrl); notifyJCommune(jCommuneUrl + SECTIONS_URL_PA...
2316200_6
@Override public void notifyAboutSectionDelete(String jCommuneUrl, PoulpeSection section) throws NoConnectionToJcommuneException, JcommuneRespondedWithErrorException, JcommuneUrlNotConfiguredException { checkUrlIsConfigured(jCommuneUrl); notifyJCommune(jCommuneUrl + SECTIONS_URL_PA...
2316200_7
@Override public void notifyAboutBranchDelete(String jCommuneUrl, PoulpeBranch branch) throws NoConnectionToJcommuneException, JcommuneRespondedWithErrorException, JcommuneUrlNotConfiguredException { checkUrlIsConfigured(jCommuneUrl); notifyJCommune(jCommuneUrl + BRANCH_URL_PART ...
2316200_8
@Override public void notifyAboutBranchDelete(String jCommuneUrl, PoulpeBranch branch) throws NoConnectionToJcommuneException, JcommuneRespondedWithErrorException, JcommuneUrlNotConfiguredException { checkUrlIsConfigured(jCommuneUrl); notifyJCommune(jCommuneUrl + BRANCH_URL_PART ...
2316200_9
@Override public void notifyAboutBranchDelete(String jCommuneUrl, PoulpeBranch branch) throws NoConnectionToJcommuneException, JcommuneRespondedWithErrorException, JcommuneUrlNotConfiguredException { checkUrlIsConfigured(jCommuneUrl); notifyJCommune(jCommuneUrl + BRANCH_URL_PART ...
2316202_0
@Override public List<PluginProperty> getConfiguration() { PluginProperty orderProperty = new PluginProperty(ORDER_PROPERTY, PluginProperty.Type.INT, String.valueOf(order)); orderProperty.setHint(ORDER_HINT); return Arrays.asList(orderProperty); }
2316202_1
@Override protected Map<PluginProperty, String> applyConfiguration(List<PluginProperty> properties) throws PluginConfigurationException { if (properties.size() == 1 && ORDER_PROPERTY.equalsIgnoreCase(properties.get(0).getName())) { order = properties.get(0).getValue() == null ? DEFAULT_ORDER_VALUE ...
2316202_2
@Override protected Map<PluginProperty, String> applyConfiguration(List<PluginProperty> properties) throws PluginConfigurationException { if (properties.size() == 1 && ORDER_PROPERTY.equalsIgnoreCase(properties.get(0).getName())) { order = properties.get(0).getValue() == null ? DEFAULT_ORDER_VALUE ...
2316202_3
@Override public List<PluginProperty> getDefaultConfiguration() { PluginProperty orderProperty = new PluginProperty(ORDER_PROPERTY, PluginProperty.Type.INT, String.valueOf(DEFAULT_ORDER_VALUE)); orderProperty.setHint(ORDER_HINT); return Arrays.asList(orderProperty); }
2316202_4
@Override public String translateLabel(String code, Locale locale) { ResourceBundle messages = ResourceBundle.getBundle(MESSAGE_PATH, locale); if (messages.containsKey(code)) { return messages.getString(code); } else { ResourceBundle defaultMessages = ResourceBundle.getBundle(MESSAGE_PATH, ...
2316202_5
@Override public String translateLabel(String code, Locale locale) { ResourceBundle messages = ResourceBundle.getBundle(MESSAGE_PATH, locale); if (messages.containsKey(code)) { return messages.getString(code); } else { ResourceBundle defaultMessages = ResourceBundle.getBundle(MESSAGE_PATH, ...
2316202_6
@SuppressWarnings("unchecked") @Override public <T extends JtalksPermission> List<T> getBranchPermissions() { return (List<T>) QuestionsPluginBranchPermission.getAllAsList(); }
2316202_7
@Override public JtalksPermission getCreateTopicPermission() { return QuestionsPluginBranchPermission.CREATE_QUESTIONS; }
2316202_8
@Override public JtalksPermission getBranchPermissionByMask(int mask) { return QuestionsPluginBranchPermission.findByMask(mask); }
2316202_9
@Override public JtalksPermission getBranchPermissionByMask(int mask) { return QuestionsPluginBranchPermission.findByMask(mask); }
2335594_0
@Override public String resolve(final String pName) { return ""; }
2335594_1
@Override public String resolve(final String pName) { return ""; }
2335594_2
public void addError(final AuditEvent auditEvent) { errors.add(toIssue(auditEvent)); }
2335594_3
public void addException(final AuditEvent auditEvent, final Throwable throwable) { LOG.warn("Exception during CheckStyle execution", throwable); errors.add(toIssue(auditEvent)); }
2335594_4
public void addError(final AuditEvent auditEvent) { errors.add(toIssue(auditEvent)); }
2335594_5
public int tabWidth() { for (final Configuration currentChild : rootElement.getChildren()) { if (TREE_WALKER_ELEMENT.equals(currentChild.getName())) { return intValueOrDefault(getAttributeOrNull(currentChild, "tabWidth"), defaultTabSize()); } } return defaultTabSize(); }
2335594_6
public int tabWidth() { for (final Configuration currentChild : rootElement.getChildren()) { if (TREE_WALKER_ELEMENT.equals(currentChild.getName())) { return intValueOrDefault(getAttributeOrNull(currentChild, "tabWidth"), defaultTabSize()); } } return defaultTabSize(); }
2335594_7
public int tabWidth() { for (final Configuration currentChild : rootElement.getChildren()) { if (TREE_WALKER_ELEMENT.equals(currentChild.getName())) { return intValueOrDefault(getAttributeOrNull(currentChild, "tabWidth"), defaultTabSize()); } } return defaultTabSize(); }
2335594_8
public int tabWidth() { for (final Configuration currentChild : rootElement.getChildren()) { if (TREE_WALKER_ELEMENT.equals(currentChild.getName())) { return intValueOrDefault(getAttributeOrNull(currentChild, "tabWidth"), defaultTabSize()); } } return defaultTabSize(); }
2335594_9
public int tabWidth() { for (final Configuration currentChild : rootElement.getChildren()) { if (TREE_WALKER_ELEMENT.equals(currentChild.getName())) { return intValueOrDefault(getAttributeOrNull(currentChild, "tabWidth"), defaultTabSize()); } } return defaultTabSize(); }
2341027_0
@Override public int readTo(DecoderAdapter dest, String encoded, MessageParamField field ) { int decodedValue = IntegerEncoded.parseInt(encoded, radix); dest.putInt(field.dbFieldName, decodedValue); return 1; }
2349183_0
public boolean checkPidPgrpidForMatch() { return checkPidPgrpidForMatch(pid, PROCFS); }
2349183_1
public <T extends _> Generic<T> root(String name, EnumSet<EOpt> opts) { return new Generic<T>(name, null, opts); }