__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/31754274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deflate() {
if (!isInflated())
return;
updateAutoGenDisplayName();
for (Iterator<Map.Entry<String, DataBlockGroup>> it = getDataBlockGroupMap().entrySet().iterator(); it.hasNext();) {
DataBlockGroup blockGroup = it.next().getValue();
blockGroup.deflate();
if (blockGroup.isEmpty())
it.remove();
}
if (refStruct instanceof StructLocal) {
setStructLocalAttributes((StructLocal) refStruct);
}
setRefStruct(null);
}
COM: <s> scans all data block groups its containing data blocks and data fields and </s>
|
funcom_train/141053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addToArgumentDictionary(String[] args) {
for(int i=0; i<args.length; i+=2)
{
if(Arguments.getValue(args[i])!=null)
ArgumentValues.put(Arguments.getValue(args[i]), args[i+1]);
}
return true;
}
COM: <s> adds argument to dictionary </s>
|
funcom_train/19845368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getWidth(String whatchars) {
int totalwidth = 0;
IntObject intObject = null;
int currentChar = 0;
for (int i = 0; i < whatchars.length(); i++) {
currentChar = whatchars.charAt(i);
if (currentChar < 256) {
intObject = charArray[currentChar];
} else {
intObject = (IntObject) customChars.get(new Character(
(char) currentChar));
}
if (intObject != null)
totalwidth += intObject.width;
}
return totalwidth;
}
COM: <s> get the width of a given string </s>
|
funcom_train/9431072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteDatabase() {
close();
if (mPath == null) return;
try {
new File(mPath).delete();
if (DBG) Log.d(TAG, "deleted " + mPath);
} catch (Exception e) {
Log.w(TAG, "couldn't delete " + mPath, e);
}
}
COM: <s> deletes the database file </s>
|
funcom_train/7876071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShowOkCancel(boolean showOkCancel) {
if (this.showOkCancel == showOkCancel) {
return;
}
boolean old = this.showOkCancel;
this.showOkCancel = showOkCancel;
windowpanel = null;
firePropertyChange("showOkCancel", old, showOkCancel);
}
COM: <s> setter for property show ok cancel </s>
|
funcom_train/46158683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getPositionAsTime(int x) {
int leftX = leftMargin + labelBounds.width + labelGap;
int rightX = getWidth() - rightMargin;
x = (x < leftX) ? leftX : ((x > rightX) ? rightX : x);
return ((double) (x - leftX) / (double) (rightX - leftX)) * timelineDuration;
}
COM: <s> get the specified x position as a time </s>
|
funcom_train/33606030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEdge(int a,int b,int w){
if(a>b){int c=a;a=b;b=c;}
if(validEdge(a,b,w)){g.addEdge(a,b,w);}
}
COM: <s> override add edge method to ensure ordering of vertices </s>
|
funcom_train/3534774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProjectName(final String name) {
assertNotNull(this.release);
final Package pkg = this.release.getPackage();
assertNotNull(pkg);
final Project project = pkg.getProject();
assertNotNull(project);
this.log("Setting projectname: " + name);
project.setName(name);
}
COM: <s> called when the code projectname code xml attribute is encountered </s>
|
funcom_train/1578559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final private String formatNF(double x) {
// "<=" catches -0.0000000000000005
// should be rounded to -0.000000000000001 (15 d.p.)
// but nf.format(x) returns "-0"
if (-PRINT_PRECISION / 2 <= x && x < PRINT_PRECISION / 2) {
// avoid output of "-0" for eg -0.0004
return "0";
} else {
// standard case
return nf.format(x);
}
}
COM: <s> uses current number format nf to format a number </s>
|
funcom_train/18947016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(URL url) throws IOException {
World.getInstance().setAcceptObjects( false );
XMLEncoder xml = new XMLEncoder( new FileOutputStream( url.getFile() ) );
xml.writeObject( this );
xml.close();
World.getInstance().setAcceptObjects( true );
// successfull saved
state = SAVED;
}
COM: <s> uses the xmlencoder to save the object </s>
|
funcom_train/7640616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AllocationInfo getAllocationSelection(ISelection selection) {
if (selection == null) {
selection = mAllocationViewer.getSelection();
}
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection)selection;
Object object = structuredSelection.getFirstElement();
if (object instanceof AllocationInfo) {
return (AllocationInfo)object;
}
}
return null;
}
COM: <s> returns the current allocation selection or code null code if none is found </s>
|
funcom_train/36949334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeFromParentInfo(Openable child) {
Openable parent = (Openable) child.getParent();
if (parent != null && parent.isOpen()) {
try {
RubyElementInfo info = (RubyElementInfo) parent.getElementInfo();
info.removeChild(child);
} catch (RubyModelException e) {
// do nothing - we already checked if open
}
}
}
COM: <s> removes the given element from its parents cache of children </s>
|
funcom_train/41778488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void publishPresenceMessage(PresenceMessage message_content) {
if (presence == null)
return;
Message message = new Message(Message.TYPE_PRESENCE, message_content);
System.out.println("before synchsend");
super.synchronizedSend(message.marshall());
System.out.println("after synchsend");
}
COM: <s> send presence message with type message </s>
|
funcom_train/41523632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void alUpdateTrialSelected(ActionEvent event) {
Trial trial = (Trial) selectRowFromEvent(event, Trial.class);
if (trial != null) {
Command cmd = getCommand(LoadTrial.class);
((LoadTrial) cmd).setTrialCode(trial.getCode());
cmd = runCommand(cmd);
getSession().setTrial(((LoadTrial) cmd).getResult());
}
}
COM: <s> it retrieve trial from action event and update selected trial into session </s>
|
funcom_train/44585557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IClasspathEntry getClasspathEntryFor(IPath path) throws JavaModelException {
getResolvedClasspath(); // force resolution
PerProjectInfo perProjectInfo = getPerProjectInfo();
if (perProjectInfo == null)
return null;
Map rootPathToResolvedEntries = perProjectInfo.rootPathToResolvedEntries;
if (rootPathToResolvedEntries == null)
return null;
return (IClasspathEntry) rootPathToResolvedEntries.get(path);
}
COM: <s> returns the classpath entry that refers to the given path </s>
|
funcom_train/26589783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object createFullTextIndex(Object tableName,String indexName,String[] columnName) throws DException{
QualifiedIdentifier identifier = (QualifiedIdentifier)tableName;
String tokenTableName = createTokenTable(identifier,indexName);
String locationTableName = createLocationTable(identifier,indexName);
return new String[]{tokenTableName,locationTableName};
}
COM: <s> this method performs token and location tables and required indexes </s>
|
funcom_train/35692075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isImmediate() {
if (_immediate != null) {
return _immediate.booleanValue();
}
ValueBinding vb = getValueBinding("immediate");
Boolean v =
vb != null ? (Boolean) vb.getValue(getFacesContext()) : null;
return v != null ? v.booleanValue() : DEFAULT_IMMEDIATE;
}
COM: <s> p return the value of the code immediate code property </s>
|
funcom_train/1170018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeColorChanges(String s, Card c, boolean addTo, long timestamp) {
Card_Color removeCol = null;
for (Card_Color cc : globalColorChanges)
if (cc.equals(s, c, addTo, timestamp))
removeCol = cc;
if (removeCol != null)
globalColorChanges.remove(removeCol);
}
COM: <s> p remove color changes </s>
|
funcom_train/39872071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCustomData(Object data) {
// NOTE: WebHistoryItems are used in multiple threads. However, the
// public facing apis are all getters with the exception of this one
// api. Since this api is exclusive to clients, we don't make any
// promises about thread safety.
mCustomData = data;
}
COM: <s> set the custom data field </s>
|
funcom_train/45062039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNextLine() throws TextLineReaderException{
String sReturn = null;
if (miIndex + 1 < mvecLines.size() ){
miIndex++;
sReturn = (String)mvecLines.get(miIndex);
}
else {
throw new TextLineReaderException("No lines remaining in TextLineIterator.");
}
return sReturn;
}
COM: <s> returns the next line and advances the index </s>
|
funcom_train/11731745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPathValue(Document doc, String fieldName, Path internalValue) {
String pathString = internalValue.toString();
try {
pathString = resolver.getJCRPath(internalValue);
} catch (NamespaceException e) {
// will never happen
}
doc.add(createFieldWithoutNorms(fieldName, pathString,
PropertyType.PATH));
}
COM: <s> adds the path value to the document as the named field </s>
|
funcom_train/24523808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void collide() {
//Oh no, we have collision. Stay calm
//First we stop walking and reset sliding
moving = false;
slideX = 0;
slideY = 0;
//Now it's time to revert the moving
switch(heading) {
case UP:
location.setY(location.getY() + 1);
break;
case RIGHT:
location.setX(location.getX() - 1);
break;
case DOWN:
location.setY(location.getY() - 1);
break;
case LEFT:
location.setX(location.getX() + 1);
break;
}
}
COM: <s> stops the object after a collision </s>
|
funcom_train/22441189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void formatPartitions(IDocument document, IRegion region) {
addPartitioningUpdater(document);
try {
TypedPosition[] ranges = getPartitioning(document, region);
if (ranges != null) {
for (int i = 0; i < ranges.length; i++) {
TypedPosition range = ranges[i];
IFormattingStrategy s = getFormattingStrategy(range.getType());
if (s != null) {
formatRegion(document, s, range);
}
}
}
} catch (BadLocationException x) {}
removePartitioningUpdater(document);
}
COM: <s> determines the partitioning of the given region of the document </s>
|
funcom_train/21470657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final Widget widget, Widget header, double headerSize) {
layoutPanel.add(header);
layoutPanel.add(widget);
layoutPanel.setWidgetLeftRight(header, 0, Unit.PX, 0, Unit.PX);
layoutPanel.setWidgetLeftRight(widget, 0, Unit.PX, 0, Unit.PX);
LayoutData data = new LayoutData(widget, header, headerSize);
layoutData.add(data);
if (visibleWidget == null) {
visibleWidget = widget;
}
GWT.log("Accordion widget add", null);
if (isVisible()) {
animate(250);
}
}
COM: <s> adds a child widget to this stack along with a widget representing the </s>
|
funcom_train/29410818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(String id, String attribute, String value) {
if (!attributes.containsKey(id)) {
add(id, attribute, value);
return;
}
if (!attributes.get(id).containsKey(attribute)) {
add(id, attribute, value);
return;
}
attributes.get(id).put(attribute, value);
dirty = true;
}
COM: <s> sets the value of the attribute </s>
|
funcom_train/3360289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(int units, String unitsName) {
if (unitsName == null) {
unitsName = "";
}
float []vals = getPrintableArea(units);
String str = "("+vals[0]+","+vals[1]+")->("+vals[2]+","+vals[3]+")";
return str + unitsName;
}
COM: <s> returns a string version of this rectangular size attribute in the </s>
|
funcom_train/12562211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyRecordAddedListeners(int recordId) {
synchronized (recordListener) {
if (Logging.REPORT_LEVEL <= Logging.INFORMATION) {
Logging.report(Logging.INFORMATION, LogChannels.LC_RMS,
"notify Add # listener = " +
recordListener.size());
}
int numListeners = recordListener.size();
for (int i = 0; i < numListeners; i++) {
RecordListener rl =
(RecordListener)recordListener.elementAt(i);
rl.recordAdded(this, recordId);
}
}
}
COM: <s> notifies all registered listeners that a record was added </s>
|
funcom_train/50858510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getCommand(String name) throws ApplicationException {
Object result = null;
try {
Component component = (Component)commands.get(name);
if(component != null) {
ComponentFactory factory = new ComponentFactory();
result = factory.getInstance(component);
}
} catch(Exception e) {
Debug.log(e);
throw new ApplicationException(e);
}
return result;
}
COM: <s> returns command by name </s>
|
funcom_train/18746760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CtrlGuard getInit() {
CtrlGuard result = new CtrlGuard();
for (CtrlTransition trans : getTransitions()) {
CtrlCall call = trans.getCall();
if (call.isOmega()) {
result = null;
break;
} else {
result.add(trans);
}
}
return result;
}
COM: <s> returns the set of rule names of outgoing transitions or </s>
|
funcom_train/14229163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void release(String address, CallId call) throws RawStateException {
// For the emulator, phones and addresses have a 1:1 relationship
RawPhone phone = this.getPhone(address);
Leg leg = null;
if (phone != null)
leg = ((RawCall)call).getLeg(phone);
if (leg != null)
leg.drop();
else
throw new RawStateException(call, address, null,
javax.telephony.InvalidStateException.CONNECTION_OBJECT,
javax.telephony.TerminalConnection.UNKNOWN);
}
COM: <s> release a terminal from a call </s>
|
funcom_train/2269271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void turn(float angle, Vector3d direction) {
float camDist = getCamDistance();
System.out.println("CAM-LAP: " + camDist);
Vector3d dV = new Vector3d(direction);
dV.setLength(camDist * (float) Math.tan(angle / 180f * 3.1415f));
System.out.println("dV: " + dV.getLength());
Vector3d newLAP = new Vector3d();
newLAP.makeSum(lookAtPoint, dV);
setLookAtPoint(newLAP);
}
COM: <s> turn camera by some angle in degrees </s>
|
funcom_train/35023681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration getSupportedPortletModes() {
if (portletModes == null) {
portletModes = new Vector();
Enumeration enumeration = new Vector(config.getSupportedPortletModes()).elements();
while (enumeration.hasMoreElements()) {
portletModes.add(
new PortletMode(enumeration.nextElement().toString()));
}
}
return portletModes.elements();
}
COM: <s> get an enumeration of all code portlet mode code s supported by this </s>
|
funcom_train/8177237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createNewWorkflow() {
if (getCellCount(graph) > 0) {
int r = JOptionPane.showConfirmDialog(this.getContentPane(),
"Are you sure that you want to create a new workflow?",
"New Workflow", JOptionPane.YES_NO_OPTION);
if (r == JOptionPane.OK_OPTION) {
// graph = createGraph();
resetGraph();
}
}
}
COM: <s> creates new and empty workflow </s>
|
funcom_train/14051979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValue(JEANBackEnd backEnd, String aname) {
String name = aname;
if ((aname != null) && aname.endsWith(")")) {
int lastLeft = aname.lastIndexOf('(');
if (lastLeft > 0) {
name = aname.substring(0,lastLeft).trim();
}
}
return linkFromString(backEnd,name,(String) value);
}
COM: <s> used in initialisation </s>
|
funcom_train/4871927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeSourceEContractsURLs(String[] sourceFilesURLs){
// Get source eContracts URLs from parameter Strings
URL newURL;
for(int i=0; i<sourceFilesURLs.length; i++){
try {
newURL = new URL(sourceFilesURLs[i]);
if (sourceEcontractURLs.contains(newURL)){
sourceEcontractURLs.remove(newURL);
}
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
}
COM: <s> remove some e contracts source file urls from the e contracts source file </s>
|
funcom_train/22536269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getPropertyValue(Object propertyId) {
if (IS_VISIBLE_PROP.equals(propertyId)) {
return getIsVisible();
}
else if(PARAMETERS_PROP.equals(propertyId)) {
return getParameters();
}
else if(WHEN_TO_COMPLETE_PROP.equals(propertyId)) {
return getWhenToComplete();
}
return super.getPropertyValue(propertyId);
}
COM: <s> get the property value for each one of the properties that will </s>
|
funcom_train/2289945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceResource(String resourcename, int type, byte[] content, List properties) throws CmsException {
CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION);
getResourceType(resource).replaceResource(this, m_securityManager, resource, type, content, properties);
}
COM: <s> replaces the content type and properties of a resource </s>
|
funcom_train/35672049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoadModelNonExisting() {
Cob2TransGeneratorMain main = new Cob2TransGeneratorMain();
try {
main.execute(new String[0]);
fail();
} catch (Exception e) {
assertEquals("java.lang.IllegalArgumentException:"
+ " Input file or folder 'cobol' not found",
e.getMessage());
}
}
COM: <s> test loading a non existing configuration </s>
|
funcom_train/13675867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLastLogin() {
//hold the last one for this session
m_LastLogin = m_Preferences.getLastLogin();
//overwrite the persisted one
m_Preferences.setLastLogin(
StringUtil.getFormattedDate() +
" from " +
getRequest().getRemoteHost()
);
}//setLastLogin
COM: <s> fetches the last login from the users </s>
|
funcom_train/28268372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decrypt(char[] data, int offset, int end) {
for (; offset < end; offset += 4) {
xL = unpackInt(data, offset);
xR = unpackInt(data, offset + 2);
decrypt();
packInt(xR, data, offset);
packInt(xL, data, offset + 2);
}
}
COM: <s> decrypt char array in place </s>
|
funcom_train/50342318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JComboBox matchingComboBox(String mfg, String family, String decoderMfgID, String decoderVersionID, String decoderProductID, String model ) {
List<DecoderFile> l = matchingDecoderList(mfg, family, decoderMfgID, decoderVersionID, decoderProductID, model );
return jComboBoxFromList(l);
}
COM: <s> get a jcombo box representing the choices that match </s>
|
funcom_train/4396951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String read() {
try {
String inputLine = in.readLine().trim();
if( log.isDebugEnabled() ) { log.debug( "Read Input: " + inputLine ); }
return inputLine;
}
catch( IOException ioe ) {
log.error( "Error reading from socket.", ioe );
throw new RuntimeException();
}
}
COM: <s> reads a line from the input stream and returns it </s>
|
funcom_train/50696644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBond(SmilesBond bond) {
if (bondsCount >= bonds.length) {
SmilesBond[] tmp = new SmilesBond[bonds.length * 2];
System.arraycopy(bonds, 0, tmp, 0, bonds.length);
bonds = tmp;
}
bonds[bondsCount] = bond;
bondsCount++;
}
COM: <s> add a bond to the atom </s>
|
funcom_train/20646031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPanel(final JPanel jp, int index) {
if (index < 0 || index > dataView.getComponentCount()) {
index= -1;
}
// add listeners
jp.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
clicked(jp);
}
});
addFocusListener(jp, jp);
jp.setBorder(DEFAULT_BORDER);
dataView.add(jp,index);
refresh();
if (focusOnAdd)
clicked(jp);
}
COM: <s> add a jpanel to the list </s>
|
funcom_train/29558737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double max() {
if (size() == 0) {
throw new IllegalStateException("cannot find maximum of an empty list");
}
double max = _data[_pos - 1];
for (int i = _pos - 1; i-- > 0;) {
if ( _data[_pos] > max ) {
max = _data[_pos];
}
}
return max;
}
COM: <s> finds the maximum value in the list </s>
|
funcom_train/44623645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JCVariableDecl makeVariableDecl(Name name, Type type, /*@Nullable*/ JCExpression init, int pos) {
JmlTree.Maker factory = JmlTree.Maker.instance(context);
VarSymbol vsym = new VarSymbol(0, name, type, null);
vsym.pos = pos;
JCVariableDecl decl = factory.at(pos).VarDef(vsym,init);
return decl;
}
COM: <s> makes an attributed node representing a new variable declaration </s>
|
funcom_train/14396181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expectToken(int aTokenType, String aToken) throws ParseException {
if(theTokenizer.getTokenType() != aTokenType ||
!theTokenizer.getToken().equalsIgnoreCase(aToken)) {
handleTokenError(MOFParserException.EXPECTTOKEN_UNEXPECTED_TOKEN,
"\""+aToken+"\" "+MOFTokenizer.getTokenTypeString(aTokenType)+" expected");
}
}
COM: <s> checks if the actual token is the expected one </s>
|
funcom_train/42822719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getReportBugsCommand() {
if (reportBugsCommand == null) {//GEN-END:|151-getter|0|151-preInit
// write pre-init user code here
reportBugsCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|151-getter|1|151-postInit
// write post-init user code here
}//GEN-BEGIN:|151-getter|2|
return reportBugsCommand;
}
COM: <s> returns an initiliazed instance of report bugs command component </s>
|
funcom_train/32656157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printAttribute(int offset, ExceptionsAttribute attribute) {
print(" " + attribute.getType() + " {");
println();
ExceptionEntry[] exceptions = attribute.getExceptions();
for(int i=0; i < exceptions.length; i++) {
ExceptionEntry exception = exceptions[i];
print(offset+2, exception.toString() + " " +
exception.resolve(constPool));
println();
}
print(offset, "}");
}
COM: <s> prints exceptions attribute entry </s>
|
funcom_train/26207441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsSet(FzySet aSet) throws IllegalArgumentException {
if (aSet == null) throw new IllegalArgumentException("Fuzzy Set cannot be null!");
for(int inx = 0; inx < sets.size(); inx++){
if(((FzySet)sets.elementAt(inx)).equals(aSet.getID())) return true;
}
return false;
}
COM: <s> returns a boolean if this attribute contains the given fzy set </s>
|
funcom_train/7511849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
DockPanel dockPanel = new DockPanel();
dockPanel.setStyleName("dock");
Panel toppanel = getTopPanel();
Panel bottompanel = getBottomPanel();
dockPanel.add(toppanel,DockPanel.NORTH);
dockPanel.setCellHeight(toppanel, "50px");
dockPanel.add(getCenterPanel(), DockPanel.CENTER);
dockPanel.add(bottompanel,DockPanel.SOUTH);
dockPanel.setCellHeight(bottompanel, "50px");
dockPanel.add(getMenupanel(), DockPanel.WEST);
RootPanel.get().add(dockPanel);
}
COM: <s> this is the entry point method </s>
|
funcom_train/21776430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFilter(Filter filter, FILTER_TYPES filterType)
{
filters.put(filterType.toString(), filter);
filterManager.addFilter(filter);
int numEntries = loadVocabulary(filterManager);
showStatus("Общо думи: " + numEntries);
scrVocabulary.getViewport().validate();
scrVocabulary.getViewport().repaint();
}
COM: <s> adds a filter to the list with filters and into the filter manager </s>
|
funcom_train/11426155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getActions() {
String result = actions;
if (result == null) {
StringBuffer sb = new StringBuffer();
boolean comma = false;
int mask = action_mask;
if ((mask & ACTION_READ) == ACTION_READ) {
sb.append(READ);
comma = true;
}
if ((mask & ACTION_IMPORT) == ACTION_IMPORT) {
if (comma)
sb.append(',');
sb.append(IMPORT);
}
if ((mask & ACTION_EXPORT) == ACTION_EXPORT) {
if (comma)
sb.append(',');
sb.append(EXPORT);
}
actions = result = sb.toString();
}
return result;
}
COM: <s> returns the canonical string representation of the actions </s>
|
funcom_train/24233543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void volatileRender(Graphics g, int x, int y, int w, int h) {
do {
if (updatePending
|| volatileImage == null
|| volatileImage.validate(getGraphicsConfiguration()) != VolatileImage.IMAGE_OK) {
bufferLock.lock();
try {
updatePending = false;
renderVolatileImage(currentImage);
} finally {
bufferLock.unlock();
}
}
g.drawImage(volatileImage, x, y, w, h, null);
} while (volatileImage.contentsLost());
}
COM: <s> renders to a volatile image and then paints that to the screen </s>
|
funcom_train/27822270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize() {
// if a subclass hasn't fixed the renderer, then simply fix it now
if (!(getDefaultRenderer(Boolean.class) instanceof BooleanRendererFixed))
setDefaultRenderer(Boolean.class,new BooleanRendererFixed());
getActionMap().put("startEditing",new StartEditingAction());
}
COM: <s> initializes this object </s>
|
funcom_train/12169706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyWidthToChild(StyleValue parent, Styles child) {
if (null != parent) {
if (StyleValueType.PERCENTAGE == parent.getStyleValueType()) {
parent = StyleValueFactory.getDefaultInstance().getPercentage(
null, 100.0);
}
child.getPropertyValues().setComputedAndSpecifiedValue(
StylePropertyDetails.WIDTH, parent);
}
}
COM: <s> sets width style in child styles according to style value provided if the </s>
|
funcom_train/6351149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SmdpAddManager getAddManager() {
SmdpAddManager smdpAddManager= null;
if(this.useDbSystem) {
smdpAddManager= new SmdpAddManager(this.smdpDatabaseManager);
} else {
smdpAddManager= new SmdpAddManager(this.smdpNetworkManager);
}
return(smdpAddManager);
}
COM: <s> gives a add manager object used to add files to the datasource </s>
|
funcom_train/27754622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
prefStore = ColorerPlugin.getDefault().getPreferenceStore();
prefStore.addPropertyChangeListener(this);
composite = createComposite(parent);
makeActions();
contributeToActionBars();
getSite().getWorkbenchWindow().getSelectionService().addPostSelectionListener(thisSelectionListener);
propertyChange(null);
}
COM: <s> this is a callback that will allow us </s>
|
funcom_train/45692304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMuteStatusPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SongEventMuteStatus_muteStatus_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SongEventMuteStatus_muteStatus_feature", "_UI_SongEventMuteStatus_type"),
EsxPackage.Literals.SONG_EVENT_MUTE_STATUS__MUTE_STATUS,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the mute status feature </s>
|
funcom_train/41178621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onSuccess(Object result) {
boolean itWorked = false;
if ( result != null ) {
itWorked = true;
if ( result instanceof Boolean )
itWorked = ((Boolean) result).booleanValue();
}
if ( itWorked ) {
inputPanel.hide();
if (onSuccess != null)
DeferredCommand.addCommand(onSuccess);
} else {
displayError("The desired change did not succeed", null);
}
}
COM: <s> if the result is null this is interpreted as failure </s>
|
funcom_train/3155993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createFile() throws IOException {
File leafFile = _qtFile.createLeafFile(_layerIndex);
leafFile.createNewFile();
RandomAccessFile randomAccessFile = new RandomAccessFile(leafFile, "rw");
randomAccessFile.setLength(_numFloats * 4);
randomAccessFile.close();
_outStream = new FileImageOutputStream(leafFile);
}
COM: <s> creates the disk file associated to this leaf </s>
|
funcom_train/3673695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serialize( java.io.File aFile) {
try {
FileOutputStream lFile = new FileOutputStream(aFile);
ObjectOutputStream nns = new ObjectOutputStream(lFile);
nns.writeObject(this);
nns.close();
}
catch ( IOException e ) { System.err.println( e ); }
} //try
COM: <s> the method serialize serialisiert the current condition new ralnetwork </s>
|
funcom_train/39185224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File fileobj) {
String extension = "";
if(fileobj.getPath().lastIndexOf('.') > 0)
extension = fileobj.getPath().substring(fileobj.getPath().lastIndexOf('.') + 1).toLowerCase();
if(extension != "")
return extension.equals("grid");
else
return fileobj.isDirectory();
}
COM: <s> returns whether or not file contains the project file extension </s>
|
funcom_train/32913181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getSelectedRows() {
// Object is stored in the last column
if (isRowSelected()) {
int[] rows = jtable.getSelectedRows();
Vector values = new Vector();
for (int i=0; i<rows.length;i++) {
values.add(list.getValueAt(sorter.modelIndex(rows[i])));
}
return values;
} else {
return new Vector();
}
}
COM: <s> returns a vector of objects for the selected rows </s>
|
funcom_train/5154335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double variance(int n, int nt) {
double dn = n, dnt = nt;
double var = 0;
double mu = mean(n, nt);
double kr = (dn + 1) * (2 * dn + 1) * dn / 6;
double krrp = dn / 2 * (dn + 1);
krrp = krrp * krrp - kr;
var = (dnt * (dnt - 1)) / (dn * (dn - 1)) * krrp + dnt / dn * kr - mu * mu;
return var;
}
COM: <s> variance for a given n and n t </s>
|
funcom_train/11693017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPointToNearestCluster(Vector point, Iterable<Cluster> clusters) {
Cluster closestCluster = null;
double closestDistance = Double.MAX_VALUE;
for (Cluster cluster : clusters) {
double distance = measure.distance(cluster.getCenter(), point);
if (closestCluster == null || closestDistance > distance) {
closestCluster = cluster;
closestDistance = distance;
}
}
closestCluster.observe(point, 1);
}
COM: <s> sequential implementation to add point to the nearest cluster </s>
|
funcom_train/28667356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dragGestureRecognized( DragGestureEvent event){
selnode=null;
dropnode=null;
Object selected =getSelectionPath();
TreePath treepath=(TreePath)selected;
selnode=(DefaultMutableTreeNode)treepath.getLastPathComponent();
if ( selected != null ){
StringSelection text = new StringSelection( selnode.toString());
dragSource.startDrag (event, DragSource.DefaultMoveDrop, text, this);
}
else{
}
}
COM: <s> internally implemented do not override </s>
|
funcom_train/23467517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExposePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GroundTemplate_expose_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GroundTemplate_expose_feature", "_UI_GroundTemplate_type"),
TemplatePackage.Literals.GROUND_TEMPLATE__EXPOSE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the expose feature </s>
|
funcom_train/41687274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateExpressivity(ATermAppl i, ATermAppl c) {
// if the tbox or rbox changed then we cannot use incremental reasoning!
if( !isChanged() || isTBoxChanged() || isRBoxChanged() )
return;
// update status
status = UNCHANGED;
// update expressivity given this individual
expressivity.processIndividual( i, c );
// update the size estimate as this could be a new individual
estimate = new SizeEstimate( this );
}
COM: <s> this method is used for incremental reasoning </s>
|
funcom_train/48090159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() throws IOException {
kvmCapable = getBooleanProperty(PropertyKey.KVMCapable);
int typeId = nativeGrabber.getDeviceType();
deviceType = DeviceType.getDeviceType(typeId);
if (deviceType == DeviceType.UNKNOWN) {
String deviceName = nativeGrabber.getDeviceName();
deviceType = DeviceType.getDeviceType(typeId, deviceName);
}
}
COM: <s> final stage of initialization </s>
|
funcom_train/1838947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addItemPostDatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ThreadItem_itemPostDate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ThreadItem_itemPostDate_feature", "_UI_ThreadItem_type"),
MindmapPackage.Literals.THREAD_ITEM__ITEM_POST_DATE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the item post date feature </s>
|
funcom_train/3304123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void firePropertyChange(Object bean, String property, Object value) {
String type = bean.getClass().getName();
if (beans.containsKey(type)) {
PropertyChangeSupport notifier = (PropertyChangeSupport) beans.get(type);
PropertyChangeEvent evt = new PropertyChangeEvent(bean, property, null, value);
notifier.firePropertyChange(evt);
}
}
COM: <s> fire a property change event </s>
|
funcom_train/23453348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addContactInformationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Profile_contactInformation_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Profile_contactInformation_feature", "_UI_Profile_type"),
ProfilePackage.Literals.PROFILE__CONTACT_INFORMATION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the contact information feature </s>
|
funcom_train/4481440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float checkProgress( Vector3f point , float precision ) {
precision = 1f/precision;
float f;
for ( f = 0; f < length; f += precision ) {
Vector3f a = getPointByLength(f);
Vector3f b = getPointByLength(f+1);
pl.setConstant(b.subtract(a).dot(a));
pl.setNormal(b.subtract(a));
// if ( Util.nearEqual(point, this.getPointByLength(f), .25f)) return f;
if ( pl.pseudoDistance(point) < .5f ) return f;
}
return -1f;
}
COM: <s> returns the length traversed along the curve of a point </s>
|
funcom_train/10238175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextFieldURL() {
if (jTextFieldURL == null) {
jTextFieldURL = new JTextField();
jTextFieldURL.setBounds(new Rectangle(86, 24, 264, 26));
jTextFieldURL.setText(ns.getNetworkSettings().getUrl());
}
return jTextFieldURL;
}
COM: <s> this method initializes j text field url </s>
|
funcom_train/22077122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(IdentifiantComponent identifiant) {
List identifiants = (List) ExecutionContext.get().getSession()
.getAttribute(ConsoleCst.IDS_SESSION_BEAN);
try {
identifiantService.save(identifiant, identifiants);
} catch (IdentifiantException e) {
log.error(e);
}
ExecutionContext.get().getSession().setAttribute(ConsoleCst.IS_APPLICATION_MODIFIED,ConsoleCst.APPLICATION_MODIFIED);
}
COM: <s> action to save an identifiant component in the lis in session </s>
|
funcom_train/28672791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addValueRefPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EntryType_valueRef_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EntryType_valueRef_feature", "_UI_EntryType_type"),
BeansPackage.Literals.ENTRY_TYPE__VALUE_REF,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the value ref feature </s>
|
funcom_train/26483773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void convertFormulas() throws SAXException {
if (formulasToConvert != null) {
for (Iterator iter = formulasToConvert.values().iterator();
iter.hasNext(); )
{
FormulaConversion fc = (FormulaConversion)iter.next();
Formula f = fc.formula;
try {
f.setEditableExpression(fc.expression);
}
catch (IllegalArgumentException iae) {
String msg = I18N.get("ReportReader.the_formula")
+ ' ' + f.getName() + ' '
+ I18N.get("ReportReader.formula_unknown_name");
throw new SAXException(msg);
}
}
}
}
COM: <s> revisits each formula and let it convert formula names to </s>
|
funcom_train/42536099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o){
if(!(o instanceof PutReq))return false;
if(o == this)return true;
PutReq oo = (PutReq)o;
return (((Object)url).equals(oo.url))&&(((Object)ver).equals(oo.ver));
}
COM: <s> is the given object equal to this put req </s>
|
funcom_train/12174269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBackgroundPosition(Element element, String attribute) {
StyleValue pair = styles.getStyleValue(
StylePropertyDetails.BACKGROUND_POSITION);
if (pair != null && pair instanceof StylePair) {
StyleValue first = ((StylePair) pair).getFirst();
StyleValue second = ((StylePair) pair).getSecond();
doAddLengthPair(first, second, element, attribute,
LengthUnit.PX);
}
}
COM: <s> add the background position to the specified element </s>
|
funcom_train/50340611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSignalMast(NamedBeanHandle<SignalMast> sh) {
if (mMast != null) {
mMast.removePropertyChangeListener(this);
}
mMast = sh.getBean();
if (mMast != null) {
getIcons();
displayState(mastState());
mMast.addPropertyChangeListener(this);
namedMast = sh;
pName=sh.getName();
}
}
COM: <s> attached a signalmast element to this display item </s>
|
funcom_train/35951097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdExit() {
if (cmdExit == null) {//GEN-END:|18-getter|0|18-preInit
// write pre-init user code here
cmdExit = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit
// write post-init user code here
}//GEN-BEGIN:|18-getter|2|
return cmdExit;
}
COM: <s> returns an initiliazed instance of cmd exit component </s>
|
funcom_train/46209687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getModuleName() {
String name = this.getProperty(MODULE_NAME_KEY);
if (name == null) {
if (_filename != null && _filename.length() > 0) {
name = new File(_filename).getName();
}
if (name == null) {
name = "";
} else {
this.setProperty(MODULE_NAME_KEY, name);
}
}
return name;
}
COM: <s> the name of the module as set using code set module name code </s>
|
funcom_train/43468075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStatus(String pstrName) {
int getStatus = 0;
/** Lower case to allow for case insensitive keys. **/
CntxtEntry objCntxtEntry = (CntxtEntry)getEntries().get(pstrName.toLowerCase());
if (objCntxtEntry != null) {
getStatus = objCntxtEntry.getStatus();
}
return getStatus;
}
COM: <s> get status of context entry from context </s>
|
funcom_train/46620531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addViolation(String file, MAuditParser.Violation entry) {
Vector violations = (Vector) auditedFiles.get(file);
// if there is no decl for this file yet, create it.
if (violations == null) {
violations = new Vector();
auditedFiles.put(file, violations);
}
violations.addElement(entry);
}
COM: <s> add a violation entry for the file </s>
|
funcom_train/18786861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(Object bean, int index, Object value) {
assert ((bean != null) && isMultiple);
try {
PropertyUtils.setProperty(bean, property, value);
} catch (InvocationTargetException e) {
log.error(e);
} catch (NoSuchMethodException e) {
log.error(e);
} catch (IllegalAccessException e) {
log.error(e);
}
}
COM: <s> sets the indexed property of a data object described in the node type </s>
|
funcom_train/51641385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void linkToEditor(IStructuredSelection selection) {
Object obj= selection.getFirstElement();
if (selection.size() == 1) {
IEditorPart part= EditorUtility.isOpenInEditor(obj);
if (part != null) {
IWorkbenchPage page= getSite().getPage();
page.bringToTop(part);
if (obj instanceof IJavaElement)
EditorUtility.revealInEditor(part, (IJavaElement) obj);
}
}
}
COM: <s> links to editor if option enabled </s>
|
funcom_train/36538658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PhrasesBatch specifyBatchName(String initName){
SpecifyBatchNameDialog nameDialog = new SpecifyBatchNameDialog(this, initName);
nameDialog.setVisible(true);
if(nameDialog.getPressedButton() == SpecifyBatchNameDialog.BTN_OK) {
PhrasesBatch newBatch = new PhrasesBatch();
newBatch.setName(nameDialog.getBatchName());
return newBatch;
}
return null;
}
COM: <s> launches specify batch name dialog </s>
|
funcom_train/44837795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLastName(String lastName) throws RemoteException {
// Validate first
if (lastName.equals(String.valueOf(""))) {
// Not valid
throw new RemoteException("Not a valid last name");
}
// It's okay, save it
this.lastName = lastName;
}
COM: <s> sets the last name of the person </s>
|
funcom_train/36462855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getArrayType(OMElement el) {
OMAttribute arrayType =
el.getAttribute(
new QName(IConstants.SOAPENC_NS, "arrayType"));
if(arrayType == null)
return null;
// TODO this probably won't always work
return arrayType.getAttributeValue().replaceFirst("\\[.*\\]", "");
}
COM: <s> parse the array type from an array parent element </s>
|
funcom_train/964638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLayoutDeserializedPanel() {
JPanel panel = createSamplePanel();
ByteArrayOutputStream out = new ByteArrayOutputStream();
serialize(out, panel);
byte[] bytes = out.toByteArray();
InputStream in = new ByteArrayInputStream(bytes);
JPanel panel2 = (JPanel) deserialize(in);
panel2.doLayout();
}
COM: <s> tests that the a panel can be laid out with a deserialized </s>
|
funcom_train/6481507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populateGraphData() {
nodes = new TreeSet<Node>();
for (Iterator<SimpleAID> i = displayAgentIDs.iterator(); i.hasNext();) {
SimpleAID aid = i.next();
Node n = new Node(aid);
nodes.add(n);
}
edges = new ArrayList<Edge>();
for (Iterator<InteractionRecord> i = displayInteractionRecords.iterator(); i.hasNext();) {
InteractionRecord r = i.next();
Edge e = new Edge(r);
edges.add(e);
}
}
COM: <s> prepares the data for the graph </s>
|
funcom_train/21701279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component createAndLockDirectUserDeleteController(UserRequest ureq) {
Controller lockCtrl = acquireDeleteUserLock(ureq);
if (lockCtrl == null) {
//success -> create new User deletion workflow
removeAsListenerAndDispose(contentCtr);
contentCtr = new DirectDeleteController(ureq, getWindowControl());
listenTo(contentCtr);
return contentCtr.getInitialComponent();
} else {
//failure -> monolog controller with message that lock failed
return lockCtrl.getInitialComponent();
}
}
COM: <s> creates a direct delete controller and acquire a delete user lock </s>
|
funcom_train/6332587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean setInUse(int handle, boolean inUse) {
int pos = handle / 32;
int mask = 1 << (handle % 32);
boolean result = (this.inUse[pos] | mask) != 0;
if (inUse) {
this.inUse[pos] |= mask;
} else {
this.inUse[pos] &= ~mask;
}
return result;
}
COM: <s> returns the previous value </s>
|
funcom_train/32150742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NamedElement_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", "_UI_NamedElement_type"),
ModelingBasePackage.Literals.NAMED_ELEMENT__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/31929272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doSysCall() {
int sysCallNumber = src.getSysCallNumber();
if (DBT_Options.debugSyscalls)
System.err.println("Syscall " + sysCallToString(sysCallNumber));
arguments = src.getSysCallArguments();
systemCallTable[sysCallNumber].doSysCall();
}
COM: <s> handle a system call </s>
|
funcom_train/50159654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOaiError(String error, String message) {
//prtln("addOaiError(): " + error + " " + this.getClass().getName());
if (errors == null)
errors = new ArrayList();
errors.add(new OAIError(error, message));
badVerbOrArgument = (error.equals(OAICodes.BAD_ARGUMENT) || error.equals(OAICodes.BAD_VERB));
}
COM: <s> adds a feature to the error attribute of the repository form object </s>
|
funcom_train/2920167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNavigationNode(final int ttype) {
Object navNode = null;
if ( ttype==Token.DOWN ) {
if ( hasUniqueNavigationNodes() ) {
navNode = adaptor.create(Token.DOWN, "DOWN");
}
else {
navNode = down;
}
}
else {
if ( hasUniqueNavigationNodes() ) {
navNode = adaptor.create(Token.UP, "UP");
}
else {
navNode = up;
}
}
nodes.add(navNode);
}
COM: <s> as we flatten the tree we use up down nodes to represent </s>
|
funcom_train/44497744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNamespaces() {
String errm = "No prefix should exist";
// make sure there are no prefixes declared
Assert.assertFalse(errm, _sc.prefix_exists(null));
Assert.assertFalse(errm, _sc.prefix_exists("xs"));
// add namespaces
String prefix = "darkircop";
String ns = "http://darkircop.org";
errm = "Prefix " + prefix + " should exist";
_sc.add_namespace(prefix,ns);
Assert.assertTrue(errm, _sc.prefix_exists(prefix));
String res = _sc.resolve_prefix(prefix);
Assert.assertEquals(errm, ns, res);
}
COM: <s> tests name spaces and makes assertions where necessary </s>
|
funcom_train/4312500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getNumberComboBox() {
if (numberComboBox == null) {
numberComboBox = new JComboBox(ComboBoxValues.ANSWERS_NUMBER);
numberComboBox.setFont(new Font("Dialog", Font.PLAIN, 12));
numberComboBox.setMaximumRowCount(5);
numberComboBox.setSelectedIndex(2);
numberComboBox.setPreferredSize(new Dimension(27, 20));
numberComboBox.addActionListener(this);
}
return numberComboBox;
}
COM: <s> this method initializes number combo box </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.