__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/21263683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Actividades entity) {
EntityManagerHelper.log("saving Actividades instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved actividades entity </s>
|
funcom_train/26333608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doFusionEngineExplosion(int engineRating, Coords position, Vector<Report> vDesc, Vector<Integer> vUnits) {
int[] myDamages = { engineRating, (engineRating / 10), (engineRating / 20), (engineRating / 40) };
doExplosion(myDamages, true, position, false, vDesc, vUnits, 5);
}
COM: <s> extract explosion functionality for generalized explosions in areas </s>
|
funcom_train/3392438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List subs(ClassDoc cd, boolean isEnum) {
if (isEnum) {
return get(subEnums, cd);
} else if (cd.isAnnotationType()) {
return get(subAnnotationTypes, cd);
} else if (cd.isInterface()) {
return get(subinterfaces, cd);
} else if (cd.isClass()) {
return get(subclasses, cd);
} else {
return null;
}
}
COM: <s> return the sub class interface list for the class interface passed </s>
|
funcom_train/36244308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CategorySet list() throws AppException {
CategorySet objectSet = new CategorySet();
try {
categoryDA = new CategoryDA();
objectSet = categoryDA.readDataSet();
categoryDA = null;
} catch (AppException ex) {
Logger.getLogger(CategoryFcd.class.getName()).log(Level.SEVERE, null, ex);
throw ex;
}
return objectSet;
}
COM: <s> list all categories inside the system </s>
|
funcom_train/4754851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void increment(double[] v) {
if (v.length != means.length) {
throw new DimensionMismatchException(v.length, means.length);
}
for (int i = 0; i < v.length; ++i) {
means[i].increment(v[i]);
}
}
COM: <s> add a new vector to the sample </s>
|
funcom_train/25188895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetId() throws Exception {
System.out.println("getId");
JSchema instance = new JSchema();
URI uri = new URI("#");
assertNull(instance.getId());
instance.setId(uri);
assertEquals(uri, instance.getId());
instance.setId(null);
assertNull(instance.getId());
}
COM: <s> test of get id method of class jschema </s>
|
funcom_train/1028978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBug10630() throws Exception {
Connection conn2 = null;
Statement stmt2 = null;
try {
conn2 = getConnectionWithProps((Properties)null);
stmt2 = conn2.createStatement();
conn2.close();
stmt2.getWarnings();
fail("Should've caught an exception here");
} catch (SQLException sqlEx) {
assertEquals("08003", sqlEx.getSQLState());
} finally {
if (stmt2 != null) {
stmt2.close();
}
if (conn2 != null) {
conn2.close();
}
}
}
COM: <s> tests fix for bug 10630 statement </s>
|
funcom_train/22238899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void collideExit() {
// mutually exclusive with delegateOnCollide
if (this.triggeredOnCollide) {
processTriggerState(TRIGGERED_ON_COLLIDE, false, 0f);
}
assert !collisionObjects.isEmpty();
NodeProxy nProxy = null;
for (int i = 0; i < collisionObjects.size(); i++) {
nProxy = collisionObjects.get(i);
// does object want callback?
if (nProxy.isCollisionDetect()) {
nProxy.collideExitWithSubject(this);
}
}
// clean it
collisionObjects.clear();
}
COM: <s> called when this node proxy subject is no longer in collision with any </s>
|
funcom_train/48725302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void publish(File ivyFile, File ivySettingsFile, IvyPublish ivyPublish) throws IOException {
Project project = createProject();
project.setProperty("ivy.settings.file", ivySettingsFile.getAbsolutePath());
ivyPublish.setProject(project);
resolve(project, ivyFile);
ivyPublish.execute();
FileUtils.deleteDirectory(tempDistFolder);
}
COM: <s> performs a publish operation </s>
|
funcom_train/3743866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write() throws IOException {
// it might be that we do not have an ordinary file,
// so we can't write to it
if (docPath == null)
throw new IOException("Path not given");
props.store(new FileOutputStream(docPath), "");
try {
props.store(new FileOutputStream(docPath), "");
} catch (IOException ex) {
if (log.isWarnEnabled()) {
log.warn(ex.getMessage());
}
throw ex;
}
}
COM: <s> this method saves the properties file connected by properties bean </s>
|
funcom_train/16544593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Contact getContact(String addr){
if(!(contactList.isEmpty())){
Iterator<Contact> iter = contactList.iterator();
while(iter.hasNext()){
Contact nextContact = iter.next();
if (nextContact.getAdress().equals(addr)){
return nextContact;
}
}
}
new DebugMessage("ContactList.getContact : Cannot find contact " + addr + " in the contact list.");
return null;
}
COM: <s> gets an address and returns the associated contact from the list </s>
|
funcom_train/4192982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void respond()
{ printLog("start",LogLevel.LOW);
changeStatus(STATE_PROCEEDING);
//transaction_id=null; // it is not required since no SipProviderListener is implemented
// (CHANGE-040905) now timeouts started in listen()
transaction_to.start();
if (connection_id==null) retransmission_to.start();
sip_provider.sendMessage(response,connection_id);
}
COM: <s> starts the ack transaction server </s>
|
funcom_train/43317988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ITransformationResult transformBytecode(String className, byte[] bytecode, long requestorBundleId) {
if (!initialized) {
return null;
}
if (aspectRegistry.getAspects().length > 0) {
BundleWeaver bundleWeaver = getBundleWeaver(requestorBundleId);
if (bundleWeaver != null) {
return bundleWeaver.weaveClass(className, bytecode);
}
}
return null;
}
COM: <s> weave the bytecode of the given class with all aspects that are currently </s>
|
funcom_train/31930286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendRemoval(StringBuffer buffer) throws BlitzException {
if (m_outputStatus != STATUS_REMOVED) {
appendWrappedText(buffer, "REMOVED @", m_currentSourceLine);
}
m_outputStatus = STATUS_REMOVED;
appendText(buffer, m_sourceTable, m_currentSourceLine);
m_currentSourceLine++;
}
COM: <s> append information about a detected removal to the given </s>
|
funcom_train/18329106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Blob getAiJar(final AiPlayerInfo ai) throws DatabaseException {
return runQuery(SELECT_AI_JAR, new Query<Blob>() {
void setup(PreparedStatement ps) throws SQLException {
ps.setInt(1, ai.getId());
}
void update(ResultSet rs) throws SQLException {
setResult(rs.getBlob(1));
}
});
}
COM: <s> get the jar file for the given ai </s>
|
funcom_train/28127640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attemptCancel() {
int result = JOptionPane.showConfirmDialog(this,
"Are you sure you want to close this frame? Any changes will be lost...",
"Confirmation...", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (result==JOptionPane.YES_OPTION) {
application.closeCalendarFrame(this);
}
}
COM: <s> closes the frame any changes made to the calendar are lost </s>
|
funcom_train/11317185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Stanza generateSubIDNotValidErrorStanza(Entity sender, Entity receiver, IQStanza stanza) {
XMLElement invalidSubID = createXMLElement(INVALID_SUBID, NamespaceURIs.XEP0060_PUBSUB_ERRORS);
return ServerErrorResponses.getStanzaError(StanzaErrorCondition.NOT_ACCEPTABLE, stanza, StanzaErrorType.MODIFY, null,
null, invalidSubID);
}
COM: <s> create the sub id not valid error stanza </s>
|
funcom_train/23716495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand1 () {
if (okCommand1 == null) {//GEN-END:|90-getter|0|90-preInit
// write pre-init user code here
okCommand1 = new Command ("Ok", Command.OK, 0);//GEN-LINE:|90-getter|1|90-postInit
// write post-init user code here
}//GEN-BEGIN:|90-getter|2|
return okCommand1;
}
COM: <s> returns an initiliazed instance of ok command1 component </s>
|
funcom_train/51710490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRelationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_RelationImplementation_relation_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_RelationImplementation_relation_feature",
"_UI_RelationImplementation_type"),
QvtrelationPackage.Literals.RELATION_IMPLEMENTATION__RELATION,
true, false, true, null, null, null));
}
COM: <s> this adds a property descriptor for the relation feature </s>
|
funcom_train/5793793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerListener() {
Logger log =getLog();
List<String> ueiList = new ArrayList<String>();
String[] temp = config.getEventlist().getUei();
for(int i=0; i<temp.length; i++)
ueiList.add(temp[i]);
log.info("QosD Registering for " + temp.length + " types of event");
eventIpcManager.addEventListener(this, ueiList);
}
COM: <s> registers an open nms event listener with this class </s>
|
funcom_train/13596542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File showExportFileDialog() {
int returnVal = fileChooser.showDialog(ProjectUtil
.getTopFrame(fileChooser), Messages
.getString("ExportFileDialog.Title"));
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
History.getUserHistory().setLastLocationWhereFileSaved(
file.getAbsolutePath());
return file;
}
return null;
}
COM: <s> shows a file dialog </s>
|
funcom_train/46744700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLastName(String lastName) {
if (Converter.isDifferent(this.lastName, lastName)) {
String oldlastName= null;
oldlastName = this.lastName;
this.lastName = lastName;
setModified("lastName");
firePropertyChange(String.valueOf(PATIENTLOGS_LASTNAME), oldlastName, lastName);
}
}
COM: <s> persons family name surname </s>
|
funcom_train/50166398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IStep findFirst(IStep root, String s) {
Enumeration e = root.children();
while (e.hasMoreElements()) {
IStep son = (IStep)e.nextElement();
if (s.equals(son.getTreeString(false, false))) return son;
}
return null;
}
COM: <s> method find first </s>
|
funcom_train/3702354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OnOperator getOnOperator(String strName) {
Iterator it = onOperators();
OnOperator op;
while (it.hasNext()) {
op = (OnOperator) it.next();
if (strName.equals(op.getName()) == true) {
return (op);
}
}
return (null);
} // of method
COM: <s> get an on operator by name </s>
|
funcom_train/21877959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getLastTypeRevisions(String project, String maprefUri, int count) throws DepoException {
WorkbenchProjDesc desc = Workbench.getWorkbenchProjectDescription(project);
Model model = Workbench.archiveAllHistory()
? Workbench.getModelFinder(desc).getTypesArchiveModel()
: Workbench.getModelFinder(desc).getTypesModel();
return getLastRevisions(project, maprefUri, count, model, "Type");
}
COM: <s> get the most recent revisions of this type </s>
|
funcom_train/35036313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int moveUp(NZB nzb) {
int pos=-1;
// If its in the queue and its not the first one
if (queue.contains(nzb) && !queue.getFirst().equals(nzb)) {
// Find out it's current position
int currentPos = queue.indexOf(nzb);
queue.remove(nzb);
queue.add(currentPos - 1, nzb);
notifyListeners();
pos=currentPos-1;
}
return pos;
}
COM: <s> moves an nzb up the queue by 1 position </s>
|
funcom_train/36116687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double chebyshevGaussQuadrature(Polynomial poly, int n) {
// x values
ArrayList<Double> xVals = new ArrayList<Double>();
// weights
ArrayList<Double> weights = new ArrayList<Double>();
double sum = 0;
double x = 0;
double weight = Math.PI / new Double(n);
for (int i = 1; i < n + 1; i++) {
x = Math.cos(new Double(2 * i - 1) / new Double(2 * n) * Math.PI);
sum += weight * poly.evaluate(x);
}
return sum;
}
COM: <s> calculates integral of poly 1 x 2 1 2 from 1 to 1 </s>
|
funcom_train/41163223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoStrategyMomentumDes entity) {
EntityManagerHelper.log("saving CoStrategyMomentumDes instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co strategy momentum des </s>
|
funcom_train/22368684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPanels(List<AbstractPreferencesPanel> panels) {
this.panels = panels;
options.setLayout(new CardLayout());
for (int i = 0; i < panels.size(); i++) {
options.add(Integer.toString(i), panels.get(i));
panels.get(i).setDialog(this);
}
GuiUtils.applyComponentOrientation(this);
}
COM: <s> sets the panels </s>
|
funcom_train/24607622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _generateAResearchGroup(int index) {
String id;
id = _getId(CS_C_RESEARCHGROUP, index);
writer_.startSection(CS_C_RESEARCHGROUP, id);
writer_.addProperty(CS_P_SUBORGANIZATIONOF,
_getId(CS_C_DEPT, instances_[CS_C_DEPT].count - 1), true);
writer_.endSection(CS_C_RESEARCHGROUP);
}
COM: <s> generates a research group instance </s>
|
funcom_train/7674127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeCfOptions() {
cfOptions = new CfOptions();
cfOptions.positionInfo = positionInfo;
cfOptions.localInfo = localInfo;
cfOptions.strictNameCheck = strictNameCheck;
cfOptions.optimize = optimize;
cfOptions.optimizeListFile = optimizeListFile;
cfOptions.dontOptimizeListFile = dontOptimizeListFile;
cfOptions.statistics = statistics;
cfOptions.warn = DxConsole.err;
}
COM: <s> copies relevent arguments over into a cf options instance </s>
|
funcom_train/20612344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPortPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DefineByInterface_port_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DefineByInterface_port_feature", "_UI_DefineByInterface_type"),
GCLACSPackage.Literals.DEFINE_BY_INTERFACE__PORT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the port feature </s>
|
funcom_train/29064006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void aspectSelected() {
button5.setEnabled(true);
if (aspectTable.getItemCount() > 1) {
if (aspectTable.getSelectionIndex() > 0) {
button6.setEnabled(true);
} else {
button6.setEnabled(false);
}
if (aspectTable.getSelectionIndex() < aspectTable.getItemCount() - 1) {
button7.setEnabled(true);
} else {
button7.setEnabled(false);
}
}
}
COM: <s> called if the user selects an aspect from the table </s>
|
funcom_train/26280090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isVerticalGuide(Integer guideNumber) throws JGimpException {
final int VERTICAL = 1;
int thisOrientation = m_App.callProcedure("gimp_image_get_guide_orientation", this, guideNumber)[0].convertToInt();
return (thisOrientation == VERTICAL);
}
COM: <s> returns true if the guide represented by the given integer </s>
|
funcom_train/25291654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDistanceFilterLength() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_DISTANCE_FILTER_READ))
throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes12"));
return (((AuralAttributesRetained)this.retained).getDistanceFilterLength());
}
COM: <s> retrieve distance filter array length </s>
|
funcom_train/28984773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getRunSigningTest () {
if (runSigningTest == null) {//GEN-END:|228-getter|0|228-preInit
// write pre-init user code here
runSigningTest = new Command ("Run", Command.OK, 0);//GEN-LINE:|228-getter|1|228-postInit
// write post-init user code here
}//GEN-BEGIN:|228-getter|2|
return runSigningTest;
}
COM: <s> returns an initiliazed instance of run signing test component </s>
|
funcom_train/48189655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addUserName(int idx) {
if ((chatEntry.length() > 0) && (!chatEntry.getText().toString().endsWith(" ")))
chatEntry.getText().append(" ");
chatEntry.getText().append(userNames[idx]);
userNames = null; // Since the list will be recreated, we don't need this anymore.
}
COM: <s> adds a username from the user array to the textfield </s>
|
funcom_train/33375989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() {
final List rulesList = parsePattern();
mRules = (Rule[]) rulesList.toArray(new Rule[rulesList.size()]);
int len = 0;
for (int i=mRules.length; --i >= 0; ) {
len += mRules[i].estimateLength();
}
mMaxLengthEstimate = len;
}
COM: <s> p initialise the instance for first use </s>
|
funcom_train/40432715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Variable variable, Constant constant) throws TelemetryEvaluationException {
String varName = variable.getName();
if (this.map.containsKey(varName)) {
throw new TelemetryEvaluationException("Variable " + varName + " already added.");
}
this.map.put(varName, constant);
}
COM: <s> adds a variable constant pair so that later the variable can be resolved </s>
|
funcom_train/33757856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setThreadStyleAt(ThreadStyle threadStyle, int x, int y) {
if (showThreads) {
x /= getScreenScale();
y /= getScreenScale();
ThreadSegment threadSegment = diagram.getThreadAt(x, y);
if (threadSegment != null) {
threadSegment.getStyle().apply(threadStyle);
repaint();
}
}
}
COM: <s> applies the style to the thread at the specified position of the diagram </s>
|
funcom_train/12697138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int calcSlow(int value) {
int result = 0;
final int loadSimulator = Math.max(1, threads.size());
while (true) {
final int multiplier = result + 1;
if (multiplier % (10000/loadSimulator) == 0) {
// Slow down based on the number of threads... Simulate load...
try {Thread.sleep(50);} catch (InterruptedException ie) {}
}
if ((multiplier * multiplier) > value) {
break;
}
result++;
}
return result;
}
COM: <s> this is a brute force calculation designed to degrade as the number </s>
|
funcom_train/12689915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyObservers(Object theObserved, Object changeCode) {
Enumeration myObserversList = this.myObservers.elements();
while (myObserversList.hasMoreElements()) {
IObserver theObserver = (IObserver) myObserversList.nextElement();
theObserver.observableUpdate(theObserved, changeCode);
}
}
COM: <s> iterate through the list of observers and notify them </s>
|
funcom_train/27810509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createMusicFolder(MusicFolder musicFolder) {
String sql = "insert into music_folder (" + COLUMNS + ") values (null, ?, ?, ?, ?)";
update(sql, musicFolder.getPath(), musicFolder.getName(), musicFolder.isEnabled(), musicFolder.getChanged());
LOG.info("Created music folder " + musicFolder.getPath());
}
COM: <s> creates a new music folder </s>
|
funcom_train/49461211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Db connectForeignDb() throws Exception{
Db foreignDb = null;
foreignDb = new Db(new DbAuth(null, username, password, url, 0),
null, DbConnection.getExternalDatabase(username, password, driver, url), true, false);
if (schemaPrefix != null) {
foreignDb.setSchemaPrefix(schemaPrefix);
}
return foreignDb;
}
COM: <s> connect to foreign db </s>
|
funcom_train/11649001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cache(Session session, Serializable sessionId) {
if (session == null || sessionId == null) {
return;
}
Cache<Serializable, Session> cache = getActiveSessionsCacheLazy();
if (cache == null) {
return;
}
cache(session, sessionId, cache);
}
COM: <s> caches the specified session under the cache entry key of </s>
|
funcom_train/51413802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveCacheItem(File file, CMBlob cItem) throws IOException {
LOGGER.info("Storing CacheItem at <"+file.getPath()+">...");
try {
ObjectOutputStream oOut = new ObjectOutputStream(new GZIPOutputStream(new FileOutputStream(file)));
oOut.writeObject(cItem);
oOut.close();
} catch (IOException e) {
LOGGER.error("Unable to store CacheItem : " + e.getMessage());
throw e;
}
}
COM: <s> saves a cache item to the local disk </s>
|
funcom_train/13222339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseReleased(MouseEvent e) {
Object o = e.getSource();
if (o instanceof JComponent) {
invoker = (JComponent) o;
}
if (invoker == null) {
return;
}
invoker.requestFocus();
if (e.isPopupTrigger()) {
update();
show(invoker, e.getX(), e.getY());
}
}
COM: <s> invoked when a mouse button has been released on a component </s>
|
funcom_train/32057275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDragEnter() {
System.out.println("testDragEnter");
// Add your test code below by replacing the default call to fail.
BasicGraphDropTargetListener x = new BasicGraphDropTargetListener();
// this returns void so there is no assertEquals() needed
//x.dragEnter(e);
}
COM: <s> test of drag enter method of class basic graph drop target listener </s>
|
funcom_train/9572050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void merge(Coherence co) {
pixelCount += co.getCount();
Vector temp = co.getXYAreaVector();
for(int i=0 ; i<temp.size() ; i++){
xyArea.add((Integer)temp.elementAt(i));
}
for(int i=0 ; i<4 ; i++)
edge[i] = edge[i] || co.getEdge(i);
extend = true;
}
COM: <s> merge another coherence into this by summing pixel count </s>
|
funcom_train/7342924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TypeHandler getTypeHandler(Class type, String jdbcType) {
Map jdbcHandlerMap = (Map) typeHandlerMap.get(type);
TypeHandler handler = null;
if (jdbcHandlerMap != null) {
handler = (TypeHandler) jdbcHandlerMap.get(jdbcType);
if (handler == null) {
handler = (TypeHandler) jdbcHandlerMap.get(null);
}
}
return handler;
}
COM: <s> get a type handler for a class and a jdbc type </s>
|
funcom_train/10196405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection selectChildren(Collection list, Transaction transaction, QueryContext queryContext) throws OdalPersistencyException {
for (Iterator it = list.iterator(); it.hasNext();) {
PersistentObject parent = (PersistentObject) it.next();
selectChildren(transaction, parent, queryContext);
}
return list;
}
COM: <s> returns collection with populated childten </s>
|
funcom_train/46384628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getChecksumFile(String rootName, String assetPath) {
// Form the File from the module name and module part beneath the
// "modules" subdirectory.
ChecksumManager checksumManager = ChecksumManager.getChecksumManager();
String checksumFile = "content" + File.separator + rootName +
File.separator + assetPath + File.separator + "checksum.xml";
return new File(checksumManager.getChecksumDir(), checksumFile);
}
COM: <s> returns the checksum file for the given content root name and asset path </s>
|
funcom_train/40346970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setAuthorities(Collection<GrantedAuthority> authorities) {
if (authorities == null) {
throw new IllegalArgumentException("Cannot pass a null GrantedAuthority array");
}
for (GrantedAuthority auth : authorities) {
if (auth == null) {
throw new IllegalArgumentException("Granted authorities contains null element - GrantedAuthority[] cannot contain any null elements");
}
}
this.authorities = authorities;
}
COM: <s> standard set method for setting an array of granted authorities permissions for </s>
|
funcom_train/27906457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsKey(String s) {
if (s == null) {
throw new IllegalArgumentException("Key can't be null");
}
HeaderEntry he;
Iterator iter = iterator();
while (iter.hasNext()) {
he = (HeaderEntry) iter.next();
if (s.equalsIgnoreCase(he.getKey())) {
return (true);
}
}
return (false);
}
COM: <s> checks whether any header entry exists with given key </s>
|
funcom_train/47854856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void populateListRecent() {
list.setRedraw(false);
try {
list.removeAll();
LinkedList<String> previousXps = (LinkedList<String>) mainWindow.generatorParameters.environmentParameters
.getValue(mainWindow.generatorParameters.environmentParameters.enviParamRecentExperiments);
int i = 0;
for (String current : previousXps) {
list.add(getFiltered(current));
i++;
}
for (; i < 10; i++)
list
.add(" "); //$NON-NLS-1$
} finally {
list.setRedraw(true);
}
}
COM: <s> updates the list of recent parameters based on environmental parameters </s>
|
funcom_train/21633433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateError(final double[] actual, final double[] ideal) {
for (int i = 0; i < actual.length; i++) {
double delta = ideal[i] - actual[i];
if (ErrorCalculation.mode == ErrorCalculationMode.ARCTAN) {
delta = Math.atan(delta);
}
this.globalError += delta * delta;
}
this.setSize += ideal.length;
}
COM: <s> called to update for each number that should be checked </s>
|
funcom_train/34851560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInitTokenPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Place_initToken_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Place_initToken_feature", "_UI_Place_type"),
PetriPackage.Literals.PLACE__INIT_TOKEN,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the init token feature </s>
|
funcom_train/7645161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultUseCaches(boolean newValue) {
// BEGIN android-removed
// Setting the default doesn't concern the current connection.
// if (connected) {
// throw new IllegalAccessError(Msg.getString("K0037")); //$NON-NLS-1$
// }
// END android-removed
defaultUseCaches = newValue;
}
COM: <s> sets the default value for the flag indicating whether this connection </s>
|
funcom_train/12182431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createLocalizedPolicyNameKey(String policyName) {
if (policyName == null || policyName.trim().length() == 0) {
throw new IllegalArgumentException(
"policyName cannot be null or empty");
}
return createPropertyKey(policyName, NAME_PROPERTY_SUFFIX);
}
COM: <s> creates the lookup key for the named policy that allows the policies </s>
|
funcom_train/50849656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int calcDirection(int iDX, int iDY) {
if (-1 == iDY) {
return (360 + iDX * 45) % 360;
}
else if (0 == iDY) {
return (360 + iDX * 90) % 360;
}
else if (1 == iDY) {
return 180 - iDX * 45;
}
return -1;
}
COM: <s> computes the direction angle in which i am standing 0 359 </s>
|
funcom_train/44665210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteInitiativeComment(Comment comment){;
Object[] params = new Object[1];
params[0] = new Integer(comment.getCommentId());
logger.debug("Delete initiative comment commentId[" + comment.getCommentId() + "]");
MySQLDataAccess.execSQL(DELETE_REVIEW_COMMENT,params);
}
COM: <s> delete an initiative comment </s>
|
funcom_train/34341928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getComandoPedido() {
if (comandoPedido == null) {//GEN-END:|29-getter|0|29-preInit
// write pre-init user code here
comandoPedido = new Command("Pedido", Command.OK, 0);//GEN-LINE:|29-getter|1|29-postInit
// write post-init user code here
}//GEN-BEGIN:|29-getter|2|
return comandoPedido;
}
COM: <s> returns an initiliazed instance of comando pedido component </s>
|
funcom_train/29882363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPclUnitsHeight(int pHeight) {
mCurrentHeightForRectangleDraws =
(int) Math.ceil(pHeight * mPclRenderImage.getCurrentZoomFactor());
if (mCurrentHeightForRectangleDraws < 1) { mCurrentHeightForRectangleDraws = 1; }
// PriDebug.infoln(PriDebug.spacesForPclParseMsgs + "PriRectDrawing set next rectangle draw height to " + pHeight);
}
COM: <s> set pcl units height </s>
|
funcom_train/45405973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SubstanceLookAndFeel getUserLookAndFeel() {
try {
// create new instance with default constructor without parameter
return (SubstanceLookAndFeel) this.userLookAndFeel.newInstance();
}
catch (final IllegalAccessException e) {
LogManager.logWarning(this.getClass().getSimpleName(),e);
}
catch (final InstantiationException e) {
LogManager.logWarning(this.getClass().getSimpleName(),e);
}
return null;
}
COM: <s> get user look and feel </s>
|
funcom_train/543309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearAttributeModel() {
if (attributeModel != null) {
if (this.attributeModel instanceof INumberScalar) {
((INumberScalar) attributeModel).removeNumberScalarListener(this);
}
if (this.attributeModel instanceof IBooleanScalar) {
((IBooleanScalar) attributeModel).removeBooleanScalarListener(this);
}
attributeModel = null;
}
}
COM: <s> clears all device property model and listener attached to the components </s>
|
funcom_train/20533816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValid(LoginForm loginForm, HttpServletRequest request) {
if (!StringUtils.hasText(loginForm.getCommunity())) {
addGlobalError(request, "login.error.empty.community");
return false;
} else if (!StringUtils.hasText(loginForm.getEmail())) {
addGlobalError(request, "login.error.empty.email");
return false;
} else if (!StringUtils.hasText(loginForm.getPassword())) {
addGlobalError(request, "login.error.empty.password");
return false;
}
return true;
}
COM: <s> performs a simple validation all the fields must be filled </s>
|
funcom_train/41332833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Shape createScrollButtonApart(int x, int y, int w, int h) {
path.reset();
path.moveTo(x, y);
path.lineTo(x, y + h);
path.lineTo(x + w, y + h);
addScrollGapPath(x, y, w, h, true);
path.closePath();
return path;
}
COM: <s> return a path for a scroll bar button </s>
|
funcom_train/9494482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkMultiplicationCompatible(final FieldMatrix<T> m) {
if (getColumnDimension() != m.getRowDimension()) {
throw MathRuntimeException.createIllegalArgumentException(
"{0}x{1} and {2}x{3} matrices are not multiplication compatible",
getRowDimension(), getColumnDimension(),
m.getRowDimension(), m.getColumnDimension());
}
}
COM: <s> check if a matrix is multiplication compatible with the instance </s>
|
funcom_train/18876294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Speed getTargetSpeed(Wind tw, Sea sea) {
lastWindUsed = tw;
lastTargetSpeed = new Speed(getValue(tw.speed.value, tw.angle.asInt()));
if (lastTargetSpeed != null){
actualVMG = new Speed(lastTargetSpeed.getValue() * Math.cos(tw.getAngle().toRadian()));
lastTargetSpeed.setValid(tw.isValid());
actualVMG.setValid(tw.isValid());
}
return lastTargetSpeed;
}
COM: <s> retrives the target speed for a given true wind </s>
|
funcom_train/42639035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getMaxElement(Vector row, int beginning, int end) {
Number max = row.get(beginning);
int index = beginning; //Index max element in row.
//Searching max row element.
for (int i = beginning + 1; i < end; i++) {
Number next = row.get(i);
if (next.modulusValue() > max.modulusValue()) {
max = next;
index = i;
}
}
return index;
}
COM: <s> getting index of max element in noted row </s>
|
funcom_train/28999267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void adjustForwardParmsMap(Map m) {
m.remove("text");
m.remove("use-name-as-heading");
m.remove("new-category");
m.remove("existing-category");
m.remove("new-category");
m.remove("name");
}
COM: <s> override the parent classes method so that we can remove parameters </s>
|
funcom_train/36462297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(AbstractVertex vertex) {
long hash;
String valString = sketchString(vertex);
for (int x = 0; x < k; x++) {
hash = createHash(valString + Integer.toString(x));
hash = hash % (long)bitSetSize;
if (!bitset.get(Math.abs((int)hash)))
return false;
}
return true;
}
COM: <s> returns true if the element could have been inserted into the bloom filter </s>
|
funcom_train/17046141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deletePopulatedFiles() {
if (_populatedImageFile && _imageFileHandle != null) {
_imageFileHandle.delete();
_populatedImageFile = false;
}
if (_populatedDotFile && _dotFileHandle != null) {
_dotFileHandle.delete();
_populatedDotFile = false;
}
}
COM: <s> delete this wrappers populated files </s>
|
funcom_train/1153951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(java.awt.Graphics g) {
super.paint(g);
MapAgentModel maModel = (MapAgentModel) model;
if (maModel != null && !maModel.isEmpty()) {
java.awt.Graphics2D g2 = (java.awt.Graphics2D) g;
adjustTransformation();
paintMap(g2);
paintTour(g2);
for (String loc : maModel.getLocations())
paintLoc(g2, loc);
}
}
COM: <s> clears the panel and draws the map and the tour history </s>
|
funcom_train/38788287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Statement getStatement() {
if(connection == null){
// create a connection
if(!connect()) return null;
}
Statement statement = null;
try {
statement = connection.createStatement();
statement.execute("USE " + connectionModel.getSchema() + ";");
} catch (SQLException ex) {
ex.printStackTrace();
statement = null;
}finally{
return statement;
}
}
COM: <s> returns statement for a particular schema for any problem return code null code </s>
|
funcom_train/31804275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createSlave(Vector destinations, Object obj) {
try {
Slave.create(null, SlaveClassName, getAgletContext(), this,
destinations, new String());
} catch (IOException ae) {
inError(ae.getMessage());
} catch (AgletException ae) {
inError(ae.getMessage());
}
}
COM: <s> creates and sets up the slave with necessary information for it to </s>
|
funcom_train/36003183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLsfilealGenerate() throws Exception {
/* Build the model */
CixsJbossEsbService cixsJbossEsbService = Samples.getLsfilealService();
initCixsJbossEsbService(cixsJbossEsbService);
mAntModel.setSampleConfigurationTransport(JBossESBTransport.JBM);
mAntModel.getJbmTransportParameters().initialize(cixsJbossEsbService.getName());
processAnt();
}
COM: <s> adapter case for an lsfileal </s>
|
funcom_train/16176582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXML() {
StringBuffer b = new StringBuffer("<ChartModel type=\"SequenceChart\" ");
b.append(super.getXML());
b.append("\n");
b.append("</ChartModel>");
return b.toString();
}
COM: <s> returns an xml representation of this sequence chart model </s>
|
funcom_train/28666290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createGroupMain() {
groupMain = new Group(this, SWT.NONE);
groupMain.setLayout(new GridLayout());
groupMain.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
createCanvasMain();
groupMain.setText(Messages.getString("ECDHView.groupMain")); //$NON-NLS-1$
}
COM: <s> this method initializes group main </s>
|
funcom_train/37070910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String addEntry(Map values) throws SQLException {
String link_id = lookup( (String)(values.get("pub_allele_id")),
(String)(values.get("pub_germplasm_id")) );
if ( StringUtils.isEmpty( link_id )){
String new_id = super.addEntry(values);
this.touch(new_id, "date_entered");
this.touch(new_id, "date_updated");
return new_id;
}
return "";
}
COM: <s> add entry to linking table will check if this link exists </s>
|
funcom_train/5862221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void carryOver() {
ExecutionsCtrl.setCurrent(_exec);
final ExecutionCtrl execCtrl = (ExecutionCtrl)_exec;
execCtrl.onActivate();
if (Locales.getThreadLocal() == null)
Locales.setThreadLocal(_locale);
else
_locale = null;
if (TimeZones.getThreadLocal() == null)
TimeZones.setThreadLocal(_timeZone);
else
_timeZone = null;
final Collection pages = _exec.getDesktop().getPages();
if (!pages.isEmpty())
execCtrl.setCurrentPage((Page)pages.iterator().next());
}
COM: <s> carry over the info stored in the constructor to </s>
|
funcom_train/40793443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand() {
if (backCommand == null) {//GEN-END:|126-getter|0|126-preInit
// write pre-init user code here
backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|126-getter|1|126-postInit
// write post-init user code here
}//GEN-BEGIN:|126-getter|2|
return backCommand;
}
COM: <s> returns an initiliazed instance of back command component </s>
|
funcom_train/19066045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rcpt(Address address) throws IOException, SMTPException {
try {
sendCommand("RCPT", new String[] { "TO:"
+ address.getCanonicalMailAddress() });
SMTPResponse response = readSingleLineResponse();
if (response.isERR())
throw new SMTPException(response);
} catch (SocketException e) {
// Catch the exception if it was caused by
// dropping the connection
if (state != NOT_CONNECTED)
throw e;
}
}
COM: <s> sends a rcpt to command which specifies a recipient of the mail started </s>
|
funcom_train/12333598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendJobStarted(String jobID, String url) {
try {
System.err.println("SENDING JOB STARTED!!!");
JMSSender qsender = msgService.getJMSSender(statusUpdateChannel);
SubmissionStartedMsg msg =
new SubmissionStartedMsg(qsender, jobID, url, 0);
msg.send();
} catch (JMSException e) {
e.printStackTrace();
}
} //- sendJobStarted
COM: <s> sends a jms message over the status update channel indicating that </s>
|
funcom_train/50584990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addRefEntry(Object ref, InstructionHandle start, InstructionHandle end, Set lines) {
tempRefEntries.add(new TempRefEntry(refIndex, ref, start, end, lines));
// postIncrement, folks... The value returned is the value
// before it is incremented
return refIndex++;
}
COM: <s> this adds a block to the entries which arent directly probed </s>
|
funcom_train/44183752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testZeroContent() throws Exception {
CrawlURI uri = defaultURI();
Recorder recorder = createRecorder("");
uri.setContentType("text/plain");
uri.setRecorder(recorder);
extractor.process(uri);
assertEquals(0, uri.getOutLinks().size());
assertNoSideEffects(uri);
}
COM: <s> tests that a uri with a zero content length has no links extracted </s>
|
funcom_train/863442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeField( String text, int fieldWidth, boolean rightAlign ) {
int size = text.length();
int spaces = fieldWidth - size;
if( spaces <= 0 ) {
write( text );
return;
}
if( ! rightAlign ) write( text );
while( spaces-- > 0 ) write( " " );
if( rightAlign ) write( text );
}
COM: <s> write text within a fixed width field </s>
|
funcom_train/33371552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutputLayer(NeuralNetworkLayer layer) throws NetworkStructureException {
if(input == null) throw new NetworkStructureException("The input layer has not been set.");
// Connect the new layer to the previous one.
NeuralNetworkLayer previous = input;
if(hiddenLayers.size() > 0) previous = (NeuralNetworkLayer)hiddenLayers.get(hiddenLayers.size()-1);
connect(previous, layer);
this.output = layer;
registerLayer(layer);
}
COM: <s> sets the layer used as the output layer of the network </s>
|
funcom_train/7277051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void persistCache() {
ObjectOutputStream oos = null;
try {
oos = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(CACHE_FILE)));
oos.writeObject(responses);
oos.flush();
} catch (IOException e) {
ErrorService.error(e);
} finally {
IOUtils.close(oos);
}
}
COM: <s> write cache so that we only have to calculate them once </s>
|
funcom_train/48506393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getLobbyScrollbarPanel() {
if (lobbyScrollbarPanel == null) {
lobbyScrollbarPanel = new JScrollPane();
lobbyScrollbarPanel.setPreferredSize(new Dimension(400, 226));
lobbyScrollbarPanel.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
lobbyScrollbarPanel.setViewportView(getLobbyOutput());
lobbyScrollbarPanel.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
}
return lobbyScrollbarPanel;
}
COM: <s> this method initializes lobby scrollbar panel </s>
|
funcom_train/8022212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCompareTo() {
System.out.println("CompareTo");
Category category = null;
Category instance = null;
boolean expResult = true;
boolean result = instance.CompareTo(category);
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 compare to method of class vgrabber </s>
|
funcom_train/4237368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCalcularTabs() {
System.out.println("calcularTabs");
String platillo = "ABCDEFGH";
ImplJefeDePiso instance = new ImplJefeDePiso();
String expResult = "\t\t\t\t\t\t";
String result = instance.calcularTabs(platillo);
assertEquals(expResult, result);
}
COM: <s> test of calcular tabs method of class restaurante </s>
|
funcom_train/23501594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addValueHandlerType(URI type, ASPValueHandler typeHandler) {
// First check if we have an entry for this type, if not, create one
List<ASPValueHandler> list = handlerMap.get(type);
if(list == null) {
list = new LinkedList<ASPValueHandler>();
handlerMap.put(type, list);
}
list.add(typeHandler);
}
COM: <s> registers a handler against an individual type </s>
|
funcom_train/24059357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int estimateCacheSize() {
int result = 0;
for(String key : _cache.keySet()) {
BufferedImage cachedPage = _cache.get(key);
int bpp = DataBuffer.getDataTypeSize(cachedPage.getRaster().getDataBuffer().getDataType());
result += (cachedPage.getWidth() * cachedPage.getHeight()) * bpp / 8;
}
return result;
}
COM: <s> estimates the size of all cached pages in bytes </s>
|
funcom_train/21954380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSeen() {
// if we're on the appropriate thread, go ahead and check the flags.
if (Thread.currentThread() == getMessageInfo().getFolderInfo().getFolderThread() || Thread.currentThread() instanceof net.suberic.pooka.thread.LoadMessageThread) {
mSeen = getMessageInfo().isSeen();
}
return mSeen;
}
COM: <s> a shortcut for getting the read unread status of this message </s>
|
funcom_train/14228994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CallId createCall(CallId id, String address, String term, String dest) throws MethodNotSupportedException, RawStateException, ResourceUnavailableException, InvalidPartyException, InvalidArgumentException, PrivilegeViolationException {
return this.core.createCall(id, address, term, dest);
}
COM: <s> create call method comment </s>
|
funcom_train/21994507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void warn (String msg,RootException ex) {
if (OpenAdminRuntimeManager.getInstance().getLoggingManager() != null) {
try {
OpenAdminRuntimeManager.getInstance().getLoggingManager().warn(msg, ex);
}
catch (Exception e){
System.err.println("Error in logging - errMsg="+e.getMessage());
}
}
}
COM: <s> log a message object with the i warn i level </s>
|
funcom_train/25069921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAllAnnotationFeatures() {
String features = " ";
if (this.annotation != null) {
Set<String> keys = this.annotation.mFeatures.keySet();
for( Iterator<String> it2 = keys.iterator(); it2.hasNext(); ) {
String currentKey = it2.next();
features +=( currentKey + ": " + this.annotation.mFeatures.get( currentKey ) + "\n" + " ");
}
}
return features;
}
COM: <s> gets all the annotation features with both empty and non empty values </s>
|
funcom_train/35847457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Icon getIcon(File f) {
AbstractFilePersister persister = PersistenceManager.getInstance()
.getPersisterFromFileName(f.getName());
if (persister != null && persister.hasAnIcon()) {
return ResourceLoaderWrapper.lookupIconResource("UmlNotation");
} else {
return null;
}
}
COM: <s> load an icon for a supported project file </s>
|
funcom_train/24554164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearError(Object key) {
if (keyedErrors != null) {
Object v = keyedErrors.remove(key);
if (v instanceof ErrorType) {
fireClearedError((ErrorType) v);
fireErrorStatusChanged();
} else if (v instanceof List) {
List errors = (List) v;
for (int i = 0; i < errors.size(); i++) {
fireClearedError((ErrorType) errors.get(i));
}
fireErrorStatusChanged();
}
}
}
COM: <s> clear a particular key </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.