__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/3424500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int createDeferredComment(String data) {
// create node
int nodeIndex = createNode(Node.COMMENT_NODE);
int chunk = nodeIndex >> CHUNK_SHIFT;
int index = nodeIndex & CHUNK_MASK;
setChunkValue(fNodeValue, data, chunk, index);
// return node index
return nodeIndex;
} // createDeferredComment(String):int
COM: <s> creates a comment node in the table </s>
|
funcom_train/10676244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute() throws Exception{
java.nio.ByteBuffer buf = java.nio.ByteBuffer.allocateDirect(10);
if(!nativeExecute(buf)) return false;
int length = buf.capacity();
byte[] buffer = new byte[length];
buf.get(buffer);
return buffer[1] == 13;
}
COM: <s> test logics method </s>
|
funcom_train/2713442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getJavaDirectory(String packageName) {
String directory = getDirectory();
if (packageName != null && !packageName.equals("")) {
packageName = packageName.replace('.', '\\');
if (directory.indexOf(packageName) != -1) {
return directory.substring(0, directory.indexOf(packageName));
}
}
return directory;
}
COM: <s> original directory of this document is supressed further </s>
|
funcom_train/18111897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEMailsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ContactDetails_EMails_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ContactDetails_EMails_feature", "_UI_ContactDetails_type"),
BioDBPackage.Literals.CONTACT_DETAILS__EMAILS,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the emails feature </s>
|
funcom_train/12190678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAssembleMessage() throws MessageException {
System.out.println("testAssembleMessage");
ProtocolIndependentMessage msg = new ProtocolIndependentMessage(
"I am a message", "text/plain", null );
PlainTextMessageAssembler assembler = new PlainTextMessageAssembler();
String txt = (String)assembler.assembleMessage( msg, null );
assertEquals( "I am a message", txt );
}
COM: <s> test of assemble message method of class com </s>
|
funcom_train/47434552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void save(EObject result, String modelURI) throws IOException {
final ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
final Resource newModelResource = resourceSet.createResource(Resources.createPlatformResourceURI(modelURI));
newModelResource.getContents().add(result);
final Map options = new HashMap();
newModelResource.save(options);
newModelResource.unload();
}
COM: <s> serialize the current profiling data </s>
|
funcom_train/3750678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRunningCount(int requests) {
if (requests>0) {
setStatusMessage(res.getString("BROKER_OFFERS_WAITING_COUNT_START")
+ " " + requests + " " +
res.getString("BROKER_OFFERS_WAITING_COUNT_END"));
} else {
setStatusMessage(res.getString("BROKER_OFFERS_ARRIVED"));
}
}
COM: <s> set the number of requests running </s>
|
funcom_train/12119462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean and(BitString set) {
if (this == set) { // should help alias analysis
return false;
}
int n = bits.length;
boolean changed = false;
for (int i = n; i-- > 0;) {
int old = bits[i];
bits[i] &= set.bits[i];
changed |= (old != bits[i]);
}
return changed;
}
COM: <s> logically ands this bit set with the specified set of bits </s>
|
funcom_train/36197969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setGeneralOptions() {
modelBuilder.setDebug(true);
modelBuilder.setStemmer(new PorterStemmer());
modelBuilder.setStopwords(new StopwordsEnglish());
modelBuilder.setDocumentLanguage("en");
modelBuilder.setMaxPhraseLength(5);
modelBuilder.setWikipedia(wikipedia);
topicExtractor.setDebug(true);
topicExtractor.setStemmer(new PorterStemmer());
topicExtractor.setStopwords(new StopwordsEnglish());
topicExtractor.setDocumentLanguage("en");
topicExtractor.setNumTopics(10);
topicExtractor.setWikipedia(wikipedia);
}
COM: <s> sets general parameters debugging printout language specific options </s>
|
funcom_train/2919442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeScope getLocalAttributeScope(String name) {
AttributeScope scope = null;
if ( returnScope!=null && returnScope.getAttribute(name)!=null ) {
scope = returnScope;
}
else if ( parameterScope!=null && parameterScope.getAttribute(name)!=null ) {
scope = parameterScope;
}
else {
AttributeScope rulePropertiesScope =
RuleLabelScope.grammarTypeToRulePropertiesScope[grammar.type];
if ( rulePropertiesScope.getAttribute(name)!=null ) {
scope = rulePropertiesScope;
}
}
return scope;
}
COM: <s> get the arg return value or predefined property for this rule </s>
|
funcom_train/50465069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Point getOwnerLocation() {
if (owner instanceof JWindow) {
return ((JWindow) owner).getRootPane().getLocationOnScreen();
} else if (owner instanceof JFrame) {
return ((JFrame) owner).getRootPane().getLocationOnScreen();
} else {
return null;
}
}
COM: <s> get the location on screen of the owner windows content </s>
|
funcom_train/174203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Text setText(String str) {
String reason;
if (str == null) {
value = EMPTY_STRING;
return this;
}
if ((reason = Verifier.checkCharacterData(str)) != null) {
throw new IllegalDataException(str, "character content", reason);
}
value = str;
return this;
}
COM: <s> this will set the value of this code text code node </s>
|
funcom_train/11009263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePrintArea(int sheetIndex) {
int cont = 0;
for (XSSFName name : namedRanges) {
if (name.getNameName().equals(XSSFName.BUILTIN_PRINT_AREA) && name.getSheetIndex() == sheetIndex) {
namedRanges.remove(cont);
break;
}
cont++;
}
}
COM: <s> delete the printarea for the sheet specified </s>
|
funcom_train/7618644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int parseCrlf(int offset) {
if (offset >= mBuffer.length())
return PARSE_ERROR;
char ch = mBuffer.charAt(offset);
if (ch == '\r') {
offset++;
ch = mBuffer.charAt(offset);
if (ch == '\n') {
return 2;
}
}
return PARSE_ERROR;
}
COM: <s> if offset reach r n return 2 </s>
|
funcom_train/21423154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readID3v2Header(InputStream in) throws IOException
{
byte[] id3header = new byte[4];
int size = -10;
in.read(id3header,0,3);
// Look for ID3v2
if ( (id3header[0]=='I') && (id3header[1]=='D') && (id3header[2]=='3'))
{
in.read(id3header,0,3);
@SuppressWarnings("unused")
int majorVersion = id3header[0];
@SuppressWarnings("unused")
int revision = id3header[1];
in.read(id3header,0,4);
size = (int) (id3header[0] << 21) + (id3header[1] << 14) + (id3header[2] << 7) + (id3header[3]);
}
return (size+10);
}
COM: <s> parse id3v2 tag header to find out size of id3v2 frames </s>
|
funcom_train/10810170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_toString2() throws Exception {
InputStream in = new SequenceInputStream(
new ByteArrayInputStream("aa".getBytes()),
new ByteArrayInputStream("a".getBytes()));
assertEquals("YWFh", TextHelper.toString(in));
}
COM: <s> regression test for wscommons 101 </s>
|
funcom_train/20789885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeConfigurationItems(int type) {
// find the configuration beans by its type
Collection<Configuration> currentItems = configurationDAO.findByType(type);
for (Iterator<Configuration> iter = currentItems.iterator(); iter.hasNext(); ) {
// get current config bean
Configuration config = (Configuration) iter.next();
// delete it
this.configurationDAO.delete(config);
}
}
COM: <s> removes all code configuration code s of the give code type code </s>
|
funcom_train/8992228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getWorkflowStepByRecordID(Integer workflowRecordID) throws Exception {
List tempList = new ArrayList();
WorkflowStepDAObject workflowStepDAObject = new WorkflowStepDAObject (sessionContainer,conn);
try{
if (workflowRecordID != null)
tempList = workflowStepDAObject.getListByWorkflowRecordID(workflowRecordID);
}catch(Exception e){
throw new Exception(e);
}
return tempList;
}
COM: <s> get workflow step list </s>
|
funcom_train/24055744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object jsxFunction_getElementsByTagName(final String tagName) {
final DomNode domNode = getDomNodeOrDie();
final HTMLCollection collection = new HTMLCollection(this);
collection.init(domNode, ".//*[local-name()='" + tagName + "']");
return collection;
}
COM: <s> returns all the descendant elements with the specified tag name </s>
|
funcom_train/46306994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pruneEmptyStopSequences(List<StopSequence> stopSequences) {
for (Iterator<StopSequence> it = stopSequences.iterator(); it.hasNext();) {
StopSequence st = it.next();
if (st.getStops().isEmpty())
it.remove();
}
}
COM: <s> remove stop sequences from a list that do not contain any stops </s>
|
funcom_train/34260072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveWorkspacePreference() {
try {
PersistenceHelper.saveArtifactsPreferences(this.getWorkspacePreference());
} catch (XmlTransformerException xmte) {
xmte.printStackTrace(System.out);
SaveErrorDialog lSE = new SaveErrorDialog(this.getPreferencesDialog(), "Unable to Save CollaborationPreference changes");
lSE.runError();
}
}
COM: <s> saves the workspace preference </s>
|
funcom_train/45277743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear(){
unitTableModel.clear();
docIdField.setText("");
docCityField.setText("");
docPostField.setText("");
docCountryField.setText("");
docNameField.setText("");
despIdField.setText("");
despCityField.setText("");
despPostField.setText("");
despCountryField.setText("");
despNameField.setText("");
delIdField.setText("");
delCityField.setText("");
delPostField.setText("");
delCountryField.setText("");
delNameField.setText("");
}
COM: <s> clears all the fields in the input panel and in the table </s>
|
funcom_train/25523898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeWindowNonOpaque() {
// on the mac, simply setting the window's background color to be fully
// transparent makes the window non-opaque.
setBackground(new Color(0, 0, 0, 0));
// on non-mac platforms, try to use the facilities of Java 6 update 10.
// if (!PlatformUtils.isMac()) {
quietlyTryToMakeWindowNonOqaque();
// }
}
COM: <s> trys to make the given </s>
|
funcom_train/12638916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getRevokedCertificates() {
if (revokedCerts == null || revokedCerts.isEmpty())
return null;
else {
HashSet certSet = new HashSet(11);
Collection badCerts = revokedCerts.values();
Object[] objs = badCerts.toArray();
for (int i = 0; i < objs.length; i++)
certSet.add(objs[i]);
return certSet;
}
}
COM: <s> gets all the revoked certificates from the crl </s>
|
funcom_train/32138718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectionChanged(IAction action, ISelection selection) {
if(selection instanceof IStructuredSelection) {
IStructuredSelection selected = (IStructuredSelection)selection;
Object o = selected.getFirstElement();
if(o instanceof GraphTreeNode) {
selectedItem = (GraphTreeNode)o;
o = selectedItem.getData();
if(null == ((DashboardGraphData)o).adapter) {
action.setEnabled(false);
return;
}
}
}
action.setEnabled(true);
}
COM: <s> this method updates what item is currently selected </s>
|
funcom_train/7965325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeSlavesPage(ServletOutputStream output) throws IOException {
String startTime = statisticsManager.getStartTimeString();
double totalTime = statisticsManager.getRunningTime();
long iteration = statisticsManager.getIterationCounter();
List<String> slaves = statisticsManager.getSlaves();
String slavesPage =
htmlPrinter.generateSlavesSite(startTime,
totalTime, iteration, slaves);
output.println(slavesPage);
}
COM: <s> writes slaves page to given servlet output stream </s>
|
funcom_train/9817173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void inst_stmts() throws ParseException, UnplacedBlockException {
label_4:
while (true) {
inst_stmt();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
jj_la1[11] = jj_gen;
break label_4;
}
}
}
COM: <s> parses the instance subclauses following the instance header </s>
|
funcom_train/26385133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void usePackageView() {
nCurrentTreeView = PACKAGE_VIEW;
this.removeAllChildren();
Iterator fileWalk = projectProperties.getJavaFiles().iterator();
while (fileWalk.hasNext()) {
JavaFile javaFile = (JavaFile) fileWalk.next();
appendToPackageView(javaFile);
}
}
COM: <s> reconstructs the projects tree view based on package structure </s>
|
funcom_train/4079444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPathPrefix(String prefixPath) {
this.pathPrefix = prefixPath;
if (StringUtils.hasLength(this.pathPrefix)) {
if (!this.pathPrefix.startsWith("/")) {
this.pathPrefix = "/" + this.pathPrefix;
}
if (this.pathPrefix.endsWith("/")) {
this.pathPrefix = this.pathPrefix.substring(0, this.pathPrefix.length() - 1);
}
}
}
COM: <s> specify a prefix to prepend to the path generated from the controller name </s>
|
funcom_train/44588528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void added(IJavaElement element) {
this.added.add(element);
ListItem current = this.getNewPosition(element);
ListItem previous = null, next = null;
if (current.previous != null)
previous = this.getNewPosition(current.previous);
if (current.next != null)
next = this.getNewPosition(current.next);
if (previous != null)
previous.next = current.next;
if (next != null)
next.previous = current.previous;
}
COM: <s> repairs the positioning information </s>
|
funcom_train/41446991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testShootistSetToTag() throws Exception {
// receiver.sendInvite();
receiverProtocolObjects =new ProtocolObjects(
"sender", "gov.nist", TRANSPORT, AUTODIALOG, null, null, null);
receiver = new TestSipListener(5080, 5070, receiverProtocolObjects, false);
SipProvider senderProvider = receiver.createProvider();
senderProvider.addSipListener(receiver);
receiverProtocolObjects.start();
tomcat.startTomcat();
deployApplication("toTag", "callernwPort1241042500479");
Thread.sleep(TIMEOUT);
assertTrue(receiver.getByeReceived());
}
COM: <s> non regression test for issue 676 http code </s>
|
funcom_train/50879984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
try{
myImageChopper.doChop();
}
catch (Exception e){
e.printStackTrace();
JOptionPane.showMessageDialog(getFrame(), e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
}
myButtonOK.setEnabled(true);
}
COM: <s> the run method for runnign the create action </s>
|
funcom_train/49200641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLinkingScenePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ExhibitionModule_linkingScene_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ExhibitionModule_linkingScene_feature", "_UI_ExhibitionModule_type"),
TransformedPackage.Literals.EXHIBITION_MODULE__LINKING_SCENE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the linking scene feature </s>
|
funcom_train/1027958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unregisterJMX() throws Exception {
org.apache.commons.modeler.Registry registry =
org.apache.commons.modeler.Registry.getRegistry(null, null);
String jmxObjectName = resources.getJMXObjectName();
registry.unregisterComponent(jmxObjectName);
getLog().info("Scheduler unregistered from name '" + jmxObjectName + "' in the local MBeanServer.");
}
COM: <s> unregister the scheduler from the local mbean server </s>
|
funcom_train/1937807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handOff(){
DecompressHandler theHandle;
BatchDecompress batchOpen;
if (isBatch){
//TODO: Do batch decompression
//batchOpen = new BatchDecompress(dOpenLocation, dDestination);
} else {
theHandle = new DecompressHandler(dArchive, dDestination, this.overwriteCheck.isSelected());
}
this.dispose();
}
COM: <s> this hands off the information to the decompression handler </s>
|
funcom_train/49459227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void test01_Arrays() throws Exception {
String[] test_data = { "1", "2", "3" };
String head = com.entelience.util.Arrays.head(test_data);
String shift[] = com.entelience.util.Arrays.shift(test_data);
assertEquals("1", head);
assertEquals("2", shift[0]);
assertEquals("3", shift[1]);
assertEquals(2, shift.length);
}
COM: <s> test 1 test head and shift array operators </s>
|
funcom_train/49670801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enhanceQuickAccessItem(final FolderMenu fm, final File custom) {
for (final Plugin plugin : getActivePlugins()) {
try {
if (plugin.canEnhanceQuickAccessItem()) {
plugin.enhanceQuickAccessItem(fm, custom);
}
} catch (final Exception e) {
log.error("Could not enchance quick access item", e);
}
}
}
COM: <s> enhances quick access item with plugins </s>
|
funcom_train/18633284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaxWidth(String maxWidth) {
maxWidth = trimString(maxWidth);
if (validationEnabled && maxWidth != null && !LENGTH_NONE.equals(maxWidth) && !isLength(maxWidth)) {
throw new ValueException("Not a valid max-width: " + maxWidth);
}
this.maxWidth = maxWidth;
}
COM: <s> sets the maximum width of an element </s>
|
funcom_train/32765894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPoint(double[] x, double[] y) {
synchronized (lockUpObj) {
xyPointV.removeAllElements();
for (int i = 0; i < x.length; i++) {
xyPointV.add(new XYpoint(x[i], y[i], 0.0));
}
Collections.sort((java.util.List) xyPointV, (Comparator) new CompareX());
this.calculateRepresentation();
this.updateData();
}
this.updateContainer();
}
COM: <s> add an array of x y points to the data set </s>
|
funcom_train/39871602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getOrigins(ValueCallback<Set<String> > callback) {
if (callback != null) {
if (WebViewCore.THREAD_NAME.equals(Thread.currentThread().getName())) {
Set origins = nativeGetOrigins();
callback.onReceiveValue(origins);
} else {
postMessage(Message.obtain(null, GET_ORIGINS, callback));
}
}
}
COM: <s> gets the set of origins for which geolocation permissions are stored </s>
|
funcom_train/45382626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPanelAssigned() {
if (panelAssigned == null) {
lblAssigned = new JLabel();
lblAssigned.setText("Assigned to this Companionship");
lblAssigned.setHorizontalAlignment(SwingConstants.CENTER);
panelAssigned = new JPanel();
panelAssigned.setLayout(new BorderLayout());
panelAssigned.setPreferredSize(new Dimension(200, 135));
panelAssigned.add(getScrollPaneAssigned(), BorderLayout.CENTER);
panelAssigned.add(lblAssigned, BorderLayout.NORTH);
}
return panelAssigned;
}
COM: <s> this method initializes panel assigned </s>
|
funcom_train/48982872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String add() {
// validates the add
performValidateAdd();
// if it has some error
if (hasActionErrors()) {
logger.log("\n\nError on add");
return input();
}
discipline.setCourse(course);
disciplineRemote.add(discipline);
return list();
}
COM: <s> add a new discipline </s>
|
funcom_train/27810945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long computeCrc(File file) throws IOException {
CRC32 crc = new CRC32();
InputStream in = new FileInputStream(file);
try {
byte[] buf = new byte[8192];
int n = in.read(buf);
while (n != -1) {
crc.update(buf, 0, n);
n = in.read(buf);
}
} finally {
in.close();
}
return crc.getValue();
}
COM: <s> computes the crc checksum for the given file </s>
|
funcom_train/4745323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GroupDescription describeSecurityGroup(String name) {
// initialize the interface
Jec2 ec2 = new Jec2(getCredentials().getAwsAccessKeyId(),
getCredentials().getSecretAccessKey());
try {
return ec2.describeSecurityGroups(new String[] { name }).get(0);
} catch (Exception ex) {
Logger logger = Logger.getLogger(this.getClass().getName());
logger.log(Level.SEVERE, "Describing security group failed: "
+ ex.getMessage());
return null;
}
}
COM: <s> gets the properties of a specific security group </s>
|
funcom_train/34448732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addActionURIPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Change_actionURI_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Change_actionURI_feature", "_UI_Change_type"),
TracesPackage.Literals.CHANGE__ACTION_URI,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the action uri feature </s>
|
funcom_train/40756709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void likeAndIsNotBlank(String property, Criteria criteria, Object condition) {
if (null != condition) {
if (condition instanceof String) {
if (StringUtils.isNotBlank((String)condition)) {
criteria.add(Restrictions.ilike(property, (String)condition,MatchMode.ANYWHERE));
}
} else {
criteria.add(Restrictions.ilike(property, condition));
}
}
}
COM: <s> like string string </s>
|
funcom_train/45749916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClassPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ClassifierAtom_class_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ClassifierAtom_class_feature", "_UI_ClassifierAtom_type"),
URMLPackage.Literals.CLASSIFIER_ATOM__CLASS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the class feature </s>
|
funcom_train/23411268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDependeePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MarketDependency_Dependee_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MarketDependency_Dependee_feature", "_UI_MarketDependency_type"),
OMPackage.Literals.MARKET_DEPENDENCY__DEPENDEE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the dependee feature </s>
|
funcom_train/43431720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Graphics g) {
Rectangle rec = this.getRequiredSpace();
Graphics2D g2d = (Graphics2D)g;
if(TrackLayout.isSelected(this)){
g2d.setColor(SEL_RECT_COLOR);
g2d.setStroke(SEL_DASH_STROKE);
g2d.drawRect(rec.x, rec.y,rec.width , rec.height);
g2d.setStroke(DEFAULT_STROKE);
}
if (ToolDropCoordinator.getActiveGhost() == this) {
drawConnectionPoints(g2d, null, null);
}
if(TrackLayout.isSelected(this)) drawHandlebars(g);
}
COM: <s> draws the component in a given graphics context </s>
|
funcom_train/38236796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Table getTable(String tName){
Enumeration e = tables.elements();
Table t = null;
String tableName = "";
while(e.hasMoreElements()){
t = (TableImpl)e.nextElement();
tableName = t.getName();
if(tableName.equals(tName)){
return t;
}
}
return null;
}
COM: <s> get the a table object by table name </s>
|
funcom_train/17788276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPacketLength(int layer) {
assert (layer > 0);
if (numCompletedPackets.isEmpty() || (layer > getNumCompletePackets())) {
return 0; // TODO: better to return -1 because it does not exist
}
return getPacketOffset(layer + 1) - getPacketOffset(layer);
}
COM: <s> returns the length of the packet code layer code </s>
|
funcom_train/9536125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMessage(AMessage message) {
if (message.getDirection().equals(Direction.ClientToServer)) {
jTextPaneClientRaw.setText(message.getRawData());
myController.updateActivePluginsClient(message);
} else {
jTextPaneServerRaw.setText(message.getRawData());
myController.updateActivePluginsServer(message);
}
}
COM: <s> this method refreshes the content of the raw views and the loaded plugins </s>
|
funcom_train/17818782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupTabbedPane() {
if (logger.isDebugEnabled()) {
logger.debug("Setup the tabbed image pane GUI");
}
cPtp = new PaintTabbedPane();
cPtp.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
jpEditor.add(cPtp, BorderLayout.CENTER);
if (logger.isDebugEnabled()) {
logger.debug("setupTabbedPane() - end");
}
}
COM: <s> seups the tabbed pane which holds all the open </s>
|
funcom_train/44704333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized protected void handleERRORDatagram(FND_Datagram dgram) {
byte d_r = dgram.getTransportControl()[0];
if (d_r == FND_Datagram.D_R_CMD || d_r == FND_Datagram.D_R_USM) {
logger.warn("invalid ERROR datagram --> discarded");
}
logger.warn("Last datagram has caused an ERROR datagram ");
}
COM: <s> this method handles error datagrams only island contexts can send error </s>
|
funcom_train/20871684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible(boolean visible) {
if (visible && !isVisible()) {
log.info("displaying splash screen");
updateSplash();
window.setVisible(true);
if (timeoutActive)
timer.setRunning(true);
} else if (!visible && isVisible()) {
log.info("hiding splash screen");
timer.setRunning(false);
EventQueue.invokeLater(new Runnable() {
public void run() {
window.dispose();
}
});
}
}
COM: <s> changes the visibility of the splash screen window </s>
|
funcom_train/7674711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(NameValuePair pair) {
throwIfImmutable();
if (pair == null) {
throw new NullPointerException("pair == null");
}
CstUtf8 name = pair.getName();
if (elements.get(name) != null) {
throw new IllegalArgumentException("name already added: " + name);
}
elements.put(name, pair);
}
COM: <s> add an element to the set of name value pairs for this instance </s>
|
funcom_train/15607252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Bounds b) {
if (b.isEmpty())
return;
if (isEmpty()) {
set(b);
return;
}
super.add(b);
leftPixels = Math.max(leftPixels, b.leftPixels);
rightPixels = Math.max(rightPixels, b.rightPixels);
upPixels = Math.max(upPixels, b.upPixels);
downPixels = Math.max(downPixels, b.downPixels);
}
COM: <s> add the given bounds to these bounds </s>
|
funcom_train/36175081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initJIntellitype() {
try {
if(listener == null) {
listener = new Listener();
JIntellitype.getInstance().addHotKeyListener(listener);
}
JIntellitype.getInstance().unregisterHotKey(88);
JIntellitype.getInstance().registerHotKey(88, Helper.getXmlHandler().getHotkeyOne().value(),
(int) Helper.getXmlHandler().getHotkeyTwo());
} catch (RuntimeException ex) {
ex.printStackTrace();
}
}
COM: <s> this method initializes the jni library and registers a global hot key </s>
|
funcom_train/20308410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExtendedIterator translateResponseHook( Document response, TriplePattern query, DIGAdapter da ) {
List answer = new ArrayList();
if (isTrue( response )) {
// if response is true, the subsumption relationship holds
answer.add( query.asTriple() );
}
return WrappedIterator.create( answer.iterator() );
}
COM: <s> p answer an iterator of triples that match the original find query </s>
|
funcom_train/26633437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unpackArguments(){
Object[] arguments = this.getArguments();
this.simulationDuration = ((Integer)arguments[0]).intValue();
this.metDataFile = (File)arguments[1];
this.simulationStep = ((Integer)arguments[2]).intValue();
}
COM: <s> unpack the arguments moa receives when is born </s>
|
funcom_train/10946510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(ShoppingCartItem item) {
if (item == null) return false;
return this.equals(item.getProductId(), item.additionalProductFeatureAndAppls, item.attributes, item.prodCatalogId, item.selectedAmount, item.getItemType(), item.getItemGroup(), item.getIsPromo());
}
COM: <s> compares the specified object with this cart item </s>
|
funcom_train/38996921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Project readProject(File projectFile) {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
Project proj = null;
try {
/*
* Using factory get an instance of document builder
*/
DocumentBuilder db = dbf.newDocumentBuilder();
/*
* parse using builder to get DOM representation of the XML file
*/
if (!projectFile.exists()) {
throw new FileNotFoundException();
}
Document dom = db.parse(projectFile);
proj = parseDocument(dom);
}catch(Exception e) {
e.printStackTrace();
}
return proj;
}
COM: <s> parses the given project file </s>
|
funcom_train/8346859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Size getSize(boolean content) {
int w = getWidth();
int h = getHeight();
if (content) {
Size frameWidth = getFrameSize();
w -= frameWidth.width;
h -= frameWidth.height;
}
return new Size(Math.max(0,w),Math.max(0,h));
}
COM: <s> returns the elements size </s>
|
funcom_train/43585391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMeta() {
Assert.assertEquals(Item.META.getTableName(), "item");
Assert.assertEquals(Item.ID.getIndex(), 0);
Assert.assertEquals(Item.NAME.getIndex(), 1);
Assert.assertEquals(Item.RATING.getIndex(), 2);
Assert.assertEquals(Item.ACTIVE.getIndex(), 3);
Assert.assertEquals(Item.AUTHOR_ID.getIndex(), 4);
}
COM: <s> check the correct position of the fields in meta </s>
|
funcom_train/2294604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmsRelationFilter filterUserDefined() {
CmsRelationFilter filter = (CmsRelationFilter)this.clone();
if (filter.m_types.isEmpty()) {
filter.m_types.addAll(CmsRelationType.getAllUserDefined());
} else {
filter.m_types = new HashSet(CmsRelationType.filterUserDefined(filter.m_types));
}
return filter;
}
COM: <s> returns an extended filter with user defined type restriction </s>
|
funcom_train/28928331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double getConnCost(Connection c) {
int samePhase = c.from.phase == c.to.phase ? 1 : 0;
double cost = c.wt * (.5 - samePhase) * c.from.out * c.to.out;
// If the projection is weighted, then the weight is considered to be the weight of the costs
// in the projection
if (c.proj instanceof ProjectWeighted)
cost *= ((ProjectWeighted) c.proj).wt;
return cost;
}
COM: <s> get the cost associated with a connection </s>
|
funcom_train/44832766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStyle(java.lang.String style) {
String result = (String) ComponentUtils.invokeMethod(getPage().getHandler(),
getMethod("onSetStyle"), new Object[] {style});
this.style = (result != null) ? result : style;
}
COM: <s> setter for property style </s>
|
funcom_train/28132499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getTopologyTypesFromTopologyProperty(XSElementDeclaration element, List result) {
XSTypeDefinition type = element.getTypeDefinition();
if (type instanceof XSComplexTypeDefinition) {
XSComplexTypeDefinition complexType = (XSComplexTypeDefinition) type;
XSParticle particle = complexType.getParticle();
// if particle is null, then it's a complex type with the simple content
if (particle == null)
return false;
return getTopologyTypesFromTopologyProperty(particle, result);
}
return false;
}
COM: <s> doc para finds the qualified names of the gml topology types i </s>
|
funcom_train/29716776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SVGEntity findSVGEntity(Entity e) {
for (int i = 0; i < objects.size(); i++) {
SVGEntity en = (SVGEntity) objects.get(i);
if (en.getEntity().getName().equals(e.getName())) {
return en;
}
}
return null;
}
COM: <s> finds the svgentity that has e as its entity or null if it </s>
|
funcom_train/15414822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TransactionLogger getLogger(SpiTransaction t) {
if (transactionLogToJavaLogger){
return sharedLogger;
}
if (logSharing == LogFileSharing.ALL) {
return sharedLogger;
}
if (logSharing == LogFileSharing.EXPLICIT && !t.isExplicit()) {
return sharedLogger;
}
TransactionLogger logger = loggerMap.get(t.getId());
if (logger == null) {
logger = createLogger(t);
loggerMap.put(t.getId(), logger);
}
return logger;
}
COM: <s> get the logger for a given transaction </s>
|
funcom_train/23791818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void queryExpected() {
if(isRegistered) {
Object[] arg = {incoming_port, name};
OSCMessage msg = new OSCMessage("/query/expected", arg);
out.send(msg);
} else {
if(verbo > 2) System.err.println("\nSenseWorldDataNetwork warning: the client is not yet registered. Cannot query server.");
}
}
COM: <s> queries the server for all the expected nodes present on the network </s>
|
funcom_train/46715458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int growCapacity(int withMinAmount) {
//Compute new max. list size.
int newMaxListSize = (listSize + withMinAmount);
/* If over current limit, make new limit at least 2*max; this
should be a fast enough growth rate. */
if (newMaxListSize > maxListSize)
newMaxListSize += maxListSize;
return newMaxListSize;
}
COM: <s> determines the amount to grow the backing array </s>
|
funcom_train/18068724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setDctmFile(final DctmFile dctmFile) throws Exception {
log.debug("setDctmFile(" + dctmFile + ")");
this.dctmFile = dctmFile;
if (dctmFile!=null) {
this.dctmId = dctmFile.getId();
log.debug("found object " + this.absPath + " with id " + this.dctmId);
}
else {
log.debug("could not find object with path " + this.absPath);
}
}
COM: <s> set the underlying implementation </s>
|
funcom_train/51717606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setAttrVal(String hdr, Object val) {
if (hdr == null || hdr.length() == 0) {
return false;
}
for (int i = 0; i < getAttrNames().length; i++) {
if (attr_names[i].compareTo(hdr) == 0) {
return setAttrVal(i, val);
}
}
return false;
}
COM: <s> complete set attr val i val </s>
|
funcom_train/22526833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doNoBrowser(Composite parent) {
Label label = AppFormToolkit.getInstance().createLabel(parent, Messages.BrowserEditor_0);
label.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
if(fURL != null) {
ViewManager.showInExternalBrowser(fURL);
}
}
COM: <s> display label and display url in external browser if system </s>
|
funcom_train/1116617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getMySQLButton() {
if (MySQLButton == null) {
MySQLButton = new JRadioButton();
MySQLButton.setActionCommand("mysql");
MySQLButton.setText("MySQL");
MySQLButton.setMnemonic(KeyEvent.VK_M);
MySQLButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
dbTypeAction(e);
}
});
}
return MySQLButton;
}
COM: <s> this method initializes j radio button1 </s>
|
funcom_train/6206145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generateWebFlows(List webFlows, IProgressMonitor monitor) {
Iterator it = webFlows.iterator();
while (it.hasNext()) {
IGaijinWebFlow webFlow = (IGaijinWebFlow) it.next();
GenWebFlowArtifactsJob job = new GenWebFlowArtifactsJob(webFlow);
IStatus result = job.run(monitor);
if (result.matches(IStatus.ERROR)) {
getErrors().add(result);
}
if (monitor.isCanceled()) {
throw new OperationCanceledException();
}
}
}
COM: <s> generate the source for all web flows in the list </s>
|
funcom_train/37077969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearFeatures() {
for (int i = 0; i < tiers.size(); i++)
((FeatureTier)tiers.elementAt(i)).clearDrawables();
tiers = new Vector(); // tiers = null;
drawables = null; // new FeatureSet(); ?
tierhash.clear();
}
COM: <s> clears features from tiers and clear tiers </s>
|
funcom_train/5862251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getFromNamespace(String name) {
final BSHInterpreter ip = getInterpreter(_ns);
if (ip != null && ip.getCurrent() == null)
return getImplicit(name); //ignore ns
Object v = _ns.getVariable(name, true);
return v != null || _ns.containsVariable(name, true) ? v: getImplicit(name);
//local-only since getVariableImpl will look up its parent
}
COM: <s> search ns instead </s>
|
funcom_train/7232509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyPlaces(){
final Iterator iter = this.timedTokens.keySet().iterator();
while (iter.hasNext()) {
final Object token = iter.next();
final List list=new ArrayList();
list.add(token);
final Place place = (Place) this.timedTokens.get(token);
place.fireTokensAddedEvent(list);
}
}
COM: <s> notify all the places about timed tokens changing their locations places </s>
|
funcom_train/22024085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRotation(float a, float b, float c, float w) {
this.quat.m[1] = a;
this.quat.m[2] = b;
this.quat.m[3] = c;
this.quat.m[0] = w;
this.rot.set(quat);
}
COM: <s> sets the rotation of this body as a quaternion </s>
|
funcom_train/22285060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFillMode(int fillMode) {
GroupWidget content = (GroupWidget)list.getContent();
if (this.fillMode != fillMode) {
switch (fillMode) {
case NONE:
content.setFillMode(NONE);
list.setFillMode(NONE);
break;
case CONTENT:
content.setFillMode(SOLID);
list.setFillMode(NONE);
break;
case SCROLLBAR:
content.setFillMode(NONE);
list.setFillMode(SCROLLBAR);
break;
case FILLED:
content.setFillMode(SOLID);
list.setFillMode(SCROLLBAR);
break;
}
this.fillMode = fillMode;
transparent = !(fillMode == FILLED && !corner);
repaint();
}
}
COM: <s> let the list box widget fill something </s>
|
funcom_train/51581637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean uploadProgram(String programPath) throws JavelinException {
File file = new File(programPath);
if (!(file.exists() && file.isFile())) {
String errorMessage = "File " + programPath + " not found.";
LOG.warn(errorMessage);
return false;
}
FileInputStream programStream = null;
try {
programStream = new FileInputStream(file);
}
catch (FileNotFoundException e) {
/* Should never happen */
}
return uploadProgram(programStream);
}
COM: <s> uplaods a program to the javelin </s>
|
funcom_train/14052053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Attribute getAttribute(String pageName, String attributeName) {
Attribute ret = null;
if ((pageName != null) && (attributeName != null)) {
AttributeSet aset = getAttributeSet(pageName);
if (aset != null) {
ret = aset.getAttribute(attributeName);
}
}
return ret;
}
COM: <s> get an attribute </s>
|
funcom_train/25506301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void display(Component parent, Throwable t, String message) {
if (t!=null) {
StringWriter writer = new StringWriter();
t.printStackTrace(new PrintWriter(writer));
String trace = writer.getBuffer().toString();
t.printStackTrace();
message = message + "\n\n" + trace; //$NON-NLS-1$
}
JOptionPane.showMessageDialog(parent, message, LocalizationData.get("ErrorManager.title"), JOptionPane.WARNING_MESSAGE); //$NON-NLS-1$
}
COM: <s> displays a dialog to signal an error </s>
|
funcom_train/5795045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOnDuty(Calendar aTime) {
boolean result = false;
// if there is no schedule assume that the user is on duty
if (m_dutySchedules.size() == 0) {
return true;
}
for (DutySchedule curSchedule : m_dutySchedules) {
result = curSchedule.isInSchedule(aTime);
// don't continue if the time is in this schedule
if (result) {
break;
}
}
return result;
}
COM: <s> returns a boolean indicating if the user is on duty at the specified </s>
|
funcom_train/21907077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getFromDate() {
if (fromDate == null) {
GregorianCalendar gc = new GregorianCalendar();
gc.set(GregorianCalendar.DAY_OF_WEEK, GregorianCalendar.MONDAY);
gc.set(GregorianCalendar.HOUR, 0);
gc.set(GregorianCalendar.MINUTE, 0);
gc.set(GregorianCalendar.SECOND, 0);
fromDate = gc.getTime();
}
return fromDate;
}
COM: <s> method to get the from date of the period </s>
|
funcom_train/37747008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextDecorator getDefinedDecorator() throws PropertyException {
PropertyValue pv = getPropertyValue(PropNames.TEXT_DECORATION);
if (! (pv.getType() == PropertyValue.TEXT_DECORATOR)) {
throw new PropertyException(
"TextDecorator not returned from text-decoration");
}
return (TextDecorator)pv;
}
COM: <s> get the current text decorator </s>
|
funcom_train/50865571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayMission(MainDesktopPane desktop) {
List selection = getSelection();
if (selection.size() > 0) {
Object selected = selection.get(0);
if (selected instanceof Mission) {
((MissionWindow) desktop.getToolWindow(MissionWindow.NAME)).selectMission((Mission) selected);
desktop.openToolWindow(MissionWindow.NAME);
}
}
}
COM: <s> display selected mission in mission tool </s>
|
funcom_train/25523690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasEventualParent(XMLElement xe) {
// Get the immediate parent.
XMLElement tmpParent = getParent();
// Work back up to the root node.
while(tmpParent != null) {
// If the XMLElement is a parent, return true.
if(xe == tmpParent) return true;
// Recurse.
tmpParent = tmpParent.getParent();
}
// Not a parent.
return false;
}
COM: <s> determine whether this </s>
|
funcom_train/20730751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Payload parsePayload(String ns, XmlPullParser parser) {
if (ns != null && ns.equalsIgnoreCase(PayloadLease.leaseNamespace)) {
PayloadLease myPL = new PayloadLease(PayloadLease.leaseNamespace);
try {
return myPL.parsePayload(PayloadLease.leaseNamespace, parser);
}
catch (Exception e) {
// a parse giving an error means parser is hosed
throw new PsEPRException("LeaseManager parser failed:"+e.toString());
}
}
return null;
}
COM: <s> called with a payload to parse </s>
|
funcom_train/50864101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double getSpeedLightConditionModifier() {
// Ground vehicles travel at 30% speed at night.
SurfaceFeatures surface = Simulation.instance().getMars().getSurfaceFeatures();
double result = surface.getSurfaceSunlight(getVehicle().getCoordinates());
result = (result * .7D) + .3D;
return result;
}
COM: <s> gets the lighting condition speed modifier </s>
|
funcom_train/28260373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getInput() {
// Read input string, return array of words
BufferedReader stdin = new BufferedReader(new InputStreamReader(
System.in));
try {
System.out.print(">"); // This avoids a CR at end of line of input
return stdin.readLine();
} catch (IOException e) {
logger.log(Level.SEVERE, "Unable to read input.");
}
return null;
}
COM: <s> gets input from standard input and returns it as string </s>
|
funcom_train/35165365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3f getCurrentTranslation() {
long currentTimeMillis = System.currentTimeMillis();
if (currentTimeMillis > finishTimeMillis) {
return finishTranslation;
} else {
float percent = ((float)(currentTimeMillis-startTimeMillis)) / ((float)(finishTimeMillis-startTimeMillis));
Vector3f interpolatedTranslation = new Vector3f();
interpolatedTranslation.interpolate(startTranslation, finishTranslation, percent);
return interpolatedTranslation;
}
}
COM: <s> because we know the start and end translation we can return </s>
|
funcom_train/10471867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Document migrationFromJboss2Geronimo(Element jbossRootElement) {
Document geronimoDocument = XMLConversionHelper.createNewGeronimoDocument(
Constants.NAMESPACE_ENV, "module", Constants.SECURITY_RESOURCE_TOOL, "", "");
Document geronimoNewDocument = createGBeanElement(jbossRootElement, geronimoDocument);
return geronimoNewDocument;
}
COM: <s> accepts the jboss side elements that holdes the discripter infomation and </s>
|
funcom_train/16981105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processReachable(CaseItem caseItem) {
if(caseItem.getCaseType() == CaseItem.CASE_UNREACHABLE){
decreaseReliability(caseItem.getPeerID(), 2.0);
}else{
increaseReliability(caseItem.getPeerID(), 1.0);
}
}
COM: <s> processing the case that is reported by other modules </s>
|
funcom_train/35946833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void and(FastBitSet that) {
final int n = MathLib.min(this._length, that._length);
for (int i = 0; i < n; ++i) {
this.bits[i] &= that.bits[i];
}
this._length = n;
}
COM: <s> performs the logical and operation on this bit set and the </s>
|
funcom_train/3735563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int instanciatePortlet(String portletName, WindowState windowState, PortletMode portletMode) {
currentId++;
Integer currentIdInteger = new Integer(currentId);
portletIdToName.put(currentIdInteger, portletName);
portletIdToState.put(currentIdInteger, new PortletState(windowState, portletMode));
return currentId;
}
COM: <s> instanciate a portlet </s>
|
funcom_train/9813053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadForegroundBitmap() {
// Create a MediaTracker to tell us when the image has loaded
MediaTracker tracker = new MediaTracker(this);
// Then load the image
image = Toolkit.getDefaultToolkit().getImage("foreground.png");
// add the image to the MediaTracker...
tracker.addImage(image, 0);
// ...and wait for it to finish loading
try {
tracker.waitForAll();
} catch (InterruptedException e) {
// Ignore the exception, since there's not a lot we can do.
image = null;
}
}
COM: <s> this method loads the bitmap that we will display in the component </s>
|
funcom_train/17119058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createNavLink(String oboFile) {
// cutting the path away
oboFile = oboFile.substring(oboFile.lastIndexOf('/') +1 , oboFile.length());
return "oboNav.jsp?obo=" + oboFile + "&field=" + this.getName() + "&term=" + this.getValue();
}
COM: <s> create a link that links to a navigation through the ontologie </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.