__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/50911145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntSet intersectionWith(IntSet is) {
IntSet ix = new IntSet();
for (int i = 0; i < is.nelem; i++) {
int ii = is.elementAt(i);
if (this.contains(ii)) {
ix.addElement(ii);
}
}
return ix;
}
COM: <s> intersect two sets that is elements common to both </s>
|
funcom_train/19536153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInitiative(int anInitiative) {
int initiative = getInitiative();
if (initiative == anInitiative) return;
getCustomProperties().put(INITIATIVE_PROP_NAME, BigDecimal.valueOf(anInitiative));
pcs.firePropertyChange(INITIATIVE_PROP_NAME, new Double(initiative), new Double(anInitiative));
}
COM: <s> set the value of initiative for this abstract init item </s>
|
funcom_train/1504559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSegmentsFor(Obstacle source, Obstacle target) {
if (source.intersects(target))
addAllSegmentsBetween(source, target);
else if (target.bottom() - 1 < source.y)
addSegmentsTargetAboveSource(source, target);
else if (source.bottom() - 1 < target.y)
addSegmentsTargetAboveSource(target, source);
else if (target.right() - 1 < source.x)
addSegmentsTargetBesideSource(source, target);
else
addSegmentsTargetBesideSource(target, source);
}
COM: <s> adds the segments between the given obstacles </s>
|
funcom_train/46327724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean delete(Long dataFilterID) {
if (dataFilterID == null) {
throw new IllegalArgumentException("primary key null.");
}
// Set the whereArgs to null here.
return database.delete(DATABASE_TABLE, KEY_DATAFILTERID + "=" + dataFilterID, null) > 0;
}
COM: <s> delete a data filter record </s>
|
funcom_train/8157608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueAt(Object aValue, int aRowIndex, int aColumnIndex) {
Precondition.argumentEquals("aRowIndex", VALUE_COLUMN, aColumnIndex);
String key = key(aRowIndex);
preferences.put(key, aValue.toString());
}
COM: <s> changes the value of a preference </s>
|
funcom_train/28546776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initCounters() {
counters.clear();
for (RbtPartType type : RbtPartType.values()) {
Class<? extends IParsedPart> iPartInterface = type.getInterface();
List<? extends IParsedPart> list = new ArrayList<IParsedPart>();
counters.put(iPartInterface, list);
}
}
COM: <s> adds an entry in the </s>
|
funcom_train/3528655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean prevalidate(String component, BitSet disallowed) {
// prevalidate the given component by disallowed characters
if (component == null) {
return false; // undefined
}
char[] target = component.toCharArray();
for (int i = 0; i < target.length; i++) {
if (disallowed.get(target[i])) {
return false;
}
}
return true;
}
COM: <s> pre validate the unescaped uri string within a specific component </s>
|
funcom_train/231158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String addWF(String userid){
try{
File file = new File("/tmp/client.test");
file.createNewFile();
BufferedWriter bw = new BufferedWriter( new FileWriter( file ) );
bw.write( userid );
bw.close();
}catch(Exception e){
}
Integer cn = _userwf.get(userid);
int count;
if( cn == null ){
_userwf.put(userid, 1);
count = 1;
}else{
count = cn+1;
_userwf.put(userid, count);
}
String wfid = userid+"_"+count;
addPair(userid, wfid);
serialize2file();
return wfid;
}
COM: <s> this function first generates a unique workflow id for the user </s>
|
funcom_train/42463835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readFlags() {
int accessFlags = classReader.readShort();
this._public = ((accessFlags & ACC_PUBLIC) != 0);
this._final = ((accessFlags & ACC_FINAL) != 0);
this._super = ((accessFlags & ACC_SUPER) != 0);
this._interface = ((accessFlags & ACC_INTERFACE) != 0);
this._abstract = ((accessFlags & ACC_ABSTRACT) != 0);
}
COM: <s> reads and assigns the flags for this class </s>
|
funcom_train/3466963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasStereotype(java.lang.String name) {
// @BEGINPROTECT _3F28DFA202A0
for (Stereotype stereotype : this.getStereotypes()) {
if (stereotype.getName() != null && stereotype.getName().equalsIgnoreCase(name)) {
return true;
}
}
return false;
// @ENDPROTECT
}
COM: <s> returns true if this model element as a stereotype </s>
|
funcom_train/13712626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void devideVorlage(List<TemplateTag> tags) throws MissingTagException{
TreeSet<TemplateTag> sortedTags = new TreeSet<TemplateTag>();
for (TemplateTag tag:tags){
int position = template.indexOf(tag.name);
if(position > -1){
tag.setPositions(position);
tag.found = true;
sortedTags.add(tag);
}else{
if(tag.required){
throw new MissingTagException(tag,templateFile);
}
}
}
devidePointer = 0;
for (TemplateTag tag:sortedTags){
templateParts.add(getHtmPart(tag));
tag.templatePosition = templateParts.size();
templateParts.add("");
}
templateParts.add(template.substring(devidePointer, template.length()));
}
COM: <s> this method devides the template at the given devide words to insert the </s>
|
funcom_train/22051146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean rollTaxes(int iPriority) {
if (iPriority == 0) {
if (!isUnitPaid()) {
// Fill in the log (previous turn)
informUnitDisbanded("lack of pay!", true, true);
// And delete it...
markDeleted();
}
return true;
}
return false;
}
COM: <s> roll taxes disbands troops that werent paid last turn </s>
|
funcom_train/1543351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void holdArgument(String aVariable) {
int i;
int nrc = iParameters.size();
for (i = 0; i < nrc; i++) {
if (((ParameterName) iParameters.get(i)).iName.equals(aVariable)) {
((ParameterName) iParameters.get(i)).iHold = true;
}
}
}
COM: <s> put an argument on hold </s>
|
funcom_train/23875314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConfigurationTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BpxlType_configurationType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BpxlType_configurationType_feature", "_UI_BpxlType_type"),
MetadataPackage.Literals.BPXL_TYPE__CONFIGURATION_TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the configuration type feature </s>
|
funcom_train/14419527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show() {
syncExec(new VoidResult() {
public void run() {
try {
view.getPage().activate(view.getPart(true));
view.getPage().showView(view.getId());
} catch (PartInitException e) {
throw new RuntimeException("Could not show view - " + view.getPartName(), e);
}
}
});
}
COM: <s> shows the part if it is visible </s>
|
funcom_train/23267818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNroOperacion() {
System.out.println("setNroOperacion");
int nroOperacion = 0;
Movimientos instance = new Movimientos();
instance.setNroOperacion(nroOperacion);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set nro operacion method of class capa negocios </s>
|
funcom_train/41599519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean testExistence(String input, String pattern) {
input = "sanjay sharma is da besto dude";
pattern = "best";
pattern = Pattern.quote(pattern);
Pattern p = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE);
Matcher matcher = p.matcher(input);
return matcher.find();
}
COM: <s> test the existence of the code pattern code in the given </s>
|
funcom_train/3122078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSibling(GraphPathTree ptree) {
//// 1. The GraphPathTree will probably never be large enough such that
//// recursion will cost a lot
if (this.sibling() == null) {
this.setSibling(ptree);
}
else {
this.sibling().addSibling(ptree);
}
} // of method
COM: <s> add a sibling to this tree </s>
|
funcom_train/15907380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceFormal(int rank, UmlFormalParameter formal) throws RuntimeException {
UmlCom.send_cmd(identifier_(), OnInstanceCmd.replaceFormalCmd, rank, formal._name,
formal._type, formal._default_value, formal._extends);
UmlCom.check();
}
COM: <s> replace the formal at the given rank 0 </s>
|
funcom_train/28750725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPostmethod(String newVal) {
if ((newVal != null && this.postmethod != null && (newVal.compareTo(this.postmethod) == 0)) ||
(newVal == null && this.postmethod == null && postmethod_is_initialized)) {
return;
}
this.postmethod = newVal;
postmethod_is_modified = true;
postmethod_is_initialized = true;
}
COM: <s> setter method for postmethod </s>
|
funcom_train/35656749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuOpen() {
if (jMenuOpen == null) {
jMenuOpen = new JMenuItem();
jMenuOpen.setText("Abrir");
jMenuOpen.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
//DesktopPane.add(null);
}
});
}
return jMenuOpen;
}
COM: <s> this method initializes j menu item </s>
|
funcom_train/44508085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PrincipalCollection onRememberedPrincipalFailure(Exception e) {
if(log.isWarnEnabled() ) {
log.warn("There was a failure while trying to retrieve remembered principals. This could be due to a " +
"configuration problem or corrupted principals. This could also be due to a recently " +
"changed encryption key. The remembered identity will be forgotten and not used for this " +
"request.", e);
}
forgetIdentity();
return null;
}
COM: <s> called when an exception is thrown while trying to retrieve principals </s>
|
funcom_train/41266386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Linea entity) {
EntityManagerHelper.log("deleting Linea instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Linea.class,
entity.getLincodigo());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent linea entity </s>
|
funcom_train/25754620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InDesignComponent clone(InDesignComponent sourceComp) throws Exception {
if (sourceComp instanceof InDesignObject) {
return clone((InDesignObject)sourceComp);
}
logger.debug("Cloning component " + sourceComp.getClass().getSimpleName());
InDesignComponent clone = sourceComp.getClass().newInstance();
clone.setDocument(this);
clone.loadComponent(sourceComp);
return clone;
}
COM: <s> unconditionally clone an in design object </s>
|
funcom_train/37077395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTranscript(Transcript transcript) {
if (transcript != null && transcript != this.transcript) {
this.transcript = transcript;
this.strand = Strand.valueOf(transcript.getStrand());
updateState();
this.repaint();
}
/* The exons should already be sorted */
//this.tier = tier;
}
COM: <s> sets the new transcript as the main feature in the overview </s>
|
funcom_train/50140058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void removeInstance(Object o){
// log.fatal("Called very inefficient insufficiently defined method removeInstance: Removing instance: " + o + "...");
// Collection values = instances.values();
// Iterator iter = values.iterator();
// while (iter.hasNext()) {
// Object item = iter.next();
// if (item.equals(o)){
// iter.remove();
// log.fatal("Object removed by method removeInstance: " + o + "...");
// }
// }
// }
COM: <s> remove the given instance from the cache </s>
|
funcom_train/12179184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testContentsKeywordSimple() throws IOException, SAXException {
final String input = "<link>content</link>";
final String contentStyle = "'label ' 'label ' contents";
final String expected = "<link>label label content</link>";
checkInsert(input, contentStyle, expected);
}
COM: <s> test that the processing of the contents keyword works as assumed </s>
|
funcom_train/19321979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
try {
TabularDataSupport c = (TabularDataSupport) super.clone();
c.dataMap = (HashMap) ((HashMap) c.dataMap).clone();
return c;
} catch (CloneNotSupportedException e) {
throw new InternalError(e.toString());
}
}
COM: <s> returns a clone of this code tabular data support code instance the </s>
|
funcom_train/40560397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSQLSingle() {
DbFilterGroup group = new DbFilterGroup("OR");
// add the filter to the group.
group.add(new DbFilter(Util.createSource("table", "field"), "value",
"<>"));
// note that since we have only one element, we don't use the provided
// operator.
String expectedResult = "(table.field <> ?)";
assertEquals(expectedResult, group.getSQL());
}
COM: <s> insure that getting the sql of a group with one entry returns the </s>
|
funcom_train/21656281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTfProRecomendada() {
if (tfProRecomendada == null) {
tfProRecomendada = new JTextField();
tfProRecomendada.setBounds(new Rectangle(202, 416, 200, 25));
ValidadorNumero v = new ValidadorNumero(lbErrorProRecomendada,false);
tfProRecomendada.setInputVerifier(v);
tfProRecomendada.setText("");
}
return tfProRecomendada;
}
COM: <s> this method initializes tf pro recomendada </s>
|
funcom_train/28371899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RenderingResponse nextStage(String _guid, HashMap _response) throws NoSuchProcessorException, RenderingException, SpecificationViolationException, InvalidUserResponseException, ProcessingException{
InteractionProcessor ip = processors.get(_guid);
if(ip == null) throw new NoSuchProcessorException("No processor for GUID: " + _guid);
return ip.nextStage(_response);
}
COM: <s> calls the next stage method of the appropriate processor </s>
|
funcom_train/11348908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureValidity() {
// Two cases
// Field or type
if (m_field == null && m_type == null) {
throw new IllegalStateException("A service property must have either a field or a type");
}
if (m_immutable && m_value == null) {
throw new IllegalStateException("A immutable service property must have a value");
}
}
COM: <s> checks the configuration validity </s>
|
funcom_train/28405199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTkRestartEvent(TkStartEvent startEvent) {
EventListener[] listeners = list.getListeners(CommandTaskLI.class);
// Process the listeners last to first, notifying
if (listeners != null) {
for (int i = listeners.length - 1; i >= 0; i--) {
((CommandTaskLI) listeners[i]).taskRestarted(startEvent);
}
}
}
COM: <s> fire a a task restart event </s>
|
funcom_train/22024396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEuler(float ax, float ay, float az){
float sx = (float) Math.sin(ax/2);
float cx = (float) Math.cos(ax/2);
float sy = (float) Math.sin(ay/2);
float cy = (float) Math.cos(ay/2);
float sz = (float) Math.sin(az/2);
float cz = (float) Math.cos(az/2);
m[0] = cx*cy*cz + sx*sy*sz;
m[1] = sx*cy*cz - cx*sy*sz;
m[2] = cx*sy*cz + sx*cy*sz;
m[3] = cx*cy*sz - sx*sy*cz;
}
COM: <s> does not appear to work in practice based on </s>
|
funcom_train/22397450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeLogout() throws IOException, MailException {
if (EventLogger.getMinimumLevel() >= EventLogger.DEBUG_INFO) {
EventLogger.logEvent(AppInfo.GUID,
("ImapProtocol.executeLogout()").getBytes(),
EventLogger.DEBUG_INFO);
}
this.selectedMailbox = "";
execute(LOGOUT, null, null);
}
COM: <s> execute the logout command </s>
|
funcom_train/20031808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector3D calcPos(MTRectangle rect, MTPolygon ta, float xo, float yo) {
return new Vector3D((ta.getWidthXY(TransformSpace.LOCAL) / 2)
+ rect.getVerticesLocal()[0].getX() + xo,
(ta.getHeightXY(TransformSpace.LOCAL) / 2)
+ rect.getVerticesLocal()[0].getY() + yo);
}
COM: <s> calculate the coordinates needed for placing the rectangle </s>
|
funcom_train/7676869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copyParams(HttpParams target) {
if (this.parameters == null)
return;
Iterator iter = parameters.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry me = (Map.Entry) iter.next();
if (me.getKey() instanceof String)
target.setParameter((String)me.getKey(), me.getValue());
}
}
COM: <s> copies the locally defined parameters to the argument parameters </s>
|
funcom_train/36999808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int id) {
int index = (id & 0x7FFFFFFF) % globalRef.length;
for (Entry e=globalRef[index], prev=null; e!=null; prev=e, e=e.next) {
if (e.id == id) {
if (prev!=null) prev.next=e.next; else globalRef[index]=e.next;
--count;
}
}
}
COM: <s> remove an element from the table </s>
|
funcom_train/46458887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Level getLogLevel() {
if(isRoot()) {
return logLevel;
}
LaunchNode parent = (LaunchNode) getParent();
if(parent.isShowLog()) {
Level parentLevel = parent.getLogLevel();
if(parentLevel.intValue()<logLevel.intValue()) {
return parentLevel;
}
}
return logLevel;
}
COM: <s> gets the log level </s>
|
funcom_train/30194056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String ask4LineString(String output) {
StringBuffer input = new StringBuffer();
while (true) {
try {
int read = System.in.read();
if (read == '\r') {
//do leave out
} else if (read == '\n') {
//now we have a end line
break;
} else {
input.append((char) read);
}
} catch (IOException e) {
e.printStackTrace(logWriter);
}
}
return input.toString();
}
COM: <s> method ask4 line string </s>
|
funcom_train/31986614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDebugReceiver(MessageReceiver msgRec) {
if ( msgRec==null) {
sendWarning (
"Can not remove receiver to experiment! Command ignored.",
"Experiment '"+getName()+"', Method 'void removeDebugReceiver"+
"(MessageReceiver msgRec)'",
"The parameter 'msgRec' passed was a null reference.",
"Make sure to give a valid MessageReciever reference before removing it "+
"from the experiment's messaging system.");
return; // do nothing
}
messMan.deRegister(msgRec, debugnote);
}
COM: <s> removes a messagereceiver for debugnotes from the </s>
|
funcom_train/964631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeserializePanel() {
JPanel panel = createSamplePanel();
ByteArrayOutputStream out = new ByteArrayOutputStream();
serialize(out, panel);
byte[] bytes = out.toByteArray();
InputStream in = new ByteArrayInputStream(bytes);
deserialize(in);
}
COM: <s> tests the deserialization of a panel that is laid out using </s>
|
funcom_train/18894695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Action getImportMp3sAction() throws Exception {
LoadMp3sAction action = new LoadMp3sAction("Import Mp3s...");
action.setMp3Controller(getController());
action.setSearchPanel(searchPanel);
action.setResultPanel(resultPanel);
action.setStatusPanel(statusPanel);
return action;
}
COM: <s> returns an action that will search for mp3s from the filesystem and import </s>
|
funcom_train/20644202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getComSumOfAmounts(ComCalculus cc,Money rateCom) {
Money addition = new Money(0d);
Iterator e= getAssetsRoot0().getOptionsApplicable(
OptionMoneyAmount.class).iterator();
OptionMoneyAmount temp ;
while (e.hasNext()) {
temp = (OptionMoneyAmount) e.next();
addition.operation(
temp.moneyValue(cc),temp.numberOfLines(cc));
}
rateCom.operation(getRbs().getCom(addition),1);
}
COM: <s> get the script for a sum of amount value </s>
|
funcom_train/40084123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() {
System.out.println(" Opening MixrerAudioDevice line");
if (isOpen())
return;
try {
if (line == null)
line = (SourceDataLine) mixer.getLine(info);
((SourceDataLine)line).open(af);
System.out.println(" . . .. Open");
line.flush();
line.start();
System.out.println(" . . .. Start " + isOpen());
} catch (LineUnavailableException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> open and start the line </s>
|
funcom_train/35559707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLineContaining(int lineNb, String tag) {
int currentLineNb = lineNb;
while (currentLineNb < fatherList.nbLines()) {
String currentLine = fatherList.getLine(currentLineNb);
if (currentLine.contains(tag))
break;
if (currentLine.contains("</entry>"))
return -1;
else
currentLineNb++;
}
if (currentLineNb >= fatherList.nbLines())
return -1;
return currentLineNb;
}
COM: <s> return a line containing a special text </s>
|
funcom_train/46764728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getPauseButton() {
if (pauseButton == null) {
pauseButton = new JButton();
pauseButton.setIcon(pauseButtonIcon);
pauseButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
if (thread !=null){
if (thread.isAlive()){
thread.pauseReplay();
pause = true;
replayOnLabel.setText(Resources.getString("lab_replaypaused"));
}
}
}
});
}
return pauseButton;
}
COM: <s> this method initializes pause button </s>
|
funcom_train/25803174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateAggAttributes(ComponentModel model) {
HashMap<String, Object> attributes = model.getAttributes();
if (attributes == null)
attributes = new HashMap<String, Object>();
int providerNum = 0, requesterNum = 0;
for (PortModel p : model.getPorts()) {
if (p.isProvider())
providerNum++;
else
requesterNum++;
}
attributes.put("label", model.getName());
attributes.put("providerNum", providerNum);
attributes.put("requesterNum", requesterNum);
model.setAttributes(attributes);
}
COM: <s> fill attributes according to this models information </s>
|
funcom_train/3399106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPackage getTargetPackage() {
if(model.options.defaultPackage!=null)
// "-p" takes precedence over everything else
return codeModel._package(model.options.defaultPackage);
String p;
if( defaultPackage!=null )
p = defaultPackage;
else
p = getOption("package", "");
return codeModel._package(p);
}
COM: <s> gets the specified package name options </s>
|
funcom_train/16913259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void randomize(final int upperBound) {
for (int i = 0; i < getNumPoints(); i++) {
double[] point = new double[dimensions];
for (int j = 0; j < dimensions; j++) {
point[j] = Math.random() * upperBound;
}
setPoint(i, point);
}
Arrays.fill(distances, -1);
calculateDistances();
}
COM: <s> randomize dataset to a value between 0 and upper bound </s>
|
funcom_train/23283946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expungeStaleEntries() {
Entry<K, V> e;
while ((e = (Entry<K, V>)queue.poll()) != null) {
LogFactory.getLog(getClass()).debug("Cleaning up Softcache entry for " + e.getKey());
map.remove(e.getKey());
}
}
COM: <s> removes entries from the map that have had their value garbage collected </s>
|
funcom_train/67892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value executeWithCatch() throws ExecuteException {
if(getCaller().hasRequestToStop())
throw new StopException();
try {return execute();}
catch (ExecuteException exc) {
if(exc.getNode()==null) exc.setNode(this);
throw exc;
}
}
COM: <s> execute a node </s>
|
funcom_train/37848562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleMouseDoubleClick(Event event) {
if (event.button != 1 || doubleClickEnabled == false) {
return;
}
// double click word select the previous/next word.
//This method will update activeComponent field
//in order to keep the lastest component.
Point limPos = limitedLocation(event.x, event.y);
doWordSelected(limPos.x,limPos.y);
repaint();
}
COM: <s> updates the caret location and selection if mouse button 1 has been </s>
|
funcom_train/4115991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestPreviewFrame(Handler handler, int message) {
if (camera != null && previewing) {
previewHandler = handler;
previewMessage = message;
if (useOneShotPreviewCallback) {
camera.setOneShotPreviewCallback(previewCallback);
} else {
camera.setPreviewCallback(previewCallback);
}
}
}
COM: <s> a single preview frame will be returned to the handler supplied </s>
|
funcom_train/9470214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void beforeKey() throws JSONException {
Scope context = peek();
if (context == Scope.NONEMPTY_OBJECT) { // first in object
out.append(',');
} else if (context != Scope.EMPTY_OBJECT) { // not in an object!
throw new JSONException("Nesting problem");
}
newline();
replaceTop(Scope.DANGLING_KEY);
}
COM: <s> inserts any necessary separators and whitespace before a name </s>
|
funcom_train/25525788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveModelTheta(String filename){
try{
BufferedWriter writer = new BufferedWriter(new FileWriter(filename));
for (int i = 0; i < M; i++){
for (int j = 0; j < K; j++){
writer.write(theta[i][j] + " ");
}
writer.write("\n");
}
writer.close();
}
catch (Exception e){
System.out.println("Error while saving topic distribution file for this model: " + e.getMessage());
e.printStackTrace();
return false;
}
return true;
}
COM: <s> save theta topic distribution for this model </s>
|
funcom_train/15828262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static final String SHIFT_OPERATORS_SRC = "package com.example.mypackage;\n\n"
+ "public class MyClass {\n\n" + " public void run() {\n\n" + " int i;\n"
+ " i = 255 << 2;\n" + " i = 255 >> 2;\n" + " i = 255 >>> 2;\n"
+ " }\n" + "}\n";
COM: <s> the source for a shift operators test </s>
|
funcom_train/46575358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int getAttributeInt(NamedNodeMap nnm, String att, int def) {
// If attribute list empty -> always return default
if (nnm != null) {
Node item = nnm.getNamedItem(att);
// Does attribute exist?
if ( item != null) {
// yes, return value
return Integer.parseInt(item.getNodeValue());
} else {
// no, return default
return def;
}
} else {
return def;
}
}
COM: <s> p returns an attributes integer representation p </s>
|
funcom_train/11764817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String NewFileGui(String filter) {
composite.setEnabled(false);
simuButton.setEnabled(false);
doneButton.setEnabled(false);
OK2Close = false;
FileDialog fileDialog = new FileDialog(parent);
String[] extention = new String[1];
extention[0] = filter;
fileDialog.setFilterPath(path.toString());
fileDialog.setFilterExtensions(extention);
fileDialog.open();
composite.setEnabled(true);
simuButton.setEnabled(true);
doneButton.setEnabled(true);
loadBatButton.setEnabled(true);
saveBatButton.setEnabled(true);
OK2Close = true;
return fileDialog.getFileName();
}
COM: <s> this function is used by load </s>
|
funcom_train/28750198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProceduretypedispname(String newVal) {
if ((newVal != null && this.proceduretypedispname != null && (newVal.compareTo(this.proceduretypedispname) == 0)) ||
(newVal == null && this.proceduretypedispname == null && proceduretypedispname_is_initialized)) {
return;
}
this.proceduretypedispname = newVal;
proceduretypedispname_is_modified = true;
proceduretypedispname_is_initialized = true;
}
COM: <s> setter method for proceduretypedispname </s>
|
funcom_train/29887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLDocument addStylesheet(String href, String type) {
PI pi = new PI();
pi.setTarget("xml-stylesheet")
.addInstruction("href", href)
.addInstruction("type", type);
prolog.addElement(pi);
return(this);
}
COM: <s> this adds a stylesheet to the xml document </s>
|
funcom_train/46974541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Group getGroup(String groupname) throws ObjectNotFound {
Vector groupServants = userAdminStartupServant.groupServants;
for (int y=0;y<groupServants.size();y++) {
GroupServant groupServant = (GroupServant)groupServants.get(y);
if (groupname.compareTo(groupServant.getGroupName()) == 0) {
return groupServant._this();
}
}
throw new ObjectNotFound();
}
COM: <s> it returns the group registered for the ophelia platform with the provided groupname </s>
|
funcom_train/32371845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean killPlayer() {
if(currentPlayer.isAlive()) {
if(camNode != null) camNode.removeFromParent();
input.clearActions();
input.removeAllFromAttachedHandlers();
rootNode.clearControllers();
currentPlayer.setAlive(false);
hudState.createNewHUD(HUDState.SPECTATE);
hudState.setActive(true);
occluders.detachChild(currentPlayer.getHunter());
rootNode.updateRenderState();
return true;
}
return false;
}
COM: <s> kills the current </s>
|
funcom_train/24161706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addLocationGroup(LocationGroup locationGroup) {
if (locationGroup == null) {
throw new IllegalArgumentException("LocationGroup to be added is null");
}
if (locationGroup.getParent() != null) {
locationGroup.getParent().removeLocationGroup(locationGroup);
}
locationGroup.setParent(this);
return locationGroups.add(locationGroup);
}
COM: <s> add a code location group code to the list of children </s>
|
funcom_train/28348915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean nodeCanConnect(BLM blm) {
boolean canConnect = true;
try {
canConnect = blm.getChannel(BLM.LOSS_AVG_HANDLE).connectAndWait();
System.out.println(blm.getId() + " is Connected");
}
catch(NoSuchChannelException excpt) {
canConnect = false;
System.out.println(blm.getId() + " Can't connect");
}
return canConnect;
}
COM: <s> test whether the blms loss avg channels can connect </s>
|
funcom_train/21952149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChanged(PropertyEditorUI source, String pProperty, String newValue) {
//System.err.println("property " + pProperty + " changed.");
if (enableValues.keySet().contains(pProperty) || disableValues.keySet().contains(pProperty)) {
checkEnabledStatus(null);
}
}
COM: <s> on a property change if any of the source properties are set to </s>
|
funcom_train/13589153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAgentFromIntersection(MobsimAgent personAgent, double now) {
this.activateLink();
this.addAgent(personAgent, now);
this.simEngine.getMobsim().getEventsManager().processEvent(
new LinkEnterEventImpl(now, personAgent.getId(), qLink.getLink().getId(), null));
}
COM: <s> adds a person agent to the link i </s>
|
funcom_train/23229692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
logArea.append(LogReaderThread.NEWLINE);
try {
String line = "";
while ((line = reader.readLine()) != null) {
// JTextArea.append() is thread safe
logArea.append(line);
logArea.append(LogReaderThread.NEWLINE);
}
reader.close();
}
catch (java.io.IOException ioex) {
ioex.printStackTrace();
}
}
COM: <s> defines the actions to be performed by this thread when it runs </s>
|
funcom_train/2956597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSatisfied() {
final int[] tuple = new int[getNbVars()];
for (int i = 0; i < tuple.length; i++) {
assert (getVar(i).isInstantiated());
tuple[i] = getVar(i).getVal();
}
return isSatisfied(tuple);
}
COM: <s> default implementation of the is satisfied by </s>
|
funcom_train/15719673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processXMLChilds(Element element, XMLItem parent) {
//creates an iterator of XML Elements and processes all its childs
//to associate to the tree.
for (Iterator i = element.elementIterator(); i.hasNext();) {
Element element1 = (Element) i.next();
processXMLElement(element1, parent);
}
}
COM: <s> processes xml node childs and associates them to its parent </s>
|
funcom_train/25876094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void backupThreadStart(){
showDialog(BACKUP_PROGRESS_KEY);
backupThread = new Thread(new Runnable() {
public void run() {
String result=backupDatabase();
dismissDialog(BACKUP_PROGRESS_KEY);
Message m = new Message();
m.what = CategoryList.MSG_BACKUP;
Bundle b = new Bundle();
b.putString("msg", result);
m.setData(b);
CategoryList.this.myViewUpdateHandler.sendMessage(m);
if (debug) Log.d(TAG,"thread end");
}
});
backupThread.start();
}
COM: <s> start a separate thread to backup the database </s>
|
funcom_train/32040507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateCreateNewType_Enumeration(String createNewType, DiagnosticChain diagnostics, Map context) {
boolean result = CREATE_NEW_TYPE__ENUMERATION__VALUES.contains(createNewType);
if (!result && diagnostics != null)
reportEnumerationViolation(ImsldPackage.eINSTANCE.getCreateNewType(), createNewType, CREATE_NEW_TYPE__ENUMERATION__VALUES, diagnostics, context);
return result;
}
COM: <s> validates the enumeration constraint of em create new type em </s>
|
funcom_train/19636563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLooping0() throws Exception {
List list = new ArrayList();
LoopingIterator loop = new LoopingIterator(list);
assertTrue("hasNext should return false", loop.hasNext() == false);
try {
loop.next();
fail("NoSuchElementException was not thrown during next() call.");
} catch (NoSuchElementException ex) {
}
}
COM: <s> tests whether an empty looping iterator works as designed </s>
|
funcom_train/21357800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void marshallExperiments(Collection<Experiment> experiments, Writer out) throws IOException {
if (experiments.size() > 0) {
startPRIDEXMLFile(out);
for (Experiment experiment : experiments) {
// And marshall all the individual Experiments in the Collection.
marshallExperiment(experiment);
}
closePRIDEXMLFile();
} else {
throw new IllegalArgumentException("You need to specify at least one Experiment in the Collection!");
}
}
COM: <s> this method marshalls the specified collection of experiment instances as </s>
|
funcom_train/34339880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getPedido3() {
if (Pedido3 == null) {//GEN-END:|41-getter|0|41-preInit
// write pre-init user code here
Pedido3 = new TextField("Pedido3", null, 32, TextField.ANY);//GEN-LINE:|41-getter|1|41-postInit
// write post-init user code here
}//GEN-BEGIN:|41-getter|2|
return Pedido3;
}
COM: <s> returns an initiliazed instance of pedido3 component </s>
|
funcom_train/48708367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isJdk14Available() {
try {
loadClass("java.util.logging.Logger");
loadClass("org.apache.commons.logging.impl.Jdk14Logger");
Class throwable = loadClass("java.lang.Throwable");
if (throwable.getDeclaredMethod("getStackTrace") == null) {
return (false);
}
return (true);
} catch (Throwable t) {
return (false);
}
}
COM: <s> p return code true code if em jdk 1 </s>
|
funcom_train/46628471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printAttributes(Attributes atts) {
if (atts.getLength()>0) {
pp.print(" ").beginC(0);
for (int i=0;i<atts.getLength();i++) {
pp.print(atts.getLocalName(i)
+"=");
pp.mark(ATTR_GREEN);
pp.print(XMLUtils.quoteAttrValue(atts.getValue(i)));
pp.mark(ATTR_EMPTY);
if (i!=atts.getLength()-1) {
pp.brk(1,0);
}
}
pp.end();
}
}
COM: <s> pretty print attributes of an element </s>
|
funcom_train/3409277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setNameConstraints(byte[] bytes) {
if (bytes == null) {
ncBytes = null;
nc = null;
} else {
ncBytes = (byte []) bytes.clone();
// validate DER encoding
try {
nc = new NameConstraintsExtension(Boolean.FALSE, bytes);
} catch (IOException ioe) {
IllegalArgumentException iae =
new IllegalArgumentException(ioe.getMessage());
iae.initCause(ioe);
throw iae;
}
}
}
COM: <s> decode the name constraints and clone them if not null </s>
|
funcom_train/1506077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Entity completeKey( Entity entity ) {
Key key = entity.getKey();
if ( key.isComplete() ) {
return entity;
}
KeyRange keyRange = allocateIds( key.getParent(), key.getKind(), 1 );
Entity newEntity = new Entity( keyRange.getStart() );
newEntity.setPropertiesFrom( entity );
return newEntity;
}
COM: <s> make sure the entity has a complete key </s>
|
funcom_train/50479724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJFirstNameTextField() {
if (jFirstNameTextField == null) {
jFirstNameTextField = new JTextField();
jFirstNameTextField.setBounds(new Rectangle(150, 60, 125, 20));
jFirstNameTextField.setNextFocusableComponent(getJLastNameTextField());
}
return jFirstNameTextField;
}
COM: <s> this method initializes j first name text field </s>
|
funcom_train/50395966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map<String,String> getProtocolDependentRPs()throws Exception{
Map<String,String>result=new HashMap<String,String>();
PropertyType[] props=getResourcePropertiesDocument().getFileTransferProperties().getPropertyArray();
for(PropertyType p: props){
if(p.getName()!=null && p.getValue()!=null){
result.put(p.getName(), p.getValue());
}
}
return result;
}
COM: <s> get any protocol dependent parameters from the resource property document </s>
|
funcom_train/19137408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeWavelet(Wavelet wavelet) {
if ((waveletList == null) || (!waveletList.contains(wavelet))) {
Log.err("Wavelet '" + wavelet.getName() + "' can not be removed from" +
" the project since it is not present!");
return;
}
waveletList.remove(wavelet);
// Notify listener
fireProjectChanged();
}
COM: <s> remove a wavelet from the list of wavelets used for analysing the signal </s>
|
funcom_train/33142509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getFileMenu() {
if (fileMenu == null) {
fileMenu = new JMenu();
fileMenu.setText("File");
fileMenu.add(getOpenMenuItem());
fileMenu.add(getOptionsMenuItem());
fileMenu.add(getExitMenuItem());
}
return fileMenu;
}
COM: <s> this method initializes file menu </s>
|
funcom_train/49637432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkPublicApi () {
log.trace("checkPublicApi called");
// Check that each file in fileList exists
for (String filename : apiSet) {
if (!fileSet.contains(filename)) {
throw new BundleFormatException("Listed public API file '"
+ filename + "' is not present "
+ "in the file list");
}
}
log.trace("Finished checkFileList");
}
COM: <s> verify that all files listed in </s>
|
funcom_train/15908605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mutate() {
// Update input types
for (int i=0; i<=lastSlot; i++) {
//ins[i].setType(ins[i].getConnectedType());
}
// If last slot was connected, add another slot
if (ins[lastSlot].isConnected()) {
// Add a slot
addSlots(1, true);
}/*else if (!ins[lastSlot-1].isConnected())
removeSlots(1);*/
}
COM: <s> performs a mutation on this device </s>
|
funcom_train/45451802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder result = new StringBuilder("Choice(");
result.append("id=").append(getId()).append(",");
result.append("value=\"").append(value);
result.append(")");
return result.toString();
}
COM: <s> returns the string representation of this question type </s>
|
funcom_train/36921187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int m(final String word) {
int m=0;
int ctr=0;
while(ctr<word.length()) {
for(;ctr<word.length() && !isVowel(word.charAt(ctr));++ctr);
while(ctr<word.length()) {
for(;ctr<word.length() && isVowel(word.charAt(ctr));++ctr);
if(ctr<word.length()) ++m;
for(;ctr<word.length() && !isVowel(word.charAt(ctr));++ctr);
}
}
return m;
}
COM: <s> returns the measure of a word as </s>
|
funcom_train/36430729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void incrementRank() throws OpenR66ProtocolPacketException {
rank ++;
allFields[Columns.RANK.ordinal()].setValue(rank);
isSaved = false;
if (rank % 10 == 0) {
// Save each 10 blocks
try {
update();
} catch (GoldenGateDatabaseException e) {
logger.warn("Cannot update Runner: {}", e.getMessage());
}
}
}
COM: <s> increment the rank of the transfer </s>
|
funcom_train/21821050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeDefaults() {
IPreferenceStore store = getPreferenceStore();
store.setDefault(PATH_KEY, PerforceParameters.DEFAULT_PATH);
store.setDefault(PORT_KEY, PerforceParameters.DEFAULT_PORT);
store.setDefault(CLIENT_KEY, PerforceParameters.DEFAULT_CLIENT);
store.setDefault(USER_KEY, PerforceParameters.DEFAULT_USER);
store.setDefault(PASSWORD_KEY, PerforceParameters.DEFAULT_PASSWORD);
store.setDefault(SYSDRIVE_KEY, PerforceParameters.DEFAULT_SYSDRIVE);
store.setDefault(SYSROOT_KEY, PerforceParameters.DEFAULT_SYSROOT);
store.setDefault(TIMEOUT_KEY, PerforceParameters.DEFAULT_TIMEOUT);
}
COM: <s> sets the default values of the preferences </s>
|
funcom_train/45311191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getNonTermNames(){
ArrayList<String> nt = new ArrayList<String>();
for (int i = 0; i < rhsElementList.size(); i++) {
if(rhsElementList.get(i) instanceof NonTerm){
nt.add(((GrammarType)rhsElementList.get(i)).getType());
}
}
return nt;
}
COM: <s> returns a list of the names of all the nonterminals on the rhs </s>
|
funcom_train/46737576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFormFolderRef(DisplayModel formFolderRef) {
if (Converter.isDifferent(this.formFolderRef, formFolderRef)) {
DisplayModel oldformFolderRef= new DisplayModel(this);
oldformFolderRef.copyAllFrom(this.formFolderRef);
this.formFolderRef.copyAllFrom(formFolderRef);
setModified("formFolderRef");
firePropertyChange(String.valueOf(FORMTYPES_FORMFOLDERREFID), oldformFolderRef, formFolderRef);
}
}
COM: <s> grouping of form types </s>
|
funcom_train/11658705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void trimEndWhitespace() {
int index = text.length();
while (--index >= 0) {
char ch = text.charAt(index);
if (!Character.isWhitespace(ch)) {
break;
}
}
index++;
if ( index < text.length() ) {
this.text = text.substring(0,index);
}
}
COM: <s> trims whitespace from the end of the text </s>
|
funcom_train/18051721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getUniqueGroupId() throws KeydbLockedException {
passLock();
int id, i;
while (true) {//FIXME: need more efficient method
id = this.getRandom();
for(i = 0; i < header.numGroups; ++i) {
if (this.groupsIds[i] == id) break;
};
if (i >= header.numGroups) {
//not match
break;
};
};
return id;
}
COM: <s> create a unique group id </s>
|
funcom_train/22000020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addModelColumns(List<Column> columns) {
for (Iterator iterator = columns.iterator(); iterator.hasNext();) {
Column columnModel = (Column) iterator.next();
Object[] columnData = new Object[getRowCount()];
for (int j = 0; j < getRowCount(); j++)
columnData[j] = "";
addColumn(columnModel.getShortName(),
columnData);
}
this.columnsModel.addAll(columns);
}
COM: <s> add columns in the table model </s>
|
funcom_train/6340724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Structure Intersection(Structure structure) {
ArrayList names = structure.Names();
Structure result = new Structure(table);
String name;
for (int i=0;i<names.size();i++) {
name = (String)names.get(i);
if (check(name)) {
result.add(name);
}
}
return result;
}
COM: <s> result without values </s>
|
funcom_train/34481290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EEntity getInstance() throws SdaiException {
if (tag == PhFileReader.ENTITY_REFERENCE) {
if (reference instanceof EEntity) {
// inst.addToInverseList(ref); it is not clear about owner of this reference
return (EEntity)reference;
} else {
// Print warning message
return null;
}
} else if (tag == INDETERMINATE) {
return null;
}
printWarningToLogoValidate(AdditionalMessages.EE_NINS);
return null;
}
COM: <s> returns an entity instance wrapped in an object of this class </s>
|
funcom_train/28763271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLastStateTime(java.math.BigDecimal value) throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value);
mInternal.setProperty(ii_LastStateTime, jj_LastStateTime,kk_LastStateTime, com.intersys.objects.Database.RET_PRIM, "LastStateTime", dh);
return;
}
COM: <s> sets new value for code last state time code </s>
|
funcom_train/5265059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readInt() throws IOException {
int result, high, low;
high = in.read();
if (high==-1) throw new IOException("Connection to "+peer+" lost");
low = in.read();
if (low==-1) throw new IOException("Connection to "+peer+" lost");
result = (high << 8) + low;
return result;
}
COM: <s> read an 2 byte integer from the connection </s>
|
funcom_train/3285102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean changeColCode (String cCode) {
long now = System.currentTimeMillis ();
if ((now - lastColChange) < Server.srv.COLOR_CHANGE_INTERVAL)
return false;
colCode = cCode;
fadeColCode = null;
fadeColorUsername = null;
lastColChange = now;
return true;
}
COM: <s> this is used for user triggered colorchanges </s>
|
funcom_train/39294093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAddressPostcodePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DocumentRoot_addressPostcode_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_addressPostcode_feature", "_UI_DocumentRoot_type"),
CntPackage.Literals.DOCUMENT_ROOT__ADDRESS_POSTCODE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the address postcode feature </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.