code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public boolean intersects(final Rect r){
return !(x1 > r.x2 || x2 < r.x1 || y1 > r.y2 || y2 < r.y1);
}
| Tells if this rectangle intersects the specified other rectangle. |
public static ClassProperties loadProperties(Class[] cls,Properties properties,boolean inherit){
ClassProperties cp=new ClassProperties(properties);
for ( Class c : cls) {
cp.load(c,inherit);
}
return cp;
}
| For all the classes, loads all properties from each Class annotations for the given platform. |
public static void saveLastColor(Context context,String hexaVal){
try {
Color.parseColor(hexaVal);
SharedPreferences sharedPreferences=context.getSharedPreferences("colpick",Context.MODE_PRIVATE);
SharedPreferences.Editor editor=sharedPreferences.edit();
editor.putString(SP_KEY_LAST_COLOR,hexaVal);
... | Saves the color in SharedPreferences as the last picked color |
private double pointLineDistance(double[] line,double[] point){
return Vector.magnitude(Vector.subtract(Vector.multiply(Vector.dot(line,point) / Vector.dot(line,line),line),point));
}
| Returns the minimum perpendicular distance between a point and a line. |
public static void main(String[] args){
System.setProperty("java.net.useSystemProxies","true");
launch(args);
}
| The main() method is ignored in correctly deployed JavaFX application. main() serves only as fallback in case the application can not be launched through deployment artifacts, e.g., in IDEs with limited FX support. NetBeans ignores main(). |
public IdentifiableLanguage(final String language){
this.language=language;
name=null;
}
| Instantiates a new language. |
public DoubleMatrix1D like(int size){
return content.like1D(size);
}
| Construct and returns a new empty matrix <i>of the same dynamic type</i> as the receiver, having the specified size. For example, if the receiver is an instance of type <tt>DenseDoubleMatrix1D</tt> the new matrix must also be of type <tt>DenseDoubleMatrix1D</tt>, if the receiver is an instance of type <tt>SparseDoubleM... |
public TFunction createTFunction(){
TFunctionImpl tFunction=new TFunctionImpl();
return tFunction;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public JSONStringer value(long l) throws JSONException {
return this.append(Long.toString(l));
}
| Append a long value. |
private TailFilter(){
super("TailFilter");
}
| Constructs tail filter. |
public GeometryFunction find(String name){
for (Iterator i=functions.iterator(); i.hasNext(); ) {
GeometryFunction func=(GeometryFunction)i.next();
String funcName=func.getName();
if (funcName.equalsIgnoreCase(name)) return func;
}
return null;
}
| Finds the first function which matches the given name. |
public static void dropTable(SQLiteDatabase db,boolean ifExists){
String sql="DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "'ParentModel'";
db.execSQL(sql);
}
| Drops the underlying database table. |
public Element create(String prefix,Document doc){
return new SVGOMAnimateMotionElement(prefix,(AbstractDocument)doc);
}
| Creates an instance of the associated element type. |
public static String toHex(byte[] data){
StringBuilder sb=new StringBuilder(data.length << 2);
for (int i=0; i < data.length; i++) {
sb.append(String.format("%02X ",data[i]));
}
return sb.toString().trim();
}
| Create a hex string from an array of bytes. |
public void addVersionQueryCallback(OneSheeldVersionQueryCallback versionQueryCallback){
if (versionQueryCallback != null && !versionQueryCallbacks.contains(versionQueryCallback)) versionQueryCallbacks.add(versionQueryCallback);
}
| Add a version query callback. |
public String sampleSizeTipText(){
return "Number of instances to sample. Default (-1) indicates that all " + "instances will be used for attribute estimation.";
}
| Returns the tip text for this property |
public static final String[] decode(String src){
if (src == null || src.length() == 0) {
return (new String[0]);
}
return StringUtils.split(src,SEPARATOR);
}
| Splits the string into an Array |
public static void sendNotification(Context context,String accountName,Intent intent,int notificaitonId){
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK).addFlags(Intent.FLAG_FROM_BACKGROUND);
PendingIntent pendingIntent=PendingIntent.getActivity(context,0,intent,PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCom... | Sends a notification to request permission. |
public boolean isEnabled(String key){
Assert.isLegal(key != null);
Object value=fOptions.get(key);
return CleanUpOptions.TRUE == value || CleanUpOptions.TRUE.equals(value);
}
| Tells whether the option with the given <code>key</code> is enabled. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:38:09.171 -0500",hash_original_method="E5144E6A37A93F7F98A78F4E9AEFF229",hash_generated_method="BDE1DC750BBB940FD57874A67E1B34A2") public int head() throws IOException {
return sendCommand(NNTPCommand.HEAD);
}
| A convenience method to send the NNTP HEAD command to the server, receive the initial reply, and return the reply code. <p> |
public <T>JsonStringMap<T> createMapDtoFromJson(InputStream json,Class<T> dtoInterface) throws IOException {
return createMapDtoFromJson(new InputStreamReader(json),dtoInterface);
}
| Parses the JSON data from the specified stream into map of objects of the specified type. |
public final byte readByte() throws IOException {
int temp=this.read();
if (temp < 0) {
throw new EOFException();
}
return (byte)temp;
}
| Reads an 8-bit byte from the current position in this file. Blocks until one byte has been read, the end of the file is reached or an exception is thrown. |
public static void main(String[] args) throws Exception {
TestInstances inst;
inst=new TestInstances();
if (Utils.getFlag("h",args) || Utils.getFlag("help",args)) {
StringBuffer result=new StringBuffer();
result.append("\nTest data generator options:\n\n");
result.append("-h|-help\n\tprints this help\... | for running the class from commandline, prints the generated data to stdout |
public LiquibaseMigration(String path){
this.path=path;
}
| Creates <code>LiquibaseMigration</code> that migrates using specified XML file. |
@Override public void onInit(List<? extends IndexCommit> commits) throws IOException {
if (commits.isEmpty()) {
return;
}
log.info("SolrDeletionPolicy.onInit: commits: {}",new CommitsLoggingInfo(commits));
log.debug("SolrDeletionPolicy.onInit: commits: {}",new CommitsLoggingDebug(commits));
updateCommits(... | Internal use for Lucene... do not explicitly call. |
public void assertNoException(Runnable expression,String message){
TestUtils.assertNoException(expression,message);
}
| This method just invokes the test utils method, it is here for convenience |
public static int optionLength(String option){
if (option.equals(OUTPUT_OPTION)) {
return 2;
}
if (option.equals(CONTENT_OPTION)) {
return 2;
}
if (option.equals(BUILD_OPTION)) {
return 2;
}
if (option.equals(PORTAL_SRC_OPTION)) {
return 2;
}
if (option.equals(ROOT_DIRECTORY)) {
re... | Required by Doclet to check command line options |
public static void subscribeToDiskReports(Callback callback){
subscribe(Type.DISK,callback);
}
| Subscribes to reports of disk usage |
public static boolean isNestedStruct(String variable_type){
return Struct.AllStructsName.contains("." + variable_type + " ");
}
| Check whether the struct is nested. |
public final String dumpDistribution(){
StringBuffer text;
int i, j;
text=new StringBuffer();
for (i=0; i < m_perBag.length; i++) {
text.append("Bag num " + i + "\n");
for (j=0; j < m_perClass.length; j++) {
text.append("Class num " + j + " "+ m_perClassPerBag[i][j]+ "\n");
}
}
return text... | Prints distribution. |
public ScrambledZipfianGenerator(long _min,long _max){
this(_min,_max,ZipfianGenerator.ZIPFIAN_CONSTANT);
}
| Create a zipfian generator for items between min and max. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:52.951 -0500",hash_original_method="27928DA5608E3EA81ACF98D07D1CDAA8",hash_generated_method="51462A14CCF991407A4464C8FB796E4C") @DSSafe(DSCat.UTIL_FUNCTION) public Object decode(Object pObject) throws DecoderException {
if (!(pObj... | Decodes an Object using the base64 algorithm. This method is provided in order to satisfy the requirements of the Decoder interface, and will throw a DecoderException if the supplied object is not of type byte[]. |
public _BuildUpdate(final _BuildUpdate_Flag[] flags){
super(flags);
}
| Constructs a _BuildUpdate with the given flags initially set. |
public static boolean isUrl(String value){
return URL_VALIDATOR.isValid(value);
}
| Checks if a field has a valid absolute URL address. |
private void updateVideoControls(@NonNull VideoPlayerApi videoPlayer){
VideoApi api=(VideoApi)videoPlayer;
EMVideoView videoView=api.getVideoView();
if (videoView == null) {
return;
}
VideoControls videoControls=videoView.getVideoControls();
if (videoControls != null) {
videoControls.setPreviousButt... | Updates the available controls on the VideoView and links the button events to the playlist service and this. |
public static String replaceEscapedRightAngle(String s){
StringBuilder buf=new StringBuilder();
int i=0;
while (i < s.length()) {
char c=s.charAt(i);
if (c == '<' && s.substring(i).startsWith("<\\\\>")) {
buf.append("<\\\\>");
i+="<\\\\>".length();
continue;
}
if (c == '>' && s.s... | Replace >\> with >> in s. Replace \>> unless prefix of \>>> with >>. Do NOT replace if it's <\\> |
private static int NewShortArray(JNIEnvironment env,int length){
if (traceJNI) VM.sysWrite("JNI called: NewShortArray \n");
RuntimeEntrypoints.checkJNICountDownToGC();
try {
short[] newArray=new short[length];
return env.pushJNIRef(newArray);
}
catch ( Throwable unexpected) {
if (traceJNI) ... | NewShortArray: create a new short array |
public boolean isPopupVisible(JComboBox a){
boolean returnValue=((ComboBoxUI)(uis.elementAt(0))).isPopupVisible(a);
for (int i=1; i < uis.size(); i++) {
((ComboBoxUI)(uis.elementAt(i))).isPopupVisible(a);
}
return returnValue;
}
| Invokes the <code>isPopupVisible</code> method on each UI handled by this object. |
public static List propertyDescriptors(int apiLevel){
return PROPERTY_DESCRIPTORS;
}
| Returns a list of structural property descriptors for this node type. Clients must not modify the result. |
public static void saveBamIndexNoHeader(final InputStream bam,final OutputStream bamIndex,boolean expectHeader,int numReferences) throws IOException, UnindexableDataException {
writeIndex(createBamIndexNoHeader(bam,expectHeader,numReferences),bamIndex);
}
| Writes a BAM index from given BAM stream, assumes no header is present |
public void deployExtraClasspath(String[] extraClasspath) throws IOException {
for ( String extraClasspathElement : extraClasspath) {
File extraClasspathElementFile=new File(extraClasspathElement);
JarFile jarFile=new JarFile(extraClasspathElementFile);
extraClasspathElement=extraClasspathElementFile.get... | Deploys extra classpath elements to the Geronimo classpath. |
public void normalizeNode(int nodeIndex){
for (int rowIndex=0; rowIndex < getNumRows(nodeIndex); rowIndex++) {
normalizeRow(nodeIndex,rowIndex);
}
}
| Normalizes all rows in the table associated with a given node. |
public void calcMargins(BayesNet bayesNet) throws Exception {
boolean[][] bAdjacencyMatrix=moralize(bayesNet);
process(bAdjacencyMatrix,bayesNet);
}
| Calc marginal distributions of nodes in Bayesian network Note that a connected network is assumed. Unconnected networks may give unexpected results. |
public void finishTerm() throws IOException {
int numArcs=0;
int numDedupBytes=1;
analyzed.grow(analyzed.length() + 1);
analyzed.setLength(analyzed.length() + 1);
for ( Entry entry : entries) {
if (numArcs == maxNumArcsForDedupByte(numDedupBytes)) {
analyzed.setByteAt(analyzed.length() - 1,(byte)(n... | Writes all the entries for the FST input term |
final OptionsTreeNode addNode(final String parentKey,final String childKey,final String displayName,String keywordText){
OptionsTreeNode node=TREE_MODEL.addNode(parentKey,childKey,displayName);
assert (node != null);
if (keywordText != null) {
String[] keywords=StringUtils.split(I18NConvert.instance().getNorm... | Adds a new child node to one of the top-level parent nodes. children. Neither key can denote the root.<p> This should only be called during tree construction. |
@Deprecated public static void waitForCriterion(final WaitCriterion waitCriterion,final long timeoutMillis,final long pollingInterval,final boolean throwOnTimeout){
long waitThisTime=jitterInterval(pollingInterval);
final long tilt=System.currentTimeMillis() + timeoutMillis;
for (; ; ) {
if (waitCriterion.don... | Wait until given criterion is met |
public static boolean isTime(String hour,String minute,String second){
if (isHour(hour) && isMinute(minute) && isSecond(second)) return true;
else return false;
}
| isTime returns true if string arguments hour, minute, and second form a valid time. |
public static final void extractTemplates(boolean force){
Path dest=Paths.get("templates");
try (DirectoryStream<Path> directoryStream=Files.newDirectoryStream(dest)){
for ( Path path : directoryStream) {
if (!Files.isDirectory(path)) {
String fn=path.getFileName().toString();
if (fn.en... | extract our templates (use force to overwrite) |
public boolean addTriangles(List<Triangle> triangles){
return getTriangles().addAll(triangles);
}
| Add triangles in relationship with the edge. |
@Deprecated public DCCppReply(String message){
super();
setBinary(false);
myReply=new StringBuilder(message);
_nDataChars=myReply.length();
_dataChars=new int[_nDataChars];
}
| Create a reply from a string of hex characters. Not sure this one is needed. |
public CeylonRepoManagerBuilder user(String user){
this.user=user;
return this;
}
| Sets the user name to use for writing to the output repository. When not set the value will be take from the system configuration (if available) |
public float maximumAbsolute(){
if (Math.abs(mLeft) > Math.abs(mRight)) {
return Math.abs(mLeft);
}
else {
return Math.abs(mRight);
}
}
| Returns the greater absolute value between left and right values |
public boolean isError(){
return m_Error;
}
| Method isError |
private Collator createFromLocale(String language,String country,String variant){
Locale locale;
if (language != null && country == null && variant != null) throw new SolrException(ErrorCode.SERVER_ERROR,"To specify variant, country is required");
else if (language != null && country != null && variant != null... | Create a locale from language, with optional country and variant. Then return the appropriate collator for the locale. |
public boolean hasHighLevelInfoFlowInfo(){
return receiverInfoKinds != null || methodArgumentInfoKinds != null || sinkInfoKinds != null;
}
| Returns true if there is high level sink/source info on the method. |
public static double calculateDuration(InvocationSequenceData data){
double duration=-1.0d;
if (InvocationSequenceDataHelper.hasTimerData(data)) {
duration=data.getTimerData().getDuration();
}
else if (InvocationSequenceDataHelper.hasSQLData(data)) {
duration=data.getSqlStatementData().getDuration();
... | Calculates the duration starting from this invocation sequence data element. |
@Override public boolean exists(){
try {
return getFile().exists();
}
catch ( IOException ex) {
try {
InputStream is=getInputStream();
is.close();
return true;
}
catch ( Throwable isEx) {
return false;
}
}
}
| This implementation checks whether a File can be opened, falling back to whether an InputStream can be opened. This will cover both directories and content resources. |
@Override public int hashCode(){
final int prime=31;
int result=1;
result=prime * result + (int)(est ^ (est >>> 32));
return result;
}
| This hashCode is computed only from the Row.getEstimate() value. Defined this way, this hashCode will be consistent with equals(Object):<br> If (x.equals(y)) implies: x.hashCode() == y.hashCode().<br> If (!x.equals(y)) does NOT imply: x.hashCode() != y.hashCode(). |
public ScePspDateTime(){
Calendar cal=Calendar.getInstance();
year=cal.get(Calendar.YEAR);
month=1 + cal.get(Calendar.MONTH);
day=cal.get(Calendar.DAY_OF_MONTH);
hour=cal.get(Calendar.HOUR_OF_DAY);
minute=cal.get(Calendar.MINUTE);
second=cal.get(Calendar.SECOND);
microsecond=cal.get(Calendar.MILLISECOND... | All fields will be initialised to the time the object was created. |
@POST @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("/{id}/protection/full-copies/{fcid}/detach") @CheckPermission(roles={Role.TENANT_ADMIN},acls={ACL.ANY}) public TaskList detachConsistencyGroupFullCopy(@PathParam("id") URI cgURI,@PathParam("fcid") URI fullCopyURI){
List<Volume> cgVolumes=v... | Detach the specified consistency group full copy. |
public synchronized Row.Entry removeOne(){
if (this.chunkcount == 0) return null;
final Row.Entry r=get(this.chunkcount - 1,true);
if (this.chunkcount == this.sortBound) this.sortBound--;
this.chunkcount--;
this.lastTimeWrote=System.currentTimeMillis();
checkShrink();
return r;
}
| removes the last entry from the collection |
public final synchronized int elementAt(final int id){
if (id >= max_size) {
return 0;
}
else {
return items[id];
}
}
| get element at |
private void populateResultListView(List<BookmarkMatch> ids){
if (ids.isEmpty()) {
setUIState(UIState.EMPTY);
}
else {
setUIState(UIState.RESULT);
mResultList.setAdapter(new ResultListAdapter(ids,mDelegate));
}
}
| Make result list visible and popuplate the list with given list of bookmarks. |
@Override public void drawSeries(Canvas canvas,Paint paint,List<Float> points,XYSeriesRenderer renderer,float yAxisValue,int seriesIndex,int startIndex){
paint.setColor(renderer.getColor());
paint.setStyle(Style.FILL);
int length=points.size();
XYValueSeries series=(XYValueSeries)mDataset.getSeriesAt(seriesInde... | The graphical representation of a series. |
public DomainFilesModel(){
super();
xmlFiles=new LinkedHashMap<String,File>();
}
| Creates a empty model |
protected void sendIntensity(double intensity){
if (log.isDebugEnabled()) {
log.debug("sendIntensity(" + intensity + ")"+ " lastOutputStep: "+ lastOutputStep+ " maxDimStep: "+ maxDimStep);
}
int newStep=(int)Math.round(intensity * maxDimStep);
if ((newStep < 0) || (newStep > maxDimStep)) {
log.error("ne... | Send a Dim/Bright commands to the X10 hardware to reach a specific intensity. Acts immediately, and changes no general state. <p> This sends "Extended Cmd Dim" commands. |
public MapQuery(URL feedUrl){
super(feedUrl);
}
| Constructs a new query object that targets a feed. The initial state of the query contains no parameters, meaning all entries in the feed would be returned if the query was executed immediately after construction. |
public String[][] extractArrayData(JsonObject obj,String array_item,String... keys){
JsonArray items=obj.get(array_item).getAsJsonArray();
String[][] listOfObjects=new String[items.size()][keys.length];
for (int i=0; i < items.size(); i++) {
JsonObject data=items.get(i).getAsJsonObject();
for (int j=0; j ... | This method parses JSON and extracts data into a 2D String Array Pass as many strings as should be included in the 2D array. |
public static String fromFileToClass(String name){
return name.substring(0,name.length() - 6).replace(File.separatorChar,'.');
}
| Given a file name with separators, convert them in to . so it is a legal class name. |
public static String calcHash(String pw){
return Digest.encodeMD5Hex(Base64Order.standardCoder.encodeString(pw));
}
| internal hash function for admin account |
public static boolean testTimeString(String time) throws IllegalArgumentException {
DateTimeFormatter format=ISODateTimeFormat.dateTimeNoMillis().withZoneUTC();
try {
format.parseDateTime(time);
return true;
}
catch ( IllegalArgumentException e) {
return false;
}
}
| Tests if the supported String is a correctly formatted time String, following ISO 8601. |
public HashSet(Collection<? extends E> c){
map=new HashMap<>(Math.max((int)(c.size() / .75f) + 1,16));
addAll(c);
}
| Constructs a new set containing the elements in the specified collection. The <tt>HashMap</tt> is created with default load factor (0.75) and an initial capacity sufficient to contain the elements in the specified collection. |
public FilterExprWalker(WalkingIterator locPathIterator){
super(locPathIterator,Axis.FILTEREDLIST);
}
| Construct a FilterExprWalker using a LocPathIterator. |
public LocationFullException(String msg){
super(msg);
}
| Constructs an <code>LocationFullExecption</code> with the specified detail message. |
private String commonString(List<String> list){
String commonString;
if (list.stream().allMatch(null)) commonString=list.get(0);
else commonString="-";
return commonString;
}
| Returns the common <tt>String</tt> of a list, if any, or a dash (-) otherwise. |
@After public void cleanEnv() throws IOException {
FileUtils.deleteDirectory(localTempPath.toFile());
for ( S3FileTransferRequestParamsDto params : Arrays.asList(s3DaoTestHelper.getTestS3FileTransferRequestParamsDto(),S3FileTransferRequestParamsDto.builder().s3BucketName(storageDaoTestHelper.getS3LoadingDockBucket... | Cleans up the local temp directory and S3 test path that we are using. |
public static ObjectAnimator ofObject(Object target,String propertyName,TypeEvaluator evaluator,Object... values){
ObjectAnimator anim=new ObjectAnimator(target,propertyName);
anim.setObjectValues(values);
anim.setEvaluator(evaluator);
return anim;
}
| Constructs and returns an ObjectAnimator that animates between Object values. A single value implies that that value is the one being animated to. Two values imply a starting and ending values. More than two values imply a starting value, values to animate through along the way, and an ending value (these values will b... |
public boolean isWithin(){
return isTrue(matrix[Location.INTERIOR][Location.INTERIOR]) && matrix[Location.INTERIOR][Location.EXTERIOR] == Dimension.FALSE && matrix[Location.BOUNDARY][Location.EXTERIOR] == Dimension.FALSE;
}
| Tests whether this <code>IntersectionMatrix</code> is T*F**F***. |
public void addEventListener(WalletEventListener listener){
addEventListener(listener,Threading.USER_THREAD);
}
| Adds an event listener object. Methods on this object are called when something interesting happens, like receiving money. Runs the listener methods in the user thread. |
public static PosixTarHeader from(byte[] header){
checkNotNull(header,"header");
checkArgument(header.length == HEADER_LENGTH,"POSIX tar header length should be %s but was %s",HEADER_LENGTH,header.length);
PosixTarHeader res=new PosixTarHeader(header.clone());
checkArgument(res.getMagic().equals("ustar"),"Not a... | Create a new header from the bytes of an existing tar file header (Safe). <p>This routine validates the checksum to ensure the data header is correct and supported. |
private void updateProgress(String progressLabel,int progress){
if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) {
myHost.updateProgress(progressLabel,progress);
}
previousProgress=progress;
previousProgressLabel=progressLabel;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public AWTClipboard(Clipboard target){
this.target=target;
}
| Creates a new proxy for the specified target object. |
private static void writeEnumInt(BinaryRawWriter w,Enum e){
w.writeInt(e == null ? 0 : e.ordinal());
}
| Writes enum as int. |
public boolean isSocialBookmarkEnabled(){
return socialBookmarkEnabled;
}
| Returns whether social bookmarks are shown on the marketplace. |
public void testCertificateFactory03() throws CertificateException, NoSuchProviderException {
if (!X509Support) {
fail(NotSupportMsg);
return;
}
String provider=null;
for (int i=0; i < validValues.length; i++) {
try {
CertificateFactory.getInstance(validValues[i],provider);
fail("Illegal... | Test for <code>getInstance(String type, String provider)</code> method Assertion: throws IllegalArgumentException when provider is null or empty |
@Override public boolean remove(Object value){
return _set.remove(unwrap(value));
}
| Deletes a value from the set. |
public void clearClassContextCache(){
throw new UnsupportedOperationException();
}
| Clear the ClassContext cache. This should be done between analysis passes. |
public void startNewAcceptor(){
Thread t=AccessController.doPrivileged(new NewThreadAction(ConnectionAcceptor.this,"Multiplex Accept-" + ++threadNum,true));
t.start();
}
| Start a new thread to accept connections. |
public double slope(){
return beta;
}
| Returns the slope β of the best of the best-fit line <em>y</em> = α + β <em>x</em>. |
public static List<CompilerAdviceAttribute> readCompilerAdviceFile(String file){
List<CompilerAdviceAttribute> compilerAdviceInfo=new ArrayList<CompilerAdviceAttribute>();
BufferedReader fileIn=null;
if (file == null) return null;
try {
fileIn=new BufferedReader(new InputStreamReader(new FileInputStream(f... | Read annotations from a specified file. Reads all annotations at once and returns a collection of compiler advice attributes. |
public Instant minusMillis(long millisToSubtract){
if (millisToSubtract == Long.MIN_VALUE) {
return plusMillis(Long.MAX_VALUE).plusMillis(1);
}
return plusMillis(-millisToSubtract);
}
| Returns a copy of this instant with the specified duration in milliseconds subtracted. <p> This instance is immutable and unaffected by this method call. |
public Vector3f addLocal(Vector3f vec){
if (null == vec) {
logger.warning("Provided vector is null, null returned.");
return null;
}
x+=vec.x;
y+=vec.y;
z+=vec.z;
return this;
}
| AddLocal adds a provided vector to this vector internally, and returns a handle to this vector for easy chaining of calls. If the provided vector is null, null is returned. |
public HitosExpediente obtenerHitosExpediente(String entidad) throws ConsultaExcepcion {
if (isDebugeable) logger.debug("obtenerHitosExpediente >> Numero Expediente: " + numeroExpediente);
HitosExpediente hitos=new HitosExpediente();
HitoExpedienteImpl hito=null;
HitosHistoricoTabla tablaHitos=new HitosHistor... | Devuelve los hitos asociados a un expediente |
@Override public int K(final Object ex,final FormObject formObj,final int actionID){
if (showMethods) {
System.out.println("DefaultActionHandler.K()");
}
final int result=javascript.execute(formObj,PdfDictionary.K,actionID,getKeyPressed(ex));
final int fontSize=formObj.getTextSize();
if (acrorend.getCompD... | when user types a keystroke K action on - [javascript] keystroke in textfield or combobox modifys the list box selection (can access the keystroke for validity and reject or modify) |
@Override public byte[] serializeVal(final Object obj){
final IV<?,?> iv=(IV<?,?>)obj;
final byte[] key=iv.encode(getKeyBuilder()).getKey();
return key;
}
| Return the byte[] value, which is a term identifier written as a packed long integer. |
public boolean isEmpty(){
return type.equals(StatusType.NONE);
}
| Returns if this status is empty (i.e. no message). |
public static String inferPlainText(String treebankText){
StringBuilder sb=new StringBuilder();
for ( String parse : splitSentences(treebankText)) {
Matcher matcher=leafNodePattern.matcher(parse);
while (matcher.find()) {
TreebankNode node=getLeafNode(matcher.group());
if (node.getText() != nul... | A treebank parse does not preserve whitespace information. This method provides a simple mechanism for inferring the original plain text of a treebank parse. If you have access to the original plain text, then you can bypass use of this method by calling the appropriate parse method. |
public void addMembersToRelation(Relation relation,ArrayList<OsmElement> members){
dirty=true;
for ( OsmElement e : members) {
undo.save(e);
RelationMember rm=new RelationMember("",e);
relation.addMember(rm);
e.addParentRelation(relation);
}
relation.updateState(OsmElement.STATE_MODIFIED);
in... | Add further members without role to an existing relation |
private Metric reduce(List<Metric> metrics){
SystemAssert.requireArgument(metrics != null,"Cannot transform empty metric/metrics");
MetricDistiller distiller=new MetricDistiller();
distiller.distill(metrics);
Map<Long,List<String>> collated=collate(metrics);
Map<Long,String> minDatapoints=reduce(collated);
... | O(n * m), where n is the max number of data points and m is the number of metrics. This becomes O(n) as the number of data points becomes large. |
void caseAction(NodeRepresentation nodeRep){
makeProof(nodeRep,false,false);
}
| Create the proof for a case-split. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.