code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public void testDynamicRepeatedMessageNotNull() throws Exception {
TestAllTypes REPEATED_NESTED=TestAllTypes.newBuilder().setOptionalInt32(1).setOptionalString("foo").setOptionalForeignMessage(ForeignMessage.getDefaultInstance()).addRepeatedString("bar").addRepeatedForeignMessage(ForeignMessage.getDefaultInstance()).... | Test reading repeated message from DynamicMessage. |
public int exit_code(){
return Integer.parseInt(fields[51]);
}
| (since Linux 3.5) The thread's exit status in the form reported by waitpid(2). |
protected void clearOutEvents(){
}
| This method resets the outgoing events. |
public void doMatch(){
boolean matchFound=false;
for ( ConsumablePattern<T> pattern : patterns) {
if (pattern.matches(value)) {
pattern.consume(value);
matchFound=true;
break;
}
}
if (!matchFound) {
throw new MatchException("No match found for " + value);
}
}
| Runs through the possible matches and executes the specified consumer of the first match. |
@Override protected void doPut(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
String[] serverClasses=this.context.getServerClasses();
try {
this.context.setServerClasses(null);
String command=request.getServletPath();
if (command.equals("/deploy")) {
... | Performs the http PUT method. |
protected synchronized void damage(Rectangle r){
if (r != null) {
validateWidth(r);
x=r.x - 1;
y=r.y;
width=r.width + 4;
height=r.height;
repaint();
}
}
| Overridden to damage the correct width of the caret, since this caret can be different sizes. |
public static synchronized void restoreConsoleAppender(){
if (stdoutAppender == null) {
return;
}
final AppenderContext appenderContext=LogService.getAppenderContext(LogService.ROOT_LOGGER_NAME);
final LoggerConfig config=appenderContext.getLoggerConfig();
Appender stdout=config.getAppenders().get(STDOUT)... | Restores STDOUT ConsoleAppender to ROOT logger. Only called when using the log4j2-default.xml configuration. This is done when the LogWriterAppender for log-file is destroyed. The Appender instance stored in stdoutAppender is used. |
public boolean isShowB(){
return showB;
}
| Checks if is show b. |
public void test_updateLargeValueWithSmallValue(){
final MyRawStore store=new MyRawStore(new SimpleMemoryRawStore());
final IndexMetadata metadata=new IndexMetadata(UUID.randomUUID());
metadata.setRawRecords(true);
metadata.setMaxRecLen(64);
final BTree btree=BTree.create(store,metadata);
assertEquals(64,bt... | Unit test in which we update a large value (represented directly on the backing store) with a small value (inline within the leaf). The test verifies that the original large value is deleted. |
public void updateCount(int highlightsCountNew,int highlightsCount,int ignoredCountNew,int ignoredCount){
highlights.setText(buildCount(HIGHLIGHTS_LABEL,highlightsCountNew,highlightsCount));
ignored.setText(buildCount(IGNORED_LABEL,ignoredCountNew,ignoredCount));
}
| Updates the labels for the highlights/ignored messages menu entries. |
public byte[] toByteArray(){
if (index > 0xFFFF) {
throw new RuntimeException("Class file too large!");
}
int size=24 + 2 * interfaceCount;
int nbFields=0;
FieldWriter fb=firstField;
while (fb != null) {
++nbFields;
size+=fb.getSize();
fb=(FieldWriter)fb.fv;
}
int nbMethods=0;
MethodWr... | Returns the bytecode of the class that was build with this class writer. |
public int modelIndex(final int viewIndex){
return convertRowIndexToModel(viewIndex);
}
| Converts between the index of visible rows and the index of model rows. |
synchronized public void terminate(){
done=true;
}
| A way to tell the server that it can stop. |
public JLTransform(final int k,final TransformMode mode){
this(k,mode,true);
}
| Creates a new JL Transform |
public NormalMethod(Token t,String name,int params,Type returnType,List<Declaration> decls,Statement body){
super(t,name,params,returnType);
this.decls=decls;
this.body=body;
}
| Create a new method. |
public static <T extends ServiceDocument,B extends ServiceDocument>B doPost(VerificationHost host,Class<B> type,URI uri) throws Throwable {
final ServiceDocument[] doc={null};
host.testStart(1);
Operation post=Operation.createPost(uri).setCompletion(null);
host.send(post);
host.testWait();
host.logThroughpu... | Generic doPost. |
private static <T>T pgpCast(@Nullable Object object,Class<T> expect) throws PGPException {
if (object == null) {
throw new PGPException(String.format("Expected %s but out of objects",expect.getSimpleName()));
}
if (!expect.isAssignableFrom(object.getClass())) {
throw new PGPException(String.format("Expect... | Safely extracts an object from an OpenPGP message. |
public synchronized Relationship addRelationship(Vertex type,Vertex target){
return addRelationship(type,target,-1,false);
}
| Add the relation of the relationship type to the target vertex. These are currently uni-directional. Only a single relation of a type can be defined to the same target, i.e. relationships to the same vertex are unique. unless the relationship is ordered, then they are only equal if the same index. |
public void loadProperties(boolean silent){
loadPropertiesFile(System.getProperty(PROPERTIES_FILE,"evosuite-files/evosuite.properties"),silent);
initializeProperties();
}
| Load and initialize a properties file from the default path |
public static String writeGeometry(Geometry geometry,double z){
KMLWriter writer=new KMLWriter();
writer.setZ(z);
return writer.write(geometry);
}
| Writes a Geometry as KML to a string, using a specified Z value. |
@Override public boolean isAllocatable(Register r){
if (r.number == THREAD_REGISTER.value() || r.number == FRAME_POINTER.value() || r.number == JTOC_POINTER.value()) {
return false;
}
else {
return (r.number < FIRST_SPECIAL);
}
}
| Is a certain physical register allocatable? |
public static Address fromP2SHScript(NetworkParameters params,Script scriptPubKey){
checkArgument(scriptPubKey.isPayToScriptHash(),"Not a P2SH script");
return fromP2SHHash(params,scriptPubKey.getPubKeyHash());
}
| Returns an Address that represents the script hash extracted from the given scriptPubKey |
public boolean isCreateField(){
return fCreateField;
}
| If <code>true</code> the parameter will be removed from the method's signature and will be added to the parameter object. The default is <code>false</code> |
public AdaptiveGridArchive(int capacity,Problem problem,int numberOfDivisions){
this.capacity=capacity;
this.problem=problem;
this.numberOfDivisions=numberOfDivisions;
minimum=new double[problem.getNumberOfObjectives()];
maximum=new double[problem.getNumberOfObjectives()];
density=new int[(int)Math.pow(numb... | Constructs an adaptive grid archive with the specified capacity with the specified number of divisions along each objective. |
public ToHeader createToHeader(Address address,String tag) throws ParseException {
if (address == null) throw new NullPointerException("null address");
To to=new To();
to.setAddress(address);
if (tag != null) to.setTag(tag);
return to;
}
| Creates a new ToHeader based on the newly supplied address and tag values. |
public final double sampleCount(){
long lastAcquireCount=_lastAcquireCount;
_lastAcquireCount=_acquireCount.get();
return _lastAcquireCount - lastAcquireCount;
}
| Return the probe's next sample. |
private void logQuery(final String queryStr){
sparqlLog.info(null);
}
| Chop queries at a max length for logging. |
Item newDouble(final double value){
key.set(value);
Item result=get(key);
if (result == null) {
pool.putByte(DOUBLE).putLong(key.longVal);
result=new Item(index,key);
index+=2;
put(result);
}
return result;
}
| Adds a double to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. |
private int findBestBucket(){
Bucket[] buckets=_collList;
int bestCount=Integer.MAX_VALUE;
int bestIx=-1;
for (int i=0, len=_collEnd; i < len; ++i) {
int count=buckets[i].length();
if (count < bestCount) {
if (count == 1) {
return i;
}
bestCount=count;
bestIx=i;
}
}... | Method called to find the best bucket to spill a Name over to: usually the first bucket that has only one entry, but in general first one of the buckets with least number of entries |
public void breadthFirstTraversal(){
if (root == null) return;
java.util.Queue<TreeNode<E>> queue=new java.util.LinkedList<>();
queue.add(root);
while (!queue.isEmpty()) {
TreeNode<E> current=queue.element();
if (current.left != null) {
queue.add(current.left);
}
if (current.right != nul... | Displays the nodes in a breadth-first traversal |
public void disconnect(){
this.user=null;
this.domain=null;
}
| Disconnect from the connection. An SDKConnection does not keep a live connection, but this resets its connected user and domain. |
public boolean isCoveredByA(Coordinate coord){
if (isCovered(coord,resultPolyList)) return true;
return false;
}
| Tests if an L edge should be included in the result or not. |
private static Scenario parseSchedule(String scheduleFile,String networkFile){
Scenario sc=ScenarioUtils.createScenario(ConfigUtils.createConfig());
new MatsimNetworkReader(sc.getNetwork()).readFile(networkFile);
new TransitScheduleReader(sc).readFile(scheduleFile);
return sc;
}
| Parse all the necessary networks and transit schedules. |
public final void lazySet(boolean newValue){
int v=newValue ? 1 : 0;
unsafe.putOrderedInt(this,valueOffset,v);
}
| Eventually sets to the given value. |
protected static DataStoreProducer createDataStoreProducerFromFiles(File[] files) throws IllegalArgumentException {
if (files == null || files.length == 0) {
String message=Logging.getMessage("nullValue.ArrayIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
Str... | Creates an instance of the DataStoreProducer basing on raster type. Also validates that all rasters are the same types. |
public ObjectMatrix1D like1D(int size){
return new DenseObjectMatrix1D(size);
}
| Construct and returns a new 1-d matrix <i>of the corresponding dynamic type</i>, entirelly independent of the receiver. For example, if the receiver is an instance of type <tt>DenseObjectMatrix2D</tt> the new matrix must be of type <tt>DenseObjectMatrix1D</tt>, if the receiver is an instance of type <tt>SparseObjectMat... |
private void finalizeQuery(final UUID queryId) throws QueryCancelledException {
if (queryId == null) return;
final boolean isQueryCancelled=isQueryCancelled(queryId);
tearDownQuery(queryId);
if (isQueryCancelled) {
if (log.isDebugEnabled()) {
log.debug(queryId + " execution canceled.");
}
th... | Wrapper method to clean up query and throw exception is interrupted. |
public void executeImpl(){
if (getArgs().getIterator().hasNext()) {
final ContentValues values=makeRawContact(1);
getArgs().getAdapter().startInsert(this,INSERT_RAW_CONTACT,RawContacts.CONTENT_URI,values);
}
else Utils.showToast(getArgs().getOps().getActivityContext(),getArgs().getCounter().getValue() + ... | Each contact requires two (asynchronous) insertions into the Contacts Provider. The first insert puts the RawContact into the Contacts Provider and the second insert puts the data associated with the RawContact into the Contacts Provider. |
boolean isTerminatedOnBye(){
return this.terminateOnBye;
}
| Return True if this dialog is terminated on BYE. |
LaunchConfiguration(ILaunch launch,String name,WebAppDebugModel model){
id=model.getModelNodeNextId();
this.launch=launch;
this.name=name;
this.model=model;
String typeId=WebAppLaunchConfiguration.TYPE_ID;
ILaunchConfiguration launchConfiguration=launch.getLaunchConfiguration();
if (launchConfiguration !=... | Create a new instance. |
public PropertyTable sort(){
sorted=true;
widget.refillData();
return this;
}
| Sort the properties |
public void testParallelDocMaker() throws Exception {
String algLines[]={"# ----- properties ","content.source=org.apache.lucene.benchmark.byTask.feeds.LineDocSource","docs.file=" + getReuters20LinesFile(),"content.source.log.step=3","doc.term.vector=false","content.source.forever=false","directory=FSDirectory","doc.... | Test Parallel Doc Maker logic (for LUCENE-940) |
protected void doFloodBDDP(DatapathId pinSwitch,OFPacketIn pi,FloodlightContext cntx){
TopologyInstance ti=getCurrentInstance(false);
Set<DatapathId> switches=ti.getSwitchesInOpenflowDomain(pinSwitch);
if (switches == null) {
switches=new HashSet<DatapathId>();
switches.add(pinSwitch);
}
for ( Datapa... | The BDDP packets are forwarded out of all the ports out of an openflowdomain. Get all the switches in the same openflow domain as the sw (disabling tunnels). Then get all the external switch ports and send these packets out. |
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 void play() throws IOException {
handleCommand("new");
while (true) {
if (currentMove > 0) {
Position prevPos=new Position(pos);
prevPos.unMakeMove(moveList.get(currentMove - 1),uiInfoList.get(currentMove - 1));
String moveStr=TextIO.moveToString(prevPos,moveList.get(currentMove - 1),fa... | Administrate a game between two players, human or computer. |
private void build(EventNode element){
for ( Attribute entry : element) {
InputAttribute value=new InputAttribute(source,entry);
if (!entry.isReserved()) {
put(value.getName(),value);
}
}
}
| This is used to insert all attributes belonging to the start element to the map. All attributes acquired from the element are converted into <code>InputAttribute</code> objects so that they can be used as input nodes by an input node. |
private void activeDirections(){
RecyclerView instructionsRV;
RecyclerView.Adapter instructionsAdapter;
RecyclerView.LayoutManager instructionsLayoutManager;
instructionsRV=(RecyclerView)activity.findViewById(R.id.nav_instruction_recycler_view);
instructionsRV.setHasFixedSize(true);
instructionsLayoutManage... | active directions, and directions view |
private static void bindParam(Param param,Object target,Field field,ParameterAccess parameters){
String fieldName=field.getName();
Class<?> fieldType=field.getType();
String paramName=StringUtils.defaultIfBlank(param.value(),fieldName);
Object value=parameters.get(paramName);
if (value == null && param.requir... | Binds a given parameters onto the target object. |
public Message(String to){
setTo(to);
}
| Creates a new "normal" message to the specified recipient. |
public boolean decodeContentLength(int startIndex){
return decodeIntegerValue(startIndex);
}
| Decode the "Content length" type for WSP pdu |
public Object clone(){
Object retval=super.clone();
return retval;
}
| Make an exact copy of this step, make sure to explicitly copy Collections etc. |
public void purgeMethodAnalyses(MethodDescriptor methodDescriptor){
Set<Map.Entry<Class<?>,Map<MethodDescriptor,Object>>> entrySet=methodAnalysisObjectMap.entrySet();
for (Iterator<Map.Entry<Class<?>,Map<MethodDescriptor,Object>>> i=entrySet.iterator(); i.hasNext(); ) {
Map.Entry<Class<?>,Map<MethodDescriptor,O... | Purge all CFG-based method analyses for given method. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:31:01.930 -0500",hash_original_method="6F26EA9283182B6EDEDBB0B351568D69",hash_generated_method="F662A6A65B44702E63645DCDC7DA2C8A") public boolean hasAlmanac(){
return mHasAlmanac;
}
| Returns true if the GPS engine has almanac data for the satellite. |
public AsyncResult RegisterNodesAsync(RequestHeader RequestHeader,NodeId... NodesToRegister){
RegisterNodesRequest req=new RegisterNodesRequest(RequestHeader,NodesToRegister);
return channel.serviceRequestAsync(req);
}
| Asynchronous RegisterNodes service request. |
public boolean drawImage(Image img,int x,int y,Color bgcolor,ImageObserver observer){
if (img == null) {
return true;
}
ImageWaiter dim=new ImageWaiter(img);
addDrawingRect(x,y,dim.getWidth(),dim.getHeight());
mPrintMetrics.drawImage(this,img);
return mGraphics.drawImage(img,x,y,bgcolor,observer);
}
| Draws as much of the specified image as is currently available. The image is drawn with its top-left corner at (<i>x</i>, <i>y</i>) in this graphics context's coordinate space. Transparent pixels are drawn in the specified background color. <p> This operation is equivalent to filling a rectangle of the width and ... |
public static String randomUUID(int length){
String chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789";
String uuid="";
for (int i=0; i < length; i++) {
uuid+=chars.charAt((int)(Math.random() * chars.length()));
}
return uuid;
}
| Returns a string that's usable as an uuid. Probably unique. Good enough? Probably! |
public DefaultSignedAttributeTableGenerator(AttributeTable attributeTable){
if (attributeTable != null) {
table=attributeTable.toHashtable();
}
else {
table=new Hashtable();
}
}
| Initialise with some extra attributes or overrides. |
protected String formatCsv(final String text,final char csvSeparator){
String result=text;
if (result.indexOf('\n') != -1) {
result=result.replace('\n',' ');
}
int index=result.indexOf('"');
while (index != -1) {
result=new StringBuilder(result).insert(index,'"').toString();
index=result.indexOf('... | Encode un texte pour l'export au format csv ou csv local. |
public RealFIRFilter_RB_RB(float[] coefficients,float gain){
super(coefficients,gain);
}
| Real Buffer Float FIR filter with streaming float buffer provider and listener interfaces. |
public Multiply(){
super("basic.multiplication",2,Ontology.NUMERICAL);
}
| Constructs a multiplication function. |
private void updateSelectedServiceForUpgrade(final Long serviceKey) throws SaaSApplicationException {
Service selectedService=getServiceFromServer(serviceKey);
if (selectedService == null) {
return;
}
if (selectedService.getVO().getStatus() != ServiceStatus.ACTIVE) {
return;
}
model.setService(selec... | Select the service with the given service key and copy the parameter values from the previously selected subscription to the parameter values of the service. |
protected int addObservationsAfterParamsDetermined(double[] source,double[] destination,boolean[] sourceValid,boolean[] destValid) throws Exception {
Vector<int[]> startAndEndTimePairs=computeStartAndEndTimePairs(sourceValid,destValid);
int totalObservationsAdded=0;
for ( int[] timePair : startAndEndTimePairs) {... | Protected method to internally parse and submit observations through to the underlying conditional MI calculator once any internal parameter settings have been finalised (in the case of automatically determining the embedding parameters) This is done given time-series of booleans indicating whether each entry is valid |
@Override public void report(){
Instrumentation.disableInstrumentation();
VM.sysWrite("Printing " + dataName + ":\n");
VM.sysWrite("--------------------------------------------------\n");
double total=0;
for ( String stringName : stringToCounterMap.keySet()) {
int counterIdx=getCounterIndexForString(stri... | Print a report at the end of execution |
public void randomize(){
for (int i=0; i < lookupTable.length; i++) {
this.lookupTable[i]=RandomUtil.getInstance().nextDouble() > 0.5;
}
}
| Chooses a random function by flipping a coin for each value in table. |
public static int[] randomInts(int max,int count){
int[] vals=new int[count];
for (int i=0; i < count; i++) vals[i]=SEEDED_RANDOM.nextInt(max);
return vals;
}
| Return an array of length count containing random integers in the range (0, max) generated off the test rng. |
public void updateColor(){
if (synapse.getStrength() < 0) {
circle.setPaint(inhibitoryColor);
}
else if (synapse.getStrength() == 0) {
circle.setPaint(zeroWeightColor);
}
else {
circle.setPaint(excitatoryColor);
}
if (source.getNeuron().isSpike()) {
line.setStrokePaint(NeuronNode.getSpikin... | Calculates the color for a weight, based on its current strength. Positive values are (for example) red, negative values blue. |
private void putResize(long key,V value){
if (key == 0) {
zeroValue=value;
hasZeroValue=true;
return;
}
int index1=(int)(key & mask);
long key1=keyTable[index1];
if (key1 == EMPTY) {
keyTable[index1]=key;
valueTable[index1]=value;
if (size++ >= threshold) resize(capacity << 1);
... | Skips checks for existing keys. |
public static boolean invertM(double[] mInv,int mInvOffset,double[] m,int mOffset){
final double src0=m[mOffset + 0];
final double src4=m[mOffset + 1];
final double src8=m[mOffset + 2];
final double src12=m[mOffset + 3];
final double src1=m[mOffset + 4];
final double src5=m[mOffset + 5];
final double src9... | Inverts a 4 x 4 matrix. |
@CanIgnoreReturnValue public E removeFirst(){
return remove();
}
| Removes and returns the least element of this queue. |
public void memberValuePair(String memberName) throws IOException {
memberValuePair(pool.addUtf8Info(memberName));
}
| Writes an element of a <code>element_value_pairs</code> array in <code>annotation</code>. This method must be followed by a call to <code>constValueIndex()</code>, <code>enumConstValue()</code>, etc. |
public NotificationChain basicSetDeclaredUpperBound(TypeRef newDeclaredUpperBound,NotificationChain msgs){
TypeRef oldDeclaredUpperBound=declaredUpperBound;
declaredUpperBound=newDeclaredUpperBound;
if (eNotificationRequired()) {
ENotificationImpl notification=new ENotificationImpl(this,Notification.SET,Types... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public SearchScript search(SearchLookup lookup,Script script,ScriptContext scriptContext){
CompiledScript compiledScript=compile(script,scriptContext,SearchContext.current());
return getScriptEngineServiceForLang(compiledScript.lang()).search(compiledScript,lookup,script.getParams());
}
| Compiles (or retrieves from cache) and executes the provided search script |
public void writeCountedString(byte[] s){
if (s.length > 0xFF) {
throw new IllegalArgumentException("Invalid counted string");
}
need(1 + s.length);
array[pos++]=(byte)(s.length & 0xFF);
writeByteArray(s,0,s.length);
}
| Writes a counted string from the stream. A counted string is a one byte value indicating string length, followed by bytes of data. |
public List<StoragePool> matchAttributes(List<StoragePool> allPools,Map<String,Object> attributeMap,DbClient dbClient,CoordinatorClient coordinator,String matcherGroupName,StringBuffer errorMessage){
List<StoragePool> matchedPools=new ArrayList<StoragePool>();
if (!CollectionUtils.isEmpty(allPools)) {
matchedPo... | Match all attributes of CoS container & volumeParam container values against the given pools. |
static byte[] applyMask(final ImageData imageData,final GenericColorSpace decodeColorData,final PdfObject newMask,final PdfObject XObject,byte[] maskDataSream){
final int[] maskArray=XObject.getIntArray(PdfDictionary.Mask);
byte[] objectData=imageData.getObjectData();
int w=imageData.getWidth();
int h=imageData... | apply the SMask to image data directly as a component on argb |
public int supportedSpeedModes(){
return (jmri.DccThrottle.SpeedStepMode128);
}
| What speed modes are supported by this system? value should be xor of possible modes specifed by the DccThrottle interface XPressNet supports 14,27,28 and 128 speed step modes |
private void updateAction(){
boolean atLeastOneSourceSelected=(networkPanel.getSourceModelNeurons().size() > 0);
boolean atLeastOneTargetSelected=(networkPanel.getSelectedModelElements().size() > 0);
if (atLeastOneSourceSelected && atLeastOneTargetSelected) {
setEnabled(true);
}
else {
setEnabled(false... | Only enable the action if there is at least one source and one target neuron. |
public LineNumberInputStream(InputStream in){
super(in);
}
| Constructs a newline number input stream that reads its input from the specified input stream. |
private AddResult addTestMethod(Method m,List<String> names,Class<?> theClass,@Nullable IgnoreDescriptor clsIgnore){
String name=m.getName();
if (names.contains(name)) return new AddResult(false,null);
if (!isPublicTestMethod(m)) {
if (isTestMethod(m)) addTest(warning("Test method isn't public: " + m.ge... | Add test method. |
public boolean isValidBSTC(TreeNode root){
if (root == null) {
return true;
}
List<Integer> result=new ArrayList<Integer>();
inOrderList(root,result);
for (int i=0; i < result.size() - 1; i++) {
if (result.get(i) >= result.get(i + 1)) {
return false;
}
}
return true;
}
| Recursive, in-order. Inorder traversal, generate a list. The list should be in increasing order. |
public RemoteRepositoryManager(final String serviceURL,final boolean useLBS){
this(serviceURL,useLBS,null,null);
}
| Create a remote client for the specified serviceURL that optionally use the load balanced URLs. |
private boolean inQuotes(boolean inQuotes){
return (inQuotes && !ignoreQuotations) || inField;
}
| Determines if we can process as if we were in quotes. |
public static int ETXTBSY(){
return Errno.ETXTBSY.intValue();
}
| Text file busy |
public <T extends JCTree>List<T> translate(List<T> trees){
if (trees == null) return null;
for (List<T> l=trees; l.nonEmpty(); l=l.tail) l.head=translate(l.head);
return trees;
}
| Visitor method: translate a list of nodes. |
@Override public void serialize(CumulativeTimeBucket ctb,JsonGenerator jGen,SerializerProvider serializer) throws IOException, JsonProcessingException {
jGen.writeStartObject();
Timestamp ts=new Timestamp(ctb.getStartTimeNs() / 1000000);
jGen.writeStringField("start-time",ts.toString());
jGen.writeStringField("... | Performs the serialization of a OneComponentTime object |
public boolean contains(Cell other){
for (int dim=0; dim < numDims; dim++) {
int offset=bytesPerDim * dim;
if (StringHelper.compare(bytesPerDim,other.minPackedValue,offset,minPackedValue,offset) < 0) {
return false;
}
if (StringHelper.compare(bytesPerDim,other.maxPackedValue,offset,maxPackedValu... | Returns true if this cell fully contains the other one |
public R2Indicator(Problem problem,int subdivisions,NondominatedPopulation referenceSet,UtilityFunction utilityFunction){
super(problem,subdivisions,referenceSet,utilityFunction);
}
| Constructs a new R2 indicator using the specified utility function. |
public void removeAllPatterns(){
patternCount=0;
for (int i=0; i < patterns.length; i++) patterns[i]=null;
}
| removes all patterns from the pattern list |
public void skipValue() throws IOException {
skipping=true;
try {
int count=0;
do {
JsonToken token=advance();
if (token == JsonToken.BEGIN_ARRAY || token == JsonToken.BEGIN_OBJECT) {
count++;
}
else if (token == JsonToken.END_ARRAY || token == JsonToken.END_OBJECT) {
... | Skips the next value recursively. If it is an object or array, all nested elements are skipped. This method is intended for use when the JSON token stream contains unrecognized or unhandled values. |
protected void clearEvents(){
sCInterface.clearEvents();
}
| This method resets the incoming events (time events included). |
protected BannerMetaBuilder(final BannerMeta meta){
this.meta=meta.clone();
}
| Construct new meta builder, based on given meta. |
public static ForbiddenGraphModel serializableInstance(){
return new ForbiddenGraphModel(new Parameters(),GraphWrapper.serializableInstance());
}
| Generates a simple exemplar of this class to test serialization. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-08-13 13:14:15.754 -0400",hash_original_method="69D946FD97044C86CE0465D31431BEE8",hash_generated_method="B8A799CD62E8854F6C88BB7FED1CBA85") public void addCertStore(CertStore store){
if (store == null) {
return;
}
if (certStores == nu... | Adds a certificate store to the list of certificate stores that are used to find certificates and CRLs. |
static public void startCrisis(){
synchronized (lockCrisis) {
crisis=true;
}
}
| Start crisis. |
protected void drawPoint(Graphics2D g,PlotterPoint point,ColorProvider colorProvider,int midX,int midY,double radius){
int x=midX;
int y=midY;
x+=(int)(point.getX() * radius * scale);
y-=(int)(point.getY() * radius * scale);
Color pointColor=Color.red;
if (colorColumn != -1) {
pointColor=colorProvider.g... | Draw a data point. |
protected ModelReferenceImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override public void translate(final ITranslationEnvironment environment,final IInstruction instruction,final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment,instruction,instructions,"CDP");
long baseOffset=ReilHelpers.nextReilAddre... | CDP{<cond>} <coproc>, <opcode_1>, <CRd>, <CRn>, <CRm>, <opcode_2> CDP2 <coproc>, <opcode_1>, <CRd>, <CRn>, <CRm>, <opcode_2> Operation: if ConditionPassed(cond) then Coprocessor[cp_num]-dependent operation |
public static void fill(byte[] array,byte value){
for (int i=0; i < array.length; i++) {
array[i]=value;
}
}
| Fills the specified array with the specified element. |
protected void assertMkdirs(File file){
assertTrue("Could not create directory '" + file.getAbsolutePath() + "'",file.mkdirs());
}
| Asserts that creating a directory from the given file worked |
public PolynomialGF2mSmallM(GF2mField field,byte[] enc){
this.field=field;
int d=8;
int count=1;
while (field.getDegree() > d) {
count++;
d+=8;
}
if ((enc.length % count) != 0) {
throw new IllegalArgumentException(" Error: byte array is not encoded polynomial over given finite field GF2m");
}
... | Create a polynomial over the finite field GF(2^m). |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.