method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private HashMap<Integer,Object> getlobHMObj() {
if (rootConnection.lobHashMap == null) {
rootConnection.lobHashMap = new HashMap<Integer,Object>();
}
return rootConnection.lobHashMap;
} | HashMap<Integer,Object> function() { if (rootConnection.lobHashMap == null) { rootConnection.lobHashMap = new HashMap<Integer,Object>(); } return rootConnection.lobHashMap; } | /**
* Return the Hash Map in the root connection
* @return the HashMap that contains the locator to LOB object mapping
*/ | Return the Hash Map in the root connection | getlobHMObj | {
"repo_name": "trejkaz/derby",
"path": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java",
"license": "apache-2.0",
"size": 142130
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,463,641 |
int n = expander.numSymmetries(); // number of symmetric tuples
int m = locations.length;
int[][] tuples = new int[n][m];
// Create n tuples location by location
for (int j = 0; j < m; ++j) {
int[] symmetries = expander.getSymmetries(locations[j]);
assert symmetries.length == n;
for (int i = 0; i < n; ++i) {
tuples[i][j] = symmetries[i];
}
}
ArrayList<int[]> unique = new ArrayList<>(Arrays.asList(tuples));
// Remove non unique (keep the first (main) tuple intact)
for (int i = 0; i < unique.size(); ++i) {
for (int j = unique.size() - 1; j > i; --j) {
if (Arrays.equals(unique.get(i), unique.get(j))) {
unique.remove(j);
}
}
}
assert Arrays.equals(unique.get(0), locations);
return unique;
} | int n = expander.numSymmetries(); int m = locations.length; int[][] tuples = new int[n][m]; for (int j = 0; j < m; ++j) { int[] symmetries = expander.getSymmetries(locations[j]); assert symmetries.length == n; for (int i = 0; i < n; ++i) { tuples[i][j] = symmetries[i]; } } ArrayList<int[]> unique = new ArrayList<>(Arrays.asList(tuples)); for (int i = 0; i < unique.size(); ++i) { for (int j = unique.size() - 1; j > i; --j) { if (Arrays.equals(unique.get(i), unique.get(j))) { unique.remove(j); } } } assert Arrays.equals(unique.get(0), locations); return unique; } | /**
* Returns a list of tuples (arrays of locations) expanded with a symmetry expander.
* The list always starts with the given tuple.
*
* @param locations
* array of margin-based locations (like in boards with margins)
*/ | Returns a list of tuples (arrays of locations) expanded with a symmetry expander. The list always starts with the given tuple | createSymmetric | {
"repo_name": "mszubert/2048",
"path": "src/main/java/put/ci/cevo/games/encodings/ntuple/expanders/SymmetryUtils.java",
"license": "apache-2.0",
"size": 1308
} | [
"java.util.ArrayList",
"java.util.Arrays"
] | import java.util.ArrayList; import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,708,806 |
public static ims.edischarge.domain.objects.Summary extractSummary(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.EDischargeSTHKSummaryForProcComponentVo valueObject)
{
return extractSummary(domainFactory, valueObject, new HashMap());
} | static ims.edischarge.domain.objects.Summary function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.EDischargeSTHKSummaryForProcComponentVo valueObject) { return extractSummary(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractSummary | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/clinical/vo/domain/EDischargeSTHKSummaryForProcComponentVoAssembler.java",
"license": "agpl-3.0",
"size": 16252
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,687,518 |
public Buffer readRawBytes(int size) throws IOException {
if( size == 0) {
return new Buffer(new byte[]{});
}
if( this.pos+size > limit ) {
throw new EOFException();
}
// If the underlying stream is a ByteArrayInputStream
// then we can avoid an array copy.
if( bis!=null ) {
Buffer rc = bis.readBuffer(size);
if( rc==null || rc.getLength() < size ) {
throw new EOFException();
}
this.pos += rc.getLength();
return rc;
}
// Otherwise we, have to do it the old fasioned way
byte[] rc = new byte[size];
int c;
int pos=0;
while( pos < size ) {
c = in.read(rc, pos, size-pos);
if( c < 0 ) {
throw new EOFException();
}
this.pos += c;
pos += c;
}
return new Buffer(rc);
}
| Buffer function(int size) throws IOException { if( size == 0) { return new Buffer(new byte[]{}); } if( this.pos+size > limit ) { throw new EOFException(); } if( bis!=null ) { Buffer rc = bis.readBuffer(size); if( rc==null rc.getLength() < size ) { throw new EOFException(); } this.pos += rc.getLength(); return rc; } byte[] rc = new byte[size]; int c; int pos=0; while( pos < size ) { c = in.read(rc, pos, size-pos); if( c < 0 ) { throw new EOFException(); } this.pos += c; pos += c; } return new Buffer(rc); } | /**
* Read a fixed size of bytes from the input.
*
* @throws InvalidProtocolBufferException
* The end of the stream or the current limit was reached.
*/ | Read a fixed size of bytes from the input | readRawBytes | {
"repo_name": "chirino/hawtbuf",
"path": "hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/CodedInputStream.java",
"license": "apache-2.0",
"size": 14322
} | [
"java.io.EOFException",
"java.io.IOException",
"org.fusesource.hawtbuf.Buffer"
] | import java.io.EOFException; import java.io.IOException; import org.fusesource.hawtbuf.Buffer; | import java.io.*; import org.fusesource.hawtbuf.*; | [
"java.io",
"org.fusesource.hawtbuf"
] | java.io; org.fusesource.hawtbuf; | 1,737,167 |
public String buildMainPanelContext(VelocityPortlet portlet, Context context, RunData data, SessionState state)
{
String template = null;
context.put("action", "AssignmentAction");
context.put("tlang", rb);
context.put("dateFormat", getDateFormatString());
context.put("cheffeedbackhelper", this);
String contextString = (String) state.getAttribute(STATE_CONTEXT_STRING);
// allow add assignment?
boolean allowAddAssignment = AssignmentService.allowAddAssignment(contextString);
context.put("allowAddAssignment", Boolean.valueOf(allowAddAssignment));
Object allowGradeSubmission = state.getAttribute(STATE_ALLOW_GRADE_SUBMISSION);
// allow update site?
boolean allowUpdateSite = SiteService.allowUpdateSite((String) state.getAttribute(STATE_CONTEXT_STRING));
context.put("allowUpdateSite", Boolean.valueOf(allowUpdateSite));
//group related settings
context.put("siteAccess", Assignment.AssignmentAccess.SITE);
context.put("groupAccess", Assignment.AssignmentAccess.GROUPED);
// allow all.groups?
boolean allowAllGroups = AssignmentService.allowAllGroups(contextString);
context.put("allowAllGroups", Boolean.valueOf(allowAllGroups));
//Is the review service allowed?
Site s = null;
try {
s = SiteService.getSite((String) state.getAttribute(STATE_CONTEXT_STRING));
}
catch (IdUnusedException iue) {
M_log.warn(this + ":buildMainPanelContext: Site not found!" + iue.getMessage());
}
// Check whether content review service is enabled, present and enabled for this site
getContentReviewService();
context.put("allowReviewService", allowReviewService && contentReviewService != null && contentReviewService.isSiteAcceptable(s));
if (allowReviewService && contentReviewService != null && contentReviewService.isSiteAcceptable(s)) {
//put the review service stings in context
String reviewServiceName = contentReviewService.getServiceName();
String reviewServiceTitle = rb.getFormattedMessage("review.title", new Object[]{reviewServiceName});
String reviewServiceUse = rb.getFormattedMessage("review.use", new Object[]{reviewServiceName});
context.put("reviewServiceName", reviewServiceTitle);
context.put("reviewServiceUse", reviewServiceUse);
context.put("reviewIndicator", rb.getFormattedMessage("review.contentReviewIndicator", new Object[]{reviewServiceName}));
}
//Peer Assessment
context.put("allowPeerAssessment", allowPeerAssessment);
if(allowPeerAssessment){
context.put("peerAssessmentName", rb.getFormattedMessage("peerAssessmentName"));
context.put("peerAssessmentUse", rb.getFormattedMessage("peerAssessmentUse"));
}
// grading option
context.put("withGrade", state.getAttribute(WITH_GRADES));
// the grade type table
context.put("gradeTypeTable", gradeTypeTable());
// set the allowSubmitByInstructor option
context.put("allowSubmitByInstructor", AssignmentService.getAllowSubmitByInstructor());
// get the system setting for whether to show the Option tool link or not
context.put("enableViewOption", ServerConfigurationService.getBoolean("assignment.enableViewOption", true));
String mode = (String) state.getAttribute(STATE_MODE);
if (!MODE_LIST_ASSIGNMENTS.equals(mode))
{
// allow grade assignment?
if (state.getAttribute(STATE_ALLOW_GRADE_SUBMISSION) == null)
{
state.setAttribute(STATE_ALLOW_GRADE_SUBMISSION, Boolean.FALSE);
}
context.put("allowGradeSubmission", state.getAttribute(STATE_ALLOW_GRADE_SUBMISSION));
}
if (MODE_LIST_ASSIGNMENTS.equals(mode))
{
// build the context for the student assignment view
template = build_list_assignments_context(portlet, context, data, state);
}
else if (MODE_STUDENT_VIEW_ASSIGNMENT.equals(mode))
{
// the student view of assignment
template = build_student_view_assignment_context(portlet, context, data, state);
}
else if (MODE_STUDENT_VIEW_GROUP_ERROR.equals(mode))
{
// disable auto-updates while leaving the list view
justDelivered(state);
// build the context for showing group submission error
template = build_student_view_group_error_context(portlet, context, data, state);
}
else if (MODE_STUDENT_VIEW_SUBMISSION.equals(mode))
{
// disable auto-updates while leaving the list view
justDelivered(state);
// build the context for showing one assignment submission
template = build_student_view_submission_context(portlet, context, data, state);
}
else if (MODE_STUDENT_VIEW_SUBMISSION_CONFIRMATION.equals(mode))
{
context.put("site",s);
// build the context for showing one assignment submission confirmation
template = build_student_view_submission_confirmation_context(portlet, context, data, state);
}
else if (MODE_STUDENT_PREVIEW_SUBMISSION.equals(mode))
{
// build the context for showing one assignment submission
template = build_student_preview_submission_context(portlet, context, data, state);
}
else if (MODE_STUDENT_VIEW_GRADE.equals(mode) || MODE_STUDENT_VIEW_GRADE_PRIVATE.equals(mode))
{
context.put("site",s);
// disable auto-updates while leaving the list view
justDelivered(state);
if(MODE_STUDENT_VIEW_GRADE_PRIVATE.equals(mode)){
context.put("privateView", true);
}
// build the context for showing one graded submission
template = build_student_view_grade_context(portlet, context, data, state);
}
else if (MODE_INSTRUCTOR_NEW_EDIT_ASSIGNMENT.equals(mode))
{
// allow add assignment?
boolean allowAddSiteAssignment = AssignmentService.allowAddSiteAssignment(contextString);
context.put("allowAddSiteAssignment", Boolean.valueOf(allowAddSiteAssignment));
// disable auto-updates while leaving the list view
justDelivered(state);
// build the context for the instructor's create new assignment view
template = build_instructor_new_edit_assignment_context(portlet, context, data, state);
}
else if (MODE_INSTRUCTOR_DELETE_ASSIGNMENT.equals(mode))
{
if (state.getAttribute(DELETE_ASSIGNMENT_IDS) != null)
{
// disable auto-updates while leaving the list view
justDelivered(state);
// build the context for the instructor's delete assignment
template = build_instructor_delete_assignment_context(portlet, context, data, state);
}
}
else if (MODE_INSTRUCTOR_GRADE_ASSIGNMENT.equals(mode))
{
if (allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue())
{
// if allowed for grading, build the context for the instructor's grade assignment
template = build_instructor_grade_assignment_context(portlet, context, data, state);
}
}
else if (MODE_INSTRUCTOR_GRADE_SUBMISSION.equals(mode))
{
context.put("site",s);
if (allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue())
{
// if allowed for grading, disable auto-updates while leaving the list view
justDelivered(state);
// build the context for the instructor's grade submission
template = build_instructor_grade_submission_context(portlet, context, data, state);
}
}
else if (MODE_INSTRUCTOR_PREVIEW_GRADE_SUBMISSION.equals(mode))
{
if ( allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue())
{
// if allowed for grading, build the context for the instructor's preview grade submission
template = build_instructor_preview_grade_submission_context(portlet, context, data, state);
}
}
else if (MODE_INSTRUCTOR_PREVIEW_ASSIGNMENT.equals(mode))
{
// build the context for preview one assignment
template = build_instructor_preview_assignment_context(portlet, context, data, state);
}
else if (MODE_INSTRUCTOR_VIEW_ASSIGNMENT.equals(mode))
{
context.put("site",s);
// disable auto-updates while leaving the list view
justDelivered(state);
// build the context for view one assignment
template = build_instructor_view_assignment_context(portlet, context, data, state);
}
else if (MODE_INSTRUCTOR_VIEW_STUDENTS_ASSIGNMENT.equals(mode))
{
if ( allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue())
{
// if allowed for grading, build the context for the instructor's create new assignment view
template = build_instructor_view_students_assignment_context(portlet, context, data, state);
}
}
else if (MODE_INSTRUCTOR_REPORT_SUBMISSIONS.equals(mode))
{
context.put("site",s);
if ( allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue())
{
// if allowed for grading, build the context for the instructor's view of report submissions
template = build_instructor_report_submissions(portlet, context, data, state);
}
}
else if (MODE_INSTRUCTOR_DOWNLOAD_ALL.equals(mode))
{
if ( allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue())
{
// if allowed for grading, build the context for the instructor's view of uploading all info from archive file
template = build_instructor_download_upload_all(portlet, context, data, state);
}
}
else if (MODE_INSTRUCTOR_UPLOAD_ALL.equals(mode))
{
if ( allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue())
{
// if allowed for grading, build the context for the instructor's view of uploading all info from archive file
template = build_instructor_download_upload_all(portlet, context, data, state);
}
}
else if (MODE_INSTRUCTOR_REORDER_ASSIGNMENT.equals(mode))
{
context.put("site",s);
// disable auto-updates while leaving the list view
justDelivered(state);
// build the context for the instructor's create new assignment view
template = build_instructor_reorder_assignment_context(portlet, context, data, state);
}
else if (mode.equals(MODE_OPTIONS))
{
if (allowUpdateSite)
{
// build the options page
template = build_options_context(portlet, context, data, state);
}
}
else if (mode.equals(MODE_STUDENT_REVIEW_EDIT))
{
template = build_student_review_edit_context(portlet, context, data, state);
}
if (template == null)
{
// default to student list view
state.setAttribute(STATE_MODE, MODE_LIST_ASSIGNMENTS);
template = build_list_assignments_context(portlet, context, data, state);
}
// this is a check for seeing if there are any assignments. The check is used to see if we display a Reorder link in the vm files
if (state.getAttribute(HAS_MULTIPLE_ASSIGNMENTS) != null)
{
context.put("assignmentscheck", state.getAttribute(HAS_MULTIPLE_ASSIGNMENTS));
}
return template;
} // buildNormalContext | String function(VelocityPortlet portlet, Context context, RunData data, SessionState state) { String template = null; context.put(STR, STR); context.put("tlang", rb); context.put(STR, getDateFormatString()); context.put(STR, this); String contextString = (String) state.getAttribute(STATE_CONTEXT_STRING); boolean allowAddAssignment = AssignmentService.allowAddAssignment(contextString); context.put(STR, Boolean.valueOf(allowAddAssignment)); Object allowGradeSubmission = state.getAttribute(STATE_ALLOW_GRADE_SUBMISSION); boolean allowUpdateSite = SiteService.allowUpdateSite((String) state.getAttribute(STATE_CONTEXT_STRING)); context.put(STR, Boolean.valueOf(allowUpdateSite)); context.put(STR, Assignment.AssignmentAccess.SITE); context.put(STR, Assignment.AssignmentAccess.GROUPED); boolean allowAllGroups = AssignmentService.allowAllGroups(contextString); context.put(STR, Boolean.valueOf(allowAllGroups)); Site s = null; try { s = SiteService.getSite((String) state.getAttribute(STATE_CONTEXT_STRING)); } catch (IdUnusedException iue) { M_log.warn(this + STR + iue.getMessage()); } getContentReviewService(); context.put(STR, allowReviewService && contentReviewService != null && contentReviewService.isSiteAcceptable(s)); if (allowReviewService && contentReviewService != null && contentReviewService.isSiteAcceptable(s)) { String reviewServiceName = contentReviewService.getServiceName(); String reviewServiceTitle = rb.getFormattedMessage(STR, new Object[]{reviewServiceName}); String reviewServiceUse = rb.getFormattedMessage(STR, new Object[]{reviewServiceName}); context.put(STR, reviewServiceTitle); context.put(STR, reviewServiceUse); context.put(STR, rb.getFormattedMessage(STR, new Object[]{reviewServiceName})); } context.put(STR, allowPeerAssessment); if(allowPeerAssessment){ context.put(STR, rb.getFormattedMessage(STR)); context.put(STR, rb.getFormattedMessage(STR)); } context.put(STR, state.getAttribute(WITH_GRADES)); context.put(STR, gradeTypeTable()); context.put(STR, AssignmentService.getAllowSubmitByInstructor()); context.put(STR, ServerConfigurationService.getBoolean(STR, true)); String mode = (String) state.getAttribute(STATE_MODE); if (!MODE_LIST_ASSIGNMENTS.equals(mode)) { if (state.getAttribute(STATE_ALLOW_GRADE_SUBMISSION) == null) { state.setAttribute(STATE_ALLOW_GRADE_SUBMISSION, Boolean.FALSE); } context.put(STR, state.getAttribute(STATE_ALLOW_GRADE_SUBMISSION)); } if (MODE_LIST_ASSIGNMENTS.equals(mode)) { template = build_list_assignments_context(portlet, context, data, state); } else if (MODE_STUDENT_VIEW_ASSIGNMENT.equals(mode)) { template = build_student_view_assignment_context(portlet, context, data, state); } else if (MODE_STUDENT_VIEW_GROUP_ERROR.equals(mode)) { justDelivered(state); template = build_student_view_group_error_context(portlet, context, data, state); } else if (MODE_STUDENT_VIEW_SUBMISSION.equals(mode)) { justDelivered(state); template = build_student_view_submission_context(portlet, context, data, state); } else if (MODE_STUDENT_VIEW_SUBMISSION_CONFIRMATION.equals(mode)) { context.put("site",s); template = build_student_view_submission_confirmation_context(portlet, context, data, state); } else if (MODE_STUDENT_PREVIEW_SUBMISSION.equals(mode)) { template = build_student_preview_submission_context(portlet, context, data, state); } else if (MODE_STUDENT_VIEW_GRADE.equals(mode) MODE_STUDENT_VIEW_GRADE_PRIVATE.equals(mode)) { context.put("site",s); justDelivered(state); if(MODE_STUDENT_VIEW_GRADE_PRIVATE.equals(mode)){ context.put(STR, true); } template = build_student_view_grade_context(portlet, context, data, state); } else if (MODE_INSTRUCTOR_NEW_EDIT_ASSIGNMENT.equals(mode)) { boolean allowAddSiteAssignment = AssignmentService.allowAddSiteAssignment(contextString); context.put(STR, Boolean.valueOf(allowAddSiteAssignment)); justDelivered(state); template = build_instructor_new_edit_assignment_context(portlet, context, data, state); } else if (MODE_INSTRUCTOR_DELETE_ASSIGNMENT.equals(mode)) { if (state.getAttribute(DELETE_ASSIGNMENT_IDS) != null) { justDelivered(state); template = build_instructor_delete_assignment_context(portlet, context, data, state); } } else if (MODE_INSTRUCTOR_GRADE_ASSIGNMENT.equals(mode)) { if (allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue()) { template = build_instructor_grade_assignment_context(portlet, context, data, state); } } else if (MODE_INSTRUCTOR_GRADE_SUBMISSION.equals(mode)) { context.put("site",s); if (allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue()) { justDelivered(state); template = build_instructor_grade_submission_context(portlet, context, data, state); } } else if (MODE_INSTRUCTOR_PREVIEW_GRADE_SUBMISSION.equals(mode)) { if ( allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue()) { template = build_instructor_preview_grade_submission_context(portlet, context, data, state); } } else if (MODE_INSTRUCTOR_PREVIEW_ASSIGNMENT.equals(mode)) { template = build_instructor_preview_assignment_context(portlet, context, data, state); } else if (MODE_INSTRUCTOR_VIEW_ASSIGNMENT.equals(mode)) { context.put("site",s); justDelivered(state); template = build_instructor_view_assignment_context(portlet, context, data, state); } else if (MODE_INSTRUCTOR_VIEW_STUDENTS_ASSIGNMENT.equals(mode)) { if ( allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue()) { template = build_instructor_view_students_assignment_context(portlet, context, data, state); } } else if (MODE_INSTRUCTOR_REPORT_SUBMISSIONS.equals(mode)) { context.put("site",s); if ( allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue()) { template = build_instructor_report_submissions(portlet, context, data, state); } } else if (MODE_INSTRUCTOR_DOWNLOAD_ALL.equals(mode)) { if ( allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue()) { template = build_instructor_download_upload_all(portlet, context, data, state); } } else if (MODE_INSTRUCTOR_UPLOAD_ALL.equals(mode)) { if ( allowGradeSubmission != null && ((Boolean) allowGradeSubmission).booleanValue()) { template = build_instructor_download_upload_all(portlet, context, data, state); } } else if (MODE_INSTRUCTOR_REORDER_ASSIGNMENT.equals(mode)) { context.put("site",s); justDelivered(state); template = build_instructor_reorder_assignment_context(portlet, context, data, state); } else if (mode.equals(MODE_OPTIONS)) { if (allowUpdateSite) { template = build_options_context(portlet, context, data, state); } } else if (mode.equals(MODE_STUDENT_REVIEW_EDIT)) { template = build_student_review_edit_context(portlet, context, data, state); } if (template == null) { state.setAttribute(STATE_MODE, MODE_LIST_ASSIGNMENTS); template = build_list_assignments_context(portlet, context, data, state); } if (state.getAttribute(HAS_MULTIPLE_ASSIGNMENTS) != null) { context.put(STR, state.getAttribute(HAS_MULTIPLE_ASSIGNMENTS)); } return template; } | /**
* central place for dispatching the build routines based on the state name
*/ | central place for dispatching the build routines based on the state name | buildMainPanelContext | {
"repo_name": "harfalm/Sakai-10.1",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 605178
} | [
"org.sakaiproject.assignment.api.Assignment",
"org.sakaiproject.assignment.cover.AssignmentService",
"org.sakaiproject.cheftool.Context",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.cheftool.VelocityPortlet",
"org.sakaiproject.component.cover.ServerConfigurationService",
"org.sakaiproject.event.api.SessionState",
"org.sakaiproject.exception.IdUnusedException",
"org.sakaiproject.site.api.Site",
"org.sakaiproject.site.cover.SiteService"
] | import org.sakaiproject.assignment.api.Assignment; import org.sakaiproject.assignment.cover.AssignmentService; import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.cheftool.VelocityPortlet; import org.sakaiproject.component.cover.ServerConfigurationService; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.exception.IdUnusedException; import org.sakaiproject.site.api.Site; import org.sakaiproject.site.cover.SiteService; | import org.sakaiproject.assignment.api.*; import org.sakaiproject.assignment.cover.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.component.cover.*; import org.sakaiproject.event.api.*; import org.sakaiproject.exception.*; import org.sakaiproject.site.api.*; import org.sakaiproject.site.cover.*; | [
"org.sakaiproject.assignment",
"org.sakaiproject.cheftool",
"org.sakaiproject.component",
"org.sakaiproject.event",
"org.sakaiproject.exception",
"org.sakaiproject.site"
] | org.sakaiproject.assignment; org.sakaiproject.cheftool; org.sakaiproject.component; org.sakaiproject.event; org.sakaiproject.exception; org.sakaiproject.site; | 1,498,474 |
public Interrogation newInterrogation(CfgContext context, Node node) {
if (node != null) {
Interrogation component = new Interrogation();
component.configure(context,node,node.getAttributes());
return component;
}
return null;
}
| Interrogation function(CfgContext context, Node node) { if (node != null) { Interrogation component = new Interrogation(); component.configure(context,node,node.getAttributes()); return component; } return null; } | /**
* Instantiates and configures a new Interrogation component.
* <br/>The node argument can be null, if so then return a null value.
* @param context the configuration context
* @param node the configuration node associated with the component
* @return the new Interrogation component (null if the node was invalid)
*/ | Instantiates and configures a new Interrogation component. The node argument can be null, if so then return a null value | newInterrogation | {
"repo_name": "usgin/usgin-geoportal",
"path": "src/com/esri/gpt/catalog/schema/SchemaFactory.java",
"license": "apache-2.0",
"size": 12665
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 824,739 |
public void setRepeatT(boolean val) {
if ( repeatT == null ) {
repeatT = (SFBool)getField( "repeatT" );
}
repeatT.setValue( val );
} | void function(boolean val) { if ( repeatT == null ) { repeatT = (SFBool)getField( STR ); } repeatT.setValue( val ); } | /** Set the repeatT field.
* @param val The boolean to set. */ | Set the repeatT field | setRepeatT | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/external/node/texturing/SAIPixelTexture.java",
"license": "gpl-2.0",
"size": 3244
} | [
"org.web3d.x3d.sai.SFBool"
] | import org.web3d.x3d.sai.SFBool; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 2,795,125 |
public static double calculateZScore(double percentile) {
// Set percentile gt0 and lt1, otherwise the error
// function will return Infinity.
if (percentile >= 1.0) {
percentile = 0.999;
} else if (percentile <= 0.0) {
percentile = 0.001;
}
return -1 * Math.sqrt(2) * Erf.erfcInv(2 * percentile);
} | static double function(double percentile) { if (percentile >= 1.0) { percentile = 0.999; } else if (percentile <= 0.0) { percentile = 0.001; } return -1 * Math.sqrt(2) * Erf.erfcInv(2 * percentile); } | /**
* Z is the z-score that corresponds to the percentile.
* z-scores correspond exactly to percentiles, e.g.,
* z-scores of:
* -1.881, // 3rd
* -1.645, // 5th
* -1.282, // 10th
* -0.674, // 25th
* 0, // 50th
* 0.674, // 75th
* 1.036, // 85th
* 1.282, // 90th
* 1.645, // 95th
* 1.881 // 97th
* @param percentile 0.0 - 1.0
* @return z-score that corresponds to the percentile.
*/ | Z is the z-score that corresponds to the percentile. z-scores correspond exactly to percentiles, e.g., z-scores of: -1.881, // 3rd -1.645, // 5th -1.282, // 10th -0.674, // 25th 0, // 50th 0.674, // 75th 1.036, // 85th 1.282, // 90th 1.645, // 95th 1.881 // 97th | calculateZScore | {
"repo_name": "synthetichealth/synthea",
"path": "src/main/java/org/mitre/synthea/world/concepts/GrowthChart.java",
"license": "apache-2.0",
"size": 5700
} | [
"org.apache.commons.math3.special.Erf"
] | import org.apache.commons.math3.special.Erf; | import org.apache.commons.math3.special.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,811,011 |
@Override
public String getTypeString() {
return getTypeString(TYPE_ASCII);
}
}
public static class UTC extends UInt {
public static final TimeZone UTC_TIME_ZONE = TimeZone.getTimeZone("UTC");
public static final String DATE_FORMAT_PATTERN = "dd-MMM-yyyy HH:mm:ss";
private static final double SECONDS_PER_DAY = 86400.0;
private static final double SECONDS_TO_DAYS = 1.0 / SECONDS_PER_DAY;
private static final double MICROS_PER_SECOND = 1000000.0;
private static final double MICROS_TO_SECONDS = 1.0 / MICROS_PER_SECOND;
public UTC() {
super(3);
}
public UTC(int[] elems) {
this(elems[0], elems[1], elems[2]);
}
public UTC(int days, int seconds, int microSeconds) {
super(3);
setElemIntAt(0, days);
setElemIntAt(1, seconds);
setElemIntAt(2, microSeconds);
}
public UTC(double mjd) {
super(3);
final double microSeconds = (mjd * SECONDS_PER_DAY * MICROS_PER_SECOND) % MICROS_PER_SECOND;
final double seconds = (mjd * SECONDS_PER_DAY) % SECONDS_PER_DAY;
final double days = (int) mjd;
setElemIntAt(0, (int) days);
setElemIntAt(1, (int) seconds);
setElemIntAt(2, (int) microSeconds);
} | String function() { return getTypeString(TYPE_ASCII); } } public static class UTC extends UInt { public static final TimeZone UTC_TIME_ZONE = TimeZone.getTimeZone("UTC"); public static final String DATE_FORMAT_PATTERN = STR; private static final double SECONDS_PER_DAY = 86400.0; private static final double SECONDS_TO_DAYS = 1.0 / SECONDS_PER_DAY; private static final double MICROS_PER_SECOND = 1000000.0; private static final double MICROS_TO_SECONDS = 1.0 / MICROS_PER_SECOND; public UTC() { super(3); } public UTC(int[] elems) { this(elems[0], elems[1], elems[2]); } public UTC(int days, int seconds, int microSeconds) { super(3); setElemIntAt(0, days); setElemIntAt(1, seconds); setElemIntAt(2, microSeconds); } public UTC(double mjd) { super(3); final double microSeconds = (mjd * SECONDS_PER_DAY * MICROS_PER_SECOND) % MICROS_PER_SECOND; final double seconds = (mjd * SECONDS_PER_DAY) % SECONDS_PER_DAY; final double days = (int) mjd; setElemIntAt(0, (int) days); setElemIntAt(1, (int) seconds); setElemIntAt(2, (int) microSeconds); } | /**
* Returns this value's data type String.
*/ | Returns this value's data type String | getTypeString | {
"repo_name": "seadas/beam",
"path": "beam-core/src/main/java/org/esa/beam/framework/datamodel/ProductData.java",
"license": "gpl-3.0",
"size": 100346
} | [
"java.util.TimeZone"
] | import java.util.TimeZone; | import java.util.*; | [
"java.util"
] | java.util; | 2,682,747 |
Response createWiki(@QueryParam("template") String template, Wiki wiki) throws XWikiRestException; | Response createWiki(@QueryParam(STR) String template, Wiki wiki) throws XWikiRestException; | /**
* Create a wiki.
*
* @param template the wiki template to be used for initializing the new wiki. Can be null.
* @param wiki the wiki model object (see {@link org.xwiki.rest.model.jaxb.Wiki})containing information about the
* wiki to be created.
* @return a response containing a description of the created wiki (see {@link org.xwiki.rest.model.jaxb.Wiki})
* @throws XWikiRestException is there is an error while creating the wiki.
*/ | Create a wiki | createWiki | {
"repo_name": "pbondoer/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-rest/xwiki-platform-wiki-rest-api/src/main/java/org/xwiki/wiki/rest/WikiManagerREST.java",
"license": "lgpl-2.1",
"size": 1815
} | [
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.Response",
"org.xwiki.rest.XWikiRestException",
"org.xwiki.rest.model.jaxb.Wiki"
] | import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; import org.xwiki.rest.XWikiRestException; import org.xwiki.rest.model.jaxb.Wiki; | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.xwiki.rest.*; import org.xwiki.rest.model.jaxb.*; | [
"javax.ws",
"org.xwiki.rest"
] | javax.ws; org.xwiki.rest; | 1,173,138 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<ConnectionSettingInner> updateAsync(
String resourceGroupName, String resourceName, String connectionName, ConnectionSettingInner parameters) {
return updateWithResponseAsync(resourceGroupName, resourceName, connectionName, parameters)
.flatMap(
(Response<ConnectionSettingInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
} | @ServiceMethod(returns = ReturnType.SINGLE) Mono<ConnectionSettingInner> function( String resourceGroupName, String resourceName, String connectionName, ConnectionSettingInner parameters) { return updateWithResponseAsync(resourceGroupName, resourceName, connectionName, parameters) .flatMap( (Response<ConnectionSettingInner> res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { return Mono.empty(); } }); } | /**
* Updates a Connection Setting registration for a Bot Service.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param resourceName The name of the Bot resource.
* @param connectionName The name of the Bot Service Connection Setting resource.
* @param parameters The parameters to provide for updating the Connection Setting.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return bot channel resource definition on successful completion of {@link Mono}.
*/ | Updates a Connection Setting registration for a Bot Service | updateAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsClientImpl.java",
"license": "mit",
"size": 71427
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.resourcemanager.botservice.fluent.models.ConnectionSettingInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.botservice.fluent.models.ConnectionSettingInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.botservice.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,061,255 |
public List<BackupInfo> getBackupHistory(int n, BackupInfo.Filter... filters) throws IOException {
if (filters.length == 0) return getHistory(n);
List<BackupInfo> history = getBackupHistory();
List<BackupInfo> result = new ArrayList<BackupInfo>();
for (BackupInfo bi : history) {
if (result.size() == n) break;
boolean passed = true;
for (int i = 0; i < filters.length; i++) {
if (!filters[i].apply(bi)) {
passed = false;
break;
}
}
if (passed) {
result.add(bi);
}
}
return result;
} | List<BackupInfo> function(int n, BackupInfo.Filter... filters) throws IOException { if (filters.length == 0) return getHistory(n); List<BackupInfo> history = getBackupHistory(); List<BackupInfo> result = new ArrayList<BackupInfo>(); for (BackupInfo bi : history) { if (result.size() == n) break; boolean passed = true; for (int i = 0; i < filters.length; i++) { if (!filters[i].apply(bi)) { passed = false; break; } } if (passed) { result.add(bi); } } return result; } | /**
* Get backup history records filtered by list of filters.
* @param n max number of records
* @param filters list of filters
* @return backup records
* @throws IOException
*/ | Get backup history records filtered by list of filters | getBackupHistory | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java",
"license": "apache-2.0",
"size": 67577
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hbase.backup.BackupInfo"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.backup.BackupInfo; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.backup.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,075,204 |
public boolean hasLimboPlayer(String name) {
checkNotNull(name);
return cache.containsKey(name.toLowerCase());
} | boolean function(String name) { checkNotNull(name); return cache.containsKey(name.toLowerCase()); } | /**
* Method hasLimboPlayer.
*
* @param name String
*
* @return boolean
*/ | Method hasLimboPlayer | hasLimboPlayer | {
"repo_name": "sgdc3/AuthMeReloaded",
"path": "src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java",
"license": "gpl-3.0",
"size": 4637
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 713,163 |
LOG.debug("Calling index providers");
List<IndexProvider> indexProviders = null;
try {
indexProviders = registryManager.getIndexProviders(new Version(meteorProperties.getProperty("meteor.version")));
} catch (RegistryException e1) {
responseData.addIndexProviderMessage(RsMsgLevelEnum.E, MeteorMessage.REGISTRY_NO_CONNECTION, null);
throw new MeteorQueryException("Could not get list of index providers from registry", e1);
}
if (indexProviders == null || indexProviders.isEmpty()) {
return broadcastMode(responseData);
}
Set<DataProviderInfo> dataProviders = new HashSet<DataProviderInfo>();
boolean atLeast1IndexProviderSuccessful = false;
for (IndexProvider ip : indexProviders) {
LOG.debug("Calling index provider " + ip.getInstitutionIdentifier());
MeteorIndexResponse response = null;
try {
response = callIndexProvider(createRequest(ssn), ip.getUrl());
} catch (MeteorQueryException e) {
LOG.debug("Could not call index provider " + ip.getInstitutionIdentifier(), e);
continue;
}
atLeast1IndexProviderSuccessful = true;
if (response.getIndexProviderMessages() != null && response.getIndexProviderMessages().getMessageCount() > 0) {
for (Message message : response.getIndexProviderMessages().getMessage()) {
LOG.debug("Adding message from index provider" + ip.getInstitutionIdentifier() + ": \"" + message.getRsMsg() + "\"");
responseData.addIndexProviderMessage(message);
}
}
if (response.getDataProviders().getDataProviderCount() > 0) {
Map<String, DataProvider> registryDataProvidersMap;
try {
registryDataProvidersMap = getAllDataProvidersMap();
} catch (RegistryException e1) {
LOG.debug("Could not get list of data providers from registry", e1);
continue;
}
for (org.meteornetwork.meteor.common.xml.indexresponse.DataProvider dataProvider : response.getDataProviders().getDataProvider()) {
LOG.debug("Adding data provider with ID '" + dataProvider.getEntityID() + "'");
DataProviderInfo dpInfo = new DataProviderInfo(dataProvider.getEntityID());
dpInfo.setIndexProviderInfo(dataProvider);
dpInfo.setRegistryInfo(registryDataProvidersMap.get(dpInfo.getMeteorInstitutionIdentifier()));
dataProviders.add(dpInfo);
}
}
IndexProviderData ipData = response.getIndexProviderData();
responseData.addLoanLocatorIndexProvider(ip.getInstitutionIdentifier(), ipData == null ? null : ipData.getEntityName(), ipData == null ? null : ipData.getEntityURL());
break;
}
if (!atLeast1IndexProviderSuccessful) {
return broadcastMode(responseData);
}
return dataProviders;
} | LOG.debug(STR); List<IndexProvider> indexProviders = null; try { indexProviders = registryManager.getIndexProviders(new Version(meteorProperties.getProperty(STR))); } catch (RegistryException e1) { responseData.addIndexProviderMessage(RsMsgLevelEnum.E, MeteorMessage.REGISTRY_NO_CONNECTION, null); throw new MeteorQueryException(STR, e1); } if (indexProviders == null indexProviders.isEmpty()) { return broadcastMode(responseData); } Set<DataProviderInfo> dataProviders = new HashSet<DataProviderInfo>(); boolean atLeast1IndexProviderSuccessful = false; for (IndexProvider ip : indexProviders) { LOG.debug(STR + ip.getInstitutionIdentifier()); MeteorIndexResponse response = null; try { response = callIndexProvider(createRequest(ssn), ip.getUrl()); } catch (MeteorQueryException e) { LOG.debug(STR + ip.getInstitutionIdentifier(), e); continue; } atLeast1IndexProviderSuccessful = true; if (response.getIndexProviderMessages() != null && response.getIndexProviderMessages().getMessageCount() > 0) { for (Message message : response.getIndexProviderMessages().getMessage()) { LOG.debug(STR + ip.getInstitutionIdentifier() + STRSTR\STRCould not get list of data providers from registrySTRAdding data provider with ID 'STR'"); DataProviderInfo dpInfo = new DataProviderInfo(dataProvider.getEntityID()); dpInfo.setIndexProviderInfo(dataProvider); dpInfo.setRegistryInfo(registryDataProvidersMap.get(dpInfo.getMeteorInstitutionIdentifier())); dataProviders.add(dpInfo); } } IndexProviderData ipData = response.getIndexProviderData(); responseData.addLoanLocatorIndexProvider(ip.getInstitutionIdentifier(), ipData == null ? null : ipData.getEntityName(), ipData == null ? null : ipData.getEntityURL()); break; } if (!atLeast1IndexProviderSuccessful) { return broadcastMode(responseData); } return dataProviders; } | /**
* Gets a list of data providers that have data for the provided SSN
*
* @param ssn
* the ssn of the borrower to get data for
* @param responseData
* the response data object to write any index provider messages
* to
* @return data provider information returned from calls to index providers
* @throws RegistryException
*/ | Gets a list of data providers that have data for the provided SSN | getDataProviders | {
"repo_name": "NationalStudentClearinghouse/Meteor4",
"path": "accessprovider/src/main/java/org/meteornetwork/meteor/provider/access/service/IndexQueryService.java",
"license": "lgpl-2.1",
"size": 10368
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.meteornetwork.meteor.common.registry.RegistryException",
"org.meteornetwork.meteor.common.registry.data.IndexProvider",
"org.meteornetwork.meteor.common.util.Version",
"org.meteornetwork.meteor.common.util.message.MeteorMessage",
"org.meteornetwork.meteor.common.xml.indexresponse.IndexProviderData",
"org.meteornetwork.meteor.common.xml.indexresponse.Message",
"org.meteornetwork.meteor.common.xml.indexresponse.MeteorIndexResponse",
"org.meteornetwork.meteor.common.xml.indexresponse.types.RsMsgLevelEnum",
"org.meteornetwork.meteor.provider.access.DataProviderInfo",
"org.meteornetwork.meteor.provider.access.MeteorQueryException"
] | import java.util.HashSet; import java.util.List; import java.util.Set; import org.meteornetwork.meteor.common.registry.RegistryException; import org.meteornetwork.meteor.common.registry.data.IndexProvider; import org.meteornetwork.meteor.common.util.Version; import org.meteornetwork.meteor.common.util.message.MeteorMessage; import org.meteornetwork.meteor.common.xml.indexresponse.IndexProviderData; import org.meteornetwork.meteor.common.xml.indexresponse.Message; import org.meteornetwork.meteor.common.xml.indexresponse.MeteorIndexResponse; import org.meteornetwork.meteor.common.xml.indexresponse.types.RsMsgLevelEnum; import org.meteornetwork.meteor.provider.access.DataProviderInfo; import org.meteornetwork.meteor.provider.access.MeteorQueryException; | import java.util.*; import org.meteornetwork.meteor.common.registry.*; import org.meteornetwork.meteor.common.registry.data.*; import org.meteornetwork.meteor.common.util.*; import org.meteornetwork.meteor.common.util.message.*; import org.meteornetwork.meteor.common.xml.indexresponse.*; import org.meteornetwork.meteor.common.xml.indexresponse.types.*; import org.meteornetwork.meteor.provider.access.*; | [
"java.util",
"org.meteornetwork.meteor"
] | java.util; org.meteornetwork.meteor; | 866,374 |
@ServiceMethod(returns = ReturnType.SINGLE)
VpnClientConnectionHealthDetailListResultInner getVpnclientConnectionHealth(
String resourceGroupName, String virtualNetworkGatewayName, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) VpnClientConnectionHealthDetailListResultInner getVpnclientConnectionHealth( String resourceGroupName, String virtualNetworkGatewayName, Context context); | /**
* Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified
* resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayName The name of the virtual network gateway.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return vPN client connection health detail per P2S client connection of the virtual network gateway in the
* specified resource group.
*/ | Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group | getVpnclientConnectionHealth | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java",
"license": "mit",
"size": 135947
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.network.fluent.models.VpnClientConnectionHealthDetailListResultInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.VpnClientConnectionHealthDetailListResultInner; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,644,804 |
public ScreenBrightness getScreenBrightness() {
return screenBrightness;
} | ScreenBrightness function() { return screenBrightness; } | /**
* Gets this player's {@link ScreenBrightness}.
*
* @return The screen brightness.
*/ | Gets this player's <code>ScreenBrightness</code> | getScreenBrightness | {
"repo_name": "Major-/apollo",
"path": "game/src/main/org/apollo/game/model/entity/Player.java",
"license": "isc",
"size": 24470
} | [
"org.apollo.game.model.entity.setting.ScreenBrightness"
] | import org.apollo.game.model.entity.setting.ScreenBrightness; | import org.apollo.game.model.entity.setting.*; | [
"org.apollo.game"
] | org.apollo.game; | 1,986,315 |
EClass getAssociation(); | EClass getAssociation(); | /**
* Returns the meta object for class '{@link org.roboid.studio.contentscomposer.Association <em>Association</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Association</em>'.
* @see org.roboid.studio.contentscomposer.Association
* @generated
*/ | Returns the meta object for class '<code>org.roboid.studio.contentscomposer.Association Association</code>'. | getAssociation | {
"repo_name": "roboidstudio/embedded",
"path": "org.roboid.studio.contentscomposer.model/src/org/roboid/studio/contentscomposer/ContentsComposerPackage.java",
"license": "lgpl-2.1",
"size": 131603
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 74,389 |
void handleResponse(HttpResponse response, HttpContext context)
throws IOException; | void handleResponse(HttpResponse response, HttpContext context) throws IOException; | /**
* Triggered when an HTTP response is ready to be processed.
*
* @param response
* the HTTP response to be processed
* @param context
* the actual HTTP context
*/ | Triggered when an HTTP response is ready to be processed | handleResponse | {
"repo_name": "cictourgune/MDP-Airbnb",
"path": "httpcomponents-core-4.4/httpcore-nio/src/main/java-deprecated/org/apache/http/nio/protocol/NHttpRequestExecutionHandler.java",
"license": "apache-2.0",
"size": 4983
} | [
"java.io.IOException",
"org.apache.http.HttpResponse",
"org.apache.http.protocol.HttpContext"
] | import java.io.IOException; import org.apache.http.HttpResponse; import org.apache.http.protocol.HttpContext; | import java.io.*; import org.apache.http.*; import org.apache.http.protocol.*; | [
"java.io",
"org.apache.http"
] | java.io; org.apache.http; | 2,130,104 |
public File getZipfile() {
FileProvider fp = (FileProvider) getArchive().as(FileProvider.class);
return fp.getFile();
} | File function() { FileProvider fp = (FileProvider) getArchive().as(FileProvider.class); return fp.getFile(); } | /**
* Get the zipfile that holds this ZipResource.
* @return the zipfile as a File.
*/ | Get the zipfile that holds this ZipResource | getZipfile | {
"repo_name": "BIORIMP/biorimp",
"path": "BIO-RIMP/test_data/code/antapache/src/main/org/apache/tools/ant/types/resources/ZipResource.java",
"license": "gpl-2.0",
"size": 6721
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,638,082 |
public void setBounds(Rectangle rectangle)
{
// Does nothing since the bounds cannot be set on list children
// individually.
} | void function(Rectangle rectangle) { } | /**
* Does nothing since the bounds cannot be set on list children
* individually.
*
* @param rectangle not used here
*/ | Does nothing since the bounds cannot be set on list children individually | setBounds | {
"repo_name": "nmacs/lm3s-uclinux",
"path": "lib/classpath/javax/swing/JList.java",
"license": "gpl-2.0",
"size": 78224
} | [
"java.awt.Rectangle"
] | import java.awt.Rectangle; | import java.awt.*; | [
"java.awt"
] | java.awt; | 470,411 |
public synchronized TaskCompletionEvent[] getTaskCompletionEvents(
int startFrom) throws IOException{
return jobSubmitClient.getTaskCompletionEvents(
getID(), startFrom, 10);
} | synchronized TaskCompletionEvent[] function( int startFrom) throws IOException{ return jobSubmitClient.getTaskCompletionEvents( getID(), startFrom, 10); } | /**
* Fetch task completion events from jobtracker for this job.
*/ | Fetch task completion events from jobtracker for this job | getTaskCompletionEvents | {
"repo_name": "rjpower/hadoop",
"path": "src/mapred/org/apache/hadoop/mapred/JobClient.java",
"license": "apache-2.0",
"size": 72472
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,024,529 |
@Generated
@Selector("maximumQuantity")
public native HKQuantity maximumQuantity(); | @Selector(STR) native HKQuantity function(); | /**
* maximumQuantity
* <p>
* Returns the maximum quantity in the time period represented by the receiver.
*/ | maximumQuantity Returns the maximum quantity in the time period represented by the receiver | maximumQuantity | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/healthkit/HKStatistics.java",
"license": "apache-2.0",
"size": 11010
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 302,367 |
void write(SMPPPacket packet, boolean withOptionalParams) throws IOException; | void write(SMPPPacket packet, boolean withOptionalParams) throws IOException; | /**
* Send an SMPP packet to the SMSC.
* @param packet The packet to send.
* @param withOptionalParams <code>true</code> to send the packet's
* optional parameters during the write, <code>false</code> to omit the
* optional parameters.
* @throws IOException
*/ | Send an SMPP packet to the SMSC | write | {
"repo_name": "umermansoor/java-smpp-api",
"path": "src/main/java/com/adenki/smpp/net/SmscLink.java",
"license": "lgpl-2.1",
"size": 3784
} | [
"com.adenki.smpp.message.SMPPPacket",
"java.io.IOException"
] | import com.adenki.smpp.message.SMPPPacket; import java.io.IOException; | import com.adenki.smpp.message.*; import java.io.*; | [
"com.adenki.smpp",
"java.io"
] | com.adenki.smpp; java.io; | 2,138,958 |
public ServerListenerBuilder addStoppedCallback(Consumer<? super Server> consumer) {
serverStoppedCallbacks.add(requireNonNull(consumer, "consumer"));
return this;
} | ServerListenerBuilder function(Consumer<? super Server> consumer) { serverStoppedCallbacks.add(requireNonNull(consumer, STR)); return this; } | /**
* Add {@link Consumer} invoked when the {@link Server} is stopped.
* (see: {@link ServerListener#serverStopped(Server)})
*/ | Add <code>Consumer</code> invoked when the <code>Server</code> is stopped. (see: <code>ServerListener#serverStopped(Server)</code>) | addStoppedCallback | {
"repo_name": "imasahiro/armeria",
"path": "core/src/main/java/com/linecorp/armeria/server/ServerListenerBuilder.java",
"license": "apache-2.0",
"size": 11374
} | [
"java.util.function.Consumer"
] | import java.util.function.Consumer; | import java.util.function.*; | [
"java.util"
] | java.util; | 401,391 |
EReference getAssociationProperty_InverseAssociationProperties();
| EReference getAssociationProperty_InverseAssociationProperties(); | /**
* Returns the meta object for the containment reference list '{@link org.dresdenocl.pivotmodel.AssociationProperty#getInverseAssociationProperties <em>Inverse Association Properties</em>}'.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
* @return the meta object for the containment reference list '<em>Inverse Association Properties</em>'.
* @see org.dresdenocl.pivotmodel.AssociationProperty#getInverseAssociationProperties()
* @see #getAssociationProperty()
* @generated
*/ | Returns the meta object for the containment reference list '<code>org.dresdenocl.pivotmodel.AssociationProperty#getInverseAssociationProperties Inverse Association Properties</code>'. | getAssociationProperty_InverseAssociationProperties | {
"repo_name": "dresden-ocl/dresdenocl",
"path": "plugins/org.dresdenocl.pivotmodel/src/org/dresdenocl/pivotmodel/PivotModelPackage.java",
"license": "lgpl-3.0",
"size": 98285
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 672,069 |
public Observable<ServiceResponse<OperationStatus>> updateCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
}
if (appId == null) {
throw new IllegalArgumentException("Parameter appId is required and cannot be null.");
}
if (versionId == null) {
throw new IllegalArgumentException("Parameter versionId is required and cannot be null.");
}
if (cEntityId == null) {
throw new IllegalArgumentException("Parameter cEntityId is required and cannot be null.");
}
if (roleId == null) {
throw new IllegalArgumentException("Parameter roleId is required and cannot be null.");
}
final String name = updateCompositeEntityRoleOptionalParameter != null ? updateCompositeEntityRoleOptionalParameter.name() : null;
return updateCompositeEntityRoleWithServiceResponseAsync(appId, versionId, cEntityId, roleId, name);
} | Observable<ServiceResponse<OperationStatus>> function(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException(STR); } if (appId == null) { throw new IllegalArgumentException(STR); } if (versionId == null) { throw new IllegalArgumentException(STR); } if (cEntityId == null) { throw new IllegalArgumentException(STR); } if (roleId == null) { throw new IllegalArgumentException(STR); } final String name = updateCompositeEntityRoleOptionalParameter != null ? updateCompositeEntityRoleOptionalParameter.name() : null; return updateCompositeEntityRoleWithServiceResponseAsync(appId, versionId, cEntityId, roleId, name); } | /**
* Update a role for a given composite entity in a version of the application.
*
* @param appId The application ID.
* @param versionId The version ID.
* @param cEntityId The composite entity extractor ID.
* @param roleId The entity role ID.
* @param updateCompositeEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the OperationStatus object
*/ | Update a role for a given composite entity in a version of the application | updateCompositeEntityRoleWithServiceResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java",
"license": "mit",
"size": 818917
} | [
"com.microsoft.azure.cognitiveservices.language.luis.authoring.models.OperationStatus",
"com.microsoft.azure.cognitiveservices.language.luis.authoring.models.UpdateCompositeEntityRoleOptionalParameter",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.OperationStatus; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.UpdateCompositeEntityRoleOptionalParameter; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,213,573 |
boolean getFeature0(String featureId)
throws XMLConfigurationException {
return super.getFeature(featureId);
} | boolean getFeature0(String featureId) throws XMLConfigurationException { return super.getFeature(featureId); } | /**
* Returns the state of a feature. This method calls getFeature()
* on ParserConfigurationSettings, bypassing getFeature() on this
* class.
*/ | Returns the state of a feature. This method calls getFeature() on ParserConfigurationSettings, bypassing getFeature() on this class | getFeature0 | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java",
"license": "gpl-2.0",
"size": 58530
} | [
"com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException"
] | import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException; | import com.sun.org.apache.xerces.internal.xni.parser.*; | [
"com.sun.org"
] | com.sun.org; | 83,050 |
public File getBackupFile() {
return new File(Jenkins.get().getRootDir(),"plugins/"+getShortName() + ".bak");
} | File function() { return new File(Jenkins.get().getRootDir(),STR+getShortName() + ".bak"); } | /**
* Where is the backup file?
*/ | Where is the backup file | getBackupFile | {
"repo_name": "recena/jenkins",
"path": "core/src/main/java/hudson/PluginWrapper.java",
"license": "mit",
"size": 45597
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,189,125 |
public void setTldSkipPatterns(Collection<String> patterns) {
Assert.notNull(patterns, "Patterns must not be null");
this.tldSkipPatterns = new LinkedHashSet<>(patterns);
} | void function(Collection<String> patterns) { Assert.notNull(patterns, STR); this.tldSkipPatterns = new LinkedHashSet<>(patterns); } | /**
* Set the patterns that match jars to ignore for TLD scanning. See Tomcat's
* catalina.properties for typical values. Defaults to a list drawn from that source.
* @param patterns the jar patterns to skip when scanning for TLDs etc
*/ | Set the patterns that match jars to ignore for TLD scanning. See Tomcat's catalina.properties for typical values. Defaults to a list drawn from that source | setTldSkipPatterns | {
"repo_name": "habuma/spring-boot",
"path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java",
"license": "apache-2.0",
"size": 26936
} | [
"java.util.Collection",
"java.util.LinkedHashSet",
"org.springframework.util.Assert"
] | import java.util.Collection; import java.util.LinkedHashSet; import org.springframework.util.Assert; | import java.util.*; import org.springframework.util.*; | [
"java.util",
"org.springframework.util"
] | java.util; org.springframework.util; | 2,788,486 |
public void initialiseBounds() {
_minX = _minY = Integer.MAX_VALUE;
_maxX = _maxY = Integer.MIN_VALUE;
List<Ligne> allLignes = new ArrayList<Ligne>(_lignes);
allLignes.addAll(_taxiway);
allLignes.addAll(_pushbacks);
trouverLimitesReels(allLignes);
trouverLimitesReels(get_points());
}
| void function() { _minX = _minY = Integer.MAX_VALUE; _maxX = _maxY = Integer.MIN_VALUE; List<Ligne> allLignes = new ArrayList<Ligne>(_lignes); allLignes.addAll(_taxiway); allLignes.addAll(_pushbacks); trouverLimitesReels(allLignes); trouverLimitesReels(get_points()); } | /**
* Initialise les limites de l'aeroport.
*/ | Initialise les limites de l'aeroport | initialiseBounds | {
"repo_name": "avaret/simuroul",
"path": "simuroul_pilote/src/fr/iessa/metier/infra/Aeroport.java",
"license": "gpl-3.0",
"size": 6716
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 281,851 |
public static GdbPrint parse(GdbOutput gdbOutput) throws GdbParseException {
String output = gdbOutput.getOutput();
Matcher matcher = GDB_PRINT.matcher(output);
if (matcher.find()) {
String value = matcher.group(2);
return new GdbPrint(value);
}
throw new GdbParseException(GdbPrint.class, output);
} | static GdbPrint function(GdbOutput gdbOutput) throws GdbParseException { String output = gdbOutput.getOutput(); Matcher matcher = GDB_PRINT.matcher(output); if (matcher.find()) { String value = matcher.group(2); return new GdbPrint(value); } throw new GdbParseException(GdbPrint.class, output); } | /**
* Factory method.
*/ | Factory method | parse | {
"repo_name": "gazarenkov/che-sketch",
"path": "plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbPrint.java",
"license": "epl-1.0",
"size": 1465
} | [
"java.util.regex.Matcher",
"org.eclipse.che.plugin.gdb.server.exception.GdbParseException"
] | import java.util.regex.Matcher; import org.eclipse.che.plugin.gdb.server.exception.GdbParseException; | import java.util.regex.*; import org.eclipse.che.plugin.gdb.server.exception.*; | [
"java.util",
"org.eclipse.che"
] | java.util; org.eclipse.che; | 699,779 |
public void flushBase64() throws java.io.IOException
{
if(this.position > 0)
{
if(this.encode)
{
this.out.write(Base64.encode3to4(this.b4, this.buffer, this.position, this.options));
this.position = 0;
} // end if: encoding
else
{
throw new java.io.IOException("Base64 input not properly padded.");
} // end else: decoding
} // end if: buffer partially full
} // end flush | void function() throws java.io.IOException { if(this.position > 0) { if(this.encode) { this.out.write(Base64.encode3to4(this.b4, this.buffer, this.position, this.options)); this.position = 0; } else { throw new java.io.IOException(STR); } } } | /**
* Method added by PHIL. [Thanks, PHIL. -Rob] This pads the buffer
* without closing the stream.
*
* @throws java.io.IOException if there's an error.
*/ | Method added by PHIL. [Thanks, PHIL. -Rob] This pads the buffer without closing the stream | flushBase64 | {
"repo_name": "fireandfuel/Niobe-Legion",
"path": "shared/src/niobe/legion/shared/Base64.java",
"license": "lgpl-3.0",
"size": 89841
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,783,253 |
public static Date addSeconds(Date date, int seconds) {
Calendar calendar = toCalendar(date);
CalendarUtil.addSeconds(calendar, seconds);
return calendar.getTime();
} | static Date function(Date date, int seconds) { Calendar calendar = toCalendar(date); CalendarUtil.addSeconds(calendar, seconds); return calendar.getTime(); } | /**
* Add the given amount of seconds to the given date. It actually converts the date to Calendar
* and calls {@link CalendarUtil#addSeconds(Calendar, int)} and then converts back to date.
* @param date The date to add the given amount of seconds to.
* @param seconds The amount of seconds to be added to the given date. Negative values are also
* allowed, it will just go back in time.
*/ | Add the given amount of seconds to the given date. It actually converts the date to Calendar and calls <code>CalendarUtil#addSeconds(Calendar, int)</code> and then converts back to date | addSeconds | {
"repo_name": "masterucm1617/botzzaroni",
"path": "BotzzaroniDev/src/icaro/aplicaciones/informacion/gestionPizzeria/DateUtil.java",
"license": "gpl-3.0",
"size": 22471
} | [
"java.util.Calendar",
"java.util.Date"
] | import java.util.Calendar; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 76,677 |
if (type.isArray() || type.isPrimitive())
return null;
if (name.equals(type.getTypeDeclaration().getQualifiedName()))
return type;
final ITypeBinding binding= type.getSuperclass();
if (binding != null) {
final ITypeBinding result= findTypeInHierarchy(binding, name);
if (result != null)
return result;
}
return null;
}
private TextEditBasedChangeManager fChangeManager= null;
private int fChanges= 0;
private IType fSubType;
private IType fSuperType= null;
public UseSuperTypeProcessor(final IType subType) {
super(null);
fReplace= true;
fSubType= subType;
}
public UseSuperTypeProcessor(final IType subType, final IType superType) {
super(null);
fReplace= true;
fSubType= subType;
fSuperType= superType;
} | if (type.isArray() type.isPrimitive()) return null; if (name.equals(type.getTypeDeclaration().getQualifiedName())) return type; final ITypeBinding binding= type.getSuperclass(); if (binding != null) { final ITypeBinding result= findTypeInHierarchy(binding, name); if (result != null) return result; } return null; } private TextEditBasedChangeManager fChangeManager= null; private int fChanges= 0; private IType fSubType; private IType fSuperType= null; public UseSuperTypeProcessor(final IType subType) { super(null); fReplace= true; fSubType= subType; } public UseSuperTypeProcessor(final IType subType, final IType superType) { super(null); fReplace= true; fSubType= subType; fSuperType= superType; } | /**
* Finds the type with the given fully qualified name (generic type
* parameters included) in the hierarchy.
*
* @param type
* The hierarchy type to find the super type in
* @param name
* The fully qualified name of the super type
* @return The found super type, or <code>null</code>
*/ | Finds the type with the given fully qualified name (generic type parameters included) in the hierarchy | findTypeInHierarchy | {
"repo_name": "boniatillo-com/PhaserEditor",
"path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/corext/refactoring/structure/UseSuperTypeProcessor.java",
"license": "epl-1.0",
"size": 20890
} | [
"org.eclipse.wst.jsdt.core.IType",
"org.eclipse.wst.jsdt.core.dom.ITypeBinding",
"org.eclipse.wst.jsdt.internal.corext.refactoring.util.TextEditBasedChangeManager"
] | import org.eclipse.wst.jsdt.core.IType; import org.eclipse.wst.jsdt.core.dom.ITypeBinding; import org.eclipse.wst.jsdt.internal.corext.refactoring.util.TextEditBasedChangeManager; | import org.eclipse.wst.jsdt.core.*; import org.eclipse.wst.jsdt.core.dom.*; import org.eclipse.wst.jsdt.internal.corext.refactoring.util.*; | [
"org.eclipse.wst"
] | org.eclipse.wst; | 378,353 |
private Map<TopicPartition, List<ConsumerRecord<K, V>>> pollOnce(long timeout) {
// TODO: Sub-requests should take into account the poll timeout (KAFKA-1894)
coordinator.ensureCoordinatorKnown();
// ensure we have partitions assigned if we expect to
if (subscriptions.partitionsAutoAssigned())
coordinator.ensurePartitionAssignment();
// fetch positions if we have partitions we're subscribed to that we
// don't know the offset for
if (!subscriptions.hasAllFetchPositions())
updateFetchPositions(this.subscriptions.missingFetchPositions());
// init any new fetches (won't resend pending fetches)
Cluster cluster = this.metadata.fetch();
Map<TopicPartition, List<ConsumerRecord<K, V>>> records = fetcher.fetchedRecords();
// if data is available already, e.g. from a previous network client poll() call to commit,
// then just return it immediately
if (!records.isEmpty()) {
return records;
}
fetcher.initFetches(cluster);
client.poll(timeout);
return fetcher.fetchedRecords();
} | Map<TopicPartition, List<ConsumerRecord<K, V>>> function(long timeout) { coordinator.ensureCoordinatorKnown(); if (subscriptions.partitionsAutoAssigned()) coordinator.ensurePartitionAssignment(); if (!subscriptions.hasAllFetchPositions()) updateFetchPositions(this.subscriptions.missingFetchPositions()); Cluster cluster = this.metadata.fetch(); Map<TopicPartition, List<ConsumerRecord<K, V>>> records = fetcher.fetchedRecords(); if (!records.isEmpty()) { return records; } fetcher.initFetches(cluster); client.poll(timeout); return fetcher.fetchedRecords(); } | /**
* Do one round of polling. In addition to checking for new data, this does any needed
* heart-beating, auto-commits, and offset updates.
* @param timeout The maximum time to block in the underlying poll
* @return The fetched records (may be empty)
*/ | Do one round of polling. In addition to checking for new data, this does any needed heart-beating, auto-commits, and offset updates | pollOnce | {
"repo_name": "samaitra/kafka",
"path": "clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java",
"license": "apache-2.0",
"size": 69133
} | [
"java.util.List",
"java.util.Map",
"org.apache.kafka.common.Cluster",
"org.apache.kafka.common.TopicPartition"
] | import java.util.List; import java.util.Map; import org.apache.kafka.common.Cluster; import org.apache.kafka.common.TopicPartition; | import java.util.*; import org.apache.kafka.common.*; | [
"java.util",
"org.apache.kafka"
] | java.util; org.apache.kafka; | 2,426,836 |
@Test
public void testDescribe() {
final Item item = new Item("name1", "class", "subclass",
new HashMap<String, String>());
assertThat(item.describe(), equalTo("You see a §'name1'."));
item.setDescription("Description.");
item.setBoundTo("hero");
item.put("min_level", 1);
item.put("atk", 2);
item.put("def", 3);
item.put("rate", 4);
item.put("amount", 5);
item.put("range", 6);
item.put("lifesteal", 7);
assertThat(item.describe(), equalTo("Description. It is a special reward for hero, and cannot be used by others. Stats are (ATK: 2 DEF: 3 RATE: 4 HP: 5 RANGE: 6 LIFESTEAL: 7 MIN-LEVEL: 1)."));
item.setDamageType(Nature.FIRE);
assertThat(item.describe(), equalTo("Description. It is a special reward for hero, and cannot be used by others. Stats are (ATK: 2 [FIRE] DEF: 3 RATE: 4 HP: 5 RANGE: 6 LIFESTEAL: 7 MIN-LEVEL: 1)."));
} | void function() { final Item item = new Item("name1", "class", STR, new HashMap<String, String>()); assertThat(item.describe(), equalTo(STR)); item.setDescription(STR); item.setBoundTo("hero"); item.put(STR, 1); item.put("atk", 2); item.put("def", 3); item.put("rate", 4); item.put(STR, 5); item.put("range", 6); item.put(STR, 7); assertThat(item.describe(), equalTo(STR)); item.setDamageType(Nature.FIRE); assertThat(item.describe(), equalTo(STR)); } | /**
* Tests for describe.
*/ | Tests for describe | testDescribe | {
"repo_name": "AntumDeluge/arianne-stendhal",
"path": "tests/games/stendhal/server/entity/item/ItemTest.java",
"license": "gpl-2.0",
"size": 14749
} | [
"games.stendhal.common.constants.Nature",
"java.util.HashMap",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import games.stendhal.common.constants.Nature; import java.util.HashMap; import org.hamcrest.Matchers; import org.junit.Assert; | import games.stendhal.common.constants.*; import java.util.*; import org.hamcrest.*; import org.junit.*; | [
"games.stendhal.common",
"java.util",
"org.hamcrest",
"org.junit"
] | games.stendhal.common; java.util; org.hamcrest; org.junit; | 719,205 |
@Override
public final IExpr arg2() {
return arg2;
} | final IExpr function() { return arg2; } | /**
* Get the second argument (i.e. the third element of the underlying list structure) of the <code>
* AST</code> function (i.e. get(2) ). <br>
* <b>Example:</b> for the AST representing the expression <code>x^y</code> (i.e. <code>
* Power(x, y)</code>), <code>arg2()</code> returns <code>y</code>.
*
* @return the second argument of the function represented by this <code>AST</code>.
* @see IExpr#head()
*/ | Get the second argument (i.e. the third element of the underlying list structure) of the <code> AST</code> function (i.e. get(2) ). Example: for the AST representing the expression <code>x^y</code> (i.e. <code> Power(x, y)</code>), <code>arg2()</code> returns <code>y</code> | arg2 | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/B3.java",
"license": "gpl-3.0",
"size": 25695
} | [
"org.matheclipse.core.interfaces.IExpr"
] | import org.matheclipse.core.interfaces.IExpr; | import org.matheclipse.core.interfaces.*; | [
"org.matheclipse.core"
] | org.matheclipse.core; | 1,134,791 |
public ExternalNavigationParams.Builder buildExternalNavigationParams(
NavigationHandle navigationHandle, RedirectHandler redirectHandler,
boolean shouldCloseTab, GURL escapedUrl) {
boolean isInitialTabLaunchInBackground =
mClient.wasTabLaunchedFromLongPressInBackground() && shouldCloseTab;
// http://crbug.com/448977: If a new tab is closed by this overriding, we should open an
// Intent in a new tab when Chrome receives it again.
return new ExternalNavigationParams
.Builder(escapedUrl, mClient.isIncognito(), navigationHandle.getReferrerUrl(),
navigationHandle.pageTransition(), navigationHandle.isRedirect())
.setApplicationMustBeInForeground(true)
.setRedirectHandler(redirectHandler)
.setOpenInNewTab(shouldCloseTab)
.setIsBackgroundTabNavigation(mClient.isHidden() && !isInitialTabLaunchInBackground)
.setIntentLaunchesAllowedInBackgroundTabs(
mClient.areIntentLaunchesAllowedInHiddenTabsForNavigation(navigationHandle))
.setIsMainFrame(navigationHandle.isInPrimaryMainFrame())
.setHasUserGesture(navigationHandle.hasUserGesture())
.setShouldCloseContentsOnOverrideUrlLoadingAndLaunchIntent(
shouldCloseTab && navigationHandle.isInPrimaryMainFrame())
.setIsRendererInitiated(navigationHandle.isRendererInitiated())
.setInitiatorOrigin(navigationHandle.getInitiatorOrigin());
} | ExternalNavigationParams.Builder function( NavigationHandle navigationHandle, RedirectHandler redirectHandler, boolean shouldCloseTab, GURL escapedUrl) { boolean isInitialTabLaunchInBackground = mClient.wasTabLaunchedFromLongPressInBackground() && shouldCloseTab; return new ExternalNavigationParams .Builder(escapedUrl, mClient.isIncognito(), navigationHandle.getReferrerUrl(), navigationHandle.pageTransition(), navigationHandle.isRedirect()) .setApplicationMustBeInForeground(true) .setRedirectHandler(redirectHandler) .setOpenInNewTab(shouldCloseTab) .setIsBackgroundTabNavigation(mClient.isHidden() && !isInitialTabLaunchInBackground) .setIntentLaunchesAllowedInBackgroundTabs( mClient.areIntentLaunchesAllowedInHiddenTabsForNavigation(navigationHandle)) .setIsMainFrame(navigationHandle.isInPrimaryMainFrame()) .setHasUserGesture(navigationHandle.hasUserGesture()) .setShouldCloseContentsOnOverrideUrlLoadingAndLaunchIntent( shouldCloseTab && navigationHandle.isInPrimaryMainFrame()) .setIsRendererInitiated(navigationHandle.isRendererInitiated()) .setInitiatorOrigin(navigationHandle.getInitiatorOrigin()); } | /**
* Returns ExternalNavigationParams.Builder to generate ExternalNavigationParams for
* ExternalNavigationHandler#shouldOverrideUrlLoading().
*/ | Returns ExternalNavigationParams.Builder to generate ExternalNavigationParams for ExternalNavigationHandler#shouldOverrideUrlLoading() | buildExternalNavigationParams | {
"repo_name": "chromium/chromium",
"path": "components/external_intents/android/java/src/org/chromium/components/external_intents/InterceptNavigationDelegateImpl.java",
"license": "bsd-3-clause",
"size": 16012
} | [
"org.chromium.content_public.browser.NavigationHandle"
] | import org.chromium.content_public.browser.NavigationHandle; | import org.chromium.content_public.browser.*; | [
"org.chromium.content_public"
] | org.chromium.content_public; | 1,798,070 |
public void partProcessingCompleted(BoardLocation board, Placement placement);
// TODO Maybe partProcessingFailed with a reason
// TODO Add job progress information, especially after pre-processing
// so that listeners can know the total placement count to be processed.
| void function(BoardLocation board, Placement placement); | /**
* Fired when the JobProcessor has completed all operations regarding the
* given Placement.
* @param board
* @param placement
*/ | Fired when the JobProcessor has completed all operations regarding the given Placement | partProcessingCompleted | {
"repo_name": "firepick-delta/openpnp",
"path": "src/main/java/org/openpnp/JobProcessorListener.java",
"license": "gpl-3.0",
"size": 3580
} | [
"org.openpnp.model.BoardLocation",
"org.openpnp.model.Placement"
] | import org.openpnp.model.BoardLocation; import org.openpnp.model.Placement; | import org.openpnp.model.*; | [
"org.openpnp.model"
] | org.openpnp.model; | 2,642,258 |
@Override
public void startPrefixMapping(String prefix, String uri)
throws SAXException {
_handler.startPrefixMapping(prefix, uri);
} | void function(String prefix, String uri) throws SAXException { _handler.startPrefixMapping(prefix, uri); } | /**
* Implements org.xml.sax.ContentHandler.startPrefixMapping()
* Begin the scope of a prefix-URI Namespace mapping.
*/ | Implements org.xml.sax.ContentHandler.startPrefixMapping() Begin the scope of a prefix-URI Namespace mapping | startPrefixMapping | {
"repo_name": "md-5/jdk10",
"path": "src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerHandlerImpl.java",
"license": "gpl-2.0",
"size": 15833
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 64,326 |
public ServiceFuture<ExpressRouteCircuitsArpTableListResultInner> beginListArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback<ExpressRouteCircuitsArpTableListResultInner> serviceCallback) {
return ServiceFuture.fromResponse(beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback);
} | ServiceFuture<ExpressRouteCircuitsArpTableListResultInner> function(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback<ExpressRouteCircuitsArpTableListResultInner> serviceCallback) { return ServiceFuture.fromResponse(beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); } | /**
* Gets the currently advertised ARP table associated with the express route cross connection in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @param crossConnectionName The name of the ExpressRouteCrossConnection.
* @param peeringName The name of the peering.
* @param devicePath The path of the device.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/ | Gets the currently advertised ARP table associated with the express route cross connection in a resource group | beginListArpTableAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/implementation/ExpressRouteCrossConnectionsInner.java",
"license": "mit",
"size": 100923
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 670,264 |
if (buf.remaining() != SIZE)
throw new IllegalArgumentException();
int id = buf.getShort() & 0xFFFF;
int chunk = buf.getShort() & 0xFFFF;
int nextSector = ByteBufferUtils.getTriByte(buf);
int type = buf.get() & 0xFF;
byte[] data = new byte[DATA_SIZE];
buf.get(data);
return new Sector(type, id, chunk, nextSector, data);
}
private final int type;
private final int id;
private final int chunk;
private final int nextSector;
private final byte[] data;
public Sector(int type, int id, int chunk, int nextSector, byte[] data) {
this.type = type;
this.id = id;
this.chunk = chunk;
this.nextSector = nextSector;
this.data = data;
} | if (buf.remaining() != SIZE) throw new IllegalArgumentException(); int id = buf.getShort() & 0xFFFF; int chunk = buf.getShort() & 0xFFFF; int nextSector = ByteBufferUtils.getTriByte(buf); int type = buf.get() & 0xFF; byte[] data = new byte[DATA_SIZE]; buf.get(data); return new Sector(type, id, chunk, nextSector, data); } private final int type; private final int id; private final int chunk; private final int nextSector; private final byte[] data; public Sector(int type, int id, int chunk, int nextSector, byte[] data) { this.type = type; this.id = id; this.chunk = chunk; this.nextSector = nextSector; this.data = data; } | /**
* Decodes the specified {@link ByteBuffer} into a {@link Sector} object.
* @param buf The buffer.
* @return The sector.
*/ | Decodes the specified <code>ByteBuffer</code> into a <code>Sector</code> object | decode | {
"repo_name": "davidi2/mopar",
"path": "src/net/scapeemulator/cache/Sector.java",
"license": "isc",
"size": 3249
} | [
"net.scapeemulator.cache.util.ByteBufferUtils"
] | import net.scapeemulator.cache.util.ByteBufferUtils; | import net.scapeemulator.cache.util.*; | [
"net.scapeemulator.cache"
] | net.scapeemulator.cache; | 622,589 |
ServiceClientCredentials getCredentials(); | ServiceClientCredentials getCredentials(); | /**
* Gets The management credentials for Azure..
*
* @return the credentials value.
*/ | Gets The management credentials for Azure. | getCredentials | {
"repo_name": "matt-gibbs/AutoRest",
"path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/subscriptionidapiversion/MicrosoftAzureTestUrl.java",
"license": "mit",
"size": 2886
} | [
"com.microsoft.rest.credentials.ServiceClientCredentials"
] | import com.microsoft.rest.credentials.ServiceClientCredentials; | import com.microsoft.rest.credentials.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 648,951 |
public void setMB(final TwoBitField mB) {
this.mB = mB;
} | void function(final TwoBitField mB) { this.mB = mB; } | /**
* set mB of type TwoBitField .
* @param mB to be set
*/ | set mB of type TwoBitField | setMB | {
"repo_name": "mksmbrtsh/LLRPexplorer",
"path": "src/org/llrp/ltk/generated/parameters/C1G2BlockWrite.java",
"license": "apache-2.0",
"size": 14553
} | [
"org.llrp.ltk.types.TwoBitField"
] | import org.llrp.ltk.types.TwoBitField; | import org.llrp.ltk.types.*; | [
"org.llrp.ltk"
] | org.llrp.ltk; | 2,139,427 |
@Test
public void testChooseRandomInclude3() {
String scope = "/d1";
Map<Node, Integer> frequency = pickNodesAtRandom(200, scope, null);
LOG.info("No node is excluded.");
for (int i = 0; i < 5; ++i) {
// all nodes should be more than zero
assertTrue(dataNodes[i] + " should have been chosen.",
frequency.get(dataNodes[i]) > 0);
}
} | void function() { String scope = "/d1"; Map<Node, Integer> frequency = pickNodesAtRandom(200, scope, null); LOG.info(STR); for (int i = 0; i < 5; ++i) { assertTrue(dataNodes[i] + STR, frequency.get(dataNodes[i]) > 0); } } | /**
* Tests chooseRandom with include scope, no exlucde nodes.
*/ | Tests chooseRandom with include scope, no exlucde nodes | testChooseRandomInclude3 | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java",
"license": "apache-2.0",
"size": 20251
} | [
"java.util.Map",
"org.junit.Assert"
] | import java.util.Map; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 2,286,530 |
public static int getScriptEditorPort() {
IPreferenceStore prefs = Activator.getDefault().getPreferenceStore();
try {
return Integer.parseInt(prefs.getString(GHIDRA_SCRIPT_EDITOR_PORT_NUMBER));
}
catch (NumberFormatException e) {
return -1;
}
} | static int function() { IPreferenceStore prefs = Activator.getDefault().getPreferenceStore(); try { return Integer.parseInt(prefs.getString(GHIDRA_SCRIPT_EDITOR_PORT_NUMBER)); } catch (NumberFormatException e) { return -1; } } | /**
* Gets the port used for script editor.
*
* @return The port used for script editor. Will return -1 if the port is not set.
*/ | Gets the port used for script editor | getScriptEditorPort | {
"repo_name": "NationalSecurityAgency/ghidra",
"path": "GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/ghidrascripteditor/preferences/GhidraScriptEditorPreferences.java",
"license": "apache-2.0",
"size": 2236
} | [
"org.eclipse.jface.preference.IPreferenceStore"
] | import org.eclipse.jface.preference.IPreferenceStore; | import org.eclipse.jface.preference.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,407,009 |
protected void paintComponent(Graphics g) {
super.paintComponent(getGraphics2D(g));
} | void function(Graphics g) { super.paintComponent(getGraphics2D(g)); } | /**
* The <code>paintComponent</code> method is overridden so we apply any necessary rendering hints to the Graphics
* object.
*/ | The <code>paintComponent</code> method is overridden so we apply any necessary rendering hints to the Graphics object | paintComponent | {
"repo_name": "kevinmcgoldrick/Tank",
"path": "tools/script_filter/src/main/java/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea.java",
"license": "epl-1.0",
"size": 75671
} | [
"java.awt.Graphics"
] | import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 50,390 |
private int getDecisionForStr(PolicyDecisionPoint pdp, String requestStr) throws Exception {
final RequestContext request = RequestResponseContextFactory.createRequestCtx();
request.readRequest(IOUtils.toInputStream(requestStr, StandardCharsets.UTF_8));
return getDecision(pdp, request);
} | int function(PolicyDecisionPoint pdp, String requestStr) throws Exception { final RequestContext request = RequestResponseContextFactory.createRequestCtx(); request.readRequest(IOUtils.toInputStream(requestStr, StandardCharsets.UTF_8)); return getDecision(pdp, request); } | /**
* Get the decision from the given PDP for the given request string (XML as a String).
*
* @param pdp
* @param requestStr
* @return
* @throws Exception
*/ | Get the decision from the given PDP for the given request string (XML as a String) | getDecisionForStr | {
"repo_name": "xasx/wildfly",
"path": "testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/xacml/JBossPDPInteroperabilityTestCase.java",
"license": "lgpl-2.1",
"size": 19099
} | [
"java.nio.charset.StandardCharsets",
"org.apache.commons.io.IOUtils",
"org.jboss.security.xacml.factories.RequestResponseContextFactory",
"org.jboss.security.xacml.interfaces.PolicyDecisionPoint",
"org.jboss.security.xacml.interfaces.RequestContext"
] | import java.nio.charset.StandardCharsets; import org.apache.commons.io.IOUtils; import org.jboss.security.xacml.factories.RequestResponseContextFactory; import org.jboss.security.xacml.interfaces.PolicyDecisionPoint; import org.jboss.security.xacml.interfaces.RequestContext; | import java.nio.charset.*; import org.apache.commons.io.*; import org.jboss.security.xacml.factories.*; import org.jboss.security.xacml.interfaces.*; | [
"java.nio",
"org.apache.commons",
"org.jboss.security"
] | java.nio; org.apache.commons; org.jboss.security; | 2,384,667 |
protected VisorNodeDataCollectorJobResult run(VisorNodeDataCollectorJobResult res,
VisorNodeDataCollectorTaskArg arg) {
res.igniteInstanceName(ignite.name());
res.topologyVersion(ignite.cluster().topologyVersion());
long start0 = U.currentTimeMillis();
events(res, arg);
if (debug)
start0 = log(ignite.log(), "Collected events", getClass(), start0);
caches(res, arg);
if (debug)
start0 = log(ignite.log(), "Collected caches", getClass(), start0);
igfs(res);
if (debug)
log(ignite.log(), "Collected igfs", getClass(), start0);
res.errorCount(ignite.context().exceptionRegistry().errorCount());
return res;
} | VisorNodeDataCollectorJobResult function(VisorNodeDataCollectorJobResult res, VisorNodeDataCollectorTaskArg arg) { res.igniteInstanceName(ignite.name()); res.topologyVersion(ignite.cluster().topologyVersion()); long start0 = U.currentTimeMillis(); events(res, arg); if (debug) start0 = log(ignite.log(), STR, getClass(), start0); caches(res, arg); if (debug) start0 = log(ignite.log(), STR, getClass(), start0); igfs(res); if (debug) log(ignite.log(), STR, getClass(), start0); res.errorCount(ignite.context().exceptionRegistry().errorCount()); return res; } | /**
* Execution logic of concrete job.
*
* @param res Result response.
* @param arg Job argument.
* @return Job result.
*/ | Execution logic of concrete job | run | {
"repo_name": "nivanov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java",
"license": "apache-2.0",
"size": 9853
} | [
"org.apache.ignite.internal.util.typedef.internal.U",
"org.apache.ignite.internal.visor.util.VisorTaskUtils"
] | import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.internal.visor.util.VisorTaskUtils; | import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.internal.visor.util.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 967,766 |
public RouteDefinition from(Endpoint endpoint) {
RouteDefinition route = createRoute();
route.from(endpoint);
return route(route);
} | RouteDefinition function(Endpoint endpoint) { RouteDefinition route = createRoute(); route.from(endpoint); return route(route); } | /**
* Creates a new route from the given endpoint
*
* @param endpoint the from endpoint
* @return the builder
*/ | Creates a new route from the given endpoint | from | {
"repo_name": "christophd/camel",
"path": "core/camel-core-model/src/main/java/org/apache/camel/model/RoutesDefinition.java",
"license": "apache-2.0",
"size": 12997
} | [
"org.apache.camel.Endpoint"
] | import org.apache.camel.Endpoint; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 335,450 |
public void sort() {
Menu menu = new Menu();
Choice choice = menu.display(
new Choice("Merge"),
new Choice("Quick"),
new Choice("Shell")
);
switch (choice.getName()) {
case "Merge":
// do stuff for merge sortAndSearch
this.sortAndSearch.mergeSort(this.dataset);
break;
case "Quick":
// do stuff for quick sortAndSearch
this.sortAndSearch.quickSort(this.dataset);
break;
case "Shell":
this.sortAndSearch.shellSort(this.dataset);
break;
}
// Sync the data sets
// TODO: Get rid of this data set maybe?
this.dataset = this.sortAndSearch.dataset;
} | void function() { Menu menu = new Menu(); Choice choice = menu.display( new Choice("Merge"), new Choice("Quick"), new Choice("Shell") ); switch (choice.getName()) { case "Merge": this.sortAndSearch.mergeSort(this.dataset); break; case "Quick": this.sortAndSearch.quickSort(this.dataset); break; case "Shell": this.sortAndSearch.shellSort(this.dataset); break; } this.dataset = this.sortAndSearch.dataset; } | /**
* Present the user with the option to sort a data set using three sorting methods
*/ | Present the user with the option to sort a data set using three sorting methods | sort | {
"repo_name": "Deathnerd/CSC310",
"path": "src/main/com/gilleland/george/homework/Assignment3.java",
"license": "mit",
"size": 5916
} | [
"com.gilleland.george.objects.Choice",
"com.gilleland.george.utils.Menu"
] | import com.gilleland.george.objects.Choice; import com.gilleland.george.utils.Menu; | import com.gilleland.george.objects.*; import com.gilleland.george.utils.*; | [
"com.gilleland.george"
] | com.gilleland.george; | 983,008 |
public static long periodEnd(long now, long period)
{
QDate localCalendar = QDate.allocateLocalDate();
long endTime = periodEnd(now, period, localCalendar);
QDate.freeLocalDate(localCalendar);
return endTime;
} | static long function(long now, long period) { QDate localCalendar = QDate.allocateLocalDate(); long endTime = periodEnd(now, period, localCalendar); QDate.freeLocalDate(localCalendar); return endTime; } | /**
* Calculates the next period end. The calculation is in local time.
*
* @param now the current time in GMT ms since the epoch
*
* @return the time of the next period in GMT ms since the epoch
*/ | Calculates the next period end. The calculation is in local time | periodEnd | {
"repo_name": "WelcomeHUME/svn-caucho-com-resin",
"path": "modules/kernel/src/com/caucho/config/types/Period.java",
"license": "gpl-2.0",
"size": 6900
} | [
"com.caucho.util.QDate"
] | import com.caucho.util.QDate; | import com.caucho.util.*; | [
"com.caucho.util"
] | com.caucho.util; | 240,243 |
public void readPacketData(DataInput par1DataInput) throws IOException
{
this.objectiveName = readString(par1DataInput, 16);
this.objectiveDisplayName = readString(par1DataInput, 32);
this.change = par1DataInput.readByte();
} | void function(DataInput par1DataInput) throws IOException { this.objectiveName = readString(par1DataInput, 16); this.objectiveDisplayName = readString(par1DataInput, 32); this.change = par1DataInput.readByte(); } | /**
* Abstract. Reads the raw packet data from the data stream.
*/ | Abstract. Reads the raw packet data from the data stream | readPacketData | {
"repo_name": "HATB0T/RuneCraftery",
"path": "forge/mcp/src/minecraft/net/minecraft/network/packet/Packet206SetObjective.java",
"license": "lgpl-3.0",
"size": 1815
} | [
"java.io.DataInput",
"java.io.IOException"
] | import java.io.DataInput; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,046,639 |
@Test
void closesTemplateInputStream() throws IOException {
final String template = "hello, world!";
final StateAwareInputStream stream = new StateAwareInputStream(
IOUtils.toInputStream(template, StandardCharsets.UTF_8)
);
MatcherAssert.assertThat(
IOUtils.toString(
new RsVelocity(
stream,
Collections.<CharSequence, Object>emptyMap()
).body(),
StandardCharsets.UTF_8
),
Matchers.equalTo(template)
);
MatcherAssert.assertThat(stream.isClosed(), Matchers.is(true));
} | void closesTemplateInputStream() throws IOException { final String template = STR; final StateAwareInputStream stream = new StateAwareInputStream( IOUtils.toInputStream(template, StandardCharsets.UTF_8) ); MatcherAssert.assertThat( IOUtils.toString( new RsVelocity( stream, Collections.<CharSequence, Object>emptyMap() ).body(), StandardCharsets.UTF_8 ), Matchers.equalTo(template) ); MatcherAssert.assertThat(stream.isClosed(), Matchers.is(true)); } | /**
* RsVelocity should close template's InputStream after serving response.
* @throws IOException If some problem inside
*/ | RsVelocity should close template's InputStream after serving response | closesTemplateInputStream | {
"repo_name": "simonjenga/takes",
"path": "src/test/java/org/takes/rs/RsVelocityTest.java",
"license": "mit",
"size": 3644
} | [
"java.io.IOException",
"java.nio.charset.StandardCharsets",
"java.util.Collections",
"org.apache.commons.io.IOUtils",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.takes.misc.StateAwareInputStream"
] | import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.Collections; import org.apache.commons.io.IOUtils; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.takes.misc.StateAwareInputStream; | import java.io.*; import java.nio.charset.*; import java.util.*; import org.apache.commons.io.*; import org.hamcrest.*; import org.takes.misc.*; | [
"java.io",
"java.nio",
"java.util",
"org.apache.commons",
"org.hamcrest",
"org.takes.misc"
] | java.io; java.nio; java.util; org.apache.commons; org.hamcrest; org.takes.misc; | 1,565,015 |
@Generated
@Selector("removeElement:")
public native boolean removeElement(NSObject element); | @Selector(STR) native boolean function(NSObject element); | /**
* Removes the given NSObject from this octree
* Note that this is an exhaustive search and is can be slow for larger trees.
* Cache the relevant GKOctreeNode and use removeElement:WithNode: for better performance.
*
* @param element the element to be removed
* @return returns YES if the data was removed, NO otherwise
*/ | Removes the given NSObject from this octree Note that this is an exhaustive search and is can be slow for larger trees. Cache the relevant GKOctreeNode and use removeElement:WithNode: for better performance | removeElement | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/gameplaykit/GKOctree.java",
"license": "apache-2.0",
"size": 5890
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,511,847 |
private void preCheckout(Launcher launcher, BuildListener listener) throws IOException, InterruptedException{
if (project instanceof BuildableItemWithBuildWrappers) {
BuildableItemWithBuildWrappers biwbw = (BuildableItemWithBuildWrappers) project;
for (BuildWrapper bw : biwbw.getBuildWrappersList())
bw.preCheckout(AbstractBuild.this,launcher,listener);
}
} | void function(Launcher launcher, BuildListener listener) throws IOException, InterruptedException{ if (project instanceof BuildableItemWithBuildWrappers) { BuildableItemWithBuildWrappers biwbw = (BuildableItemWithBuildWrappers) project; for (BuildWrapper bw : biwbw.getBuildWrappersList()) bw.preCheckout(AbstractBuild.this,launcher,listener); } } | /**
* Run preCheckout on {@link BuildWrapper}s
*
* @param launcher
* The launcher, never null.
* @param listener
* Never null, connected to the main build output.
* @throws IOException
* @throws InterruptedException
*/ | Run preCheckout on <code>BuildWrapper</code>s | preCheckout | {
"repo_name": "sumitk1/jenkins",
"path": "core/src/main/java/hudson/model/AbstractBuild.java",
"license": "mit",
"size": 45066
} | [
"hudson.tasks.BuildWrapper",
"java.io.IOException"
] | import hudson.tasks.BuildWrapper; import java.io.IOException; | import hudson.tasks.*; import java.io.*; | [
"hudson.tasks",
"java.io"
] | hudson.tasks; java.io; | 2,039,645 |
void addPermanentRole(Role label); | void addPermanentRole(Role label); | /**
* Add a role to this User's Role Set.
* @param label The label of the Role you want to add.
*/ | Add a role to this User's Role Set | addPermanentRole | {
"repo_name": "moio/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/user/User.java",
"license": "gpl-2.0",
"size": 14492
} | [
"com.redhat.rhn.domain.role.Role"
] | import com.redhat.rhn.domain.role.Role; | import com.redhat.rhn.domain.role.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 1,887,361 |
public static void setSeed(long s) {
seed = s;
random = new Random(seed);
} | static void function(long s) { seed = s; random = new Random(seed); } | /**
* Sets the seed of the psedurandom number generator.
*/ | Sets the seed of the psedurandom number generator | setSeed | {
"repo_name": "KenyStev/Algoritmos",
"path": "lib/stdlib/StdRandom.java",
"license": "gpl-3.0",
"size": 12066
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 2,096,983 |
public boolean complete() {
Map<ClientTransport.PingCallback, Executor> callbacks;
long roundTripTimeNanos;
synchronized (this) {
if (completed) {
return false;
}
completed = true;
roundTripTimeNanos = this.roundTripTimeNanos = stopwatch.elapsed(TimeUnit.NANOSECONDS);
callbacks = this.callbacks;
this.callbacks = null;
}
for (Map.Entry<ClientTransport.PingCallback, Executor> entry : callbacks.entrySet()) {
doExecute(entry.getValue(), asRunnable(entry.getKey(), roundTripTimeNanos));
}
return true;
} | boolean function() { Map<ClientTransport.PingCallback, Executor> callbacks; long roundTripTimeNanos; synchronized (this) { if (completed) { return false; } completed = true; roundTripTimeNanos = this.roundTripTimeNanos = stopwatch.elapsed(TimeUnit.NANOSECONDS); callbacks = this.callbacks; this.callbacks = null; } for (Map.Entry<ClientTransport.PingCallback, Executor> entry : callbacks.entrySet()) { doExecute(entry.getValue(), asRunnable(entry.getKey(), roundTripTimeNanos)); } return true; } | /**
* Completes this operation successfully. The stopwatch given during construction is used to
* measure the elapsed time. Registered callbacks are invoked and provided the measured elapsed
* time.
*
* @return true if the operation is marked as complete; false if it was already complete
*/ | Completes this operation successfully. The stopwatch given during construction is used to measure the elapsed time. Registered callbacks are invoked and provided the measured elapsed time | complete | {
"repo_name": "rmichela/grpc-java",
"path": "core/src/main/java/io/grpc/internal/Http2Ping.java",
"license": "apache-2.0",
"size": 7019
} | [
"io.grpc.internal.ClientTransport",
"java.util.Map",
"java.util.concurrent.Executor",
"java.util.concurrent.TimeUnit"
] | import io.grpc.internal.ClientTransport; import java.util.Map; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; | import io.grpc.internal.*; import java.util.*; import java.util.concurrent.*; | [
"io.grpc.internal",
"java.util"
] | io.grpc.internal; java.util; | 728,483 |
public Locale getLocale() {
return iLocale;
}
| Locale function() { return iLocale; } | /**
* Gets the locale that will be used for printing and parsing.
*
* @return the locale to use
*/ | Gets the locale that will be used for printing and parsing | getLocale | {
"repo_name": "charles-cooper/idylfin",
"path": "src/org/joda/time/format/PeriodFormatter.java",
"license": "apache-2.0",
"size": 11342
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 679,387 |
public void reversePriority(MarkerField field) {
if (descendingFields.remove(field)) {
return;
}
descendingFields.add(field);
} | void function(MarkerField field) { if (descendingFields.remove(field)) { return; } descendingFields.add(field); } | /**
* Switch the priority of the field from ascending to descending or vice
* versa.
*
* @param field
*/ | Switch the priority of the field from ascending to descending or vice versa | reversePriority | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerComparator.java",
"license": "epl-1.0",
"size": 5697
} | [
"org.eclipse.ui.views.markers.MarkerField"
] | import org.eclipse.ui.views.markers.MarkerField; | import org.eclipse.ui.views.markers.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 2,205,170 |
synchronized void resetAccounting(long newLastTime) {
long interval = newLastTime - lastTime.getAndSet(newLastTime);
if (interval == 0) {
// nothing to do
return;
}
if (logger.isDebugEnabled() && interval > checkInterval() << 1) {
logger.debug("Acct schedule not ok: " + interval + " > 2*" + checkInterval() + " from " + name);
}
lastReadBytes = currentReadBytes.getAndSet(0);
lastWrittenBytes = currentWrittenBytes.getAndSet(0);
lastReadThroughput = lastReadBytes * 1000 / interval;
// nb byte / checkInterval in ms * 1000 (1s)
lastWriteThroughput = lastWrittenBytes * 1000 / interval;
// nb byte / checkInterval in ms * 1000 (1s)
realWriteThroughput = realWrittenBytes.getAndSet(0) * 1000 / interval;
lastWritingTime = Math.max(lastWritingTime, writingTime);
lastReadingTime = Math.max(lastReadingTime, readingTime);
}
public TrafficCounter(ScheduledExecutorService executor, String name, long checkInterval) {
if (name == null) {
throw new NullPointerException("name");
}
trafficShapingHandler = null;
this.executor = executor;
this.name = name;
init(checkInterval);
}
public TrafficCounter(
AbstractTrafficShapingHandler trafficShapingHandler, ScheduledExecutorService executor,
String name, long checkInterval) {
if (trafficShapingHandler == null) {
throw new IllegalArgumentException("trafficShapingHandler");
}
if (name == null) {
throw new NullPointerException("name");
}
this.trafficShapingHandler = trafficShapingHandler;
this.executor = executor;
this.name = name;
init(checkInterval);
} | synchronized void resetAccounting(long newLastTime) { long interval = newLastTime - lastTime.getAndSet(newLastTime); if (interval == 0) { return; } if (logger.isDebugEnabled() && interval > checkInterval() << 1) { logger.debug(STR + interval + STR + checkInterval() + STR + name); } lastReadBytes = currentReadBytes.getAndSet(0); lastWrittenBytes = currentWrittenBytes.getAndSet(0); lastReadThroughput = lastReadBytes * 1000 / interval; lastWriteThroughput = lastWrittenBytes * 1000 / interval; realWriteThroughput = realWrittenBytes.getAndSet(0) * 1000 / interval; lastWritingTime = Math.max(lastWritingTime, writingTime); lastReadingTime = Math.max(lastReadingTime, readingTime); } public TrafficCounter(ScheduledExecutorService executor, String name, long checkInterval) { if (name == null) { throw new NullPointerException("name"); } trafficShapingHandler = null; this.executor = executor; this.name = name; init(checkInterval); } public TrafficCounter( AbstractTrafficShapingHandler trafficShapingHandler, ScheduledExecutorService executor, String name, long checkInterval) { if (trafficShapingHandler == null) { throw new IllegalArgumentException(STR); } if (name == null) { throw new NullPointerException("name"); } this.trafficShapingHandler = trafficShapingHandler; this.executor = executor; this.name = name; init(checkInterval); } | /**
* Reset the accounting on Read and Write.
*
* @param newLastTime the milliseconds unix timestamp that we should be considered up-to-date for.
*/ | Reset the accounting on Read and Write | resetAccounting | {
"repo_name": "tbrooks8/netty",
"path": "handler/src/main/java/io/netty/handler/traffic/TrafficCounter.java",
"license": "apache-2.0",
"size": 20742
} | [
"java.util.concurrent.ScheduledExecutorService"
] | import java.util.concurrent.ScheduledExecutorService; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 616,986 |
public void storeRMDelegationToken(
RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) {
handleStoreEvent(new RMStateStoreRMDTEvent(rmDTIdentifier, renewDate,
RMStateStoreEventType.STORE_DELEGATION_TOKEN));
} | void function( RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) { handleStoreEvent(new RMStateStoreRMDTEvent(rmDTIdentifier, renewDate, RMStateStoreEventType.STORE_DELEGATION_TOKEN)); } | /**
* RMDTSecretManager call this to store the state of a delegation token
* and sequence number
*/ | RMDTSecretManager call this to store the state of a delegation token and sequence number | storeRMDelegationToken | {
"repo_name": "lukmajercak/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStore.java",
"license": "apache-2.0",
"size": 51874
} | [
"org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier"
] | import org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier; | import org.apache.hadoop.yarn.security.client.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,328,271 |
QueueInfo getQueueInfo(boolean includeChildQueues, boolean recursive); | QueueInfo getQueueInfo(boolean includeChildQueues, boolean recursive); | /**
* Get queue information
* @param includeChildQueues include child queues?
* @param recursive recursively get child queue information?
* @return queue information
*/ | Get queue information | getQueueInfo | {
"repo_name": "dilaver/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/Queue.java",
"license": "apache-2.0",
"size": 4103
} | [
"org.apache.hadoop.yarn.api.records.QueueInfo"
] | import org.apache.hadoop.yarn.api.records.QueueInfo; | import org.apache.hadoop.yarn.api.records.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,334,144 |
@Override
public ReturnValue go(String[] args) throws Exception
{
// Create the Spring application context.
ApplicationContext applicationContext = createApplicationContext();
// Parse the command line arguments and return a return value if we shouldn't continue processing (e.g. we displayed usage information, etc.).
ReturnValue returnValue = parseCommandLineArguments(args, applicationContext);
if (returnValue != null)
{
return returnValue;
}
// Create an instance of S3 file transfer request parameters DTO.
S3FileTransferRequestParamsDto params =
S3FileTransferRequestParamsDto.builder().withLocalPath(argParser.getStringValue(localPathOpt)).withUseRrs(argParser.getBooleanValue(rrsOpt))
.withAwsAccessKeyId(argParser.getStringValue(s3AccessKeyOpt)).withAwsSecretKey(argParser.getStringValue(s3SecretKeyOpt))
.withS3Endpoint(argParser.getStringValue(s3EndpointOpt)).withMaxThreads(maxThreads)
.withHttpProxyHost(argParser.getStringValue(httpProxyHostOpt)).withHttpProxyPort(httpProxyPort)
.withSocketTimeout(argParser.getIntegerValue(socketTimeoutOpt)).build();
// Call the controller with the user specified parameters to perform the upload.
UploaderController controller = applicationContext.getBean(UploaderController.class);
String password = ToolsArgumentHelper.getCliEnvArgumentValue(argParser, passwordOpt, enableEnvVariablesOpt);
RegServerAccessParamsDto regServerAccessParamsDto =
RegServerAccessParamsDto.builder().withRegServerHost(regServerHost).withRegServerPort(regServerPort).withUseSsl(useSsl)
.withUsername(argParser.getStringValue(usernameOpt)).withPassword(password).withAccessTokenUrl(argParser.getStringValue(accessTokenUrlOpt))
.withTrustSelfSignedCertificate(trustSelfSignedCertificate).withDisableHostnameVerification(disableHostnameVerification).build();
controller.performUpload(regServerAccessParamsDto, argParser.getFileValue(manifestPathOpt), params, argParser.getBooleanValue(createNewVersionOpt),
argParser.getBooleanValue(forceOpt), maxRetryAttempts, retryDelaySecs);
// No exceptions were returned so return success.
return ReturnValue.SUCCESS;
} | ReturnValue function(String[] args) throws Exception { ApplicationContext applicationContext = createApplicationContext(); ReturnValue returnValue = parseCommandLineArguments(args, applicationContext); if (returnValue != null) { return returnValue; } S3FileTransferRequestParamsDto params = S3FileTransferRequestParamsDto.builder().withLocalPath(argParser.getStringValue(localPathOpt)).withUseRrs(argParser.getBooleanValue(rrsOpt)) .withAwsAccessKeyId(argParser.getStringValue(s3AccessKeyOpt)).withAwsSecretKey(argParser.getStringValue(s3SecretKeyOpt)) .withS3Endpoint(argParser.getStringValue(s3EndpointOpt)).withMaxThreads(maxThreads) .withHttpProxyHost(argParser.getStringValue(httpProxyHostOpt)).withHttpProxyPort(httpProxyPort) .withSocketTimeout(argParser.getIntegerValue(socketTimeoutOpt)).build(); UploaderController controller = applicationContext.getBean(UploaderController.class); String password = ToolsArgumentHelper.getCliEnvArgumentValue(argParser, passwordOpt, enableEnvVariablesOpt); RegServerAccessParamsDto regServerAccessParamsDto = RegServerAccessParamsDto.builder().withRegServerHost(regServerHost).withRegServerPort(regServerPort).withUseSsl(useSsl) .withUsername(argParser.getStringValue(usernameOpt)).withPassword(password).withAccessTokenUrl(argParser.getStringValue(accessTokenUrlOpt)) .withTrustSelfSignedCertificate(trustSelfSignedCertificate).withDisableHostnameVerification(disableHostnameVerification).build(); controller.performUpload(regServerAccessParamsDto, argParser.getFileValue(manifestPathOpt), params, argParser.getBooleanValue(createNewVersionOpt), argParser.getBooleanValue(forceOpt), maxRetryAttempts, retryDelaySecs); return ReturnValue.SUCCESS; } | /**
* Parses the command line arguments and calls the controller to process the upload.
*
* @param args the command line arguments passed to the program.
*
* @return the return value of the application.
* @throws Exception if there are problems performing the upload.
*/ | Parses the command line arguments and calls the controller to process the upload | go | {
"repo_name": "FINRAOS/herd",
"path": "herd-code/herd-tools/herd-uploader/src/main/java/org/finra/herd/tools/uploader/UploaderApp.java",
"license": "apache-2.0",
"size": 10287
} | [
"org.finra.herd.model.dto.RegServerAccessParamsDto",
"org.finra.herd.model.dto.S3FileTransferRequestParamsDto",
"org.finra.herd.tools.common.ToolsArgumentHelper",
"org.springframework.context.ApplicationContext"
] | import org.finra.herd.model.dto.RegServerAccessParamsDto; import org.finra.herd.model.dto.S3FileTransferRequestParamsDto; import org.finra.herd.tools.common.ToolsArgumentHelper; import org.springframework.context.ApplicationContext; | import org.finra.herd.model.dto.*; import org.finra.herd.tools.common.*; import org.springframework.context.*; | [
"org.finra.herd",
"org.springframework.context"
] | org.finra.herd; org.springframework.context; | 1,711,821 |
public static Image compressedByteArrayToImage(byte[] data) {
try {
// unzip data
ByteArrayInputStream byteStream = new ByteArrayInputStream(data);
GZIPInputStream zippedStream = new GZIPInputStream(byteStream);
ObjectInputStream objectStream = new ObjectInputStream(zippedStream);
int width = objectStream.readShort();
int height = objectStream.readShort();
int[] imageSource = (int[])objectStream.readObject();
objectStream.close();
// create image
MemoryImageSource mis = new MemoryImageSource(width, height, imageSource, 0, width);
return Toolkit.getDefaultToolkit().createImage(mis);
}
catch (Exception e) {
return null;
}
}
private static final Image STAR_BACKGROUND_IMAGE = compressedByteArrayToImage(new byte[] {
(byte)0x1f, (byte)0x8b, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
(byte)0x00, (byte)0x00, (byte)0x9d, (byte)0x92, (byte)0xbb, (byte)0x4b, (byte)0x82, (byte)0x51,
(byte)0x18, (byte)0x87, (byte)0x8f, (byte)0x92, (byte)0x4d, (byte)0x0d, (byte)0x2e, (byte)0xb5,
(byte)0x36, (byte)0x04, (byte)0x41, (byte)0x54, (byte)0xd0, (byte)0x56, (byte)0x11, (byte)0xb4,
(byte)0x34, (byte)0x35, (byte)0x34, (byte)0xd4, (byte)0xd0, (byte)0x12, (byte)0x84, (byte)0xf5,
(byte)0x17, (byte)0x48, (byte)0xa0, (byte)0xd5, (byte)0x5a, (byte)0x6b, (byte)0x44, (byte)0x4b,
(byte)0xde, (byte)0x09, (byte)0x11, (byte)0x13, (byte)0xd2, (byte)0xf8, (byte)0xf0, (byte)0xcb,
(byte)0x48, (byte)0xfd, (byte)0x44, (byte)0x10, (byte)0x13, (byte)0x45, (byte)0x04, (byte)0x45,
(byte)0xc1, (byte)0xfb, (byte)0x6d, (byte)0x0f, (byte)0xa2, (byte)0xb6, (byte)0xbc, (byte)0xe5,
(byte)0xe9, (byte)0x77, (byte)0x44, (byte)0xc1, (byte)0x4a, (byte)0xbf, (byte)0xb0, (byte)0xe1,
(byte)0x59, (byte)0xce, (byte)0x79, (byte)0x1f, (byte)0xde, (byte)0xf7, (byte)0xbc, (byte)0xe7,
(byte)0x77, (byte)0xff, (byte)0x4a, (byte)0x64, (byte)0xc7, (byte)0x63, (byte)0x44, (byte)0x4e,
(byte)0xe4, (byte)0xaa, (byte)0x23, (byte)0x22, (byte)0xdd, (byte)0xdb, (byte)0xdc, (byte)0x12,
(byte)0x14, (byte)0xb3, (byte)0xea, (byte)0x97, (byte)0x87, (byte)0x5b, (byte)0x29, (byte)0x21,
(byte)0x27, (byte)0x4a, (byte)0x42, (byte)0x24, (byte)0x84, (byte)0x68, (byte)0x34, (byte)0x9a,
(byte)0x61, (byte)0xac, (byte)0x80, (byte)0x69, (byte)0x91, (byte)0xfb, (byte)0xbf, (byte)0xe0,
(byte)0xc1, (byte)0xe9, (byte)0x3f, (byte)0xdd, (byte)0x75, (byte)0x40, (byte)0x79, (byte)0x9e,
(byte)0x7f, (byte)0x77, (byte)0x38, (byte)0x1c, (byte)0x93, (byte)0x23, (byte)0xba, (byte)0x12,
(byte)0x10, (byte)0x35, (byte)0x99, (byte)0x4c, (byte)0xcd, (byte)0x5c, (byte)0x2e, (byte)0xd7,
(byte)0x8a, (byte)0xc7, (byte)0xe3, (byte)0x17, (byte)0x23, (byte)0xfa, (byte)0xfb, (byte)0xac,
(byte)0xb7, (byte)0x20, (byte)0x08, (byte)0xb4, (byte)0x5a, (byte)0xad, (byte)0xd2, (byte)0x4a,
(byte)0xa5, (byte)0x42, (byte)0x39, (byte)0x8e, (byte)0x5b, (byte)0x1c, (byte)0x52, (byte)0x2b,
(byte)0x07, (byte)0x4b, (byte)0x5d, (byte)0xe7, (byte)0x4a, (byte)0xab, (byte)0xd5, (byte)0x3e,
(byte)0x1b, (byte)0x8d, (byte)0x46, (byte)0x6a, (byte)0xb7, (byte)0xdb, (byte)0xeb, (byte)0xc5,
(byte)0x62, (byte)0xb1, (byte)0xe3, (byte)0x96, (byte)0xcb, (byte)0xe5, (byte)0x46, (byte)0x2a,
(byte)0x95, (byte)0xaa, (byte)0x59, (byte)0xad, (byte)0xd6, (byte)0x27, (byte)0x83, (byte)0xc1,
(byte)0x70, (byte)0x86, (byte)0x9a, (byte)0x1d, (byte)0xd4, (byte)0xce, (byte)0x81, (byte)0x09,
(byte)0xa0, (byte)0x00, (byte)0x6d, (byte)0xd4, (byte)0xd3, (byte)0x50, (byte)0x28, (byte)0xf4,
(byte)0x91, (byte)0x4c, (byte)0x26, (byte)0x99, (byte)0xd7, (byte)0xee, (byte)0xf5, (byte)0x85,
(byte)0x4b, (byte)0x4b, (byte)0xa5, (byte)0x12, (byte)0xa3, (byte)0x5d, (byte)0x28, (byte)0x14,
(byte)0x6a, (byte)0xe9, (byte)0x74, (byte)0xba, (byte)0x11, (byte)0x8d, (byte)0x46, (byte)0xa9,
(byte)0xcf, (byte)0xe7, (byte)0x7b, (byte)0xb3, (byte)0x58, (byte)0x2c, (byte)0xcb, (byte)0xdd,
(byte)0xb7, (byte)0xea, (byte)0x6d, (byte)0x36, (byte)0x1b, (byte)0x0d, (byte)0x87, (byte)0xc3,
(byte)0x9d, (byte)0x79, (byte)0x7f, (byte)0xba, (byte)0x6c, (byte)0x0e, (byte)0x06, (byte)0x7c,
(byte)0x9a, (byte)0xcf, (byte)0xe7, (byte)0x29, (byte)0x76, (byte)0x42, (byte)0x3d, (byte)0x1e,
(byte)0xcf, (byte)0xa1, (byte)0xd9, (byte)0x6c, (byte)0xee, (byte)0x7f, (byte)0x87, (byte)0x06,
(byte)0x73, (byte)0xb1, (byte)0x19, (byte)0x7e, (byte)0xb9, (byte)0xcc, (byte)0xeb, (byte)0x77,
(byte)0xdd, (byte)0x6e, (byte)0xf7, (byte)0xc1, (byte)0x80, (byte)0x3d, (byte)0x48, (byte)0x81,
(byte)0x4d, (byte)0xaf, (byte)0xd7, (byte)0x7f, (byte)0xb2, (byte)0xf9, (byte)0xfa, (byte)0x5d,
(byte)0xe6, (byte)0xf5, (byte)0x5c, (byte)0xbf, (byte)0xdf, (byte)0xaf, (byte)0x14, (byte)0xd9,
(byte)0xfb, (byte)0x36, (byte)0xdb, (byte)0x3b, (byte)0x6a, (byte)0x7e, (byte)0xcd, (byte)0xcb,
(byte)0xc8, (byte)0x66, (byte)0xb3, (byte)0x2d, (byte)0x97, (byte)0xcb, (byte)0x35, (byte)0x25,
(byte)0xe2, (byte)0xab, (byte)0x40, (byte)0x33, (byte)0x12, (byte)0x89, (byte)0x7c, (byte)0x73,
(byte)0xe1, (byte)0x75, (byte)0xc8, (byte)0x64, (byte)0x32, (byte)0x2d, (byte)0xaf, (byte)0xd7,
(byte)0xbb, (byte)0x26, (byte)0xe2, (byte)0x5f, (byte)0x63, (byte)0xfe, (byte)0x66, (byte)0x22,
(byte)0x91, (byte)0x60, (byte)0x6e, (byte)0x3d, (byte)0x16, (byte)0x8b, (byte)0xb1, (byte)0x7f,
(byte)0x67, (byte)0x19, (byte)0xac, (byte)0x21, (byte)0x43, (byte)0x14, (byte)0xbb, (byte)0x6f,
(byte)0x05, (byte)0x02, (byte)0x81, (byte)0x5d, (byte)0x11, (byte)0xff, (byte)0x11, (byte)0x99,
(byte)0xa3, (byte)0xc1, (byte)0x60, (byte)0xb0, (byte)0x89, (byte)0xcc, (byte)0xde, (byte)0xe8,
(byte)0x74, (byte)0xba, (byte)0x05, (byte)0x9c, (byte)0x6d, (byte)0x00, (byte)0x01, (byte)0xff,
(byte)0x4e, (byte)0x9d, (byte)0x4e, (byte)0x27, (byte)0xcb, (byte)0x94, (byte)0x1a, (byte)0x3d,
(byte)0x06, (byte)0xb9, (byte)0xe3, (byte)0x80, (byte)0x03, (byte)0x97, (byte)0x60, (byte)0x66,
(byte)0xc0, (byte)0xfd, (byte)0x2a, (byte)0xb8, (byte)0x03, (byte)0xe7, (byte)0x43, (byte)0x7a,
(byte)0xcb, (byte)0xba, (byte)0x39, (byte)0x94, (byte)0x8a, (byte)0xcc, (byte)0xc7, (byte)0xb2,
(byte)0x3a, (byte)0xdf, (byte)0xcd, (byte)0x4c, (byte)0xef, (byte)0xec, (byte)0x0b, (byte)0xb7,
(byte)0x3f, (byte)0xb8, (byte)0x26, (byte)0x21, (byte)0x04, (byte)0x00, (byte)0x00,
});
private static final Image STAR_FOREGROUND_IMAGE = compressedByteArrayToImage(new byte[] {
(byte)0x1f, (byte)0x8b, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
(byte)0x00, (byte)0x00, (byte)0x9d, (byte)0x92, (byte)0xc9, (byte)0x4b, (byte)0x5b, (byte)0x51,
(byte)0x14, (byte)0x87, (byte)0xcf, (byte)0xbd, (byte)0x6f, (byte)0xc8, (byte)0x7b, (byte)0xe9,
(byte)0x5b, (byte)0x64, (byte)0xa3, (byte)0xdb, (byte)0x2e, (byte)0x04, (byte)0x41, (byte)0xb4,
(byte)0xd0, (byte)0x5d, (byte)0x2d, (byte)0x05, (byte)0x37, (byte)0xae, (byte)0x5c, (byte)0xb8,
(byte)0xd0, (byte)0x45, (byte)0x37, (byte)0x82, (byte)0x58, (byte)0xff, (byte)0x02, (byte)0x11,
(byte)0x9c, (byte)0xb0, (byte)0xb6, (byte)0xc5, (byte)0x6c, (byte)0xba, (byte)0x10, (byte)0x11,
(byte)0x6a, (byte)0xe2, (byte)0x04, (byte)0x62, (byte)0x29, (byte)0x2a, (byte)0x6a, (byte)0x54,
(byte)0x22, (byte)0x0e, (byte)0x10, (byte)0xc4, (byte)0xa9, (byte)0x01, (byte)0x07, (byte)0x4a,
(byte)0xab, (byte)0x36, (byte)0x89, (byte)0x71, (byte)0x5a, (byte)0x48, (byte)0x6b, (byte)0x8d,
(byte)0x43, (byte)0xb0, (byte)0x3b, (byte)0x13, (byte)0x13, (byte)0x73, (byte)0x3c, (byte)0x2f,
(byte)0x44, (byte)0x63, (byte)0x31, (byte)0x79, (byte)0x62, (byte)0x17, (byte)0xdf, (byte)0xe6,
(byte)0xde, (byte)0xf3, (byte)0xf1, (byte)0xbb, (byte)0xe7, (byte)0xdc, (byte)0xe3, (byte)0x08,
(byte)0x82, (byte)0x54, (byte)0x27, (byte)0x82, (byte)0x05, (byte)0x2c, (byte)0x35, (byte)0xd5,
(byte)0xc0, (byte)0xcb, (byte)0x8a, (byte)0x8a, (byte)0x5d, (byte)0x15, (byte)0xd9, (byte)0xb5,
(byte)0x27, (byte)0x13, (byte)0xfd, (byte)0x1c, (byte)0xa0, (byte)0xbe, (byte)0x0a, (byte)0x80,
(byte)0x01, (byte)0x7c, (byte)0x6a, (byte)0x4c, (byte)0x4b, (byte)0x3e, (byte)0xf1, (byte)0xd4,
(byte)0xe0, (byte)0xfe, (byte)0x21, (byte)0x9c, (byte)0x44, (byte)0xc3, (byte)0x7f, (byte)0xba,
(byte)0x05, (byte)0x04, (byte)0x4e, (byte)0xf6, (byte)0x4a, (byte)0x7f, (byte)0x47, (byte)0xed,
(byte)0x62, (byte)0xc6, (byte)0x23, (byte)0x5d, (byte)0x46, (byte)0xac, (byte)0x76, (byte)0x5b,
(byte)0x59, (byte)0xe4, (byte)0x70, (byte)0x43, (byte)0x8b, (byte)0xfa, (byte)0xdd, (byte)0x6a,
(byte)0xcb, (byte)0x23, (byte)0xfd, (byte)0x72, (byte)0x3d, (byte)0x7b, (byte)0x7e, (byte)0x58,
(byte)0xc6, (byte)0xe0, (byte)0x8e, (byte)0x86, (byte)0x67, (byte)0x84, (byte)0xb3, (byte)0x5b,
(byte)0x7c, (byte)0x96, (byte)0xa6, (byte)0xd6, (byte)0x42, (byte)0x3c, (byte)0x4f, (byte)0x38,
(byte)0x6d, (byte)0xed, (byte)0x4d, (byte)0xf0, (byte)0xb5, (byte)0xab, (byte)0x99, (byte)0xa1,
(byte)0xc3, (byte)0x26, (byte)0x86, (byte)0x03, (byte)0xde, (byte)0x27, (byte)0x78, (byte)0xb6,
(byte)0x1d, (byte)0xe7, (byte)0x72, (byte)0x7f, (byte)0x55, (byte)0x09, (byte)0xf5, (byte)0xb7,
(byte)0xf2, (byte)0xe9, (byte)0xce, (byte)0x0f, (byte)0xd0, (byte)0xdc, (byte)0xfe, (byte)0x16,
(byte)0x4a, (byte)0xa9, (byte)0x36, (byte)0x87, (byte)0xd0, (byte)0x88, (byte)0x0a, (byte)0x22,
(byte)0x46, (byte)0xf5, (byte)0xf8, (byte)0x6d, (byte)0x46, (byte)0xbd, (byte)0xd8, (byte)0x5b,
(byte)0x31, (byte)0x87, (byte)0x8f, (byte)0x7d, (byte)0x5a, (byte)0x2c, (byte)0x9e, (byte)0x4b,
(byte)0xee, (byte)0xe9, (byte)0xb6, (byte)0x19, (byte)0x4f, (byte)0xfd, (byte)0x66, (byte)0x3c,
(byte)0xd9, (byte)0x52, (byte)0x63, (byte)0x01, (byte)0xaf, (byte)0x12, (byte)0x3a, (byte)0xf8,
(byte)0x2e, (byte)0x5f, (byte)0x7a, (byte)0xe6, (byte)0x25, (byte)0x5c, (byte)0x1a, (byte)0x15,
(byte)0xce, (byte)0xbf, (byte)0xb4, (byte)0xb0, (byte)0x17, (byte)0x89, (byte)0x5e, (byte)0xbb,
(byte)0x06, (byte)0xdb, (byte)0x04, (byte)0xfc, (byte)0xe1, (byte)0x52, (byte)0x31, (byte)0xb8,
(byte)0xab, (byte)0xe1, (byte)0xad, (byte)0xab, (byte)0x7b, (byte)0x7e, (byte)0x55, (byte)0x77,
(byte)0xf1, (byte)0xd8, (byte)0xa7, (byte)0x60, (byte)0xc0, (byte)0x6b, (byte)0xc2, (byte)0x23,
(byte)0x8f, (byte)0x8c, (byte)0x7f, (byte)0x7e, (byte)0x4a, (byte)0x38, (byte)0x37, (byte)0x24,
(byte)0x54, (byte)0xf6, (byte)0x7d, (byte)0x64, (byte)0x77, (byte)0xfb, (byte)0xb0, (byte)0xdb,
(byte)0x9a, (byte)0x80, (byte)0xde, (byte)0xa0, (byte)0x24, (byte)0x5d, (byte)0xdd, (byte)0xdb,
(byte)0x52, (byte)0xee, (byte)0xb9, (byte)0xb3, (byte)0x83, (byte)0xfc, (byte)0x4d, (byte)0x8a,
(byte)0x39, (byte)0x70, (byte)0x62, (byte)0xc0, (byte)0xfe, (byte)0x0e, (byte)0xae, (byte)0x36,
(byte)0xe7, (byte)0x4c, (byte)0xc9, (byte)0x4c, (byte)0x9f, (byte)0xe9, (byte)0x1f, (byte)0xd7,
(byte)0x3d, (byte)0xce, (byte)0xab, (byte)0x0c, (byte)0xe6, (byte)0x5e, (byte)0xa2, (byte)0xcf,
(byte)0xdd, (byte)0x3d, (byte)0x2e, (byte)0x25, (byte)0x33, (byte)0xbd, (byte)0xf2, (byte)0xad,
(byte)0x7b, (byte)0xb8, (byte)0x29, (byte)0x46, (byte)0x67, (byte)0x3e, (byte)0xb3, (byte)0x4c,
(byte)0x03, (byte)0xbf, (byte)0x86, (byte)0x88, (byte)0xac, (byte)0xcf, (byte)0xca, (byte)0xc9,
(byte)0x4c, (byte)0x8f, (byte)0x74, (byte)0xe3, (byte)0xe2, (byte)0xef, (byte)0x0d, (byte)0x21,
(byte)0xba, (byte)0x30, (byte)0xc2, (byte)0x5e, (byte)0x19, (byte)0xf8, (byte)0xb6, (byte)0x8e,
(byte)0xf7, (byte)0x10, (byte)0xd9, (byte)0x5d, (byte)0x8e, (byte)0x67, (byte)0x86, (byte)0x7d,
(byte)0x4b, (byte)0x22, (byte)0x3a, (byte)0x7b, (byte)0x18, (byte)0x4e, (byte)0xf7, (byte)0xf1,
(byte)0xd0, (byte)0xce, (byte)0xb2, (byte)0x80, (byte)0xbf, (byte)0xd6, (byte)0x79, (byte)0x74,
(byte)0x6d, (byte)0x8a, (byte)0xbd, (byte)0x36, (byte)0xf0, (byte)0x27, (byte)0x7b, (byte)0xac,
(byte)0x0c, (byte)0xd7, (byte)0xa6, (byte)0xc4, (byte)0xc8, (byte)0x58, (byte)0x27, (byte)0xef,
(byte)0xa5, (byte)0x79, (byte)0xe6, (byte)0xd1, (byte)0x59, (byte)0x21, (byte)0xe1, (byte)0xa2,
(byte)0x7f, (byte)0xa7, (byte)0x5d, (byte)0x06, (byte)0x5c, (byte)0x74, (byte)0xb0, (byte)0x5a,
(byte)0xca, (byte)0x48, (byte)0xe5, (byte)0xca, (byte)0xc4, (byte)0x18, (byte)0xd1, (byte)0x4a,
(byte)0x64, (byte)0xa5, (byte)0xb8, (byte)0x7f, (byte)0x49, (byte)0x0c, (byte)0x11, (byte)0xd6,
(byte)0x34, (byte)0xd9, (byte)0x52, (byte)0x62, (byte)0x0f, (byte)0xb9, (byte)0xc1, (byte)0xfb,
(byte)0xf4, (byte)0x5d, (byte)0xcd, (byte)0x4d, (byte)0xec, (byte)0xcc, (byte)0xcd, (byte)0xd9,
(byte)0x35, (byte)0xd0, (byte)0x9c, (byte)0x26, (byte)0xe5, (byte)0x21, (byte)0x04, (byte)0x00,
(byte)0x00,
});
private static final Image STAR_ROLLOVER_IMAGE = compressedByteArrayToImage(new byte[] {
(byte)0x1f, (byte)0x8b, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
(byte)0x00, (byte)0x00, (byte)0x5b, (byte)0xf3, (byte)0x96, (byte)0x81, (byte)0xb5, (byte)0x9c,
(byte)0x85, (byte)0x41, (byte)0x80, (byte)0x41, (byte)0xa0, (byte)0xb4, (byte)0x88, (byte)0x81,
(byte)0x29, (byte)0xda, (byte)0xd3, (byte)0x77, (byte)0x57, (byte)0x82, (byte)0x5a, (byte)0xd9,
(byte)0xab, (byte)0x4d, (byte)0x4b, (byte)0x99, (byte)0x18, (byte)0x18, (byte)0x2a, (byte)0x0a,
(byte)0x18, (byte)0x18, (byte)0x18, (byte)0x19, (byte)0x18, (byte)0xfe, (byte)0xb3, (byte)0xb3,
(byte)0xe2, (byte)0xc2, (byte)0x32, (byte)0x40, (byte)0x2c, (byte)0x80, (byte)0x47, (byte)0x9e,
(byte)0x10, (byte)0x8e, (byte)0x04, (byte)0x62, (byte)0x5b, (byte)0x32, (byte)0xf5, (byte)0xca,
(byte)0x03, (byte)0x71, (byte)0x03, (byte)0x10, (byte)0x97, (byte)0x02, (byte)0x31, (byte)0x37,
(byte)0x89, (byte)0x7a, (byte)0x19, (byte)0x81, (byte)0x38, (byte)0x19, (byte)0x88, (byte)0x73,
(byte)0x81, (byte)0xb8, (byte)0x12, (byte)0x88, (byte)0xdd, (byte)0x48, (byte)0xd4, (byte)0xaf,
(byte)0x0f, (byte)0xb5, (byte)0x5b, (byte)0x0e, (byte)0x88, (byte)0xad, (byte)0xa0, (byte)0x6c,
(byte)0x71, (byte)0x1c, (byte)0x6a, (byte)0x39, (byte)0x80, (byte)0x58, (byte)0x02, (byte)0xaa,
(byte)0xc7, (byte)0x03, (byte)0x88, (byte)0x13, (byte)0xa0, (byte)0xea, (byte)0xa3, (byte)0xa0,
(byte)0xf2, (byte)0x6c, (byte)0x40, (byte)0x5c, (byte)0x08, (byte)0xc4, (byte)0xd5, (byte)0x50,
(byte)0x31, (byte)0x47, (byte)0x20, (byte)0xd6, (byte)0x04, (byte)0x62, (byte)0x51, (byte)0xa8,
(byte)0x9c, (byte)0x01, (byte)0x10, (byte)0xd7, (byte)0x43, (byte)0xf5, (byte)0xe4, (byte)0x43,
(byte)0xc3, (byte)0x0c, (byte)0xa4, (byte)0x46, (byte)0x10, (byte)0x2d, (byte)0x1e, (byte)0xdc,
(byte)0x81, (byte)0x38, (byte)0x0e, (byte)0x1a, (byte)0x1e, (byte)0x20, (byte)0xb5, (byte)0x65,
(byte)0x50, (byte)0x71, (byte)0x90, (byte)0x5f, (byte)0x5d, (byte)0xa1, (byte)0x62, (byte)0x66,
(byte)0x44, (byte)0xf8, (byte)0xcd, (byte)0x1f, (byte)0xaa, (byte)0x56, (byte)0x07, (byte)0x4d,
(byte)0xdc, (byte)0x1b, (byte)0x87, (byte)0x38, (byte)0x72, (byte)0x98, (byte)0x3a, (byte)0x42,
(byte)0xd5, (byte)0x18, (byte)0xe2, (byte)0x90, (byte)0x0f, (byte)0x02, (byte)0xe2, (byte)0x5a,
(byte)0x20, (byte)0x16, (byte)0xc1, (byte)0x22, (byte)0xaf, (byte)0x05, (byte)0xd5, (byte)0x6b,
(byte)0x81, (byte)0xc7, (byte)0x6d, (byte)0x9a, (byte)0xd0, (byte)0xb0, (byte)0x10, (byte)0xc5,
(byte)0x22, (byte)0x67, (byte)0x00, (byte)0x35, (byte)0x1b, (byte)0x5f, (byte)0x5a, (byte)0xb0,
(byte)0x06, (byte)0xe2, (byte)0x2a, (byte)0xa4, (byte)0x70, (byte)0x37, (byte)0x83, (byte)0xfa,
(byte)0x87, (byte)0x11, (byte)0x1a, (byte)0x7f, (byte)0x35, (byte)0xd0, (byte)0x38, (byte)0xc5,
(byte)0xa5, (byte)0xdf, (byte)0x13, (byte)0x88, (byte)0x4b, (byte)0x80, (byte)0xd8, (byte)0x0e,
(byte)0x88, (byte)0x8b, (byte)0xa0, (byte)0xee, (byte)0x05, (byte)0xe1, (byte)0x8c, (byte)0xff,
(byte)0x90, (byte)0x74, (byte)0x0c, (byte)0xd2, (byte)0xaf, (byte)0x8d, (byte)0x47, (byte)0x7f,
(byte)0x04, (byte)0x54, (byte)0x3d, (byte)0xc8, (byte)0x9d, (byte)0x7e, (byte)0x40, (byte)0x2c,
(byte)0x06, (byte)0xc4, (byte)0x4a, (byte)0x40, (byte)0x1c, (byte)0x83, (byte)0x64, (byte)0x96,
(byte)0x15, (byte)0x0e, (byte)0xbd, (byte)0xcc, (byte)0x40, (byte)0x1c, (byte)0x0e, (byte)0x8d,
(byte)0x67, (byte)0x21, (byte)0x2c, (byte)0xf2, (byte)0xb2, (byte)0x40, (byte)0x1c, (byte)0x0a,
(byte)0xc4, (byte)0x4e, (byte)0x78, (byte)0xf4, (byte)0x4b, (byte)0x40, (byte)0xfd, (byte)0x8a,
(byte)0xcb, (byte)0x7d, (byte)0x1c, (byte)0x50, (byte)0x37, (byte)0x21, (byte)0xab, (byte)0x01,
(byte)0x00, (byte)0x36, (byte)0x64, (byte)0xcf, (byte)0x53, (byte)0x21, (byte)0x04, (byte)0x00,
(byte)0x00,
});
private static final Image STAR_SELECTION_IMAGE = compressedByteArrayToImage(new byte[] {
(byte)0x1f, (byte)0x8b, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
(byte)0x00, (byte)0x00, (byte)0x9d, (byte)0x93, (byte)0xdb, (byte)0x6b, (byte)0x13, (byte)0x41,
(byte)0x14, (byte)0xc6, (byte)0x27, (byte)0x9b, (byte)0x39, (byte)0xb3, (byte)0xb3, (byte)0xbb,
(byte)0x69, (byte)0x13, (byte)0xc5, (byte)0x4b, (byte)0xbc, (byte)0xa1, (byte)0xf5, (byte)0x52,
(byte)0x85, (byte)0x2a, (byte)0x16, (byte)0x7c, (byte)0x28, (byte)0xf1, (byte)0x56, (byte)0xa9,
(byte)0x88, (byte)0x69, (byte)0x89, (byte)0xb1, (byte)0x36, (byte)0x1a, (byte)0x23, (byte)0x4d,
(byte)0x4e, (byte)0x36, (byte)0x69, (byte)0x82, (byte)0x22, (byte)0x08, (byte)0x22, (byte)0x78,
(byte)0xf9, (byte)0x87, (byte)0x7c, (byte)0xf3, (byte)0xc9, (byte)0x47, (byte)0xff, (byte)0x1a,
(byte)0x29, (byte)0x49, (byte)0xda, (byte)0xdd, (byte)0x35, (byte)0x17, (byte)0x13, (byte)0x8b,
(byte)0x56, (byte)0xda, (byte)0x5d, (byte)0xcf, (byte)0x0e, (byte)0x3e, (byte)0x58, (byte)0x9a,
(byte)0x54, (byte)0xf4, (byte)0xe1, (byte)0x7b, (byte)0x39, (byte)0xcc, (byte)0xef, (byte)0xcc,
(byte)0x37, (byte)0xe7, (byte)0x3b, (byte)0xf3, (byte)0xa1, (byte)0xcd, (byte)0xe0, (byte)0x2d,
(byte)0x67, (byte)0x09, (byte)0x96, (byte)0x78, (byte)0xfd, (byte)0x8a, (byte)0x69, (byte)0xcb,
(byte)0xf3, (byte)0xf7, (byte)0x3e, (byte)0xd9, (byte)0x93, (byte)0x6f, (byte)0xdc, (byte)0x8f,
(byte)0xef, (byte)0x35, (byte)0xc6, (byte)0xde, (byte)0xbd, (byte)0x64, (byte)0x2c, (byte)0xc2,
(byte)0x58, (byte)0xa0, (byte)0xc3, (byte)0x28, (byte)0x99, (byte)0x81, (byte)0x00, (byte)0x41,
(byte)0xda, (byte)0xeb, (byte)0xcc, (byte)0x5e, (byte)0x3a, (byte)0x45, (byte)0xec, (byte)0xc1,
(byte)0xff, (byte)0xe4, (byte)0x8d, (byte)0x40, (byte)0x83, (byte)0xb9, (byte)0x1f, (byte)0x97,
(byte)0xe5, (byte)0xcc, (byte)0xcf, (byte)0x73, (byte)0x52, (byte)0x0b, (byte)0xa2, (byte)0xff,
(byte)0xc8, (byte)0x73, (byte)0x98, (byte)0xf4, (byte)0xe3, (byte)0x50, (byte)0xec, (byte)0x94,
(byte)0x63, (byte)0xf9, (byte)0x5e, (byte)0xce, (byte)0x4a, (byte)0xaa, (byte)0xda, (byte)0xdf,
(byte)0x7c, (byte)0x88, (byte)0xdf, (byte)0xe2, (byte)0x30, (byte)0x16, (byte)0x30, (byte)0x48,
(byte)0x6f, (byte)0x5c, (byte)0x35, (byte)0xd0, (byte)0x7b, (byte)0x1e, (byte)0x43, (byte)0xef,
(byte)0x99, (byte)0x75, (byte)0xe3, (byte)0xfb, (byte)0x94, (byte)0xce, (byte)0xa9, (byte)0xc6,
(byte)0x02, (byte)0xd8, (byte)0xd5, (byte)0x27, (byte)0x4a, (byte)0x92, (byte)0x54, (byte)0x8f,
(byte)0x93, (byte)0x8e, (byte)0x04, (byte)0x06, (byte)0x9c, (byte)0xdd, (byte)0x1e, (byte)0x87,
(byte)0xd4, (byte)0xe6, (byte)0x79, (byte)0xbd, (byte)0xd8, (byte)0xb6, (byte)0x2d, (byte)0xf4,
(byte)0xea, (byte)0x16, (byte)0xba, (byte)0x75, (byte)0xb3, (byte)0xd0, (byte)0x2e, (byte)0x18,
(byte)0x57, (byte)0x36, (byte)0x4f, (byte)0x8a, (byte)0x09, (byte)0xdf, (byte)0x82, (byte)0xc3,
(byte)0x81, (byte)0xa4, (byte)0xfe, (byte)0x1c, (byte)0x74, (byte)0xea, (byte)0xa3, (byte)0x11,
(byte)0xbb, (byte)0x8f, (byte)0xb8, (byte)0x99, (byte)0xad, (byte)0xa4, (byte)0xc8, (byte)0x0e,
(byte)0xd2, (byte)0x56, (byte)0xbe, (byte)0xf7, (byte)0xc8, (byte)0x2a, (byte)0x75, (byte)0x30,
(byte)0x86, (byte)0x5f, (byte)0xea, (byte)0x74, (byte)0x6f, (byte)0x8d, (byte)0xf8, (byte)0xaa,
(byte)0x89, (byte)0x6e, (byte)0x45, (byte)0xa2, (byte)0xb3, (byte)0x62, (byte)0xe0, (byte)0xba,
(byte)0xad, (byte)0x17, (byte)0x9d, (byte)0x82, (byte)0xfe, (byte)0xd0, (byte)0xcb, (byte)0x8a,
(byte)0x4c, (byte)0xf7, (byte)0x3a, (byte)0x4c, (byte)0x6f, (byte)0x25, (byte)0x54, (byte)0x3e,
(byte)0xa1, (byte)0xa7, (byte)0x63, (byte)0x7e, (byte)0x0c, (byte)0x16, (byte)0x07, (byte)0x0b,
(byte)0x26, (byte)0x7a, (byte)0x2f, (byte)0x42, (byte)0xd6, (byte)0x52, (byte)0xac, (byte)0x1b,
(byte)0xb2, (byte)0x55, (byte)0x03, (byte)0x1d, (byte)0x5b, (byte)0x2a, (byte)0xad, (byte)0x95,
(byte)0x05, (byte)0xb6, (byte)0x6c, (byte)0x81, (byte)0x8d, (byte)0x3a, (byte)0x4f, (byte)0xf7,
(byte)0x52, (byte)0x3c, (byte)0xe1, (byte)0xcb, (byte)0x3f, (byte)0xde, (byte)0x42, (byte)0x3d,
(byte)0xc8, (byte)0xd7, (byte)0xfd, (byte)0x7e, (byte)0xda, (byte)0x40, (byte)0xf7, (byte)0xa9,
(byte)0xa9, (byte)0x58, (byte)0xa7, (byte)0x42, (byte)0x2c, (byte)0xdd, (byte)0xbd, (byte)0x5e,
(byte)0xd6, (byte)0x95, (byte)0x5a, (byte)0x08, (byte)0xd8, (byte)0xa8, (byte)0x40, (byte)0xc8,
(byte)0xc6, (byte)0xc9, (byte)0xff, (byte)0xee, (byte)0x79, (byte)0x02, (byte)0x9c, (byte)0xf0,
(byte)0x0d, (byte)0x58, (byte)0xea, (byte)0x66, (byte)0x88, (byte)0xa9, (byte)0x85, (byte)0x7e,
(byte)0x65, (byte)0xe8, (byte)0x19, (byte)0xd7, (byte)0x50, (byte)0x28, (byte)0x35, (byte)0x6d,
(byte)0x9e, (byte)0xe9, (byte)0xcc, (byte)0xf2, (byte)0xfd, (byte)0x8a, (byte)0x85, (byte)0xa1,
(byte)0x19, (byte)0x58, (byte)0x94, (byte)0xf9, (byte)0xc2, (byte)0xd7, (byte)0x9b, (byte)0xc4,
(byte)0xd4, (byte)0xc9, (byte)0x2f, (byte)0xea, (byte)0xca, (byte)0x73, (byte)0xb3, (byte)0xc4,
(byte)0xb1, (byte)0x55, (byte)0x02, (byte)0x5c, (byte)0xad, (byte)0xf2, (byte)0x5b, (byte)0x83,
(byte)0x8b, (byte)0x9c, (byte)0xa9, (byte)0x1c, (byte)0x86, (byte)0xe7, (byte)0x77, (byte)0x80,
(byte)0xde, (byte)0x90, (byte)0x6b, (byte)0x67, (byte)0xc8, (byte)0xeb, (byte)0x8a, (byte)0x8e,
(byte)0xcd, (byte)0x0a, (byte)0x28, (byte)0x35, (byte)0x6c, (byte)0x8e, (byte)0x0d, (byte)0x8c,
(byte)0xe2, (byte)0xaa, (byte)0xad, (byte)0xcd, (byte)0x77, (byte)0x53, (byte)0x5c, (byte)0x8e,
(byte)0xdc, (byte)0x25, (byte)0x41, (byte)0x73, (byte)0xb4, (byte)0x60, (byte)0xd9, (byte)0x79,
(byte)0x4c, (byte)0x77, (byte)0xd6, (byte)0x20, (byte)0xef, (byte)0x66, (byte)0xf9, (byte)0xec,
(byte)0xb7, (byte)0x29, (byte)0xb8, (byte)0xdd, (byte)0x9f, (byte)0xe6, (byte)0x4f, (byte)0x5a,
(byte)0x4b, (byte)0x51, (byte)0xfc, (byte)0x5c, (byte)0xd5, (byte)0x1e, (byte)0x38, (byte)0x77,
(byte)0xb5, (byte)0xf1, (byte)0x91, (byte)0xbb, (byte)0x24, (byte)0xe0, (byte)0x0c, (byte)0x65,
(byte)0x9f, (byte)0x6b, (byte)0xdf, (byte)0x81, (byte)0x6b, (byte)0x1b, (byte)0x17, (byte)0xe0,
(byte)0x38, (byte)0xcd, (byte)0x02, (byte)0x82, (byte)0x88, (byte)0xda, (byte)0xe3, (byte)0xd3,
(byte)0xdb, (byte)0x63, (byte)0x30, (byte)0xd7, (byte)0xbf, (byte)0xc4, (byte)0x17, (byte)0xbd,
(byte)0x59, (byte)0xed, (byte)0x90, (byte)0x6f, (byte)0x0e, (byte)0xe5, (byte)0x23, (byte)0xea,
(byte)0xbf, (byte)0x48, (byte)0x38, (byte)0x4a, (byte)0xe2, (byte)0xc4, (byte)0xec, (byte)0x3c,
(byte)0x03, (byte)0x10, (byte)0xfa, (byte)0x9e, (byte)0xa0, (byte)0x9e, (byte)0xc9, (byte)0x40,
(byte)0x0e, (byte)0xf5, (byte)0x1f, (byte)0x51, (byte)0x7f, (byte)0x46, (byte)0x1f, (byte)0x39,
(byte)0xdb, (byte)0x50, (byte)0x9a, (byte)0xea, (byte)0xb3, (byte)0xb3, (byte)0xf6, (byte)0x0b,
(byte)0xee, (byte)0x36, (byte)0x1e, (byte)0xfc, (byte)0x21, (byte)0x04, (byte)0x00, (byte)0x00,
});
| static Image function(byte[] data) { try { ByteArrayInputStream byteStream = new ByteArrayInputStream(data); GZIPInputStream zippedStream = new GZIPInputStream(byteStream); ObjectInputStream objectStream = new ObjectInputStream(zippedStream); int width = objectStream.readShort(); int height = objectStream.readShort(); int[] imageSource = (int[])objectStream.readObject(); objectStream.close(); MemoryImageSource mis = new MemoryImageSource(width, height, imageSource, 0, width); return Toolkit.getDefaultToolkit().createImage(mis); } catch (Exception e) { return null; } } static final Image STAR_BACKGROUND_IMAGE = function(new byte[] { (byte)0x1f, (byte)0x8b, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x9d, (byte)0x92, (byte)0xbb, (byte)0x4b, (byte)0x82, (byte)0x51, (byte)0x18, (byte)0x87, (byte)0x8f, (byte)0x92, (byte)0x4d, (byte)0x0d, (byte)0x2e, (byte)0xb5, (byte)0x36, (byte)0x04, (byte)0x41, (byte)0x54, (byte)0xd0, (byte)0x56, (byte)0x11, (byte)0xb4, (byte)0x34, (byte)0x35, (byte)0x34, (byte)0xd4, (byte)0xd0, (byte)0x12, (byte)0x84, (byte)0xf5, (byte)0x17, (byte)0x48, (byte)0xa0, (byte)0xd5, (byte)0x5a, (byte)0x6b, (byte)0x44, (byte)0x4b, (byte)0xde, (byte)0x09, (byte)0x11, (byte)0x13, (byte)0xd2, (byte)0xf8, (byte)0xf0, (byte)0xcb, (byte)0x48, (byte)0xfd, (byte)0x44, (byte)0x10, (byte)0x13, (byte)0x45, (byte)0x04, (byte)0x45, (byte)0xc1, (byte)0xfb, (byte)0x6d, (byte)0x0f, (byte)0xa2, (byte)0xb6, (byte)0xbc, (byte)0xe5, (byte)0xe9, (byte)0x77, (byte)0x44, (byte)0xc1, (byte)0x4a, (byte)0xbf, (byte)0xb0, (byte)0xe1, (byte)0x59, (byte)0xce, (byte)0x79, (byte)0x1f, (byte)0xde, (byte)0xf7, (byte)0xbc, (byte)0xe7, (byte)0x77, (byte)0xff, (byte)0x4a, (byte)0x64, (byte)0xc7, (byte)0x63, (byte)0x44, (byte)0x4e, (byte)0xe4, (byte)0xaa, (byte)0x23, (byte)0x22, (byte)0xdd, (byte)0xdb, (byte)0xdc, (byte)0x12, (byte)0x14, (byte)0xb3, (byte)0xea, (byte)0x97, (byte)0x87, (byte)0x5b, (byte)0x29, (byte)0x21, (byte)0x27, (byte)0x4a, (byte)0x42, (byte)0x24, (byte)0x84, (byte)0x68, (byte)0x34, (byte)0x9a, (byte)0x61, (byte)0xac, (byte)0x80, (byte)0x69, (byte)0x91, (byte)0xfb, (byte)0xbf, (byte)0xe0, (byte)0xc1, (byte)0xe9, (byte)0x3f, (byte)0xdd, (byte)0x75, (byte)0x40, (byte)0x79, (byte)0x9e, (byte)0x7f, (byte)0x77, (byte)0x38, (byte)0x1c, (byte)0x93, (byte)0x23, (byte)0xba, (byte)0x12, (byte)0x10, (byte)0x35, (byte)0x99, (byte)0x4c, (byte)0xcd, (byte)0x5c, (byte)0x2e, (byte)0xd7, (byte)0x8a, (byte)0xc7, (byte)0xe3, (byte)0x17, (byte)0x23, (byte)0xfa, (byte)0xfb, (byte)0xac, (byte)0xb7, (byte)0x20, (byte)0x08, (byte)0xb4, (byte)0x5a, (byte)0xad, (byte)0xd2, (byte)0x4a, (byte)0xa5, (byte)0x42, (byte)0x39, (byte)0x8e, (byte)0x5b, (byte)0x1c, (byte)0x52, (byte)0x2b, (byte)0x07, (byte)0x4b, (byte)0x5d, (byte)0xe7, (byte)0x4a, (byte)0xab, (byte)0xd5, (byte)0x3e, (byte)0x1b, (byte)0x8d, (byte)0x46, (byte)0x6a, (byte)0xb7, (byte)0xdb, (byte)0xeb, (byte)0xc5, (byte)0x62, (byte)0xb1, (byte)0xe3, (byte)0x96, (byte)0xcb, (byte)0xe5, (byte)0x46, (byte)0x2a, (byte)0x95, (byte)0xaa, (byte)0x59, (byte)0xad, (byte)0xd6, (byte)0x27, (byte)0x83, (byte)0xc1, (byte)0x70, (byte)0x86, (byte)0x9a, (byte)0x1d, (byte)0xd4, (byte)0xce, (byte)0x81, (byte)0x09, (byte)0xa0, (byte)0x00, (byte)0x6d, (byte)0xd4, (byte)0xd3, (byte)0x50, (byte)0x28, (byte)0xf4, (byte)0x91, (byte)0x4c, (byte)0x26, (byte)0x99, (byte)0xd7, (byte)0xee, (byte)0xf5, (byte)0x85, (byte)0x4b, (byte)0x4b, (byte)0xa5, (byte)0x12, (byte)0xa3, (byte)0x5d, (byte)0x28, (byte)0x14, (byte)0x6a, (byte)0xe9, (byte)0x74, (byte)0xba, (byte)0x11, (byte)0x8d, (byte)0x46, (byte)0xa9, (byte)0xcf, (byte)0xe7, (byte)0x7b, (byte)0xb3, (byte)0x58, (byte)0x2c, (byte)0xcb, (byte)0xdd, (byte)0xb7, (byte)0xea, (byte)0x6d, (byte)0x36, (byte)0x1b, (byte)0x0d, (byte)0x87, (byte)0xc3, (byte)0x9d, (byte)0x79, (byte)0x7f, (byte)0xba, (byte)0x6c, (byte)0x0e, (byte)0x06, (byte)0x7c, (byte)0x9a, (byte)0xcf, (byte)0xe7, (byte)0x29, (byte)0x76, (byte)0x42, (byte)0x3d, (byte)0x1e, (byte)0xcf, (byte)0xa1, (byte)0xd9, (byte)0x6c, (byte)0xee, (byte)0x7f, (byte)0x87, (byte)0x06, (byte)0x73, (byte)0xb1, (byte)0x19, (byte)0x7e, (byte)0xb9, (byte)0xcc, (byte)0xeb, (byte)0x77, (byte)0xdd, (byte)0x6e, (byte)0xf7, (byte)0xc1, (byte)0x80, (byte)0x3d, (byte)0x48, (byte)0x81, (byte)0x4d, (byte)0xaf, (byte)0xd7, (byte)0x7f, (byte)0xb2, (byte)0xf9, (byte)0xfa, (byte)0x5d, (byte)0xe6, (byte)0xf5, (byte)0x5c, (byte)0xbf, (byte)0xdf, (byte)0xaf, (byte)0x14, (byte)0xd9, (byte)0xfb, (byte)0x36, (byte)0xdb, (byte)0x3b, (byte)0x6a, (byte)0x7e, (byte)0xcd, (byte)0xcb, (byte)0xc8, (byte)0x66, (byte)0xb3, (byte)0x2d, (byte)0x97, (byte)0xcb, (byte)0x35, (byte)0x25, (byte)0xe2, (byte)0xab, (byte)0x40, (byte)0x33, (byte)0x12, (byte)0x89, (byte)0x7c, (byte)0x73, (byte)0xe1, (byte)0x75, (byte)0xc8, (byte)0x64, (byte)0x32, (byte)0x2d, (byte)0xaf, (byte)0xd7, (byte)0xbb, (byte)0x26, (byte)0xe2, (byte)0x5f, (byte)0x63, (byte)0xfe, (byte)0x66, (byte)0x22, (byte)0x91, (byte)0x60, (byte)0x6e, (byte)0x3d, (byte)0x16, (byte)0x8b, (byte)0xb1, (byte)0x7f, (byte)0x67, (byte)0x19, (byte)0xac, (byte)0x21, (byte)0x43, (byte)0x14, (byte)0xbb, (byte)0x6f, (byte)0x05, (byte)0x02, (byte)0x81, (byte)0x5d, (byte)0x11, (byte)0xff, (byte)0x11, (byte)0x99, (byte)0xa3, (byte)0xc1, (byte)0x60, (byte)0xb0, (byte)0x89, (byte)0xcc, (byte)0xde, (byte)0xe8, (byte)0x74, (byte)0xba, (byte)0x05, (byte)0x9c, (byte)0x6d, (byte)0x00, (byte)0x01, (byte)0xff, (byte)0x4e, (byte)0x9d, (byte)0x4e, (byte)0x27, (byte)0xcb, (byte)0x94, (byte)0x1a, (byte)0x3d, (byte)0x06, (byte)0xb9, (byte)0xe3, (byte)0x80, (byte)0x03, (byte)0x97, (byte)0x60, (byte)0x66, (byte)0xc0, (byte)0xfd, (byte)0x2a, (byte)0xb8, (byte)0x03, (byte)0xe7, (byte)0x43, (byte)0x7a, (byte)0xcb, (byte)0xba, (byte)0x39, (byte)0x94, (byte)0x8a, (byte)0xcc, (byte)0xc7, (byte)0xb2, (byte)0x3a, (byte)0xdf, (byte)0xcd, (byte)0x4c, (byte)0xef, (byte)0xec, (byte)0x0b, (byte)0xb7, (byte)0x3f, (byte)0xb8, (byte)0x26, (byte)0x21, (byte)0x04, (byte)0x00, (byte)0x00, }); static final Image STAR_FOREGROUND_IMAGE = function(new byte[] { (byte)0x1f, (byte)0x8b, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x9d, (byte)0x92, (byte)0xc9, (byte)0x4b, (byte)0x5b, (byte)0x51, (byte)0x14, (byte)0x87, (byte)0xcf, (byte)0xbd, (byte)0x6f, (byte)0xc8, (byte)0x7b, (byte)0xe9, (byte)0x5b, (byte)0x64, (byte)0xa3, (byte)0xdb, (byte)0x2e, (byte)0x04, (byte)0x41, (byte)0xb4, (byte)0xd0, (byte)0x5d, (byte)0x2d, (byte)0x05, (byte)0x37, (byte)0xae, (byte)0x5c, (byte)0xb8, (byte)0xd0, (byte)0x45, (byte)0x37, (byte)0x82, (byte)0x58, (byte)0xff, (byte)0x02, (byte)0x11, (byte)0x9c, (byte)0xb0, (byte)0xb6, (byte)0xc5, (byte)0x6c, (byte)0xba, (byte)0x10, (byte)0x11, (byte)0x6a, (byte)0xe2, (byte)0x04, (byte)0x62, (byte)0x29, (byte)0x2a, (byte)0x6a, (byte)0x54, (byte)0x22, (byte)0x0e, (byte)0x10, (byte)0xc4, (byte)0xa9, (byte)0x01, (byte)0x07, (byte)0x4a, (byte)0xab, (byte)0x36, (byte)0x89, (byte)0x71, (byte)0x5a, (byte)0x48, (byte)0x6b, (byte)0x8d, (byte)0x43, (byte)0xb0, (byte)0x3b, (byte)0x13, (byte)0x13, (byte)0x73, (byte)0x3c, (byte)0x2f, (byte)0x44, (byte)0x63, (byte)0x31, (byte)0x79, (byte)0x62, (byte)0x17, (byte)0xdf, (byte)0xe6, (byte)0xde, (byte)0xf3, (byte)0xf1, (byte)0xbb, (byte)0xe7, (byte)0xdc, (byte)0xe3, (byte)0x08, (byte)0x82, (byte)0x54, (byte)0x27, (byte)0x82, (byte)0x05, (byte)0x2c, (byte)0x35, (byte)0xd5, (byte)0xc0, (byte)0xcb, (byte)0x8a, (byte)0x8a, (byte)0x5d, (byte)0x15, (byte)0xd9, (byte)0xb5, (byte)0x27, (byte)0x13, (byte)0xfd, (byte)0x1c, (byte)0xa0, (byte)0xbe, (byte)0x0a, (byte)0x80, (byte)0x01, (byte)0x7c, (byte)0x6a, (byte)0x4c, (byte)0x4b, (byte)0x3e, (byte)0xf1, (byte)0xd4, (byte)0xe0, (byte)0xfe, (byte)0x21, (byte)0x9c, (byte)0x44, (byte)0xc3, (byte)0x7f, (byte)0xba, (byte)0x05, (byte)0x04, (byte)0x4e, (byte)0xf6, (byte)0x4a, (byte)0x7f, (byte)0x47, (byte)0xed, (byte)0x62, (byte)0xc6, (byte)0x23, (byte)0x5d, (byte)0x46, (byte)0xac, (byte)0x76, (byte)0x5b, (byte)0x59, (byte)0xe4, (byte)0x70, (byte)0x43, (byte)0x8b, (byte)0xfa, (byte)0xdd, (byte)0x6a, (byte)0xcb, (byte)0x23, (byte)0xfd, (byte)0x72, (byte)0x3d, (byte)0x7b, (byte)0x7e, (byte)0x58, (byte)0xc6, (byte)0xe0, (byte)0x8e, (byte)0x86, (byte)0x67, (byte)0x84, (byte)0xb3, (byte)0x5b, (byte)0x7c, (byte)0x96, (byte)0xa6, (byte)0xd6, (byte)0x42, (byte)0x3c, (byte)0x4f, (byte)0x38, (byte)0x6d, (byte)0xed, (byte)0x4d, (byte)0xf0, (byte)0xb5, (byte)0xab, (byte)0x99, (byte)0xa1, (byte)0xc3, (byte)0x26, (byte)0x86, (byte)0x03, (byte)0xde, (byte)0x27, (byte)0x78, (byte)0xb6, (byte)0x1d, (byte)0xe7, (byte)0x72, (byte)0x7f, (byte)0x55, (byte)0x09, (byte)0xf5, (byte)0xb7, (byte)0xf2, (byte)0xe9, (byte)0xce, (byte)0x0f, (byte)0xd0, (byte)0xdc, (byte)0xfe, (byte)0x16, (byte)0x4a, (byte)0xa9, (byte)0x36, (byte)0x87, (byte)0xd0, (byte)0x88, (byte)0x0a, (byte)0x22, (byte)0x46, (byte)0xf5, (byte)0xf8, (byte)0x6d, (byte)0x46, (byte)0xbd, (byte)0xd8, (byte)0x5b, (byte)0x31, (byte)0x87, (byte)0x8f, (byte)0x7d, (byte)0x5a, (byte)0x2c, (byte)0x9e, (byte)0x4b, (byte)0xee, (byte)0xe9, (byte)0xb6, (byte)0x19, (byte)0x4f, (byte)0xfd, (byte)0x66, (byte)0x3c, (byte)0xd9, (byte)0x52, (byte)0x63, (byte)0x01, (byte)0xaf, (byte)0x12, (byte)0x3a, (byte)0xf8, (byte)0x2e, (byte)0x5f, (byte)0x7a, (byte)0xe6, (byte)0x25, (byte)0x5c, (byte)0x1a, (byte)0x15, (byte)0xce, (byte)0xbf, (byte)0xb4, (byte)0xb0, (byte)0x17, (byte)0x89, (byte)0x5e, (byte)0xbb, (byte)0x06, (byte)0xdb, (byte)0x04, (byte)0xfc, (byte)0xe1, (byte)0x52, (byte)0x31, (byte)0xb8, (byte)0xab, (byte)0xe1, (byte)0xad, (byte)0xab, (byte)0x7b, (byte)0x7e, (byte)0x55, (byte)0x77, (byte)0xf1, (byte)0xd8, (byte)0xa7, (byte)0x60, (byte)0xc0, (byte)0x6b, (byte)0xc2, (byte)0x23, (byte)0x8f, (byte)0x8c, (byte)0x7f, (byte)0x7e, (byte)0x4a, (byte)0x38, (byte)0x37, (byte)0x24, (byte)0x54, (byte)0xf6, (byte)0x7d, (byte)0x64, (byte)0x77, (byte)0xfb, (byte)0xb0, (byte)0xdb, (byte)0x9a, (byte)0x80, (byte)0xde, (byte)0xa0, (byte)0x24, (byte)0x5d, (byte)0xdd, (byte)0xdb, (byte)0x52, (byte)0xee, (byte)0xb9, (byte)0xb3, (byte)0x83, (byte)0xfc, (byte)0x4d, (byte)0x8a, (byte)0x39, (byte)0x70, (byte)0x62, (byte)0xc0, (byte)0xfe, (byte)0x0e, (byte)0xae, (byte)0x36, (byte)0xe7, (byte)0x4c, (byte)0xc9, (byte)0x4c, (byte)0x9f, (byte)0xe9, (byte)0x1f, (byte)0xd7, (byte)0x3d, (byte)0xce, (byte)0xab, (byte)0x0c, (byte)0xe6, (byte)0x5e, (byte)0xa2, (byte)0xcf, (byte)0xdd, (byte)0x3d, (byte)0x2e, (byte)0x25, (byte)0x33, (byte)0xbd, (byte)0xf2, (byte)0xad, (byte)0x7b, (byte)0xb8, (byte)0x29, (byte)0x46, (byte)0x67, (byte)0x3e, (byte)0xb3, (byte)0x4c, (byte)0x03, (byte)0xbf, (byte)0x86, (byte)0x88, (byte)0xac, (byte)0xcf, (byte)0xca, (byte)0xc9, (byte)0x4c, (byte)0x8f, (byte)0x74, (byte)0xe3, (byte)0xe2, (byte)0xef, (byte)0x0d, (byte)0x21, (byte)0xba, (byte)0x30, (byte)0xc2, (byte)0x5e, (byte)0x19, (byte)0xf8, (byte)0xb6, (byte)0x8e, (byte)0xf7, (byte)0x10, (byte)0xd9, (byte)0x5d, (byte)0x8e, (byte)0x67, (byte)0x86, (byte)0x7d, (byte)0x4b, (byte)0x22, (byte)0x3a, (byte)0x7b, (byte)0x18, (byte)0x4e, (byte)0xf7, (byte)0xf1, (byte)0xd0, (byte)0xce, (byte)0xb2, (byte)0x80, (byte)0xbf, (byte)0xd6, (byte)0x79, (byte)0x74, (byte)0x6d, (byte)0x8a, (byte)0xbd, (byte)0x36, (byte)0xf0, (byte)0x27, (byte)0x7b, (byte)0xac, (byte)0x0c, (byte)0xd7, (byte)0xa6, (byte)0xc4, (byte)0xc8, (byte)0x58, (byte)0x27, (byte)0xef, (byte)0xa5, (byte)0x79, (byte)0xe6, (byte)0xd1, (byte)0x59, (byte)0x21, (byte)0xe1, (byte)0xa2, (byte)0x7f, (byte)0xa7, (byte)0x5d, (byte)0x06, (byte)0x5c, (byte)0x74, (byte)0xb0, (byte)0x5a, (byte)0xca, (byte)0x48, (byte)0xe5, (byte)0xca, (byte)0xc4, (byte)0x18, (byte)0xd1, (byte)0x4a, (byte)0x64, (byte)0xa5, (byte)0xb8, (byte)0x7f, (byte)0x49, (byte)0x0c, (byte)0x11, (byte)0xd6, (byte)0x34, (byte)0xd9, (byte)0x52, (byte)0x62, (byte)0x0f, (byte)0xb9, (byte)0xc1, (byte)0xfb, (byte)0xf4, (byte)0x5d, (byte)0xcd, (byte)0x4d, (byte)0xec, (byte)0xcc, (byte)0xcd, (byte)0xd9, (byte)0x35, (byte)0xd0, (byte)0x9c, (byte)0x26, (byte)0xe5, (byte)0x21, (byte)0x04, (byte)0x00, (byte)0x00, }); static final Image STAR_ROLLOVER_IMAGE = function(new byte[] { (byte)0x1f, (byte)0x8b, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x5b, (byte)0xf3, (byte)0x96, (byte)0x81, (byte)0xb5, (byte)0x9c, (byte)0x85, (byte)0x41, (byte)0x80, (byte)0x41, (byte)0xa0, (byte)0xb4, (byte)0x88, (byte)0x81, (byte)0x29, (byte)0xda, (byte)0xd3, (byte)0x77, (byte)0x57, (byte)0x82, (byte)0x5a, (byte)0xd9, (byte)0xab, (byte)0x4d, (byte)0x4b, (byte)0x99, (byte)0x18, (byte)0x18, (byte)0x2a, (byte)0x0a, (byte)0x18, (byte)0x18, (byte)0x18, (byte)0x19, (byte)0x18, (byte)0xfe, (byte)0xb3, (byte)0xb3, (byte)0xe2, (byte)0xc2, (byte)0x32, (byte)0x40, (byte)0x2c, (byte)0x80, (byte)0x47, (byte)0x9e, (byte)0x10, (byte)0x8e, (byte)0x04, (byte)0x62, (byte)0x5b, (byte)0x32, (byte)0xf5, (byte)0xca, (byte)0x03, (byte)0x71, (byte)0x03, (byte)0x10, (byte)0x97, (byte)0x02, (byte)0x31, (byte)0x37, (byte)0x89, (byte)0x7a, (byte)0x19, (byte)0x81, (byte)0x38, (byte)0x19, (byte)0x88, (byte)0x73, (byte)0x81, (byte)0xb8, (byte)0x12, (byte)0x88, (byte)0xdd, (byte)0x48, (byte)0xd4, (byte)0xaf, (byte)0x0f, (byte)0xb5, (byte)0x5b, (byte)0x0e, (byte)0x88, (byte)0xad, (byte)0xa0, (byte)0x6c, (byte)0x71, (byte)0x1c, (byte)0x6a, (byte)0x39, (byte)0x80, (byte)0x58, (byte)0x02, (byte)0xaa, (byte)0xc7, (byte)0x03, (byte)0x88, (byte)0x13, (byte)0xa0, (byte)0xea, (byte)0xa3, (byte)0xa0, (byte)0xf2, (byte)0x6c, (byte)0x40, (byte)0x5c, (byte)0x08, (byte)0xc4, (byte)0xd5, (byte)0x50, (byte)0x31, (byte)0x47, (byte)0x20, (byte)0xd6, (byte)0x04, (byte)0x62, (byte)0x51, (byte)0xa8, (byte)0x9c, (byte)0x01, (byte)0x10, (byte)0xd7, (byte)0x43, (byte)0xf5, (byte)0xe4, (byte)0x43, (byte)0xc3, (byte)0x0c, (byte)0xa4, (byte)0x46, (byte)0x10, (byte)0x2d, (byte)0x1e, (byte)0xdc, (byte)0x81, (byte)0x38, (byte)0x0e, (byte)0x1a, (byte)0x1e, (byte)0x20, (byte)0xb5, (byte)0x65, (byte)0x50, (byte)0x71, (byte)0x90, (byte)0x5f, (byte)0x5d, (byte)0xa1, (byte)0x62, (byte)0x66, (byte)0x44, (byte)0xf8, (byte)0xcd, (byte)0x1f, (byte)0xaa, (byte)0x56, (byte)0x07, (byte)0x4d, (byte)0xdc, (byte)0x1b, (byte)0x87, (byte)0x38, (byte)0x72, (byte)0x98, (byte)0x3a, (byte)0x42, (byte)0xd5, (byte)0x18, (byte)0xe2, (byte)0x90, (byte)0x0f, (byte)0x02, (byte)0xe2, (byte)0x5a, (byte)0x20, (byte)0x16, (byte)0xc1, (byte)0x22, (byte)0xaf, (byte)0x05, (byte)0xd5, (byte)0x6b, (byte)0x81, (byte)0xc7, (byte)0x6d, (byte)0x9a, (byte)0xd0, (byte)0xb0, (byte)0x10, (byte)0xc5, (byte)0x22, (byte)0x67, (byte)0x00, (byte)0x35, (byte)0x1b, (byte)0x5f, (byte)0x5a, (byte)0xb0, (byte)0x06, (byte)0xe2, (byte)0x2a, (byte)0xa4, (byte)0x70, (byte)0x37, (byte)0x83, (byte)0xfa, (byte)0x87, (byte)0x11, (byte)0x1a, (byte)0x7f, (byte)0x35, (byte)0xd0, (byte)0x38, (byte)0xc5, (byte)0xa5, (byte)0xdf, (byte)0x13, (byte)0x88, (byte)0x4b, (byte)0x80, (byte)0xd8, (byte)0x0e, (byte)0x88, (byte)0x8b, (byte)0xa0, (byte)0xee, (byte)0x05, (byte)0xe1, (byte)0x8c, (byte)0xff, (byte)0x90, (byte)0x74, (byte)0x0c, (byte)0xd2, (byte)0xaf, (byte)0x8d, (byte)0x47, (byte)0x7f, (byte)0x04, (byte)0x54, (byte)0x3d, (byte)0xc8, (byte)0x9d, (byte)0x7e, (byte)0x40, (byte)0x2c, (byte)0x06, (byte)0xc4, (byte)0x4a, (byte)0x40, (byte)0x1c, (byte)0x83, (byte)0x64, (byte)0x96, (byte)0x15, (byte)0x0e, (byte)0xbd, (byte)0xcc, (byte)0x40, (byte)0x1c, (byte)0x0e, (byte)0x8d, (byte)0x67, (byte)0x21, (byte)0x2c, (byte)0xf2, (byte)0xb2, (byte)0x40, (byte)0x1c, (byte)0x0a, (byte)0xc4, (byte)0x4e, (byte)0x78, (byte)0xf4, (byte)0x4b, (byte)0x40, (byte)0xfd, (byte)0x8a, (byte)0xcb, (byte)0x7d, (byte)0x1c, (byte)0x50, (byte)0x37, (byte)0x21, (byte)0xab, (byte)0x01, (byte)0x00, (byte)0x36, (byte)0x64, (byte)0xcf, (byte)0x53, (byte)0x21, (byte)0x04, (byte)0x00, (byte)0x00, }); static final Image STAR_SELECTION_IMAGE = function(new byte[] { (byte)0x1f, (byte)0x8b, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x9d, (byte)0x93, (byte)0xdb, (byte)0x6b, (byte)0x13, (byte)0x41, (byte)0x14, (byte)0xc6, (byte)0x27, (byte)0x9b, (byte)0x39, (byte)0xb3, (byte)0xb3, (byte)0xbb, (byte)0x69, (byte)0x13, (byte)0xc5, (byte)0x4b, (byte)0xbc, (byte)0xa1, (byte)0xf5, (byte)0x52, (byte)0x85, (byte)0x2a, (byte)0x16, (byte)0x7c, (byte)0x28, (byte)0xf1, (byte)0x56, (byte)0xa9, (byte)0x88, (byte)0x69, (byte)0x89, (byte)0xb1, (byte)0x36, (byte)0x1a, (byte)0x23, (byte)0x4d, (byte)0x4e, (byte)0x36, (byte)0x69, (byte)0x82, (byte)0x22, (byte)0x08, (byte)0x22, (byte)0x78, (byte)0xf9, (byte)0x87, (byte)0x7c, (byte)0xf3, (byte)0xc9, (byte)0x47, (byte)0xff, (byte)0x1a, (byte)0x29, (byte)0x49, (byte)0xda, (byte)0xdd, (byte)0x35, (byte)0x17, (byte)0x13, (byte)0x8b, (byte)0x56, (byte)0xda, (byte)0x5d, (byte)0xcf, (byte)0x0e, (byte)0x3e, (byte)0x58, (byte)0x9a, (byte)0x54, (byte)0xf4, (byte)0xe1, (byte)0x7b, (byte)0x39, (byte)0xcc, (byte)0xef, (byte)0xcc, (byte)0x37, (byte)0xe7, (byte)0x3b, (byte)0xf3, (byte)0xa1, (byte)0xcd, (byte)0xe0, (byte)0x2d, (byte)0x67, (byte)0x09, (byte)0x96, (byte)0x78, (byte)0xfd, (byte)0x8a, (byte)0x69, (byte)0xcb, (byte)0xf3, (byte)0xf7, (byte)0x3e, (byte)0xd9, (byte)0x93, (byte)0x6f, (byte)0xdc, (byte)0x8f, (byte)0xef, (byte)0x35, (byte)0xc6, (byte)0xde, (byte)0xbd, (byte)0x64, (byte)0x2c, (byte)0xc2, (byte)0x58, (byte)0xa0, (byte)0xc3, (byte)0x28, (byte)0x99, (byte)0x81, (byte)0x00, (byte)0x41, (byte)0xda, (byte)0xeb, (byte)0xcc, (byte)0x5e, (byte)0x3a, (byte)0x45, (byte)0xec, (byte)0xc1, (byte)0xff, (byte)0xe4, (byte)0x8d, (byte)0x40, (byte)0x83, (byte)0xb9, (byte)0x1f, (byte)0x97, (byte)0xe5, (byte)0xcc, (byte)0xcf, (byte)0x73, (byte)0x52, (byte)0x0b, (byte)0xa2, (byte)0xff, (byte)0xc8, (byte)0x73, (byte)0x98, (byte)0xf4, (byte)0xe3, (byte)0x50, (byte)0xec, (byte)0x94, (byte)0x63, (byte)0xf9, (byte)0x5e, (byte)0xce, (byte)0x4a, (byte)0xaa, (byte)0xda, (byte)0xdf, (byte)0x7c, (byte)0x88, (byte)0xdf, (byte)0xe2, (byte)0x30, (byte)0x16, (byte)0x30, (byte)0x48, (byte)0x6f, (byte)0x5c, (byte)0x35, (byte)0xd0, (byte)0x7b, (byte)0x1e, (byte)0x43, (byte)0xef, (byte)0x99, (byte)0x75, (byte)0xe3, (byte)0xfb, (byte)0x94, (byte)0xce, (byte)0xa9, (byte)0xc6, (byte)0x02, (byte)0xd8, (byte)0xd5, (byte)0x27, (byte)0x4a, (byte)0x92, (byte)0x54, (byte)0x8f, (byte)0x93, (byte)0x8e, (byte)0x04, (byte)0x06, (byte)0x9c, (byte)0xdd, (byte)0x1e, (byte)0x87, (byte)0xd4, (byte)0xe6, (byte)0x79, (byte)0xbd, (byte)0xd8, (byte)0xb6, (byte)0x2d, (byte)0xf4, (byte)0xea, (byte)0x16, (byte)0xba, (byte)0x75, (byte)0xb3, (byte)0xd0, (byte)0x2e, (byte)0x18, (byte)0x57, (byte)0x36, (byte)0x4f, (byte)0x8a, (byte)0x09, (byte)0xdf, (byte)0x82, (byte)0xc3, (byte)0x81, (byte)0xa4, (byte)0xfe, (byte)0x1c, (byte)0x74, (byte)0xea, (byte)0xa3, (byte)0x11, (byte)0xbb, (byte)0x8f, (byte)0xb8, (byte)0x99, (byte)0xad, (byte)0xa4, (byte)0xc8, (byte)0x0e, (byte)0xd2, (byte)0x56, (byte)0xbe, (byte)0xf7, (byte)0xc8, (byte)0x2a, (byte)0x75, (byte)0x30, (byte)0x86, (byte)0x5f, (byte)0xea, (byte)0x74, (byte)0x6f, (byte)0x8d, (byte)0xf8, (byte)0xaa, (byte)0x89, (byte)0x6e, (byte)0x45, (byte)0xa2, (byte)0xb3, (byte)0x62, (byte)0xe0, (byte)0xba, (byte)0xad, (byte)0x17, (byte)0x9d, (byte)0x82, (byte)0xfe, (byte)0xd0, (byte)0xcb, (byte)0x8a, (byte)0x4c, (byte)0xf7, (byte)0x3a, (byte)0x4c, (byte)0x6f, (byte)0x25, (byte)0x54, (byte)0x3e, (byte)0xa1, (byte)0xa7, (byte)0x63, (byte)0x7e, (byte)0x0c, (byte)0x16, (byte)0x07, (byte)0x0b, (byte)0x26, (byte)0x7a, (byte)0x2f, (byte)0x42, (byte)0xd6, (byte)0x52, (byte)0xac, (byte)0x1b, (byte)0xb2, (byte)0x55, (byte)0x03, (byte)0x1d, (byte)0x5b, (byte)0x2a, (byte)0xad, (byte)0x95, (byte)0x05, (byte)0xb6, (byte)0x6c, (byte)0x81, (byte)0x8d, (byte)0x3a, (byte)0x4f, (byte)0xf7, (byte)0x52, (byte)0x3c, (byte)0xe1, (byte)0xcb, (byte)0x3f, (byte)0xde, (byte)0x42, (byte)0x3d, (byte)0xc8, (byte)0xd7, (byte)0xfd, (byte)0x7e, (byte)0xda, (byte)0x40, (byte)0xf7, (byte)0xa9, (byte)0xa9, (byte)0x58, (byte)0xa7, (byte)0x42, (byte)0x2c, (byte)0xdd, (byte)0xbd, (byte)0x5e, (byte)0xd6, (byte)0x95, (byte)0x5a, (byte)0x08, (byte)0xd8, (byte)0xa8, (byte)0x40, (byte)0xc8, (byte)0xc6, (byte)0xc9, (byte)0xff, (byte)0xee, (byte)0x79, (byte)0x02, (byte)0x9c, (byte)0xf0, (byte)0x0d, (byte)0x58, (byte)0xea, (byte)0x66, (byte)0x88, (byte)0xa9, (byte)0x85, (byte)0x7e, (byte)0x65, (byte)0xe8, (byte)0x19, (byte)0xd7, (byte)0x50, (byte)0x28, (byte)0x35, (byte)0x6d, (byte)0x9e, (byte)0xe9, (byte)0xcc, (byte)0xf2, (byte)0xfd, (byte)0x8a, (byte)0x85, (byte)0xa1, (byte)0x19, (byte)0x58, (byte)0x94, (byte)0xf9, (byte)0xc2, (byte)0xd7, (byte)0x9b, (byte)0xc4, (byte)0xd4, (byte)0xc9, (byte)0x2f, (byte)0xea, (byte)0xca, (byte)0x73, (byte)0xb3, (byte)0xc4, (byte)0xb1, (byte)0x55, (byte)0x02, (byte)0x5c, (byte)0xad, (byte)0xf2, (byte)0x5b, (byte)0x83, (byte)0x8b, (byte)0x9c, (byte)0xa9, (byte)0x1c, (byte)0x86, (byte)0xe7, (byte)0x77, (byte)0x80, (byte)0xde, (byte)0x90, (byte)0x6b, (byte)0x67, (byte)0xc8, (byte)0xeb, (byte)0x8a, (byte)0x8e, (byte)0xcd, (byte)0x0a, (byte)0x28, (byte)0x35, (byte)0x6c, (byte)0x8e, (byte)0x0d, (byte)0x8c, (byte)0xe2, (byte)0xaa, (byte)0xad, (byte)0xcd, (byte)0x77, (byte)0x53, (byte)0x5c, (byte)0x8e, (byte)0xdc, (byte)0x25, (byte)0x41, (byte)0x73, (byte)0xb4, (byte)0x60, (byte)0xd9, (byte)0x79, (byte)0x4c, (byte)0x77, (byte)0xd6, (byte)0x20, (byte)0xef, (byte)0x66, (byte)0xf9, (byte)0xec, (byte)0xb7, (byte)0x29, (byte)0xb8, (byte)0xdd, (byte)0x9f, (byte)0xe6, (byte)0x4f, (byte)0x5a, (byte)0x4b, (byte)0x51, (byte)0xfc, (byte)0x5c, (byte)0xd5, (byte)0x1e, (byte)0x38, (byte)0x77, (byte)0xb5, (byte)0xf1, (byte)0x91, (byte)0xbb, (byte)0x24, (byte)0xe0, (byte)0x0c, (byte)0x65, (byte)0x9f, (byte)0x6b, (byte)0xdf, (byte)0x81, (byte)0x6b, (byte)0x1b, (byte)0x17, (byte)0xe0, (byte)0x38, (byte)0xcd, (byte)0x02, (byte)0x82, (byte)0x88, (byte)0xda, (byte)0xe3, (byte)0xd3, (byte)0xdb, (byte)0x63, (byte)0x30, (byte)0xd7, (byte)0xbf, (byte)0xc4, (byte)0x17, (byte)0xbd, (byte)0x59, (byte)0xed, (byte)0x90, (byte)0x6f, (byte)0x0e, (byte)0xe5, (byte)0x23, (byte)0xea, (byte)0xbf, (byte)0x48, (byte)0x38, (byte)0x4a, (byte)0xe2, (byte)0xc4, (byte)0xec, (byte)0x3c, (byte)0x03, (byte)0x10, (byte)0xfa, (byte)0x9e, (byte)0xa0, (byte)0x9e, (byte)0xc9, (byte)0x40, (byte)0x0e, (byte)0xf5, (byte)0x1f, (byte)0x51, (byte)0x7f, (byte)0x46, (byte)0x1f, (byte)0x39, (byte)0xdb, (byte)0x50, (byte)0x9a, (byte)0xea, (byte)0xb3, (byte)0xb3, (byte)0xf6, (byte)0x0b, (byte)0xee, (byte)0x36, (byte)0x1e, (byte)0xfc, (byte)0x21, (byte)0x04, (byte)0x00, (byte)0x00, }); | /**
* Converts a byte array to an image that has previously been converted with imageToCompressedByteArray(Image image).
* The image is not recognizable as image from standard tools.
*
* @param data The image.
* @return The image.
*/ | Converts a byte array to an image that has previously been converted with imageToCompressedByteArray(Image image). The image is not recognizable as image from standard tools | compressedByteArrayToImage | {
"repo_name": "peterzhu2118/Music-Player",
"path": "src/StarRater.java",
"license": "gpl-2.0",
"size": 32372
} | [
"java.awt.Image",
"java.awt.Toolkit",
"java.awt.image.MemoryImageSource",
"java.io.ByteArrayInputStream",
"java.io.ObjectInputStream",
"java.util.zip.GZIPInputStream"
] | import java.awt.Image; import java.awt.Toolkit; import java.awt.image.MemoryImageSource; import java.io.ByteArrayInputStream; import java.io.ObjectInputStream; import java.util.zip.GZIPInputStream; | import java.awt.*; import java.awt.image.*; import java.io.*; import java.util.zip.*; | [
"java.awt",
"java.io",
"java.util"
] | java.awt; java.io; java.util; | 2,593,681 |
public void enable() throws IOException {
// This has to be synchronized or it can collide with the check in the task.
synchronized (optOutLock) {
// Check if the server owner has already set opt-out, if not, set it.
if (isOptOut()) {
configuration.set("opt-out", false);
configuration.save(configurationFile);
}
// Enable Task, if it is not running
if (task == null) {
start();
}
}
} | void function() throws IOException { synchronized (optOutLock) { if (isOptOut()) { configuration.set(STR, false); configuration.save(configurationFile); } if (task == null) { start(); } } } | /**
* Enables metrics for the server by setting "opt-out" to false in the config file and starting the metrics task.
*
* @throws java.io.IOException
*/ | Enables metrics for the server by setting "opt-out" to false in the config file and starting the metrics task | enable | {
"repo_name": "zhouhaha/WebInterface",
"path": "src/net/andylizi/webinterface/Metrics.java",
"license": "lgpl-3.0",
"size": 25684
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,595,207 |
@NotNull
private Iterator<Group> getMembership(boolean includeInherited) throws RepositoryException {
if (isEveryone()) {
return Collections.<Group>emptySet().iterator();
}
MembershipProvider mMgr = getMembershipProvider();
Iterator<String> oakPaths = mMgr.getMembership(getTree(), includeInherited);
Authorizable everyoneGroup = userManager.getAuthorizable(EveryonePrincipal.getInstance());
if (everyoneGroup instanceof GroupImpl) {
String everyonePath = ((GroupImpl) everyoneGroup).getTree().getPath();
oakPaths = Iterators.concat(oakPaths, ImmutableSet.of(everyonePath).iterator());
}
if (oakPaths.hasNext()) {
AuthorizableIterator groups = AuthorizableIterator.create(oakPaths, userManager, AuthorizableType.GROUP);
return new RangeIteratorAdapter(groups, groups.getSize());
} else {
return RangeIteratorAdapter.EMPTY;
}
} | Iterator<Group> function(boolean includeInherited) throws RepositoryException { if (isEveryone()) { return Collections.<Group>emptySet().iterator(); } MembershipProvider mMgr = getMembershipProvider(); Iterator<String> oakPaths = mMgr.getMembership(getTree(), includeInherited); Authorizable everyoneGroup = userManager.getAuthorizable(EveryonePrincipal.getInstance()); if (everyoneGroup instanceof GroupImpl) { String everyonePath = ((GroupImpl) everyoneGroup).getTree().getPath(); oakPaths = Iterators.concat(oakPaths, ImmutableSet.of(everyonePath).iterator()); } if (oakPaths.hasNext()) { AuthorizableIterator groups = AuthorizableIterator.create(oakPaths, userManager, AuthorizableType.GROUP); return new RangeIteratorAdapter(groups, groups.getSize()); } else { return RangeIteratorAdapter.EMPTY; } } | /**
* Retrieve the group membership of this authorizable.
*
* @param includeInherited Flag indicating whether the resulting iterator only
* contains groups this authorizable is declared member of or if inherited
* group membership is respected.
*
* @return Iterator of groups this authorizable is (declared) member of.
* @throws RepositoryException If an error occurs.
*/ | Retrieve the group membership of this authorizable | getMembership | {
"repo_name": "trekawek/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AuthorizableImpl.java",
"license": "apache-2.0",
"size": 9658
} | [
"com.google.common.collect.ImmutableSet",
"com.google.common.collect.Iterators",
"java.util.Collections",
"java.util.Iterator",
"javax.jcr.RepositoryException",
"org.apache.jackrabbit.api.security.user.Authorizable",
"org.apache.jackrabbit.api.security.user.Group",
"org.apache.jackrabbit.commons.iterator.RangeIteratorAdapter",
"org.apache.jackrabbit.oak.spi.security.principal.EveryonePrincipal",
"org.apache.jackrabbit.oak.spi.security.user.AuthorizableType"
] | import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterators; import java.util.Collections; import java.util.Iterator; import javax.jcr.RepositoryException; import org.apache.jackrabbit.api.security.user.Authorizable; import org.apache.jackrabbit.api.security.user.Group; import org.apache.jackrabbit.commons.iterator.RangeIteratorAdapter; import org.apache.jackrabbit.oak.spi.security.principal.EveryonePrincipal; import org.apache.jackrabbit.oak.spi.security.user.AuthorizableType; | import com.google.common.collect.*; import java.util.*; import javax.jcr.*; import org.apache.jackrabbit.api.security.user.*; import org.apache.jackrabbit.commons.iterator.*; import org.apache.jackrabbit.oak.spi.security.principal.*; import org.apache.jackrabbit.oak.spi.security.user.*; | [
"com.google.common",
"java.util",
"javax.jcr",
"org.apache.jackrabbit"
] | com.google.common; java.util; javax.jcr; org.apache.jackrabbit; | 2,877,698 |
assertThatClassIsImmutable(DefaultFloatingIp.class);
} | assertThatClassIsImmutable(DefaultFloatingIp.class); } | /**
* Checks that the DefaultFloatingIp class is immutable.
*/ | Checks that the DefaultFloatingIp class is immutable | testImmutability | {
"repo_name": "kuujo/onos",
"path": "apps/vtn/vtnrsc/src/test/java/org/onosproject/vtnrsc/floatingip/DefaultFloatingIpTest.java",
"license": "apache-2.0",
"size": 5514
} | [
"org.onosproject.vtnrsc.DefaultFloatingIp"
] | import org.onosproject.vtnrsc.DefaultFloatingIp; | import org.onosproject.vtnrsc.*; | [
"org.onosproject.vtnrsc"
] | org.onosproject.vtnrsc; | 750,220 |
private static void check(SecureRandom orig, SecureRandom copy,
boolean equal, String mech) {
int o = orig.nextInt();
int c = copy.nextInt();
System.out.printf("%nRandom number generated for mechanism: '%s' "
+ "from original instance as: '%s' and from serialized "
+ "instance as: '%s'", mech, o, c);
if (equal) {
Asserts.assertEquals(o, c, mech);
} else {
Asserts.assertNotEquals(o, c, mech);
}
} | static void function(SecureRandom orig, SecureRandom copy, boolean equal, String mech) { int o = orig.nextInt(); int c = copy.nextInt(); System.out.printf(STR + STR + STR, mech, o, c); if (equal) { Asserts.assertEquals(o, c, mech); } else { Asserts.assertNotEquals(o, c, mech); } } | /**
* Verify the similarity of random numbers generated though both original
* as well as deserialized instance.
*/ | Verify the similarity of random numbers generated though both original as well as deserialized instance | check | {
"repo_name": "FauxFaux/jdk9-jdk",
"path": "test/java/security/SecureRandom/SerializedSeedTest.java",
"license": "gpl-2.0",
"size": 9038
} | [
"java.security.SecureRandom"
] | import java.security.SecureRandom; | import java.security.*; | [
"java.security"
] | java.security; | 2,794,611 |
public static InputFile create(java.io.File basedir, java.io.File file) {
String relativePath = getRelativePath(basedir, file);
if (relativePath != null) {
return create(basedir, relativePath);
}
return null;
} | static InputFile function(java.io.File basedir, java.io.File file) { String relativePath = getRelativePath(basedir, file); if (relativePath != null) { return create(basedir, relativePath); } return null; } | /**
* For internal and for testing purposes. Please use the FileSystem component to access files.
*/ | For internal and for testing purposes. Please use the FileSystem component to access files | create | {
"repo_name": "joansmith/sonarqube",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFileUtils.java",
"license": "lgpl-3.0",
"size": 5037
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,635,867 |
public static java.util.List extractPatientICPList(ims.domain.ILightweightDomainFactory domainFactory, ims.icp.vo.PatientICP_DisplayVoCollection voCollection)
{
return extractPatientICPList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.icp.vo.PatientICP_DisplayVoCollection voCollection) { return extractPatientICPList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.icps.instantiation.domain.objects.PatientICP list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.icps.instantiation.domain.objects.PatientICP list from the value object collection | extractPatientICPList | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/icp/vo/domain/PatientICP_DisplayVoAssembler.java",
"license": "agpl-3.0",
"size": 16332
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,072,513 |
CatalogueDBAdapter db = new CatalogueDBAdapter(context);
db.open();
try {
// Load the goodreads reviews
boolean ok = processReviews(qMgr, db);
// If it's a sync job, then start the 'send' part and save last syn date
if (mIsSync) {
GoodreadsManager.setLastSyncDate(mStartDate);
QueueManager.getQueueManager().enqueueTask(new SendAllBooksTask(true), BcQueueManager.QUEUE_MAIN, 0);
}
return ok;
} finally {
if (db != null)
db.close();
}
}
| CatalogueDBAdapter db = new CatalogueDBAdapter(context); db.open(); try { boolean ok = processReviews(qMgr, db); if (mIsSync) { GoodreadsManager.setLastSyncDate(mStartDate); QueueManager.getQueueManager().enqueueTask(new SendAllBooksTask(true), BcQueueManager.QUEUE_MAIN, 0); } return ok; } finally { if (db != null) db.close(); } } | /**
* Do the actual work.
*/ | Do the actual work | run | {
"repo_name": "Grunthos/Book-Catalogue",
"path": "src/com/eleybourn/bookcatalogue/goodreads/ImportAllTask.java",
"license": "gpl-3.0",
"size": 21403
} | [
"com.eleybourn.bookcatalogue.BcQueueManager",
"com.eleybourn.bookcatalogue.CatalogueDBAdapter",
"net.philipwarner.taskqueue.QueueManager"
] | import com.eleybourn.bookcatalogue.BcQueueManager; import com.eleybourn.bookcatalogue.CatalogueDBAdapter; import net.philipwarner.taskqueue.QueueManager; | import com.eleybourn.bookcatalogue.*; import net.philipwarner.taskqueue.*; | [
"com.eleybourn.bookcatalogue",
"net.philipwarner.taskqueue"
] | com.eleybourn.bookcatalogue; net.philipwarner.taskqueue; | 621,039 |
FLyrVect createLayer(IProjection projection) throws Exception; | FLyrVect createLayer(IProjection projection) throws Exception; | /**
* Creates a new layer using the information from the panels returned in
* {@link #getPanels(WizardAndami)} and the given projection to create a new
* layer.
*
* @param projection
* the projection of the new layer
* @return the new layer or <code>null</code> if the layer cannot be
* created.
* @throws Exception
* if any error occurs while creating the layer.
*/ | Creates a new layer using the information from the panels returned in <code>#getPanels(WizardAndami)</code> and the given projection to create a new layer | createLayer | {
"repo_name": "iCarto/siga",
"path": "extCAD/src/com/iver/cit/gvsig/gui/cad/createLayer/NewLayerWizard.java",
"license": "gpl-3.0",
"size": 1208
} | [
"com.iver.cit.gvsig.fmap.layers.FLyrVect",
"org.cresques.cts.IProjection"
] | import com.iver.cit.gvsig.fmap.layers.FLyrVect; import org.cresques.cts.IProjection; | import com.iver.cit.gvsig.fmap.layers.*; import org.cresques.cts.*; | [
"com.iver.cit",
"org.cresques.cts"
] | com.iver.cit; org.cresques.cts; | 2,338,075 |
public void testCreateRedundantBucket() {
final String[] regionPath = new String[] {
getUniqueName() + "-PR-0"
};
final int numBuckets = 1;
final int redundantCopies = 1;
final int localMaxMemory = 100;
// create the PartitionedRegion on the first two members
createRegion(Host.getHost(0).getVM(0), regionPath[0],
localMaxMemory, numBuckets, redundantCopies);
createRegion(Host.getHost(0).getVM(1), regionPath[0],
localMaxMemory, numBuckets, redundantCopies);
// create the bucket on the first two members
final Integer bucketKey = Integer.valueOf(0);
final byte[] value = new byte[1]; // 2 MB in size
createBucket(0, regionPath[0], bucketKey, value);
// identify the primaryVM and otherVM
final InternalDistributedMember[] members = new InternalDistributedMember[2];
final long[] memberSizes = new long[members.length];
final int[] memberBucketCounts = new int[members.length];
final int[] memberPrimaryCounts = new int[members.length];
fillValidationArrays(members, memberSizes,
memberBucketCounts, memberPrimaryCounts, regionPath[0]);
int primaryVM = -1;
int otherVM = -1;
for (int i = 0; i < memberPrimaryCounts.length; i++) {
if (memberPrimaryCounts[i] == 0) {
otherVM = i;
} else if (memberPrimaryCounts[i] == 1) {
// found the primary
primaryVM = i;
}
}
assertTrue(primaryVM > -1);
assertTrue(otherVM > -1);
assertTrue(primaryVM != otherVM);
final int finalOtherVM = otherVM;
// make sure bucket exists on otherVM | void function() { final String[] regionPath = new String[] { getUniqueName() + "-PR-0" }; final int numBuckets = 1; final int redundantCopies = 1; final int localMaxMemory = 100; createRegion(Host.getHost(0).getVM(0), regionPath[0], localMaxMemory, numBuckets, redundantCopies); createRegion(Host.getHost(0).getVM(1), regionPath[0], localMaxMemory, numBuckets, redundantCopies); final Integer bucketKey = Integer.valueOf(0); final byte[] value = new byte[1]; createBucket(0, regionPath[0], bucketKey, value); final InternalDistributedMember[] members = new InternalDistributedMember[2]; final long[] memberSizes = new long[members.length]; final int[] memberBucketCounts = new int[members.length]; final int[] memberPrimaryCounts = new int[members.length]; fillValidationArrays(members, memberSizes, memberBucketCounts, memberPrimaryCounts, regionPath[0]); int primaryVM = -1; int otherVM = -1; for (int i = 0; i < memberPrimaryCounts.length; i++) { if (memberPrimaryCounts[i] == 0) { otherVM = i; } else if (memberPrimaryCounts[i] == 1) { primaryVM = i; } } assertTrue(primaryVM > -1); assertTrue(otherVM > -1); assertTrue(primaryVM != otherVM); final int finalOtherVM = otherVM; | /**
* Creates a bucket on two members. Then brings up a third member and creates
* an extra redundant copy of the bucket on it.
*/ | Creates a bucket on two members. Then brings up a third member and creates an extra redundant copy of the bucket on it | testCreateRedundantBucket | {
"repo_name": "robertgeiger/incubator-geode",
"path": "gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java",
"license": "apache-2.0",
"size": 73093
} | [
"com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember"
] | import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; | import com.gemstone.gemfire.distributed.internal.membership.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 1,648,620 |
public void saveDConfigBean(OutputStream outputArchive, DConfigBeanRoot bean) throws ConfigurationException; | void function(OutputStream outputArchive, DConfigBeanRoot bean) throws ConfigurationException; | /**
* Save to disk all the configuration beans associated with a particular deployment
* descriptor file. The saved data may be fully or partially configured DConfigBeans.
* The output file format is recommended to be XML.
*
* @param outputArchive The output stream to which the DConfigBeans should be saved.
* @param bean The top level bean, DConfigBeanRoot, from which to be save.
*
* @throws ConfigurationException reports errors in storing a configuration bean
*/ | Save to disk all the configuration beans associated with a particular deployment descriptor file. The saved data may be fully or partially configured DConfigBeans. The output file format is recommended to be XML | saveDConfigBean | {
"repo_name": "salyh/javamailspec",
"path": "geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/DeploymentConfiguration.java",
"license": "apache-2.0",
"size": 4960
} | [
"java.io.OutputStream",
"javax.enterprise.deploy.spi.exceptions.ConfigurationException"
] | import java.io.OutputStream; import javax.enterprise.deploy.spi.exceptions.ConfigurationException; | import java.io.*; import javax.enterprise.deploy.spi.exceptions.*; | [
"java.io",
"javax.enterprise"
] | java.io; javax.enterprise; | 342,323 |
public ReportGenerator.Format getReportFormat() {
return reportFormat;
} | ReportGenerator.Format function() { return reportFormat; } | /**
* Get the value of reportFormat.
*
* @return the value of reportFormat
*/ | Get the value of reportFormat | getReportFormat | {
"repo_name": "jeremylong/DependencyCheck",
"path": "core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java",
"license": "apache-2.0",
"size": 33221
} | [
"org.owasp.dependencycheck.reporting.ReportGenerator"
] | import org.owasp.dependencycheck.reporting.ReportGenerator; | import org.owasp.dependencycheck.reporting.*; | [
"org.owasp.dependencycheck"
] | org.owasp.dependencycheck; | 2,791,002 |
public static void main(String[] args) {
DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build();
MetricsQueryClient metricsQueryClient = new MetricsQueryClientBuilder()
.credential(tokenCredential)
.buildClient();
PagedIterable<MetricNamespace> metricNamespaces = metricsQueryClient.listMetricNamespaces("{resource-uri}", OffsetDateTime.now().minusMonths(12));
metricNamespaces.forEach(metricNamespace -> {
System.out.println(metricNamespace.getName());
System.out.println(metricNamespace.getId());
});
} | static void function(String[] args) { DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); MetricsQueryClient metricsQueryClient = new MetricsQueryClientBuilder() .credential(tokenCredential) .buildClient(); PagedIterable<MetricNamespace> metricNamespaces = metricsQueryClient.listMetricNamespaces(STR, OffsetDateTime.now().minusMonths(12)); metricNamespaces.forEach(metricNamespace -> { System.out.println(metricNamespace.getName()); System.out.println(metricNamespace.getId()); }); } | /**
* The main method to execute the sample.
* @param args Ignored args.
*/ | The main method to execute the sample | main | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/MetricNamespacesSample.java",
"license": "mit",
"size": 1252
} | [
"com.azure.core.http.rest.PagedIterable",
"com.azure.identity.DefaultAzureCredential",
"com.azure.identity.DefaultAzureCredentialBuilder",
"com.azure.monitor.query.models.MetricNamespace",
"java.time.OffsetDateTime"
] | import com.azure.core.http.rest.PagedIterable; import com.azure.identity.DefaultAzureCredential; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.monitor.query.models.MetricNamespace; import java.time.OffsetDateTime; | import com.azure.core.http.rest.*; import com.azure.identity.*; import com.azure.monitor.query.models.*; import java.time.*; | [
"com.azure.core",
"com.azure.identity",
"com.azure.monitor",
"java.time"
] | com.azure.core; com.azure.identity; com.azure.monitor; java.time; | 651,368 |
void applyAuthorizationConfigPolicy(HiveConf hiveConf) throws HiveAuthzPluginException; | void applyAuthorizationConfigPolicy(HiveConf hiveConf) throws HiveAuthzPluginException; | /**
* Modify the given HiveConf object to configure authorization related parameters
* or other parameters related to hive security
* @param hiveConf
* @throws HiveAuthzPluginException
*/ | Modify the given HiveConf object to configure authorization related parameters or other parameters related to hive security | applyAuthorizationConfigPolicy | {
"repo_name": "BUPTAnderson/apache-hive-2.1.1-src",
"path": "ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveAuthorizer.java",
"license": "apache-2.0",
"size": 10171
} | [
"org.apache.hadoop.hive.conf.HiveConf"
] | import org.apache.hadoop.hive.conf.HiveConf; | import org.apache.hadoop.hive.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,010,465 |
public static void initSAXFactory(String factoryClassName,
boolean namespaceAware,
boolean validating)
{
if (factoryClassName != null) {
try {
saxFactory = (SAXParserFactory)Class.forName(factoryClassName).
newInstance();
if (System.getProperty(saxParserFactoryProperty) == null) {
System.setProperty(saxParserFactoryProperty,
factoryClassName);
}
} catch (Exception e) {
log.error(Messages.getMessage("exception00"), e);
saxFactory = null;
}
} else {
saxFactory = SAXParserFactory.newInstance();
}
saxFactory.setNamespaceAware(namespaceAware);
saxFactory.setValidating(validating);
// Discard existing parsers
saxParsers.clear();
} | static void function(String factoryClassName, boolean namespaceAware, boolean validating) { if (factoryClassName != null) { try { saxFactory = (SAXParserFactory)Class.forName(factoryClassName). newInstance(); if (System.getProperty(saxParserFactoryProperty) == null) { System.setProperty(saxParserFactoryProperty, factoryClassName); } } catch (Exception e) { log.error(Messages.getMessage(STR), e); saxFactory = null; } } else { saxFactory = SAXParserFactory.newInstance(); } saxFactory.setNamespaceAware(namespaceAware); saxFactory.setValidating(validating); saxParsers.clear(); } | /** Initialize the SAX parser factory.
*
* @param factoryClassName The (optional) class name of the desired
* SAXParserFactory implementation. Will be
* assigned to the system property
* <b>javax.xml.parsers.SAXParserFactory</b>
* unless this property is already set.
* If <code>null</code>, leaves current setting
* alone.
* @param namespaceAware true if we want a namespace-aware parser
* @param validating true if we want a validating parser
*
*/ | Initialize the SAX parser factory | initSAXFactory | {
"repo_name": "hugosato/apache-axis",
"path": "src/org/apache/axis/utils/XMLUtils.java",
"license": "apache-2.0",
"size": 34551
} | [
"javax.xml.parsers.SAXParserFactory"
] | import javax.xml.parsers.SAXParserFactory; | import javax.xml.parsers.*; | [
"javax.xml"
] | javax.xml; | 1,319,081 |
public static QDataSet square( QDataSet t ) {
QDataSet modt= lt( modp( t, DataSetUtil.asDataSet(TAU) ), PI );
return link( t, modt );
} | static QDataSet function( QDataSet t ) { QDataSet modt= lt( modp( t, DataSetUtil.asDataSet(TAU) ), PI ); return link( t, modt ); } | /**
* generates a square from the tags, where a the signal is 1 from 0-PI, 0 from PI-2*PI, etc.
* @param t the independent values.
* @return square wave with a period of 2 PI.
*/ | generates a square from the tags, where a the signal is 1 from 0-PI, 0 from PI-2*PI, etc | square | {
"repo_name": "autoplot/app",
"path": "QDataSet/src/org/das2/qds/ops/Ops.java",
"license": "gpl-2.0",
"size": 492716
} | [
"org.das2.qds.DataSetUtil",
"org.das2.qds.QDataSet"
] | import org.das2.qds.DataSetUtil; import org.das2.qds.QDataSet; | import org.das2.qds.*; | [
"org.das2.qds"
] | org.das2.qds; | 524,966 |
public final <T> T registerService(final Class<T> serviceClass, final T service, final Map<String, Object> properties) {
Dictionary<String, Object> serviceProperties = null;
if (properties != null) {
serviceProperties = new Hashtable<String, Object>(properties);
}
bundleContext().registerService(serviceClass != null ? serviceClass.getName() : null, service, serviceProperties);
return service;
} | final <T> T function(final Class<T> serviceClass, final T service, final Map<String, Object> properties) { Dictionary<String, Object> serviceProperties = null; if (properties != null) { serviceProperties = new Hashtable<String, Object>(properties); } bundleContext().registerService(serviceClass != null ? serviceClass.getName() : null, service, serviceProperties); return service; } | /**
* Registers a service in the mocked OSGi environment.
* @param <T> Service type
* @param serviceClass Service class
* @param service Service instance
* @param properties Service properties (optional)
* @return Registered service instance
*/ | Registers a service in the mocked OSGi environment | registerService | {
"repo_name": "dulvac/sling",
"path": "testing/mocks/osgi-mock/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java",
"license": "apache-2.0",
"size": 6910
} | [
"java.util.Dictionary",
"java.util.Hashtable",
"java.util.Map"
] | import java.util.Dictionary; import java.util.Hashtable; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 460,592 |
DatabaseUserInfo[] getDatabaseUsers(String environmentName) throws RSSManagerException; | DatabaseUserInfo[] getDatabaseUsers(String environmentName) throws RSSManagerException; | /**
* Get all database users in a environment
*
* @param environmentName the name of the environment
* @return DatabaseUserInfo array
* @throws RSSManagerException if error occurred when getting database users
*/ | Get all database users in a environment | getDatabaseUsers | {
"repo_name": "wso2/carbon-storage-management",
"path": "components/rss-manager/org.wso2.carbon.rssmanager.core/src/main/java/org/wso2/carbon/rssmanager/core/service/RSSManagerService.java",
"license": "apache-2.0",
"size": 17847
} | [
"org.wso2.carbon.rssmanager.core.dto.DatabaseUserInfo",
"org.wso2.carbon.rssmanager.core.exception.RSSManagerException"
] | import org.wso2.carbon.rssmanager.core.dto.DatabaseUserInfo; import org.wso2.carbon.rssmanager.core.exception.RSSManagerException; | import org.wso2.carbon.rssmanager.core.dto.*; import org.wso2.carbon.rssmanager.core.exception.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 936,889 |
@SuppressWarnings("unchecked")
protected void setup() throws IOException, ClassNotFoundException {
File timeStampsDesign = new File(diskDir_, TIMESTAMPS_FILE_PREFIX + getClass().getSimpleName() + "_" + getDb().getReplicaID());
if (timeStampsDesign.exists()) {
//deserialize timeStamp of design file map
InputStream fis = new FileInputStream(timeStampsDesign);
InputStream bisr = new BufferedInputStream(fis);
ObjectInput ois = new ObjectInputStream(bisr);
dirMap = (Map<String, DISK>) ois.readObject();
ois.close();
} else {
dirMap = new HashMap<String, DISK>();
}
scanDirectory(diskDir_);// now we have the ODS structure in the stateMap
} | @SuppressWarnings(STR) void function() throws IOException, ClassNotFoundException { File timeStampsDesign = new File(diskDir_, TIMESTAMPS_FILE_PREFIX + getClass().getSimpleName() + "_" + getDb().getReplicaID()); if (timeStampsDesign.exists()) { InputStream fis = new FileInputStream(timeStampsDesign); InputStream bisr = new BufferedInputStream(fis); ObjectInput ois = new ObjectInputStream(bisr); dirMap = (Map<String, DISK>) ois.readObject(); ois.close(); } else { dirMap = new HashMap<String, DISK>(); } scanDirectory(diskDir_); } | /**
* Sets up the designSync and builds the map with all OnDisk-files + timestamps
*
* @throws IOException
* @throws ClassNotFoundException
*/ | Sets up the designSync and builds the map with all OnDisk-files + timestamps | setup | {
"repo_name": "rPraml/org.openntf.domino",
"path": "domino/design-impl/src/main/java/org/openntf/domino/design/sync/SyncTask.java",
"license": "apache-2.0",
"size": 13593
} | [
"java.io.BufferedInputStream",
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.io.ObjectInput",
"java.io.ObjectInputStream",
"java.util.HashMap",
"java.util.Map"
] | import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.util.HashMap; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,922,566 |
@Test
public void testIOExceptionsDuringHandshakeWrite() throws Exception {
server = createEchoServer(SecurityProtocol.SSL);
testIOExceptionsDuringHandshake(FailureAction.NO_OP, FailureAction.THROW_IO_EXCEPTION);
} | void function() throws Exception { server = createEchoServer(SecurityProtocol.SSL); testIOExceptionsDuringHandshake(FailureAction.NO_OP, FailureAction.THROW_IO_EXCEPTION); } | /**
* Tests that IOExceptions from write during SSL handshake are not treated as authentication failures.
*/ | Tests that IOExceptions from write during SSL handshake are not treated as authentication failures | testIOExceptionsDuringHandshakeWrite | {
"repo_name": "mihbor/kafka",
"path": "clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java",
"license": "apache-2.0",
"size": 56396
} | [
"org.apache.kafka.common.security.auth.SecurityProtocol"
] | import org.apache.kafka.common.security.auth.SecurityProtocol; | import org.apache.kafka.common.security.auth.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 1,319,166 |
public final void setFileState(FileState state) {
m_state = state;
} | final void function(FileState state) { m_state = state; } | /**
* Set the associated file state for the request
*
* @param state FileState
*/ | Set the associated file state for the request | setFileState | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/server/filesys/loader/DeleteFileRequest.java",
"license": "lgpl-3.0",
"size": 3650
} | [
"org.alfresco.jlan.server.filesys.cache.FileState"
] | import org.alfresco.jlan.server.filesys.cache.FileState; | import org.alfresco.jlan.server.filesys.cache.*; | [
"org.alfresco.jlan"
] | org.alfresco.jlan; | 1,564,134 |
public T caseArchimateElement(IArchimateElement object) {
return null;
}
| T function(IArchimateElement object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/ | Returns the result of interpreting the object as an instance of 'Element'. This implementation returns null; returning a non-null result will terminate the switch. | caseArchimateElement | {
"repo_name": "archimatetool/archi",
"path": "com.archimatetool.model/src/com/archimatetool/model/util/ArchimateSwitch.java",
"license": "mit",
"size": 256079
} | [
"com.archimatetool.model.IArchimateElement"
] | import com.archimatetool.model.IArchimateElement; | import com.archimatetool.model.*; | [
"com.archimatetool.model"
] | com.archimatetool.model; | 2,036,821 |
public ItemStack hook_getPickBlock(MovingObjectPosition trace, World world, int blockX, int blockY, int blockZ, EntityPlayer player) {return null;} | public ItemStack hook_getPickBlock(MovingObjectPosition trace, World world, int blockX, int blockY, int blockZ, EntityPlayer player) {return null;} | /** Call this from addCollisionBoxesToList for cover-supporting blocks.
* Returns true if the tile entity implements IPartContainer.
*/ | Call this from addCollisionBoxesToList for cover-supporting blocks. Returns true if the tile entity implements IPartContainer | hook_addCollisionBoxesToList | {
"repo_name": "kremnev8/AdvancedSpaceStaion-mod",
"path": "src/main/java/mods/immibis/core/api/multipart/IMultipartSystem.java",
"license": "mit",
"size": 3719
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack",
"net.minecraft.util.MovingObjectPosition",
"net.minecraft.world.World"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; | import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraft.world.*; | [
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraft.world; | 1,873,097 |
protected void writeParameter( final String name ) throws IOException, ReportWriterException {
if ( "dataSource".equals( name ) == false ) {
super.writeParameter( name );
return;
}
final DataSource ds = (DataSource) getObjectDescription().getParameter( name );
final ObjectDescription dsDesc = getParameterDescription( name );
final String dsname = dataSourceCollector.getDataSourceName( dsDesc );
if ( dsname == null ) {
throw new ReportWriterException( "The datasource type is not registered: " + ds.getClass() );
}
final XmlWriter writer = getXmlWriter();
writer.writeTag( ExtParserModule.NAMESPACE, AbstractXMLDefinitionWriter.DATASOURCE_TAG, "type", dsname,
XmlWriterSupport.OPEN );
final DataSourceWriter dsWriter = new DataSourceWriter( getReportWriter(), ds, dsDesc, writer );
dsWriter.write();
writer.writeCloseTag();
} | void function( final String name ) throws IOException, ReportWriterException { if ( STR.equals( name ) == false ) { super.writeParameter( name ); return; } final DataSource ds = (DataSource) getObjectDescription().getParameter( name ); final ObjectDescription dsDesc = getParameterDescription( name ); final String dsname = dataSourceCollector.getDataSourceName( dsDesc ); if ( dsname == null ) { throw new ReportWriterException( STR + ds.getClass() ); } final XmlWriter writer = getXmlWriter(); writer.writeTag( ExtParserModule.NAMESPACE, AbstractXMLDefinitionWriter.DATASOURCE_TAG, "type", dsname, XmlWriterSupport.OPEN ); final DataSourceWriter dsWriter = new DataSourceWriter( getReportWriter(), ds, dsDesc, writer ); dsWriter.write(); writer.writeCloseTag(); } | /**
* Writes a parameter.
*
* @param name
* the name.
* @throws IOException
* if there is an I/O problem.
* @throws ReportWriterException
* if the report definition could not be written.
*/ | Writes a parameter | writeParameter | {
"repo_name": "mbatchelor/pentaho-reporting",
"path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/modules/parser/extwriter/DataSourceWriter.java",
"license": "lgpl-2.1",
"size": 3916
} | [
"java.io.IOException",
"org.pentaho.reporting.engine.classic.core.filter.DataSource",
"org.pentaho.reporting.engine.classic.core.modules.parser.ext.ExtParserModule",
"org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription",
"org.pentaho.reporting.libraries.xmlns.writer.XmlWriter",
"org.pentaho.reporting.libraries.xmlns.writer.XmlWriterSupport"
] | import java.io.IOException; import org.pentaho.reporting.engine.classic.core.filter.DataSource; import org.pentaho.reporting.engine.classic.core.modules.parser.ext.ExtParserModule; import org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription; import org.pentaho.reporting.libraries.xmlns.writer.XmlWriter; import org.pentaho.reporting.libraries.xmlns.writer.XmlWriterSupport; | import java.io.*; import org.pentaho.reporting.engine.classic.core.filter.*; import org.pentaho.reporting.engine.classic.core.modules.parser.ext.*; import org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.*; import org.pentaho.reporting.libraries.xmlns.writer.*; | [
"java.io",
"org.pentaho.reporting"
] | java.io; org.pentaho.reporting; | 2,764,812 |
protected ClientConnectionOperator createConnectionOperator(final SchemeRegistry schreg) {
return new DefaultClientConnectionOperator(schreg, this.dnsResolver);
} | ClientConnectionOperator function(final SchemeRegistry schreg) { return new DefaultClientConnectionOperator(schreg, this.dnsResolver); } | /**
* Hook for creating the connection operator.
* It is called by the constructor.
* Derived classes can override this method to change the
* instantiation of the operator.
* The default implementation here instantiates
* {@link DefaultClientConnectionOperator DefaultClientConnectionOperator}.
*
* @param schreg the scheme registry.
*
* @return the connection operator to use
*/ | Hook for creating the connection operator. It is called by the constructor. Derived classes can override this method to change the instantiation of the operator. The default implementation here instantiates <code>DefaultClientConnectionOperator DefaultClientConnectionOperator</code> | createConnectionOperator | {
"repo_name": "max3163/jmeter",
"path": "src/protocol/http/org/apache/jmeter/protocol/http/sampler/hc/JMeterPoolingClientConnectionManager.java",
"license": "apache-2.0",
"size": 14293
} | [
"org.apache.http.conn.ClientConnectionOperator",
"org.apache.http.conn.scheme.SchemeRegistry",
"org.apache.http.impl.conn.DefaultClientConnectionOperator"
] | import org.apache.http.conn.ClientConnectionOperator; import org.apache.http.conn.scheme.SchemeRegistry; import org.apache.http.impl.conn.DefaultClientConnectionOperator; | import org.apache.http.conn.*; import org.apache.http.conn.scheme.*; import org.apache.http.impl.conn.*; | [
"org.apache.http"
] | org.apache.http; | 2,025,077 |
public static void startPublicRoomsSearch(final String server, final String pattern, final ApiCallback<List<PublicRoom>> callback) {
Log.d(LOG_TAG, "## startPublicRoomsSearch() " + " : server " + server + " pattern " + pattern);
// on android, a request cannot be cancelled
// so define a key to detect if the request makes senses
mRequestKey = "startPublicRoomsSearch" + System.currentTimeMillis();
// init the parameters
mRequestServer = server;
mSearchedPattern = pattern;
mForwardPaginationToken = null;
launchPublicRoomsRequest(callback);
} | static void function(final String server, final String pattern, final ApiCallback<List<PublicRoom>> callback) { Log.d(LOG_TAG, STR + STR + server + STR + pattern); mRequestKey = STR + System.currentTimeMillis(); mRequestServer = server; mSearchedPattern = pattern; mForwardPaginationToken = null; launchPublicRoomsRequest(callback); } | /**
* Start a new public rooms search
* @param server set the server in which searches, null if any
* @param pattern the pattern to search
* @param callback the asynchronous callback
*/ | Start a new public rooms search | startPublicRoomsSearch | {
"repo_name": "noepitome/neon-android",
"path": "neon/src/main/java/im/neon/PublicRoomsManager.java",
"license": "apache-2.0",
"size": 10908
} | [
"java.util.List",
"org.matrix.androidsdk.rest.callback.ApiCallback",
"org.matrix.androidsdk.rest.model.PublicRoom",
"org.matrix.androidsdk.util.Log"
] | import java.util.List; import org.matrix.androidsdk.rest.callback.ApiCallback; import org.matrix.androidsdk.rest.model.PublicRoom; import org.matrix.androidsdk.util.Log; | import java.util.*; import org.matrix.androidsdk.rest.callback.*; import org.matrix.androidsdk.rest.model.*; import org.matrix.androidsdk.util.*; | [
"java.util",
"org.matrix.androidsdk"
] | java.util; org.matrix.androidsdk; | 675,834 |
@Override
public Iterator<Tuple> iterator(); | Iterator<Tuple> function(); | /**
* Iterate through the entire store
*
* @return an iterator
*/ | Iterate through the entire store | iterator | {
"repo_name": "linkedin/Cubert",
"path": "src/main/java/com/linkedin/cubert/utils/TupleStore.java",
"license": "apache-2.0",
"size": 2659
} | [
"java.util.Iterator",
"org.apache.pig.data.Tuple"
] | import java.util.Iterator; import org.apache.pig.data.Tuple; | import java.util.*; import org.apache.pig.data.*; | [
"java.util",
"org.apache.pig"
] | java.util; org.apache.pig; | 839,697 |
public int purgeExpired(GridCacheContext cctx,
IgniteInClosure2X<GridCacheEntryEx, GridCacheVersion> c,
int amount) throws IgniteCheckedException {
CacheDataStore delegate0 = init0(true);
if (delegate0 == null || pendingTree == null)
return 0;
GridDhtLocalPartition part = cctx.topology().localPartition(partId, AffinityTopologyVersion.NONE, false, false);
// Skip non-owned partitions.
if (part == null || part.state() != OWNING || pendingTree.size() == 0)
return 0;
cctx.shared().database().checkpointReadLock();
try {
if (!part.reserve())
return 0;
try {
if (part.state() != OWNING)
return 0;
long now = U.currentTimeMillis();
GridCursor<PendingRow> cur;
if (grp.sharedGroup())
cur = pendingTree.find(new PendingRow(cctx.cacheId()), new PendingRow(cctx.cacheId(), now, 0));
else
cur = pendingTree.find(null, new PendingRow(CU.UNDEFINED_CACHE_ID, now, 0));
if (!cur.next())
return 0;
GridCacheVersion obsoleteVer = null;
int cleared = 0;
do {
PendingRow row = cur.get();
if (amount != -1 && cleared > amount)
return cleared;
assert row.key != null && row.link != 0 && row.expireTime != 0 : row;
row.key.partition(partId);
if (pendingTree.removex(row)) {
if (obsoleteVer == null)
obsoleteVer = ctx.versions().next();
GridCacheEntryEx e1 = cctx.cache().entryEx(row.key);
if (e1 != null)
c.apply(e1, obsoleteVer);
}
cleared++;
}
while (cur.next());
return cleared;
}
finally {
part.release();
}
}
finally {
cctx.shared().database().checkpointReadUnlock();
}
} | int function(GridCacheContext cctx, IgniteInClosure2X<GridCacheEntryEx, GridCacheVersion> c, int amount) throws IgniteCheckedException { CacheDataStore delegate0 = init0(true); if (delegate0 == null pendingTree == null) return 0; GridDhtLocalPartition part = cctx.topology().localPartition(partId, AffinityTopologyVersion.NONE, false, false); if (part == null part.state() != OWNING pendingTree.size() == 0) return 0; cctx.shared().database().checkpointReadLock(); try { if (!part.reserve()) return 0; try { if (part.state() != OWNING) return 0; long now = U.currentTimeMillis(); GridCursor<PendingRow> cur; if (grp.sharedGroup()) cur = pendingTree.find(new PendingRow(cctx.cacheId()), new PendingRow(cctx.cacheId(), now, 0)); else cur = pendingTree.find(null, new PendingRow(CU.UNDEFINED_CACHE_ID, now, 0)); if (!cur.next()) return 0; GridCacheVersion obsoleteVer = null; int cleared = 0; do { PendingRow row = cur.get(); if (amount != -1 && cleared > amount) return cleared; assert row.key != null && row.link != 0 && row.expireTime != 0 : row; row.key.partition(partId); if (pendingTree.removex(row)) { if (obsoleteVer == null) obsoleteVer = ctx.versions().next(); GridCacheEntryEx e1 = cctx.cache().entryEx(row.key); if (e1 != null) c.apply(e1, obsoleteVer); } cleared++; } while (cur.next()); return cleared; } finally { part.release(); } } finally { cctx.shared().database().checkpointReadUnlock(); } } | /**
* Removes expired entries from data store.
*
* @param cctx Cache context.
* @param c Expiry closure that should be applied to expired entry. See {@link GridCacheTtlManager} for details.
* @param amount Limit of processed entries by single call, {@code -1} for no limit.
* @return {@code True} if unprocessed expired entries remains.
* @throws IgniteCheckedException If failed.
*/ | Removes expired entries from data store | purgeExpired | {
"repo_name": "voipp/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java",
"license": "apache-2.0",
"size": 66464
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion",
"org.apache.ignite.internal.processors.cache.GridCacheContext",
"org.apache.ignite.internal.processors.cache.GridCacheEntryEx",
"org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition",
"org.apache.ignite.internal.processors.cache.tree.PendingRow",
"org.apache.ignite.internal.processors.cache.version.GridCacheVersion",
"org.apache.ignite.internal.util.lang.GridCursor",
"org.apache.ignite.internal.util.lang.IgniteInClosure2X",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.GridCacheEntryEx; import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition; import org.apache.ignite.internal.processors.cache.tree.PendingRow; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.internal.util.lang.GridCursor; import org.apache.ignite.internal.util.lang.IgniteInClosure2X; import org.apache.ignite.internal.util.typedef.internal.U; | import org.apache.ignite.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.dht.*; import org.apache.ignite.internal.processors.cache.tree.*; import org.apache.ignite.internal.processors.cache.version.*; import org.apache.ignite.internal.util.lang.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,037,611 |
@Override
public Optional<Connection> getConnection(Class connectionKey) {
synchronized (connectionMap) {
return Optional.ofNullable(connectionMap.get(connectionKey));
}
} | Optional<Connection> function(Class connectionKey) { synchronized (connectionMap) { return Optional.ofNullable(connectionMap.get(connectionKey)); } } | /**
* Returns an respective Connection for a given ConnectionKey.
* <p>
* Since this Connection might not (yet) exist, it is wrapped in an Optional.
*
* @param connectionKey the Key for the Connection
* @return the Optional.of(connection for connectionKey)
*/ | Returns an respective Connection for a given ConnectionKey. Since this Connection might not (yet) exist, it is wrapped in an Optional | getConnection | {
"repo_name": "ThorbenKuck/NetCom2",
"path": "core/src/main/java/com/github/thorbenkuck/netcom2/network/shared/clients/NativeClient.java",
"license": "mit",
"size": 17264
} | [
"com.github.thorbenkuck.netcom2.network.shared.connections.Connection",
"java.util.Optional"
] | import com.github.thorbenkuck.netcom2.network.shared.connections.Connection; import java.util.Optional; | import com.github.thorbenkuck.netcom2.network.shared.connections.*; import java.util.*; | [
"com.github.thorbenkuck",
"java.util"
] | com.github.thorbenkuck; java.util; | 316,865 |
Block block = GenericBlockParse.parse(bytes);
return parse(block);
}
@ExternalValue
public static final String TYPE_META = "type"; | Block block = GenericBlockParse.parse(bytes); return parse(block); } public static final String TYPE_META = "type"; | /**
* Parse any block.
*
* @param bytes
* the block data.
* @return a {@link Block}.
*/ | Parse any block | parse | {
"repo_name": "sarah-happy/happy-archive",
"path": "archive/src/main/java/org/yi/happy/archive/block/parser/BlockParse.java",
"license": "apache-2.0",
"size": 1871
} | [
"org.yi.happy.archive.block.Block"
] | import org.yi.happy.archive.block.Block; | import org.yi.happy.archive.block.*; | [
"org.yi.happy"
] | org.yi.happy; | 994,600 |
protected PooledRPCClient borrowRpcClient(long now, PooledRPCClient rpcClient) throws RPCRequestException {
//we have a rpc client, lets set it up
//flag to see if we need to nullify
boolean setToNull = false;
try {
rpcClient.lock();
if (rpcClient.isReleased()) {
return null;
}
if (!rpcClient.isDiscarded() && !rpcClient.isInitialized()) {
//attempt to connect
rpcClient.connect();
}
if ((!rpcClient.isDiscarded()) && rpcClient.validate(PooledRPCClient.VALIDATE_BORROW)) {
//set the timestamp
rpcClient.setTimestamp(now);
if (getPoolProperties().isLogAbandoned()) {
//set the stack trace for this pool
rpcClient.setStackTrace(getThreadDump());
}
if (!busy.offer(rpcClient)) {
log.log(Level.FINE, "Channel doesn't fit into busy array, channel will not be traceable.");
}
return rpcClient;
}
//if we reached here, that means the rpc client
//is either has another principal, is discarded or validation failed.
//we will make one more attempt
//in order to guarantee that the thread that just acquired
//the rpc client shouldn't have to poll again.
try {
rpcClient.reconnect();
if (rpcClient.validate(PooledRPCClient.VALIDATE_INIT)) {
//set the timestamp
rpcClient.setTimestamp(now);
if (getPoolProperties().isLogAbandoned()) {
//set the stack trace for this pool
rpcClient.setStackTrace(getThreadDump());
}
if (!busy.offer(rpcClient)) {
log.log(Level.FINE, "Channel doesn't fit into busy array, channel will not be traceable.");
}
return rpcClient;
} else {
//validation failed.
release(rpcClient);
setToNull = true;
throw new RPCRequestException(Status.StatusType.ERROR, "Failed to validate a newly established channel.");
}
} catch (Exception x) {
release(rpcClient);
setToNull = true;
if (x instanceof RPCRequestException) {
throw (RPCRequestException) x;
} else {
RPCRequestException ex = new RPCRequestException(Status.StatusType.ERROR, x.getMessage());
ex.initCause(x);
throw ex;
}
}
} finally {
rpcClient.unlock();
if (setToNull) {
rpcClient = null;
}
}
} | PooledRPCClient function(long now, PooledRPCClient rpcClient) throws RPCRequestException { boolean setToNull = false; try { rpcClient.lock(); if (rpcClient.isReleased()) { return null; } if (!rpcClient.isDiscarded() && !rpcClient.isInitialized()) { rpcClient.connect(); } if ((!rpcClient.isDiscarded()) && rpcClient.validate(PooledRPCClient.VALIDATE_BORROW)) { rpcClient.setTimestamp(now); if (getPoolProperties().isLogAbandoned()) { rpcClient.setStackTrace(getThreadDump()); } if (!busy.offer(rpcClient)) { log.log(Level.FINE, STR); } return rpcClient; } try { rpcClient.reconnect(); if (rpcClient.validate(PooledRPCClient.VALIDATE_INIT)) { rpcClient.setTimestamp(now); if (getPoolProperties().isLogAbandoned()) { rpcClient.setStackTrace(getThreadDump()); } if (!busy.offer(rpcClient)) { log.log(Level.FINE, STR); } return rpcClient; } else { release(rpcClient); setToNull = true; throw new RPCRequestException(Status.StatusType.ERROR, STR); } } catch (Exception x) { release(rpcClient); setToNull = true; if (x instanceof RPCRequestException) { throw (RPCRequestException) x; } else { RPCRequestException ex = new RPCRequestException(Status.StatusType.ERROR, x.getMessage()); ex.initCause(x); throw ex; } } } finally { rpcClient.unlock(); if (setToNull) { rpcClient = null; } } } | /**
* Validates and configures a previously idle rpc client
*
* @param now - timestamp
* @param rpcClient - the rpc client to validate and configure
* @return ch
* @throws RPCRequestException if a validation error happens
*/ | Validates and configures a previously idle rpc client | borrowRpcClient | {
"repo_name": "richardfearn/diirt",
"path": "pvmanager/pvmanager-pva/src/main/java/org/diirt/service/pva/rpcservice/rpcclient/RPCClientPool.java",
"license": "mit",
"size": 29718
} | [
"java.util.logging.Level",
"org.epics.pvaccess.server.rpc.RPCRequestException",
"org.epics.pvdata.pv.Status"
] | import java.util.logging.Level; import org.epics.pvaccess.server.rpc.RPCRequestException; import org.epics.pvdata.pv.Status; | import java.util.logging.*; import org.epics.pvaccess.server.rpc.*; import org.epics.pvdata.pv.*; | [
"java.util",
"org.epics.pvaccess",
"org.epics.pvdata"
] | java.util; org.epics.pvaccess; org.epics.pvdata; | 118,126 |
protected void updateButtonDrawables() {
defaultPlayDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_play_arrow_white, R.color.exomedia_default_controls_button_selector);
defaultPauseDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_pause_white, R.color.exomedia_default_controls_button_selector);
playPauseButton.setImageDrawable(defaultPlayDrawable);
defaultPreviousDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_skip_previous_white, R.color.exomedia_default_controls_button_selector);
previousButton.setImageDrawable(defaultPreviousDrawable);
defaultNextDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_skip_next_white, R.color.exomedia_default_controls_button_selector);
nextButton.setImageDrawable(defaultNextDrawable);
} | void function() { defaultPlayDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_play_arrow_white, R.color.exomedia_default_controls_button_selector); defaultPauseDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_pause_white, R.color.exomedia_default_controls_button_selector); playPauseButton.setImageDrawable(defaultPlayDrawable); defaultPreviousDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_skip_previous_white, R.color.exomedia_default_controls_button_selector); previousButton.setImageDrawable(defaultPreviousDrawable); defaultNextDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_skip_next_white, R.color.exomedia_default_controls_button_selector); nextButton.setImageDrawable(defaultNextDrawable); } | /**
* Updates the drawables used for the buttons to AppCompatTintDrawables
*/ | Updates the drawables used for the buttons to AppCompatTintDrawables | updateButtonDrawables | {
"repo_name": "ayaseruri/luxunPro",
"path": "exoplayer/src/main/java/com/devbrackets/android/exomedia/ui/widget/VideoControls.java",
"license": "apache-2.0",
"size": 25171
} | [
"com.devbrackets.android.exomedia.util.EMResourceUtil"
] | import com.devbrackets.android.exomedia.util.EMResourceUtil; | import com.devbrackets.android.exomedia.util.*; | [
"com.devbrackets.android"
] | com.devbrackets.android; | 1,835,273 |
static final void addPassFactoryBefore(
List<PassFactory> factoryList, PassFactory factory, String passName) {
factoryList.add(
findPassIndexByName(factoryList, passName), factory);
} | static final void addPassFactoryBefore( List<PassFactory> factoryList, PassFactory factory, String passName) { factoryList.add( findPassIndexByName(factoryList, passName), factory); } | /**
* Insert the given pass factory before the factory of the given name.
*/ | Insert the given pass factory before the factory of the given name | addPassFactoryBefore | {
"repo_name": "mbrukman/closure-compiler",
"path": "src/com/google/javascript/jscomp/PassConfig.java",
"license": "apache-2.0",
"size": 9093
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 219,936 |
public void testInsertManyRowsAfterOneRowKey() throws SQLException
{
// Do a one-row insert into a table with an auto-generated key.
Statement s = createStatement();
s.execute("insert into t11_AutoGen(c11) values (99)");
int expected=1;
String sql="insert into t31_AutoGen(c31) values (99), (98), (97)";
s.execute(sql, Statement.RETURN_GENERATED_KEYS);
int keyval = getKeyValue (s.getGeneratedKeys());
assertEquals("Key value after s.execute()", expected, keyval);
s.executeUpdate(sql, Statement.RETURN_GENERATED_KEYS);
keyval = getKeyValue (s.getGeneratedKeys());
assertEquals("Key value after s.executeUpdate()", expected, keyval);
s.close();
PreparedStatement ps =
prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
ps.execute();
keyval = getKeyValue (ps.getGeneratedKeys());
assertEquals("Key value after ps.execute()", expected, keyval);
ps = prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
ps.executeUpdate();
keyval = getKeyValue (ps.getGeneratedKeys());
assertEquals("Key value after ps.executeUpdate()", expected, keyval);
ps.close();
} | void function() throws SQLException { Statement s = createStatement(); s.execute(STR); int expected=1; String sql=STR; s.execute(sql, Statement.RETURN_GENERATED_KEYS); int keyval = getKeyValue (s.getGeneratedKeys()); assertEquals(STR, expected, keyval); s.executeUpdate(sql, Statement.RETURN_GENERATED_KEYS); keyval = getKeyValue (s.getGeneratedKeys()); assertEquals(STR, expected, keyval); s.close(); PreparedStatement ps = prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); ps.execute(); keyval = getKeyValue (ps.getGeneratedKeys()); assertEquals(STR, expected, keyval); ps = prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); ps.executeUpdate(); keyval = getKeyValue (ps.getGeneratedKeys()); assertEquals(STR, expected, keyval); ps.close(); } | /**
* Requests generated keys for a multi-row insert statement after a
* one-row insert into a table with an auto-generated key.
* Old harness Test 7.
* Expected result: ResultSet has one row with a non-NULL key for the
* one-row insert.
* @throws SQLException
*/ | Requests generated keys for a multi-row insert statement after a one-row insert into a table with an auto-generated key. Old harness Test 7. Expected result: ResultSet has one row with a non-NULL key for the one-row insert | testInsertManyRowsAfterOneRowKey | {
"repo_name": "scnakandala/derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoGenJDBC30Test.java",
"license": "apache-2.0",
"size": 52987
} | [
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.sql.Statement"
] | import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 584,013 |
public Map<String, Object> getParametersMap() {
return parametersMap;
}
| Map<String, Object> function() { return parametersMap; } | /**
* Restituisce la mappa dei parametri associata all'utente.
*
* @return mappa dei parametri associata all'utente.
*/ | Restituisce la mappa dei parametri associata all'utente | getParametersMap | {
"repo_name": "MakeITBologna/zefiro",
"path": "zefiro/src/main/java/it/makeit/profiler/dao/UsersBaseBean.java",
"license": "agpl-3.0",
"size": 18664
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,032,893 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.