Convert from Jetstream feedback values to MQ values.

@param fb A Jetstream feedback value
@return The equivalent MQ value
489754
@Override
    public Integer convertJSFeedbackToMQ(Integer fb) {
        Integer result = null;

        if (SIApiConstants.REPORT_COA.equals(fb)) {
            result = Integer.valueOf(ApiJmsConstants.MQFB_COA);
        }
        else if (SIApiConstants.REPORT_COD.equals(fb)) {
            result = Integer.valueOf(ApiJmsConstants.MQFB_COD);
        }
        else if (SIApiConstants.REPORT_EXPIRY.equals(fb)) {
            result = Integer.valueOf(ApiJmsConstants.MQFB_EXPIRATION);
        }
        else if (SIApiConstants.REPORT_PAN.equals(fb)) {
            result = Integer.valueOf(ApiJmsConstants.MQFB_PAN);
        }
        else if (SIApiConstants.REPORT_NAN.equals(fb)) {
            result = Integer.valueOf(ApiJmsConstants.MQFB_NAN);
        }
        else {
            // All other values passed unchanged
            result = fb;
        }

        return result;
    }
638759
@Override
    public final Integer getReportFeedback() {
        Integer result = (Integer) getApi().getField(JsApiAccess.REPORTFEEDBACKINT_VALUE);
        if (result == null) {
            // if the integer report feedback field is unset theres a chance that the byte
            // version may have been set by a down level sender. If the message is backed
            // by an MQ encapsulation this wont be the case since both these operations
            // end up looking in the same place in the MQMD,  but if its native JMF
            // then the values may differ.
            Byte temp = (Byte) getApi().getField(JsApiAccess.REPORTFEEDBACK_VALUE);
            result = (temp == null) ? null : Integer.valueOf(temp.intValue());
        }
        return result;
    }
1267457
@Override
  public String getRealmForPeer(String fqdn) {
    //
    Collection<Realm> realms = getRealms();
    for (Realm r : realms) {
      IRealm ir = (IRealm) r;
      if (ir.hasPeerName(fqdn)) {
        return ir.getName();
      }
    }
    return null;
  }
65559
public boolean fbml_refreshRefUrl(URL url)
    throws FacebookException, IOException {
    return extractBoolean(this.callMethod(FacebookMethod.FBML_REFRESH_REF_URL,
                                          new Pair<String, CharSequence>("url", url.toString())));
  }
1191027
private boolean isInlineAppend(FQMethod fqm) {
        if (!SignatureUtils.isPlainStringConvertableClass(fqm.getClassName())) {
            return false;
        }

        if (stack.getStackDepth() <= 1) {
            return true;
        }

        OpcodeStack.Item itm = stack.getStackItem(1);
        return itm.getUserValue() == UCPMUserValue.INLINE;
    }
27121
private <T> QueryRequest<T> query(String fql, JavaType type) {
		this.checkForBatchExecution();
		
		if (this.multiqueryRequest == null) {
			this.multiqueryRequest = new MultiqueryRequest(mapper, this.createUnmappedChain());
			this.graphRequests.add(this.multiqueryRequest);
		}
		
		// There is a circular reference between the extractor and request, so construction of the chain
		// is a little complicated
		QueryNodeExtractor extractor = new QueryNodeExtractor(this.multiqueryRequest);
		
		String name = "__q" + this.generatedQueryNameIndex++;
		QueryRequest<T> q =
			new QueryRequest<T>(fql, name,
				new MapperWrapper<T>(type, this.mapper,
						extractor));
		
		extractor.setRequest(q);
		
		this.multiqueryRequest.addQuery(q);
		return q;
	}
1093453
@Override
	public FbBotMillResponse createResponse(MessageEnvelope envelope) {
		FbBotMillResponse response = null;

		switch (attachmentType) {
		case FILE:
			response = ReplyFactory.addFileAttachment(url).build(envelope);
			break;
		case IMAGE:
			response = ReplyFactory.addImageAttachment(url).build(envelope);
			break;
		case AUDIO:
			response = ReplyFactory.addAudioAttachment(url).build(envelope);
			break;
		case VIDEO:
			response = ReplyFactory.addVideoAttachment(url).build(envelope);
			break;
		default:
			String message = "Illegal attachment of type [ " + attachmentType.name() + " ] for AttachmentAutoReply";
			logger.error(message);
			throw new BotMillIllegalAttachmentException(message);
		}
		return response;
	}
