Convert GetOrderReferenceDetailsRequest to name value pairs
555907
private function _convertGetOrderReferenceDetails($request) {
        
        $parameters = array();
        $parameters['Action'] = 'GetOrderReferenceDetails';
        if ($request->isSetAmazonOrderReferenceId()) {
            $parameters['AmazonOrderReferenceId'] =  $request->getAmazonOrderReferenceId();
        }
        if ($request->isSetSellerId()) {
            $parameters['SellerId'] =  $request->getSellerId();
        }
        if ($request->isSetAddressConsentToken()) {
            $parameters['AddressConsentToken'] = $request->getAddressConsentToken();
        }

        return $parameters;
    }
103765
protected void parseFunctionReference(I_CmsXmlContentLocation node) {

        String name = node.getSubValue(N_NAME).asString(m_cms);
        CmsUUID functionId = node.getSubValue(N_FUNCTION).asId(m_cms);
        CmsUUID functionDefaultPageId = null;
        I_CmsXmlContentValueLocation defaultPageValue = node.getSubValue(N_FUNCTION_DEFAULT_PAGE);
        if (defaultPageValue != null) {
            functionDefaultPageId = defaultPageValue.asId(m_cms);
        }
        I_CmsXmlContentValueLocation orderNode = node.getSubValue(N_ORDER);
        int order = I_CmsConfigurationObject.DEFAULT_ORDER;
        if (orderNode != null) {
            String orderStr = orderNode.asString(m_cms);
            try {
                order = Integer.parseInt(orderStr);
            } catch (NumberFormatException e) {
                // noop
            }
        }
        m_functionReferences.add(new CmsFunctionReference(name, functionId, functionDefaultPageId, order));
    }
1135028
def get(self, name, default=_MISSING):
        """"""
        name = self._convert_name(name)
        if name not in self._fields:
            if default is _MISSING:
                default = self._default_value(name)
            return default
        if name in _UNICODEFIELDS:
            value = self._fields[name]
            return value
        elif name in _LISTFIELDS:
            value = self._fields[name]
            if value is None:
                return []
            res = []
            for val in value:
                if name not in _LISTTUPLEFIELDS:
                    res.append(val)
                else:
                    # That's for Project-URL
                    res.append((val[0], val[1]))
            return res

        elif name in _ELEMENTSFIELD:
            value = self._fields[name]
            if isinstance(value, string_types):
                return value.split(',')
        return self._fields[name]
182246
private String processViewPropertySvgReference(final String viewProperty) throws IOException {
        // find start of value
        int indexOfColon = viewProperty.indexOf(':');
        if (indexOfColon > -1) {
            int indexOfValueStart = -1;
            int indexOfSQ = viewProperty.indexOf('\'',
                                                 indexOfColon + 1);
            int indexOfDQ = viewProperty.indexOf('"',
                                                 indexOfColon + 1);
            if (indexOfSQ > -1) {
                indexOfValueStart = indexOfSQ;
            } else {
                indexOfValueStart = indexOfDQ;
            }
            if (indexOfValueStart > -1) {
                String viewValue = viewProperty.substring(indexOfValueStart + 1);

                // find end of value
                int indexOfValueEnd = -1;
                indexOfSQ = viewValue.lastIndexOf('\'');
                indexOfDQ = viewValue.lastIndexOf('"');
                if (indexOfSQ > -1) {
                    indexOfValueEnd = indexOfSQ;
                } else {
                    indexOfValueEnd = indexOfDQ;
                }
                if (indexOfValueEnd > -1) {
                    viewValue = viewValue.substring(0,
                                                    indexOfValueEnd);
                    if (viewValue.endsWith(SVG_FILE_SUFFIX)) {
                        // read svg file
                        String svgContents = getReferencedSvgFileContents(viewValue);
                        if (svgContents != null) {
                            String ignorableViewProperty = viewProperty.replace("\"view\"",
                                                                                "\"_view_file\"");
                            StringBuilder newViewProperty = new StringBuilder(ignorableViewProperty).append(LINE_SEPARATOR);
                            newViewProperty.append(viewProperty.substring(0,
                                                                          indexOfValueStart));
                            newViewProperty.append("\"").append(svgContents).append("\",").append(LINE_SEPARATOR);
                            return newViewProperty.toString();
                        }
                    }
                }
            }
        }

        // property not changed, return original property
        return viewProperty + LINE_SEPARATOR;
    }
140844
function buildOrderingPartial(requestQuery) {
        var query = [];
        var l = _u.isArray(requestQuery.order) ? requestQuery.order.length : 0;
        for (var fdx = 0; fdx < l; ++fdx) {
            var order = requestQuery.order[fdx],
                column = requestQuery.columns[order.column];

            if (column.orderable === 'true' && column.name) {
                query.push(column.name + " " + order.dir);
            }
        }
        if (query.length)
            return " ORDER BY " + query.join(", ");
        return "";
    }
193464
public final Object getDetailObject(Object selectedObject, boolean forceLoad)
    {
        if (forceLoad || !isDetailObject(selectedObject))
            return loadDetailObject(selectedObject);
        return selectedObject;
    }
417454
def referencesGenerator(self, request):
        
        referenceSet = self.getDataRepository().getReferenceSet(
            request.reference_set_id)
        results = []
        for obj in referenceSet.getReferences():
            include = True
            if request.md5checksum:
                if request.md5checksum != obj.getMd5Checksum():
                    include = False
            if request.accession:
                if request.accession not in obj.getSourceAccessions():
                    include = False
            if include:
                results.append(obj)
        return self._objectListGenerator(request, results)
