code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public OsmRuntimeException(Throwable cause){
super(cause);
}
| Constructs a new exception with the specified cause and a detail message of <tt>(cause==null ? null : cause.toString())</tt> (which typically contains the class and detail message of <tt>cause</tt>). |
public static long fib(long index){
count++;
if (index == 0) return 0;
else if (index == 1) return 1;
else return fib(index - 1) + fib(index - 2);
}
| The method for finding the Fibonacci number |
@Override public void init(){
if (knownArchitectures == null || knownArchitectures.isEmpty()) {
throw new Error("No architectures known. Has the value for knownArchitectures " + "been set correctly? Current value for knownArchitectures was " + knownArchitectures);
}
if (targetArchitecture == null || targetArc... | Checks that the architecture properties have sane, non-empty values. Also checks that the current target architecture is contained in the known architectures. If it isn't, the known architectures list is outdated and the plugin might miss problems, e.g. disallowed imports into packages from the new architecture. |
Map<Integer,Class<?>> abstractSerializers(){
return reader.getMap(ABSTRACT_SERIALIZERS,null,null);
}
| Returns a map of abstract serializers. |
@Override protected ParseObject decodePointer(String className,String objectId){
if (fetchedObjects != null && fetchedObjects.containsKey(objectId)) {
return fetchedObjects.get(objectId);
}
return super.decodePointer(className,objectId);
}
| If the object has been fetched, the fetched object will be returned. Otherwise a new created object will be returned. |
synchronized public void cache(long interval,final int maxValues,ServletContext servletContext,final String... attrNames){
if (attrNames.length == 0) {
return;
}
Timer timer=new Timer(true);
TimerTask task=createRefresher(maxValues,servletContext,attrNames);
task.run();
timer.schedule(task,interval,inte... | Sets up the object to cache a limited number of the most used values of each of the specified attributes; the cache is refreshed periodically. This method does not check if the specified attributes are already cached. You have to make sure an attribute is specified only once in your calls. |
public void addHighlights(final int[][] highlights,final boolean areaSelect,final int page){
if (highlights != null) {
hasHighlightAreasUpdated=true;
for (int j=0; j != highlights.length; j++) {
int[][] values=getHighlightableInArea(highlights[j],areaSelect,page);
if (values != null) {
thi... | Method to highlight text on page. If areaSelect = true then the Rectangle array will be highlgihted on screen unmodified. areaSelect should be true if being when used with values returned from the search as these localAreas are already corrected and modified for display. If areaSelect = false then all lines between the... |
private void initData(int type){
this.cache=httpCacheDao.getHttpResponsesByType(type);
if (cache == null) {
cache=new HashMap<String,HttpResponse>();
}
}
| get httpResponse whose type is type into memory as primary cache to improve performance |
@Override public void configureZone(final StendhalRPZone zone,final Map<String,String> attributes){
buildPrisonArea(zone);
}
| Configure a zone. |
public void removeItemBoundsListener(ItemBoundsListener ibl){
m_bounders.remove(ibl);
}
| Remove an ItemBoundsListener to receive notifications when the bounds occupied by the VisualItems in this Display change. |
public long durationInMillis(){
return this.end.getTime() - this.start.getTime();
}
| Returns this range's duration as a millisecond value. |
public boolean isLogicalFunction(){
return false;
}
| Gau is not a logical function. |
@Override public Enumeration<Option> listOptions(){
Vector<Option> newVector=new Vector<Option>(4);
newVector.addElement(new Option("\tUse conjugate gradient descent rather than BFGS updates.","C",0,"-C"));
newVector.addElement(new Option("\tSet the ridge in the log-likelihood.","R",1,"-R <ridge>"));
newVector.... | Returns an enumeration describing the available options |
public static Date nextDate(final String immCode,final boolean mainCycle){
return nextDate(immCode,mainCycle,new Date());
}
| Returns next IMM date from the given IMM code |
public void postrender(BasicCamera camera,Renderer renderer,boolean worldChanged){
if (light.getSceneHints().getCullHint() != CullHint.Always) {
light.updateOrb(camera);
light.drawOrb(renderer);
}
}
| Post-render this lighting (update orb position and render) |
public Tasks<VolumeRestRep> detachFullCopy(URI copyId){
return postTasks(getIdUrl() + "/detach",copyId);
}
| Begins detach a full copy of the given block volume. <p> API Call: <tt>POST /block/full-copies/{id}/detach</tt> |
public Executor withProperties(Properties properties){
this.properties.clear();
this.properties.addAll(properties);
return this;
}
| Sets all properties. This will clear any existing properties. |
public void addPayloadFilter(Map<String,String> payloadFilter){
getPayloadFilters().add(payloadFilter);
}
| Adds a payloadfilter to the logging resource |
@ApiMethod(name="sayHi") public MyBean sayHi(@Named("name") String name){
MyBean response=new MyBean();
response.setData("Hi, " + name);
return response;
}
| A simple endpoint method that takes a name and says Hi back |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 15:00:58.261 -0400",hash_original_method="204BA9C6E53FA914ED5C736802A5AC49",hash_generated_method="EE04553184A22B85B15058D0DDC57EAF") public void finish() throws IOException {
checkClosed();
write();
}
| Finishes writing current uncompressed data into the InflaterOutputStream without closing it. |
public V put(K key,V value){
if (value == null) throw new NullPointerException();
return doPut(key,value,false);
}
| Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced. |
public ActionListener(Context context,Action action,String clientHandle,String... additionalArgs){
this.context=context;
this.action=action;
this.clientHandle=clientHandle;
this.additionalArgs=additionalArgs;
}
| Creates a generic action listener for actions performed form any activity |
@Override public double computeScoreNormalization(double cooccurrence,int similarNodeDegree,int nodeDegree){
return 1.0;
}
| Identity normalization |
public static <K,V>SynchronizedSortedBagMultimap<K,V> of(MutableSortedBagMultimap<K,V> multimap){
if (multimap == null) {
throw new IllegalArgumentException("cannot create a SynchronizedSortedBagMultimap for null");
}
return new SynchronizedSortedBagMultimap<>(multimap);
}
| This method will take a Multimap and wrap it directly in a SynchronizedSortedBagMultimap. |
public void contributeToClasses(ChooseByNameContributor contributor){
myGotoClassContributors.add(contributor);
}
| Registers a component which contributes items to the "Goto Class" list. |
private void writeResultsToMotionChartJson(JsonWriter jsonWriter,Iterable<Entity> results) throws IOException {
jsonWriter.name("data").beginObject();
jsonWriter.name("cols").beginArray();
for (int i=0; i < properties.length; i++) {
jsonWriter.beginObject().name("id").value(properties[i]).name("label").value(... | Converts the query results retrieved from the datastore to json parsable by javascript into a DataTable object for use with a motion chart. |
protected LinkedList<Diff> diff_bisect(String text1,String text2,long deadline){
int text1_length=text1.length();
int text2_length=text2.length();
int max_d=(text1_length + text2_length + 1) / 2;
int v_offset=max_d;
int v_length=2 * max_d;
int[] v1=new int[v_length];
int[] v2=new int[v_length];
for (int... | Find the 'middle snake' of a diff, split the problem in two and return the recursively constructed diff. See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations. |
public boolean isAccepted(){
return accepted;
}
| Returns true if the agent accepted this offer. |
private static void fillBasinReq(DTSweepContext tcx,AdvancingFrontNode node){
if (isShallow(tcx,node)) {
return;
}
fill(tcx,node);
if (node.prev == tcx.basin.leftNode && node.next == tcx.basin.rightNode) {
return;
}
else if (node.prev == tcx.basin.leftNode) {
Orientation o=orient2d(node.point,n... | Recursive algorithm to fill a Basin with triangles |
public void writeToStream(OutputStreamWithBuffer os) throws IOException {
getWrappedPath().writeToStream(os);
}
| Utility to write the contents of this path to the destination stream. |
public Bound<T> withoutValidation(){
return new Bound<>(name,filenamePrefix,filenameSuffix,header,footer,coder,numShards,shardTemplate,false,writableByteChannelFactory);
}
| Returns a transform for writing to text files that's like this one but that has GCS output path validation on pipeline creation disabled. <p>This can be useful in the case where the GCS output location does not exist at the pipeline creation time, but is expected to be available at execution time. <p>Does not modify th... |
public static boolean isMethod(Declaration decl){
return JvmBackendUtil.isMethod(decl);
}
| Determines whether the declaration's is a method |
public static <T>Iterator<T> unique(Iterator<T> self,Comparator<T> comparator){
return uniqueItems(new IteratorIterableAdapter<T>(self),comparator).listIterator();
}
| Returns an iterator equivalent to this iterator with all duplicated items removed by using the supplied comparator. The original iterator will be exhausted upon returning. |
public void applyForce(Vector2 force,Vector2 point,boolean wrap){
tmp.set(force.x,force.y);
tmp2.set(point.x,point.y);
body.applyForce(tmp,tmp2);
}
| Apply a force at a world point. If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity. This wakes up the body. |
public FigureEvent(Figure source,Rectangle2D.Double invalidatedArea){
super(source);
this.invalidatedArea=invalidatedArea;
}
| Constructs an event for the given source Figure. |
@SuppressWarnings({"unchecked","rawtypes"}) @Test public void testNodeProcessing(){
AverageKeyVal<String> oper=new AverageKeyVal<String>();
CollectorTestSink averageSink=new CollectorTestSink();
oper.doubleAverage.setSink(averageSink);
oper.beginWindow(0);
oper.data.process(new KeyValPair("a",2.0));
oper.da... | Test operator logic emits correct results. |
public RaidCreatureCorpse(final RPEntity victim,final String killerName){
super(victim,killerName);
}
| Create a corpse. |
public EntryOrExitAction_ createEntryOrExitAction_(){
EntryOrExitAction_Impl entryOrExitAction_=new EntryOrExitAction_Impl();
return entryOrExitAction_;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
static String typeFunctionName(final Tree.StaticType type,final ClassOrInterface coi,final GenerateJsVisitor gen){
TypeDeclaration d=type.getTypeModel().getDeclaration();
final boolean removeAlias=d == null || !d.isClassOrInterfaceMember() || d instanceof Interface;
if ((removeAlias && d.isAlias()) || d instanceo... | Returns the name of the type or its $init$ function if it's local. |
public void registerInfoType(ILogicInfo info){
}
| used for registering Info Types, this should have a unique id! |
public int fieldIndex(String field){
return delegate.fieldIndex(field);
}
| Returns the position of the specified field in this tuple. |
public void postFile(File file,OutputStream output,String type){
InputStream is=null;
try {
URL url=solrUrl;
if (auto) {
if (type == null) {
type=guessType(file);
}
if (type != null) {
if (type.equals("text/xml") || type.equals("text/csv") || type.equals("application/json")... | Opens the file and posts it's contents to the solrUrl, writes to response to output. |
public Pair(X a,Y b){
this.a=a;
this.b=b;
}
| Constructs a Pair from two given elements |
public void writeTag(final int fieldNumber,final int wireType) throws IOException {
writeRawVarint32(WireFormat.makeTag(fieldNumber,wireType));
}
| Encode and write a tag. |
public static Process createPostgres(String directoryPath,String databaseName) throws IOException, InterruptedException {
String extraPath="";
for ( String testPath : EXTRA_POSTGRES_LOCATIONS) {
if ((new File(testPath + "/" + INITDB)).canExecute()) {
extraPath=testPath + "/";
break;
}
}
Run... | Creates a database in directoryPath named databaseName and starts Postgres. |
public List classify(List data){
List list=new ArrayList();
for (int i=0; i < data.size(); i++) {
list.add(classify((String)data.get(i)));
}
return list;
}
| classify a list of observation. |
protected void refactoringPerformed(final Refactoring refactoring,final IProgressMonitor monitor){
Assert.isNotNull(refactoring);
Assert.isNotNull(monitor);
}
| Hook method which is called when the specified refactoring has been performed. |
public static Pair<Integer,Integer> max(int[] array){
int max=Integer.MIN_VALUE;
int argMin=-1;
int id=0;
for ( int d : array) {
if (d > max) {
max=d;
argMin=id;
}
id++;
}
return new Pair<>(argMin,max);
}
| Find the argmax and max in an int array. If the array is empty, the function returns (-1, Integer.MIN_VALUE) |
public ClassContent_ createClassContent_(){
ClassContent_Impl classContent_=new ClassContent_Impl();
return classContent_;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static PlugInProjectionExpression plugInAggregation(String functionName,Expression... moreExpressions){
return new PlugInProjectionExpression(functionName,false,moreExpressions);
}
| Plug-in aggregation function. |
public void prune(){
this.pruneCandidates.stream().filter(null).forEach(null);
this.pruneCandidates.clear();
for ( final NodeStatus status : PRUNE_NODE_STATUSES) {
this.pruneCandidates.addAll(this.statusNodesMap.get(status));
}
}
| Takes a snapshot of all inactive nodes and drops the inactive nodes that have stayed inactive since the last time this function was called. |
public void processDispatch(UniformPair<EventBean[]> events){
if (!forClauseDelivery) {
dispatchInternal(events);
return;
}
if ((groupDeliveryExpressions == null) || (groupDeliveryExpressions.length == 0)) {
UniformPair<EventBean[]> todeliver=new UniformPair<EventBean[]>(null,null);
if (events != ... | Indicate an outbound result. |
public static boolean destroyProcess(@NotNull final Process process){
return destroyProcess(process,false);
}
| Destroys process tree: in case of windows via imitating ctrl+break, in case of unix via sending sig_kill to every process in tree. |
public static _LabelResultStatus fromString(final String value) throws SOAPSerializationException {
return (_LabelResultStatus)Enumeration.fromString(value,_LabelResultStatus.VALUES_TO_INSTANCES);
}
| Gets the specific enumeration value in this class appropriate for the given XML attribute value. If no value is known, null is returned (_DEFAULT is not used; that value is for when the attribute is not present). |
@Override protected void _setBounds(long nativeWindowPointer,int x,int y,boolean xSet,boolean ySet,int w,int h,int cw,int ch,float xGravity,float yGravity){
int width;
int height;
if (w > 0) {
width=w;
}
else if (cw > 0) {
width=cw;
}
else {
width=getWidth();
}
if (h > 0) {
height=h;
... | w/h is the total window width/height including all its decorations (e.g. title bar). cw/ch is the "client", or interior width/height. Negative values for w/h/cw/ch are treated as "not set". For example: setBounds(x, y, xSet, ySet, 800, 600, -1, -1) will make the window 800x600 pixels. The client area available for draw... |
public static boolean isWorkflowProcess(){
if (s_workflow == null) {
s_workflow=Boolean.FALSE;
int AD_Table_ID=645;
if (MRole.getDefault().isTableAccess(AD_Table_ID,true)) s_workflow=Boolean.TRUE;
else {
AD_Table_ID=644;
if (MRole.getDefault().isTableAccess(AD_Table_ID,true)) s_work... | Is Workflow Process view enabled. |
public byte[] encryptDataWithPrivateKey(byte[] buffer,int length){
try {
Cipher cipher=Cipher.getInstance(TTT_ENCRYPTION_ALGORITHM);
cipher.init(Cipher.ENCRYPT_MODE,privateKey);
byte[] cipherData=cipher.doFinal(buffer,0,length);
return cipherData;
}
catch ( GeneralSecurityException e) {
throw ... | Uses private key directly to encrypt the data. Note that this is a slow method and not meant for high performance. See crypt.encryptData() for an alternative |
private void checkOutdatedTVShowDetails(Cursor cursor){
if (hasIssuedOutdatedRefresh) return;
cursor.moveToFirst();
long lastUpdated=cursor.getLong(TVShowDetailsQuery.UPDATED);
if (System.currentTimeMillis() > lastUpdated + Settings.DB_UPDATE_INTERVAL) {
hasIssuedOutdatedRefresh=true;
startSync(true);... | Checks wether we should refresh the TV Show details with the info on XBMC The details will be updated if the last update is older than what is configured in the settings |
public static double area2(Point2D a,Point2D b,Point2D c){
return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
| Returns twice the signed area of the triangle a-b-c. |
@Transactional public void addPointtransfer(final JSONObject requestJSONObject) throws ServiceException {
try {
pointtransferRepository.add(requestJSONObject);
}
catch ( final RepositoryException e) {
final String msg="Adds pointtransfer failed";
LOGGER.log(Level.ERROR,msg,e);
throw new ServiceExc... | Adds a pointtransfer with the specified request json object. |
public static boolean isInClockwiseDomain(double startAngRad,final double angSpanRad,final double angRad){
if (Math.abs(angRad) < -TWO_MATH_PI_IN_MINUS_PI_PI) {
if (angSpanRad <= 2 * Math.PI) {
if (angSpanRad < 0.0) {
return false;
}
startAngRad=normalizeMinusPiPi(startAngRad);
fin... | NB: Since 2*Math.PI < 2*PI, a span of 2*Math.PI does not mean full angular range. ex.: isInClockwiseDomain(0.0, 2*Math.PI, -1e-20) returns false. ---> For full angular range, use a span > 2*Math.PI, like 2*PI_SUP constant of this class. |
private void prepareSql() throws ObjectNotFoundException {
StringBuffer sqlStmt=new StringBuffer();
sqlStmt.append(generateProjectionStmt());
sqlStmt.append(generateFromStmt());
whereClause=generateWhereClauseStmt();
sqlStmt.append(whereClause);
sqlStmt.append(generateSortOrderStmt());
sql=sqlStmt.toStrin... | Generate a SQL statement needed for the database search. |
public void close() throws SQLException {
if (rs != null) rs.close();
if (ps != null) ps.close();
if (conn != null) conn.close();
}
| Releases this rowset's <code>ResultSet</code> object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed. <P><B>Note:</B> A <code>ResultSet</code> object is automatically closed by the <code>Statement</code> object that generated it when that <code>Statement</... |
public void prepareTestS3Files(String s3keyPrefix,Path localTempPath,List<String> localFilePaths) throws Exception {
prepareTestS3Files(s3keyPrefix,localTempPath,localFilePaths,new ArrayList<>());
}
| Creates specified list of files in the local temporary directory and uploads them to the test S3 bucket. |
public void flushDiskCache(){
synchronized (mDiskCacheLock) {
long now=System.currentTimeMillis();
if (now - 1000 < mLastFlushTime) {
return;
}
mLastFlushTime=now;
if (mDiskLruCache != null) {
try {
mDiskLruCache.flush();
if (DEBUG) {
Log.d(TAG,"Disk cache flush... | Flushes the disk cache associated with this ImageProvider object. Note that this includes disk access so this should not be executed on the main/UI thread. |
public In(String s){
try {
File file=new File(s);
if (file.exists()) {
scanner=new Scanner(file,CHARSET_NAME);
scanner.useLocale(LOCALE);
return;
}
URL url=getClass().getResource(s);
if (url == null) {
url=new URL(s);
}
URLConnection site=url.openConnection();
I... | Create an input stream from a filename or web page name. |
public _QueuedBuildUpdate(final String[] flagStrings){
super(flagStrings);
}
| Constructs a _QueuedBuildUpdate with the given flags initially set. |
public int findSrcAvgPos(int tgtPos){
if (t2s == null) {
assert (tgtPos == 0);
return 0;
}
int srcAvgPos=-1;
int distance=0;
int[] alignments;
while (true) {
int rightPos=tgtPos + distance;
boolean isStop=true;
if (rightPos < t2s.length) {
alignments=(rightPos < t2s.length ? t2s[ri... | Find average of source positions that correspond to the current tgtPos w.r.t to the given phrase alignment. The input target position and the output source position are relative positions within the current phrase. |
@Override public void updateClob(int columnIndex,Reader x) throws SQLException {
updateClob(columnIndex,x,-1);
}
| Updates a column in the current or insert row. |
public final static boolean is12Key(char c){
return (c >= '0' && c <= '9') || c == '*' || c == '#';
}
| True if c is ISO-LATIN characters 0-9, *, # |
public void storeOriginals(){
mStartingStartTrim=mStartTrim;
mStartingEndTrim=mEndTrim;
mStartingRotation=mRotation;
}
| If the start / end trim are offset to begin with, store them so that animation starts from that offset. |
public void endVisit(ConditionalExpression node){
}
| End of visit the given type-specific AST node. <p> The default implementation does nothing. Subclasses may reimplement. </p> |
private void dateLabelMousePressed(MouseEvent e){
JLabel label=(JLabel)e.getSource();
String labelText=label.getText();
if ("".equals(labelText)) {
return;
}
int dayOfMonth=Integer.parseInt(labelText);
LocalDate clickedDate=LocalDate.of(displayedYearMonth.getYear(),displayedYearMonth.getMonth(),dayOfMon... | dateLabelMousePressed, This event is called any time that the user clicks on a date label in the calendar. This sets the date picker to the selected date, and closes the calendar panel. |
public SubMatrix(Matrix baseMatrix,int firstRow,int firstColumn,int toRow,int toCol){
this.baseMatrix=baseMatrix;
if (firstColumn < 0 || firstRow < 0 || toRow < 0 || toCol < 0) throw new ArithmeticException("Can not give negative row or column counts");
else if (toRow == 0 || toCol == 0) throw new Arithmetic... | Creates a new matrix that is a sub view of the given base matrix. |
protected void addTransformerToManager(Instrumentation manager,ClassFileTransformer transformer,boolean canRetransform){
if (transformer != null) {
fTransformers.add(transformer);
}
manager.addTransformer(transformer,canRetransform);
verbosePrint("Added transformer " + transformer + " with canRetransform="+... | Method addTransformerToManager. |
public final String join(@Nullable Object first,@Nullable Object second,Object... rest){
return join(iterable(first,second,rest));
}
| Returns a string containing the string representation of each argument, using the previously configured separator between each. |
private boolean destInRange(final Player player,final Entity entity,final int x,final int y){
int centerX=(int)(x + (entity.getArea().getWidth() / 2));
int centerY=(int)(y + (entity.getArea().getHeight() / 2));
if (!(player.squaredDistance(centerX,centerY) < (EquipUtil.MAX_THROWING_DISTANCE * EquipUtil.MAX_THROWI... | Checks whether the destination is in range and provides feedback to player if not. |
public void persist(){
getBuildContextHolder().persist();
}
| Persist the values stored in BuildContext(Holder) |
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 boolean isLegacy(){
return legacy;
}
| Returns true if the version is lower than 1.8 |
double heuristic(Node x,Node y){
return x.loc.distanceTo(y.loc);
}
| Measure of the estimated distance between two Nodes. <p/> |
public void addObservations(int states[][],int sourceCol,int destCol,int[] othersAbsolute){
addObservations(states,sourceCol,destCol,othersAbsolute,false);
}
| Add observations for a single source-destination-conditionals set of the multivariate time series. to our estimates of the pdfs. This call should be made as opposed to addObservations(int states[][]) for computing active info for heterogeneous agents. |
public final double[] toArray3(double[] array,int offset){
if (array == null) {
String msg=Logging.getMessage("nullValue.ArrayIsNull");
Logging.logger().severe(msg);
throw new IllegalArgumentException(msg);
}
return toDoubleArray(array,offset,3);
}
| Writes this Vec4's <code>x</code>, <code>y</code> and <code>z</code> values to the specified double array. The specified offset must be 0 or greater, and the array must have have capacity equal to or greater than <code>offset + 3</code>. Coordinates are written to the array as follows:<p><code>array[offset] = x</code><... |
@Override protected void showAttempt(Attempt attempt){
Dataset dataset=attempt.getDataset();
if (dataset == null) return;
List<String> options=dataset.getOptions();
if (options == null || options.isEmpty()) return;
choiceContainer.removeAllViews();
for ( String option : options) {
StepikOptionView ... | it is unique for each attempt type |
public String foreignKey(String className,boolean underscore){
return underscore(demodulize(className) + (underscore ? "_id" : "id"));
}
| <p> Create and return a foreign key name from a class name, optionally inserting an underscore before the "id" portion.</p> <table border="1" width="100%"> <tr> <th>Input</th> <th>Output</th> </tr> <tr> <td>"com.mymodel.Order", false</td> <td>"orderid"</td> </tr> <tr> <td>"com.mymodel.Order", true</td> <td>"order_id"</... |
public EnclosingClosure popEnclosingClosure(){
return enclosingClosures.removeFirst();
}
| Pops a closure expression from the closure expression stack. |
public void updateCursorCounter(){
++field_146214_l;
}
| Increments the cursor counter |
@Override public void startElement(String namespaceURI,String localName,String qName,Attributes atts) throws SAXException {
if (qName.equals(VALUE_TAG)) {
clearCurrentText();
}
else {
throw new SAXException("Expecting <Value> but found " + qName);
}
}
| The start of an element. |
public void testVocabulary() throws IOException {
assertVocabulary(analyzer,getDataPath("deminimaltestdata.zip"),"deminimal.txt");
}
| Test against a vocabulary from the reference impl |
public ConversionInstance(Context context,Value value,Class convert) throws Exception {
this.context=context;
this.convert=convert;
this.value=value;
}
| This is used to specify the creation of a conversion type that can be used for creating an instance with a class other than the default class specified by the <code>Value</code> object. |
public GBC weightx(double weight){
weightx=weight;
return this;
}
| Set the weightx of this <code>GridBagConstraints</code> |
public void writeUnsafeTo(final PacketOutputStream os) throws IOException {
throw new IOException("Cannot use unsafe with Reader");
}
| Write reader to database in text format without checking buffer size. |
public final char readChar() throws java.io.IOException {
return (char)readShort();
}
| See the general contract of the readChar method of DataInput. Bytes for this operation are read from the contained input stream. |
public void print(Object obj){
print(InvokerHelper.toString(obj));
}
| Prints an object Groovy style. |
public void onAdded(final StendhalRPZone zone){
if (this.zone != null) {
logger.error("Entity added while in another " + zone + ": "+ this,new Throwable());
}
this.zone=zone;
this.lastZone=zone;
}
| Called when this object is added to a zone. |
@Override public void close() throws IOException {
if (!closed) {
inf.end();
closed=true;
eof=true;
super.close();
}
}
| Closes the input stream. |
public synchronized boolean contains(File file){
return indexOf(file) >= 0;
}
| Returns true if the given file is contained in this array. |
public static ReplaceStringTransformer clearUUIDs(){
return new ReplaceStringTransformer("[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}","00000000-0000-0000-0000-000000000000");
}
| Predefined transformer placing all UUIDs with a blank one (00000000-0000-0000-0000-000000000000). |
private State applyPatch(State current,State patch){
ServiceUtils.logInfo(this,"Moving to stage %s",patch.taskState.stage);
if (patch.nextPageLink == null) {
current.nextPageLink=null;
}
PatchUtils.patchState(current,patch);
return current;
}
| This method applies a patch to a state object. |
public static void main(String[] args){
try {
httpTransport=GoogleNetHttpTransport.newTrustedTransport();
DATA_STORE_FACTORY=new FileDataStoreFactory(DATA_STORE_DIR);
AdSenseHost service=initializeAdsensehost();
AdClients adClients=GetAllAdClientsForHost.run(service,MAX_LIST_PAGE_SIZE);
if ((adCli... | Runs all the AdSense Host API samples. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.