__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/34529772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Workbook getWorkbook() throws DataSourceException {
String filePath = getFilePath();
Workbook workbook = null;
try {
workbook = Workbook.getWorkbook(new File(filePath));
} catch (Exception ex) {
String msg = "Unable to read the " +
"spreadsheet from the file: " + filePath;
throw new DataSourceException(msg);
}
if (workbook == null) {
String msg = "Unable to read the " +
"spreadsheet from the file: " + filePath;
throw new DataSourceException(msg);
}
return workbook;
}
COM: <s> reads and returns the spreadsheet from the local file system </s>
|
funcom_train/24294574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserViewInterface getUser(UserInfoInterface userInfo, String userId) {
UserViewInterface [] result = getUsers(userInfo, userId);
if(result.length > 0) return result[0];
return new UserView(new HashMap<String,String>());
}
COM: <s> get an user </s>
|
funcom_train/34998727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Smilie smilie, UploadedFileInformation uploadedFile) {
this.applyCommonConstraints(smilie);
if (smilie.getId() > 0) {
throw new ValidationException("Cannot add an existing (id > 0) smilie");
}
String imageDiskName = this.saveImage(uploadedFile);
if (imageDiskName == null) {
throw new NullPointerException("Could not find the smile file to save");
}
smilie.setDiskName(imageDiskName);
this.repository.add(smilie);
}
COM: <s> adds a new smilie </s>
|
funcom_train/46528690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculateLegendWidth(Graphics g) {
int legendWidth = 0;
for (int i = 0; i < curves.size(); i++) {
Curve cur = curves.get(i);
String label = cur.getLabel();
if (label != null) {
int tmp = g.getFontMetrics().stringWidth(label);
if (tmp > legendWidth)
legendWidth = tmp;
}
}
legendWidth += LEGEND_LEFT_PADDING;
legendWidth += LEGEND_LEFT_MARGIN;
legendWidth += LEGEND_RIGHT_MARGIN;
legendTotalWidth = legendWidth;
}
COM: <s> calculates width of the legend panel </s>
|
funcom_train/2431258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean replaceOriginalItems() {
final ReplaceWorker worker = new ReplaceWorker();
if (saveWhenModified) {
return new ProjectAlteringProcessProcess<Boolean>(project) {
@Override
protected Boolean doWork() {
return worker.replace();
}
}.run();
} else {
return worker.replace();
}
}
COM: <s> requests that the original items are replaced by the copies </s>
|
funcom_train/27868718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSetSpecCount() throws OAIException {
int ret = 0;
try {
NodeList list = XPathAPI.selectNodeList(xmlRecord, "//oai:setSpec", repo.getNamespaceNode());
ret = list.getLength();
} catch (TransformerException te) {
throw new OAIException(OAIException.CRITICAL_ERR, te.getMessage());
}
return ret;
}
COM: <s> return the number of set spec strings for the record </s>
|
funcom_train/3761801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Run getRun(String contestId, int state) throws SystemException {
final RunDAO runDAO = daoFactory.createRunDAO();
Connection connection = null;
try {
connection = ds.getConnection();
return runDAO.findByContestIdState(connection, contestId, state);
} catch(SQLException sqle) {
throw new SystemException(sqle);
} finally {
if (connection != null)
try {
connection.close();
} catch (SQLException sqle) { }
}
}
COM: <s> query for available runs </s>
|
funcom_train/40945013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface ItemSetChangeNotifier {
/**
* Adds an Item set change listener for the object.
*
* @param listener
* listener to be added
*/
public void addListener(Container.ItemSetChangeListener listener);
/**
* Removes the Item set change listener from the object.
*
* @param listener
* listener to be removed
*/
public void removeListener(Container.ItemSetChangeListener listener);
}
COM: <s> the interface for adding and removing code item set change event code </s>
|
funcom_train/10482361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendString(byte[] value) {
// sort out how we need to append this
switch (IMAPResponseTokenizer.getEncoding(value)) {
case Token.LITERAL:
appendLiteral(value);
break;
case Token.QUOTEDSTRING:
appendQuotedString(value);
break;
case Token.ATOM:
appendAtom(value);
break;
}
}
COM: <s> append a value in a byte array to a command buffer </s>
|
funcom_train/20889731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkSuppliedPacket(LayerType sender) {
if (packet != null) {
LayerType upper = sender.getUpperLayer();
if (!packet.getLayer().equals(upper)) {
LOGGER.error("Node " + this.getSender() + ": supplied packet " + this.packet + " is not from the upper layer " + upper.name()
+ ", but for layer " + packet.getLayer().name());
}
}
}
COM: <s> method to check if the supplied packet is for the next higher layer </s>
|
funcom_train/18513177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getChildCount() {
// deals with invalid node
if (node == null) { return 0; }
// calls the ancestor method
int result = 0;
// looks at every node to count those we want to display
for (int i = 0; i < super.getChildCount(); i++) {
if (this.isChildDisplayed(i)) {
result++;
}
}
// returns the result
return result;
}
COM: <s> overrides the default method to hide the node that we dont want to </s>
|
funcom_train/43245684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFamilyPrefix() {
System.out.println("getFamilyPrefix");
SponsorDemographicDG1Object instance = new SponsorDemographicDG1Object();
String expResult = "";
String result = instance.getFamilyPrefix();
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 family prefix method of class org </s>
|
funcom_train/29718896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copy(final Activity _activity) {
super.copy(_activity);
this.breakdownElements.addAll(_activity.getBreakdownElements());
this.concreteActivities.addAll(_activity.getConcreteActivities());
this.guidances.addAll(_activity.getGuidances());
this.alternatives = _activity.getAlternatives();
this.howToStaff = _activity.getHowToStaff();
this.purpose = _activity.getPurpose();
}
COM: <s> copy the activity into the current activity </s>
|
funcom_train/12646618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int index) {
synchronized (getTreeLock()) {
MenuBarPeer peer = (MenuBarPeer) this.peer;
if (peer != null) {
Menu m = getMenu(index);
m.removeNotify();
m.parent = null;
peer.delMenu(index);
}
menus.removeElementAt(index);
}
}
COM: <s> removes the menu located at the specified </s>
|
funcom_train/19091787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAsLastChild(int parentIndex, int childIndex) {
int pchunk = parentIndex >> CHUNK_SHIFT;
int pindex = parentIndex & CHUNK_MASK;
int chunk = childIndex >> CHUNK_SHIFT;
int index = childIndex & CHUNK_MASK;
setChunkIndex(fNodeLastChild, childIndex, pchunk, pindex);
} // setAsLastChild(int,int)
COM: <s> sets the last child of the parent index to child index </s>
|
funcom_train/19437066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getExercise() {
int exerciseNumber = exerciseNumberChoice.getInt();
dataModel.downloadExercise(exerciseNumber);
if (dataModel.getExercise(exerciseNumber) == null) {
new Zs710Exception("Not data received!");
} else {
setExerciseData(dataModel.getExercise(exerciseNumber));
}
}
COM: <s> if get exercise button was pressed </s>
|
funcom_train/2040190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addNaviagateListener() {
ORListenerManager.getInstance().addOREventListener(ListenerConstant.ListenerNavigateTo, new OREventListener() {
public void handleEvent(OREvent event) {
Navigate navigate = (Navigate) event.getData();
if (isActivityResumed() && navigate != null) {
handleNavigate(navigate);
}
}
});
}
COM: <s> if the activity resumed handle the navigation </s>
|
funcom_train/8147307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getRoutingTable( Vertex v ) {
if ( shortestpathtree==null || v!=startVertex )
shortestpathtree = shortestPath( v );
Map routingMap = new HashMap();
/*
Aufgabe: Hier fehlt noch der eigentliche Algorithmus!
Kleiner Tipp: Am besten definiert man sich eine rekursive Hilfsroutine
(aehnlich wie oben fuer getLongestDistance() ).
*/
return routingMap;
}
COM: <s> method that computes the routing table corresponding to a shortest path </s>
|
funcom_train/19838178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object that) {
if (!(that instanceof LargeInteger))
return false;
LargeInteger li = (LargeInteger) that;
return (_size == li._size) && (_isNegative == li._isNegative)
&& (compare(_words, li._words, _size) == 0);
}
COM: <s> compares this large integer against the specified object </s>
|
funcom_train/46473364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createUseCaseConfigView() throws InvalidXMLFileException {
ProjectReader pr = new ProjectReader(prjFileName);
String path = getProjectDirectory();
ViewModelGenerator ucConfig = new UseCasesConfigCreator(pr.getUnifiedFile(),configs.get(page1.getConfigChoiceCombo().getText()));
ucConfig.generateModel();
String filename = path + page1.getConfigChoiceCombo().getText() + ".unifiedmetamodel";
ucConfig.saveModel(filename);
generateUseCasesConfigDiagram(filename);
}
COM: <s> this method creates a features tree view </s>
|
funcom_train/45692185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMemoryProtectEnabledPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GlobalParameters_memoryProtectEnabled_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GlobalParameters_memoryProtectEnabled_feature", "_UI_GlobalParameters_type"),
EsxPackage.Literals.GLOBAL_PARAMETERS__MEMORY_PROTECT_ENABLED,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the memory protect enabled feature </s>
|
funcom_train/38908165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CompassPoint parseHemisphereLon(int index) {
char ch = getCharValue(index);
CompassPoint d = CompassPoint.valueOf(ch);
if (d != CompassPoint.EAST && d != CompassPoint.WEST) {
throw new ParseException("Invalid longitude hemisphere " + ch + "'");
}
return d;
}
COM: <s> parses the hemisphere of longitude from the specified field </s>
|
funcom_train/44708649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private EmailAddressRecord getEmailRecord() {
if (m_emailRecord == null) {
try {
m_emailRecord = new EmailAddressRecord
(new OID
(EmailAddressRecord.BASE_DATA_OBJECT_TYPE,
m_emailAddress));
} catch (DataObjectNotFoundException e) {
m_emailRecord = new EmailAddressRecord(m_emailAddress);
}
}
return m_emailRecord;
}
COM: <s> gets or creates a new email address record domain object </s>
|
funcom_train/31872073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class FrameTOAL extends FrameT {
public String getLongName () { return "Original album frame"; }
public FrameTOAL (ID3V2Frame frm) {
super (frm);
}
public FrameTOAL (ID3V2Frame frm, DataSource ds)
throws SeekPastEndException {
super (frm, ds);
}
public String toString () {
return getLongName () + " Encoding: "+encoding+"\nOriginal title : "
+ text;
}
}
COM: <s> original album movie show title frame </s>
|
funcom_train/138733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeNative (PrintWriter out){
String chrom = sliceInfo.getChromosome();
String strand = sliceInfo.getStrand();
if (strand.equals(".")){
out.println("#Chr\tPosition");
for (int i=0; i< sortedPositions.length; i++) out.println(chrom+"\t"+sortedPositions[i].position);
}
else {
out.println("#Chr\tPosition\tStrand");
for (int i=0; i< sortedPositions.length; i++){
//chrom start stop name score strand
out.println(chrom+"\t"+sortedPositions[i].position+"\t"+strand);
}
}
}
COM: <s> writes native format to the print writer </s>
|
funcom_train/41017899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ObjectName getObjectName(String pid) {
Map<String, Object> properties = new HashMap<String, Object>();
Configuration configuration = this.getConfiguration(pid);
properties.put(Constants.SERVICE_ID, this.serviceReference
.getProperty(Constants.SERVICE_ID));
properties.put(Constants.SERVICE_PID, pid);
ObjectName objectName = super.getObjectNameHelper().getObjectName(
configuration, Configuration.class, properties);
return objectName;
}
COM: <s> constructs and returns the </s>
|
funcom_train/24532781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelAttributeSettings(EObject target, EStructuralFeature feature, List values) {
if (!isDead()) {
if (applyRules) {
if (feature instanceof EReference) {
// If feature is not an EReference, then post isn't in effect.
Iterator itr = values.iterator();
while (itr.hasNext()) {
appendPost(createPost(itr.next()));
}
}
}
super.cancelAttributeSettings(target, feature, values);
}
}
COM: <s> cancel a list attribute setting value </s>
|
funcom_train/10282195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfPauzedDownloads() {
int count = 0;
synchronized (mDownloadList) {
Iterator it = mDownloadList.iterator();
while (it.hasNext()) {
count += ((Download) it.next()).getState() == PAUZED ? 1 : 0;
}
}
return count;
}
COM: <s> the number of currently ongoing downloads </s>
|
funcom_train/25382467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runAsynchrone(AbstractJobTask jobTask) throws UniversalWorkerException {
if (Util.isSet(jobTask)) {
jobTask.setPhase(ExecutionPhase.QUEUED);
app.getTaskService().execute(jobTask);
} else {
throw new UniversalWorkerException(Status.CLIENT_ERROR_NOT_FOUND, "The job does not exist.");
}
}
COM: <s> run asychrone task </s>
|
funcom_train/4233145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateChart(double[] X, double sampleRate, int segmentSize) {
xySeries.clear(false);
double period = sampleRate / segmentSize;
double frequency = 0;
for (int i = 0; i < X.length; i++) {
xySeries.add(frequency, X[i], false);
frequency += period;
}
xySeries.fireSeriesChanged();
}
COM: <s> update the chart with new data </s>
|
funcom_train/3860304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSchema(Schema schema) throws Exception {
if (schemaExists(schema)) {
throw new Exception(
"Schema named <" + schema.getName() + "> already exists."); //$NON-NLS-1$ //$NON-NLS-2$
}
schemaList.add(schema);
}
COM: <s> adds a schema </s>
|
funcom_train/18951040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
PropertySet ps = getMergedPropertySet();
// PropertySet include base has precedence
if( ps.isDefined( Property.main_IncludeBase ) ) {
forceIncludeBase( ps.get( Property.main_IncludeBase ) );
}
// hack: to be removed
createConfRegExps( ps );
//iParameters = ps;
}
COM: <s> initiliase template source </s>
|
funcom_train/30274779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addThreeBlankTable() {
if (!isCanOnlyViewWI()) {
addRightTableItem(constants.tableQueue(), SYSTEM, " ");
addRightTableItem(constants.tableAgent(), SYSTEM, " ");
}
addRightTableItem(constants.tableWIDetail(), SYSTEM, " ");
mainTablePanel.addSystemBlankTables();
}
COM: <s> add 3 system tables </s>
|
funcom_train/37125634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if(debug) { System.out.println(">>>>>!!close!!>>>>>"+m_name); }
// set off the reactivity before closing to remove listeners
// that may keep a reference on this object
removeListeners() ;
super.close() ;
}
COM: <s> remove the reactivity on closing </s>
|
funcom_train/17533900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FieldElement mod(final FieldElement field) {
if (field.compareTo(this.modulus) < 0) {
return field;
} else {
int tmp = field.getCoef(mInt);
FieldElement f = field;
for (int i = 4; i >= 0; i--) {
if ((tmp ^ Mask.m[mBit + i]) != 0) {
// f.toXor(mod[i]);
}
}
return f;
}
}
COM: <s> this method calc the mod use modulus which has been set </s>
|
funcom_train/14174565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onMidletDestroy() {
this.about = null;
this.menu = null;
this.gps = null;
this.gpsDisplay = null;
this.midlet = null;
this.progressBar = null;
this.settingsMenu = null;
this.settingsGeneral = null;
this.alertError = null;
ScreenService.cameraViewFinder = null;
ScreenService.settingsCamera = null;
}
COM: <s> nullify the references to the screen objects </s>
|
funcom_train/35861754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void signalCompletion(LegoComponent component) {
if (isInitialComponent(component) && !isScreenReady()) {
activationMap.put(component.getClass(), true);
//check if the screen is ready
if (isScreenReady()) {
RootPanel.get("loadingWrapper").setVisible(false);
ApplicationScreenManager.placePreparedLayout();
afterScreenReady();
}
}
}
COM: <s> internal method by which the component signals the completion </s>
|
funcom_train/41766717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean shouldEDTSleepNoFormAnimation() {
Display d = Display.getInstance();
Vector animationQueue = d.getAnimationQueue();
synchronized (Display.lock) {
return (animationQueue == null || animationQueue.size() == 0) && inputEvents.size() == 0 && paintQueueFill == 0
&& d.hasNoSerialCallsPending();
}
}
COM: <s> used by the flush functionality which doesnt care much about component </s>
|
funcom_train/18789502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isHomeAddress(String key) {
return "homePostalAddresss:".equals(key)
|| "mozillaHomeLocalityName:".equals(key)
|| "mozillaHomePostalCode:".equals(key)
|| "mozillaHomeState:".equals(key)
|| "mozillaHomeCountryName:".equals(key);
}
COM: <s> returns true if the tag represents a home address otherwise false </s>
|
funcom_train/31291877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSchemeStrategy(final SchemeStrategy strategy) {
if (strategy == null) {
LOGGER.warn("cannot add null scheme strategy");
return;
}
final String scheme = strategy.getScheme();
LOGGER.info("adding scheme strategy for scheme '" + scheme + "': "
+ strategy.getClass().getName());
strategies.put(strategy.getScheme(), strategy);
}
COM: <s> adds the given scheme strategy </s>
|
funcom_train/4926715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLastNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Person_lastName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Person_lastName_feature", "_UI_Person_type"),
DomainPackage.Literals.PERSON__LAST_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the last name feature </s>
|
funcom_train/43692534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkConnection() throws Exception {
try {
//prglog.info("The conn value in check connection before the if loop for resetting: " + conn);
if(conn == null || conn.isClosed()) {
conn = DButil.getConnection();
//prglog.info("The conn value in check connection after resetting if needed is: " + conn);
}
} catch(SQLException e) {
throw e;
}
}
COM: <s> check if the connection does exist and open </s>
|
funcom_train/42975632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBefore(Node v, Node z) throws IllegalArgumentException {
Node u = getPrev(v); // may throw an IllegalArgumentException
z.setPrevious(u);
z.setNext(v);
v.setPrevious(z);
u.setNext(z);
size++;
}
COM: <s> inserts the given node z before the given node v </s>
|
funcom_train/37070226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getSequenceClassTypes() {
return selectcol1("SELECT distinct ps.sequence_class as class_type " +
" FROM pub_gene_sequence, pub_sequence ps " +
" where pub_gene_sequence.pub_gene_id = ?" +
" and pub_gene_sequence.pub_sequence_id = ps.id " +
" and ps.sequence_type='nucleotide'" +
" order by class_type ");
}
COM: <s> get a genes distinct sequence class type as a list of string </s>
|
funcom_train/24539333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processLayoutDataError(String validLayoutDataType, String invalidLayoutDataType) {
errorNotifier.processError(new PropertyError(ERROR_WARNING, new MessageError(MessageFormat.format(SWTMessages.CompositionProxyAdapter_LayoutDataInvalid, new Object[] {validLayoutDataType, invalidLayoutDataType}), ERROR_WARNING), sfLayoutData, getTarget()));
}
COM: <s> the child had a layout data error </s>
|
funcom_train/24525316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startElement() {
currentTagState(TagState.OPEN);
callText();
for (XMLParserListener l : listeners) {
l.startElement(this.memory.getCurrentTag(), this.memory.getAttributes(), this.memory.getNameSpace());
}
this.memory().flushNameSpace();
}
COM: <s> triggered when an opening tag has been encountered </s>
|
funcom_train/40439429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ActorMessage awaitNextMessage(final long endTime) throws InterruptedException {
transferQueues();
waitingThread = Thread.currentThread();
if (outputQueue != null) return retrieveNextMessage();
if (endTime == 0L) LockSupport.park();
else LockSupport.parkNanos(endTime - System.nanoTime());
if (Thread.currentThread().isInterrupted()) {
throw new InterruptedException();
}
return null;
}
COM: <s> holds common functionality for take message methods </s>
|
funcom_train/37153057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void randomize(double min, double max) {
Random src = new Random(System.currentTimeMillis() + Runtime.getRuntime().freeMemory());
for (int i = 0; i < size(); i++) {
elements[i] = src.nextDouble() * (max - min) + min;
}
}
COM: <s> randomizes this code pattern code with values bounded by </s>
|
funcom_train/26629561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLogonUserBadUser() {
boolean correct = false;
try {
userBiz.logonUser(System.currentTimeMillis()+"","foo");
} catch ( AuthorizationException e ) {
assertTrue("Authorization error should be 'unknown user'",
AuthorizationException.UNKNOWN_LOGIN == e.getReason());
correct = true;
}
assertTrue("Logon should throw exception for unknown user", correct);
}
COM: <s> test logon bad user </s>
|
funcom_train/41157498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSpeechEnabled(boolean enableSpeech) {
try {
if (enableSpeech && !speechEnabled) {
recognizer.resume();
recognizer.commitChanges();
speechEnabled = true;
System.out.println("[SpeechModule] Speech Enabled.");
}
else if (!enableSpeech && speechEnabled) {
recognizer.pause();
recognizer.commitChanges();
speechEnabled = false;
System.out.println("[SpeechModule] Speech Disabled.");
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> sets the speech enabled disabled </s>
|
funcom_train/22735014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setItems(String[] items) {
checkWidget();
this.table.removeAll();
for (int i = 0, n = items.length; i < n; i++) {
add(items[i], null);
}
if (!this.text.getEditable())
this.text.setText(""); //$NON-NLS-1$
}
COM: <s> sets the receivers list to be the given array of items </s>
|
funcom_train/16178004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stepSim() {
doStep = true;
pauseSim = false;
go = true;
enableManipulation(true);
if (runThread == null) {
if (executeBegin) beginModel();
schedule = model.getSchedule();
setupSchedule();
runThread = new Thread(simRun);
runThread.start();
}
notifyMonitor();
}
COM: <s> steps the simulation through one iteration of execution </s>
|
funcom_train/43215399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean validateChunk(BigHash expectedHash, byte[] bytes) {
if (validate) {
BigHash actualHash = new BigHash(bytes);
if (!actualHash.equals(expectedHash)) {
debugErr(new Exception("Invalid chunk downloaded. Expected " + expectedHash + " but received " + actualHash));
return false;
}
}
return true;
}
COM: <s> p validates a data chunk p </s>
|
funcom_train/3361586 | /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 (this == obj) {
return true;
}
if (obj instanceof CardPermission == false) {
return false;
}
CardPermission other = (CardPermission)obj;
return this.getName().equals(other.getName()) && (this.mask == other.mask);
}
COM: <s> compares the specified object with this card permission for equality </s>
|
funcom_train/21656212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /**private JButton getBtAgregarFila() {
if (btAgregarFila == null) {
btAgregarFila = new JButton();
btAgregarFila.setBounds(new Rectangle(721, 356, 43, 25));
btAgregarFila.setText("+");
btAgregarFila.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
agregarFila();
}
});
}
return btAgregarFila;
}
COM: <s> this method initializes bt agregar fila </s>
|
funcom_train/12528070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSymbol(Locale locale) {
if (locale.getCountry().length() == 0) { //$NON-NLS-1$
return currencyCode;
}
RegionInfo rinfo = new RegionInfo(locale.toCultureInfo().get_LCID());
if (rinfo.get_ISOCurrencySymbol().equals(this.currencyCode))
return rinfo.get_CurrencySymbol();
return currencyCode;
}
COM: <s> returns the symbol for this currency in the given </s>
|
funcom_train/45279484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSquareControlledBy(Square c, boolean white) {
boolean result = false;
List<Square> controlledSquares = getControlledSquares(white);
Iterator<Square> i = controlledSquares.iterator();
while (i.hasNext() && !result) {
result |= ((Square) i.next()).equals(c);
}
return result;
}
COM: <s> does code white code controlles the given square code c code </s>
|
funcom_train/2910754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void PollEventPerformed(PollEvent ce) {
compareClients();
updateNodes(root);
poll = null;
fireAccessPointEvent();
Logger.log(this.getName() + "(" + this.getHost() + ") finished polling. " +
this.currentVisibleClients.size() + " clients connected and " +
this.getClients().size() + " clients seen");
}
COM: <s> called when it receives notification that the poll is done then notifies </s>
|
funcom_train/18806597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabelFont(Font font) {
// check arguments...
if (font == null) {
throw new IllegalArgumentException("MeterPlot.setLabelFont(...): "
+ "null font not allowed.");
}
// make the change...
if (!this.labelFont.equals(font)) {
this.labelFont = font;
notifyListeners(new PlotChangeEvent(this));
}
}
COM: <s> sets the label font </s>
|
funcom_train/18089230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaint() {
// Make sure the wrapper is in full-screen mode.
// There is a bug on some implementations that turns the screen
// off full-screen mode. This can be seen when going to a
// javax.microedition.lcdui.TextBox screen and back to this one.
slave.setFullScreenMode(true);
// Do the repaint.
slave.repaint();
}
COM: <s> requests a repaint for the entire code canvas code </s>
|
funcom_train/35349112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getValueFromDesktop() {
Toolkit toolkit = Toolkit.getDefaultToolkit();
if (pcl == null) {
pcl = new WeakPCL(this, getKey(), UIManager.getLookAndFeel());
toolkit.addPropertyChangeListener(getKey(), pcl);
}
return toolkit.getDesktopProperty(getKey());
}
COM: <s> returns the value from the desktop </s>
|
funcom_train/28151754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AlloyType getTopmostSuperType(AlloyType type) {
if (type==null || type.equals(AlloyType.UNIV)) return null;
while (true) {
AlloyType top = getSuperType(type);
if (top==null || top.equals(AlloyType.UNIV)) break;
type=top;
}
return type;
}
COM: <s> if type univ return null otherwise </s>
|
funcom_train/11728708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSession() throws RepositoryException {
Session session = getHelper().getReadOnlySession();
try {
Session otherSession = session.getWorkspace().getSession();
assertSame("Workspace.getSession() returns not the same session object.",
session, otherSession);
} finally {
session.logout();
}
}
COM: <s> tests the get session method which returns the same session object as </s>
|
funcom_train/92277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProperty(String key) {
String propertyValue = null;
TransactionController tc = null;
try {
if (store != null)
{
tc = store.getTransaction(
ContextService.getFactory().getCurrentContextManager());
}
propertyValue =
PropertyUtil.getServiceProperty(tc,
key,
(String) null);
if (tc != null) {
tc.commit();
tc = null;
}
} catch (StandardException se) {
// Do nothing and just return
}
return propertyValue;
}
COM: <s> returns a property if it was set at the database or </s>
|
funcom_train/49650711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File arg0) {
String filename = arg0.getName();
return filename.endsWith(".ffv") || filename.endsWith(".fvv")
|| filename.endsWith(".vfv") || filename.endsWith(".vvv")
|| filename.endsWith(".vv2") || filename.endsWith(".vv3") || arg0.isDirectory();
}
COM: <s> whether the given file is accepted by this filter </s>
|
funcom_train/39876620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreEntity(BackupDataInputStream data) {
Context context = mContext;
String key = data.getKey();
if (DEBUG) Log.d(TAG, "got entity '" + key + "' size=" + data.size());
if (isKeyInList(key, mPrefGroups)) {
File f = context.getSharedPrefsFile(key).getAbsoluteFile();
writeFile(f, data);
}
}
COM: <s> restores one entity from the restore data stream to its proper shared </s>
|
funcom_train/4130311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadGlobalResults(PackageConfig packageContext, Element packageElement) {
NodeList globalResultList = packageElement.getElementsByTagName("global-results");
if (globalResultList.getLength() > 0) {
Element globalResultElement = (Element) globalResultList.item(0);
Map results = buildResults(globalResultElement, packageContext);
packageContext.addGlobalResultConfigs(results);
}
}
COM: <s> load all of the global results for this package from the xml element </s>
|
funcom_train/12536729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FlipMessage checkMessage(FlipMessage message) throws FlipException {
if (message.isOfType(COMMON_NS, ERROR_MESSAGE)) {
throw new FlipException(message.getElementText("source"),
message.getElementText("code"), message.getElementText("message"));
} else {
return message;
}
}
COM: <s> returns the specified code message code if it is not an error message </s>
|
funcom_train/24237042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void create(String primaryRepresentation){
// create associativeFactType
factType = sbvr_factory.createCharacteristic();
init(primaryRepresentation, 0);
super.create(true, false, false);
// create boolean object type
org.dbe.businessModeller.vocabulary.enterprise.sbvr.nounConcept.objectType.ObjectType booleanObjectType = new org.dbe.businessModeller.vocabulary.enterprise.sbvr.nounConcept.objectType.ObjectType(thingList, conceptualSchema, attributesHandler);
booleanObjectType.create("boolean");
}
COM: <s> creates characteristic fact type </s>
|
funcom_train/17059920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefaultPath() {
String defaultPath = null;
try {
defaultPath = URLDecoder.decode(getAppPath(), "UTF-8"); // + File.separator + DEFAULT_PATH;
log("getDefaultPath returns " + defaultPath, getClass(), Level.FINEST);
} catch (UnsupportedEncodingException ex) {
logStackTrace(ex, getClass());
}
return defaultPath;
}
COM: <s> get the default context path when non is manually set so far </s>
|
funcom_train/29624948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean atLeast_k_Neighbors(Integer[] Nu, Integer[] Cu){
if(Cu.length < k){
return false;
}
int[] intCu = Util.IntegerArray2IntArray(Cu);
for(int i=0;i<Nu.length;i++){
int[] neighbor = Util.IntegerArray2IntArray(neighbors.get(Nu[i]));
int[] neighborInCu = Util.IntegerArrayInIntegerArray(neighbor, intCu);
if(neighborInCu.length < k+1){
return false;
}
}
return true;
}
COM: <s> any node in nu has at least k neighbours from cu </s>
|
funcom_train/550053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChange(AttributeStateEvent evt) {
JComponent r = getValueRenderer();
if (r == null)
return;
r.setToolTipText(evt.getState());
r.setBackground(ATKConstant.getColor4Quality(evt.getState()));
fireTableRowsUpdated(row, row);
}
COM: <s> changes the state of this listener according an </s>
|
funcom_train/7642669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finish() throws IOException {
if (done) {
return;
}
def.finish();
int x = 0;
while (!def.finished()) {
if (def.needsInput()) {
def.setInput(buf, 0, 0);
}
x = def.deflate(buf);
out.write(buf, 0, x);
}
done = true;
}
COM: <s> writes any unwritten data to the underlying stream </s>
|
funcom_train/35294467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setEnableControls(boolean enable) {
for (Field f : getClass().getDeclaredFields()) {
DisableOnFind a = f.getAnnotation(DisableOnFind.class);
if (a != null) {
try {
Object o = f.get(this);
if (o instanceof Component) {
((Component)o).setEnabled(enable);
}
} catch (IllegalArgumentException e) {
} catch (IllegalAccessException e) {
}
}
}
}
COM: <s> enable or disable controls which are marked as to be disabled when searching </s>
|
funcom_train/16743374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getMinorAlleleFrequency(PrimitiveWrapper.WInteger minorAlleleIndex) {
int totalAlleles = getTotalGenotypeCounts(false) * 2;
int countAlleleA = 2 * mCounts[GenotypeConstants.EnumHomozygous00] + mCounts[GenotypeConstants.EnumHeterozygous];
double freq = (double) countAlleleA / (double) totalAlleles;
minorAlleleIndex.mInt = (freq <= 0.5) ? 0 : 1;
return Math.min(freq, 1.0 - freq);
}
COM: <s> returns the minor allele frequency </s>
|
funcom_train/14276453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HardwareAddress getHardwareAddress() {
int len = this.hlen & 0xff;
if (len > 16) {
len = 16;
}
byte[] buf = new byte[len];
System.arraycopy(this.chaddr, 0, buf, 0, len);
return new HardwareAddress(this.htype, buf);
}
COM: <s> return the hardware address </s>
|
funcom_train/20949336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectionChanged(IWorkbenchPart part, ISelection selection) {
IEditorPart epart = getSite().getPage().getActiveEditor();
if (epart instanceof DefaultIndividualEditor) {
DefaultIndividualEditor die = (DefaultIndividualEditor) epart;
if (this.equals(die.getActiveEditor())) {
updateActions(getSelectionActions());
}
} else if (this.equals(getSite().getPage().getActiveEditor())) {
updateActions(getSelectionActions());
}
}
COM: <s> this method supports situations when active editor is a part of multipage </s>
|
funcom_train/44789280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public Token getNextToken() {
if (this.token.next != null) {
this.token = this.token.next;
} else {
this.token = this.token.next = this.token_source.getNextToken();
}
this.jj_ntk = -1;
this.jj_gen++;
return this.token;
}
COM: <s> get the next token </s>
|
funcom_train/29538294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJComboBoxProfileName() {
if (jComboBoxProfileName == null) {
jComboBoxProfileName = new JComboBox();
jComboBoxProfileName.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
profileChanged(e);
}
});
}
return jComboBoxProfileName;
}
COM: <s> this method initializes j combo box profile name </s>
|
funcom_train/10794455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private QueryKey toQueryKey(Query q) {
QueryImpl impl = (QueryImpl) q;
if (impl.hasPositionalParameters())
return QueryKey.newInstance(impl.getDelegate(),
impl.getPositionalParameters());
return QueryKey.newInstance(impl.getDelegate(),
impl.getNamedParameters());
}
COM: <s> return a cache key for the given query </s>
|
funcom_train/48266758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveBuddy(final String theBuddyName, final String theGroupName) {
if (isContained(_myBuddies, theBuddyName)) {
char myStatus = buddy(theBuddyName).statuschar();
removeBuddy(theBuddyName);
addBuddies(new String[] { theBuddyName }, theGroupName);
mapBuddy(theGroupName, theBuddyName, myStatus);
}
}
COM: <s> move a buddy from one group to another in your buddylist </s>
|
funcom_train/43590519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getFindDevicesMenuItem() {
if (findDevicesMenuItem == null) {
findDevicesMenuItem = new JMenuItem();
findDevicesMenuItem.setText("Find Devices");
findDevicesMenuItem.addActionListener(ViewHandler.getInstance().getListener());
findDevicesMenuItem.setActionCommand(ListenerActions.FIND_DEVICES.toString());
}
return findDevicesMenuItem;
}
COM: <s> this method initializes find devices menu item </s>
|
funcom_train/37444827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMultipleRecords() {
final AuditTrail3 auditTrailA = new AuditTrail3("a");
final AuditTrail3 auditTrailB = new AuditTrail3("b");
final AuditTrail3 auditTrailC = new AuditTrail3("c");
entityManager.persist(auditTrailA);
entityManager.persist(auditTrailB);
entityManager.persist(auditTrailC);
entityManager.flush();
auditTrailC.setName("C");
}
COM: <s> adds multiple records to the database to investigate an optimistic lock </s>
|
funcom_train/4779914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getDenyAccessRadioButton() {
if (denyAccessRadioButton == null) {
denyAccessRadioButton = new JRadioButton();
denyAccessRadioButton.setText(ResourceUtil.getString("accesslevel.denyaccess"));
denyAccessRadioButton.setFont(GuiConstants.FONT_PLAIN);
if (accessRule != null && accessRule.getLevel().equals(SubversionConstants.SVN_ACCESS_LEVEL_DENY_ACCESS)) {
denyAccessRadioButton.setSelected(true);
}
}
return denyAccessRadioButton;
}
COM: <s> this method initializes deny access radio button </s>
|
funcom_train/24154742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getChecksum(final byte[] data) {
String checksum = null;
try {
BigInteger i = null;
final MessageDigest m = MessageDigest.getInstance("MD5");
m.update(data, 0, data.length);
i = new BigInteger(1, m.digest());
checksum = String.format("%1$032X", i);
} catch (final NoSuchAlgorithmException e) {
LOGGER.error("Cannot calculate MD5 hash.", e);
}
return checksum;
}
COM: <s> calculates a md5 hash for data utilizing sun message digest </s>
|
funcom_train/37819835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseEntered(MouseEvent e) {
Component c = e.getComponent();
if (c instanceof SynDiaPanel) {
((SynDiaPanel) e.getComponent()).setBorder(BorderFactory
.createLineBorder(RenderElement.HIGHLIGHT_COLOR, 3));
} else {
((SynDiaPanel) e.getComponent().getParent())
.setBorder(BorderFactory.createLineBorder(
RenderElement.HIGHLIGHT_COLOR, 3));
}
}
COM: <s> if mouse enters paint a red border around syntax diagram </s>
|
funcom_train/21777468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void iconify() {
Object [] viewSet = views.values().toArray();
try
{
for(int i = 0; i < viewSet.length; i++) {
((MDIInternalFrame)viewSet[i]).setIcon(true);
}
if (contentSpecWindow != null) {
contentSpecWindow.setIcon(true);
}
}
catch(PropertyVetoException pve){}
}
COM: <s> iconifies all of the views in the view set </s>
|
funcom_train/28020274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertBreak() throws IOException, BadLocationException, RuntimeException {
int caretPos = jtpMain.getCaretPosition();
htmlKit.insertHTML(htmlDoc, caretPos, "<BR>", 0, 0, HTML.Tag.BR);
jtpMain.setCaretPosition(caretPos + 1);
}
COM: <s> method for inserting a break br element </s>
|
funcom_train/24463362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hasCustomConfiguration(Class<?> beanClass) throws IllegalArgumentException {
log.debug("hasCustomConfiguration: entering with beanClass=[" + beanClass + "].");
validationHelper.ensureExists("beanClass", "check for custom configuration", beanClass);
boolean result = customConfigurations.containsKey(beanClass);
log.debug("hasCustomConfiguration: exiting returning [" + result + "].");
return result;
}
COM: <s> does the specified type have a custom configuration registered </s>
|
funcom_train/3364919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAncestorListener(AncestorListener listener) {
AncestorNotifier ancestorNotifier = getAncestorNotifier();
if (ancestorNotifier == null) {
return;
}
ancestorNotifier.removeAncestorListener(listener);
if (ancestorNotifier.listenerList.getListenerList().length == 0) {
ancestorNotifier.removeAllListeners();
putClientProperty(JComponent_ANCESTOR_NOTIFIER, null);
}
}
COM: <s> unregisters code listener code so that it will no longer receive </s>
|
funcom_train/25505706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getProxyHostField() {
if (proxyHostField == null) {
proxyHostField = new TextWidget(10);
proxyHostField.setToolTipText(LocalizationData.get("PreferencesDialog.Network.proxyField.tooltip")); //$NON-NLS-1$
proxyHostField.addPropertyChangeListener(TextWidget.TEXT_PROPERTY, this.updateOkListener);
}
return proxyHostField;
}
COM: <s> this method initializes proxy host field </s>
|
funcom_train/20774457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void filterChainSetting (){
tracker = new BlurringFilter2DTracker(chip);
( (EventFilter2D)tracker ).addObserver(this);
setEnclosedFilterChain(new FilterChain(chip));
getEnclosedFilterChain().add((EventFilter2D)tracker);
( (EventFilter2D)tracker ).setEnclosed(true,this);
( (EventFilter2D)tracker ).setFilterEnabled(isFilterEnabled());
}
COM: <s> sets the blurring filter2 dtracker as a enclosed filter to find cluster </s>
|
funcom_train/40347893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int scrollLeft() {
Element e = get(0);
if (e == null) {
return 0;
}
if (e == window || e.getNodeName() == null) {
return Window.getScrollLeft();
} else if (e == (Node) document) {
return document.getScrollLeft();
} else {
return e.getScrollLeft();
}
}
COM: <s> gets the scroll left offset of the first matched element </s>
|
funcom_train/44285970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private char convertCodeC(String twoDigits) {
char result = (char) (' ' + new Integer(twoDigits).intValue());
switch (result) {
case '\u0080' : // 96
result = FNC_3;
break;
case '\u0081' : // 97
result = FNC_2;
break;
case '\u0082' : // 98
result = SHIFT;
break;
case '\u0083' : // 99
result = MODE_C;
break;
}
return result;
}
COM: <s> converts the mode c two digit combinations to their corresponding </s>
|
funcom_train/51697415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void voidEval(String cmd) throws RSrvException {
if (!connected || rt==null)
throw new RSrvException(this,"Not connected");
Rpacket rp=rt.request(Rtalk.CMD_voidEval,cmd+"\n");
if (rp!=null && rp.isOk()) return;
throw new RSrvException(this,"voidEval failed",rp);
}
COM: <s> evaluates the given command but does not fetch the result useful for assignment </s>
|
funcom_train/41387942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newOne(boolean isnew){
if (np!=null)
remove(np);
np=null;
if(sp!=null)
remove(sp);
sp=null;
np=new NewPanel(this);
if(isnew)eo= new ExpObject();
np.openObject(eo);
add(np,BorderLayout.CENTER);
updateGUI();
}
COM: <s> describe code new one code method here </s>
|
funcom_train/50863645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getTripTimeRange(double tripTimeLimit, boolean useBuffer) {
double timeAtSite = FIELD_SITE_TIME;
double tripTimeTravelingLimit = tripTimeLimit - timeAtSite;
double averageSpeed = getAverageVehicleSpeedForOperators();
double millisolsInHour = MarsClock.convertSecondsToMillisols(60D * 60D);
double averageSpeedMillisol = averageSpeed / millisolsInHour;
return tripTimeTravelingLimit * averageSpeedMillisol;
}
COM: <s> gets the range of a trip based on its time limit </s>
|
funcom_train/37586591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReducedToken prevItem() {
int rmbOffset = _rmb.getBlockOffset();
int rmcOffset = _rmc.getBlockOffset();
prev();
ReducedToken temp = currentToken();
next();
_rmb.setBlockOffset(rmbOffset);
_rmc.setBlockOffset(rmcOffset);
return temp;
}
COM: <s> get the previous token </s>
|
funcom_train/26099514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyListenerRequestSend(HttpMessage httpMessage) {
ProxyListener listener = null;
List<ProxyListener> listenerList = parentServer.getListenerList();
for (int i=0;i<listenerList.size();i++) {
listener = listenerList.get(i);
try {
listener.onHttpRequestSend(httpMessage);
} catch (Exception e) {
// ZAP: Log exceptions
log.warn(e.getMessage(), e);
}
}
}
COM: <s> go through each observers to process a request in each observers </s>
|
funcom_train/8222826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDomainCredentials(DomainCredential cred) {
if ((cred.getUsername() == null || cred.getUsername().equals(""))
&& (cred.getPassword() == null || cred.getPassword().equals("")))
return;
_domainCredentials.put(cred.getHost(), cred);
}
COM: <s> adds the domain credentials </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.