1160531
function fetchExternals(request, body) {

    var includes = parseIncludes(request);
    var user = request.user;
    var requestsByType = groupIncludes(includes, body);

    return when.all(_.map(requestsByType, function(requestData, ancestorType) {
        var ids = _.uniq(requestData.ids);
        return fetchAncestor(ancestorType, ids, _.compact(_.map(requestData.includes, function(i) { return _.rest(i).join("."); })).join(","), request)
          .then(function(response){
            return response;
          })
          .then(function(data) {
            _.each(requestData.includes, function(split) {
              mergeAncestorData(body, split, ancestorType, data);
            });
          })
          .catch(function(err) { console.trace(err.stack || err); });
      })).then(function() {
        return body;
      });
  }
530094
@Override
    void findReferencedClassNames(final Set<String> classNameListOut) {
        for (final TypeParameter typeParameter : typeParameters) {
            typeParameter.findReferencedClassNames(classNameListOut);
        }
        if (superclassSignature != null) {
            superclassSignature.findReferencedClassNames(classNameListOut);
        }
        for (final ClassRefTypeSignature typeSignature : superinterfaceSignatures) {
            typeSignature.findReferencedClassNames(classNameListOut);
        }
    }
420583
function() {
      var pairs = _self.querystring().split('&');
      var params = {};

      for(var i=0; i<pairs.length; i++) {
        if(pairs[i] === '') continue;
        var nameValue = pairs[i].split('=');
        params[nameValue[0]] = (typeof nameValue[1] === 'undefined' || nameValue[1] === '') ? true : decodeURIComponent(nameValue[1]);
      }

      return params;
    }
1170413
@Override
	public IServiceReference[] getServiceReferences(String clazz, String filter) throws PlatformServicesException {
		final String sourceMethod = "getServiceReferences"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(PlatformServicesImpl.class.getName(), sourceMethod, new Object[]{clazz, filter});
		}
		ServiceReferenceOSGi[] refs = null;
		try {
			BundleContext bundleContext = Activator.getBundleContext();
			if (bundleContext != null) {
				ServiceReference<?>[] platformRefs = bundleContext.getServiceReferences(clazz, filter);
				if (platformRefs != null) {
					refs = new ServiceReferenceOSGi[platformRefs.length];
					for (int i = 0; i < platformRefs.length; i++) {
						refs[i] = new ServiceReferenceOSGi(platformRefs[i]);
					}
				}
			}
		} catch (InvalidSyntaxException e) {
			throw new PlatformServicesException(e);
		}
		if (isTraceLogging) {
			log.exiting(PlatformServicesImpl.class.getName(), sourceMethod, refs != null ? Arrays.asList(new IServiceReference[refs.length]) : null);
		}
		return refs;

	}
317572
def get_footerReference(self, type_):
        """"""
        path = "./w:footerReference[@w:type='%s']" % WD_HEADER_FOOTER.to_xml(type_)
        footerReferences = self.xpath(path)
        if not footerReferences:
            return None
        return footerReferences[0]
282872
@Override
	public <T> T getOrDefine(final String key, final T defaultValue, DomainResolver resolver) {
		return getOrDefine(key, defaultValue, resolver, null);
	}
694994
function getIdentifierReferences(path, loadPluginsVariableName) {
  const requireReferences = getReferences(path, loadPluginsVariableName);

  const identifierReferences = lodash(requireReferences)
    .map(getIdentifierVariableName)
    .filter()
    .map(identifierVariableName => getReferences(path, identifierVariableName))
    .flatten()
    .value();

  return identifierReferences;
}
814828
ITypedReferenceableInstance getDuringWalk(Id id, ObjectGraphWalker walker) throws RepositoryException {
        ClassStore cS = getClassStore(id.getTypeName());
        if (cS == null) {
            throw new RepositoryException(String.format("Unknown Class %s", id.getTypeName()));
        }
        cS.validate(this, id);
        ReferenceableInstance r = cS.createInstance(this, id);
        cS.load(r);
        for (String traitName : r.getTraits()) {
            HierarchicalTypeStore tt = typeStores.get(traitName);
            tt.load(r);
        }

        walker.addRoot(r);
        return r;
    }
919663
def get_referenced_object(self):
        

        if self._BillingInvoice is not None:
            return self._BillingInvoice

        if self._DraftPayment is not None:
            return self._DraftPayment

        if self._MasterCardAction is not None:
            return self._MasterCardAction

        if self._Payment is not None:
            return self._Payment

        if self._PaymentBatch is not None:
            return self._PaymentBatch

        if self._RequestResponse is not None:
            return self._RequestResponse

        if self._ScheduleInstance is not None:
            return self._ScheduleInstance

        if self._TabResultResponse is not None:
            return self._TabResultResponse

        if self._WhitelistResult is not None:
            return self._WhitelistResult

        raise exception.BunqException(self._ERROR_NULL_FIELDS)
802760
function getKeyDetailsString (key, redisConnection, data, next) {
  redisConnection.get(key, function (err, val) {
    if (err) {
      api.log('getRedisString: ' + err, 'error');
    }

    var details = {
      key: key,
      type: 'string',
      value: val
    };
    
    data.response.details = details;
    next();
  });
}