__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/4746987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConfigFilePath(String configFilePath) {
if ((configFilePath == null) || (configFilePath.trim().length() == 0)) {
throw new IllegalArgumentException(
"configFilePath cannot be blank or null.");
}
_configFilePath = configFilePath;
}
COM: <s> setter for property config file path </s>
|
funcom_train/15907554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set_CppVirtualInheritance(boolean y) throws RuntimeException {
UmlCom.send_cmd(identifier_(), OnInstanceCmd.setCppVirtualInheritanceCmd, (y) ? (byte) 1 : (byte) 0);
UmlCom.check();
_cpp_virtual_inheritance = y;
}
COM: <s> to set if the inheritance is virtual in c </s>
|
funcom_train/41718824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addStateIndicatorOccurrence(StateIndicatorOccurrence occurrence) {
long stateTimestamp = occurrence.getTimestampLong();
updateIndicatorTimeBounds(stateTimestamp);
StateIndicator stateIndicator = occurrence.getIndicator();
List<StateIndicatorOccurrence> stateOccurrences = stateOccurrenceListMap.get(stateIndicator);
if (stateOccurrences == null) {
stateOccurrences = new ArrayList<StateIndicatorOccurrence>();
stateOccurrenceListMap.put(stateIndicator, stateOccurrences);
}
stateOccurrences.add(occurrence);
// fireStateOccurrenceAdded(occurrence);
copyFilteredStateOccurrence(occurrence, this.maxAcceptedTime);
}
COM: <s> add a state indicator occurrence to this model </s>
|
funcom_train/17201121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decayStatistics(int decayCount) {
if (!booted) return; // fast exit
if (Controller.options.LOGGING_LEVEL >= 1) {
synchronized (log) {
log.print(getTime() + " Decay Organizer Statistics: \n\t" + " Num of Decay events: " + decayCount + "\n");
}
}
}
COM: <s> call this method to dump statistics related to decaying </s>
|
funcom_train/2053991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element getGatewayElement(Element commandElement) {
Element gatewayElement = null;
String protocolType = commandElement.getAttributeValue("protocol");
Map<String, Boolean> protocolProps = getProtocolProperties(protocolType);
if (protocolProps.size() > 0) {
gatewayElement = buildGatewayElement(commandElement, protocolType, protocolProps);
}
return gatewayElement;
}
COM: <s> build gateway element from supplied command element the property elements extracted </s>
|
funcom_train/3393047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SourceRange csp(List<? extends JCTree> trees) {
if ((trees == null) || !(trees.nonEmpty())) return null;
SourceRange list_sr = new SourceRange();
for (List<? extends JCTree> l = trees; l.nonEmpty(); l = l.tail) {
list_sr.mergeWith(csp(l.head));
}
positions.put(trees, list_sr);
return list_sr;
}
COM: <s> visitor method compute source positions for a list of nodes </s>
|
funcom_train/23182120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MapGridOptions getGridTabValues() {
MapGridOptions mapGridOptions = new MapGridOptions();
mapGridOptions.setGridVisible(jcbGridVisible.isSelected());
mapGridOptions.setLineColor(jtfGridLineColor.getText());
mapGridOptions.setTextColor(jtfGridCornerTextColor.getText());
mapGridOptions.setTextBgColor(jtfGridCornerBoxColor.getText());
return mapGridOptions;
}
COM: <s> returns actual settings from the grid tab for a selected map </s>
|
funcom_train/32061789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsVisible() {
System.out.println("isVisible");
ContainerView instance =
ContainerView.createNewWithFlow("cv", Right, Down, 0,
newIP(10,10));
boolean expResult = true;
boolean result = instance.isVisible();
assertEquals(expResult, result);
}
COM: <s> test of is visible method of class container view </s>
|
funcom_train/31761294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndDateString(String endDateString) {
if (endDateString.equals(""))
return;
try {
this.endDate = new SimpleDateFormat("MM/dd/yyyy HH:mm").parse(endDateString);
} catch(ParseException ex) {
//Logger.info("Exception parsing end date: " + ex.getMessage());
Logger.error(this,ex.getMessage(),ex);
}
}
COM: <s> sets the end date string </s>
|
funcom_train/47547557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBackEnabled() {
checkWidget();
int /*long*/[] result = new int /*long*/[1];
int rc = webBrowser.QueryInterface(nsIWebNavigation.NS_IWEBNAVIGATION_IID, result);
if (rc != XPCOM.NS_OK) error(rc);
if (result[0] == 0) error(XPCOM.NS_ERROR_NO_INTERFACE);
nsIWebNavigation webNavigation = new nsIWebNavigation(result[0]);
boolean[] aCanGoBack = new boolean[1];
rc = webNavigation.GetCanGoBack(aCanGoBack);
webNavigation.Release();
return aCanGoBack[0];
}
COM: <s> returns code true code if the receiver can navigate to the </s>
|
funcom_train/24085773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRecord(SampleObject record) {
// to ensure referential integrity
record.setSampleRecordsDefinition(this);
long index = 1;
if (records.size() > 0) {
index = (records.get(records.size()-1)).getSampleIndex() +1 ;
}
record.setSampleIndex(index);
records.add(record);
}
COM: <s> adds the given record to the list of sample records </s>
|
funcom_train/20660553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPane3() {
if (jScrollPane3 == null) {
try {
jScrollPane3 = new JScrollPane();
jScrollPane3.setBounds(130, 20, 318, 110); // Generated
jScrollPane3.setViewportView(getJtpDescription()); // Generated
} catch (java.lang.Throwable e) {
}
}
return jScrollPane3;
}
COM: <s> this method initializes j scroll pane3 </s>
|
funcom_train/37070267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getHitBeans() {
List newHitIds = getValidHits();
List hitBeans = new ArrayList();
for (int i = 0; i < newHitIds.size(); i++) {
String hitId = (String) newHitIds.get(i);
hitBeans.add(BeanFactory.getHitBean(conn, hitId));
}
return hitBeans;
}
COM: <s> returns a list of hit beans associated to this term </s>
|
funcom_train/28763335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProcessState(uk.org.axioma.shark.ProcessStates value) throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value);
mInternal.setProperty(ii_ProcessState, jj_ProcessState,kk_ProcessState, com.intersys.objects.Database.RET_OBJECT, "ProcessState", dh);
return;
}
COM: <s> sets new value for code process state code </s>
|
funcom_train/44451300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void quitProgram() {
if (generatedTextureSaved == false) {
int returnValue = JOptionPane.showConfirmDialog(frame,
"The synthesized image is not saved. Save it now?",
"Save image?", JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (returnValue == JOptionPane.YES_OPTION ||
returnValue == JOptionPane.OK_OPTION) {
saveGeneratedImage();
} else if (returnValue == JOptionPane.CANCEL_OPTION ||
returnValue == JOptionPane.CLOSED_OPTION) {
return;
}
}
frame.dispose();
System.exit(0);
}
COM: <s> exits the program </s>
|
funcom_train/17529317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean areInStrictOrder(Node n1, Node n2) {
int index1 = this.nodes.indexOf(n1);
int index2 = this.nodes.indexOf(n2);
if (index1 == -1 || index2 == -1)
throw new InvalidParameterException("The profile is not defined for the respective nodes.");
return matrix[index1][index2].equals(CharacteristicRelationType.StrictOrder);
}
COM: <s> checks whether two given nodes are in strict order </s>
|
funcom_train/46152964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openDocument(String uri, boolean notify) {
if ((uri == null) || (uri.length() == 0)) {
return;
}
new DocumentLoader(uri).start();
if (whiteboardWindow.isSynced() && (notify == true)) {
// notify other clients
whiteboardWindow.sendRequest(Action.OPEN_DOCUMENT, null, uri, null, null);
}
}
COM: <s> loads an svg document </s>
|
funcom_train/8078930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void backward( PaceMatrix b, IntVector pvt, int ks, int k0 ) {
for( int j = ks; j > k0; j-- ) {
steplsqr( b, pvt, j, leastExplainingColumn(b, pvt, j, k0), false );
}
}
COM: <s> backward ordering of columns in terms of response explanation </s>
|
funcom_train/44869178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.setBorder(BorderFactory.createLineBorder(Color.black,
1));
jContentPane.add(getBottomPanel(), BorderLayout.SOUTH);
jContentPane.add(getMainPanel(), BorderLayout.CENTER);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/34025140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyToClient() {
JList l = theList;
Object[] m = l.getSelectedValues();
Behavior[] theNotes = new Behavior[m.length];
for (int i = 0; i < m.length; i++) {
FabAnnotation fa = (FabAnnotation) m[i];
theNotes[i] = fa.getBehaviour();
}
publishAnnotations(false, DistributedPersonalAnnos.las, theNotes);
}
COM: <s> copies selected annotations to the local database </s>
|
funcom_train/21238780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean connect() {
boolean establishConn = true;
try {
peerSocket = new Socket(peerIP, peerPort);
os = peerSocket.getOutputStream();
is = peerSocket.getInputStream();
} catch (UnknownHostException e) {
System.err.println("[peer.java] unknown host");
establishConn = false;
} catch (IOException e) {
System.err.println("[peer.java, connect()] error creating socket");
establishConn = false;
}
return establishConn;
}
COM: <s> attempt to connect with this peer return true if able else fail </s>
|
funcom_train/48045391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PeriodFields with(PeriodProvider periodProvider) {
PeriodFields periods = of(periodProvider);
if (this == ZERO) {
return periods;
}
if (periods == ZERO) {
return this;
}
TreeMap<PeriodUnit, PeriodField> copy = clonedMap();
copy.putAll(periods.unitFieldMap);
return create(copy);
}
COM: <s> returns a copy of this period with the specified values altered </s>
|
funcom_train/26488149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSingleValue(ConfigurationImpl root, String name)throws ConfigurationException{
ConfigurationImpl child = (ConfigurationImpl)root.getConfiguration(name);
String value = child.getValue();
if(name.equals("name")){
if(value == null || value.equals(""))
throw new ConfigurationException(CLASS_NAME +
": Error in parser. Tag <" + name + "> must be specified.");
}
return value;
}
COM: <s> return the single value of configuration specified in name </s>
|
funcom_train/36002608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testServiceNameOnlyConfiguration() {
ConfigTree config = new ConfigTree("root");
config.setAttribute(EsbServiceInvokerAction.ESB_SERVICE_NAME_PROPERTY, "jvmqueryServiceListener");
try {
new EsbServiceInvokerAction(config);
fail();
} catch (ConfigurationException e) {
assertEquals("You must specify a service category name using the serviceCategory attribute.",
e.getMessage());
}
}
COM: <s> what happens if only service name is passed </s>
|
funcom_train/38552663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean propertyUpdate() {
this.blnProperty.setName(this.nameField.getText());
this.blnProperty.setValue(Boolean.valueOf(this.valueField.getText()).toString());
this.blnProperty.setDesc(this.descArea.getText());
return true;
}
COM: <s> updates the nodes information with what is in the panel </s>
|
funcom_train/1536064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(GeoElement geo) {
//Application.printStacktrace("geo:"+geo.getLabel());
if (geo.hasDrawable3D()){
//Drawable3D d = ((GeoElement3DInterface) geo).getDrawable3D();
Drawable3D d = drawable3DMap.get(geo);
//drawable3DLists.remove(d);
remove(d);
//for GeoList : remove all 3D drawables linked to it
if (geo.isGeoList()){
if (d!=null)
for (DrawableND d1 : ((DrawList3D) d).getDrawables3D()){
if (d1.createdByDrawList())
remove((Drawable3D) d1);
}
}
}
drawable3DMap.remove(geo);
}
COM: <s> remove a geo element3 d from this view </s>
|
funcom_train/42068231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDataListChunksPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ChunkDataList_dataListChunks_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ChunkDataList_dataListChunks_feature", "_UI_ChunkDataList_type"),
WavPackage.Literals.CHUNK_DATA_LIST__DATA_LIST_CHUNKS,
false,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the data list chunks feature </s>
|
funcom_train/26325306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRequestProperties(HashMap headers) {
if (headers != null) {
Iterator keys = headers.keySet().iterator();
while (keys.hasNext()) {
String key = (String) keys.next();
String value = (String) headers.get(key);
setRequestProperty(key, value);
}
}
}
COM: <s> sets the general request properties </s>
|
funcom_train/42975648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Node v) {
Node u = getPrev(v); // may throw an IllegalArgumentException
Node w = getNext(v); // may throw an IllegalArgumentException
// unlink the node from the list
w.setPrevious(u);
u.setNext(w);
v.setPrevious(null);
v.setNext(null);
size--;
}
COM: <s> removes the given node v from the list </s>
|
funcom_train/39314388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetUnderline() {
System.out.println("testGetUnderline");
Frame f=new Frame("hello");
Text myText=new Text(f, true, 10, 10);
assertEquals(myText.getUnderline(),"underline");
System.out.println(myText.getUnderline());
}
COM: <s> test of get underline method of class text </s>
|
funcom_train/36641451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addState(int stateNumber) throws TraceException {
if (firstState < 0) {
firstState = stateNumber;
} else if (stepSize < 0) {
stepSize = stateNumber - firstState;
} else {
int step = stateNumber - lastState;
if (step != stepSize) {
throw new TraceException("State step sizes are not constant");
}
}
lastState = stateNumber;
}
COM: <s> add a state number for these traces </s>
|
funcom_train/8214621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printData() {
String word;
Double[] td;
for (Iterator<String> it = words.keySet().iterator(); it.hasNext(); ) {
word = it.next();
td = words.get(word);
System.out.println(word + "\t" + td[0] + "\t" + td[1] + "\t" + td[2]);
}
}
COM: <s> prints every word in the document with their information </s>
|
funcom_train/29422009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element constructElements(Element element, Document d) {
AixmSegmentPoint.setElements(element, this, d);
AixmUtil.constructSingleElement(this.roleFreeFlight, element, "roleFreeFlight");
AixmUtil.constructSingleElement(this.roleRVSM, element, "roleRVSM");
AixmUtil.constructAbstractValueElement(this.turnRadius, element, "turnRadius");
return element;
}
COM: <s> creates a dom4j element representing an aixm elevated point </s>
|
funcom_train/18037034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean testEvent(SAXEvent sE) {
if (sE.getType() != SAXEvent.START_ELEMENT) {
return false;
}
return test(sE.getUri(), sE.getLocalName(), sE.getQualifiedName(),
sE.getAttributes());
}
COM: <s> test if the event satisfy the conditions </s>
|
funcom_train/24288617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateUI() {
final JSpinner testSpinner = new JSpinner();
if (spinner != null) {
if ("Windows".equals(UIManager.getLookAndFeel().getID())) { //$NON-NLS-1$
spinner.setBorder(testSpinner.getBorder());
} else {
spinner.setBorder(new EmptyBorder(0, 0, 0, 0));
}
}
}
COM: <s> updates the ui </s>
|
funcom_train/45763251 | /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) {
log.println("creating a textdocument");
m_xTextDoc = WriterTools.createTextDoc(((XMultiServiceFactory) tParam.getMSF()));
m_ConnectionColsed = false;
debug = tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE);
}
COM: <s> creates writer document where controls are placed </s>
|
funcom_train/6407882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resizeTextureIds(int size) {
if (vboTextureIDs.length == size || size == 0) return;
int[] newIDArray = new int[size];
for (int x = Math.min(size, vboTextureIDs.length); --x >= 0; )
newIDArray[x] = vboTextureIDs[x];
vboTextureIDs = newIDArray;
}
COM: <s> code resize texture ids code forces the texid array to be the given </s>
|
funcom_train/13274873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setHelpPage(URL helpPage) {
if (helpPage != this.helpPage) {
URL oldHelpPage = this.helpPage;
this.helpPage = helpPage;
this.propertyChangeSupport.firePropertyChange(Property.HELP_PAGE.name(), oldHelpPage, helpPage);
}
}
COM: <s> sets the current page </s>
|
funcom_train/17206347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void headOverflow(int arity) {
if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(arity == queue.getArity());
if (head.NE(Deque.HEAD_INITIAL_VALUE))
closeAndInsertHead(arity);
head = queue.alloc();
Plan.checkForAsyncCollection(); // possible side-effect of alloc()
}
COM: <s> buffer space has been exhausted allocate a new buffer and enqueue </s>
|
funcom_train/42570907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLabelElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_StaticTextTransformator_labelElement_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_StaticTextTransformator_labelElement_feature",
"_UI_StaticTextTransformator_type"),
DescPackage.Literals.STATIC_TEXT_TRANSFORMATOR__LABEL_ELEMENT,
true, false, true, null, null, null));
}
COM: <s> this adds a property descriptor for the label element feature </s>
|
funcom_train/20504267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
eventsCalendarMockControl = MockControl.createControl(EventsCalendar.class);
eventsCalendarMock = (EventsCalendar)eventsCalendarMockControl.getMock();
listShowsController = new ListShowsController();
listShowsController.setEventsCalendar(eventsCalendarMock);
listShowsController.setViewName("viewName");
}
COM: <s> setting up the test initializing the controller and the services mocks </s>
|
funcom_train/36679646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasBeenClickedOn(int x, int y) {
float xLimit = position.x + anim.getCurrentFrame().getWidth();
float yLimit = position.y + anim.getCurrentFrame().getHeight();
return ((x >= position.x) && (x <= xLimit)) && ((y >= position.y) && (y <= yLimit));
}
COM: <s> returns true if x and y is within the sprite </s>
|
funcom_train/1151322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSimpleBinary(String defName, String otherName) {
return
(dcs == Suite.DCS.Fixed || dcs == Suite.DCS.Bounded) &&
claCount()==2 &&
getDefaultCla() != null &&
getCla(otherName)!=null &&
getCla(defName)==getDefaultCla() &&
getLeftoversCla() == null; // leftovers not allowed, as per DL (2009-05-12 msg)
}
COM: <s> is this is a binary discrimination with these two particular </s>
|
funcom_train/3294698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(String wizardname, String dataid, Cloud cloud) throws WizardException, SecurityException {
// initialize database connector
dbconn = new WizardDatabaseConnector();
dbconn.setUserInfo(cloud);
// add username to variables
variables.put("username", cloud.getUser().getIdentifier());
// actually load the wizard
loadWizard(wizardname, dataid);
}
COM: <s> creates a connection to mmbase using a </s>
|
funcom_train/3003194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectInput() {
Component c = XPontusComponentsUtils.getTopComponent()
.getDisplayComponent();
int rep = chooser.showOpenDialog(c);
if (rep == JFileChooser.APPROVE_OPTION) {
try {
String path = chooser.getSelectedFile().getAbsolutePath();
view.getModel().setInput(path);
} catch (Exception e) {
e.printStackTrace();
}
}
}
COM: <s> select an input file </s>
|
funcom_train/2585749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetStartValue3() {
TaskSeriesCollection c = new TaskSeriesCollection();
TaskSeries s = new TaskSeries("Series 1");
s.add(new Task("Task with null duration", null));
c.add(s);
Number millis = c.getStartValue("Series 1", "Task with null duration");
assertTrue(millis == null);
}
COM: <s> a check for a null task duration </s>
|
funcom_train/14025836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifySources(final Object dest, final String destProperty) {
// Do nothing if the destination property is not bound.
if (_bindings.containsKey(destProperty)) {
SourceEntry se = _bindings.get(destProperty);
setBeanProperty(dest, destProperty, se.getSource(), se.getProperty());
}
}
COM: <s> helper method that informs bind sources if any that the </s>
|
funcom_train/18366425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exitPaperHarbourAdmin() {
/*Disconnect from database*/
try {
if(loggedIn == true){
STGlobal.getAuditTrail().logRecord(STAuditTrail.PHA_LOGOUT,
STGlobal.getSecurityHandler().
getCurrentUser().getUserName());
STGlobal.getServerInterface().disconnectFromServer();
}
}
catch (STException ex) {
ex.showError();
}
SQLHandler.closeDatabase();
System.exit(0);
}
COM: <s> this function makes sure that the paper harbour admin exits cleanly </s>
|
funcom_train/1958659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() {
nodes = new Document(new Element("nodes", VerinecNamespaces.NS_NODE));
nodes.getRootElement().setAttribute(VerinecNamespaces.getSchemaLocationAttribute());
//create empty network
networks = new Element("networks", VerinecNamespaces.NS_NETWORK);
networks.setAttribute(VerinecNamespaces.getSchemaLocationAttribute());
networks.addContent(new Element("physical", VerinecNamespaces.NS_NETWORK));
networks.addContent(new Element("logical", VerinecNamespaces.NS_NETWORK));
}
COM: <s> initialise the nodes and networks variables with empty xml </s>
|
funcom_train/5460938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(InputStream input) throws IOException {
tokenHandler.startDocument();
int b = input.read();
while (b != -1) {
if (b == LESS_THEN) {
b = readTag(input);
}
else {
b = readText(input, b);
}
}
tokenHandler.endDocument();
}
COM: <s> reads the entire contents of the supplied stream and tokenizes it </s>
|
funcom_train/45243921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldFracaoSitiosInvariantesKimura() {
if (jNumberFloatFieldFracaoSitiosInvariantesKimura == null) {
jNumberFloatFieldFracaoSitiosInvariantesKimura = new JNumberFloatField();
jNumberFloatFieldFracaoSitiosInvariantesKimura.setLocation(new Point(240, 279));
jNumberFloatFieldFracaoSitiosInvariantesKimura.setSize(new Dimension(65, 20));
}
return jNumberFloatFieldFracaoSitiosInvariantesKimura;
}
COM: <s> this method initializes j number float field fracao sitios invariantes kimura </s>
|
funcom_train/39973851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vec3D interpolateTo(Vec3D v, float f, InterpolateStrategy s) {
return new Vec3D(s.interpolate(x, v.x, f), s.interpolate(y, v.y, f), s
.interpolate(z, v.z, f));
}
COM: <s> interpolates the vector towards the given target vector using the given </s>
|
funcom_train/40924327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean onOptionsItemSelected(MenuItem item) {
if(image == null) return true;
switch (item.getItemId()) {
case ZOOM_IN:
image.zoomIn();
break;
case ZOOM_OUT:
image.zoomOut();
break;
case FOCUS:
image.autoFocus();
break;
default:
return false;
}
return true;
}
COM: <s> handles item selections </s>
|
funcom_train/18587762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateBasesAndCoastWatchers() {
if (null != peer) {
peer.setBasesAndCoastWatchers(map.getActiveAmericanCoastWatchers(),
map.getActiveJapaneseCoastWatchers(),
map.getAirBases(),
map.getActiveAirBases());
}
}
COM: <s> the bases and the coast watchers have been updated send them to peer </s>
|
funcom_train/49262640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getIdentifier() {
StringBuilder sb = new StringBuilder();
int[] rgb = getRgb();
sb.append(rgb[0]);
sb.append(';');
sb.append(rgb[1]);
sb.append(';');
sb.append(rgb[2]);
sb.append(';');
if (isBold()) {
sb.append("bold"); //$NON-NLS-1$
}
if (isBold() && isItalic()) {
sb.append('&');
}
if (isItalic()) {
sb.append("italic"); //$NON-NLS-1$
}
if (!isBold() && !isItalic()) {
sb.append("none"); //$NON-NLS-1$
}
return sb.toString();
}
COM: <s> creates a string identifier from the receiver </s>
|
funcom_train/20871865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void subscribe(Class<?> clazz, VetoListener listener) {
synchronized (vetoListenersForClass) {
Set<VetoListener> set = vetoListenersForClass.get(clazz);
if (set == null) {
set = new HashSet<VetoListener>();
vetoListenersForClass.put(clazz, set);
}
set.add(listener);
}
if (log.isInfoEnabled())
log.info("added veto listener to class [" + clazz + "]: " + listener);
}
COM: <s> subscribes the veto listener to all events published on this event bus </s>
|
funcom_train/41283566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finderAction(String action,String identifier,boolean recursive){
// System.out.println(action+" "+identifier);
if (working_rep.compareTo(ROOT_REP) == 0){
System.out.println(working_rep);
tryAction (action, working_rep, identifier,recursive,1);
} else {
RepositoryFinder rf = (RepositoryFinder)rep_stack.peek();
System.out.println(working_rep);
tryAction (action, rf.getRep(), identifier,recursive,1);
}
}
COM: <s> execute an action on the store </s>
|
funcom_train/51274344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cookie_remove() throws Exception {
driver.get(executionpath + "/test/test.html");
executeNewScript("b:setCookie('cookie-01','cookie-value-01')");
String value = executeNewScript("b:getCookie('cookie-01')");
Assert.assertEquals("cookie-value-01", value);
//remove the cookie
executeNewScript("b:removeCookie('cookie-01')");
value = executeNewScript("b:getCookie('cookie-01')");
Assert.assertEquals("", value);
}
COM: <s> test the b set cookie and b remove cookie functions </s>
|
funcom_train/10010499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double cumulativeNormalDistribution(double z) {
assert z >= 0.0;
double t = 1.0 / (1.0 + 0.2316419 * z);
double pd = 1.0 - 0.3989423 * Math.exp(-z * z / 2.0) *
((((1.330274429 * t - 1.821255978) * t
+ 1.781477937) * t - 0.356563782) * t + 0.319381530) * t;
return pd;
}
COM: <s> calculates value of normal distribution for given z position z 0 </s>
|
funcom_train/5409917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPathAttribute(String[] xpath) {
int depth = 0;
Element cur = this;
while (depth < xpath.length - 1 && cur != null)
cur = cur.getOptionalElement(xpath[depth++]);
return (cur == null ? null : cur.getAttribute(xpath[depth], null));
}
COM: <s> return the attribute value that is at the specified path or null if </s>
|
funcom_train/40018060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPlace(Place place) {
places.put(place.id(), place);
place.setContainer(this);
inputs.put(place, new ArrayList<Transition>());
preTransitions.put(place, new ArrayList<Transition>());
marking.put(place, 0);
}
COM: <s> add a new place to the petri net </s>
|
funcom_train/24463378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConfigurationBuilder iterations(int iterations) {
log.debug("iterations: entering with iterations=[" + iterations + "].");
if (iterations < 1) {
log.debug("iterations: Iterations must be at least 1. Throw IllegalArgumentException.");
throw new IllegalArgumentException("Iterations must be at least 1.");
}
this.iterations = iterations;
log.debug("iterations: exiting returning [" + this + "].");
return this;
}
COM: <s> set the number of times a type should be tested </s>
|
funcom_train/5587752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParentRoot getChild(String childName) {
ClassifierUnit cu = getElement().getClassifierUnit();
if (!cu.hasApplication("Children")) {
throw new IllegalArgumentException("no element with this name: "
+ childName);
}
Children children = (Children) cu.getApplication("Children");
Link link = (Link) children.getApplication(childName);
RootElement childElement = (RootElement) link.resolveElement();
return (ParentRoot) childElement.getApplication();
}
COM: <s> returns the child </s>
|
funcom_train/4805243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ElementsOrAttributes toElementsOrAttributes(String value, ElementsOrAttributes defaultValue) {
if (value == null)
return defaultValue;
ElementsOrAttributes eoa = ElementsOrAttributes.NEITHER;
if (value.indexOf("elements") >= 0)
eoa = eoa.addElements();
if (value.indexOf("attributes") >= 0)
eoa = eoa.addAttributes();
return eoa;
}
COM: <s> get an elements or attributes instance depending on the match attribute value </s>
|
funcom_train/26208034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processForAttrEd(FzyAttribute fa) {
infosapient.ui.InfoSapientAttributeEditor sae = null;
currentAttribute = fa;
if (!(currentAttribute instanceof FzyAttribute))
sae = new infosapient.ui.InfoSapientAttributeEditor(this);
else
sae = new infosapient.ui.InfoSapientAttributeEditor(this, currentAttribute);
sae.setVisible(true);
}
COM: <s> create a new window based on the attribute provided </s>
|
funcom_train/49009157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton2() {
if (jButton2 == null) {
jButton2 = new JButton();
jButton2.setText("连续图片分割");
jButton2.setActionCommand("连续图片分割");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ContinueSplitFilter generator = new ContinueSplitFilter();
splitPerform(generator);
}
});
}
return jButton2;
}
COM: <s> this method initializes j button2 </s>
|
funcom_train/7714293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void advertiseName() {
if (this.mName != null) {
logOutput("Broadcasting name = " + this.mName, DEBUG_NAME);
Packet packet = new Packet(Packet.BROADCAST_ADDRESS, this.mAddr,
Packet.MAX_TTL, Protocol.NAME_PKT, mSequenceNumber++,
Utility.stringToByteArray(this.mName));
send(Packet.BROADCAST_ADDRESS, packet);
}
}
COM: <s> broadcasts name to other nodes on network </s>
|
funcom_train/18057333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JList getTopMapList() {
if (topMapList == null) {
topMapList = new JList();
topMapList.setBounds(new Rectangle(8, 24, 113, 113));
topMapList.setBounds(new java.awt.Rectangle(8, 20, 113, 143));
}
return topMapList;
}
COM: <s> this method initializes top map list </s>
|
funcom_train/28702923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasProfile(Profile profile) {
for (Iterator iterator = getCourseToProfiles().iterator(); iterator
.hasNext();) {
CourseToProfile courseToProfile = (CourseToProfile) iterator.next();
if (courseToProfile.getProfile().getId().equals(profile.getId())) {
return true;
}
}
return false;
}
COM: <s> checks if the specified profile is already assigned </s>
|
funcom_train/35276794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateNormals() {
if (needToRecalculateNormals()) {
//TODO background-thread this if it ends up being expensive
fixNormals(affectedAreaBBox); // the affected patches
fixNormalEdges(affectedAreaBBox); // the edges between the patches
setNormalRecalcNeeded(null); // set to false
}
}
COM: <s> update the normals if there were any height changes recently </s>
|
funcom_train/8640030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteRow(int rowNumber) {
if (rowNumber < 0 || rowNumber >= rows.size()) {
return false;
}
if (totalWidth > 0) {
PdfPRow row = (PdfPRow)rows.get(rowNumber);
if (row != null)
totalHeight -= row.getMaxHeights();
}
rows.remove(rowNumber);
return true;
}
COM: <s> deletes a row from the table </s>
|
funcom_train/36108501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while(true)try{
ObjectEvent event = readEvent();//sleep() here
if(event==null){//can be?
Thread.yield();
//Thread.sleep(100);
continue;
}
fireObjectEvent(event);
}catch(IOException e){
if(ioFailed(e))continue;
if(reconnect())continue;
removeObjectEventListener(getListener());
return;
}catch(Exception e){
//}catch(ClassCastException e){
//}catch(InterruptedException e){
e.printStackTrace(System.err);
removeObjectEventListener(getListener());//we will be removed by listener too, if it is source
return;
}
}
COM: <s> for reading thread </s>
|
funcom_train/3157302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCompatibleBitmaskTerm(BitmaskTerm term) {
if (term != null) {
String[] termFlags = term.getReferencedFlagNames();
String[] productFlags = getAllFlagNames();
for (int i = 0; i < termFlags.length; i++) {
if (!StringUtils.containsIgnoreCase(productFlags, termFlags[i])) {
return false;
}
}
}
return true;
}
COM: <s> checks whether or not the given bitmask term is compatible with this product </s>
|
funcom_train/41737538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getExitBtn() {
if (exitBtn == null) {
exitBtn = new JButton();
exitBtn.setText("");
exitBtn.setIcon(new ImageIcon(getClass().getResource("/icon/gexing_002.png")));
exitBtn.setToolTipText("Exit Game");
exitBtn.setPreferredSize(new Dimension(70, 70));
exitBtn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.exit(0);
}
});
}
return exitBtn;
}
COM: <s> this method initializes exit btn </s>
|
funcom_train/7647099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkListen(int port) {
if (port == 0) {
checkPermission(new SocketPermission("localhost:1024-", "listen")); //$NON-NLS-1$ //$NON-NLS-2$
} else {
checkPermission(new SocketPermission("localhost:" + port, "listen")); //$NON-NLS-1$//$NON-NLS-2$
}
}
COM: <s> checks whether the calling thread is allowed to listen on the specified </s>
|
funcom_train/9163030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitCatchBlock(CatchBlock c) {
Type exception = manager.toType(unit, c.getType());
if (Identifiers.isQualified(c.getIdentifier())) {
reporter.error(BAD_CATCH_NAME, c.getPlace(), c.getIdentifier());
}
if (!exception.canAssignTo(manager.getBall())) {
reporter.error(BAD_CATCH, c.getPlace(), exception.toString());
}
}
COM: <s> checks the given catch block for validity </s>
|
funcom_train/9558568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listVms() throws MonitorException, URISyntaxException {
for (VirtualMachineInfo virtualMachineInfo : virtualMachines) {
if (virtualMachineInfo.getDisplayName() != null
&& virtualMachineInfo.getDisplayName().startsWith(
JmxAttach.class.getName())) {
continue;
}
printVirtualMachineInfo(virtualMachineInfo);
System.out.println();
}
}
COM: <s> list the virtual machines on stdout </s>
|
funcom_train/18026214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void turnOffConsoleHandlers() {
System.err.println("turning off default log, look for messages in console tab.");
for (Handler h : Logger.getLogger("").getHandlers()) {
if (h instanceof ConsoleHandler) {
h.setLevel(Level.OFF);
}
}
}
COM: <s> iterate through the handlers looking for console handlers and turning </s>
|
funcom_train/5776413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showError(String msg, String caption) {
Object[] options = {"OK"};
JOptionPane.showOptionDialog(LanguageFileAdmin.this,
msg,
caption,
JOptionPane.OK_OPTION,
JOptionPane.ERROR_MESSAGE,
null,
options,
options[0]);
}
COM: <s> displays a curstom error message </s>
|
funcom_train/44627950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testHarness8() {
helpFailure("Number of start/end locations (1) should be double the number of tokens (2)",
"A",new Enum<?>[]{IDENTIFIER,EOF},new int[]{0},0);
}
COM: <s> this tests that the test harness fails if too few positions are given </s>
|
funcom_train/50911079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntMatrix getIntMatrix() {
IntMatrix im = new IntMatrix(rows, cols);
int[][] matrix = im.getMatrix();
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
matrix[i][j] = (int) flmat[i][j];
}
}
return im;
}
COM: <s> constructs an int matrix </s>
|
funcom_train/13988702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doParse(InputStream is) throws SAXException, IOException {
String inputData = "", line;
BufferedReader b = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
InputSource inputSource;
line = b.readLine();
while (line != null) {
inputData += line + "\n";
line = b.readLine();
}
LOG.debug("Input Data:\n" + inputData);
inputSource = new InputSource(new StringReader(inputData));
doParse(inputSource);
}
COM: <s> does dtd based validation on an input stream </s>
|
funcom_train/31292303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getVariable(final String name, final Scriptable scope) {
if (scope.has(name, scope)) {
return scope.get(name, scope);
}
final Scriptable parent = scope.getParentScope();
if (parent == null) {
return null;
}
return getVariable(name, parent);
}
COM: <s> traverse the scope stack and retrieve the value of the variable </s>
|
funcom_train/16428199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void transmitIdle() throws IOException {
PacketBodyBuffer body = new PacketBodyBuffer();
body.addElement("1", loginID.getId()); // FIX: Should this be primary?
body.addElement("0", primaryID.getId());
sendPacket(body, ServiceType.IDLE); // 0x05
}
COM: <s> transmit an idle packet </s>
|
funcom_train/12195031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor() throws Exception {
SQLState ab = new SQLState("AB", 10);
SQLState abcde = new SQLState("ABCDE", 25);
assertSame("Should have found instance ab",
ab,
SQLState.instance("AB"));
assertSame("Should have found instance abcde",
abcde,
SQLState.instance("ABCDE"));
ab.kill();
abcde.kill();
}
COM: <s> tests success conditions </s>
|
funcom_train/20385811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String msg = getMessage();
if (msg == null && getCause() != null) {
msg = getCause().getMessage();
}
if (location != null) {
if (msg != null) {
return msg + " - " + location.toString();
} else {
return location.toString();
}
} else {
return msg;
}
}
COM: <s> returns a short description of this throwable object including the </s>
|
funcom_train/25085565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeNode getOrCreateNode(String searchName, String positionName) {
TreeNode child = getNode(searchName);
if (child == null) {
TreeNode parent = null;
if (positionName == null) {
parent = this;
} else {
parent = getNode(positionName);
if (parent == null)
parent = this;
}
child = new TreeNode();
child.setName(searchName);
parent.getChildren().add(child);
}
return child;
}
COM: <s> searches through the tree for the given node names </s>
|
funcom_train/29954564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetHbParam() {
System.out.println("setHbParam");
HBParamObject hbParam = new HBParamObject();
ParametersSetObject instance = new ParametersSetObject();
instance.setHbParam(hbParam);
HBParamObject result = instance.getHbParam();
System.out.println(result);
assertEquals(hbParam, result);
}
COM: <s> test of set hb param method of class hbm </s>
|
funcom_train/10268262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ArrayList getTitlesFromList(ArrayList list) {
ArrayList result = new ArrayList() ;
AdministrationTask task ;
Iterator itr = list.iterator();
if (itr != null) {
while (itr.hasNext()) {
task = (AdministrationTask) itr.next() ;
result.add(task.getTitle());
}
}
if (result.isEmpty()) result = null ; // return null if no matches
return result ;
}
COM: <s> retrieves a list of titles from the list of tasks passed </s>
|
funcom_train/6227172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getFile() {
if(fileHasBeenSet) return file;
fileHasBeenSet = true;
if(!isFile()) return null; // file stays null
try {
file = new File(uri);
}
catch(IllegalArgumentException ex) {
System.err.println(getClass().getName() + ".getFile() " + ex.toString());
System.err.println("URI=" + uri + "\nURL=" + url);
}
return file;
}
COM: <s> returns the theme file or code null code </s>
|
funcom_train/48401321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getFirstRowOnPageY(int pageY) {
int rowsPerPage = pageArea.height / (int)(rowHeight * zoom);
int firstRow = rowsPerPage * pageY - 1; // Subract 1 for header row
firstRow = firstRow < 0 ? 0 : firstRow;
firstRow = firstRow > getRowCount() ? getRowCount() : firstRow;
return firstRow;
}
COM: <s> calculates the first row number to appear on </s>
|
funcom_train/4362558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int open(MsgContext ep) throws IOException {
// Will associate a jk_endpoint with ep and call open() on it.
// jk_channel_un will accept a connection and set the socket info
// in the endpoint. MsgContext will represent an active connection.
return super.nativeDispatch( ep.getMsg(0), ep, CH_OPEN, 1 );
}
COM: <s> open a connection since were listening that will block in </s>
|
funcom_train/41765785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) {
g.drawArc(xTranslate + x, yTranslate + y, width, height, startAngle, arcAngle);
}
COM: <s> draws a circular or eliptical arc based on the given angles and bounding </s>
|
funcom_train/41302787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(double newx, double newy) {
double minx = Math.min(getX(), newx);
double maxx = Math.max(getMaxX(), newx);
double miny = Math.min(getY(), newy);
double maxy = Math.max(getMaxY(), newy);
setRect(minx, miny, maxx - minx, maxy - miny);
}
COM: <s> modifies this rectangle so that it represents the smallest rectangle </s>
|
funcom_train/32068322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeEmailMessage(EmailMessage emailMessage) {
boolean removedOK = getEmailMessages().remove(emailMessage);
if (removedOK) {
emailMessage.setEmailMessageStatus(null);
} else {
if (logger.isWarnEnabled()) {
logger.warn("remove returned false");
}
}
return removedOK;
}
COM: <s> remove the passed email message from the email message status collection and unset </s>
|
funcom_train/43261060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getLogOutCommand() {
if (logOutCommand == null) {//GEN-END:|131-getter|0|131-preInit
// write pre-init user code here
logOutCommand = new Command("Kirjaudu ulos", Command.EXIT, 0);//GEN-LINE:|131-getter|1|131-postInit
// write post-init user code here
}//GEN-BEGIN:|131-getter|2|
return logOutCommand;
}
COM: <s> returns an initiliazed instance of log out command component </s>
|
funcom_train/19370393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RDFLiteralNode createLiteralNodeWithLanguage(final String spec, final String language){
if (literals.containsKey(spec)){
return literals.get(spec);
}
else{
RDFLiteralNode check = new RDFLiteralNode(spec,language);
literals.put(spec,check);
return check;
}
}
COM: <s> creates a string literal with a language tag </s>
|
funcom_train/43100556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doResetFields(boolean complete) {
if (complete) {
elementName.removeAllItems();
diagramName.removeAllItems();
elementName.addItem("*");
diagramName.addItem("*");
}
location.removeAllItems();
location.addItem(
Translator.localize("dialog.find.comboboxitem.entire-project"));
}
COM: <s> reset the fields </s>
|
funcom_train/1448698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String updateAdditionalCategories() throws Exception{
if (logger.isDebugEnabled()) {
logger.debug("updateAdditionalCategories() - start"); //$NON-NLS-1$
}
for (AdditionalCategories additionalCategories : this.additionalCategoriesMap.values()) {
AdditionalCategoriesServiceDelegator.updateAdditionalCategories(additionalCategories);
}
if (logger.isDebugEnabled()) {
logger.debug("updateAdditionalCategories() - end"); //$NON-NLS-1$
}
return SUCCESS;
}
COM: <s> update additional categories </s>
|
funcom_train/3915259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRelativePath3() {
File rootFolder = new File("/rootfolder");
File file = new File("/anotherfolder/dir/file.txt");
String path = FileUtils.getRelativePath(rootFolder, file);
assertTrue("Absolute Path is wrong: " + path, path.startsWith("/"));
}
COM: <s> test for absolute path </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.