code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public Duration dividedBy(long divisor){
if (divisor == 0) {
throw new ArithmeticException("Cannot divide by zero");
}
if (divisor == 1) {
return this;
}
return create(toSeconds().divide(BigDecimal.valueOf(divisor),RoundingMode.DOWN));
}
| Returns a copy of this duration divided by the specified value. <p> This instance is immutable and unaffected by this method call. |
public static double cdf(double val,int v){
double x=v / (val * val + v);
return 1 - (0.5 * BetaDistribution.regularizedIncBeta(x,v * .5,0.5));
}
| Static version of the CDF of the t-distribution for t > 0 |
public int size(){
return size;
}
| Get the size of the array. |
public Info_Column(String colHeader,String colSQL,Class<?> colClass,boolean readOnly){
super(colHeader,colSQL,colClass,readOnly,false,null);
}
| Create Info Column (not color column) |
public boolean isFillPoints(){
return mFillPoints;
}
| Returns if the chart points should be filled. |
public static boolean equals(Object a,Object b){
return a == null ? b == null : a.equals(b);
}
| Compares two objects for equality. |
public ApplicationDescription clone(){
ApplicationDescription result=new ApplicationDescription();
result.ApplicationUri=ApplicationUri;
result.ProductUri=ProductUri;
result.ApplicationName=ApplicationName;
result.ApplicationType=ApplicationType;
result.GatewayServerUri=GatewayServerUri;
result.DiscoveryP... | Deep clone |
public static <A,B>Pair<A,B> create(A a,B b){
return new Pair<A,B>(a,b);
}
| Convenience method for creating an appropriately typed pair. |
IgfsFileAffinityRange(IgfsFileAffinityRange other,int status){
startOff=other.startOff;
endOff=other.endOff;
affKey=other.affKey;
this.status=status;
}
| Creates new range with updated status. |
public boolean mergeCSSFrom(CSSClassManager other) throws CSSNamingConflict {
for ( CSSClass clss : other.getClasses()) {
this.addClass(clss);
}
return true;
}
| Merge CSS classes, for example to merge two plots. |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:17.108 -0500",hash_original_method="CC8D5ED8CB2C3C80437353ABAD2DF566",hash_generated_method="1A35D553520A52DA0CAD178CDB8F9B9B") private static String formatElapsedTime(String... | Fast formatting of m:ss |
public void testIsBase64Encoded(){
System.out.println("isBase64Encoded");
String data="VGhpcyBpcyBhIHRlc3Qgc3RyaW5nIHdpdGggc3BlY2lhbCBjaGFycyBsaWtlIHRoczogL0BeJiooKCl7fXs6Ow==";
boolean result=Encoding.isBase64Encoded(data);
assertTrue(result);
String data1="This is a test string with special chars like ths: ... | Test of isBase64Encoded method, of class EncodingChecker. |
protected void Number() throws javax.xml.transform.TransformerException {
if (null != m_token) {
double num;
try {
if ((m_token.indexOf('e') > -1) || (m_token.indexOf('E') > -1)) throw new NumberFormatException();
num=Double.valueOf(m_token).doubleValue();
}
catch ( NumberFormatExcep... | Number ::= [0-9]+('.'[0-9]+)? | '.'[0-9]+ |
public static void main(final String[] args){
BufferedReader reader=IOUtils.getBufferedReader(args[0]);
List<Integer> sizes=getSizeInfo(reader);
ChartUtil chart=getHistogram(sizes);
chart.saveAsPng(args[1] + "/cliques_distribution.png",800,600);
}
| usage: PlotCliqueSizeDistribution cliqueFile outputDir |
public static void main(String argv[]){
Main converter=new Main();
System.exit(converter.convert(argv) ? 0 : 1);
}
| Main program |
public void createOverlay(DrawingView view){
createOverlay(view,null);
}
| Creates the overlay within the given container. |
public static void rollback(){
if ((getEntityManager().getTransaction() != null) && getEntityManager().getTransaction().isActive()) {
getEntityManager().getTransaction().rollback();
}
}
| <p> Undo an uncommitted transaction, in the event of an error or other problem. </p> |
public void endIteration(SelectResults results){
}
| Called once right before iteration of a 'select' statement ends. |
public static boolean areBasic(Class<?> dClass,Class<?> sClass){
return isBasic(dClass) && isBasic(sClass);
}
| Returns true if both classes are of base type, false otherwise. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:44.065 -0500",hash_original_method="863150B34251535222F20C0EAB163E01",hash_generated_method="C6707C99228A8487FEA6AB57A4EE8C5B") public int model(){
return theModel;
}
| Returns the content models of this element type. |
private void updateProgress(int progress){
if (myHost != null) {
myHost.updateProgress(progress);
}
else {
System.out.println("Progress: " + progress + "%");
}
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public void testNextDouble(){
double f=ThreadLocalRandom.current().nextDouble();
int i=0;
while (i < NCALLS && ThreadLocalRandom.current().nextDouble() == f) ++i;
assertTrue(i < NCALLS);
}
| Repeated calls to nextDouble produce at least two distinct results |
public ArrayIntBig(){
pages=new ArrayList<int[]>();
length=0;
}
| Create an <code>IntArray</code>. Memory consumption is equal to creating a new <code>ArrayList</code>. |
public FormatInteger(final int in){
this(in,false);
}
| Construct a format for an integer. |
public EventSetDescriptor(String eventSetName,Class<?> listenerType,Method listenerMethods[],Method addListenerMethod,Method removeListenerMethod) throws IntrospectionException {
this(eventSetName,listenerType,listenerMethods,addListenerMethod,removeListenerMethod,null);
}
| Creates an <TT>EventSetDescriptor</TT> from scratch using <TT>java.lang.reflect.Method</TT> and <TT>java.lang.Class</TT> objects. |
@Override public String globalInfo(){
return "This Bayes Network learning algorithm uses a hill climbing algorithm " + "restricted by an order on the variables.\n\n" + "For more information see:\n\n" + getTechnicalInformation().toString() + "\n\n"+ "Works with nominal variables and no missing values only.";
}
| This will return a string describing the search algorithm. |
public void messageEvent(String selection){
m_notifier.notifyEvent(new MessageEvent(selection),new Vector<Object>());
}
| messageEvent(String selection) |
public static long bytes2LedgerId(byte[] data){
return Long.valueOf(new String(data,UTF_8));
}
| Deserialize bytes into ledger id. |
private CompletableFuture<Long> apply(InitializeEntry entry){
long timestamp=executor.timestamp(entry.getTimestamp());
for ( ServerSessionContext session : executor.context().sessions().sessions.values()) {
session.setTimestamp(timestamp);
}
log.release(entry.getIndex());
return Futures.completedFutureAs... | Applies an initialize entry to the state machine. <p> Initialize entries are committed by leaders at the start of their term. Typically, no-op entries serve as a mechanism to allow leaders to commit entries from prior terms. However, we extend the functionality of the no-op entry to use it as an indicator that a leader... |
public String uploadFile(Part filePart,final String bucketName) throws IOException {
DateTimeFormatter dtf=DateTimeFormat.forPattern("-YYYY-MM-dd-HHmmssSSS");
DateTime dt=DateTime.now(DateTimeZone.UTC);
String dtString=dt.toString(dtf);
final String fileName=filePart.getSubmittedFileName() + dtString;
BlobInf... | Uploads a file to Google Cloud Storage to the bucket specified in the BUCKET_NAME environment variable, appending a timestamp to end of the uploaded filename. |
public List<RegSpillListElement> createDU(LiveSet set){
if (DEBUG) {
System.out.println("creating a RegList for " + set);
}
List<RegSpillListElement> regList=new LinkedListRVM<RegSpillListElement>();
LiveSetEnumerator lsEnum=set.enumerator();
while (lsEnum.hasMoreElements()) {
RegisterOperand regOp=ls... | TODO What is this method doing in this class ?? RJG This method creates a regSpillList from the passed live set. |
public String bucketName(){
return bucketName;
}
| Returns bucket name. |
protected void addIfdData(IfdData data){
mIfdDatas[data.getId()]=data;
}
| Adds IFD data. If IFD data of the same type already exists, it will be replaced by the new data. |
public double normalDistanceSquared(final double x,final double y,final double z){
double t=dotProduct(x,y,z);
double deltaX=this.x * t - x;
double deltaY=this.y * t - y;
double deltaZ=this.z * t - z;
return deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ;
}
| Compute the square of the normal distance to a vector described by a vector taken from the origin. Monotonically increasing for arc distances up to PI/2. |
public void pause(){
animation.pause();
}
| Pause animation |
public boolean isDeleteDurableQueue(){
return deleteDurableQueue;
}
| Returns whether this role can delete durable queues bound to the address. |
public String toSourceCode(ObjectMatrix1D matrix){
Formatter copy=(Formatter)this.clone();
copy.setPrintShape(false);
copy.setColumnSeparator(", ");
String lead="{";
String trail="};";
return lead + copy.toString(matrix) + trail;
}
| Returns a string <tt>s</tt> such that <tt>Object[] m = s</tt> is a legal Java statement. |
public DataBufferByte(int size,int numBanks){
super(STABLE,TYPE_BYTE,size,numBanks);
bankdata=new byte[numBanks][];
for (int i=0; i < numBanks; i++) {
bankdata[i]=new byte[size];
}
data=bankdata[0];
}
| Constructs a byte based <CODE>DataBuffer</CODE> with the specified number of banks all of which are the specified size. |
public static String extractDoctypeDeclaration(String html){
int doctypeBeginTagPtr=html.indexOf("<!DOCTYPE");
if (doctypeBeginTagPtr == -1) {
doctypeBeginTagPtr=html.indexOf("<!doctype");
if (doctypeBeginTagPtr == -1) {
return "";
}
}
int doctypeEndTagPtr=html.indexOf('>',doctypeBeginTagPtr);... | This method extracts the doctype declaration from the html source code |
@Override public ImmutableSet<Entry<K,V>> entrySet(){
return super.entrySet();
}
| Returns an immutable set of the mappings in this map, sorted by the key ordering. |
public Solution(int numberOfVariables,int numberOfObjectives){
this(numberOfVariables,numberOfObjectives,0);
}
| Constructs a solution with the specified number of variables and objectives with no constraints. |
public void testMultipleFilteredEvents() throws Exception {
TungstenProperties config=helper.createDoubleQueueWithFilter(10,10,0,3,false);
ReplicatorRuntime runtime=new ReplicatorRuntime(config,new MockOpenReplicatorContext(),ReplicatorMonitor.getInstance());
Pipeline pipeline=prepareAndStartPipeline(config,runti... | Verify that if we filter more than one event in succession, a filtered event is generated with the start sequence number set to the first event filtered and the end sequence number set to the last event filtered. |
public void stopRepeating(KeyCommandBind kcb){
if (!repeatingTasks.containsKey(kcb)) {
return;
}
repeatingTasks.get(kcb).cancel();
repeatingTasks.remove(kcb);
}
| Stops the repeat timer task for the given KeyCommandBind. |
public void writeOffset(long offset) throws IOException {
dataOutputStream.writeLong(offset);
}
| Write the offset to the file |
private void processAnsiCommand_S(){
}
| Scroll up n lines (default = 1 line). |
public static IStructuredDocumentRegion findStructuredDocumentRegion(Set<String> types,Set<String> abortTypes,IStructuredDocumentRegion searchStartRegion,boolean searchForward){
IStructuredDocumentRegion region=searchForward ? searchStartRegion.getNext() : searchStartRegion.getPrevious();
while (region != null) {
... | Searches for the specified structured document region type, in the direction specified. |
public static boolean equals(byte[] hashA,byte[] hashB){
if (hashA == hashB) return true;
else if (hashA == null || hashB == null) return false;
int len=hashA.length;
if (len != hashB.length) return false;
for (int i=len - 1; i >= 0; i--) {
if (hashA[i] != hashB[i]) return false;
}
return t... | Check for equality |
protected ParameterizedPropertyAccessExpressionImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public void writeTo(StreamOutput out) throws IOException {
out.writeString(name);
out.writeString(type);
Settings.writeSettingsToStream(settings,out);
}
| Writes repository metadata to stream output |
public static Map<String,Object> userLogin(DispatchContext ctx,Map<String,?> context){
LocalDispatcher dispatcher=ctx.getDispatcher();
Locale locale=(Locale)context.get("locale");
Delegator delegator=ctx.getDelegator();
if (!AuthHelper.authenticatorsLoaded()) {
AuthHelper.loadAuthenticators(dispatcher);
}... | Login service to authenticate username and password |
public void writeBinary(ByteBuffer bin) throws TException {
int length=bin.limit() - bin.position();
writeBinary(bin.array(),bin.position() + bin.arrayOffset(),length);
}
| Write a byte array, using a varint for the size. |
@Override public int compareTo(Value arg0){
if (arg0 instanceof ArrayVal) {
double[] otherVector=((ArrayVal)arg0).getArray();
if (array.length != otherVector.length) {
return array.length - otherVector.length;
}
else {
for (int i=0; i < array.length; i++) {
double val1=array[i];
... | Compares to another value. |
public Set<Account.Id> findAll(ReviewDb db,String nameOrEmail) throws OrmException {
Matcher m=Pattern.compile("^.* \\(([1-9][0-9]*)\\)$").matcher(nameOrEmail);
if (m.matches()) {
Account.Id id=Account.Id.parse(m.group(1));
if (exists(db,id)) {
return Collections.singleton(id);
}
return Collec... | Find all accounts matching the name or name/email string. |
public String toString(){
if (m_namespace != null && m_namespace.length() > 0) return "{" + m_namespace + "}"+ m_extensionName;
else return m_extensionName;
}
| Return the name of the extesion function in string format |
private void returnData(Object ret){
if (myHost != null) {
myHost.returnData(ret);
}
}
| Used to communicate a return object from a plugin tool to the main Whitebox user-interface. |
public Dimension toViewCoordinates(Dimension size){
return new Dimension(size);
}
| Converts a size in pixel coordinates to view coordinates. Subclasses of viewport that support "logical coordinates" will override this method. |
public static String trim(CharSequence s){
if (s == null) {
return null;
}
Matcher m=sTrimPattern.matcher(s);
return m.replaceAll("$1");
}
| Trims the string, removing all whitespace at the beginning and end of the string. Non-breaking whitespaces are also removed. |
public static byte[] toMACAddress(String macAddress){
return MacAddress.of(macAddress).getBytes();
}
| Accepts a MAC address of the form 00:aa:11:bb:22:cc, case does not matter, and returns a corresponding byte[]. |
private void validateTestDataOffsetDTTypes(String tableName,int expectedRowCount) throws Exception {
Connection testConn=getConnectionWithProps("autoDeserialize=true");
Statement testStmt=testConn.createStatement();
this.rs=testStmt.executeQuery("SELECT * FROM " + tableName);
int rowCount=0;
while (rs.next())... | Helper method for *SetObject* tests. Validate the test data contained in the given ResultSet with following structure: 1 - `id` INT 2 - `ot1` VARCHAR 3 - `ot2` BLOB 4 - `odt1` VARCHAR 5 - `odt2` BLOB Additionally validate support for the types java.time.Offset[Date]Time in ResultSet.getObject(). |
private static Boolean loginUser(FinanceService service,String userID,String userPassword){
try {
service.setUserCredentials(userID,userPassword);
}
catch ( AuthenticationException e) {
System.err.println("Invalid Credentials!");
e.printStackTrace();
return false;
}
return true;
}
| Authenticates the user with the Google server after reading in the user email and password. |
public byte[] encode(byte[] pArray){
return encodeBase64(pArray,false);
}
| Encodes a byte[] containing binary data, into a byte[] containing characters in the Base64 alphabet. |
public long lastIndex(){
assertSegmentOpen();
return !isEmpty() ? offsetIndex.lastOffset() + descriptor.index() + skip : descriptor.index() - 1;
}
| Returns the index of the last entry in the segment. |
void recalcDimensions(){
final int wOld=fWidth;
final int hOld=fHeight;
calcDimensions();
if (wOld != fWidth || hOld != fHeight) {
fComponent.invalidate();
}
}
| Calculates the dimensions. If they've changed, invalidates the component |
public DividerBuilder erase(){
return with(Divider.ERASER);
}
| Adds the eraser drawable to all the sides of the divider. |
@Override protected EClass eStaticClass(){
return TypeRefsPackage.Literals.INTERSECTION_TYPE_EXPRESSION;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static int replaceAll(RTextArea textArea,String toFind,String replaceWith,boolean matchCase,boolean wholeWord,boolean regex) throws PatternSyntaxException {
int count=0;
textArea.beginAtomicEdit();
try {
if (regex) {
if (replaceWith == null) {
replaceWith="";
}
int oldOffs=tex... | Replaces all instances of the text/regular expression specified in the specified document with the specified replacement. |
public static long staticNextLongFromTo(long from,long to){
synchronized (shared) {
return shared.nextLongFromTo(from,to);
}
}
| Returns a uniformly distributed random number in the closed interval <tt>[from,to]</tt> (including <tt>from</tt> and <tt>to</tt>). Pre conditions: <tt>from <= to</tt>. |
public FilterQuery locations(final double[][] locations){
this.locations=locations;
return this;
}
| Sets locations |
public static int computeTexturePixelFormat(int internalFormat){
switch (internalFormat) {
case GL2.GL_ALPHA:
case GL2.GL_ALPHA4:
case GL2.GL_ALPHA8:
case GL2.GL_ALPHA12:
case GL2.GL_ALPHA16:
case GL2.GL_COMPRESSED_ALPHA:
return GL2.GL_ALPHA;
case GL2.GL_COMPRESSED_LUMINANCE:
case GL2.GL_LUMINANCE:
case GL2.GL_LUMI... | Returns an OpenGL pixel format corresponding to the specified texture internal format. This maps internal format to pixel format as follows: <code> <table> <tr><th>Internal Format</th><th>Pixel Format</th></tr> <tr><td>GL2.GL_ALPHA</td><td>GL2.GL_ALPHA</td></tr> <tr><td>GL2.GL_ALPHA4</td><td>GL2.GL_ALPHA</td></tr> <tr>... |
@Override protected void init(){
this.environmentEventRegistry.init();
}
| Called before loading data and setting defaults |
@SuppressWarnings("unchecked") public static <T>Predicate<T> alwaysTrue(){
return (Predicate<T>)TRUE;
}
| A Predicate that is always true |
public _Fields fieldForId(int fieldId){
return _Fields.findByThriftId(fieldId);
}
| Description: <br> |
@NotNull public Pair<List<Commit>,Integer> addCommits(@NotNull List<? extends Commit> savedLog,@NotNull Collection<CommitId> previousRefs,@NotNull List<? extends Commit> firstBlock,@NotNull Collection<CommitId> newRefs){
Pair<Integer,Set<Commit>> newCommitsAndSavedGreenIndex=getNewCommitsAndSavedGreenIndex(savedLog,p... | Attaches the block of latest commits, which was read from the VCS, to the existing log structure. |
protected boolean isIdatKind(String id){
return false;
}
| Decides if this Chunk is of "IDAT" kind (in concrete: if it is, and if it's not to be skiped, a DeflatedChunksSet will be created to deflate it and process+ the deflated data) This implementation always returns always false |
public static String readFromFile(final InputStream path) throws IOException {
InputStreamReader fr=null;
BufferedReader br=null;
StringBuilder stringBuilder=new StringBuilder();
try {
fr=new InputStreamReader(path);
br=new BufferedReader(fr);
String line;
while ((line=br.readLine()) != null) {
... | Read contents From Stream. |
public boolean isHasNoBody(){
return hasNoBody;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override public String toString(){
if (eIsProxy()) return super.toString();
StringBuffer result=new StringBuffer(super.toString());
result.append(" (declaredCovariantConstructor: ");
result.append(declaredCovariantConstructor);
result.append(')');
return result.toString();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@SuppressLint("NewApi") private void onSelectionCleared(){
mOnContactSelectedListener.onSelectionCleared();
getListView().clearChoices();
}
| Called when ListView selection is cleared, for example when search mode is finished and the currently selected contact should no longer be selected. |
@Override public boolean supportsOpenCursorsAcrossRollback(){
debugCodeCall("supportsOpenCursorsAcrossRollback");
return false;
}
| Returns whether open result sets across rollback are supported. |
@Override protected IMember resolveMember() throws JavaModelException {
char[] declarationSignature=fProposal.getDeclarationSignature();
String typeName=SignatureUtil.stripSignatureToFQN(String.valueOf(declarationSignature));
IType type=fJavaProject.findType(typeName);
if (type != null) {
String name=String... | Resolves the member described by the receiver and returns it if found. Returns <code>null</code> if no corresponding member can be found. |
String inprogressZNode(long ledgerId,long firstTxId,long logSegmentSeqNo){
return logMetadata.getLogSegmentsPath() + "/" + inprogressZNodeName(ledgerId,firstTxId,logSegmentSeqNo);
}
| Get the znode path for the inprogressZNode |
private static void s_uavar(SparseBlock a,double[] c,int m,int n,CM_COV_Object cbuff,CM cm,int rl,int ru) throws DMLRuntimeException {
int count=(ru - rl) * n - (int)a.size(rl,ru);
cbuff.w=count;
if (a.isContiguous()) {
var(a.values(rl),a.pos(rl),(int)a.size(rl,ru),cbuff,cm);
}
else {
for (int i=rl; i ... | VAR, opcode: uavar, sparse input. |
@Override public String toString(){
StringBuilder buf=new StringBuilder(32);
switch (this.eventType) {
case TYPE_EXECUTE:
buf.append("EXECUTE");
break;
case TYPE_FETCH:
buf.append("FETCH");
break;
case TYPE_OBJECT_CREATION:
buf.append("CONSTRUCT");
break;
case TYPE_PREPARE:
buf.append("PREPARE");
break;
case TY... | Returns a representation of this event as a String. |
private void updateMenuIcon(){
Icon frameIcon=frame.getFrameIcon();
SynthContext context=getContext(this);
if (frameIcon != null) {
Dimension maxSize=(Dimension)context.getStyle().get(context,"InternalFrameTitlePane.maxFrameIconSize");
int maxWidth=16;
int maxHeight=16;
if (maxSize != null) {
... | Resets the menuButton icon to match that of the frame. |
public SeveralAttachments(){
requestFileName="attachments.query";
requestContentType="multipart/related; charset=UTF-8; " + "boundary=jetty771207119h3h10dty";
responseFile="attachm.answer";
}
| Constructs the test case. |
public static String makeLogTag(Class cls){
return makeLogTag(cls.getSimpleName());
}
| WARNING: Don't use this when obfuscating class names with Proguard! |
private int measureLong(int measureSpec){
int result;
int specMode=MeasureSpec.getMode(measureSpec);
int specSize=MeasureSpec.getSize(measureSpec);
if ((specMode == MeasureSpec.EXACTLY) || (mViewPager == null)) {
result=specSize;
}
else {
final int count=mViewPager.getAdapter().getCount();
result... | Determines the width of this view |
@DSComment("Package priviledge") @DSBan(DSCat.DEFAULT_MODIFIER) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:38.504 -0500",hash_original_method="509B8D432808DFEEDB9A2530ACB4E595",hash_generated_method="C716B16F4C7B37D4606F4D39D268B8A6") String checkString(String s,int base){
... | Returns a string suitable for passing to OpenSSL. Throws if 's' doesn't match Java's rules for valid BigInteger strings. BN_dec2bn and BN_hex2bn do very little checking, so we need to manually ensure we comply with Java's rules. http://code.google.com/p/android/issues/detail?id=7036 |
@Override public boolean revokeLock(){
File lockDir=getLockDir();
File lockedFile=new File(lockDir,LOCK_FILE_NAME);
File infoFile=new File(lockDir,INFO_FILE_NAME);
lockedFile.delete();
infoFile.delete();
return lockDir.delete();
}
| Revokes a lock owned by another process. |
public boolean retainAll(AbstractBooleanList other){
if (!(other instanceof BooleanArrayList)) return super.retainAll(other);
int limit=other.size() - 1;
int j=0;
boolean[] theElements=elements;
int mySize=size();
double N=(double)other.size();
double M=(double)mySize;
if ((N + M) * cern.jet.math.Arit... | Retains (keeps) only the elements in the receiver that are contained in the specified other list. In other words, removes from the receiver all of its elements that are not contained in the specified other list. |
public static void loggerInit(Level level,boolean isRedirectStdOutErr,String format) throws IOException {
setLoggingFormat(format);
Logger rootLogger=Logger.getLogger("");
for ( Handler handler : rootLogger.getHandlers()) {
handler.setLevel(level);
}
rootLogger.setLevel(level);
if (isRedirectStdOutErr)... | Init java util logging |
public ObjectStreamField(String name,Class<?> cl,boolean unshared){
if (name == null) {
throw new NullPointerException("name == null");
}
else if (cl == null) {
throw new NullPointerException("cl == null");
}
this.name=name;
this.type=(cl.getClassLoader() == null) ? cl : new WeakReference<Class<?>>... | Constructs an ObjectStreamField with the specified name, type and the indication if it is unshared. |
public ImageImportDescriptor(BinaryInputBuffer in) throws java.io.IOException {
OriginalFirstThunk=in.readDWORD();
TimeDateStamp=in.readDWORD();
ForwarderChain=in.readDWORD();
Name=in.readDWORD();
FirstThunk=in.readDWORD();
}
| Parses an ImageImportDescriptor from an input stream. |
protected DefaultDirectedGraph<V,E> computeReverseJGraph(){
DefaultDirectedGraph<V,E> r=new DefaultDirectedGraph<V,E>(edgeClass);
for ( V v : vertexSet()) if (!r.addVertex(v)) throw new IllegalStateException("internal error while adding vertices");
for ( E e : edgeSet()) {
V src=getEdgeSource(e);
V ... | Returns a reverted version of this graph in a jGraph That is a graph containing exactly the same nodes as this one but for each edge from v1 to v2 in this graph the resulting graph will contain an edge from v2 to v1 - or in other words the reverted edge This is used to revert CFGs in order to determine control dependen... |
public Dimension minimumLayoutSize(Container target){
synchronized (target.getTreeLock()) {
boolean useBaseline=getAlignOnBaseline();
Dimension dim=new Dimension(0,0);
int nmembers=target.getComponentCount();
int maxAscent=0;
int maxDescent=0;
boolean firstVisibleComponent=true;
for (int i=0... | Returns the minimum dimensions needed to layout the <i>visible</i> components contained in the specified target container. |
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){
switch (featureID) {
case SGenPackage.REAL_LITERAL__VALUE:
return getValue();
}
return super.eGet(featureID,resolve,coreType);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public Object parse(String text) throws DataParseException {
try {
StringTokenizer st=new StringTokenizer(text,"\"[](){}, ");
double[] array=new double[st.countTokens()];
for (int i=0; st.hasMoreTokens(); ++i) {
String tok=st.nextToken();
array[i]=Double.parseDouble(tok);
}
return arra... | Parse an int array from a text string. |
public T caseExpressionAnnotationList(ExpressionAnnotationList object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Expression Annotation List</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
@Deprecated public final String readLine() throws IOException {
char buf[]=lineBuffer;
if (buf == null) {
buf=lineBuffer=new char[128];
}
int room=buf.length;
int offset=0;
int c;
loop: while (true) {
switch (c=in.read()) {
case -1:
case '\n':
break loop;
case '\r':
int c2=in.read();
if ... | See the general contract of the <code>readLine</code> method of <code>DataInput</code>. <p> Bytes for this operation are read from the contained input stream. |
public HttpStatus deleteUser(String username){
logger.info("GitlabService : deleteUser " + username);
if (gitlabToken == null || gitlabToken.trim().length() == 0) {
logger.warn("Cannot use this feature because no token for GitLab");
return HttpStatus.NOT_IMPLEMENTED;
}
if (gitlabAPI == null || gitlabAPI... | Delete an user on Gitlab |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.