__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/29081971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disableFocusedForm() {
if (Beans.isDesignTime())
return;
if (!ClientSettings.SHOW_FOCUS_BORDER_ON_FORM)
return;
this.setBorder(BorderFactory.createCompoundBorder(
currentFocusedForm.getNotFocusedBorder(),
BorderFactory.createLineBorder(this.getBackground(),1)
));
}
COM: <s> set the current focused form that will receive key events </s>
|
funcom_train/3596252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void preferDependencies(NResource resource) throws NOMException {
if (resource==null) { return; }
List deps = resource.getDependencies();
if (deps!=null) {
for (Iterator dit=deps.iterator(); dit.hasNext(); ) {
NResourceDependency dep = (NResourceDependency)dit.next();
preferResourceLoad(dep.getResourceID());
}
}
}
COM: <s> set a preference for all dependencies of this resource </s>
|
funcom_train/4286181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTypeOfPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Classifier_typeOf_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Classifier_typeOf_feature", "_UI_Classifier_type"),
UmlMMPackage.Literals.CLASSIFIER__TYPE_OF,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the type of feature </s>
|
funcom_train/37597296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public Void visit(InstanceInitializer node) {
print("l."+node.getSourceInfo().getStartLine()+" InstanceInitializer {");
print("block:");
indent();
node.getBlock().acceptVisitor(this);
unindent();
displayProperties(node);
print("}");
return null;
}
COM: <s> visits a instance initializer </s>
|
funcom_train/42535298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o){
if(!(o instanceof FinalState))return false;
if(o == this)return true;
FinalState oo = (FinalState)o;
return (((Object)s).equals(oo.s))&&(((Object)tok).equals(oo.tok));
}
COM: <s> is the given object equal to this final state </s>
|
funcom_train/45763796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize( TestParameters tParam, PrintWriter log ) {
try {
log.println( "creating a drawdoc" );
xDrawDoc = DrawTools.createDrawDoc( (XMultiServiceFactory) tParam.getMSF());
} catch ( Exception e ) {
// Some exception occures.FAILED
e.printStackTrace( log );
throw new StatusException( "Couldn't create document", e );
}
}
COM: <s> in general this method creates a testdocument </s>
|
funcom_train/36493584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void windowClosing(WindowEvent e) {
persistObject(".fileEventList.dat",fileEventList);
persistObject(".viewEventList.dat",viewEventList);
persistObject(".viewNameList.dat",viewNameList);
persistObject(".config.dat",config);
// Exit application
System.exit(0);
}
COM: <s> save off objects when xing out of app </s>
|
funcom_train/12068418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Integer parseInteger(Attributes atts, String attribute ){
String value = atts.getValue( attribute );
if( value != null && value.length()>0 ){
try{
return Integer.parseInt( value) ;
}catch( NumberFormatException e){
// invalid boolean return null
return null;
}
}else{
// invalid value , return null
return null;
}
}
COM: <s> parse attribute value as integer </s>
|
funcom_train/44136276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean getElementOnTheLine(Node node) {
String ontheline = "false";
NamedNodeMap map = node.getAttributes();
if(map.getLength() > 0) {
Node n = map.getNamedItem(OSMFile.OSM_ELT_ATT_ONLINE);
if(n != null)
ontheline = getStringCleaned(n.getNodeValue());
}
return "true".equals(ontheline);
}
COM: <s> it indicates whether the element is on the line or not </s>
|
funcom_train/32914732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ApplicationViewModel getApplicationView(int applicationViewId, ServiceCall call) throws java.rmi.RemoteException, DataAccessException, Exception {
try {
startService(call);
ApplicationViewModel view = avda.getApplicationView(applicationViewId);
stopService(call);
return view;
} catch (Exception e) {
Debug.LogException(this, e);
throw e;
}
}
COM: <s> get the application view </s>
|
funcom_train/43232200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerResizeHandler(final EventBus eventBus) {
Window.addResizeHandler(new ResizeHandler() {
@Override
public void onResize(final ResizeEvent event) {
GwtUtils.setMainHeight();
GWT.log("Resized");
}
});
eventBus.registerHandler(ApplicationStartedEvent.class, new ApplicationController.ApplicationStartedHandler() {
@Override
public void handle(final ApplicationStartedEvent event) {
GwtUtils.setMainHeight();
}
});
}
COM: <s> represents the handler to handle the resize event </s>
|
funcom_train/13994047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean match(Map config) {
for (Iterator i = config.entrySet().iterator(); i.hasNext();) {
Map.Entry element = (Map.Entry) i.next();
if (!getValue((String) element.getKey()).equals(element.getValue())) { return false; }
}
return true;
}
COM: <s> tests if this code validateable code matches code config code </s>
|
funcom_train/49602147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEAPKeys(KeyPair keyPair) {
this.eapPrivateKey = keyPair.getPrivate();
Map<Integer, PublicKey> key = new TreeMap<Integer, PublicKey>();
key.put(-1, keyPair.getPublic());
DG14File dg14file = new DG14File(key);
putFile(DrivingLicenseService.EF_DG14, dg14file.getEncoded());
}
COM: <s> sets the eap key pair alters dg14 </s>
|
funcom_train/3471019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintTrackBar(Graphics2D graphics, Rectangle rect) {
graphics.setComposite(AlphaComposite.getInstance(
AlphaComposite.SRC_OVER, .6f));
graphics.fill(rect);
graphics.setComposite(AlphaComposite.getInstance(
AlphaComposite.SRC_OVER, 1.0f));
graphics.setColor(Color.black);
graphics.draw(rect);
}
COM: <s> p paints the track bar where all tracks are shown on </s>
|
funcom_train/22822789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String doTologCreateAction() {
try {
resolveParams(getTologParameters(), tologArgNames, tologArgValues,
"tolog_params_cache");
DataObject graph = getTologMediator().getEmptyGraph();
tolog = graph.createDataObject(0);
} catch (Throwable e) {
logException(e);
} finally {
try {
if (SDOConnectionWrapper != null) {
SDOConnectionWrapper.getConnection().close();
SDOConnectionWrapper = null;
}
} catch (Throwable e1) {
logException(e1);
}
if (tologMediator != null) {
tologMediator.setConnectionWrapper(null);
}
}
return "";
}
COM: <s> this method was created in order to create new data </s>
|
funcom_train/103691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void legacyApplyIndex(Index index) {
index.apply();
// undo (index implements undoable)
sample.postEdit(index);
// also: clear filename, set modified
sample.setModified();
sample.removeMeta("filename"); // BUG: this should be in
// Index.apply()
// (otherwise undo doesn't put the filename back)
// tell editor, and close
sample.fireSampleDataChanged();
sample.fireSampleMetadataChanged();
}
COM: <s> apply an index directly to a sample not using a server </s>
|
funcom_train/5781953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddListener() {
System.out.println("testAddListener");
// Add your test code below by replacing the default call to fail.
Object[] yo = new Object[] {new Boolean(false)};
multicaster1.addListener(dude1);
invokeMethod(yo);
Assert.assertTrue(((Boolean)(yo[0])).booleanValue());
}
COM: <s> test of add listener method of class jolo </s>
|
funcom_train/28151663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SimTupleset cset(Expr x) throws Err {
if (!x.errors.isEmpty()) throw x.errors.pick();
Object y = visitThis(x);
if (y instanceof SimTupleset) return (SimTupleset)y;
throw new ErrorFatal(x.span(), "This should have been a set or a relation.\nInstead it is "+y);
}
COM: <s> convenience method that evalutes x and cast the result to be a tupleset </s>
|
funcom_train/25083473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processUpdates(FacesContext context) {
if (context == null) {
throw new NullPointerException();
}
// Skip processing if our rendered flag is false
if (!isRendered()) {
return;
}
super.processUpdates(context);
try {
this.updateModel();
} catch (RuntimeException e) {
context.renderResponse();
throw e;
}
if (!isValid()) {
context.renderResponse();
}
}
COM: <s> p in addition to the standard code process updates code behavior </s>
|
funcom_train/5395467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetIntegrityTable() {
System.out.println("getIntegrityTable");
FecEncoder instance = null;
FileIntegrity expResult = null;
FileIntegrity result = instance.getIntegrityTable();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get integrity table method of class org </s>
|
funcom_train/46190011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNumberOfParentsIsCorrectWhenNested() {
comment.setParent(new BlogEntry(blog).createComment("", "", "", "", "", ""));
assertEquals(1, comment.getNumberOfParents());
}
COM: <s> tests that the number of parents is correct when comments are nested </s>
|
funcom_train/12192628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TransformerFactory createXsltcTransformerFactory() {
// Instantiate an xsltc TransformerFactory.
// NOTE: the transformer factory class must be hardcoded rather than
// looked up by JAXP on our behalf since our repackaged Xalan is
// (deliberately) not registered with JAXP.
return new com.volantis.xml.xalan.xsltc.trax.TransformerFactoryImpl();
}
COM: <s> create a transformer factory for repackaged xalan xsltc </s>
|
funcom_train/16857641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMonthYear(int year, int month){
DateTimeFormat formatMY = DateTimeFormat.getFormat("MMMM yyyy");
String date = formatMY.format(new Date(year - 1900, month, 1)).toString();
Label todayDate = new Label(date);
todayDate.setStyleName(style.elLeft());
headDate.setWidget(todayDate);
}
COM: <s> sets a month and a year to display in the format month yyyy </s>
|
funcom_train/31937937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveDialogSettings() {
if (dialogSettings == null) {
return;
}
String readWritePath = getStateLocation().append(FN_DIALOG_SETTINGS).toOSString();
try {
dialogSettings.save(readWritePath);
}
catch (IOException e) {
logError("Failed to save dialog settings:"+readWritePath, e);
}
}
COM: <s> saves this plug ins dialog settings </s>
|
funcom_train/37891261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void serializeQName(byte[] data, int offset) {
SymbolTable symbols = broker.getSymbols();
short namespaceId = symbols.getNSSymbol(qname.getNamespaceURI());
short localNameId = symbols.getSymbol(qname.getLocalName());
ByteConversion.shortToByte(namespaceId, data, offset);
ByteConversion.shortToByte(localNameId, data, offset + 2);
}
COM: <s> serialize the qname field on the persistant storage </s>
|
funcom_train/43205023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getOutputFilenameFromInputFilename(File file) {
String baseFilename = removeExtension(file.getAbsolutePath(), taskConfiguration.getArray(TransformProfileEnum.INPUT_EXT, ","));
String[] extensions = taskConfiguration.getArray(TransformProfileEnum.OUTPUT_EXT, ",");
if (extensions.length >= 0) {
return baseFilename + extensions[0];
} else {
return baseFilename;
}
}
COM: <s> take the input filename and reuse it for the output name </s>
|
funcom_train/5432588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InsufficientRightsAlert checkRights(CivControlPacket ccp) {
Controller c=((Controller)controllers.get(new Integer(ccp.sender.id)));
if(c==null || !c.theRights.hasRights(ccp.reqRights()))
return new InsufficientRightsAlert("You don't have enough rights to "+ccp.description());
return null;
}
COM: <s> checks if the rights for this packet check out </s>
|
funcom_train/18947723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getCustomizer() {
Component customizer = null;
if (beanDescriptor != null) {
Class cls = beanDescriptor.getCustomizerClass();
if (cls != null) {
try {
customizer = (Component)cls.newInstance();
} catch (Exception ex) {
// XXX - debug
System.out.println("PropertyTableModel: Instantiation exception creating Customizer");
}
}
}
return customizer;
}
COM: <s> gets the customizer for the current object </s>
|
funcom_train/15910522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean waitForState(int state) throws FrameGrabberException {
synchronized (waitSync) {
try {
while (deviceProc.getState() != state && stateTransitionOK)
waitSync.wait();
}
catch (InterruptedException ie) {
throw new FrameGrabberException("Failed to get next state");
}
}
return stateTransitionOK;
}
COM: <s> block until the processor has transitioned to the given state </s>
|
funcom_train/26524709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cutTail() {
Collection s = cache.entrySet();
ArrayList al = new ArrayList(s);
Collections.sort( al, new Comparator() {
public int compare( Object o1, Object o2 ) {
return -((Comparable)((Map.Entry)o1).getValue()).compareTo(
((Map.Entry)o2).getValue() );
}});
for( int j=maxSize; j<al.size(); ++j ) s.remove(al.get(j));
}
COM: <s> reduces cache to maximal size by removing old elements </s>
|
funcom_train/40675481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DevAppServer createDevAppServer(File appLocation, String address, int port) {
return createDevAppServer(
new Class[]{File.class, String.class, Integer.TYPE},
new Object[]{appLocation, address, port});
}
COM: <s> creates a new </s>
|
funcom_train/3341267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(TCPProtocol tcp) throws SocketException {
final SocketBuffer skbuf;
if (hdr.getDataLength() > 0) {
skbuf = buffer.createSocketBuffer(dataOffset, hdr.getDataLength());
} else {
skbuf = new SocketBuffer(0);
}
tcp.send(ipHdr, hdr, skbuf);
}
COM: <s> send this segment </s>
|
funcom_train/34320881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ElementSource getTopLevelKeys() {
HashSetResource topLevelKeys = (HashSetResource) getPager().synchDoTask(
storageLocation.getResourceID("keys.data"), new Pager.Task(false) {
public Object doIt(Resource rsrc) {
HashSetResource toplevelKeys = (HashSetResource) rsrc;
return toplevelKeys;
}
});
return ElementSource.with(topLevelKeys.iterator());
}
COM: <s> returns an element source containing all of the top level keys as </s>
|
funcom_train/43315083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void formatAmPm(StringBuffer buf, Date date) {
if (date.getHours() >= 12 && date.getHours() < 24) {
buf.append(dateTimeConstants.ampms()[1]);
} else {
buf.append(dateTimeConstants.ampms()[0]);
}
}
COM: <s> formats am pm field according to pattern specified </s>
|
funcom_train/331261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllFFTProcesses() {
for ( int i = 0; i < fftProcesses.size(); ++i ) {
LikelihoodFFTProcess p = fftProcesses.get(i);
// Destroying the process will set the parentDatablock of the FFT Process to null
// and removes all of the output data blocks.
p.destroyProcess();
// Remove the process from the pam controlling unit.
removePamProcess( p );
}
// This actually clears the pointers from the container.
fftProcesses.clear();
}
COM: <s> removes the all fft processes </s>
|
funcom_train/43093786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isParseable(Object f) {
SuffixFilter[] filters = getSuffixFilters();
if (filters != null) {
for (int i = 0; i < filters.length; i++) {
String fileName =
(f != null && f instanceof File
? ((File) f).getName()
: "");
if (fileName.endsWith(filters[i].getSuffix())) {
return true;
}
}
}
return false;
}
COM: <s> tells if the file is parseable or not </s>
|
funcom_train/32790937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAttribute(String name) throws NullPointerException {
if (name == null)
throw new NullPointerException(EX_PAR_NULL);
boolean result = false;
for (Table t : tables) {
if (t.getAttributeColumns(name).length > 0) {
result = true;
break;
}
}
// search in superclasses
if (!result) {
for (MappedClass mc : superclasses.values()) {
if (mc.isAttribute(name)) {
result = true;
break;
}
}
}
return result;
}
COM: <s> determines whether the given classifier is an attribute of this class </s>
|
funcom_train/2676262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyClose(FilePersistence store) {
// Store pending objects for this store
for (UpdateEntry entry : objects.keySet()) {
if (!store.equals(entry.store)) {
// Object is from different store
continue;
}
try {
objects.remove(entry);
store.saveObject(entry.object);
} catch (Throwable e) {
log.error("Error while saving {} in {}. {}", new Object[] {
entry.object, store, e });
}
}
}
COM: <s> write any pending objects for the given store to disk </s>
|
funcom_train/326165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addHelpSet(String helpsetName) {
if (hs == null) {
return false;
}
try {
HelpSet dum = new HelpSet();
dum.setTitle("Test Item");
dum.add(new HelpSet(PamHelp.class.getClassLoader(),ClassLoader.getSystemResource(helpsetName)));
hs.add(dum);
}catch (HelpSetException e) {
System.err.println("Error loading help set " + helpsetName);
return false;
}
return true;
}
COM: <s> add a module helpset to the master help </s>
|
funcom_train/43407989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getJMenuHelp() {
if (jMenuHelp == null) {
jMenuHelp = new JMenu();
jMenuHelp.setText("Help");
jMenuHelp.setFont(new java.awt.Font("Tahoma", java.awt.Font.PLAIN,
14));
jMenuHelp.add(getJMenuItemAbout());
jMenuHelp.add(getJMenuItemHelpContents());
}
return jMenuHelp;
}
COM: <s> this method initializes j menu help </s>
|
funcom_train/46768890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String get(Locale locale, String key) {
if (locale == null || key == null || key.length() == 0) {
return "???";
}
String lang = locale.getLanguage();
if (table.containsKey(lang) && table.get(lang).containsKey(key)) {
return table.get(lang).get(key);
} else {
return "???";
}
}
COM: <s> fetches a string in the language specified by the locale </s>
|
funcom_train/25656550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String fixMimeType(String original) {
if (original == null) return null;
int idx = original.indexOf(';');
if (idx == -1) {
return original.toLowerCase();
} else {
return original.substring(0, idx).toLowerCase();
}
}
COM: <s> lowercase mimetypes and strip anything after a semicolon </s>
|
funcom_train/18671041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put( SqlDataType type, int capacity, String value ) {
TreeMap map = (TreeMap)weighted.get( type );
if ( map == null ) {// add new ordered map
map = new TreeMap();
weighted.put( type, map );
}
map.put( new Integer( capacity ), value );
}
COM: <s> set a type name for specified type key and capacity </s>
|
funcom_train/51603782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadLocationCache() throws IOException {
debug(".loadLocationCache() : BEGIN");
String filename = getLocationCacheFileName();
File file = new File(filename);
if (file.exists()) {
FileInputStream fis = new FileInputStream(filename);
_locationCache.load(fis);
fis.close();
debug("Successfully loaded location cache");
}
}
COM: <s> called at initialization time to load previously </s>
|
funcom_train/43244915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMaxiumConnections() {
System.out.println("getMaxiumConnections");
ServerStatusObject instance = new ServerStatusObject();
int expResult = 0;
int result = instance.getMaxiumConnections();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get maxium connections method of class org </s>
|
funcom_train/12366168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void gotServerVersion(byte[] v) {
int srvVersion = v[0] * 100 + v[1] * 10 + v[2];
int srvMinVersion = Finals.CL_MIN_VERSION[0] * 100
+ Finals.CL_MIN_VERSION[1] * 10 + Finals.CL_MIN_VERSION[2];
if (srvVersion < srvMinVersion)
uiDispatch.badServerVersion(v);
}
COM: <s> receive version from server verify it is high enough </s>
|
funcom_train/2956167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nextMasterMove() {
master.setCurrentFail((Explanation) fail.copy()); // choose one explanation among all cuts
master.nextMove = AbstractGlobalSearchStrategy.UP_BRANCH; // restart the master from the current master solution
fail = null;
if (logger.isLoggable(Level.FINE))
logger.fine("START MASTERPB ");
}
COM: <s> describes the way the master search solver has to be set </s>
|
funcom_train/47967909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonSettings() {
if (jButtonSettings == null) {
jButtonSettings = new JButton();
jButtonSettings.setBounds(new Rectangle(375, 10, 75, 29));
jButtonSettings.setText("Settings");
jButtonSettings.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setGui = new SettingsGUI(tah);
setGui.setVisible(true);
}
});
}
return jButtonSettings;
}
COM: <s> this method initializes j button settings </s>
|
funcom_train/29926209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void redoComps() {
removeAll();
colorIcon = new ColorIcon(10, 10, getColor());
JButton pushButton = new JButton(getLabel(), colorIcon);
pushButton.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
Color trial = JColorChooser.showDialog(ColorPanel.this, "Pick Color for " + getLabel(), getColor());
if (trial != null) {
setColor(trial);
}
}
});
add(pushButton);
}
COM: <s> remake the ui components </s>
|
funcom_train/2487007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStereoType(SimpleModelElement simpleModelElement) {
String returnValue = null;
Collection c = simpleModelElement.modelElement.getStereotype();
for (Iterator iterator = c.iterator(); iterator.hasNext();) {
Stereotype stereotype = (Stereotype) iterator.next();
returnValue = stereotype.getName();
}
return returnValue;
}
COM: <s> returns the stereotype of the model element </s>
|
funcom_train/3174690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSources(List<InputSource> sources) {
if (selection!=null)
unselect(selection.source);
// keep
int oldSize = thumbs.size();
thumbs.clear();
if (sources!=null) for (InputSource source : sources)
thumbs.add(new Thumbnail(source));
// signal
firePropertyChange("content", oldSize, thumbs.size());
// show
showAll();
}
COM: <s> set sources to show </s>
|
funcom_train/3087759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _htmlCopy(Reader in, Writer out, long length, char buf[]) throws IOException {
int len;
boolean limited = (length >= 0);
int rest = limited ? (int) length : buf.length;
while (rest > 0 && (len = in.read(buf, 0, (rest > buf.length) ? buf.length : rest)) > 0) {
out.write(buf, 0, len);
if (limited)
rest -= len;
}
}
COM: <s> copies an reader to an writer </s>
|
funcom_train/11344819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setController(String field, boolean value, String specification) {
if (specification == null) {
m_controllers.put("ALL", new ServiceController(field, value));
} else {
m_controllers.put(specification, new ServiceController(field, value));
}
}
COM: <s> sets the service controller on this provided service </s>
|
funcom_train/38490249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireElementsAdded(Collection<Node> nodes, Collection<Edge> edges) {
EventListener[] listeners=m_listeners.getListeners(GraphListener.class);
for (int i=0;i<listeners.length;i++)
((GraphListener)listeners[i]).elementsAdded(this,nodes,edges);
}
COM: <s> fires the elements added event </s>
|
funcom_train/8484628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ATMethod meta_grabMethod(ATSymbol methodName) throws InterpreterException {
JavaMethod choices = Symbiosis.getMethods(wrappedClass_, Reflection.upSelector(methodName), true);
if (choices != null) {
return choices;
} else {
return super.meta_grabMethod(methodName);
}
}
COM: <s> methods can be grabbed from a symbiotic java class object </s>
|
funcom_train/17400862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toNativeArray(Array<E> dest, int offset, int len) {
if (len == 0) {
return; // nothing to copy
}
if (offset < 0 || offset >= _pos) {
throw new ArrayIndexOutOfBoundsException(offset);
}
System.arraycopy(_data, offset, dest, 0, len);
}
COM: <s> copies a slice of the list into a native array </s>
|
funcom_train/28147386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ZBDD getOrderZBDDAppend(String cnfFileName, String ordFileName) {
this.fileNameControl(cnfFileName, ".cnf");
// No specific extension for order files.
//this.fileNameControl(ordFileName, ".ord");
this.fileNameControl(ordFileName);
Parser parser = new Parser(this, cnfFileName);
return parser.ZBDDMakerAppend(parser.formatCnf(), ordFileName);
}
COM: <s> method get order zbddappend </s>
|
funcom_train/31131339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FirmwareInfo getFirmwareVersion() throws IOException {
byte [] request = {SYSTEM_COMMAND_REPLY, GET_FIRMWARE_VERSION};
byte [] reply = nxtComm.sendRequest(request, 7);
FirmwareInfo info = new FirmwareInfo();
info.status = reply[2];
if(info.status == 0) {
info.protocolVersion = reply[4] + "." + reply[3];
info.firmwareVersion = reply[6] + "." + reply[5];
} else System.out.println("Status = " + info.status);
return info;
}
COM: <s> get the fimrware version </s>
|
funcom_train/10595710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makeTargetURI(String path) {
final String sfx = ".xml";
final String newSfx = "-result.xml";
if (path.endsWith(sfx)) {
path = path.substring(0, path.length() - sfx.length());
}
return path + newSfx;
}
COM: <s> translate source path into target path so we keep a clean source xml </s>
|
funcom_train/13392275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getLibExtension() {
String opSys = System.getProperty("os.name");
if(opSys.startsWith("Windows"))
return("dll");
if(opSys.startsWith("Mac"))
return("jnilib");
return("so");
}
COM: <s> get the library extension to search for </s>
|
funcom_train/3363962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unregisterKeyboardAction(KeyStroke aKeyStroke) {
ActionMap am = getActionMap(false);
for (int counter = 0; counter < 3; counter++) {
InputMap km = getInputMap(counter, false);
if (km != null) {
Object actionID = km.get(aKeyStroke);
if (am != null && actionID != null) {
am.remove(actionID);
}
km.remove(aKeyStroke);
}
}
}
COM: <s> this method is now obsolete </s>
|
funcom_train/602864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeMessageListener(MessageListener listener, String channel) {
System.err.println("Removing listener "+listener+" from "+channel);
Vector listeners = (Vector)channels.get(channel);
if (listeners == null) {
return;
}
if (listeners.contains(listener))
listeners.removeElement(listener);
if (listeners.size() == 0)
channels.remove(channel);
}
COM: <s> removes a message listener </s>
|
funcom_train/936587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
System.out.println("Start my simple plug-in");
/*
* Sleep awhile just to simulate that something is being done
* during startup.
*/
try {
Thread.sleep(TIMEOUT);
} catch (InterruptedException exception) {
exception.printStackTrace();
}
System.out.println("My simple plug-in has started");
}
COM: <s> this method is invoked when the plug work core start this plug in </s>
|
funcom_train/29805907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showEditFriendPanel(rKiveFriend friend) {
if(friend != null) {
Dimension size = details.getSize();
details = new EditFriend(this, friend);
details.setSize(size);
shrink_details.setComponenet(details);
shrink_display.minimise();
if(display instanceof CoverFlow)
((CoverFlow) display).settle();
}
}
COM: <s> brings up a panel in which to edit the details of a friend </s>
|
funcom_train/1476851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object convertColumn(Class<?> type, String column, Object value) {
if (type != null && column != null) {
NamesRecord namesRecord = getNamesRecord(type);
value = JDBCUtils.convertColumn(namesRecord, column, value);
}
return value;
}
COM: <s> this helper method will convert the incoming data if it needs to be </s>
|
funcom_train/27700057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDetails(String details) {
if (details == null || details.equals("")) {
setDetailsVisible(false);
detailButton.setVisible(false);
} else {
this.details.setText(details);
setDetailsVisible(false);
detailButton.setVisible(true);
}
}
COM: <s> set the details section of the error dialog </s>
|
funcom_train/37871435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void composeView() {
// base composite
Composite baseContainer = new Composite(_parent, SWT.NULL);
GridLayout baseLayout = new GridLayout();
baseContainer.setLayout(baseLayout);
// top composite
_topContainer = new TopContainer(baseContainer, SWT.NULL, this);
_topContainer.init();
// body composite
_bodyContainer = new BodyContainer(baseContainer, SWT.NULL, _queryView,
this);
_bodyContainer.init();
// bottom composite
_bottomContainer = new BottomContainer(baseContainer, SWT.NULL);
_bottomContainer.init();
}
COM: <s> this method puts the assembles the query view </s>
|
funcom_train/14589042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateEntryPriority (Object entryObject, Comparable priority) {
if (! (entryObject instanceof Entry)) {
throw new RuntimeException (
"The object <"
+ (entryObject == null
? "null"
: entryObject.getClass().getName())
+ "> is not a priority queue entry token"
);
}
Entry entry = (Entry) entryObject;
Object item = entry.item;
remove (entry);
entry.item = item;
entry.priority = priority;
add (entry);
}
COM: <s> change the priority of an entry already in the queue </s>
|
funcom_train/9767373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Annotation gotoAnnotation(boolean forward) {
ITextSelection selection= (ITextSelection) getSelectionProvider().getSelection();
Position position= new Position(0, 0);
Annotation annotation= findAnnotation(selection.getOffset(), selection.getLength(), forward, position);
setStatusLineErrorMessage(null);
setStatusLineMessage(null);
if (annotation != null) {
selectAndReveal(position.getOffset(), position.getLength());
setStatusLineMessage(annotation.getText());
}
return annotation;
}
COM: <s> jumps to the next annotation according to the given direction </s>
|
funcom_train/51220792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
try{
this.parent=parent;
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns=1;
gridLayout.makeColumnsEqualWidth=true;
parent.setLayout(gridLayout);
player=PlayerImpl.createPlayer(parent);
InternalManager.getDefault().setPlayer(player,this);
rActions=new Actions(this,player);
rActions.makeActions();
rActions.fillLocalToolBar();
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> the player and the actions are created </s>
|
funcom_train/13393533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveBundle(File f, FaceBundle bundle) throws FileNotFoundException, IOException {
f.createNewFile();
FileOutputStream out = new FileOutputStream(f.getAbsolutePath());
ObjectOutputStream fos = new ObjectOutputStream(out);
fos.writeObject(bundle);
fos.close();
//System.out.println("saved bundle ... "f.getAbsolutePath());
}
COM: <s> caches the face space object in code f code file </s>
|
funcom_train/26474730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws Exception {
this.rows = (List) ViewModelManager.getValue(this, this.rowsId);
if (this.rows == null) {
throw new ProgrammerException(
"The rows attribute "
+ this.attribute
+ " of slider "
+ this.getFullName()
+ " has the undefined value null.");
}
if (this.attribute != null) {
Integer wrapper =
(Integer) ViewModelManager.getValue(this, this.attribute);
if (wrapper != null)
pos = wrapper.intValue();
}
}
COM: <s> initialize this view model </s>
|
funcom_train/9557064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAutoReplyRule(long accountId, int index) throws RulesLoadingException, NoRuleException {
try {
AccountEntity account = anAccountEntityHome.findByPrimaryKey(new Long(accountId));
account.removeAutoReplyRule(index);
} catch (NoRuleException ne) {
throw ne;
} catch (Exception e) {
throw new RulesLoadingException(e.getMessage());
}
}
COM: <s> remove auto reply rule at given index </s>
|
funcom_train/42916833 | /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:|26-getter|0|26-preInit
// write pre-init user code here
backCommand = new Command("Retour", Command.BACK, 0);//GEN-LINE:|26-getter|1|26-postInit
// write post-init user code here
}//GEN-BEGIN:|26-getter|2|
return backCommand;
}
COM: <s> returns an initiliazed instance of back command component </s>
|
funcom_train/134056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runScriptString(String scriptText, String extension) {
try {
ScriptEngine engine = getScriptEngine("x." + extension); // fake file name
if (engine == null) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "igb script engine is not loaded");
return;
}
Reader reader = new StringReader(scriptText + '\n');
engine.eval(reader);
}
catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> run text lines in the specified scripting language </s>
|
funcom_train/22827185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void alterDatabase(Database currentModel, Database desiredModel, StringBuilder ddl) {
ModelComparator comparator = new ModelComparator(databaseInfo, delimitedIdentifierModeOn);
List<IModelChange> changes = comparator.compare(currentModel, desiredModel);
processChanges(currentModel, desiredModel, changes, ddl);
}
COM: <s> generates the ddl to modify an existing database so the schema matches </s>
|
funcom_train/1805022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GoogleBaseAttribute getSubAttribute(String name) {
if (subAttributes.containsKey(name)) {
Collection<GoogleBaseAttribute> attrs = subAttributes.get(name);
if (!attrs.isEmpty()) {
return subAttributes.get(name).iterator().next();
}
}
return null;
}
COM: <s> gets one sub attribute with the name name if there are any </s>
|
funcom_train/10517112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() {
configureProject("src/etc/testcases/taskdefs/java.xml");
//final String propname="tests-classpath.value";
//String testClasspath=System.getProperty(propname);
//System.out.println("Test cp="+testClasspath);
String runFatal=System.getProperty("junit.run.fatal.tests");
if(runFatal!=null)
runFatalTests=true;
}
COM: <s> configure the project </s>
|
funcom_train/36827611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int bookTicket(int bookingNum, int itemNumber) {
System.out.println("Composite of Tickets being booked");
for (int i = 0; i < tickets.size(); i++) {
TicketComponent comp = (TicketComponent) tickets.get(i);
itemNumber = comp.bookTicket(bookingNum, itemNumber);
booked = booked || comp.isBooked();
}
return itemNumber;
}
COM: <s> iterates through the ticket combination and books every ticket with </s>
|
funcom_train/42988942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void subRelationshipTable(String entity, String relationship) {
Button subRelationshipsButton = new Button("Choose a sub-relationship");
subRelationshipsButton.addListener(getSubRelationships(entity, relationship));
insertElement(lineIndex - 2, 2, new Label(relationship));
insertElement(lineIndex, 2, subRelationshipsButton);
relationshipRule = vade + relationship;
askValue(entity, relationship);
}
COM: <s> updates the table inserting into it an entity and a sub relationship button </s>
|
funcom_train/47020876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand4() {
if (exitCommand4 == null) {//GEN-END:|103-getter|0|103-preInit
// write pre-init user code here
exitCommand4 = new Command(getLocalizedString("Exit"), Command.EXIT, 1);//GEN-LINE:|103-getter|1|103-postInit
// write post-init user code here
}//GEN-BEGIN:|103-getter|2|
return exitCommand4;
}
COM: <s> returns an initiliazed instance of exit command4 component </s>
|
funcom_train/12565723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void changeState(boolean checked, Update up) {
boolean isBefore = true;
List<Update> before = new Vector<Update>();
List<Update> after = new Vector<Update>();
for (Update u : facade.getUpdates()) {
if (u.equals(up)) {
isBefore = false;
before.add(u);
continue;
}
if (isBefore) {
before.add(u);
} else {
after.add(u);
}
}
if (checked) {
updateListViewer.setCheckedElements(before.toArray());
} else {
for (Update update : after) {
updateListViewer.setChecked(update, false);
}
}
}
COM: <s> ensure that updates are selected in continuity no gaps </s>
|
funcom_train/13720129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInputSwitchFunction(InputSwitchFunction function) throws InterruptedException, IOException {
isActive(true);
try{
setSetting(InputSwitchFunction.COMMANDCODE, function.getData());
}catch(InterruptedException e){
logger.log(Level.SEVERE, "Unable to setInputSwitchFunction", e);
throw e;
}catch(IOException e){
logger.log(Level.SEVERE, "Unable to setInputSwitchFunction", e);
throw e;
}
}
COM: <s> this command allows the changing of the input switch function on the unit </s>
|
funcom_train/21041236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showToolBar() {
toolbar = new JToolBar();
barButtons = new JButton[5];
for (int i = 0; i < barButtons.length; i++) {
barButtons[i] = new JButton(new ImageIcon(IconLoader
.getTestAgentMenuIcons()[i]));
barButtons[i].setToolTipText(IconLoader
.getTestAgentMenuToolTipTexts()[i]);
toolbar.add(barButtons[i]);
barButtons[i].addActionListener(testAgentListener);
}
}
COM: <s> provides the implementation of the tool bar </s>
|
funcom_train/10792779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Table getSingleTable(Version version, Column[] cols) {
if (cols == null || cols.length == 0
|| DBIdentifier.isEmpty(cols[0].getTableIdentifier()))
return version.getClassMapping().getTable();
return version.getClassMapping().getTable().getSchema()
.getTable(cols[0].getTableIdentifier());
}
COM: <s> gets the table where this version columns are mapped </s>
|
funcom_train/29597746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String parse(final SpyglassPacket packet) throws SpyglassPacketException {
try {
final int val = Integer.valueOf(stringFormatter.parse(packet));
value = new DecimalFormat("0.0#").format(operationExecutor.addValue(val));
return description + " " + value;
} catch (final Exception e) {
value = "NaN";
throw new SpyglassPacketException("A packet coult not be evaluated in StatisticalInformationEvaluator", e);
}
}
COM: <s> returns the concatenation of the description and statistic the value </s>
|
funcom_train/44679794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void computeVertexMatches(double distanceTolerance) {
MatchedShell shell = getMatchedShell();
for (int i = 0; i < nearFeat.size(); i++) {
BoundaryFeature bf = (BoundaryFeature) nearFeat.get(i);
// don't match with overlapping features
if (bf.isOverlapping()) {
continue;
}
shell.computeVertexMatches(bf.getMatchedShell(), distanceTolerance);
}
}
COM: <s> computes vertex matches for this feature comparing </s>
|
funcom_train/18377479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canConstruct(String id) {
ProjectPalette[] palettes = getProjectPalettes();
if (palettes == null)
return false;
for (int i = 0; i < palettes.length; i++) {
ProjectPalette projectPalette = palettes[i];
if (!projectPalette.isEnabled())
continue;
if (projectPalette.canConstruct(id))
return true;
}
return false;
}
COM: <s> method can construct </s>
|
funcom_train/46191110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAllTagsWhenNotAssociatedWithACategory() {
CategoryBuilder builder = new CategoryBuilder(blog);
builder.getRootCategory().setTags("myblog");
blog.setRootCategory(builder.getRootCategory());
List tags = blogEntry.getAllTags();
assertEquals(blog.getTag("myblog"), tags.get(0));
}
COM: <s> tests that all tags can be retrieved even when the blog entry </s>
|
funcom_train/18550995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMessageContainer_MessageContainerPM() {
MessageContainer mc = null;
try {
mc = new MessageContainer(null);
} catch (MessageException e) {
try {
mc = new MessageContainer("");
} catch (MessageException e1) {
try {
mc = new MessageContainer("fdnejkfn jwebnf£");
} catch (MessageException e2) {
pass();
return;
}
}
}
fail();
}
COM: <s> test the parameters of the constructor </s>
|
funcom_train/20870027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStep1() {
System.out.println("step1");
Grammer g = new Grammer(Gn);
LL1 instance = new LL1(g);
instance.step1();
System.out.println(instance.nullable_rules);
System.out.println(instance.nullable_nonterminals);
// TODO review the generated test code and remove the default call to fail.
//fail("The test case is a prototype.");
}
COM: <s> test of step1 method of class parser </s>
|
funcom_train/32943417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveMappings(final List<Mapping> mappings) {
txTemplate.execute(
new TransactionCallback() {
public Object doInTransaction(TransactionStatus ts) {
try {
for(Mapping m: mappings) {
getSession().save(m);
}
}
catch(Exception ex) {
log.debug("Setting Rollback Only", ex);
ts.setRollbackOnly();
}
return null;
}
}
);
// Clear the session to evict anything
// that we don't want hanging around.
getSession().clear();
}
COM: <s> save all of the mappings </s>
|
funcom_train/18525483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse() throws IOException, SAXException {
if (menuBar != null) {
InputSource is = LanguageFileLoader.getReference().getLanguageInputStream(LanguageFileLoader.MENU_XML_FILE);
if (is != null) {
getParser().setContentHandler(this);
getParser().setErrorHandler(this);
getParser().parse(is);
}
}
}
COM: <s> this method parses the language file and puts the </s>
|
funcom_train/44612907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer saveCode() {
StringBuffer code = new StringBuffer();
if (variables.isEmpty()) {
return code;
}
code.append("// save pre-state vaules for possible recursion\n");
for (Entry e: variables) {
code.append(e.type + " " + PREFIX + e.name + " = " +e.name+ ";\n");
}
//return RacParser.parseStatement(code.toString()).incrIndent();
return code;
}
COM: <s> returns a code block that if executed saves the values of </s>
|
funcom_train/3473707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeInitialRecordables() throws IOException {
record.record(new CalendarRecordable(env));
record.record(new SystemInfoRecordable(env));
record.record(new KeyboardStateRecordable(env, false, false, false,
true, true, true));
}
COM: <s> writes some initial recordables to the record </s>
|
funcom_train/27862780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LNode addChild(Object owner, String text, boolean visible){
LNode child = new LNode(tree, drawBorder, textColor, borderColor, backgroundColor,
selectedTextColor, selectedBorderColor, selectedBackgroundColor);
child.parent = this;
child.owner = owner;
child.text = text;
child.initLNode();
children.add(child);
child.inEdge.setVisible(visible);
child.vText.setVisible(visible);
return child;
}
COM: <s> add new child to this node </s>
|
funcom_train/23982869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void monochromatise(float[] colour) {
if ((colour[0] < 0.8f) && (colour[1] < 0.8f) && (colour[2] < 0.8f)) {
colour[0] = 0.0f;
colour[1] = 0.0f;
colour[2] = 0.0f;
}
// Remove transparency
if (colour.length == 4) {
colour[3] = 1.0f;
}
}
COM: <s> make colours monochromatic by setting everything except white to </s>
|
funcom_train/50154790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Properties getAvailableLookAndFeel() {
Properties lafProps = new Properties();
UIManager.LookAndFeelInfo[] lafs = UIManager.getInstalledLookAndFeels();
for (int i = 0; i < lafs.length; i ++) {
lafProps.put(lafs[i].getName(), lafs[i].getClassName());
}
return lafProps;
}
COM: <s> returns a code properties code object whose keys are </s>
|
funcom_train/26387384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public short readShort() throws RiffFormatException {
try {
if (littleEndian) {
return (short) (in.read() << 0 | in.read() << 8);
} else {
return (short) (in.read() << 8 | in.read() << 0);
}
} catch (IOException ex) {
throw new RiffFormatException(ex);
}
}
COM: <s> read a short </s>
|
funcom_train/44842063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNewRow() {
if (!_config.hasAnUser()) {
_showWarningDialog("No users configured yet.", "Add User");
return;
}
int row = getSelectedRow();
if (row == -1) {
// No row selected, add a new row at index 1
row = 1;
}
else {
row++;
}
_model.addNewRow(row);
editCellAt(row, AccessControlTableModel.COLUMN_LOGIN);
}
COM: <s> adds a new row after anonymous login </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.