__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46577719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireActionPerformed(ActionEvent event) {
DateChooserDialog dialog = dateChooser.getDialog();
if (component == null) {
component = this;
}
Date newDate = dialog.select(date, component);
if (dialog.cancelled()) {
return;
}
setDate(newDate);
}
COM: <s> called when the button is clicked in order to fire an </s>
|
funcom_train/45622911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNoConfigPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CscType_noConfig_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CscType_noConfig_feature", "_UI_CscType_type"),
MSBPackage.eINSTANCE.getCscType_NoConfig(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the no config feature </s>
|
funcom_train/15607582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlignerSequence(Sequence alignerSequence) {
// Whose sequence is passed in, an a subsequence is extracted from it.
this.alignerSequence = new SubSequence(alignerSequence,
Math.min(startOnAxis, endOnAxis),
Math.max(startOnAxis, endOnAxis));
} // End method: setAlignerSequence
COM: <s> sets a default dna sequence to be used in case the </s>
|
funcom_train/4205711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeColumn(Object columnID) {
if (Activator.getDefault().TRACE_SOURCE_MODEL) {
LogUtils.debug(getModel(), "Model[" + getGrid().hashCode() + "]: removeColumn(" + columnID + ")");
}
final IGridBindingColumnInformation column = getColumns().get(columnID);
column.dispose();
getContext().reflow();
}
COM: <s> removes an existing column </s>
|
funcom_train/14092868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmptyTitle() {
FrameFinder finder = new FrameFinder("");
JLabel label = new JLabel("Some Text");
JFrame frame = createJFrame(getName());
frame.getContentPane().add(label);
packAndShow(frame);
setWindow(frame);
assertTrue("Finder is not working", finder.testComponent(frame));
}
COM: <s> tests the test component method for empty title </s>
|
funcom_train/46477881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAppliesToPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Clause_AppliesTo_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Clause_AppliesTo_feature", "_UI_Clause_type"),
SecurityContextPackage.Literals.CLAUSE__APPLIES_TO,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the applies to feature </s>
|
funcom_train/20824112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRGB(final int r, final int g, final int b) {
assertArgument(r, PROPERTY_RED);
assertArgument(g, PROPERTY_GREEN);
assertArgument(b, PROPERTY_BLUE);
if (red != r || green != g || blue != b) {
float[] hsb = new float[3];
Color.RGBtoHSB(r, g, b, hsb);
setHSB(hsb[0],hsb[1],hsb[2]);
}
}
COM: <s> sets the selected color using red green and blue values </s>
|
funcom_train/20582192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getClassFilterSuccessors() {
List result = super.getSuccessors();
if (result.size() != 0) {
List aux = new ArrayList();
result = (List) result.get(0);
for (Iterator i = result.iterator(); i.hasNext(); ) {
aux.add( ((PairIntReteNode) i.next()).getNode() );
}
return aux;
} else {
return result;
}
}
COM: <s> returns the successors of this node </s>
|
funcom_train/29029910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLineChartData(List<? extends LineChartData> data) {
if (data == null) {
throw new IllegalArgumentException("data can not be null");
} else {
for (LineChartData temp : Collections.unmodifiableCollection(data)) {
if (temp == null)
throw new IllegalArgumentException("value can not be null");
}
this.data.addAll(Collections.unmodifiableList(data));
}
}
COM: <s> the list will be merged </s>
|
funcom_train/40853511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spacer getSpacer() {
if (spacer == null) {//GEN-END:|50-getter|0|50-preInit
// write pre-init user code here
spacer = new Spacer(16, 1);//GEN-LINE:|50-getter|1|50-postInit
// write post-init user code here
}//GEN-BEGIN:|50-getter|2|
return spacer;
}
COM: <s> returns an initiliazed instance of spacer component </s>
|
funcom_train/42875309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object apply(List<Object> args) throws WrongArgumentCountException {
checkArgs("make", args, 1);
Class<?> classToMake;
try {
classToMake = Class.forName((String) args.get(0));
return classToMake.newInstance();
} catch (Exception e) {
return LispBoolean.falseValue;
}
}
COM: <s> processes i make i expression </s>
|
funcom_train/17962165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createLines(final int count) {
Line2D line = new Line2D.Double();
for (int i = 0; i < count; i++) {
line = new Line2D.Double(1.0, 1.0, 1.0, 1.0);
}
System.out.println(line.toString());
}
COM: <s> creates lines in a loop </s>
|
funcom_train/9579886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHappyPath() {
// Example system-Config
System.setProperty("org/settings4j/helper/spring/test1", "Hallo World");
// load the example Spring-Config
final Map result = (Map) getObjectFromSpringConfig(//
"org/settings4j/helper/spring/Settings4jPlaceholderConfigurerHappyPath");
// validate Result
assertEquals("Hallo World", result.get("MapEntry1"));
}
COM: <s> test case for the normal use case in spring configuration </s>
|
funcom_train/18029918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Units getUnits(int index) {
if ( this.units[index]==Units.dimensionless && this.fieldUnits[index]!=null && this.fieldUnits[index].length()>0 ) {
return SemanticOps.lookupUnits( this.fieldUnits[index] );
} else {
return this.units[index];
}
}
COM: <s> indexed getter for property units </s>
|
funcom_train/34564016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void focus(final int pre, final View vw) {
if(gui.context.focused == pre) return;
gui.context.focused = pre;
for(final View v : view) if(v != vw && v.visible()) v.refreshFocus();
if(pre != -1) gui.status.setPath(ViewData.path(gui.context.data, pre));
}
COM: <s> notifies all views of a focus change </s>
|
funcom_train/48107414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while(true){
setOrientation( orientation );
counter = 0;
orientation += servoTurn;
if( orientation >= 0.70f )
servoTurn = -0.02f;
if( orientation <= 0.30f )
servoTurn = 0.02f;
//}
counter++;
try {
Thread.sleep(150);
} catch (InterruptedException e) {
//We've been interrupted: exit the thread
return;
}
}
COM: <s> the run function for the thread </s>
|
funcom_train/2022813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTabTitle(int index, String title, boolean changed) {
String titleNow;
titleNow = tabbedPane.getTitleAt(index);
if (changed && (titleNow.equals(title)))
tabbedPane.setTitleAt(index, title + " *");
else if (!changed && (!titleNow.equals(title)))
tabbedPane.setTitleAt(index, title);
}
COM: <s> sets the after the tab title if the tab is changed </s>
|
funcom_train/5322167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Object gizmo, Class group, Entity owner, long prio) throws ClassCastException {
if (group.isInstance(gizmo)) {
set.add(new GizmoElement(gizmo, group, owner, prio));
} else {
throw new ClassCastException();
}
}
COM: <s> adds a new gizmo to the list </s>
|
funcom_train/5395497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCompress() throws Exception {
System.out.println("compress");
InputStream is = null;
OutputStream os = null;
int level = 0;
DataCompressor instance = null;
instance.compress(is, os, level);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of compress method of class org </s>
|
funcom_train/23696233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getNumberTerminal5TA(int pos1, int pos2){
double number5TA = 0;
BasePair firstTerminalBasePair = duplex.get(pos1);
BasePair lastTerminalBasePair = duplex.get(pos2);
if (firstTerminalBasePair.isBasePairStrictlyEqualTo("T", "A")){
number5TA ++;
}
if (lastTerminalBasePair.isBasePairStrictlyEqualTo("A", "T")){
number5TA ++;
}
return number5TA;
}
COM: <s> calculates the number of terminal 5t3a in the subduplex between pos1 and pos2 </s>
|
funcom_train/44657662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JComponent createFormControl() {
TableFormBuilder formBuilder = new TableFormBuilder( getBindingFactory() );
usernameField = formBuilder.add( LoginDetails.PROPERTY_USERNAME )[1];
formBuilder.row();
passwordField = formBuilder.addPasswordField( LoginDetails.PROPERTY_PASSWORD )[1];
return formBuilder.getForm();
}
COM: <s> construct the form with the username and password fields </s>
|
funcom_train/18434569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(TaskSeries series) {
if (series == null) {
throw new IllegalArgumentException("Null 'series' argument.");
}
if (this.data.contains(series)) {
series.removeChangeListener(this);
this.data.remove(series);
fireDatasetChanged(new DatasetChangeInfo());
//TODO: fill in real change info
}
}
COM: <s> removes a series from the collection and sends </s>
|
funcom_train/8126274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeSessionRegistry(HttpSessionEvent event) {
HttpSession session = event.getSession();
try {
SessionRegistry sessionRegistry = (SessionRegistry)BeanFactory.getBean("sessionRegistry");
sessionRegistry.removeSessionInformation(session.getId());
} catch (BeansException e) {
logger.error("get SessionRegistry bean error,make sure bean name 'sessionRegistryImpl' exists", e);
}
}
COM: <s> romove session in session registry </s>
|
funcom_train/5573764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createComponentTab() {
TabItem componentTabItem = new TabItem(tabFolder, SWT.BORDER);
componentTabItem.setImage(null);
Composite componentTabComposite = new Composite(tabFolder, SWT.NONE);
componentTabItem.setControl(componentTabComposite);
componentTabItem.setText("Component");
label = new Label(componentTabComposite, SWT.CENTER);
label.setBounds(new org.eclipse.swt.graphics.Rectangle(8, 5, 435, 19));
label.setText("This will be the component pane");
}
COM: <s> this method initializes the component tab </s>
|
funcom_train/4300041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setRecent(String s) {
for (int i = 0; i < iMaxRecent; i++) {
if (s.equals(sRecent[i])) {
return;
}
}
if (sRecent[iRecent] != null) {
choRecent.remove(sRecent[iRecent]);
}
sRecent[iRecent] = s;
iRecent = (iRecent + 1) % iMaxRecent;
choRecent.addItem(s);
}
COM: <s> adds a string to the listbox of recent commands </s>
|
funcom_train/24000713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBoundValue() throws Exception {
EvaluationContext context = new EvaluationContext();
context.define(LoopAst.iteratorVariableName(), OclObjectFactory.TRUE);
LoopVariableDeclarationAst instance = new LoopVariableDeclarationAst(-1, TokenFactory.createToken(-1), "var");
assertEquals(OclObjectFactory.TRUE,instance.getBoundValue(context));
}
COM: <s> test of get bound value method of class loop variable declaration ast </s>
|
funcom_train/48857679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void modifyMember(Member member)throws Exception{
CryptographicUtility crp = CryptographicUtility.getInstance();
member.setLastUpdated(new Date());
member.setPassword(crp.getEncryptedText(this.newPassword));
member.setSecurityQuestion1(this.getSecurityQuestion1());
member.setSecurityQuestion2(this.getSecurityQuestion2());
member.setSecurityQuestionAns1(this.getSecurityQuestionAns1());
member.setSecurityQuestionAns2(this.getSecurityQuestionAns2());
this.memberService.save(member);
}
COM: <s> update the member object with new information </s>
|
funcom_train/22560546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IMyHttpClient createHttpClient(final Request request) throws HttpException, IOException, GeneralSecurityException {
final IMyHttpClient httpClient;
if (mUseCAS)
httpClient = new CASHttpClient();
else
httpClient = new BasicHttpClient();
if ((username != null) && (password != null)) {
logger.debug("Using username: " + username + ", password: " + password);
httpClient.setCredentials(username, password);
}
return httpClient;
}
COM: <s> create a http client adding user password authentication </s>
|
funcom_train/2624726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(final PInputEvent event) {
super.mousePressed(event);
if (sequenceInitiatedButton == MouseEvent.NOBUTTON) {
sequenceInitiatedButton = event.getButton();
getMousePressedCanvasPoint().setLocation(event.getCanvasPosition());
if (!isDragging() && shouldStartDragInteraction(event)) {
startDrag(event);
}
}
}
COM: <s> subclasses should not override this method instead they should </s>
|
funcom_train/9082967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertSuccessfulApplyWaveletOperations(WaveletContainerImpl with) throws Exception {
with.applyWaveletOperations(addParticipantOps);
assertDeepEquals(with.getParticipants(), participants);
with.applyWaveletOperations(removeParticipantOps);
assertDeepEquals(with.getParticipants(), Collections.emptyList());
}
COM: <s> check that a container succeeds when adding non existent participants and removing existing </s>
|
funcom_train/37765581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void preprocess(UOW uow, AttachmentMaintenanceDeleteInDto input) throws FrameworkException, ApplicationExceptions {
// .//GEN-END:_preprocessDelete_1_be
// Add custom code //GEN-FIRST:_preprocessDelete_1
// .//GEN-LAST:_preprocessDelete_1
// .//GEN-BEGIN:_preprocessDelete_2_be
}
COM: <s> preprocess the input for the delete method </s>
|
funcom_train/5245085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ListTerm getSources() {
ListTerm ls = new ListTermImpl();
if (annots != null) {
for (Term ta : annots) {
if (ta.isStructure()) {
Structure tas = (Structure)ta;
if (tas.getFunctor().equals("source")) {
ls.add(tas.getTerm(0));
}
}
}
}
return ls;
}
COM: <s> returns the sources of this pred as a new list </s>
|
funcom_train/22431342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processRv(RecvRvEvent event) {
for (Iterator it = listeners.iterator(); it.hasNext();) {
RvSessionListener listener = (RvSessionListener) it.next();
try {
listener.handleRv(event);
} catch (Throwable t) {
handleException(ERRTYPE_RV_SESSION_LISTENER, t, listener);
}
}
}
COM: <s> handles an incoming rendezvous event passing the event to this </s>
|
funcom_train/44821496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exitForm(java.awt.event.WindowEvent evt) {
try {
( (IEditorSession) (this.getContext().get(IEditorSession.class)) ).stop();
} catch (Exception x) {
x.printStackTrace(); // If IEditorSession isn't working, what will work?
}
}
COM: <s> exit the application </s>
|
funcom_train/22547911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void measureBandwidth() {
float upstream=0.f;
float downstream=0.f;
for(ManagedConnection mc : getInitializedConnections()) {
mc.measureBandwidth();
upstream+=mc.getMeasuredUpstreamBandwidth();
downstream+=mc.getMeasuredDownstreamBandwidth();
}
_measuredUpstreamBandwidth=upstream;
_measuredDownstreamBandwidth=downstream;
}
COM: <s> takes a snapshot of the upstream and downstream bandwidth since the last </s>
|
funcom_train/5248718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void readFile(File fil, File container) {
//If the file name has a suffix indicating it is a Java Files,
if(fil.getName().lastIndexOf(ModelServiceBuilder.javaFileSuffix)!=-1) {
//Then we are going to read it as a Java File
try {
this.readJavaFile(fil, container);
} catch(IllegalArgumentException e) {
e.printStackTrace();
}
}
}
COM: <s> read a file </s>
|
funcom_train/40526573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean vetLinkToHistorySensitiveSelector(CssTree.Selector selector) {
boolean modified = false;
for (CssTree child : selector.children()) {
if (child instanceof CssTree.SimpleSelector) {
modified |= vetLinkToHistorySensitiveSimpleSelector(
(CssTree.SimpleSelector) child);
}
}
return modified;
}
COM: <s> rewrites any visited or link pseudo class elements to have element name a </s>
|
funcom_train/17455918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBadUrlDlgBtn() {
if (badUrlDlgBtn == null) {
badUrlDlgBtn = new JButton();
badUrlDlgBtn.setBounds(new Rectangle(58, 84, 120, 43));
badUrlDlgBtn.setText("OK");
badUrlDlgBtn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getBadUrlDlg().setVisible(false);
}
});
}
return badUrlDlgBtn;
}
COM: <s> this method initializes bad url dlg btn </s>
|
funcom_train/20907633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String login(){
if(userName != null && userName.trim().length()>0){
User user = DAOFactory.getUserDAO().load(userName);
if(user!=null && MD5.encrypt(password.trim().toUpperCase()).toUpperCase().equals(user.getPassword())){
this.currentUser = user;
return user.getType();
}
}
return "invalid";
}
COM: <s> login for the user </s>
|
funcom_train/8718637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void altReferencesTokenID(String ruleName, GrammarAST refAST, int outerAltNum) {
Rule r = getLocallyDefinedRule(ruleName);
if ( r==null ) {
return;
}
r.trackTokenReferenceInAlt(refAST, outerAltNum);
if ( !tokenIDRefs.contains(refAST.getToken()) ) {
tokenIDRefs.add(refAST.getToken());
}
}
COM: <s> track a token reference within an outermost alt of a rule </s>
|
funcom_train/14094095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populate(final Element e) {
super.populate(e);
e.setAttribute(JFCXMLConstants.TYPE, "JTabbedPaneMouseEventData");
e.setAttribute(JFCXMLConstants.INDEX, "" + getTabIndex());
/* @todo Only one of Index or Title is allowed.
if (getTitle() != null) {
e.setAttribute(JFCXMLConstants.TITLE, getTitle());
}*/
}
COM: <s> populate the xml element with this object attributes </s>
|
funcom_train/36957566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean validateCurrentSelection() {
Assert.isNotNull(fFilteredList);
IStatus status;
Object[] elements= getSelectedElements();
if (elements.length > 0) {
if (fValidator != null) {
status= fValidator.validate(elements);
} else {
status= new StatusInfo();
}
} else {
if (fFilteredList.isEmpty()) {
status= new StatusInfo(IStatus.ERROR, fEmptyListMessage);
} else {
status= new StatusInfo(IStatus.ERROR, fEmptySelectionMessage);
}
}
updateStatus(status);
return status.isOK();
}
COM: <s> validates the current selection and updates the status line </s>
|
funcom_train/17827565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setJobConf(Session session) {
String name = session.getVariable("jaql_jobname");
if (name != null) {
jobName.setCopy(session.expand(name));
Context context = Context.current();
try {
context.setOptions(confRecord);
}
catch (Exception e) {
session.printException(e);
}
}
}
COM: <s> attempts to configure the jaql jobname </s>
|
funcom_train/36669471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void elongateAISequence(int row, int col) {
// Generate a list of all other adjacent AI pieces.
ArrayList<Coordinates> coordList = aih.findAdjacentAIPiece(row, col);
for (int i = 0; i < coordList.size(); i++) {
Coordinates currCoord = coordList.get(i);
detSeqOrientation(row, col, currCoord.row, currCoord.col);
}
}
COM: <s> this method evaluates a found sequence of ai pieces and decides the best </s>
|
funcom_train/39383031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getColumnClass(int col){
Class c = String.class;
switch(col){
case 0: c = Integer.class; break;
case 1:
case 2:
case 3:
case 4: break;
default: throw new ArrayIndexOutOfBoundsException("Column index "+col+" is out of range");
}
return c;
}
COM: <s> returns the class of the data the given column contains </s>
|
funcom_train/20744334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void verify() throws AuthenticationException {
try {
openConnection();
verifyProtocol();
process.destroy();
}
catch (Exception e) {
String locMessage = AuthenticationException.getBundleString(
"AuthenticationException.ServerVerification"); //NOI18N
throw new AuthenticationException("Verification error", e, locMessage); //NOI18N
}
finally {
reset();
}
}
COM: <s> authenticate with the server </s>
|
funcom_train/1958577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveConfiguration(Document config) {
parseConfiguration(config);
try {
VerinecStudio.getInstance().saveConfig(configName, config);
} catch (VerinecException e) {
Logger.getLogger(getClass().getName()).warning("Could not save network types configuration.\n"+e.toString());
}
}
COM: <s> set the network types from saved configuration </s>
|
funcom_train/40312067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetColumnClassName_InvalidColumn2() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getColumnClassName(10);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getColumnClassName method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get column class name with column index equals to 0 </s>
|
funcom_train/4953493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parse(File file) throws UnitTHException {
try {
saxp.parse(file, this);
} catch (IOException ioe) {
// ioe.printStackTrace();
System.err.println("IO errors occured...");
throw new UnitTHException("IO errors occured...");
} catch (SAXException saxe) {
throw new UnitTHException("SAXException ..."+saxe.getMessage());
} catch (Exception e) {
e.printStackTrace();
System.err.println("Unknown exception...");
throw new UnitTHException("Unknown exception...");
}
}
COM: <s> this method calls the saxparser parse method </s>
|
funcom_train/17567658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel createContentPane() {
//Creates a new root panel
JPanel contentPane = new JPanel(new BorderLayout());
//Adds the Verify/Identify configurations on the upper part of the panel
contentPane.add(createVerifyIdentifyPanel(), BorderLayout.NORTH);
//Adds the color choosers in the central part of the panel
contentPane.add(createColorSelectionPanel(), BorderLayout.CENTER);
return contentPane;
}
COM: <s> creates the root pane of this dialog excluding ok cancel buttons </s>
|
funcom_train/36785682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MusicEvent (String note) throws IllegalArgumentException {
String newnote;
if (note.charAt(note.length() - 1) == '-') {
duration = 400;
newnote = note.substring(0, note.length() - 1);
} else {
duration = 200;
newnote = note;
}
if (newnote.toLowerCase().equals("r")) {
this.type = EventType.REST;
this.n = null;
} else {
this.type = EventType.NOTE;
this.n = Note.parseNoteString(newnote);
}
}
COM: <s> constructs a code event code from a code string code </s>
|
funcom_train/28763278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVariableDefinitionId(java.lang.String value) throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value);
mInternal.setProperty(ii_VariableDefinitionId, jj_VariableDefinitionId,kk_VariableDefinitionId, com.intersys.objects.Database.RET_PRIM, "VariableDefinitionId", dh);
return;
}
COM: <s> sets new value for code variable definition id code </s>
|
funcom_train/29781448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initDexIndex() {
hasDexs = new TreeMap<String, DexlibDex>();
hasCapabilities = new TreeMap<String, DexlibCapability>();
hasTemplates = new TreeMap<String, DexlibTemplate>();
hasBusinessContexts = new TreeMap<String, DexlibBusinessContext>();
}
COM: <s> initialise the tree maps that stoes all the parts in dexlib </s>
|
funcom_train/29395322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InferenceRule getRule(int i) {
InferenceRule firstrule = rules.get(i);
if (firstrule.id == i) {
return firstrule;
}
out.println("Id " + i + " doesn't match id " + firstrule.id + ": " + firstrule);
for (InferenceRule rule : rules) {
if (rule.id == i) {
return rule;
}
}
return null;
}
COM: <s> returns the ith rule </s>
|
funcom_train/4450119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initConnection(final Connection conn) throws NullPointerException, SQLException {
if ( conn == null ) throw new NullPointerException();
// reset quoted identifier
Statement stmt = conn.createStatement();
logger.info("Executing query 'sql_mode=''' ");
stmt.executeUpdate("SET sql_mode=''");
this.checkForWarning(stmt);
logger.info("done.");
}
COM: <s> initialize connection run driver specific code </s>
|
funcom_train/37036599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedReader getReader() throws IOException {
if (stream != null)
throw new IllegalStateException
(sm.getString("requestBase.getReader.ise"));
if (reader == null) {
String encoding = getCharacterEncoding();
if (encoding == null)
encoding = "ISO-8859-1";
InputStreamReader isr =
new InputStreamReader(createInputStream(), encoding);
reader = new BufferedReader(isr);
}
return (reader);
}
COM: <s> read the reader wrapping the input stream for this request </s>
|
funcom_train/41717691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processPaletteExpressionAdded(Expression expression) {
ExpressionPanel expressionPanel =
new ExpressionPanel(expression, shapePlotter);
PlaceHolder<ExpressionPanel> placeHolder =
new PlaceHolder<ExpressionPanel>(expressionPanel,
ExpressionPanel.class);
expressionPanel.addUpdateListener(expressionPanelUpdateListener);
placeHolder.addPlaceHolderListener(expressionPanelPlaceHolderListener);
expressionPanels.add(expressionPanel);
mainPanel.add(placeHolder);
cleanPalette();
ensureLayout();
updateSupport.fireObjectUpdated();
}
COM: <s> process the addition of the given expression to the palette </s>
|
funcom_train/47448457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getPropertyValue(final Object propertyId) {
if (XPOS_PROP.equals(propertyId))
return Integer.toString(location.x);
if (YPOS_PROP.equals(propertyId))
return Integer.toString(location.y);
if (HEIGHT_PROP.equals(propertyId))
return Integer.toString(size.height);
if (WIDTH_PROP.equals(propertyId))
return Integer.toString(size.width);
return super.getPropertyValue(propertyId);
}
COM: <s> return the property value for the given property id or null </s>
|
funcom_train/40438915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDistance(double targetLongitude, double targetLatitude) {
return units.getEarthRadius()
* Math.toDegrees(Math.acos(sinLatitude
* Math.sin(Math.toRadians(targetLatitude)) + cosLatitude
* Math.cos(Math.toRadians(targetLatitude))
* Math.cos(Math.toRadians(targetLongitude - longitude))));
}
COM: <s> returns the distance in terms of </s>
|
funcom_train/47944915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearCriteria() {
if (LOG.isDebugEnabled()) {
LOG.debug("clearCriteria() - entering");
}
if (dataset == null) {
if (LOG.isDebugEnabled()) {
LOG.debug("clearCriteria() - exiting");
}
return;
}
dataset.clearCriteria();
if (LOG.isDebugEnabled()) {
LOG.debug("clearCriteria() - exiting");
}
}
COM: <s> removes all criteria from the dataset </s>
|
funcom_train/9296645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setPreferredSize(new java.awt.Dimension(452, 250));
jScrollPane.setViewportView(getMetadataTable());
}
return jScrollPane;
}
COM: <s> this method initializes j scroll pane </s>
|
funcom_train/6485134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public Object getClientInterface(String name) {
//System.out.println("Scanning "+ this+" for client interface impl of class "+cls);
InterfaceInfo intf = (InterfaceInfo)getInterfaceInfo(name);
Object i = null;
if (intf !=null) {
if (!intf.isServer())
i = intf.getImplementation();
}
return i;
}
COM: <s> returns a client interface given its name </s>
|
funcom_train/34584931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Human getObject(long objectID) {
Human createdHuman = new Human();
if (objectID == 0) {
createdHuman.setMatrix(
AttributeCalculatorMatrixPool.getInstance().getMatrix(mapObjectIDtoMatrixIndex(objectID)));
createdHuman.setAttributes(
AttributeArrayPool.getInstance().getArray(mapObjectIDtoAttributesIndex(objectID)));
}
return createdHuman;
}
COM: <s> the method creates an instance of class human </s>
|
funcom_train/10911011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addXMLHandler(String ns, XMLHandler handler) {
List<XMLHandler> lst = handlers.get(ns);
if (lst == null) {
lst = new java.util.ArrayList<XMLHandler>();
handlers.put(ns, lst);
}
lst.add(handler);
}
COM: <s> add an xml handler for the given mime type and xml namespace </s>
|
funcom_train/43399977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Complex quotient(Complex c) {
double d = c.real*c.real+c.imag*c.imag;
double newr = (real*c.real+imag*c.imag)/d;
double newi = (imag*c.real-real*c.imag)/d;
return new Complex(newr, newi);
}
COM: <s> returns the quotient of this number by code c code </s>
|
funcom_train/17175044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddMultiFileReaderObserver() throws IOException {
MultiFileReader mfr = new MultiFileReader();
MFRObserver mfo = new MFRObserver();
mfr.addFile("src/util/test/file1.txt");
mfr.addFile("src/util/test/file1.txt");
mfr.addMultiFileReaderObserver(mfo);
String line1 = mfr.readLine();
assertEquals("line 1 of file", line1);
String line2 = mfr.readLine();
assertEquals("line 1 of file", line2);
String line3 = mfr.readLine();
assertNull(line3);
assertEquals(2, mfo.getNumCalls());
}
COM: <s> execute the multi file observer test </s>
|
funcom_train/48366386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final TrafficLightsState other = (TrafficLightsState) obj;
if (this.state != other.state) {
return false;
}
return true;
}
COM: <s> equality about the state </s>
|
funcom_train/5695569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeNode(Node oldNode) {
if (oldNode instanceof ServerNode) {
theServerNodes.remove((ServerNode)oldNode);
for (Realm re : theRealms) {
re.getTheRealmArchives().removeAll(
((ServerNode)oldNode).getTheServersArchives());
}
}
else if (oldNode instanceof ApplicationNode) {
theAppNodes.remove((ApplicationNode)oldNode);
}
oldNode.getMyHost().getNodes().remove(oldNode);
}
COM: <s> removes a node from the configuration </s>
|
funcom_train/29527596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element appendChild(Element parent, String tagName, String text) {
Element childNode = doc.createElement(tagName);
if (text != null) {
childNode.appendChild(doc.createTextNode(text));
}
parent.appendChild(childNode);
return childNode;
}
COM: <s> append a child node and a text node </s>
|
funcom_train/13502186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TripleIterator getTripleIterator(final Set<Triple> set) {
return new TripleIterator() {
private final Iterator<Triple> _iter = set.iterator();
@Override
public boolean hasNext() {
return _iter.hasNext();
}
@Override
public Triple next() {
return getLocalizedTriple(_iter.next());
}
@Override
public void close() {
}
};
}
COM: <s> gets a trippi triple iterator for the given set </s>
|
funcom_train/38293205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void encodeAndAppend(String val) {
// if the slotName is a String of words then quote it. If it is a meta (i.e. startsWith "??") do not quote it.
String out = ( (SimpleSLTokenizer.isAWord(val) || (metaAllowed && val.startsWith("??")) ) ? val : SimpleSLTokenizer.quoteString(val));
buffer.append(out);
}
COM: <s> encode a string taking care of quoting separated words and </s>
|
funcom_train/26524344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ITerminator initTerminator(int index) {
// Checkpointings
List terms = new Vector();
terms.add(new GenTerminator(genNum));
terms.add(new DataTerminator(100, new FitnessExtractor(), true));
SimpleCheckpoint term = new SimpleCheckpoint(new CombinedTerminator(terms), visor);
term.addStat(new LambdaCAFitnessStat(envs, "all fitness"));
return term;
}
COM: <s> returns a simple checkpoint interface that includes two </s>
|
funcom_train/3718857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetReadMessageNullInputStream() throws LLPException {
ByteArrayInputStream nullInputStream = null;
try {
minLLPReader.setInputStream(nullInputStream);
String recvMessage = minLLPReader.getMessage();
assertNull("Should not be able to read message from null input stream", recvMessage);
} catch (IOException ioe) {
} catch (NullPointerException ioe) {
}
}
COM: <s> testing read message method with a null input stream </s>
|
funcom_train/49790089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitialValues() throws Exception {
beginAtSitemapThenPage("Home");
assertNoProblem();
assertLabelTextExactlyPresent("Title 1");
assertLabelTextExactlyPresent("Content 1");
assertLabelTextNotPresent("Title 2");
assertLabelTextNotPresent("Content 2");
// pagination buttons are present
assertButtonPresentWithText("Next");
assertButtonPresentWithText("Previous");
assertButtonPresentWithText("First");
assertButtonPresentWithText("Last");
// test current pointer
assertInputTextFieldEquals("current pointer", "0");
}
COM: <s> the domain iterator will select the first element from the </s>
|
funcom_train/33393396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getNextLine() {
try {
if (!this.linesSkiped) {
for (int i = 0; i < skipLines; i++) {
br.readLine();
}
this.linesSkiped = true;
}
String nextLine = br.readLine();
if (nextLine == null) {
hasNext = false;
}
return hasNext ? nextLine : null;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
COM: <s> reads the next line from the file </s>
|
funcom_train/2871030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(TagInfo tag) throws DuplicateTagException {
if (tags.containsKey(tag.getName())) {
throw new DuplicateTagException("A tag called " + tag.getName() +
" already exists within this tag library");
}
tags.put(tag.getName(), tag);
}
COM: <s> adds a tag info object representing a tag to this description of a </s>
|
funcom_train/9906881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatchEvent(final Event event) {
if (event instanceof AddedContainer || event instanceof RemovedContainer
|| event instanceof PlatformDescription || event instanceof ResetEvents)
dispatchToPlatformListeners(event);
else if (event instanceof BornAgent || event instanceof DeadAgent
|| event instanceof SuspendedAgent || event instanceof ResumedAgent
|| event instanceof FrozenAgent || event instanceof ThawedAgent
|| event instanceof ChangedAgentOwnership || event instanceof ChangedAgentState
|| event instanceof MovedAgent)
dispatchToAgentListeners(event);
}
COM: <s> dispatch event to platform listeners </s>
|
funcom_train/49438345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isURNGet(final String requestLine) {
int slash1Index = requestLine.indexOf("/");
int slash2Index = requestLine.indexOf("/", slash1Index+1);
if((slash1Index==-1) || (slash2Index==-1)) {
return false;
}
String idString = requestLine.substring(slash1Index+1, slash2Index);
return idString.equalsIgnoreCase("lion-uri-res");
}
COM: <s> returns whether or not the get request for the specified line is </s>
|
funcom_train/49943658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Node getRootElement(final Document doc) {
if (doc == null)
return null;
if (doc.getDocumentElement() != null)
return doc.getDocumentElement();
try {
Element newRootElement = doc.createElement(getRootElementName());
doc.appendChild(newRootElement);
return newRootElement;
} catch (DOMException e) {
log.error(e);
}
return null;
}
COM: <s> returns the a root element for the current document </s>
|
funcom_train/17713664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(String num1, String num2){
num1 = trimLeadingZero(num1);
num2 = trimLeadingZero(num2);
int len1 = num1.length();
int len2 = num2.length();
if (len1 > len2){
return 1;
}else if(len2 > len1){
return -1;
}
int index=0;
int diff=0;
while(index<len1 && index<len2){
int n1 = num1.charAt(index);
int n2 = num2.charAt(index);
diff = n1 - n2;
if(diff != 0){
break;
}
index++;
}
if(diff > 0) return 1;
if(diff < 0) return -1;
return 0;
}
COM: <s> to compare two numbers assuming none of num1 and num2 is null </s>
|
funcom_train/25289260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeBranchGraph(BranchGroup branchGroup){
if (universe == null) {
throw new IllegalStateException(Ding3dI18N.getString("Locale4"));
}
if (! branchGroup.getCapability(BranchGroup.ALLOW_DETACH)) {
throw new CapabilityNotSetException(Ding3dI18N.getString("Locale1"));
}
universe.resetWaitMCFlag();
synchronized (universe.sceneGraphLock) {
doRemoveBranchGraph(branchGroup, null, 0);
universe.setLiveState.reset(this);
}
universe.waitForMC();
}
COM: <s> removes a branch graph rooted at branch group from </s>
|
funcom_train/13668392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String ret = "";
for(int i = 0 ; i < byteArray.length; ++i) {
String hexa = Integer.toHexString(byteArray[i] & 0xff);
ret += hexa.length() == 1 ? "0" + hexa : hexa;
}
return ret;
}
COM: <s> renders a hexadecimal string representation of this byte array </s>
|
funcom_train/31125406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int sendData(int register, byte value) {
byte [] txData = {(byte)address, (byte) register, value};
try {
int ret = nxtCommand.LSWrite(this.port, txData, (byte)0);
return ret;
} catch (IOException ioe) {
System.out.println(ioe.getMessage());
return -1;
}
}
COM: <s> sets a single byte in the i2 c sensor </s>
|
funcom_train/33964884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetResult() throws IOException {
System.out.println("getResult");
StringPair instance = new StringPair("The lazy fox");
instance.getWriter().write("Awake Chicken");
String expResult = "Awake Chicken";
String result = instance.getResult();
assertEquals(expResult, result);
}
COM: <s> test of get result method of class expect4j </s>
|
funcom_train/47266782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(NodeElement node) {
this.name = node.getName();
this.x = node.getX();
this.y = node.getY();
this.range = node.getRange();
this.id = node.getId();
this.memory = node.getMemory();
try {
initVirtualMachine();
} catch(Exception e) {
//LOG.error("Can't initialize node: " + this.getId(), e);
}
}
COM: <s> initilizes node with the values taken from xml configuration file </s>
|
funcom_train/25307037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unmap(User user) {
Set<Role> roles = findRoles(user);
if ((roles != null) && (roles.size() > 0)) {
for (Iterator<Role> iterator = roles.iterator(); iterator.hasNext();) {
Role role = (Role) iterator.next();
unmap(user, role); // FIXME BUG RESTLET SUR LE UNMAP
}
}
}
COM: <s> find the roles of a user </s>
|
funcom_train/36685371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeDisplayArea(Dimension size) {
myComments = new DisplayArea(size, SocialProperties.get("COM_TITLE"));
myScroller = new JScrollPane();
myScroller.getViewport().add(myComments);
myScroller.setPreferredSize(size);
this.add(myScroller);
display(myList);
}
COM: <s> creates the display area for displaying comments </s>
|
funcom_train/25048336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isDatabaseInitialized() {
return new HibernateTemplate(sessionFactory)
.execute(new HibernateCallback<Boolean>() {
@Override
public Boolean doInHibernate(Session session)
throws HibernateException, SQLException {
Integer rolesCount = (Integer) session.createCriteria(Role.class)
.setProjection(Projections.rowCount())
.uniqueResult();
return rolesCount > 0;
}
});
}
COM: <s> returns true if the database is initialized </s>
|
funcom_train/41509490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUpdateMessage(final String message) {
getDisplay().syncExec(new Runnable() {
public void run() {
updateLabel.setText(message);
updateLabel.setBackground(updateLabel.getParent().getBackground());
updateLabel.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, true));
internalComp.layout();
}
});
}
COM: <s> set an additional message showing more detailed progress information </s>
|
funcom_train/12962667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String recoverQuotedStrings(String retValue, Vector<String>retVars) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < retVars.size(); i++) {
//hengsin, special character in replacement can cause exception
String replacement = (String) retVars.get(i);
replacement = escapeQuotedString(replacement);
retValue = retValue.replace("<--" + i + "-->", replacement);
}
return retValue;
}
COM: <s> utility method to recover quoted string store in ret vars </s>
|
funcom_train/44560544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCustomModule() {
return ((getIndex() < 50 ||
(getIndex() >= 20000 && getIndex() < 30000)) ||
getIndex() >= 10000000) &&
getType() != DcModule._TYPE_TEMPLATE_MODULE &&
getType() != DcModule._TYPE_MAPPING_MODULE ;
}
COM: <s> tells if the module is created by a user </s>
|
funcom_train/7870802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ErrorInfo selectErrorInfo(String errorCode) throws BaseException {
try {
return (ErrorInfo) this.queryForObject("global.getErrorMessage.selectErrorMessage", errorCode);
} catch (DaoException e) {
logger.error("global.getErrorMessage.selectErrorMessage", e);
throw new BaseException("global.getErrorMessage.selectErrorMessage", e);
}
}
COM: <s> error code error info </s>
|
funcom_train/28250177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void hasUserRight(final String right, final Role owner) {
log.finest("Testing identity " + this.identity.getIdentity()
+ " has right " + right + " over objects of " + owner);
if( ! canUser(right, owner)) {
throw new SecurityException("Rights to " + right + " over objects "
+ "owned by " + owner + " not allowed");
}
}
COM: <s> tests if registered user has required right over objects owned </s>
|
funcom_train/37785159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDelete() throws Exception {
java.util.Random r = new java.util.Random( System.currentTimeMillis());
for( int i = 0; i < 30; i++ ) {
int idx = r.nextInt( keys.size() );
BigInteger key = (BigInteger)keys.remove(idx);
if( table.has( key )) {
testValues.remove(idx);
table.remove( key );
}
}
assertTrue( "testRemove", compareValuesByList());
}
COM: <s> test delete by randomly deleting 30 attributes </s>
|
funcom_train/20043948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _isBeforeFirst() {
requiredMethod("beforeFirst()") ;
boolean result = true ;
try {
result = oObj.isBeforeFirst() ;
} catch (SQLException e) {
log.println("Exception occured :") ;
e.printStackTrace(log) ;
result = false ;
}
tRes.tested("isBeforeFirst()", result) ;
}
COM: <s> the method is called immediatly after code before first code </s>
|
funcom_train/9806020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matchesWithin(Collection<EdifPortRef> portRefs) {
if (portRefs == null)
return false;
for (EdifPortRef port : portRefs) {
// equality checking done by name only
if (getPort().equals(port.getPort()) && getBusMember() == port.getBusMember())
return true;
}
return false;
}
COM: <s> return true if the current port ref matches within the passed in </s>
|
funcom_train/4876553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readWidthNode(final Node widthNode) {
assert widthNode != null : "widthNode is null";
int width = MIN_WIDTH;
try {
width = parseInt(widthNode.getNodeValue());
} catch (final NumberFormatException nfe) {
LOGGER.log(WARNING, buildLogString(NOT_SUPPORTED_WIDTH_WARNING, width), nfe);
}
return width;
}
COM: <s> this method checks the correct value of a width resolution node </s>
|
funcom_train/31956174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nullImage() {
iter = iterator();
try {
addValue(SIMPLE, true, "Null Image Header");
addValue(BITPIX, 8, null);
addValue(NAXIS, 0, null);
addValue("EXTEND", true, "Extensions are permitted");
} catch (HeaderCardException e) {
}
}
COM: <s> create a header for a null image </s>
|
funcom_train/20883161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected BaseEngineProperties createEngineProperties() {
SynthesizerModeDesc desc = (SynthesizerModeDesc)engineModeDesc;
TTSVoice defaultVoice = (TTSVoice)(desc.getVoices()[0]);
return new TTSSynthesizerProperties(defaultVoice,
defaultVoice.getPitch(),
defaultVoice.getPitchRange(),
defaultVoice.getSpeakingRate(),
defaultVoice.getVolume());
}
COM: <s> factory constructor for engine properties object </s>
|
funcom_train/26272710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isResourceOpen(ITransactionContext tx) {
if ( dataContext == null || connection == null )
return false;
boolean flag = false;
try {
flag = ( connection != null && !connection.isClosed() );
}
catch (DBException dbe) {
logger.warn( "failure to retrieve resource status", dbe );
}
return flag;
}
COM: <s> implements overrides is resource open </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.