861929
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "FCBL_FIELD_COULD_BE_LOCAL", justification = "False positives occur when state is maintained across callbacks")
    @Override
    public void visitCode(Code obj) {
        try {
            Method m = getMethod();
            if (m.isPublic() && !m.isSynthetic() && "clone".equals(m.getName()) && (m.getArgumentTypes().length == 0)) {

                String returnClsName = m.getReturnType().getSignature();
                returnClsName = SignatureUtils.stripSignature(returnClsName);
                if (!clsName.equals(returnClsName)) {
                    if (Values.DOTTED_JAVA_LANG_OBJECT.equals(returnClsName)) {
                        bugReporter.reportBug(
                                new BugInstance(this, BugType.CU_CLONE_USABILITY_OBJECT_RETURN.name(), NORMAL_PRIORITY).addClass(this).addMethod(this));
                    } else {
                        JavaClass clonedClass = Repository.lookupClass(returnClsName);
                        if (!cls.instanceOf(clonedClass)) {
                            bugReporter.reportBug(
                                    new BugInstance(this, BugType.CU_CLONE_USABILITY_MISMATCHED_RETURN.name(), HIGH_PRIORITY).addClass(this).addMethod(this));
                        }
                    }
                }

                ExceptionTable et = m.getExceptionTable();

                if ((et != null) && (et.getLength() > 0)) {

                    throwsCNFE = false;
                    if (prescreen(m)) {
                        stack.resetForMethodEntry(this);
                        super.visitCode(obj);
                    }

                    if (!throwsCNFE) {
                        bugReporter.reportBug(new BugInstance(this, BugType.CU_CLONE_USABILITY_THROWS.name(), NORMAL_PRIORITY).addClass(this).addMethod(this));
                    }
                }
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        }
    }
394504
public static UploadAttachmentResponse postUploadAttachment(
			StringEntity input) {
		String pageToken = FbBotMillContext.getInstance().getPageToken();
		// If the page token is invalid, returns.
		if (!validatePageToken(pageToken)) {
			return null;
		}

		String url = FbBotMillNetworkConstants.FACEBOOK_BASE_URL
				+ FbBotMillNetworkConstants.FACEBOOK_UPLOAD_API_URL + pageToken;
		BotMillNetworkResponse response = postInternal(url, input);

		// Parses the response as a UploadAttachmentResponse and returns it.
		return FbBotMillJsonUtils.fromJson(response.getResponse(),
				UploadAttachmentResponse.class);
	}
91134
public T profile_getFBML(Integer userId)
    throws FacebookException, IOException {
    return this.callMethod(FacebookMethod.PROFILE_GET_FBML,
                           new Pair<String, CharSequence>("uid", Integer.toString(userId)));

  }
719544
public FbBotMillResponse build(MessageEnvelope envelope) {
		User recipient = getRecipient(envelope);
		Message message = new TextMessage(messageText);
		message.setQuickReplies(quickReplies);
		return new FbBotMillMessageResponse(recipient, message);
	}
652909
def get_fba_obj_flux(self, objective):
        """"""
        flux_result = self.solve_fba(objective)
        return flux_result.get_value(self._v_wt[objective])
670288
@SuppressWarnings("unchecked")
    @Override
    public E poll() {
        // local load of field to avoid repeated loads after volatile reads
        final AtomicReferenceArray<E> buffer = consumerBuffer;
        final long index = lpConsumerIndex();
        final long mask = consumerMask;
        final int offset = calcElementOffset(index, mask);
        // LoadLoad
        final Object e = lvElement(buffer, offset);
        boolean isNextBuffer = e == JUMP;
        if (null != e && !isNextBuffer) {
            // this ensures correctness on 32bit platforms
            soConsumerIndex(index + 1);
            soElement(buffer, offset, null);
            return (E) e;
        } else if (isNextBuffer) {
            return newBufferPoll(buffer, index);
        }
        return null;
    }
479190
public Converter<NetworkResponse, ?> getResponseConverter(Type type, Annotation[] annotations) {
        checkNotNull(type, "type == null");
        checkNotNull(annotations, "annotations == null");

        for (int i = 0, count = converterFactories.size(); i < count; i++) {
            Converter<NetworkResponse, ?> converter =
                    converterFactories.get(i).fromResponse(type, annotations);
            if (converter != null) {
                return converter;
            }
        }

        StringBuilder builder = new StringBuilder("Could not locate Response converter for ")
                .append(type)
                .append(". Tried:");
        for (Factory converterFactory : converterFactories) {
            builder.append("\n * ").append(converterFactory.getClass().getName());
        }
        throw new IllegalArgumentException(builder.toString());
    }
1324185
public static int multiplyRgb(int rgb, double fr, double fg, double fb)
    {
        if (rgb == 0)
        {
            return rgb;
        }

        final int a = rgb >> Constant.BYTE_4 & 0xFF;
        final int r = (int) UtilMath.clamp((rgb >> Constant.BYTE_3 & 0xFF) * fr, 0, 255);
        final int g = (int) UtilMath.clamp((rgb >> Constant.BYTE_2 & 0xFF) * fg, 0, 255);
        final int b = (int) UtilMath.clamp((rgb >> Constant.BYTE_1 & 0xFF) * fb, 0, 255);

        // CHECKSTYLE IGNORE LINE: BooleanExpressionComplexity|TrailingComment
        return (a & 0xFF) << Constant.BYTE_4
               | (r & 0xFF) << Constant.BYTE_3
               | (g & 0xFF) << Constant.BYTE_2
               | (b & 0xFF) << Constant.BYTE_1;
    }
1189388
public Matrix4f getFinalTransformMatrix()
    {
        final FloatBuffer fb = ByteBuffer.allocateDirect(4*4*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
        NativeBone.getFinalTransformMatrix(getNative(), fb);
        return new Matrix4f(fb);
    }
78921
static int getBitsPerItemForFpRate(double fpProb,double loadFactor) {
		/*
		 * equation from Cuckoo Filter: Practically Better Than Bloom Bin Fan,
		 * David G. Andersen, Michael Kaminsky , Michael D. Mitzenmacher
		 */
		return DoubleMath.roundToInt(DoubleMath.log2((1 / fpProb) + 3) / loadFactor, RoundingMode.UP);
	}