__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3099044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DialogFsmAction makeDialogFsmAction (String action) {
DialogFsmAction dialogFsmAction = (DialogFsmAction) dialogFsmActionCache.get(action);
if (dialogFsmAction != null)
return dialogFsmAction;
dialogFsmAction = new DialogFsmAction(action);
dialogFsmActionCache.put(action, dialogFsmAction);
return dialogFsmAction;
}
COM: <s> makes a new dialog fsm action object </s>
|
funcom_train/24000850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSourceExpressionCollectonType() {
LoopAst instance = new TestLoopAst();
OclExpressionAst source = new TestOclExpressionAst("source", OclObjectFactory.create(new Bag()));
instance.addChild(source);
assertEquals("OCLAny", instance.getSourceExpressionCollectonType().getPathName());
}
COM: <s> test of get source expression collecton type method of class loop ast </s>
|
funcom_train/39913206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetEh14() {
System.out.println("setEh14");
TextField tf = null;
Page1 instance = new Page1();
instance.setEh14(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 eh14 method of class timesheetmanagement </s>
|
funcom_train/44723928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object extractData(ResultSet resultSet) throws SQLException, DataAccessException {
ArrayList resultsList = new ArrayList();
int rowCount = 0;
// Loop through adding the results row by row to our array.
// Check as we go that we aren't exceeding the max results count.
while (resultSet.next() && rowCount < maxResults) {
processRow(resultSet, rowCount, resultsList);
rowCount++;
}
return resultsList;
}
COM: <s> main extraction method </s>
|
funcom_train/18306011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() throws java.io.IOException {
if (position > 0) {
if (encode) {
out.write(Base64.encode3to4(buffer, position));
} // end if: encoding
else {
throw new java.io.IOException(
"Base64 input not properly padded."); //$NON-NLS-1$
} // end else: decoding
} // end if: buffer partially full
super.flush();
out.flush();
} // end flush
COM: <s> appropriately pads base64 notation when encoding or throws an </s>
|
funcom_train/43245439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetTmpZipCode() {
System.out.println("setTmpZipCode");
String tmpZipCode = "";
PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object();
instance.setTmpZipCode(tmpZipCode);
// 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 tmp zip code method of class org </s>
|
funcom_train/3290440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopRecorder(int channel) {
Writer recorder=(Writer)recorders.get(new Integer(channel));
if (recorder!=null) {
try {
recorder.flush();
recorder.close();
} catch(IOException e) {
log.error(""+e);
}
recorders.remove(new Integer(channel));
}
}
COM: <s> stop the recording session of a channel </s>
|
funcom_train/43508175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
loginService.login(GWT.getHostPageBaseURL(), new AsyncCallback<LoginInfo>() {
public void onFailure(Throwable error) {
}
public void onSuccess(LoginInfo result) {
loginInfo = result;
if(loginInfo.isLoggedIn()) {
createPantscraft();
} else {
loadLogin();
}
}
});
}
COM: <s> this is the entry point method </s>
|
funcom_train/18367483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageDescriptor getIcon() {
if (icon == null)
return null;
URL url;
try {
URL pluginInstallUrl = configElement.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL();
url= new URL(pluginInstallUrl, icon);
} catch (MalformedURLException exception) {
WorkbenchPlugin.log("Unable to load working set icon"); //$NON-NLS-1$
return null;
}
return ImageDescriptor.createFromURL(url);
}
COM: <s> returns the pages icon </s>
|
funcom_train/47109377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Location queryLocation(EntityManager manager, String locationName) {
// direct cache hit?
if (locationCache.containsKey(locationName)) {
return locationCache.get(locationName);
}
// query entry in the database
Location location = LocationHelper.getByName(manager, locationName);
locationCache.put(locationName, location);
return location;
}
COM: <s> returns the location for the given name </s>
|
funcom_train/46455063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Shape getHead(double theta) {
GeneralPath path = new GeneralPath();
path.moveTo(1, 0);
path.lineTo(-headSize, -headSize/2);
path.lineTo(-headSize, +headSize/2);
path.closePath();
AffineTransform rot = AffineTransform.getRotateInstance(-theta);
Shape head = rot.createTransformedShape(path);
return head;
}
COM: <s> gets the arrowhead shape </s>
|
funcom_train/4124476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateGame(Connection connection, XMLStreamReader in, XMLStreamWriter out) {
try {
in.nextTag();
getFreeColClient().getGame().readFromXML(in);
} catch (XMLStreamException e) {
logger.warning(e.toString());
}
}
COM: <s> handles an update game message </s>
|
funcom_train/19977632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRow(int count) {
for (int i = 0; i < count; i++) {
if (predefinedRow == null) {
addRow((Object[]) null);
} else {
if (autoCountColumn != null) {
predefinedRow[autoCountColumn] = getRowCount() + 1;
}
addRow(predefinedRow);
}
}
}
COM: <s> adds rows to the end of the model </s>
|
funcom_train/28367435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getCurrentMinY() {
if (zoomGridLimitsV.size() == 0) {
if (externalGridLimits == null || externalGridLimits.isSetYmin() == false) {
return getInnerMinY();
} else {
return externalGridLimits.getMinY();
}
} else {
GridLimits gl = zoomGridLimitsV.lastElement();
if (gl.isSetYmin() == false) {
return getInnerMinY();
}
return gl.getMinY();
}
}
COM: <s> returns the current min y attribute of the function graphs jpanel object </s>
|
funcom_train/4253538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getAttributes(String a_name)
{ Vector v=new Vector(av.size());
for (int i=0; i<av.size(); i++)
{ AttributeField a=(AttributeField)av.elementAt(i);
if (a.getAttributeName().equals(a_name)) v.addElement(a);
}
return v;
}
COM: <s> gets a vector of attribute values of a particular attribute name </s>
|
funcom_train/37484996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displaySticker() {
// instantiate the stciker viewer
try {
TextViewer sv = new TextViewer(this, true,
dataManager.vehicleCollection.item(cmbVehicles
.getSelectedItem().toString()),
TextViewer.VEHICLE_STICKER);
sv.show();
}
catch (Exception e) {
showErrorMessage(e.getMessage());
}
}
COM: <s> displays the vehicle sticker </s>
|
funcom_train/21437637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Atom a, int num) {
Integer cur_num = atoms.get(a);
if( cur_num==null )
atoms.put(a,num);
else
atoms.put(a,cur_num+num);
main_mass += num * a.getMainMass();
avg_mass += num * a.getAverageMass();
}
COM: <s> add code num code instances of atom code a code to the </s>
|
funcom_train/40884185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains (BoundingBox bounds) {
if (!isValid()) return true;
if (min.x > bounds.max.x) return false;
if (min.y > bounds.max.y) return false;
if (min.z > bounds.max.z) return false;
if (max.x < bounds.min.x) return false;
if (max.y < bounds.min.y) return false;
if (max.z < bounds.min.z) return false;
return true;
}
COM: <s> returns wheter the given bounding box is contained in this bounding box </s>
|
funcom_train/29274868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportModel(Model _model, OutputStream _outputStream) {
try {
ObjectOutputStream objectOutputStream = new ObjectOutputStream(_outputStream);
objectOutputStream.writeObject(_model);
objectOutputStream.close();
} catch (IOException e) {
RuntimeContext.getInstance().caught(e);
}
}
COM: <s> export the given model to the output stream </s>
|
funcom_train/26014472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected State getState(int i) {
State state = null;
if (stateMachine[i] instanceof String) {
state = getState((String) stateMachine[i]);
if (tokenizeOnLookup) {
stateMachine[i] = state;
}
} else {
state = (State) stateMachine[i];
}
return state;
}
COM: <s> gets the code state code at the given index </s>
|
funcom_train/36906027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ImportToAll (java.lang.String _class) throws CacheException {
Dataholder[] args = new Dataholder[1];
args[0] = new Dataholder(_class);
Dataholder res=mInternal.runInstanceMethod("ImportToAll",args,Database.RET_NONE);
return;
}
COM: <s> p runs method import to all in cache </s>
|
funcom_train/41109247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String extractText(Holder holder) {
ByteArrayInputStream is = new ByteArrayInputStream(holder.getContent());
ExcelExtractor extractor;
try {
extractor = new ExcelExtractor(new POIFSFileSystem(is));
return extractor.getText();
} catch (IOException e) {
log.error("Exception while parsing file" + holder.getFilename());
}catch(EncryptedDocumentException e){
log.error("The document : " + holder.getFilename()
+ " is a encrypted word files!");
} finally {
IOUtils.closeQuietly(is);
}
return null;
}
COM: <s> extract the text from an excel document </s>
|
funcom_train/28364805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSamples( final MutableStatsWithExtrema stats ) {
_population += stats._population;
final double weight = stats._population / _population;
_mean = ( 1 - weight ) * _mean + weight * stats._mean;
_meanSquare = ( 1 - weight ) * _meanSquare + weight * stats._meanSquare;
if(stats._max > _max) _max = stats._max;
if(stats._min < _min) _min = stats._min;
}
COM: <s> merge in samples from other statistics </s>
|
funcom_train/40169328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void render( float interpolation ) {
Renderer r = display.getRenderer();
/** Reset display's tracking information for number of
* triangles/vertexes */
r.clearStatistics();
/** Clear the previous frame's buffer information. */
r.clearBuffers();
/** Execute renderQueue item */
GameTaskQueueManager.getManager().getQueue(GameTaskQueue.RENDER)
.execute();
}
COM: <s> render the scene </s>
|
funcom_train/7699374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyOnZeroFiles(File[] files) {
int count = countFilesInDirectory(files);
if (files != null && count > 0) {
return;
}
logger.error("FileProcessing.notifyOnZeroFiles(): Should you have a file to process? sourceData.file: " + sourceData.file);
}
COM: <s> warn there are no files to work on </s>
|
funcom_train/43244876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetConnectionInfo() {
System.out.println("getConnectionInfo");
ServerStatusObject instance = new ServerStatusObject();
String expResult = "";
String result = instance.getConnectionInfo();
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 get connection info method of class org </s>
|
funcom_train/21952115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean acceptDefaultFocus() {
if (isEditorEnabled()) {
// for some reason this returns false in dialogs
/*
boolean returnValue = valueComponent.requestFocusInWindow();
System.err.println( getDisplayValue() + ": returining " + returnValue);
return returnValue;
*/
valueComponent.requestFocusInWindow();
return true;
} else {
return false;
}
}
COM: <s> accepts or rejects the initial focus for this component </s>
|
funcom_train/50083797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectClass(int classIndex) {
try {
boolean classSelectFlag = mSelectClassFlag[mClassDescentSortIndex[classIndex]];
if (!classSelectFlag) {
mNumberOfSelectedClass++;
mNumberOfSelectedVectors += getNumberOfVectorsInClass(classIndex);
mSelectClassFlag[mClassDescentSortIndex[classIndex]] = true;
createArrayOfSelectedObjects();
}
} catch (Exception exception) {
throw new IllegalArgumentException("The index is invalid", exception);
}
}
COM: <s> selects a detected class </s>
|
funcom_train/27722538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadProperties(String customTypesFileName) {
//load the Types to use in the application
typeManager = new TypeManager(customTypesFileName);
//TODO: move to where it makes more sense (and maybe improve so just use props)
//init controller properties
props = (SDMControllerProperties)getConfiguration(new SDMControllerProperties());
}
COM: <s> load the application properties settings and preferences </s>
|
funcom_train/12164538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStandardJdbcRepository() throws ConfigurationException {
String repositoryElement = "<jdbc-repository project=\"jdbc-project\"/>";
RepositoryDeviceConfiguration standard =
checkStandardDeviceRepository(repositoryElement);
assertTrue(standard instanceof JDBCRepositoryDeviceConfiguration);
JDBCRepositoryDeviceConfiguration jdbc =
(JDBCRepositoryDeviceConfiguration) standard;
assertEquals("", "jdbc-project", jdbc.getProject());
}
COM: <s> test the devices standard jdbc repository element </s>
|
funcom_train/4479630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String varNameForClass(String className) {
StringBuffer buf = new StringBuffer(
String.valueOf(Character.toLowerCase(className.charAt(0))));
buf.append(className.substring(1, className.length()));
return buf.toString();
}
COM: <s> returns a variable name for the name of the given class </s>
|
funcom_train/4926688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCurrentTimePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Time_currentTime_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Time_currentTime_feature", "_UI_Time_type"),
DomainPackage.Literals.TIME__CURRENT_TIME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the current time feature </s>
|
funcom_train/12309635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFeatureReferenceModel(SiteFeatureReferenceModel featureReference) {
SiteFeatureReferenceModel[] existingModels =
getFeatureReferenceModels();
for (int j = 0; j < existingModels.length; j++) {
if (existingModels[j]
.getVersionedIdentifier()
.equals(featureReference.getVersionedIdentifier())) {
super.removeFeatureReferenceModel(existingModels[j]);
}
}
super.addFeatureReferenceModel(featureReference);
}
COM: <s> adds feature model to site model removing old feature </s>
|
funcom_train/7625590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void expungeMessage(String account, long messageId) {
if (TextUtils.isEmpty(account)) {
throw new IllegalArgumentException("account is empty");
}
Uri uri = Uri.parse(AUTHORITY_PLUS_MESSAGES + account + "/" + messageId);
mContentResolver.delete(uri, null, null);
}
COM: <s> expunge the indicated message </s>
|
funcom_train/28752838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRtprimvolume(Long newVal) {
if ((newVal != null && this.rtprimvolume != null && (newVal.compareTo(this.rtprimvolume) == 0)) ||
(newVal == null && this.rtprimvolume == null && rtprimvolume_is_initialized)) {
return;
}
this.rtprimvolume = newVal;
rtprimvolume_is_modified = true;
rtprimvolume_is_initialized = true;
}
COM: <s> setter method for rtprimvolume </s>
|
funcom_train/1880122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveCenter(){
move(pond.getWidth()/2.0,pond.getHeight()/2.0,false);
/** debug-output */
if(isDisplayDebugMessage){
System.out.println(this.frogID + " center");
}
}
COM: <s> move center of the pond </s>
|
funcom_train/29862312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCorrectAnswer(String answer) {
for (String entry : answerEntries) {
String[] answers = currentWord.getTranslations(entry);
if (answers==null)
continue;
for (String str : answers) {
if (this.interpretJapanese) {
if (answer.equals(Romaji.parse(str)))
return true;
} else {
if (answer.equals(str))
return true;
}
}
}
return false;
}
COM: <s> only test the answer but do not change statistics for the word </s>
|
funcom_train/8533898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFormTemplate(TemplateBuilder builder) {
fForm = builder.buildPanel(ANNOTATION_FORM);
fPanel.add(fForm);
fForm.setEnabled(false);
fForm.setVisible(false);
fForm.addSubmitListener(newClickListener(OnEditEvent.SAVE));
fForm.addCancelListener(newClickListener(OnEditEvent.CANCEL));
}
COM: <s> this method is used for late binding of this form with the dynamic </s>
|
funcom_train/32720248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TransportMapping getTransport(Address destAddress) {
Class addressClass = destAddress.getClass();
List l = (List) transportMappings.get(addressClass);
if ((l != null) && (l.size() > 0)) {
TransportMapping transport = (TransportMapping)l.get(0);
return transport;
}
return null;
}
COM: <s> returns a transport mapping that can handle the supplied address </s>
|
funcom_train/18581205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAdminCentricFunction(UserCentricFunction adminCentricFunction, int n) {
this.adminCentricFunctions[n] = adminCentricFunction ;
addFunctionTab(adminCentricFunction.getPanel(), adminCentricFunction.getFunctionShortName(), adminCentricFunction.getFunctionName(), n);
}
COM: <s> adds a admin centric function to the function tab </s>
|
funcom_train/46791239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void basicClearPropagate() {
List oldObjects = new ArrayList(objects);
objects.clear();
for (Iterator i = oldObjects.iterator(); i.hasNext();) {
COSDocumentElement element = (COSDocumentElement) i.next();
COSObject dereferenced = element.dereference();
willChange(dereferenced);
ICOSContainer newContainer = element.removeContainer(this);
dereferenced.triggerChanged(COSObject.SLOT_CONTAINER, null,
newContainer);
}
}
COM: <s> remove all elements from the receiver </s>
|
funcom_train/43404286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseStart(Element element) {
if (element.getNodeName().equals(ROOT_ELEMENT)) {
NodeList childNodes = element.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
parseRoot(childNodes.item(i));
}
}
else {
setError("Document root element is not %%1", ROOT_ELEMENT);
}
}
COM: <s> start parsing at the root code element code </s>
|
funcom_train/28751163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGrantor(String newVal) {
if ((newVal != null && this.grantor != null && (newVal.compareTo(this.grantor) == 0)) ||
(newVal == null && this.grantor == null && grantor_is_initialized)) {
return;
}
this.grantor = newVal;
grantor_is_modified = true;
grantor_is_initialized = true;
}
COM: <s> setter method for grantor </s>
|
funcom_train/3290291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mkdir(String path) {
String res;
res=exec.execute(sshpath+"/ssh -q -l "+dstuser+" "+dsthost+" mkdir "+path+"");
log.debug("SCPcopy -> mkdir "+path+" : "+res);
return res.length()<=0;
}
COM: <s> creates a directory at the host </s>
|
funcom_train/24076105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double test(double[][] calib, double[][] test) {
double totalDifference = 0;
int N = 0;
for (int i=0; i<calib.length; i++) {
for (int j=0; j<calib[i].length; j++) {
totalDifference += Math.abs(( test[i][j] - calib[i][j] ));
N++;
}
}
return totalDifference / N;
}
COM: <s> compare two datasets by calculating the percentage difference between their </s>
|
funcom_train/33601225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(int[] targets, SystemMessage sm) {
if (sm instanceof TOMMessage) {
clientsConn.send(targets, (TOMMessage) sm, false);
} else {
Logger.println("--------sending----------> " + sm);
serversConn.send(targets, sm);
}
}
COM: <s> send a message to target processes </s>
|
funcom_train/31130666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetDevice(NXTInfo nxt) throws NXTCommException, IOException {
ui.message("Attempting to reboot the device.");
NXTComm nxtComm = NXTCommFactory.createNXTComm(nxt.protocol);
if (!nxtComm.open(nxt, NXTComm.LCP)) {
throw new NXTCommException("Failed to open device in command mode.");
}
try
{
NXTCommand cmd = new NXTCommand(nxtComm);
// Force into firmware update mode.
cmd.boot();
}
finally
{
nxtComm.close();
}
}
COM: <s> attempt to restart the nxt in sam ba mode </s>
|
funcom_train/16141444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTypeInfo(Buffer b, CompileResult cr) {
Collection<PolyMLError> el;
if (typeinfos.containsKey(b)) {
el = typeinfos.get(b);
} else {
el = new HashSet<PolyMLError>();
}
for (PolyMLError e : cr.errors) {
if (e.kind == PolyMarkup.KIND_TYPE_INFO) {
el.add(e);
}
}
}
COM: <s> adds the detail of a supplemental compile result i </s>
|
funcom_train/3409609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int h1 = name.toLowerCase().hashCode();
int h2 = (domain!=null) ? domain.toLowerCase().hashCode() : 0;
int h3 = (path!=null) ? path.hashCode() : 0;
return h1 + h2 + h3;
}
COM: <s> return hash code of this http cookie </s>
|
funcom_train/28261824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
// Push EFLAGS first, if 32 bit instruction
if (cpu.doubleWord) {
// Since we don't use EFLAGS, push 0x0000 onto stack
cpu.setWordToStack(new byte[]{0x00, 0x00});
}
// Push flags register (16-bit) onto stack
cpu.setWordToStack(Util.booleansToBytes(cpu.flags));
}
COM: <s> transfer flags register onto stack top ss sp </s>
|
funcom_train/2558919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Instance getInstance(Value value) throws Exception {
Class expect = value.getType();
if(!isInstantiable(expect)) {
expect = getConversion(expect);
}
if(!isCollection(expect)) {
throw new InstantiationException("Invalid collection %s for %s", expect, type);
}
return new ConversionInstance(context, value, expect);
}
COM: <s> this creates a code collection code instance from the type </s>
|
funcom_train/8686471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getReferencedObject(Project fallback) throws BuildException {
if (refid == null) {
throw new BuildException("No reference specified");
}
Object o = project == null ? fallback.getReference(refid) : project.getReference(refid);
if (o == null) {
throw new BuildException("Reference " + refid + " not found.");
}
return o;
}
COM: <s> resolve the reference using the associated project if </s>
|
funcom_train/31800844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(RemindersTO remindersTO) throws DAOException {
Reminder reminder = findDB(remindersTO.getReminderId());
reminder.fromRemindersTO(remindersTO);
logger.info("Saving to database");
try {
session.save(reminder);
} catch (HibernateException e) {
logger.info(e.getMessage());
throw new DAOException(e.getMessage());
} /* try */
} /* update() */
COM: <s> method for update event </s>
|
funcom_train/3371624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaint(long tm, int x, int y, int w, int h) {
Container parent = getParent();
if(parent != null)
parent.repaint(tm,x+getX(),y+getY(),w,h);
else
super.repaint(tm,x,y,w,h);
}
COM: <s> always repaint in the parents coordinate system to make sure </s>
|
funcom_train/11381443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logEvent(HistoryEvent event, JobID id) {
try {
final MetaInfo mi = fileMap.get(id);
if (mi != null) {
mi.writeEvent(event);
}
} catch (IOException e) {
LOG.error("Error Logging event, " + e.getMessage());
}
}
COM: <s> method to log the specified event </s>
|
funcom_train/14128321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Symbol lookup(final String identifier, final Token token) {
if (top == null) {
return symbols.lookup(identifier, token);
}
Symbol result;
try {
result = symbols.lookup(identifier, token);
} catch (final SemanticError e) {
result = null;
}
if (result != null) {
return result;
} else {
return top.lookup(identifier, token);
}
}
COM: <s> looks up code identifier code within current context </s>
|
funcom_train/40312406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsSigned_InvalidColumn2() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.isSigned(0);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by isSigned method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests is signed with column index equals to 0 </s>
|
funcom_train/34889767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void providerStateChanged(LocationProvider provider, int newState) {
switch (newState) {
case LocationProvider.AVAILABLE:
updateState(GPSProvider.GPS_AVAILABLE);
break;
case LocationProvider.OUT_OF_SERVICE:
destroy();
break;
case LocationProvider.TEMPORARILY_UNAVAILABLE:
updateState(GPSProvider.GPS_TEMPORARILY_UNAVAILABLE);
break;
}
}
COM: <s> a callback method called each time the provider updates its state </s>
|
funcom_train/9642474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel createContentPane() {
FormLayout layout = new FormLayout("d, 3dlu, f:d:g, 3dlu, d",
"p, 3dlu, p, 7dlu, " + // name and type
"p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, f:20dlu:g, 3dlu, p,"); // alternatives
JPanel panel = new JPanel(layout);
appendContent(panel);
return panel;
}
COM: <s> creates the content pane </s>
|
funcom_train/8124470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Cursor getBlankCursor() {
if(blankCursor == null) {
Image blankImage = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(blankImage, new Point(0, 0), "");
}
return blankCursor;
}
COM: <s> create a blank 1x1 image to use when the cursor is disabled </s>
|
funcom_train/215162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem createRadioItem(boolean enabled, boolean selected) {
JRadioButtonMenuItem item = createRadioButtonMenuItem(
getToggleLabel(enabled, selected),
selected);
item.setEnabled(enabled);
item.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
JRadioButtonMenuItem source = (JRadioButtonMenuItem) e.getSource();
source.setText(getToggleLabel(source.isEnabled(), source.isSelected()));
}
});
return item;
}
COM: <s> creates and answers a code jradio button menu item code </s>
|
funcom_train/7625500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToDefaults() {
fontScale = 1;
mcc = mnc = 0;
locale = Locale.getDefault();
userSetLocale = false;
touchscreen = TOUCHSCREEN_UNDEFINED;
keyboard = KEYBOARD_UNDEFINED;
keyboardHidden = KEYBOARDHIDDEN_UNDEFINED;
hardKeyboardHidden = HARDKEYBOARDHIDDEN_UNDEFINED;
navigation = NAVIGATION_UNDEFINED;
orientation = ORIENTATION_UNDEFINED;
}
COM: <s> set this object to the system defaults </s>
|
funcom_train/44011412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCity() {
System.out.println("setCity");
String city = "";
StoreBO instance = new StoreBO();
instance.setCity(city);
// 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 city method of class edu </s>
|
funcom_train/41400262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMimeType() {
if (!exists()) {
return null;
}
try {
Property prop = node.getNode(JCRConstants.JCR_CONTENT).getProperty(
JCRConstants.JCR_MIMETYPE);
return prop == null ? null : prop.getString();
} catch (RepositoryException re) {
return null;
}
}
COM: <s> uses the standard jcr mime type property </s>
|
funcom_train/28295997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDataNull() throws Exception {
Entry entry =
dvm.new Entry(Package.class, Sphere.class, Package.NAME,
Sphere.NAME);
Entry entry2 =
dvm.new Entry(IsClassOf.class, Sphere.class, IsClassOf.NAME,
Sphere.NAME);
dvm.set(entry);
dvm.set(entry2);
Collection<Class<? extends DataAddon>> dataClasses = dvm.getData(null);
assertEquals(dataClasses.size(), 0);
}
COM: <s> test get data null </s>
|
funcom_train/48453415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isQualified() {
// disqualify Axis package.
Class<?> returnType = m.getReturnType();
if (! returnType.getName().contains("axis"))
if (m.getName().contains("get") || m.getName().contains("set"))
return true;
else
return false;
else return false;
}
COM: <s> todo apply filters for axis stuff </s>
|
funcom_train/18437446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer s = new StringBuffer();
s.append("Player = " + player.name + "\n");
s.append(" Sets = " + sets + "\n");
s.append(" Legs = " + legs + "\n");
s.append(" Points = " + points + "\n");
return s.toString();
}
COM: <s> print this object for debug </s>
|
funcom_train/33398837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getDetailsPanel() {
if (detailsPanel == null) {
GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
gridBagConstraints2.fill = GridBagConstraints.BOTH;
gridBagConstraints2.weighty = 1.0;
gridBagConstraints2.weightx = 1.0;
detailLabel = new JLabel();
detailLabel.setText("Details");
detailsPanel = new JPanel();
detailsPanel.setLayout(new BorderLayout());
detailsPanel.add(detailLabel, BorderLayout.NORTH);
detailsPanel.add(getDetailsScrollPane(), BorderLayout.CENTER);
}
return detailsPanel;
}
COM: <s> this method initializes details panel </s>
|
funcom_train/51271011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Window assignWindow() throws MXQueryException{
generalWindowNb++;
if((generalWindowNb >> currentPosition)> 0 ){
increaseCurrentPosition();
}
int i=0;
IntegerList items = new IntegerList();
if(!endOfStream){
while((generalWindowNb >> i) > 0 ){
if((generalWindowNb & ( 1 << i)) > 0){
items.add(i);
}
i++;
}
return seq.getNewItemWindow(items);
}else{
return null;
}
}
COM: <s> generating all subsequences by the use of the binary integer representation </s>
|
funcom_train/29023238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e) {
SpinnerModel model = (SpinnerModel)e.getSource();
int value=((Number)model.getNextValue()).intValue();
if(model == begModel) {
begValue=value;
}
else {
enValue=value;
}
if(model == endModel) {
layer = plot.getLayer();
t = new javax.swing.Timer(1000, this);
t.start();
time=begValue;
}
}
COM: <s> respond to state change with updating the time step layer </s>
|
funcom_train/48932102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String handleOntology(JenaOWLModel tempMod, String d){
Ontology o;
int i = 0;
Serializer_Text ser = new Serializer_Text();
File newF = new File(d + ".txt");
try {
System.out.println(newF.getPath());
newF.createNewFile();
ser.serializeModel(newF.getPath(), tempMod);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "";
}
COM: <s> does something with the ontology </s>
|
funcom_train/44508698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasScheme(String uri) {
int len = uri.length();
for (int i = 0; i < len; i++) {
char c = uri.charAt(i);
if (c == ':') {
return i > 0;
} else if (!isSchemeChar(c)) {
return false;
}
}
return false;
}
COM: <s> determine if a uri string has a code scheme code component </s>
|
funcom_train/33381121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showScreen(LLScreen screen) {
if (currentScreenThread != null) {
System.out.println("Stop old screen thread");
currentScreenThread.interrupt();
// TODO join?
}
System.out.println("Show next screen thread");
currentScreenThread = new Thread(screen);
currentScreenThread.run();
}
COM: <s> displays a screen </s>
|
funcom_train/13646783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Partner getPartnerByName( String name ){
for( int i = 0; i < this.root.getChildCount(); i++ ){
DefaultMutableTreeNode child = (DefaultMutableTreeNode)root.getChildAt(i);
Partner partner = (Partner)child.getUserObject();
if( partner.getName().equals( name ))
return( partner );
}
return( null );
}
COM: <s> returns a specified partner from the tree </s>
|
funcom_train/32725314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void staminaEffect() {
setAgility(getAgility() * (1 - getStamina()*Constants.STAMINAMODIFIER)); //incl. implicit changes (actionRadius)
setKickAccuracy(getKickAccuracy() * (1 - getStamina()*Constants.STAMINAMODIFIER));
setSpeed(getSpeed() * (1 - getStamina()*Constants.STAMINAMODIFIER)); //incl. implicit changes (actionRadius)
}
COM: <s> causes a decrease of some players attribute values because of weak stamina </s>
|
funcom_train/19433834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNextMessageToDisplay() {
if ( messagesToDisplay.isEmpty() ) {
throw new IndexOutOfBoundsException( "There are no messages to display" );
}
String message = (String) messagesToDisplay.iterator().next();
messagesToDisplay.remove( message );
return message;
}
COM: <s> the gui gets the messages that keep arriving with this method </s>
|
funcom_train/47020959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdAddDict() {
if (cmdAddDict == null) {//GEN-END:|112-getter|0|112-preInit
// write pre-init user code here
cmdAddDict = new Command(getLocalizedString("adddict"), Command.OK, 6);//GEN-LINE:|112-getter|1|112-postInit
// write post-init user code here
}//GEN-BEGIN:|112-getter|2|
return cmdAddDict;
}
COM: <s> returns an initiliazed instance of cmd add dict component </s>
|
funcom_train/2437261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TransformationEditor getEditor(TransformationPage page, InterchangeView view) {
checkNotNull(page, "page");
checkNotNull(view, "view");
TransformationEditor editor = editors.get(page);
if (editor == null) {
editor = new TransformationEditor(page, view);
editors.put(page, editor);
page.addResource(new CachedEditorRemover());
}
return editor;
}
COM: <s> returns the editor for a given code transformation page code </s>
|
funcom_train/3361042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if ((obj != null) && (obj instanceof RefAddr)) {
RefAddr target = (RefAddr)obj;
if (addrType.compareTo(target.addrType) == 0) {
Object thisobj = this.getContent();
Object thatobj = target.getContent();
if (thisobj == thatobj)
return true;
if (thisobj != null)
return thisobj.equals(thatobj);
}
}
return false;
}
COM: <s> determines whether obj is equal to this ref addr </s>
|
funcom_train/20079485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
if (!running) return;
timer.cancel();
timer = null;
running = false;
for (int i = 0; i < effects.length; i++) {
Effect effect = effects[i];
effect.increase(effect.to);
effect.onComplete();
}
fireEvent(Events.EffectComplete);
}
COM: <s> stops the animation </s>
|
funcom_train/17966901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getConfigProperty(final String key, final String defaultValue) {
String value = this.configuration.getProperty(key);
if (value == null) {
if (isRootConfig()) {
value = defaultValue;
}
else {
value = this.parentConfiguration.getConfigProperty(key, defaultValue);
}
}
return value;
}
COM: <s> returns the configuration property with the specified key </s>
|
funcom_train/8322181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(ServletConfig servletConfig) throws ServletException {
super.init(servletConfig);
// init: charEncoding
initCharEncodingHandler(servletConfig);
// init: callbacks
initCallbacks(servletConfig);
// make: catalogLocator
// A derived class can alter how the calalog locator object is
// created.
this.catalogLocator = makeCatalogLocator(servletConfig);
DataSourcesConfig.DataSources dataSources =
makeDataSources(servletConfig);
addToDataSources(dataSources);
}
COM: <s> initializes servlet and xml a handler </s>
|
funcom_train/31937233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AdaptableCollectionElement getChildWithID(AdaptableCollectionElement parent, String id) {
Object[] children = parent.getChildren();
for (int i = 0; i < children.length; ++i) {
AdaptableCollectionElement currentChild = (AdaptableCollectionElement)children[i];
if (currentChild.getId().equals(id))
return currentChild;
}
return null;
}
COM: <s> go through the children of the passed parent and answer the child </s>
|
funcom_train/28928207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void add(Socket s) {
try {
Client c = new Client(this, s, basicMode);
c.start(); //this kicks off "run" in a thread
} catch (Exception ex) {
logln("Failed to add new client: " + ex.getMessage(), LERROR);
try {
s.close();
} catch (Exception ex2) {
}
}
}
COM: <s> add a new connection </s>
|
funcom_train/6289926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getTime() {
if (time == -1) {
toString();
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, day);
calendar.set(Calendar.MONTH, month - 1);
calendar.set(Calendar.YEAR, year);
time = calendar.getTime().getTime();
}
return time;
}
COM: <s> gets the unix timestamtp the time in miliseconds from the beginning </s>
|
funcom_train/4525992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerDependentBeans(String beanName, Set<String> autowiredBeanNames) {
if (beanName != null) {
for (String autowiredBeanName : autowiredBeanNames) {
beanFactory.registerDependentBean(autowiredBeanName, beanName);
if (logger.isDebugEnabled()) {
logger.debug(
"Autowiring by type from bean name '" + beanName + "' to bean named '" + autowiredBeanName +
"'");
}
}
}
}
COM: <s> register the specified bean as dependent on the autowired beans </s>
|
funcom_train/20883126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireMarkerReached(SpeakableEvent event) {
if (listener != null) {
listener.markerReached(event);
}
Enumeration E;
if (synth.speakableListeners != null) {
E = synth.speakableListeners.elements();
while (E.hasMoreElements()) {
SpeakableListener sl = (SpeakableListener) E.nextElement();
sl.markerReached(event);
}
}
}
COM: <s> utility function that sends a code marker reached code event </s>
|
funcom_train/18032221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void chooseImportDate() {
DateChooser dialog = new DateChooser();
dialog.setLocation(
getButtonDate().getLocationOnScreen().x,
getButtonDate().getLocationOnScreen().y);
dialog.setVisible(true);
if (dialog.wasCancelled()) {
return;
}
DateFormat format = DateFormat.getDateInstance();
getTextCustomDate().setText(format.format(dialog.getDialogBean().getTime()));
}
COM: <s> lets the user choose an import date </s>
|
funcom_train/5580599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedUser(int uid) {
for (int i=0; i<getModel().getSize(); i++) {
User u = (User)(getModel().getElementAt(i));
if (u.getUID().equals("" + uid)) {
getModel().setSelectedItem(u);
break;
}
}
}
COM: <s> set selection to user with given uid </s>
|
funcom_train/3369789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAccessibleSelectionCount() {
MenuElement me[] =
MenuSelectionManager.defaultManager().getSelectedPath();
if (me != null) {
for (int i = 0; i < me.length; i++) {
if (me[i] == JMenu.this) { // this menu is selected
if (i+1 < me.length) {
return 1;
}
}
}
}
return 0;
}
COM: <s> returns 1 if a sub menu is currently selected in this menu </s>
|
funcom_train/12563769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doStop() throws MediaException {
if (stopped) return;
synchronized (playLock) {
try {
if (playThread != null) {
stopped = true;
playLock.notifyAll();
mediaTimeOffset = doGetMediaTime();
startTime = 0;
playLock.wait();
}
} catch (InterruptedException ie) {
//do nothing
}
}
}
COM: <s> stops the gif player </s>
|
funcom_train/9114348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONArray toJSONArray(JSONArray names) {
verifyIsNull();
if ((names == null) || (names.length() == 0)) {
return null;
}
JSONArray ja = new JSONArray();
for (int i = 0; i < names.length(); i += 1) {
ja.put(this.opt(names.getString(i)));
}
return ja;
}
COM: <s> produce a jsonarray containing the values of the members of this </s>
|
funcom_train/33142256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getStatusTextArea() {
if (statusTextArea == null) {
statusTextArea = new JTextArea();
statusTextArea.setBackground(java.awt.SystemColor.info);
statusTextArea.setFont(new java.awt.Font("Monospaced", java.awt.Font.PLAIN,
11));
statusTextArea.setEditable(false);
}
return statusTextArea;
}
COM: <s> this method initializes status text area </s>
|
funcom_train/2278656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getTableListPanel() {
if (tableListPanel == null) {
tableListPanel = new JPanel();
tableListPanel.setLayout(new BorderLayout());
tableListPanel.setPreferredSize(new java.awt.Dimension(0, 0));
tableListPanel.add(getWebApplicationScrollPane(), java.awt.BorderLayout.CENTER);
tableListPanel.add(getRefreshButtonPanel(), java.awt.BorderLayout.SOUTH);
}
return tableListPanel;
}
COM: <s> this method initializes j panel2 </s>
|
funcom_train/13409573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doSelection(Spatial object, boolean marquee) {
if (isMultipleSelection() || marquee) {
if (!getSelectedSpatials().contains(object))
editor.getEditorContext().addSelectionObject(object);
else
editor.getEditorContext().removeSelectionObject(object);
} else {
// If we are not in the multiple selection mode
// We will clear the list first, then add the object
editor.getEditorContext().clearSelection();
editor.getEditorContext().addSelectionObject(object);
}
}
COM: <s> this method will handle the addition or removal of </s>
|
funcom_train/14157947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getMNamePanel() {
if (mNamePanel == null) {
mNameLabel = new JLabel();
mNameLabel.setText("unknown");
mNamePanel = new JPanel();
mNamePanel.setLayout(new BorderLayout());
mNamePanel.setBackground(new Color(0.3f, 0.4f, 0.3f));
mNameLabel.setForeground(Color.white);
mNamePanel.add(getMPanelUserData(), BorderLayout.CENTER);
}
return mNamePanel;
}
COM: <s> this method initializes m name panel </s>
|
funcom_train/20727692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initWidgets(IPreferenceStore store) {
// get groups
groups = Group.getGroupMap();
// intialize groups combo
updateGroupsCombo();
// intialize users in chosen group
updateUserListSWT();
// intialize online user list
Iterator<User> userIter = onlineUserList.iterator();
String user = null;
if (onlineUserList != null) {
while (userIter.hasNext()) {
user = userIter.next().getName();
// all online users have to be shown in online user list !!
onlineUserListSWT.add(user);
}
}
}
COM: <s> initializes all widgets of the xecli p preference page </s>
|
funcom_train/5373159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color getBackground (int index) {
checkWidget ();
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return getBackground ();
/*
int pixel = cellBackground != null ? cellBackground [index] : -1;
return pixel == -1 ? getBackground () : Color.win32_new (display, pixel);
*/
return new Color(display, handle.style.backgroundColor);
}
COM: <s> returns the background color at the given column index in the receiver </s>
|
funcom_train/17939151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zeroMaxScale(){
for (int i=0; i<getNumAxes(); i++){
// initialize scaling of axis to show maximum detail
axes[i].offset = model.getMaxValue(axes[i].dimension);
axes[i].scale = -1 * axes[i].offset;
}
deepRepaint = true;
repaint();
}
COM: <s> configures scales translates all axes to show all values between zero </s>
|
funcom_train/9202932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean raycast(Vector2 start, Vector2 end, boolean ignoreSensors, boolean all, List<RaycastResult> results) {
// create the ray and obtain the maximum length
Vector2 d = start.to(end);
double maxLength = d.normalize();
Ray ray = new Ray(start, d);
// call the raycast method
return this.raycast(ray, maxLength, ignoreSensors, all, results);
}
COM: <s> performs a raycast against all the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.