__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/10634108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemove() throws InvalidNameException {
log.setMethod("testRemove()");
int oldSize = name.size();
name.remove(1);
assertEquals(name.size(), oldSize - 1);
assertEquals(name.toString(), elements[0] + "/");
try {
name.remove(-1);
fail();
} catch (ArrayIndexOutOfBoundsException e) {
}
try {
name.remove(oldSize - 1);
fail();
} catch (ArrayIndexOutOfBoundsException e) {
}
}
COM: <s> test remove include boundary case </s>
|
funcom_train/22397576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MethodHandler setReturnValue(Object retVal) {
if (this.returnValueSet) {
throwException(RETURN_VALUE_ALREADY_SET);
}
Class retClass = this.matcher.getMethod().getReturnClass();
if (retClass == null) {
throwException(CANT_SET_VOID_RETURN_VALUE);
}
if ((retVal != null) && (!retClass.isAssignableFrom(retVal.getClass()))) {
throwException(INCORRECT_RETURN_CLASS);
}
this.retVal = retVal;
this.returnValueSet = true;
return this;
}
COM: <s> sets the value to be returned if a method is invoked </s>
|
funcom_train/42943119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void widgetSelected(SelectionEvent e) {
// column selected - first column doesn't count
int column = table.indexOf((TableColumn) e.widget);
if (column == sorter.getTopPriority()) {
sorter.reverseTopPriority();
} else {
sorter.setTopPriority(column);
}
updateSortState(sorter);
getViewer().refresh();
IDialogSettings workbenchSettings = Activator.getDefault()
.getDialogSettings();
IDialogSettings settings = workbenchSettings
.getSection(SORT_STATE_SETTINGS);
if (settings == null) {
settings = workbenchSettings
.addNewSection(SORT_STATE_SETTINGS);
}
sorter.saveState(settings);
}
COM: <s> handles the case of user selecting the header area </s>
|
funcom_train/24085902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkOrder() {
int signum = Integer.signum(threshold1.compareTo(threshold2));
return ((signum == Integer.signum(threshold2.compareTo(threshold3)))
&& (signum == Integer.signum(threshold3.compareTo(threshold4)))
&& (signum == Integer.signum(threshold4.compareTo(threshold5))));
}
COM: <s> checks if the order of thresholds is consistent </s>
|
funcom_train/28749937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReferenced(Long newVal) {
if ((newVal != null && this.referenced != null && (newVal.compareTo(this.referenced) == 0)) ||
(newVal == null && this.referenced == null && referenced_is_initialized)) {
return;
}
this.referenced = newVal;
referenced_is_modified = true;
referenced_is_initialized = true;
}
COM: <s> setter method for referenced </s>
|
funcom_train/39144243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String listCountries(){
Country country;
String countriesList = "Countries List \n";
Iterator<Country> it;
for(it=CommonVariables.lCountries.iterator();it.hasNext();){
country = it.next();
countriesList += country.toString();
}
return countriesList;
}
COM: <s> method that return the list of all countries in the system </s>
|
funcom_train/18361885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getFeature(String string) throws SAXNotRecognizedException, SAXNotSupportedException {
if(string.equals(getProp(FEATURE_NAMESPACES)))
return namespaces;
else if(string.equals(getProp(FEATURE_NAMESPACE_PREFIXES)))
return namespacePrefixes;
else if(string.equals(getProp(FEATURE_STRING_INTERNING)))
return stringInterning;
else {
handleNotSupportedOrNotRecognizedFeature(string);
return false;
}
}
COM: <s> returns the current value of a feature </s>
|
funcom_train/47925311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getTime() throws NotInitializedException {
// If the timer is running
if(isStarted()) {
// If the timer is paused
if(isPaused()) {
return pausedTime - startTime; // Get paused elapsed time
} else {
return System.currentTimeMillis() - startTime; // Get current elapsed time
}
}
// If the timer isn't running
throw new NotInitializedException(ERROR_MESSAGE);
}
COM: <s> gets the elapsed time from the time </s>
|
funcom_train/9878141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConsensusMatrix(DefaultMutableTreeNode root, Cluster result_cluster, GeneralInfo info, int factorIndex) {
NodeList nodeList = result_cluster.getNodeList();
root.add(new DefaultMutableTreeNode(new LeafInfo("Consensus Matrix with HCL ", createHCLViewer(nodeList.getNode(0), info, factorIndex))));
}
COM: <s> adds nodes to display hierarchical trees </s>
|
funcom_train/48196322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyReleased(KeyEvent e) {
provider.receivePress(e.getKeyCode(), false);
for(int i = 0; i < pressedKeys.size(); i++) {
if(pressedKeys.get(i) == e.getKeyCode()) {
pressedKeys.remove(i);
break;
}
}
}
COM: <s> distributes a key release event to the scene provider </s>
|
funcom_train/7660438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIterator() {
LinkedList q = populatedQueue(SIZE);
int i = 0;
Iterator it = q.iterator();
while(it.hasNext()) {
assertTrue(q.contains(it.next()));
++i;
}
assertEquals(i, SIZE);
}
COM: <s> iterator iterates through all elements </s>
|
funcom_train/2969636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsEmpty() {
System.out.println("isEmpty");
instance.addTimeInterval(10,130);
instance.addTimeInterval(300,30);
instance.clear();
assertTrue(instance.isEmpty());
assertEquals(-1, instance.getLastAssignment());
}
COM: <s> test of is empty method of class de </s>
|
funcom_train/36548603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pushUnlabeled(ASTNode owner, Node breakPoint, Node continuePoint) {
Block block;
if (blockStack.isEmpty() || blockStack.peek().owner != owner) {
block = new Block(owner, breakPoint, continuePoint, null);
blockStack.push(block);
}
else {
block = blockStack.peek();
block.breakPoint = breakPoint;
block.continuePoint = continuePoint;
}
}
COM: <s> push on a statement </s>
|
funcom_train/9550575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTextField getJTextFieldMIME() {
if (jTextFieldMIME == null) {
jTextFieldMIME = new JTextField();
jTextFieldMIME.setBounds(new Rectangle(99, 44, 127, 17));
jTextFieldMIME.setFont(new java.awt.Font("MS Sans Serif", java.awt.Font.PLAIN, 10));
jTextFieldMIME.setBackground(new Color(255, 255, 190));
}
return jTextFieldMIME;
}
COM: <s> this method initializes j text field mime </s>
|
funcom_train/5420537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attributeReplaced(HttpSessionBindingEvent event) {
if (event.getName().equals(EVENT_KEY) && !isAnonymous()) {
SecurityContext securityContext = (SecurityContext) event.getValue();
if (securityContext.getAuthentication() != null) {
User user = (User) securityContext.getAuthentication().getPrincipal();
addUsername(user);
}
}
}
COM: <s> needed for acegi security 1 </s>
|
funcom_train/40727344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReturnType getOrCancel(long timeout, TimeUnit unit){
try {
return f.get(timeout, unit) ;
} catch (InterruptedException e) {
f.cancel(true) ;
} catch (ExecutionException e) {
f.cancel(true) ;
} catch (TimeoutException e) {
f.cancel(true) ;
}catch(Throwable t){
//ignore any exceptions
}
return this.fecther.getDefaultData() ;
}
COM: <s> waits if necessary for at most the given time for the computation </s>
|
funcom_train/10664512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
// Some tests may run via proxy but not all.
if (System.getProperty("http.proxyHost") == null) {
//System.setProperty("http.proxyHost", "genproxy");
//System.setProperty("http.proxyPort", String.valueOf(8900));
}
}
COM: <s> todo support proxy configuration </s>
|
funcom_train/9818358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean needsToBeAsynchronouslyScheduled() {
//EBB Hack to avoid floating warnings on input to clockdriver
// sink_source_cells.initSink();
// if (sink_source_cells.getSink() instanceof ClockDriver)
// return false;
//EBB end hack
return ((!sink_source_cells.emptySourceBehavior()) || getNodeParent() instanceof TestBench);
}
COM: <s> the default behavior is that all wires with source cells </s>
|
funcom_train/5158121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VideoSearchResults videoSearch(VideoSearchRequest request) throws IOException, SearchException {
request.getParameters().put(APPID_KEY, appId);
Map results = executeAndParse(request.getRequestUrl(), request.getParameters());
return new XmlParserVideoSearchResults(results);
}
COM: <s> searches the yahoo database for video files </s>
|
funcom_train/18052191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getSvFileOpenMenuItem() {
if (svFileOpenMenuItem == null) {
svFileOpenMenuItem = new JMenuItem();
svFileOpenMenuItem.setText("Open");
svFileOpenMenuItem
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
openAction();
}
});
}
return svFileOpenMenuItem;
}
COM: <s> this method initializes svfile open menu item </s>
|
funcom_train/13189950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getDomainAxisIndex(ValueAxis axis) {
int result = this.domainAxes.indexOf(axis);
if (result < 0) {
// try the parent plot
Plot parent = getParent();
if (parent instanceof XYPlot) {
XYPlot p = (XYPlot) parent;
result = p.getDomainAxisIndex(axis);
}
}
return result;
}
COM: <s> returns the index of the given domain axis </s>
|
funcom_train/32056930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddPoint() {
System.out.println("testAddPoint");
Object obj = null;
JGraph jgraph = new JGraph();
CellMapper cellmapper = null;
EdgeView edge = new EdgeView(obj, jgraph, cellmapper);
int i = 1;
Point point = null;
edge.addPoint(i, point);
assertEquals(edge.getPoint(i),point);
}
COM: <s> this function tests add point function of edge view class </s>
|
funcom_train/32753090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serviceAdded(ServiceDirectory directory, ServiceRef serviceRef) {
RemoteLogging proxy = (RemoteLogging)directory.getProxy(RemoteLogging.class, serviceRef);
synchronized(serviceTable) {
String id = serviceRef.getRawName();
LoggerHandler handler = new LoggerHandler(id, proxy);
serviceTable.put(id, handler);
}
updateServiceList();
timer.restart();
}
COM: <s> handle a new service being added </s>
|
funcom_train/42136538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
// Send the first RTCP packet
long delay = (long) (Math.random() * SECS_TO_MS) + DELAY_CONSTANT;
rtcpTimer.schedule(new RTCPTimerTask(this), delay);
globalReceptionStats.resetBytesRecd();
lastRTCPSendTime = System.currentTimeMillis();
}
COM: <s> starts the sending of rtcp packets </s>
|
funcom_train/13274731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setStepIcon(URL stepIcon) {
if (stepIcon != this.stepIcon) {
URL oldStepIcon = this.stepIcon;
this.stepIcon = stepIcon;
this.propertyChangeSupport.firePropertyChange(Property.STEP_ICON.name(), oldStepIcon, stepIcon);
}
}
COM: <s> sets the step icon </s>
|
funcom_train/31517242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText("RenaissanceCore IDS v" + this.version);
//newShell.setSize(450, 550);
//Rectangle displayBounds = Display.getCurrent().getBounds();
//newShell.setLocation(
//(displayBounds.width - newShell.getSize().x) / 2,
//(displayBounds.height - newShell.getSize().y) / 2);
}
COM: <s> override the default configure shell method so we can specify </s>
|
funcom_train/46930804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSimpleScript() throws Exception {
String code = "while (x < 10) x = x + 1;";
Script s = ScriptFactory.createScript(code);
Map jc = new HashMap();
jc.put("x", new Integer(1));
Object o = s.execute(jc);
assertEquals("Result is wrong", new Long(10), o);
assertEquals("getText is wrong", code, s.getText());
}
COM: <s> test creating a script from a string </s>
|
funcom_train/13287176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
try {
Language language = (Language) obj;
return new EqualsBuilder()
.append(this.getCode(), language.getCode())
.isEquals();
} catch (ClassCastException e) {
// The given object is not a language, therefore they are not equal.
return false;
}
}
COM: <s> compares this language with the given object for equality </s>
|
funcom_train/22284658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Font font) {
if (font != null) {
fonts.setValue(font.getName());
sizes.setValue(String.valueOf(font.getSize()));
int style = font.getStyle();
bold.setValue((style & Font.BOLD) != 0);
italic.setValue((style & Font.ITALIC) != 0);
} else {
fonts.setValue("");
sizes.setValue("");
bold.setValue(false);
italic.setValue(false);
}
}
COM: <s> set the current font value </s>
|
funcom_train/3526809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isResourceInWorkspaceUri() {
WorkspacePathHandler wspathHandler = WorkspacePathHandler.getWorkspacePathHandler();
String[] wspathTokens = wspathHandler.getUriTokens();
if( (wspathTokens.length + 1) < uriTokens.length ) {
UriHandler p = new UriHandler( uriTokens, wspathTokens.length + 1 );
if( p.isWorkspaceUri() ) {
return true;
}
}
return false;
}
COM: <s> return true if this is an uri of a resource in a workspace </s>
|
funcom_train/43213279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean setTargetHashSpans(Collection<HashSpan> hashSpans) {
if (!HashSpanCollection.areEqual(getTargetHashSpans(), hashSpans)) {
synchronized (this.targetHashSpans) {
this.targetHashSpans.clear();
this.targetHashSpans.addAll(hashSpans);
}
return true;
}
return false;
}
COM: <s> p sets the target hash spans </s>
|
funcom_train/36896150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void storeLoginInfo(Long id, String email, int userLevel) {
HttpSession session = getThreadLocalRequest().getSession(true);
if (session == null) {
log.severe("Storing login info failed: could not get HttpSession");
} else {
session.setAttribute(LOGIN_KEY_UESR_ID, id);
session.setAttribute(LOGIN_KEY_UESR_EMAIL, email);
}
}
COM: <s> store the id and email of the currently logged in user into session </s>
|
funcom_train/8639145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRegularColumns(float left, float right, float gutterWidth, int numColumns) {
float currX = left;
float width = right - left;
float colWidth = (width - (gutterWidth * (numColumns - 1))) / numColumns;
for (int i = 0; i < numColumns; i++) {
addSimpleColumn(currX, currX + colWidth);
currX += colWidth + gutterWidth;
}
}
COM: <s> add the specified number of evenly spaced rectangular columns </s>
|
funcom_train/19672583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rotateZ(float radians) {
float cos = (float)Math.cos(radians);
float sin = (float)Math.sin(radians);
direction.x = (direction.x * cos) + (direction.y * -sin);
direction.y = (direction.x * sin) + (direction.y * cos);
} // method
COM: <s> rotating the view around the z axis can be achieved by multiplying the </s>
|
funcom_train/43868561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void introspectServicePath() {
String className = this.getClass().getName();
String name = className.replaceFirst("Test$", "");
name = name.replaceAll("(\\p{Upper})", "-$1");
name = name.replaceAll("\\.", "/") + ".xqy";
name = name.toLowerCase();
name = name.replaceFirst("-", "");
}
COM: <s> determine a service path based upon introspection </s>
|
funcom_train/49044546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDescriptorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ObjectProperty_descriptor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ObjectProperty_descriptor_feature", "_UI_ObjectProperty_type"),
ItemsPackage.Literals.OBJECT_PROPERTY__DESCRIPTOR,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the descriptor feature </s>
|
funcom_train/22894998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getStartIndex(ListModel model) {
int result = 0;
for (int i = 0; i < models.size(); ++i) {
ListModel m = (ListModel) models.get(i);
if (model == m) {
break;
}
result += m.getSize();
}
return result;
}
COM: <s> calculates the virtual start index of the first element </s>
|
funcom_train/44987082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getCoordType(CoordType coord) {
if(coord!=null&&coord.getDimensions()!=null){
NumericalType[] numericaltypes = coord.getDimensions();
this.dbType=((OIDBC_dbtype)DBType.getDBType(OIDBC_dbtype.NAME)).getSubDBTyp().getDOUBLE();
this.dim = numericaltypes.length;
return "COORD"+this.dim;
}
return "";
}
COM: <s> needed if the interlis typ is a coord </s>
|
funcom_train/13108183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAssetGroup(MAssetGroup assetGroup) {
setA_Asset_Group_ID(assetGroup.getA_Asset_Group_ID());
setA_Asset_Type_ID(assetGroup.getA_Asset_Type_ID());
setGZ_TipComponenta(assetGroup.getGZ_TipComponenta()); // TODO: move to GZ
MAssetType assetType = MAssetType.get(getCtx(), assetGroup.getA_Asset_Type_ID());
assetType.update(SetGetUtil.wrap(this), true);
}
COM: <s> set asset group also it sets other default fields </s>
|
funcom_train/39378195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onInit() {
initActivePanel();
for (int i = 0, size = getControls().size(); i < size; i++) {
Control control = (Control) getControls().get(i);
if (control instanceof Panel) {
if (control == getActivePanel()) {
control.onInit();
}
} else {
control.onInit();
}
}
}
COM: <s> initialize the child controls contained in the panel </s>
|
funcom_train/12663291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttribute(final String key, final String value) throws IOException {
if ("name".equals(key) || "commands".equals(key)) {
throw new IllegalArgumentException("Cannot modify 'name' or 'commands' attribute.");
}
final String prop = "module." + key;
getProperties().setProperty(prop, value);
storeProperties();
}
COM: <s> set the value of the module attribute </s>
|
funcom_train/43097981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeActualArgument(Object handle, Object argument) {
if (handle instanceof MAction && argument instanceof MArgument) {
((MAction) handle).removeActualArgument((MArgument) argument);
return;
}
throw new IllegalArgumentException("Unrecognized object "
+ handle + " or "
+ argument);
}
COM: <s> removes the actual argument from an action </s>
|
funcom_train/27806469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void viewRejectedPaperButton_clicked(ActionEvent e) {
System.out.println("\nviewRejectedPaperButton_clicked(ActionEvent e) called.");
int index = papersRejectedList.getSelectedIndex();
IPaper paper = allRejectedPapersList.get(index);
titleText.setText(paper.getAbstract().getPaperTitle());
abstractText.setText(paper.getAbstract().getAbstract());
uriText.setText(paper.getPaperURI());
tabbedPanel.setSelectedIndex(1);
}
COM: <s> action to perform when the view rejected paper button is clicked </s>
|
funcom_train/17915128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node applyTransform(Reader source) throws SmooksException {
Node deliveryNode;
if(source == null) {
throw new IllegalArgumentException("null 'source' arg passed in method call.");
}
try {
Document document = Parser.parse(source);
deliveryNode = applyTransform(document);
} catch(Exception cause) {
throw new SmooksException("Unable to transform InputStream for target device [" + containerRequest.getUseragentContext().getCommonName() + "].", cause);
}
return deliveryNode;
}
COM: <s> transform the supplied input source </s>
|
funcom_train/35328278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearAssertionStatus() {
/*
* Whether or not "Java assertion maps" are initialized, set
* them to empty maps, effectively ignoring any present settings.
*/
synchronized (assertionLock) {
classAssertionStatus = new HashMap<>();
packageAssertionStatus = new HashMap<>();
defaultAssertionStatus = false;
}
}
COM: <s> sets the default assertion status for this class loader to </s>
|
funcom_train/21483023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void spoolAndExpiryThreadMain() {
long nextExpiryTime = System.currentTimeMillis();
while (true) {
try {
Thread.sleep(SPOOL_THREAD_INTERVAL);
} catch (InterruptedException e) {
LOG.debug("Spool Thread interrupted.");
return;
}
if (!active) {
return;
}
throwableSafeFlushSpoolIfRequired();
if (!active) {
return;
}
nextExpiryTime = throwableSafeExpireElementsIfRequired(nextExpiryTime);
}
}
COM: <s> both flushing and expiring contend for the same lock on disk element so </s>
|
funcom_train/4880456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getTelaInicial () {
if (TelaInicial == null) {//GEN-END:|64-getter|0|64-preInit
// write pre-init user code here
TelaInicial = new Command ("Ok", Command.OK, 0);//GEN-LINE:|64-getter|1|64-postInit
// write post-init user code here
}//GEN-BEGIN:|64-getter|2|
return TelaInicial;
}
COM: <s> returns an initiliazed instance of tela inicial component </s>
|
funcom_train/31251570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Hashtable getTaskSetFiles(String dirPath) {
Hashtable taskSetFiles = new Hashtable();
String name;
File file;
File dir = new File(dirPath);
File files[] = dir.listFiles();
for (int i=0; i<files.length; i++) {
file = files[i];
name = file.getName();
if (!name.toLowerCase().endsWith(".xml"))
continue;
taskSetFiles.put(name, file);
}
return taskSetFiles;
}
COM: <s> returns a hash of file objects </s>
|
funcom_train/22033779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearScales() {
if (not_destroyed == null) return;
if (scale_on != null) {
synchronized (scale_on) {
int n = scale_on.numChildren();
for (int i=n-1; i>=0; i--) {
scale_on.removeChild(i);
}
}
}
axis_vector.removeAllElements();
}
COM: <s> remove all the scales being rendered </s>
|
funcom_train/31675958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStat() throws IOException {
if( Debug.check(Bug.STATUS) )
Debug.println(Bug.STATUS, "Changing status for "+path+" to "+this);
if( type == M_NO_EXIST ) {
System.out.println("******** Warning: trying to copy "+
"nonexistant file stats. ");
return;
}
try {
nativeSetStat();
} catch( SecurityException ex ) {
Main.verify.warn(ex.getMessage(), Verify.SEVERE);
}
}
COM: <s> set modification times and permissions </s>
|
funcom_train/6341685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getBounds() {
Rectangle result = new Rectangle();
for (int i = 0; i < contents.size(); i++) {
if (result.width == 0) {
result = ((Node) contents.elementAt(i)).getBounds();
} else {
result.add(((Node) contents.elementAt(i)).getBounds());
}
}
return result;
}
COM: <s> gets the bounds of the selection object </s>
|
funcom_train/25798348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTvShowDetails(DataResponse<TvShow> response, final TvShow show, final Context context) {
mHandler.post(new Command<TvShow>(response, this) {
@Override
public void doRun() throws Exception {
mResponse.value = shows(context).updateTvShowDetails(TvShowManager.this, show);
}
});
}
COM: <s> updates the show object with additional data from the tvshow table </s>
|
funcom_train/27823719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRowForEntity(Entity entity) {
if (m_elements!=null)
for (int i=m_elements.size()-1;i>=0;i--) {
TableRow tableRow=(TableRow)m_elements.get(i);
if (entity.equals(tableRow.m_entity))
return i;
}
return -1;
}
COM: <s> returns the row for given entity </s>
|
funcom_train/3913946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "Event[uolId=" + getUolId() + ",triggerId=" + getTriggerId() +
",type=" + getType() + ",className=" +
getClassName() + ",componentId=" + getComponentId() + "]";
}
COM: <s> returns a string representation of this event </s>
|
funcom_train/39802878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintTopLeft(Component c, Graphics g, int x, int y, int width, int height) {
Graphics cg = g.create();
try {
cg.setClip(x, y, width, height);
tileIcons[0].paintIcon(c, cg, x, y);
} finally {
cg.dispose();
}
}
COM: <s> only called by paint border </s>
|
funcom_train/26324878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JComponent getDisplay(Object container) throws FCException {
if (_displays.containsKey(container)) {
return (JComponent)_displays.get(container);
} else {
JComponent comp = createNewDisplay();
_displays.put(container, comp);
configureNewUI(comp);
return comp;
}
}
COM: <s> returns the display object to be added to the given container </s>
|
funcom_train/18047671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public double crossProduct(Point p0, Point p1, Point p2) {
// positive if ccw
double
dx1 = p1.x - p0.x,
dy1 = p1.y - p0.y,
dx2 = p2.x - p0.x,
dy2 = p2.y - p0.y;
return dx1 * dy2 - dy1 * dx2;
}
COM: <s> cross product of three points </s>
|
funcom_train/22121850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetCoords(int len) {
imagesX = new int[len];
java.util.Arrays.fill(imagesX, 0);
imagesY = new int[len];
java.util.Arrays.fill(imagesY, 0);
dispX = new int[len];
java.util.Arrays.fill(dispX, 0);
virtualY = new int[len];
java.util.Arrays.fill(virtualY, 0);
imagesWidth = new int[len];
java.util.Arrays.fill(imagesWidth, 0);
imagesHeight = new int[len];
java.util.Arrays.fill(imagesHeight, 0);
}
COM: <s> resets all image coordinates </s>
|
funcom_train/20829650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isDatabaseInitialized() {
boolean retval;
try {
final int galleryCount = getJdbcTemplate()
.queryForInt("select count(*) from GALLERIES");
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Found " + galleryCount
+ " galleries - database appears to be initialized");
}
retval = true;
} catch (DataAccessException ex) {
retval = false;
}
return retval;
}
COM: <s> returns code true code if the database appears to have been </s>
|
funcom_train/49608975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getUsers() throws Throwable {
EntityManager em = null;
try {
ListCommand lc = ExtUtils.getListCommand(User.class,this);
em = EntityManagerProvider.getInstance().getEntityManager();
ListResponse res = BusinessObjectsFacade.getInstance().getUsersBO().getUsers(username, em, lc);
ExtUtils.sendListResponse(res,this);
}
catch (Throwable ex) {
ExtUtils.sendErrorResponse(ex.getMessage(), response);
throw ex;
}
finally {
if (em!=null)
EntityManagerProvider.getInstance().releaseEntityManager(em);
}
}
COM: <s> return a list of user objects encoded in json format </s>
|
funcom_train/10790273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Sequence importSequence(Sequence seq) {
if (seq == null)
return null;
Sequence copy = addSequence(seq.getIdentifier());
copy.setInitialValue(seq.getInitialValue());
copy.setIncrement(seq.getIncrement());
copy.setAllocate(seq.getAllocate());
return copy;
}
COM: <s> import a sequence from another schema </s>
|
funcom_train/31456542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InstructionSet getInstructionSet(String VMType) {
InstructionSet is = instructionSets.get(VMType);
// TODO: get via requester
if ( is == null ) {
try {
is = isle.getInstructionSet(VMType);
if ( is != null )
instructionSets.put(VMType, is);
} catch (Exception e) {
Log.exception(Log.ERROR, "Exception raised while retrieving instruction set for " + VMType, e);
}
}
return is;
}
COM: <s> retrieves instruction set instance for the specified vm class </s>
|
funcom_train/20622558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkDtsSchema(List list) {
if (!SQL.checkTableExists(conn, "DTS_AUTHORITY") ||
!SQL.checkTableExists(conn, "DTS_NAMESPACE")) {
list.add(
"The database is not a valid DTS database. Run KBCreate first!");
return false;
}
else {
return true;
}
}
COM: <s> check if the database has a dts schema or not </s>
|
funcom_train/8400815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node createChildNode(Direction dir) {
Node ans = new Node(this.board, this.smartAgent, this.agents, this,
dir);
for (Agent agent : ans.agents) {
if (agent != ans.smartAgent) {
agent.play(ans.board, false);
} else {
((SmartAgent) agent).simulateTurn(ans.board, dir);
}
}// for ply all agents
// After all players ply...
ans.computeHeuristic();
return ans;
}
COM: <s> this method creates and returns a child of this node </s>
|
funcom_train/45563517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getWordcountOfLanguage(String language){
int count=-1;
try {
PreparedStatement preparedCountStatement = connection.prepareStatement(DatabaseQueries.GET_WORDCOUNT_FOR_LANGUAGE);
int langID = getLanguageID(language);
preparedCountStatement.setInt(1, userID);
preparedCountStatement.setInt(2, langID);
ResultSet resultSet = preparedCountStatement.executeQuery();
count = resultSet.getInt("count");
} catch (Exception e) {e.printStackTrace();}
DebugMessage.println("DB: getting wordcount = "+count);
return count;
}
COM: <s> returns the total amount of words for this language </s>
|
funcom_train/4363488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Worker getWorkerThread() {
// Allocate a new worker thread
Worker workerThread = createWorkerThread();
while (workerThread == null) {
try {
synchronized (workers) {
workers.wait();
}
} catch (InterruptedException e) {
// Ignore
}
workerThread = createWorkerThread();
}
return workerThread;
}
COM: <s> return a new worker thread and block while to worker is available </s>
|
funcom_train/6254011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this == obj) {
return true;
} else if (!(obj instanceof ActivatableInvocationHandler)) {
return false;
}
ActivatableInvocationHandler other =
(ActivatableInvocationHandler) obj;
return (id.equals(other.id) &&
(clientConstraints == other.clientConstraints ||
(clientConstraints != null &&
clientConstraints.equals(other.clientConstraints))));
}
COM: <s> compares the specified object with this </s>
|
funcom_train/45486292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton1Del() {
if (jButton1Del == null) {
jButton1Del = new JButton();
jButton1Del.setBounds(new Rectangle(951, 7, 64, 26));
Font font = new Font("Serif", Font.BOLD, 16);
jButton1Del.setFont(font);
jButton1Del.setForeground(Color.red);
jButton1Del.setText("1");
}
return jButton1Del;
}
COM: <s> this method initializes j button1 del </s>
|
funcom_train/16604763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPoint(float pos, Color col) {
ControlPoint point = new ControlPoint(col, pos);
for (int i=0;i<list.size()-1;i++) {
ControlPoint now = (ControlPoint) list.get(i);
ControlPoint next = (ControlPoint) list.get(i+1);
if ((now.pos <= 0.5f) && (next.pos >=0.5f)) {
list.add(i+1,point);
break;
}
}
repaint(0);
}
COM: <s> add a control point to the gradient </s>
|
funcom_train/3403869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharSequence subSequence(int start, int end) {
StringBuilder buf = new StringBuilder();
get(); // fill in the buffer if we haven't done so
for( int i=start; i<end; i++ )
buf.append(charAt(i));
return buf;
}
COM: <s> internally this is only used to split a text to a list </s>
|
funcom_train/13440039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PDesktopGroup getDesktopGroupOfItem(String id) {
Iterator groups = this.getMapDesktopGroups().values().iterator();
while (groups.hasNext() && id!=null) {
PDesktopGroup desk = (PDesktopGroup)groups.next();
Iterator items = desk.getItemIds();
while (items.hasNext()) {
if (id.equals(items.next().toString())) return desk;
}
}
return null;
}
COM: <s> returns the desktop group which has the item with the given id </s>
|
funcom_train/14027135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compact() {
for(K key: _map.keySet()) {
SoftReference<V> sr = _map.get(key);
if (sr!=null) {
V value = sr.get();
if (value==null) {
_map.remove(key);
}
}
}
}
COM: <s> remove keys whose values have been removed </s>
|
funcom_train/18012907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPathToNodeVisible(Object node) {
Object[] path = getPathToRoot(node);
for (int i = 0; i < path.length; i++) {
if (!((FoodNode) path[i]).isVisible()) {
return false;
}
}
return true;
}
COM: <s> checks if the specified node is visible and all nodes above it are </s>
|
funcom_train/50699055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteBeginOfBufferUntil(int index){
if(index >= this.getSize())
this.setBufferIndex( -1 );
else{
int newSize = this.getSize() - index;
System.arraycopy(buffer,index,buffer,0,newSize);
this.setBufferIndex(newSize - 1);
}
}
COM: <s> deletes the begin of this buffer until the provided index </s>
|
funcom_train/21955388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(String pChangedValue) {
String key = pChangedValue;
// this should always end with .logLevel.
if (pChangedValue.endsWith(".logLevel")) {
key = pChangedValue.substring(0, pChangedValue.length() - 9);
}
refresh(key);
}
COM: <s> responds to a change in a configured value </s>
|
funcom_train/42715339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFontSize(String size) {
font_size = size;
if (font_size.equals("small")) {
font_size_value = "1";
} else if (font_size.equals("medium")) {
font_size_value = "2";
} else if (font_size.equals("large")) {
font_size_value = "3";
}
}
COM: <s> sets the font size according to the string representation </s>
|
funcom_train/12560119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Datagram createDatagramToReceive() {
receivedDatagram = null;
numBytesToSend = strTestMsg.length();
try {
receivedDatagram = server.newDatagram(numBytesToSend);
} catch (IOException ioe) {
cleanUp();
System.out.println("Cannot create Datagram. IOException: " + ioe);
}
return receivedDatagram;
}
COM: <s> creates a datagram packet to be received at server </s>
|
funcom_train/29031456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void errorDialog(String msg) {
UIManager.put("OptionPane.background", Color.BLACK);
UIManager.put("OptionPane.JButton.setForground", Color.BLACK);
UIManager.put("Panel.background", Color.BLACK);
UIManager.put("OptionPane.messageForeground", Color.GREEN);
JOptionPane.showMessageDialog(this, msg, "error",
JOptionPane.ERROR_MESSAGE);
}
COM: <s> dialog to show errors in the same colours than gui </s>
|
funcom_train/37476855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Databit getDatabit(int id) {
Databit dbit = null;
for (Iterator it = getAllDatabitPaths().iterator(); it.hasNext(); ){
String path = (String) it.next();
Databit checkdbit = getDatabit(path);
if (checkdbit.getId() == id){
dbit = checkdbit;
break;
}
}
return dbit;
}
COM: <s> search for a databit with that id returns null if not found </s>
|
funcom_train/15629172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fill(@NotNull final MapView<G, A, R> mapView, @NotNull final InsertionMode<G, A, R> insertionMode) {
FillUtils.fill(mapView.getMapControl().getMapModel(), mapView.getSelectedSquares(), insertionMode, objectChooser.getSelections(), -1, false);
}
COM: <s> fill was selected from the edit menu </s>
|
funcom_train/16792520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resource createActiveRecording(Resource system, int slot) {
String uri = this.buildActiveRecordingUri(system.getURI(), slot);
Resource timer = this.model.createResource(uri, TMSNet.ActiveRecording);
timer.addProperty(TMSNet.recorder, system);
return timer;
}
COM: <s> create an active recording description </s>
|
funcom_train/29962767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(String value) throws PropertyVetoException
{
if ( ! this.equalsValue(value) )
{
this.fireVetoableChange(PROPERTY_VALUE, this.value, value);
String oldValue = this.value;
this.checkReadOnlyProperty(PROPERTY_VALUE, this.getObject(), value);
this.value = value;
this.firePropertyChange(PROPERTY_VALUE, oldValue, this.value);
}
}
COM: <s> initialize the value of the instance </s>
|
funcom_train/2557585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void extract(Node source) {
NodeList list = source.getChildNodes();
int length = list.getLength();
for(int i = 0; i < length; i++) {
Node node = list.item(i);
short type = node.getNodeType();
if(type != COMMENT_NODE) {
offer(node);
extract(node);
}
}
}
COM: <s> this is used to extract the nodes of the element in such a </s>
|
funcom_train/46628588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public D save(D document) throws ValidationFailedException {
String description = document.getDescription();
if (description != null) {
String summary = description.replaceAll("\\<.*?>", "");
if (summary.length() > 200) {
summary = summary.substring(0, 200);
}
document.setSummary(summary);
}
return super.save(document);
}
COM: <s> updates the given object </s>
|
funcom_train/38282107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setupConnection() {
try {
Connection conn = connnectionManager.getConnection(connectionKey);
if (sqlMapClient == null) {
initSqlMapClient(conn);
}
this.sqlMapClient.setUserConnection(conn);
} catch (SQLException e) {
throw new EtlToolsException("Failed to set connection table ["
+ getTableName() + "]. Cause: " + e, e);
}
}
COM: <s> set currect connection threadsafe managed by ibatis </s>
|
funcom_train/43893682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ColorMapEntry createColorMapEntry(String label, double quantity, Color color) {
ColorMapEntry entry = sf.createColorMapEntry();
entry.setQuantity(literalExpression(quantity));
entry.setColor(colorExpression(color));
entry.setOpacity(literalExpression(color.getAlpha() / 255.0));
entry.setLabel(label);
return entry;
}
COM: <s> creates a simple color entity based on a fixed value and a color </s>
|
funcom_train/2915105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPath addClass(final IPath packagePath, final String className, final String contents) {
checkAssertion("a workspace must be open", fIsOpen); //$NON-NLS-1$
final IPath classPath = packagePath.append(className + ".java"); //$NON-NLS-1$
createFile(classPath, contents.getBytes());
return classPath;
}
COM: <s> adds a class with the given contents to the given package in the </s>
|
funcom_train/2624523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(final String text) {
final String oldText = label.getText();
if (oldText == null && text == null) {
return;
}
if (oldText == null || !oldText.equals(text)) {
label.setText(text);
update();
firePropertyChange(PROPERTY_CODE_TEXT, PROPERTY_TEXT, oldText, label.getText());
}
}
COM: <s> set the html text for this html text node to code text code </s>
|
funcom_train/37837889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processPositioning(final RPObject base, final RPObject diff) {
boolean moved = false;
if (diff.has("x")) {
final int nx = diff.getInt("x");
if (nx != x) {
x = nx;
moved = true;
}
}
if (diff.has("y")) {
final int ny = diff.getInt("y");
if (ny != y) {
y = ny;
moved = true;
}
}
if (moved) {
onPosition(x, y);
}
}
COM: <s> process attribute changes that may affect positioning </s>
|
funcom_train/7294279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test4233840() {
float f = 0.0099f;
NumberFormat nf = new DecimalFormat("0.##", new DecimalFormatSymbols(Locale.US));
nf.setMinimumFractionDigits(2);
String result = nf.format(f);
if (!result.equals("0.01")) {
errln("FAIL: input: " + f + ", expected: 0.01, got: " + result);
}
}
COM: <s> 4233840 number format does not round correctly </s>
|
funcom_train/3405151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serializeAttributes(BeanT o, XMLSerializer w) throws SAXException, AccessorException, IOException, XMLStreamException {
CharSequence value = xacc.print(o);
if(value != null)
w.attribute(attName, value.toString());
else if(required)
w.attribute(attName, "");
}
COM: <s> marshals one attribute </s>
|
funcom_train/48909422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxfSaldoInicial() {
if (txfSaldoInicial == null) {
txfSaldoInicial = new JTextField();
txfSaldoInicial.setBounds(new Rectangle(103, 150, 150, 22));
txfSaldoInicial.addKeyListener(new KeyAdapter(){
public void keyPressed(KeyEvent e) {
if(e.getKeyCode()==KeyEvent.VK_ENTER)
txfPrecioInicial.grabFocus();
}
});
}
return txfSaldoInicial;
}
COM: <s> this method initializes txf saldo inicial </s>
|
funcom_train/9543337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRecentFile(String file, int position) {
if (position > files.size() + 1) {
position = files.size() + 1;
}
int index = position - 1;
if (!(index < maxsize))
return;
if (files.contains(file)) {
files.remove(file);
files.add(index, file);
return;
}
files.add(index, file);
if (files.size() > maxsize) {
files.removeLast();
}
}
COM: <s> sets the file on the given position </s>
|
funcom_train/47820791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void gameRender() {
if (dbImage == null){
dbImage = createImage(rect.width, rect.height);
if (dbImage == null) {
logger.error("dbImage is null");
return;
}
else
dbg = dbImage.getGraphics();
}
dbg.setFont(font);
// report frame count & average FPS and UPS at top left
// dbg.drawString("Frame Count " + frameCount, 10, 25);
for (Renderable panel : views) {
if (panel.isEnabled()){
panel.gameRender(dbg);
}
}
} // end of gameRender()
COM: <s> rendering the off screen image that is then replaced </s>
|
funcom_train/3509399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONStringer value(Object o) throws JSONException {
if (JSONObject.NULL.equals(o)) {
return this.append("null");
}
if (o instanceof Number) {
JSONObject.testValidity(o);
return this.append(JSONObject.numberToString((Number)o));
}
if (o instanceof Boolean ||
o instanceof JSONArray || o instanceof JSONObject) {
return this.append(o.toString());
}
return this.append(JSONObject.quote(o.toString()));
}
COM: <s> append an object value </s>
|
funcom_train/9104357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand() {
if (itemCommand == null) {//GEN-END:|22-getter|0|22-preInit
// write pre-init user code here
itemCommand = new Command("Start!", Command.ITEM, 0);//GEN-LINE:|22-getter|1|22-postInit
// write post-init user code here
}//GEN-BEGIN:|22-getter|2|
return itemCommand;
}
COM: <s> returns an initiliazed instance of item command component </s>
|
funcom_train/18149570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVeryImportantPersonCode(CE veryImportantPersonCode) {
if(veryImportantPersonCode instanceof org.hl7.hibernate.ClonableCollection)
veryImportantPersonCode = ((org.hl7.hibernate.ClonableCollection<CE>) veryImportantPersonCode).cloneHibernateCollectionIfNecessary();
_veryImportantPersonCode = veryImportantPersonCode;
}
COM: <s> sets the property very important person code </s>
|
funcom_train/27905445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cekIfVarTypeIsInt(Node ex) {
SymbolTable table = getSymbolTable();
String idSymb = symStack.top();
if (table.getSymbol(idSymb).getType() != TYPE_INT ) {
typeError(ex, "type mismatched in assignment statement");
}
}
COM: <s> method to check if a variable type is an integer </s>
|
funcom_train/35677877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFromHostPartialDataPastOffset() {
try {
byte[] hostSource = HostData.toByteArray("c1c2c3c4");
String javaString = CobolStringSimpleConverter.fromHostSingle(
US_HOST_CHARSET, 4, hostSource, 4);
assertTrue(null == javaString);
} catch (CobolConversionException e) {
fail(e.getMessage());
}
}
COM: <s> case where the mainframe data has already been exhausted we are past the </s>
|
funcom_train/49318941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShow(boolean show) {
JFrame parent = SwingUtil.getFrame(this);
if (parent != null) {
parent.setVisible(show);
if (show) {
int hdu = _fitsImage.getCurrentHDUIndex();
_table.getSelectionModel().setSelectionInterval(hdu, hdu);
SwingUtil.showFrame(parent);
}
}
}
COM: <s> show or hide the top level window </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.