__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46743073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCustomControllerRef(DisplayModel customControllerRef) {
if (Converter.isDifferent(this.customControllerRef, customControllerRef)) {
DisplayModel oldcustomControllerRef= new DisplayModel(this);
oldcustomControllerRef.copyAllFrom(this.customControllerRef);
this.customControllerRef.copyAllFrom(customControllerRef);
setModified("customControllerRef");
firePropertyChange(String.valueOf(ORDERINSTANCETRANSITIONS_CUSTOMCONTROLLERREFID), oldcustomControllerRef, customControllerRef);
}
}
COM: <s> custom controller for transitions </s>
|
funcom_train/3904083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addObjectiveMeasureWeightPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RollupRulesType_objectiveMeasureWeight_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RollupRulesType_objectiveMeasureWeight_feature", "_UI_RollupRulesType_type"),
ImsssPackage.Literals.ROLLUP_RULES_TYPE__OBJECTIVE_MEASURE_WEIGHT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the objective measure weight feature </s>
|
funcom_train/17003510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean requestGatewayAddress(String client, int gatewayLevel) {
// Skip, if a gateway address was already assigned
if (brokerInformation.getGatewayAddressAssigned())
return true;
// int gatewayLevel = Integer.parseInt(s_level);
byte[] request = protocolHandler
.constructGatewaySetupRequest(client, gatewayLevel);
if (request == null)
return false;
protocolHandler.sendTo(client, request);
return true;
}
COM: <s> tell the broker to request a gateway address from the specified broker </s>
|
funcom_train/18481515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCombineColorSource0(CombineColorSource combine_color_source0) {
if (combine_color_source0 != this.combine_color_source0) {
CombineColorSource old = this.combine_color_source0 ;
this.combine_color_source0 = combine_color_source0 ;
notifyChanged(COMBINECOLORSOURCE0,old,combine_color_source0) ;
}
}
COM: <s> sets the combinesource for the color component for source 0 </s>
|
funcom_train/38542598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setBaseQuery(String sql) throws SQLException {
super.setBaseQuery(sql);
int j = 0;
for (int i = sql.indexOf('?', 0); i >= 0; i = sql.indexOf('?', i)) {
j++;
i++;
}
this.currentParams = new Object[j];
}
COM: <s> this method enables to set the base query of the statement </s>
|
funcom_train/976329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(int index, CacheHolder ch) {
CacheHolder oldObj = vectorDB.get(index);
vectorDB.set(index, ch);
hashDB.put(ch.getWayPoint(), index);
if (oldObj != null
&& !oldObj.getWayPoint().equals(oldObj.getWayPoint())) {
hashDB.remove(oldObj.getWayPoint());
}
}
COM: <s> sets a cache holder object at a certain position in the cache list </s>
|
funcom_train/34353650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAllowLocalHost() {
allowLocalhost = System.getProperty("ALLOW_LOCALHOST", "false").equals("true") ? true : false;
if ( ! allowLocalhost ) {
try {
thisIPAddress = InetAddress.getLocalHost();
} catch ( Exception e ) {
thisIPAddress = null;
}
} else {
thisIPAddress = null;
}
}
COM: <s> read system properties and set private allow localhost and this ipaddress variables </s>
|
funcom_train/46056559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isCertificateValid(X509Certificate x509Cert, int daysFromNow) {
try {
x509Cert.checkValidity();
if (daysFromNow > 0) {
Date nowPlusDays = new Date(System.currentTimeMillis() + (new Long(daysFromNow).longValue() * 24l * 60l * 60l * 1000l));
x509Cert.checkValidity(nowPlusDays);
}
} catch (Exception e) {
return false;
}
return true;
}
COM: <s> check wether a certificate is still valid in days from nows time </s>
|
funcom_train/39559275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFeatureID(Feature feature) {
Annotation annotation = feature.getAnnotation();
// ID
if (hasProperty(annotation, GFF_ATTR_ID)) {
return getProperty(annotation, GFF_ATTR_ID);
}
else {
return gffReferenceSource.getFeatureID(feature);
}
}
COM: <s> returns one of the following gff attributes checked in this order </s>
|
funcom_train/41593376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIDREFPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StrucDocFootnoteRef_iDREF_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StrucDocFootnoteRef_iDREF_feature", "_UI_StrucDocFootnoteRef_type"),
V3Package.eINSTANCE.getStrucDocFootnoteRef_IDREF(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the idref feature </s>
|
funcom_train/23335112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Space subspace(Point<Integer> center) {
Space result;
SpaceDimension[] dimensions;
int i;
dimensions = new SpaceDimension[dimensions()];
for (i = 0; i < dimensions.length; i++)
dimensions[i] = getDimension(i).subdimension(
center.getValue(i) - 1, center.getValue(i) + 1);
result = new Space(dimensions);
return result;
}
COM: <s> returns a subspace around the given point with just one more </s>
|
funcom_train/44450097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearMethod() {
boolean bWasConstructor = isConstructor();
content().clear();
if (bWasConstructor) {
addAttribute(ATTR_TYPE, TYPE_CONSTRUCTOR);
} else {
Type t = Factory.createType();
add(t);
t.setType("" + Type.Types.VOID);
}
add(Factory.createBlock());
}
COM: <s> modifies the method constructor </s>
|
funcom_train/19454716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDate(java.util.Date date) {
/* Get the old property value for fire property change event. */
java.util.Date oldValue = fieldDate;
/* Set the date property (attribute) to the new value. */
fieldDate = date;
/* Fire (signal/notify) the date property change event. */
firePropertyChange("date", oldValue, date);
return;
}
COM: <s> sets the date property value for </s>
|
funcom_train/37143353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setFirstDisplayedDay(Date firstDisplayedDate) {
Calendar calendar = getCalendar(firstDisplayedDate);
this.firstDisplayedDate = firstDisplayedDate;
this.firstDisplayedMonth = calendar.get(Calendar.MONTH);
this.firstDisplayedYear = calendar.get(Calendar.YEAR);
updateLastDisplayedDay(firstDisplayedDate);
monthView.repaint();
}
COM: <s> sets the first displayed date property to the given value </s>
|
funcom_train/41163347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(AgAnnouncement entity) {
EntityManagerHelper.log("deleting AgAnnouncement instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(AgAnnouncement.class, entity.getAnnouncementId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent ag announcement entity </s>
|
funcom_train/7687470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validatePin(String pin, boolean isPUK) {
// for pin, we have 4-8 numbers, or puk, we use only 8.
int pinMinimum = isPUK ? MAX_PIN_LENGTH : MIN_PIN_LENGTH;
// check validity
if (pin == null || pin.length() < pinMinimum || pin.length() > MAX_PIN_LENGTH) {
return false;
} else {
return true;
}
}
COM: <s> validate the pin entry </s>
|
funcom_train/31091385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeTo( OutputStream outputStream, ParameterCollection parameters ) throws IOException {
if (_source.markSupported()) {
mark();
}
byte[] buffer = new byte[8 * 1024];
int count = 0;
do {
outputStream.write( buffer, 0, count );
count = _source.read( buffer, 0, buffer.length );
} while (count != -1);
written = true;
}
COM: <s> transmits the body of this request as a sequence of bytes </s>
|
funcom_train/12183382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHasAcceptMimeTypeWithNonMatchingSingleHeaderWithMultipleValues() {
MockHttpHeaders headers = new MockHttpHeaders();
headers.addHeader("accept", "text/html, text/xml");
boolean hasMimeType =
HTTPHeadersHelper.hasAcceptMimeType(headers, mimeType);
assertFalse("These headers should not contain the mime type: " +
mimeType, hasMimeType);
}
COM: <s> test that multiple values in a single accept header where none of the </s>
|
funcom_train/32815565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkRepository() {
File storageDir = fileSystemPolicy.getArchiveDirectory();
// List all potential archive files
File[] archives = FileSystemManager.listFiles(storageDir);
if (archives != null) {
for (int i=0; i<archives.length; i++) {
File archive = archives[i];
// If it has not been committed - destroy it
if (
(matchArchiveName(archive) && (! isCommitted(archive)))
|| (isWorkingDirectory(archive))
) {
destroyTemporaryFile(archive);
}
}
}
}
COM: <s> look for uncommitted archives and destroy them </s>
|
funcom_train/5722274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateAcception(FacesContext context, UIComponent toValidate, Object value) {
boolean accept = (Boolean) value;
if (!accept) {
if (toValidate instanceof UIInput) {
((UIInput)toValidate).setValid(false);
}
addError(toValidate.getClientId(context), i18n("error_useragreement_must_be_accepted"), null);
}
}
COM: <s> validator to check wether the user has accepted the user agreement or not </s>
|
funcom_train/35716480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int computeLongestHyperlinkLength(List hyperlinks) {
Assert.isLegal(hyperlinks != null && !hyperlinks.isEmpty());
Iterator iter= hyperlinks.iterator();
int length= Integer.MIN_VALUE;
while (iter.hasNext()) {
IRegion region= ((IHyperlink)iter.next()).getHyperlinkRegion();
if (region.getLength() < length)
continue;
length= region.getLength();
}
return length;
}
COM: <s> computes the length of the longest detected </s>
|
funcom_train/14308055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void launchFile( ProjectFile file ) {
if ( this.view != null ) {
String path = (file.isDeletedTag()) ? file.getOldPath() : file.getPath();
Buffer buffer = jEdit.openFile( this.view, null, path, false, null );
showFile( file );
}
}
COM: <s> takes a file and opens it up in j edit </s>
|
funcom_train/7470407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addProcesses() {
final LocalProcessBase process = new LocalProcessBase(
"input-nutch",
"output-array",
new String [] {"filter-lingo"},
"The Lingo clustering algorithm (www.carrot2.org).",
"");
try {
controller.addProcess(PROCESS_ID, process);
} catch (Exception e) {
throw new RuntimeException("Could not assemble clustering process.", e);
}
}
COM: <s> adds a hardcoded clustering process to the local controller </s>
|
funcom_train/22232145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setViewAttachPolicy(int policy) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_POLICY_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("ViewPlatform0"));
switch (policy) {
case View.NOMINAL_SCREEN:
case View.NOMINAL_HEAD:
case View.NOMINAL_FEET:
break;
default:
throw new IllegalArgumentException(J3dI18N.getString("ViewPlatform1"));
}
((ViewPlatformRetained)this.retained).setViewAttachPolicy(policy);
}
COM: <s> sets the view attach policy that determines the coexistence center </s>
|
funcom_train/19307798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrent(final String current) {
if (current.equals("fo:table-body")) {
this.current = this.tblBody;
} else if (current.equals("tablehead")) {
this.current = this.tblHead;
} else if (current.equals("tablefoot")) {
this.current = this.tblFoot;
}
}
COM: <s> sets the current set of rows </s>
|
funcom_train/13551088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepare() throws IOException {
if (offset>0) {
int bytesRead = 0;
int skipAttempts = 0;
long count;
while (bytesRead<offset) {
count = in.skip((long)(offset-bytesRead));
skipAttempts++;
if (count==-1 || skipAttempts>5) break;
bytesRead += count;
}
}
byteCount = width*height*depth;
nPixels = width*height;
bufferSize = byteCount/25;
if (bufferSize<8192)
bufferSize = 8192;
else
bufferSize = (bufferSize/8192)*8192;
}
COM: <s> prepare the stream for reading </s>
|
funcom_train/49995228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean initializeDataModel() {
if (this.dataModel == null) {
this.dataModel = new ProjectPortfolioDataModel(
((ProjectBrowserApplication)ProjectBrowserApplication.get()).getTelemetryHost(),
ProjectBrowserSession.get().getEmail(), ProjectBrowserSession.get().getPassword());
return true;
}
return false;
}
COM: <s> initialize the data model </s>
|
funcom_train/37592853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void treeCollapsed(TreeExpansionEvent event) {
assert (EventQueue.isDispatchThread() || Utilities.TEST_MODE);
Object o = event.getPath().getLastPathComponent();
if (o instanceof InnerNode<?,?>) ((InnerNode<?,?>)o).setCollapsed(true);
}
COM: <s> called whenever an item in the tree has been collapsed </s>
|
funcom_train/28749626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMolwt(Long newVal) {
if ((newVal != null && this.molwt != null && (newVal.compareTo(this.molwt) == 0)) ||
(newVal == null && this.molwt == null && molwt_is_initialized)) {
return;
}
this.molwt = newVal;
molwt_is_modified = true;
molwt_is_initialized = true;
}
COM: <s> setter method for molwt </s>
|
funcom_train/3771926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateQuery() {
if (query == null || query.trim().length() < 1) {
// TODO Must support some mechanism for delegating the
// generation of the query to a pluggable query grammar
// support class or package. Right now, executing this
// method object without first explicitly setting the
// query is an error.
return "";
} else {
return query;
}
}
COM: <s> return the query supplied in the constructor or set query </s>
|
funcom_train/647159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Composite createEditor(Composite parent) {
// Attach the editor to the top of the composite and the top of the sash
final Composite editorParent = new Composite(parent, SWT.NONE);
editorParent.setLayout(new FillLayout());
textEditor.createPartControl(editorParent);
textEditor.addPropertyListener(new IPropertyListener() {
public void propertyChanged(Object source, int propertyId) {
SQLEditor.this.firePropertyChange(propertyId);
}
});
return editorParent;
}
COM: <s> creates the text editor in the top half </s>
|
funcom_train/989636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void glRectsv (short v1 [], short v2 []) {
if (CC.Mode != None) {
CC.gl_error (GL_INVALID_OPERATION, "glRectsv");
return;
}
glBegin (GL_QUADS);
glVertex2s (v1 [0], v1 [1]);
glVertex2s (v2 [0], v1 [1]);
glVertex2s (v2 [0], v2 [1]);
glVertex2s (v1 [0], v2 [1]);
glEnd();
}
COM: <s> glvoid gl rectsv glshort v1 glshort v2 </s>
|
funcom_train/37242076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGendynTimeMirror(double newVal) {
if(newVal > 1.0 && newVal <= 100.0) {
this.gendynTimeMirror = (int)newVal;
//System.out.println(newVal);
} else System.err.println("GendynTimeMirror must be between 3 and 100, not " + newVal); }
COM: <s> specify the size of the maximum sample time </s>
|
funcom_train/32113818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getInvDescription() {
String s;
s = super.getInvDescription();
s += "Melee damage: "+this.attack[0]+"d"+this.attack[1];
if (this.attack[2]>0)
s += "+"+this.attack[2]+" ";
else
if (this.attack[2]<0)
s += ""+this.attack[2]+" ";
else
s+= " ";
s += "\n";
s += hands==1? "Single-handed\n": "Two-handed\n";
if (specialAbility==Weapon.FLAMING)
s+= "Flaming (deals flaming damage)\n";
if (specialAbility==Weapon.POISONED)
s+= "Poisoned\n";
return s;
}
COM: <s> weapon long inventory description </s>
|
funcom_train/39863072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SSLParameters getSSLParameters() {
SSLParameters p = new SSLParameters();
p.setCipherSuites(getEnabledCipherSuites());
p.setProtocols(getEnabledProtocols());
p.setNeedClientAuth(getNeedClientAuth());
p.setWantClientAuth(getWantClientAuth());
return p;
}
COM: <s> returns a new sslparameters based on this sslsockets current </s>
|
funcom_train/42273523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLootAssignment(Raider raider, String lootName, Boss boss, String bidType) {
if(!participants.contains(raider)) {
throw new IllegalArgumentException("Raider " + raider + " is not part of this raid. Loot: " + lootName);
}
BossDrop loot = new BossDrop(boss, lootName);
LootAssignment assignment = new LootAssignment(raider, loot, bidType);
assignments.add(assignment);
}
COM: <s> adds a loot transaction to this raid p </s>
|
funcom_train/18243969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getLeftGapmostSequenceFivePrimeward() throws AssemblerException {
if (this.leftGapwardAnalysis == null) {
String message = ResourceUtil.getResource(TigrAssemblerResultsAnalysis.class, "text.no_distinct_left_flanking_assembly");
throw new AssemblerException(message);
}
return this.leftGapwardAnalysis.getFivePrimeFacesGap();
}
COM: <s> does the most gapward sequence on the left flanking assembly </s>
|
funcom_train/4268821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportToWAV(String speech, String target){
Dispatch.call(msFS, "Open", target, new Variant(3), new Variant(true));
Dispatch.putRef(msTTS, "AudioOutputStream", msFS);
Dispatch.call(msTTS, "Speak", speech);
Dispatch.call(msFS,"Close");
}
COM: <s> exports passed text to a wav to the passed location </s>
|
funcom_train/18809495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBaseNegativeItemLabelPosition(ItemLabelPosition position, boolean notify) {
if (position == null) {
throw new IllegalArgumentException("Null 'position' argument.");
}
this.baseNegativeItemLabelPosition = position;
if (notify) {
notifyListeners(new RendererChangeEvent(this));
}
}
COM: <s> sets the base negative item label position and if requested sends a </s>
|
funcom_train/11657628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws Exception {
if (isClosed()) {
return;
}
synchronized (closeLock) {
if (isClosed()) {
return;
}
closed = true;
clear();
evictionIterator = null;
evictionKeyIterator = null;
startEvictor(-1L);
if (oname != null) {
ManagementFactory.getPlatformMBeanServer().unregisterMBean(
oname);
}
}
}
COM: <s> p closes the keyed object pool </s>
|
funcom_train/8401755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void flushCurrentSuperBlockLoop() {
if (currentSuperBlockLoop.getSuperBlockCount() == 0) {
//System.out.println("Empty SuperBlockLoop:");
//System.out.println(currentSuperBlockLoop);
return;
}
updateConsumers(currentSuperBlockLoop);
currentSuperBlockLoop = new SuperBlockLoop();
}
COM: <s> sends the current super block loop to registred consumers and resets it </s>
|
funcom_train/50158932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getEnumerationPaths(String encodedPath) {
String xpath = XPathUtils.decodeXPath(encodedPath);
List nodes = docMap.selectNodes(xpath);
List paths = new ArrayList();
// prtln(nodes.size() + " nodes found for " + xpath);
for (int i = 0; i < nodes.size(); i++) {
Node node = (Node) nodes.get(i);
int index = i + 1;
String path = xpath + "[" + index + "]";
paths.add(path);
}
return paths;
}
COM: <s> gets the enumeration paths of a document given an xpath to a member </s>
|
funcom_train/7796024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reportTask(IStructuredDocument document, IFile file, IReporter taskReporter, int offset, int length, int priority) throws BadLocationException, CoreException {
int lineNumber = document.getLineOfOffset(offset);
String taskStr = getTaskStr(document, lineNumber, offset, length);
// the end of the string to be highlighted
int charEnd = offset + taskStr.length();
// report the task
createMarker(file, taskStr, lineNumber, priority, offset, charEnd);
}
COM: <s> reports the task </s>
|
funcom_train/48522136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProject(String projectName) throws Exception {
StringBuilder strBuilder = new StringBuilder("Project?where=name%20like%20%27");
strBuilder.append(projectName.replaceAll(" ", "%20"));
strBuilder.append("%27");
return this.doGetContentRequest(strBuilder.toString());
}
COM: <s> gets a project </s>
|
funcom_train/37036224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isServletAllowed(Object servlet) {
if (servlet instanceof ContainerServlet) {
if (((Context) getParent()).getPrivileged()
|| (servlet.getClass().getName().equals
("org.apache.catalina.servlets.InvokerServlet"))) {
return (true);
} else {
return (false);
}
}
return (true);
}
COM: <s> return code true code if loading this servlet is allowed </s>
|
funcom_train/49749823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getFilterParamsList() {
List paramsList = new ArrayList();
if (filterParams != null && !filterParams.equals("")) {
StringTokenizer token = new StringTokenizer(filterParams,
FILTER_PARAMS_DELIMITER);
while (token.hasMoreTokens()) {
paramsList.add(token.nextToken());
}
}
return paramsList;
}
COM: <s> get a code list code of filer params using code filter params code </s>
|
funcom_train/47844580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectUnknownWord() {
// if word is already added in table new words
// increase count repeat index in table new words
int index = newWordsTable.getIndexByArticle(queryArticle);
if ( index != -1 ) {
int newCount = newWordsTable.getCountRepeat(index) + 3;
newWordsTable.setCountRepeat(index, newCount);
}
// if word is unknows add him
newWordsTable.add(queryArticle, 5);
}
COM: <s> call method for mark what current word is unknown </s>
|
funcom_train/44713528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
if(isNew()) {
try {
set(ID, Sequences.getNextValue());
} catch (SQLException e) {
throw new UncheckedWrapperException(e);
}
set(CLASSNAME, this.getClass().getName());
}
super.save();
}
COM: <s> save the op set the id </s>
|
funcom_train/46290810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void format(final StringBuilder buffer, final NameValuePair param) {
if (buffer == null) {
throw new IllegalArgumentException("String buffer may not be null");
}
if (param == null) {
throw new IllegalArgumentException("Parameter may not be null");
}
buffer.append(param.getName());
String value = param.getValue();
if (value != null) {
buffer.append("=");
formatValue(buffer, value, this.alwaysUseQuotes);
}
}
COM: <s> produces textual representaion of the attribute value pair using formatting </s>
|
funcom_train/3414121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putAll(Map<?,?> attr) {
// ## javac bug?
if (!Attributes.class.isInstance(attr))
throw new ClassCastException();
for (Map.Entry<?,?> me : (attr).entrySet())
put(me.getKey(), me.getValue());
}
COM: <s> copies all of the attribute name value mappings from the specified </s>
|
funcom_train/38315734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLicense(long id) throws PersistenceException {
Session session = null;
try {
session = this.sessionManager.getHibernateSession();
session.delete(getLicense(id));
} catch (HibernateException he) {
log.error("HibernateException caught removing file license.", he);
throw new PersistenceException(he);
} finally {
this.sessionManager.flushCommitCloseSession(session);
}
}
COM: <s> remove a license in the database using a hibernate session </s>
|
funcom_train/39963072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int utf16_probability(byte[] rawText) {
if (rawText.length < 2) {
return 0;
}
if (((byte) 0xFE == rawText[0] && (byte) 0xFF == rawText[1]) || // Big-endian
((byte) 0xFF == rawText[0] && (byte) 0xFE == rawText[1])) {// Little-endian
return 100;
} else {
return 0;
}
}
COM: <s> not very general needs much more work </s>
|
funcom_train/32195770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected InputStream loadInputStream(String resourceUri, Resource resource) {
try {
InputStream inputStream = resource.getInputStream();
logger.debug("Input stream initialized for resource [" + resourceUri + "]");
return inputStream;
} catch (IOException e) {
throw new RuntimeException("Failed to load resource at [" + resourceUri + "]", e);
}
}
COM: <s> used when some </s>
|
funcom_train/11120304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SourceValidity getValidity() {
final long lm = getLastModified();
if (lm > 0) {
if (lm == m_cachedLastModificationDate)
return m_cachedValidity;
m_cachedLastModificationDate = lm;
m_cachedValidity = new TimeStampValidity(lm);
return m_cachedValidity;
}
return null;
}
COM: <s> get the validity object </s>
|
funcom_train/36231118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix getSolPivoted(Matrix B) throws SingularMatrixException {
Matrix b = null;
try {
b = MatricesWrap.Dense2Matrix(lu.solve(MatricesWrap.Matrix2Dense(B)));
} catch (MatrixSingularException e) {
// TODO Auto-generated catch block
throw new SingularMatrixException(
" getLUpivoted. Partial pivoting fail for a Singular matrix.");
}
return b;
}
COM: <s> solve with lu decomposition </s>
|
funcom_train/5227952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initColumnClasses() {
getColumnClasses().put(DBFConsts.TYPE_CHARACTER,
CharacterDBFColumn.class);
getColumnClasses().put(DBFConsts.TYPE_DATE, DateDBFColumn.class);
getColumnClasses().put(DBFConsts.TYPE_NUMERIC, NumericDBFColumn.class);
getColumnClasses().put(DBFConsts.TYPE_LOGICAL, LogicalDBFColumn.class);
// getColumnClasses().put(DBFConsts.TYPE_MEMO, MemoDBFColumn.class);
}
COM: <s> registers the supported column types </s>
|
funcom_train/31012448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getClause(boolean removeWhereWord, String andOr) {
if (!removeWhereWord) {
return getClause();
}
else {
String ret = getClause();
if (ret.length() != 1) {
return ((andOr == null)?"":" " + andOr) + ret.substring(6, ret.length()); //WHERE Length +1
}
else {
return ret;
}
}
}
COM: <s> returns the clause depending on the parameters that was built </s>
|
funcom_train/51117477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Appearance getAppearance( Atom a ) {
Appearance ap = (Appearance)appearanceMap.get(
((AtomAttributes)a.getAttributes()).atomName );
if ( ap != null ) { return ap; }
//System.out.println("Couldn't find entry for specified atom.");
return defaultAppearance;
}
COM: <s> returns the default appearance for the given atom </s>
|
funcom_train/14401652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CimObjectPathIterator enumerateInstanceNames(EINWbemQuery pQuery) throws Exception {
WbemClientProxy client = getActivePool(pQuery.getCimom()).getConnection(pQuery.getCimom(),
false);
try {
return new CimObjectPathIterator(client.getWbemClient().enumerateInstanceNames(
pQuery.getCimQueryPath()));
} catch (WBEMException wbemEx) {
throw wrapException(pQuery, wbemEx);
} finally {
releaseConnection(client);
}
}
COM: <s> enumerates the names of the instances for a specified class </s>
|
funcom_train/5265456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntCharSet copy() {
IntCharSet result = new IntCharSet();
int size = intervalls.size();
for (int i=0; i < size; i++) {
Interval iv = ((Interval) intervalls.elementAt(i)).copy();
result.intervalls.addElement(iv);
}
return result;
}
COM: <s> return a deep copy of this char set </s>
|
funcom_train/5678783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int convertWeek( String week) {
int result = 0;
if ( week != null) {
if ( week.equals( "Second")) {
result = 1;
} else if ( week.equals( "Third")) {
result = 2;
} else if ( week.equals( "Fourth")) {
result = 3;
} else if ( week.equals( "Last")) {
result = 4;
}
}
return result;
}
COM: <s> returns the week as an int </s>
|
funcom_train/41594244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSpanPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StrucDocColgroup_span_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StrucDocColgroup_span_feature", "_UI_StrucDocColgroup_type"),
V3Package.eINSTANCE.getStrucDocColgroup_Span(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the span feature </s>
|
funcom_train/11672722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void playCurrentlySelectedReceiver() {
new Thread(
new Runnable() {
public void run() {
Object obj = getCurrentlySelectedUserObject();
if ((obj != null) && obj instanceof Pauseable) {
((Pauseable) obj).setPaused(false);
updateCurrentlySelectedNodeInDispatchThread();
}
}
}).start();
}
COM: <s> ensures that the currently selected receiver active property is set to </s>
|
funcom_train/37227911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Message readGetTitleSummaryMessage() throws IOException, XmlPullParserException {
// Create the GetTitleSummaryMessage
GetTitleSummaryMessage message = new GetTitleSummaryMessage();
// Now read the isbn
message.setIsbn(new Isbn(parser.getRequiredElementText(MSG_NS, "isbn")));
// Make sure that the last tag is </message>
parser.nextEndTag(MSG_NS, "message");
return message;
}
COM: <s> reads a get title summary message </s>
|
funcom_train/15919779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBinding(XConstrainedTerm s, XConstrainedTerm t) {
addBinding(s.term(), t.term());
addIn(s.term(), s.constraint());
addIn(t.term(), t.constraint());
}
COM: <s> add the binding s </s>
|
funcom_train/21325789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class Equality extends FitnessFunction {
public String getName() {return "Equality";}
public Equality(long initCount) {
super(initCount);
this.defaultRanges[0] = -100;
this.defaultRanges[1] = 100;
// TODO Auto-generated constructor stub
}
public double calculate(double [] inputs)
{
double res = 0;
for (int i = 0; i< inputs.length; i++)
for (int j = 0; j <= i; j++)
{
res += (inputs[i]- inputs[j])*
(inputs[i]- inputs[j]);
}
return res;
}
}
COM: <s> implementation of equality function </s>
|
funcom_train/375259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFlagPostHeuristics() {
JScanner.bindingOverride(JProtocol.TCP_ID, true);
JScanner.heuristicPostCheck(JProtocol.TCP_ID, true);
PcapPacket packet = getPcapPacket(HTTP, 5);
assertTrue(packet.hasHeader(JProtocol.ETHERNET_ID));
assertTrue(packet.hasHeader(JProtocol.IP4_ID));
assertTrue(packet.hasHeader(JProtocol.TCP_ID));
assertTrue(packet.hasHeader(JProtocol.HTTP_ID));
}
COM: <s> test flag post heuristics </s>
|
funcom_train/17821164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String toString = "";
if (_isEmpty) {
toString = "_";
} else {
toString = Integer.toString(_value);
}
if (_puzzle.getDebugLevel() >= 2) {
if (_possibilitiesCount > 1) {
toString += "{" + _possibilitiesCount + "}";
} else {
toString += " ";
}
}
return toString;
}
COM: <s> my string representation for printing </s>
|
funcom_train/33839587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long readLArray(Object o) throws IOException {
// Note that we assume that only a single thread is
// doing a primitive Array read at any given time. Otherwise
// primitiveArrayCount can be wrong and also the
// input data can be mixed up. If this assumption is not
// true we need to synchronize this call.
primitiveArrayCount = 0;
return primitiveArrayRecurse(o);
}
COM: <s> this routine provides efficient reading of arrays of any primitive </s>
|
funcom_train/36753573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteSelected(SceneNode[] selected) {
Vector<SceneNode> filtered = filterChildren(selected);
for (int i = 0; i < filtered.size(); i++) {
SceneNode t = (SceneNode) filtered.get(i);
if (t == transformationTree.getRoot())
continue;
if (t instanceof Light)
Light.returnLight((Light) t);
transformationTree.removeNodeFromParent(t);
}
}
COM: <s> deletes all the selected nodes </s>
|
funcom_train/20899748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareByteArrays() {
int a = 0;
for (int i = 0; i < image.length; i++) {
if (image[i] != image2[i]) {
a++;
System.out.println(i + " " + image[i] + " " + image2[i]);
}
}
return a;
}
COM: <s> compares two byte arrays which are supposed to be equel </s>
|
funcom_train/49836881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFriend(String nick) {
if(DEBUG) System.out.println("Player[" + getName() + "].removeFriend(\"" + nick + "\")");
synchronized(friends) {
friends.remove(nick);
// remove from database too
PersistentPlayer.deletePlayerFriend(getName(), nick);
}
}
COM: <s> remove the friend from the friend list </s>
|
funcom_train/35748987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startPlayback() {
AL10.alSourcei(source, AL10.AL_LOOPING, AL10.AL_FALSE);
AL10.alSourcef(source, AL10.AL_PITCH, pitch);
remainingBufferCount = BUFFER_COUNT;
for (int i = 0; i < BUFFER_COUNT; i++) {
stream(bufferNames.get(i));
}
AL10.alSourceQueueBuffers(source, bufferNames);
AL10.alSourcePlay(source);
}
COM: <s> starts the streaming </s>
|
funcom_train/2288932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmsLink addLink(CmsRelationType type, String targetUri, boolean internal) {
CmsLink link = new CmsLink(LINK_PREFIX + m_linkTable.size(), type, targetUri, internal);
m_linkTable.put(link.getName(), link);
return link;
}
COM: <s> adds a new link to the link table </s>
|
funcom_train/11773946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int handleHashCode(Map<String, Object> values) {
HashCodeBuilder hashCodeBuilder = new HashCodeBuilder();
for (Entry<String, Method> pd : readablePropertiesSet) {
hashCodeBuilder.append(handleGetter(pd.getValue(), values));
}
return hashCodeBuilder.toHashCode();
}
COM: <s> returns a hash code value for the proxied object based on the properties </s>
|
funcom_train/4429169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean login(String user, String pass) throws AuthenticationException {
if (user == null || pass == null) {
return false;
}
StatusBar.send(LangKissRessourceBundle.getString("status.message.google.find") + " " + user + " ...");
service = new DocsService(APPLICATION_NAME);
service.setUserCredentials(user, pass);
return true;
}
COM: <s> set user credentials based on a username and password </s>
|
funcom_train/3098968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerEchoService() {
// Get the Resolver service for the current peer group.
Log.current.println("\nGetting ResolverService");
resolverService = peerGroup.getResolverService();
String localPeerId = peerGroup.getPeerID().toString();
// Register the handler with the resolver service.
Log.current.println("Registering with ResolverService");
resolverService.registerHandler(ECHO_HANDLER_NAME, this);
}
COM: <s> registers the echo service </s>
|
funcom_train/49106057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DcBusXmlType createDcBus(String id) throws Exception {
DcBusXmlType busRec = createDcBus();
busRec.setId(id);
if (this.objectCache.get(id) != null) {
throw new Exception("Bus record duplication, bus id: " + id);
}
this.objectCache.put(id, busRec);
return busRec;
}
COM: <s> create a bus object with the id make sure there is no duplication </s>
|
funcom_train/3561835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void expand(javax.swing.JTree tree, javax.swing.tree.TreePath path) {
Object[] tempObject;
tempObject = new Object[2];
tempObject[0] = tree;
tempObject[1] = path;
nodeQueue.put(tempObject);
if (!processing)
restartDispatch();
}
COM: <s> expands a node </s>
|
funcom_train/40675896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Loop openLoop(List<? extends Object> content, String... fields) {
Loop parent = (Loop) parameters.get("forloop");
Loop child = new Loop(content, parent, this, fields);
parameters.put("forloop", child);
return child;
}
COM: <s> opens a loop on this opject </s>
|
funcom_train/21954404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancel() {
if (mJob instanceof CancelablePrintJob) {
try {
((CancelablePrintJob) mJob).cancel();
} catch (PrintException e) {
showError(Pooka.getProperty("PrintDisplay.message.errorCanceling", "Error canceling job: "), e);
}
}
}
COM: <s> cancels the printjob </s>
|
funcom_train/24000829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToConcrete() {
TestVariableDeclaraionAst instance = new TestVariableDeclaraionAst("test");
instance.typeExpression = OclTypeRegistry.OclBooleanType;
assertEquals("test : Boolean",instance.toConcrete());
TestOclExpressionAst dv = new TestOclExpressionAst("default");
instance.defaultValue = dv;
assertEquals("test : Boolean = default",instance.toConcrete());
}
COM: <s> test of to concrete method of class variable declaration ast </s>
|
funcom_train/37592390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ItemT removeDocument(ItemT doc) {
synchronized(_model) {
// System.err.println("removing from old list " + doc);
int i = _model.indexOf(doc);
if( i == -1 )
throw new IllegalArgumentException("Document " + doc + " not found in Document Navigator");
ItemT result = getFromModel(i);
_model.remove(i);
return result;
}
}
COM: <s> removes the document from the navigator </s>
|
funcom_train/10907167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOutline(PDFOutline outline) {
if (subentries.size() > 0) {
outline.prev
= (PDFOutline)subentries.get(subentries.size() - 1);
outline.prev.next = outline;
} else {
first = outline;
}
subentries.add(outline);
outline.parent = this;
// note: count is not just the immediate children
incrementCount();
last = outline;
}
COM: <s> add a sub element to this outline </s>
|
funcom_train/7842754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSruToObj() throws Exception {
System.out.println("sruToObj");
String sruRequest = "";
Utilities instance = new Utilities();
Object expResult = null;
Object result = instance.sruToObj(sruRequest);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of sru to obj method of class org </s>
|
funcom_train/22386020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStepNeg() {
for(int i=0; i<c.length; i++) {
assertTrue(d.s(c[i], 0) == c[i]);
for(int n = -10; n <= 10; n++) {
Cell end = d.s(c[i], n);
if(end == null) continue;
assertTrue(d.s(end, -n) == c[i]);
}
}
}
COM: <s> test that stepping and then stepping back gets us back to </s>
|
funcom_train/20932140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintComponent(Graphics graphics) {
Graphics2D g = (Graphics2D)graphics.create();
g.setColor(LayoutVariables.PLACEHOLDER_COLOR);
g.setComposite(LayoutVariables.PLACEHOLDER_ALPHA);
g.fillRect(0, 0, LayoutVariables.CARD_WIDTH,
LayoutVariables.CARD_HEIGHT);
g.dispose();
}
COM: <s> draws the stack background </s>
|
funcom_train/7336001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getOpenedChildrenDepth(InfoBean container) {
int maxDepth = 0;
List<InfoBean> children = ContainerHierarchyTools.getChildren(container);
if (children.size() > 0 && openedContainers.contains(container.getId())) {
// container has children and is opened
maxDepth = 1;
for(InfoBean child : children) {
int depth = getOpenedChildrenDepth(child);
if (depth + 1 > maxDepth) {
maxDepth = depth + 1;
}
}
}
return maxDepth;
}
COM: <s> recursive function returning the maximum depth of all the opened children </s>
|
funcom_train/44216747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getTreeScrollPane() {
treeScrollPane = new JScrollPane();
treeScrollPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), " Table of Contents "));
treeScrollPane.setViewportView(getTree());
return treeScrollPane;
}
COM: <s> this method initializes tree scroll pane </s>
|
funcom_train/9978543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteGlobalExceptionMapping(Element mapping) {
pContext.getProject().fireChangeEvent(ProjectChangeListener.EventType.PluginSettingsWillChange, Struts2Tools.pluginID);
mapping.getParentNode().removeChild(mapping);
pContext.getProject().fireChangeEvent(ProjectChangeListener.EventType.PluginSettingsChanged, Struts2Tools.pluginID);
}
COM: <s> deletes a global exception mapping </s>
|
funcom_train/31930344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openFile(String path) {
Cursor c = getCursor();
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try {
openFileSilently(path);
}
catch (BlitzException be) {
error(null, "Can't open file", be);
displayFileOpenErrorDialog(fileOpenErrorMessage(be, path));
}
setCursor(c);
}
COM: <s> open the file specified by the code path code </s>
|
funcom_train/11734377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Properties load() throws RepositoryException {
try {
Properties p2 = new Properties();
InputStream in = new FileInputStream(fileName);
try {
p2.load(in);
} finally {
in.close();
}
if (LOG.isDebugEnabled()) {
LOG.debug("Load " + p2);
}
return p2;
} catch (IOException e) {
throw getException(e);
}
}
COM: <s> load the properties file </s>
|
funcom_train/21333075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setViewCenter(String viewCenter) {
if( !viewCenter.equals(this.viewCenter) ){
setMapProperty("Center", viewCenter);
}
String old = this.viewCenter;
this.viewCenter = viewCenter;
propertyChangeSupport.firePropertyChange("viewCenter", old, viewCenter);
}
COM: <s> setter for property view center </s>
|
funcom_train/13201139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT:
public void write (AbstractXmlWriter writer) throws IOException {
writer.startTag (getPrefixMap (), getNamespace (), getName ());
int len = getAttributeCount ();
for (int i = 0; i < len; i++) {
Attribute attr = getAttribute (i);
writer.attribute (attr.getNamespace (),
attr.getName (), attr.getValue ());
}
writeChildren (writer);
COM: <s> writes this element and all children to the given xml writer </s>
|
funcom_train/27718516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStyle(Style style) {
Style oldStyle = this.style;
this.style = Styles.mutateStyle(this, style);
Styles.applyStyle(this, oldStyle, this.style);
firePropertyChange("style", oldStyle, this.style);
}
COM: <s> sets the style </s>
|
funcom_train/39912218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetRh9() {
System.out.println("setRh9");
TextField tf = null;
Page1 instance = new Page1();
instance.setRh9(tf);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set rh9 method of class timesheetmanagement </s>
|
funcom_train/310881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setAxis(int x, int y , int z) {
if (scene != null) {
RotationInterpolator rot = scene.getRotationInterpolator();
if (rot !=null) {
Transform3D axis = new Transform3D();
AxisAngle4f an = new AxisAngle4f (x,y,z,(float) (Math.PI/2));
axis.set(an);
rot.setTransformAxis(axis);//setAxisOfRotation(axis);
}
}
}
COM: <s> set the axis of rotation </s>
|
funcom_train/33791782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onRuntimeException(RuntimeException e) {
// Clearly a bug. Ask to file a bug report, and print a stack trace.
addError("Runtime error, please file a bug report. Error message: \""+e.getLocalizedMessage() +"\"");
String stacktrace = "(unavailable)";
try{
StringWriter s = new StringWriter();
PrintWriter pw = new PrintWriter(s);
e.printStackTrace(pw);
stacktrace = s.toString();
} catch (Exception e2) {
// do nothing
}
addError("Trace: "+stacktrace);
}
COM: <s> handler that is invoked if do file operations caused a runtime </s>
|
funcom_train/16259607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertElementAt(Object element, int index) {
if (fElements.contains(element)) {
return;
}
fElements.add(index, element);
if (isOkToUse(fTreeControl)) {
fTree.add(fParentElement, element);
if (fTreeExpandLevel != -1) {
fTree.expandToLevel(element, fTreeExpandLevel);
}
}
dialogFieldChanged();
}
COM: <s> adds an element at a position </s>
|
funcom_train/3560105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showData(Integer pAuthorID) throws DbException {
if (!isInitialized())
init();
authorID = pAuthorID;
MoreSwingUtilities.disableTabs(tbdAuthorDetails);
loadAuthorDetails();
MoreSwingUtilities.enableTab(tbdAuthorDetails, 0);
panDataView.setIndex(authorID);
panDataView.showItems();
MoreSwingUtilities.enableTab(tbdAuthorDetails, 1);
}
COM: <s> shows the author details </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.