buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void render () {
Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1);
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
stage.act(Math.min(Gdx.graphics.getDeltaTime(), 1 / 30f));
stage.draw();
Table.drawDebug(stage);
float x = 40, y = 40;
BitmapFont font = skin.getResource("default-font", BitmapFont.class);
bat... | public void render () {
Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1);
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
stage.act(Math.min(Gdx.graphics.getDeltaTime(), 1 / 30f));
stage.draw();
Table.drawDebug(stage);
float x = 40, y = 40;
BitmapFont font = skin.getFont("default-font");
batch.begin();
font.dra... |
protected BoostFieldMapper(String name, String indexName, int precisionStep, float boost, FieldType fieldType, Boolean docValues, Float nullValue,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSe... | protected BoostFieldMapper(String name, String indexName, int precisionStep, float boost, FieldType fieldType, Boolean docValues, Float nullValue,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSe... |
public SizeFieldMapper(EnabledAttributeMapper enabled, FieldType fieldType, PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(Defaults.NAME), Defaults.PRECISION_STEP, ... | public SizeFieldMapper(EnabledAttributeMapper enabled, FieldType fieldType, PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(Defaults.NAME), Defaults.PRECISION_STEP, ... |
protected TTLFieldMapper(FieldType fieldType, EnabledAttributeMapper enabled, long defaultTTL, Explicit<Boolean> ignoreMalformed,
Explicit<Boolean> coerce, PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider,
@Nullable Settings fieldDataSettings, Settin... | protected TTLFieldMapper(FieldType fieldType, EnabledAttributeMapper enabled, long defaultTTL, Explicit<Boolean> ignoreMalformed,
Explicit<Boolean> coerce, PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider,
@Nullable Settings fieldDataSettings, Settin... |
protected TimestampFieldMapper(FieldType fieldType, Boolean docValues, EnabledAttributeMapper enabledState, String path,
FormatDateTimeFormatter dateTimeFormatter, boolean roundCeil,
Explicit<Boolean> ignoreMalformed,Explicit<Boolean> coerce, Pos... | protected TimestampFieldMapper(FieldType fieldType, Boolean docValues, EnabledAttributeMapper enabledState, String path,
FormatDateTimeFormatter dateTimeFormatter, boolean roundCeil,
Explicit<Boolean> ignoreMalformed,Explicit<Boolean> coerce, Pos... |
private String processLine(String s, BulkRequestBuilder bulk) {
Map<String, Object> map = null;
try {
map = XContentFactory.xContent(XContentType.JSON).createParser(s).mapAndClose();
} catch (IOException e) {
logger.warn("failed to parse {}", e, s);
return... | private String processLine(String s, BulkRequestBuilder bulk) {
Map<String, Object> map = null;
try {
map = XContentFactory.xContent(XContentType.JSON).createParser(s).mapAndClose();
} catch (IOException e) {
logger.warn("failed to parse {}", e, s);
return... |
public Object getItem(int position) {
switch (getAction(position)) {
case ACTION_GISTS:
return context.getString(string.gists);
case ACTION_DASHBOARD:
return context.getString(string.issue_dashboard);
case ACTION_FILTERS:
return context.getString(s... | public Object getItem(int position) {
switch (getAction(position)) {
case ACTION_GISTS:
return context.getString(string.gists);
case ACTION_DASHBOARD:
return context.getString(string.issue_dashboard);
case ACTION_FILTERS:
return context.getString(s... |
public static void main (String[] args) throws Exception {
new NativeCodeGenerator().generate("src/", "bin/", "jni/");
BuildConfig buildConfig = new BuildConfig("gdx-controllers-desktop");
String[] windowsSrc = {"*.cpp",
"ois-v1-4svn/src/*.cpp",
"ois-v1-4svn/src/win32/*.cpp"
};
String[] linuxSrc ... | public static void main (String[] args) throws Exception {
new NativeCodeGenerator().generate("src/", "bin/", "jni/");
BuildConfig buildConfig = new BuildConfig("gdx-controllers-desktop");
String[] windowsSrc = {"*.cpp",
"ois-v1-4svn/src/*.cpp",
"ois-v1-4svn/src/win32/*.cpp"
};
String[] linuxSrc ... |
public ByteArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return ByteArrayAtomicFieldData.EMPTY;
}
// TODO: how... | public ByteArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return ByteArrayAtomicFieldData.EMPTY;
}
// TODO: how... |
public ConcreteBytesRefAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return ConcreteBytesRefAtomicFieldData.empty(reader.maxDoc());
... | public ConcreteBytesRefAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return ConcreteBytesRefAtomicFieldData.empty(reader.maxDoc());
... |
public DoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return DoubleArrayAtomicFieldData.EMPTY;
}
// TODO:... | public DoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return DoubleArrayAtomicFieldData.EMPTY;
}
// TODO:... |
public FloatArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return FloatArrayAtomicFieldData.EMPTY;
}
// TODO: h... | public FloatArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return FloatArrayAtomicFieldData.EMPTY;
}
// TODO: h... |
public GeoPointDoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return GeoPointDoubleArrayAtomicFieldData.EMPTY;
}
... | public GeoPointDoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return GeoPointDoubleArrayAtomicFieldData.EMPTY;
}
... |
public IntArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return IntArrayAtomicFieldData.EMPTY;
}
// TODO: how c... | public IntArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return IntArrayAtomicFieldData.EMPTY;
}
// TODO: how c... |
public LongArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return LongArrayAtomicFieldData.EMPTY;
}
// TODO: how... | public LongArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return LongArrayAtomicFieldData.EMPTY;
}
// TODO: how... |
public PagedBytesAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return PagedBytesAtomicFieldData.empty(reader.maxDoc());
}
... | public PagedBytesAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return PagedBytesAtomicFieldData.empty(reader.maxDoc());
}
... |
public ShortArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return ShortArrayAtomicFieldData.EMPTY;
}
// TODO: h... | public ShortArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return ShortArrayAtomicFieldData.EMPTY;
}
// TODO: h... |
public EntryPriorityQueue(int size, Comparator<TermsFacet.Entry> comparator) {
initialize(size);
this.comparator = comparator;
}
| public EntryPriorityQueue(int size, Comparator<TermsFacet.Entry> comparator) {
super(size);
this.comparator = comparator;
}
|
public void layout () {
final NinePatch background = style.background;
final BitmapFont font = style.font;
prefHeight = background.getTotalHeight();
float max = 0;
for (int i = 0; i < entries.length; i++) {
max = Math.max(font.getBounds(entries[i]).width, max);
}
prefWidth = background.getLeftWidth()... | public void layout () {
final NinePatch background = style.background;
final BitmapFont font = style.font;
prefHeight = Math.max(font.getLineHeight() - font.getDescent(), background.getTotalHeight());
float max = 0;
for (int i = 0; i < entries.length; i++) {
max = Math.max(font.getBounds(entries[i]).widt... |
public String validateDynamicSetting(String dynamicSetting, String value) {
for (Map.Entry<String, Validator> setting : dynamicSettings.entrySet()) {
if (Regex.simpleMatch(dynamicSetting, setting.getKey())) {
return setting.getValue().validate(dynamicSetting, value);
... | public String validateDynamicSetting(String dynamicSetting, String value) {
for (Map.Entry<String, Validator> setting : dynamicSettings.entrySet()) {
if (Regex.simpleMatch(setting.getKey(), dynamicSetting)) {
return setting.getValue().validate(dynamicSetting, value);
... |
public void execute(RoutingAllocation allocation) throws ElasticSearchException {
DiscoveryNode discoNode = allocation.nodes().resolveNode(node);
MutableShardRouting shardRouting = null;
for (MutableShardRouting routing : allocation.routingNodes().unassigned()) {
if (routing.sha... | public void execute(RoutingAllocation allocation) throws ElasticSearchException {
DiscoveryNode discoNode = allocation.nodes().resolveNode(node);
MutableShardRouting shardRouting = null;
for (MutableShardRouting routing : allocation.routingNodes().unassigned()) {
if (routing.sha... |
private static double maxError(double distance) {
return distance / 10000.0;
}
| private static double maxError(double distance) {
return distance / 1000.0;
}
|
private void updateHeader(Issue issue) {
User assignee = issue.getAssignee();
if (assignee != null) {
assigneeText.setText(assignee.getLogin());
assigneeAvatar.setVisibility(VISIBLE);
avatarHelper.bind(assigneeAvatar, assignee);
} else {
assign... | private void updateHeader(Issue issue) {
User assignee = issue.getAssignee();
if (assignee != null) {
assigneeText.setText(assignee.getLogin());
assigneeAvatar.setVisibility(VISIBLE);
avatarHelper.bind(assigneeAvatar, assignee);
} else {
assign... |
protected void update(final int position, final FilterItemView view, final IssueFilter filter) {
avatars.bind(view.avatarView, filter.getRepository().getOwner());
view.repoText.setText(filter.getRepository().generateId());
if (filter.isOpen())
view.stateText.setText(string.open_i... | protected void update(final int position, final FilterItemView view, final IssueFilter filter) {
avatars.bind(view.avatarView, filter.getRepository().getOwner());
view.repoText.setText(filter.getRepository().generateId());
if (filter.isOpen())
view.stateText.setText(string.open_i... |
private void updateHeader(final Issue issue) {
titleText.setText(issue.getTitle());
bodyImageGetter.bind(bodyText, issue.getBodyHtml(), issue.getId());
StyledText text = new StyledText();
text.bold(issue.getUser().getLogin());
text.append(" opened ");
text.append(is... | private void updateHeader(final Issue issue) {
titleText.setText(issue.getTitle());
bodyImageGetter.bind(bodyText, issue.getBodyHtml(), issue.getId());
StyledText text = new StyledText();
text.bold(issue.getUser().getLogin());
text.append(" opened ");
text.append(is... |
private void updateFilterSummary() {
if (filter.isOpen())
state.setText(string.open_issues);
else
state.setText(string.closed_issues);
Collection<Label> filterLabels = filter.getLabels();
if (filterLabels != null && !filterLabels.isEmpty()) {
labe... | private void updateFilterSummary() {
if (filter.isOpen())
state.setText(string.open_issues);
else
state.setText(string.closed_issues);
Collection<Label> filterLabels = filter.getLabels();
if (filterLabels != null && !filterLabels.isEmpty()) {
Labe... |
public static BuildTarget newDefaultTarget(TargetOs type, boolean is64Bit) {
if(type == TargetOs.Windows && !is64Bit) {
// Windows 32-Bit
return new BuildTarget(TargetOs.Windows, false,
new String[] { "**/*.c" }, new String[0], new String[] { "**/*.cpp" }, new String[0], new String[0],
"i... | public static BuildTarget newDefaultTarget(TargetOs type, boolean is64Bit) {
if(type == TargetOs.Windows && !is64Bit) {
// Windows 32-Bit
return new BuildTarget(TargetOs.Windows, false,
new String[] { "**/*.c" }, new String[0], new String[] { "**/*.cpp" }, new String[0], new String[0],
"i... |
@Override public LogByteSizeMergePolicy newMergePolicy() {
CustomLogByteSizeMergePolicy mergePolicy;
if (asyncMerge) {
mergePolicy = new CustomLogByteSizeMergePolicy(this);
} else {
mergePolicy = new CustomLogByteSizeMergePolicy(this);
}
mergePolicy.se... | @Override public LogByteSizeMergePolicy newMergePolicy() {
CustomLogByteSizeMergePolicy mergePolicy;
if (asyncMerge) {
mergePolicy = new EnableMergeLogByteSizeMergePolicy(this);
} else {
mergePolicy = new CustomLogByteSizeMergePolicy(this);
}
mergePoli... |
@Override public void messageReceived(VoidStreamable stream, TransportChannel channel) throws Exception {
receiveSnapshotRecoveryThread = Thread.currentThread();
try {
indexShard.performRecoveryFinalization();
channel.sendResponse(VoidStreamable.INSTANCE);... | @Override public void messageReceived(VoidStreamable stream, TransportChannel channel) throws Exception {
receiveSnapshotRecoveryThread = Thread.currentThread();
try {
indexShard.performRecoveryFinalization(false);
channel.sendResponse(VoidStreamable.INSTA... |
private RecoveryStatus.Translog recoverTranslog() throws IndexShardGatewayRecoveryException {
final Map<String, StorageMetadata> allMetaDatas = listAllMetadatas(container, shardTranslogDirectory);
long latestTranslogId = -1;
for (String name : allMetaDatas.keySet()) {
String tra... | private RecoveryStatus.Translog recoverTranslog() throws IndexShardGatewayRecoveryException {
final Map<String, StorageMetadata> allMetaDatas = listAllMetadatas(container, shardTranslogDirectory);
long latestTranslogId = -1;
for (String name : allMetaDatas.keySet()) {
String tra... |
public void draw(SpriteBatch spriteBatch) {
spriteBatch.draw(font.texture, vertices, 0, idx);
}
| public void draw(SpriteBatch spriteBatch) {
spriteBatch.draw(font.getSprite().getTexture(), vertices, 0, idx);
}
|
public void create () {
batch = new SpriteBatch();
spriteSheet = new SpriteSheet(Gdx.files.internal("data/pack"), Gdx.files.internal("data"));
badlogic = spriteSheet.get("badlogicslice");
badlogicSmall = spriteSheet.get("badlogicsmall");
star = spriteSheet.get("particle-star");
badlogic.setPosition(50, 5... | public void create () {
batch = new SpriteBatch();
spriteSheet = new SpriteSheet(Gdx.files.internal("data"));
badlogic = spriteSheet.get("badlogicslice");
badlogicSmall = spriteSheet.get("badlogicsmall");
star = spriteSheet.get("particle-star");
badlogic.setPosition(50, 50);
badlogicSmall.setPosition(1... |
protected void doMerge(MergePolicy.OneMerge merge) throws IOException {
int totalNumDocs = merge.totalNumDocs();
long totalSizeInBytes = merge.totalBytesSize();
long time = System.currentTimeMillis();
currentMerges.inc();
currentMergesNumDocs.inc(totalNumDocs);
curren... | protected void doMerge(MergePolicy.OneMerge merge) throws IOException {
int totalNumDocs = merge.totalNumDocs();
long totalSizeInBytes = merge.estimatedMergeBytes;
long time = System.currentTimeMillis();
currentMerges.inc();
currentMergesNumDocs.inc(totalNumDocs);
cur... |
synchronized public void merge(IndexWriter writer) throws CorruptIndexException, IOException {
while (true) {
MergePolicy.OneMerge merge = writer.getNextMerge();
if (merge == null)
break;
// different from serial merge, call mergeInit here so we get the c... | synchronized public void merge(IndexWriter writer) throws CorruptIndexException, IOException {
while (true) {
MergePolicy.OneMerge merge = writer.getNextMerge();
if (merge == null)
break;
// different from serial merge, call mergeInit here so we get the c... |
public Texture (FileHandle file, Format format, boolean useMipMaps) {
if (file.name().endsWith(".etc1")) {
create(new ETC1TextureData(file, useMipMaps));
} else {
create(new FileTextureData(file, null, format, useMipMaps));
}
}
| public Texture (FileHandle file, Format format, boolean useMipMaps) {
if (file.name().contains(".etc1")) {
create(new ETC1TextureData(file, useMipMaps));
} else {
create(new FileTextureData(file, null, format, useMipMaps));
}
}
|
public void setViewport (float width, float height, boolean stretch) {
if (!stretch) {
if (width > height) {
float toDeviceSpace = Gdx.graphics.getHeight() / height;
float toViewportSpace = height / Gdx.graphics.getHeight();
float deviceWidth = width * toDeviceSpace;
this.width = width + (Gdx.gra... | public void setViewport (float width, float height, boolean stretch) {
if (!stretch) {
if (width > height && width/(float)Gdx.graphics.getWidth() <= height/(float)Gdx.graphics.getHeight()) {
float toDeviceSpace = Gdx.graphics.getHeight() / height;
float toViewportSpace = height / Gdx.graphics.getHeight();... |
public boolean isMono () {
return false;
}
| public boolean isMono () {
return channels == 1;
}
|
public void tick(Input input) {
if (!input.oldButtons[Input.ESCAPE] && input.buttons[Input.ESCAPE] || Gdx.input.isTouched()) {
setScreen(parent);
return;
}
if (delay>0) delay--;
if (delay==0 && input.buttons[Input.SHOOT] && !input.oldButtons[Input.SHOOT]) {
... | public void tick(Input input) {
if (!input.oldButtons[Input.ESCAPE] && input.buttons[Input.ESCAPE]) {
setScreen(parent);
return;
}
if (delay>0) delay--;
if (delay==0 && input.buttons[Input.SHOOT] && !input.oldButtons[Input.SHOOT]) {
setScreen(paren... |
public Quaternion setFromAxis(Vector3 axis, float angle) {
return setFromAxis(axis.z, axis.y, axis.z, angle);
}
| public Quaternion setFromAxis(Vector3 axis, float angle) {
return setFromAxis(axis.x, axis.y, axis.z, angle);
}
|
public void changeState (State<E> newState) {
// Keep a record of the previous state
previousState = currentState;
// Call the exit method of the existing state
if (currentState != null) currentState.exit(owner);
// Change state to the new state
currentState = newState;
// Call the entry method of the... | public void changeState (State<E> newState) {
// Keep a record of the previous state
previousState = currentState;
// Call the exit method of the existing state
if (currentState != null) currentState.exit(owner);
// Change state to the new state
currentState = newState;
// Call the entry method of the... |
public void display (GLAutoDrawable arg0) {
synchronized (this) {
if (!paused) {
updateTimes();
synchronized (((JoglApplication)Gdx.app).runnables) {
JoglApplication app = ((JoglApplication)Gdx.app);
app.executedRunnables.clear();
app.executedRunnables.addAll(app.runnables);
app.runnab... | public void display (GLAutoDrawable arg0) {
synchronized (this) {
if (!paused) {
updateTimes();
synchronized (((JoglApplication)Gdx.app).runnables) {
JoglApplication app = ((JoglApplication)Gdx.app);
app.executedRunnables.clear();
app.executedRunnables.addAll(app.runnables);
app.runnab... |
public OrgItemView(View view) {
super(view);
nameText = (TextView) view.findViewById(id.tv_org_name);
avatarView = (ImageView) view.findViewById(id.iv_gravatar);
}
| public OrgItemView(View view) {
super(view);
nameText = (TextView) view.findViewById(id.tv_org_name);
avatarView = (ImageView) view.findViewById(id.iv_avatar);
}
|
public CommentItemView(final View view) {
super(view);
bodyView = (TextView) view.findViewById(id.tv_comment_body);
bodyView.setMovementMethod(LinkMovementMethod.getInstance());
authorView = (TextView) view.findViewById(id.tv_comment_author);
dateView = (TextView) view.find... | public CommentItemView(final View view) {
super(view);
bodyView = (TextView) view.findViewById(id.tv_comment_body);
bodyView.setMovementMethod(LinkMovementMethod.getInstance());
authorView = (TextView) view.findViewById(id.tv_comment_author);
dateView = (TextView) view.find... |
public GistView(View view) {
super(view);
gistId = (TextView) view.findViewById(id.tv_gist_id);
title = (TextView) view.findViewById(id.tv_gist_title);
author = (TextView) view.findViewById(id.tv_gist_author);
created = (TextView) view.findViewById(id.tv_gist_creation);
... | public GistView(View view) {
super(view);
gistId = (TextView) view.findViewById(id.tv_gist_id);
title = (TextView) view.findViewById(id.tv_gist_title);
author = (TextView) view.findViewById(id.tv_gist_author);
created = (TextView) view.findViewById(id.tv_gist_creation);
... |
public DashboardIssueView(View view) {
super(view);
repoText = (TextView) view.findViewById(id.tv_issue_repo_name);
number = (TextView) view.findViewById(id.tv_issue_number);
numberPaintFlags = number.getPaintFlags();
title = (TextView) view.findViewById(id.tv_issue_title);
... | public DashboardIssueView(View view) {
super(view);
repoText = (TextView) view.findViewById(id.tv_issue_repo_name);
number = (TextView) view.findViewById(id.tv_issue_number);
numberPaintFlags = number.getPaintFlags();
title = (TextView) view.findViewById(id.tv_issue_title);
... |
public FilterItemView(final View view) {
super(view);
avatarView = (ImageView) view.findViewById(id.iv_gravatar);
repoText = (TextView) view.findViewById(id.tv_repo_name);
filterText = (TextView) view.findViewById(id.tv_filter_summary);
}
| public FilterItemView(final View view) {
super(view);
avatarView = (ImageView) view.findViewById(id.iv_avatar);
repoText = (TextView) view.findViewById(id.tv_repo_name);
filterText = (TextView) view.findViewById(id.tv_filter_summary);
}
|
public void onClick(View v) {
if (issue != null)
stateTask.confirm(STATE_OPEN.equals(issue.getState()));
}
});
titleText = (TextView) headerView.findViewById(id.tv_issue_title);
createdText = (TextView) headerView.findViewById(id.tv_is... | public void onClick(View v) {
if (issue != null)
stateTask.confirm(STATE_OPEN.equals(issue.getState()));
}
});
titleText = (TextView) headerView.findViewById(id.tv_issue_title);
createdText = (TextView) headerView.findViewById(id.tv_is... |
public RepositoryIssueItemView(View view) {
super(view);
number = (TextView) view.findViewById(id.tv_issue_number);
numberPaintFlags = number.getPaintFlags();
title = (TextView) view.findViewById(id.tv_issue_title);
avatar = (ImageView) view.findViewById(id.iv_gravatar);
... | public RepositoryIssueItemView(View view) {
super(view);
number = (TextView) view.findViewById(id.tv_issue_number);
numberPaintFlags = number.getPaintFlags();
title = (TextView) view.findViewById(id.tv_issue_title);
avatar = (ImageView) view.findViewById(id.iv_avatar);
... |
public NewsEventItemView(View view) {
super(view);
avatarView = (ImageView) view.findViewById(id.iv_gravatar);
eventText = (TextView) view.findViewById(id.tv_event);
iconText = (TextView) view.findViewById(id.tv_event_icon);
TypefaceUtils.setOctocons(iconText);
dat... | public NewsEventItemView(View view) {
super(view);
avatarView = (ImageView) view.findViewById(id.iv_avatar);
eventText = (TextView) view.findViewById(id.tv_event);
iconText = (TextView) view.findViewById(id.tv_event_icon);
TypefaceUtils.setOctocons(iconText);
dateT... |
public UserItemView(final View view) {
super(view);
avatarView = (ImageView) view.findViewById(id.iv_gravatar);
loginText = (TextView) view.findViewById(id.tv_login);
}
| public UserItemView(final View view) {
super(view);
avatarView = (ImageView) view.findViewById(id.iv_avatar);
loginText = (TextView) view.findViewById(id.tv_login);
}
|
public ExternalTestCluster(TransportAddress... transportAddresses) {
Settings clientSettings = ImmutableSettings.settingsBuilder()
.put("client.transport.ignore_cluster_name", true)
.put("node.mode", "network").build(); // we require network here!
// verify that the... | public ExternalTestCluster(TransportAddress... transportAddresses) {
Settings clientSettings = ImmutableSettings.settingsBuilder()
.put("client.transport.ignore_cluster_name", true)
.put("node.mode", "network").build(); // we require network here!
// verify that the... |
@Inject public CloudIndexGateway(Index index, @IndexSettings Settings indexSettings, ClusterName clusterName, CloudBlobStoreService blobStoreService, Gateway gateway) {
super(index, indexSettings);
this.blobStoreContext = blobStoreService.context();
this.gateway = gateway;
String lo... | @Inject public CloudIndexGateway(Index index, @IndexSettings Settings indexSettings, ClusterName clusterName, CloudBlobStoreService blobStoreService, Gateway gateway) {
super(index, indexSettings);
this.blobStoreContext = blobStoreService.context();
this.gateway = gateway;
String lo... |
public boolean apply(Object input) {
GetMappingsResponse response = lastResponse[0] = client().admin().indices().prepareGetMappings(index).setTypes(type).get();
ImmutableOpenMap<String, MappingMetaData> mappings = response.getMappings().get(index);
if (mapping... | public boolean apply(Object input) {
GetMappingsResponse response = lastResponse[0] = client().admin().indices().prepareGetMappings(index).setTypes(type).get();
ImmutableOpenMap<String, MappingMetaData> mappings = response.getMappings().get(index);
if (mapping... |
@Override public BufferFormat getBufferFormat () {
GLCapabilities caps = canvas.getChosenGLCapabilities();
return new BufferFormat(caps.getRedBits(), caps.getGreenBits(), caps.getBlueBits(), caps.getAlphaBits(), caps.getDepthBits(), caps.getStencilBits(), caps.getNumSamples());
}
| @Override public BufferFormat getBufferFormat () {
GLCapabilities caps = canvas.getChosenGLCapabilities();
return new BufferFormat(caps.getRedBits(), caps.getGreenBits(), caps.getBlueBits(), caps.getAlphaBits(), caps.getDepthBits(), caps.getStencilBits(), caps.getNumSamples(), false);
}
|
@Override public void render () {
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
batch.begin();
for(int i = 0; i < cavemen.length; i++) {
Caveman caveman = cavemen[i];
TextureRegion frame = caveman.headsLeft?
leftWalk.getKeyFrame(caveman.stateTime, true):
rightWalk.getKeyFrame(caveman.st... | @Override public void render () {
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
batch.begin();
for(int i = 0; i < cavemen.length; i++) {
Caveman caveman = cavemen[i];
TextureRegion frame = caveman.headsLeft?
leftWalk.getKeyFrame(caveman.stateTime, true):
right... |
@Override public void create () {
mesh = new Mesh(true, 4, 6,
new VertexAttribute(VertexAttributes.Usage.Position, 3,"a_Position"),
new VertexAttribute(VertexAttributes.Usage.TextureCoordinates, 2, "a_texCoords1"),
new VertexAttribute(VertexAttributes.Usage.TextureCoordinates, 2, "a_texC... | @Override public void create () {
mesh = new Mesh(true, 4, 6,
new VertexAttribute(VertexAttributes.Usage.Position, 3,"a_Position"),
new VertexAttribute(VertexAttributes.Usage.TextureCoordinates, 2, "a_texCoords1"),
new VertexAttribute(VertexAttributes.Usage.TextureCoordinates, 2, "a_texC... |
public void add(@Nullable String defaultIndex, @Nullable String defaultType, @Nullable String[] defaultFields, byte[] data, int from, int length) throws Exception {
XContentParser parser = XContentFactory.xContent(data, from, length).createParser(data, from, length);
try {
XContentParser... | public void add(@Nullable String defaultIndex, @Nullable String defaultType, @Nullable String[] defaultFields, byte[] data, int from, int length) throws Exception {
XContentParser parser = XContentFactory.xContent(data, from, length).createParser(data, from, length);
try {
XContentParser... |
public T[] ensureCapacity (int additionalCapacity) {
int sizeNeeded = size + additionalCapacity;
if (sizeNeeded >= items.length) resize(Math.max(8, sizeNeeded));
return items;
}
| public T[] ensureCapacity (int additionalCapacity) {
int sizeNeeded = size + additionalCapacity;
if (sizeNeeded > items.length) resize(Math.max(8, sizeNeeded));
return items;
}
|
public void initialize(Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis)
{
this.bodyA = bodyA;
this.bodyB = bodyB;
localAnchorA.set( bodyA.getLocalPoint( anchor ) );
localAnchorB.set( bodyB.getLocalPoint( anchor ) );
localAxis1.set(bodyA.getLocalVector( anchor ));
referenceAngle = bodyB.getAngle() - b... | public void initialize(Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis)
{
this.bodyA = bodyA;
this.bodyB = bodyB;
localAnchorA.set( bodyA.getLocalPoint( anchor ) );
localAnchorB.set( bodyB.getLocalPoint( anchor ) );
localAxis1.set(bodyA.getLocalVector( axis ));
referenceAngle = bodyB.getAngle() - bod... |
@Inject public BalancedSegmentMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeSize = componentSettings.getAsSize("min_merge_size", new SizeValue((long) LogByteSizeMerg... | @Inject public BalancedSegmentMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeSize = componentSettings.getAsSize("min_merge_size", new SizeValue((long) LogByteSizeMerg... |
@Inject public LogByteSizeMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeSize = componentSettings.getAsSize("min_merge_size", new SizeValue((long) LogByteSizeMergePol... | @Inject public LogByteSizeMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeSize = componentSettings.getAsSize("min_merge_size", new SizeValue((long) LogByteSizeMergePol... |
@Inject public LogDocMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeDocs = componentSettings.getAsInt("min_merge_docs", LogDocMergePolicy.DEFAULT_MIN_MERGE_DOCS);
... | @Inject public LogDocMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeDocs = componentSettings.getAsInt("min_merge_docs", LogDocMergePolicy.DEFAULT_MIN_MERGE_DOCS);
... |
public static void main (String[] argv) {
// this is only here for me to debug native code faster
new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image");
new SharedLib... | public static void main (String[] argv) {
// this is only here for me to debug native code faster
new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image");
new SharedLib... |
public IndexShardException(ShardId shardId, String msg, Throwable cause) {
super(shardId == null ? null : shardId.index(), false, "[" + shardId == null ? "_na" : shardId.id() + "] " + msg, cause);
this.shardId = shardId;
}
| public IndexShardException(ShardId shardId, String msg, Throwable cause) {
super(shardId == null ? null : shardId.index(), false, "[" + (shardId == null ? "_na" : shardId.id()) + "] " + msg, cause);
this.shardId = shardId;
}
|
public void dispatchRequest(final RestRequest request, final RestChannel channel) {
final RestHandler handler = getHandler(request);
if (handler == null) {
channel.sendResponse(new StringRestResponse(BAD_REQUEST, "No handler found for uri [" + request.uri() + "] and method [" + request.m... | public void dispatchRequest(final RestRequest request, final RestChannel channel) {
final RestHandler handler = getHandler(request);
if (handler == null) {
channel.sendResponse(new StringRestResponse(BAD_REQUEST, "No handler found for uri [" + request.uri() + "] and method [" + request.m... |
public ByteArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new ByteArrayAtomicFieldData.SingleFixedSet(new byte[1], 0, new... | public ByteArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return ByteArrayAtomicFieldData.EMPTY;
}
|
public DoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new DoubleArrayAtomicFieldData.SingleFixedSet(new double[1], ... | public DoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return DoubleArrayAtomicFieldData.EMPTY;
}
|
public FloatArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new FloatArrayAtomicFieldData.SingleFixedSet(new float[1], 0, ... | public FloatArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return FloatArrayAtomicFieldData.EMPTY;
}
|
public GeoPointDoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new GeoPointDoubleArrayAtomicFieldData.SingleFixedSet... | public GeoPointDoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return GeoPointDoubleArrayAtomicFieldData.EMPTY;
}
|
public IntArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new IntArrayAtomicFieldData.SingleFixedSet(new int[1], 0, new Fi... | public IntArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return IntArrayAtomicFieldData.EMPTY;
}
|
public LongArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new LongArrayAtomicFieldData.SingleFixedSet(new long[1], 0, new... | public LongArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return LongArrayAtomicFieldData.EMPTY;
}
|
public ShortArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new ShortArrayAtomicFieldData.SingleFixedSet(new short[1], 0, ... | public ShortArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return ShortArrayAtomicFieldData.EMPTY;
}
|
private boolean reroute(RoutingNodes routingNodes, DiscoveryNodes nodes) {
Iterable<DiscoveryNode> dataNodes = nodes.dataNodes().values();
boolean changed = false;
// first, clear from the shards any node id they used to belong to that is now dead
changed |= deassociateDeadNodes(rou... | private boolean reroute(RoutingNodes routingNodes, DiscoveryNodes nodes) {
Iterable<DiscoveryNode> dataNodes = nodes.dataNodes().values();
boolean changed = false;
// first, clear from the shards any node id they used to belong to that is now dead
changed |= deassociateDeadNodes(rou... |
@Override public void run() {
holderToNotify.handler().handleException(new NodeDisconnectedTransportException(node, holderToNotify.action()));
}
});
... | @Override public void run() {
holderToNotify.handler().handleException(new NodeDisconnectedException(node, holderToNotify.action()));
}
});
}
... |
public void run() {
boolean restartWithWrapper = false;
if (System.getProperty("elasticsearch-service") != null) {
try {
Class wrapperManager = settings.getClassLoader().loadClass("org.tanukisoftware.wrapper.WrapperManager");
... | public void run() {
boolean restartWithWrapper = false;
if (System.getProperty("elasticsearch-service") != null) {
try {
Class wrapperManager = settings.getClassLoader().loadClass("org.tanukisoftware.wrapper.WrapperManager");
... |
public void run() {
try {
Thread.sleep(delay.millis());
} catch (InterruptedException e) {
// ignore
}
if (!request.exit) {
logger.info("initiating requ... | public void run() {
try {
Thread.sleep(delay.millis());
} catch (InterruptedException e) {
// ignore
}
if (!request.exit) {
logger.info("initiating requ... |
public static byte[] decode(String s, int options) throws java.io.IOException {
if (s == null) {
throw new NullPointerException("Input string was null.");
} // end if
byte[] bytes = s.getBytes(PREFERRED_ENCODING);
//</change>
// Decode
bytes = decode(... | public static byte[] decode(String s, int options) throws java.io.IOException {
if (s == null) {
throw new NullPointerException("Input string was null.");
} // end if
byte[] bytes = s.getBytes(PREFERRED_ENCODING);
//</change>
// Decode
bytes = decode(... |
public static Clipboard getDefaultClipboard () {
if (Gdx.app.getType() == ApplicationType.Android)
return new AndroidClipboard();
else {
try {
return (Clipboard)(Class.forName("com.badlogic.gdx.scenes.scene2d.ui.utils.DesktopClipboard").newInstance());
} catch (Exception e) {
throw new GdxRuntimeE... | public static Clipboard getDefaultClipboard () {
if (Gdx.app.getType() == ApplicationType.Android)
return new AndroidClipboard();
else {
try {
return (Clipboard)Class.forName("com.badlogic.gdx.scenes.scene2d.ui.utils.DesktopClipboard").newInstance();
} catch (Exception e) {
throw new GdxRuntimeExc... |
public void create () {
stage = new Stage(0, 0, false);
font = new BitmapFont();
Gdx.input.setInputProcessor(stage);
Gdx.graphics.setVSync(false);
container = new Table();
stage.addActor(container);
container.getTableLayout().debug();
Table table = new Table();
FlickScrollPane scroll = new FlickS... | public void create () {
stage = new Stage(0, 0, false);
font = new BitmapFont();
Gdx.input.setInputProcessor(stage);
Gdx.graphics.setVSync(false);
container = new Table();
stage.addActor(container);
container.getTableLayout().debug();
Table table = new Table();
FlickScrollPane scroll = new FlickS... |
public boolean touchDown (int x, int y, int pointer, int button) {
Vector2 current = getCurrentPosition();
position.set(current);
targetPosition.set(x - 10, Gdx.graphics.getHeight() - y - 10);
timer = 0;
return true;
}
}));
root = new Table();
stage.addActor(root);
root.pad(10).top().... | public boolean touchDown (int x, int y, int pointer, int button) {
Vector2 current = getCurrentPosition();
position.set(current);
targetPosition.set(x - 10, Gdx.graphics.getHeight() - y - 10);
timer = 0;
return true;
}
}));
root = new Table();
stage.addActor(root);
root.pad(10).top().... |
public void setCursorPosition (int x, int y) {
Mouse.setCursorPosition(x, y - 1);
}
| public void setCursorPosition (int x, int y) {
Mouse.setCursorPosition(x, Gdx.graphics.getHeight() - 1 - y);
}
|
public Color getColor () {
int intBits = NumberUtils.floatToIntColor(color);
Color color = this.tempColor;
color.r = (intBits & 0xff) / 255f;
color.g = ((intBits >>> 8) & 0xff) / 255f;
color.b = ((intBits >>> 16) & 0xff) / 255f;
color.a = ((intBits >>> 24) & 0xff) / 255f;
return color;
}
| public Color getColor () {
int intBits = NumberUtils.floatToIntColor(color);
Color color = tempColor;
color.r = (intBits & 0xff) / 255f;
color.g = ((intBits >>> 8) & 0xff) / 255f;
color.b = ((intBits >>> 16) & 0xff) / 255f;
color.a = ((intBits >>> 24) & 0xff) / 255f;
return color;
}
|
protected void drawBackground (Batch batch, float parentAlpha) {
float x = getX(), y = getY();
float width = getWidth(), height = getHeight();
float padTop = getPadTop();
if (style.stageBackground != null) {
Color color = getColor();
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
S... | protected void drawBackground (Batch batch, float parentAlpha) {
float x = getX(), y = getY();
float width = getWidth(), height = getHeight();
float padTop = getPadTop();
if (style.stageBackground != null) {
Color color = getColor();
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
S... |
private void renderSingleLineCached () {
String text = "Single Line Cached";
float x = logoSprite.getX();
float y = logoSprite.getY();
float width = logoSprite.getWidth();
float height = logoSprite.getHeight();
// Obviously you wouldn't set the cache text every frame in real code.
TextBounds bounds = ca... | private void renderSingleLineCached () {
String text = "Single Line Cached";
float x = logoSprite.getX();
float y = logoSprite.getY();
float width = logoSprite.getWidth();
float height = logoSprite.getHeight();
// Obviously you wouldn't set the cache text every frame in real code.
TextBounds bounds = ca... |
protected GetResponse shardOperation(GetRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
if (request.refresh() && !request.realtime()) {
... | protected GetResponse shardOperation(GetRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
if (request.refresh() && !request.realtime()) {
... |
public void testRandomSorting() throws ElasticSearchException, IOException, InterruptedException, ExecutionException {
int numberOfShards = between(1, 10);
Random random = getRandom();
prepareCreate("test")
.setSettings(randomSettingsBuilder().put("index.number_of_shards", nu... | public void testRandomSorting() throws ElasticSearchException, IOException, InterruptedException, ExecutionException {
int numberOfShards = between(1, 10);
Random random = getRandom();
prepareCreate("test")
.setSettings(randomSettingsBuilder().put("index.number_of_shards", nu... |
public void doXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(TextQueryParser.NAME);
builder.startObject(name);
builder.field("query", text);
if (type != null) {
builder.field("type", type.toString().toLowerCase());
}
... | public void doXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(TextQueryParser.NAME);
builder.startObject(name);
builder.field("query", text);
if (type != null) {
builder.field("type", type.toString().toLowerCase(Locale.ENGLISH));... |
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.gists);
setTitle(getString(string.gists_title));
gists = (GistsFragment) getSupportFragmentManager().findFragmentById(R.id.list);
if (gists == null) {
g... | protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.gists);
setTitle(string.gists_title);
gists = (GistsFragment) getSupportFragmentManager().findFragmentById(R.id.list);
if (gists == null) {
gists = new ... |
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(getString(string.saved_filters_title));
setContentView(layout.issue_filter_list);
}
| protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(string.saved_filters_title);
setContentView(layout.issue_filter_list);
}
|
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.issue_dashboard);
setTitle(getString(string.dashboard_issues_title));
pager.setAdapter(new IssueDashboardPagerAdapter(getApplicationContext(), getSupportFragmentManager())... | protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.issue_dashboard);
setTitle(string.dashboard_issues_title);
pager.setAdapter(new IssueDashboardPagerAdapter(getApplicationContext(), getSupportFragmentManager()));
... |
public static void main (String[] args) throws Exception {
new NativeCodeGenerator().generate("src/", "bin/", "jni/");
BuildConfig buildConfig = new BuildConfig("gdx-controllers-desktop");
String[] windowsSrc = {"*.cpp",
"ois-v1-4svn/src/*.cpp",
"ois-v1-4svn/src/win32/*.cpp"
};
String[] linuxSrc ... | public static void main (String[] args) throws Exception {
new NativeCodeGenerator().generate("src/", "bin/", "jni/");
BuildConfig buildConfig = new BuildConfig("gdx-controllers-desktop");
String[] windowsSrc = {"*.cpp",
"ois-v1-4svn/src/*.cpp",
"ois-v1-4svn/src/win32/*.cpp"
};
String[] linuxSrc ... |
public FilterFacetCollector(String facetName, Filter filter, FilterCache filterCache) {
super(facetName);
this.filter = filterCache.cache(filter);
}
| public FilterFacetCollector(String facetName, Filter filter, FilterCache filterCache) {
super(facetName);
this.filter = filter;
}
|
@Override public void forEachOrdinalInDoc(int docId, OrdinalInDocProc proc) {
boolean found = false;
for (int[] ordinal : ordinals) {
int loc = ordinal[docId];
if (loc != 0) {
found = true;
proc.onOrdinal(docId, ordinal[docId]);
}
... | @Override public void forEachOrdinalInDoc(int docId, OrdinalInDocProc proc) {
boolean found = false;
for (int[] ordinal : ordinals) {
int loc = ordinal[docId];
if (loc != 0) {
found = true;
proc.onOrdinal(docId, loc);
}
}
... |
public void testPartiallyUnmappedField() throws ElasticSearchException, IOException {
client().admin().indices().prepareCreate("mapped_idx")
.setSettings(getSettings())
.addMapping("type", jsonBuilder().startObject().startObject("type").startObject("properties")
... | public void testPartiallyUnmappedField() throws ElasticSearchException, IOException {
client().admin().indices().prepareCreate("mapped_idx")
.setSettings(getSettings())
.addMapping("type", jsonBuilder().startObject().startObject("type").startObject("properties")
... |
public void setIndices (short[] indices, int offset, int count) {
isDirty = true;
buffer.clear();
buffer.put(indices, offset, count);
buffer.flip();
byteBuffer.position(0);
byteBuffer.limit(count << 1);
if (isBound) {
if (Gdx.gl11 != null) {
GL11 gl = Gdx.gl11;
gl.glBufferData(GL11.GL_ELEMENT... | public void setIndices (short[] indices, int offset, int count) {
isDirty = true;
buffer.clear();
buffer.put(indices, offset, count);
buffer.flip();
byteBuffer.position(0);
byteBuffer.limit(count << 1);
if (isBound) {
if (Gdx.gl11 != null) {
GL11 gl = Gdx.gl11;
gl.glBufferData(GL11.GL_ELEMENT... |
private final static String neighbor(String geohash, int level, int dx, int dy) {
int cell = decode(geohash.charAt(level - 1));
// Decoding the Geohash bit pattern to determine grid coordinates
int x0 = cell & 1; // first bit of x
int y0 = cell & 2; // first bit of y
int x... | private final static String neighbor(String geohash, int level, int dx, int dy) {
int cell = decode(geohash.charAt(level - 1));
// Decoding the Geohash bit pattern to determine grid coordinates
int x0 = cell & 1; // first bit of x
int y0 = cell & 2; // first bit of y
int x... |
protected SourceFieldMapper(String name, boolean enabled, Boolean compress, long compressThreshold) {
super(new Names(name, name, name, name), Defaults.INDEX, Defaults.STORE, Defaults.TERM_VECTOR, Defaults.BOOST,
Defaults.OMIT_NORMS, Defaults.OMIT_TERM_FREQ_AND_POSITIONS, Lucene.KEYWORD_ANAL... | protected SourceFieldMapper(String name, boolean enabled, Boolean compress, long compressThreshold) {
super(new Names(name, name, name, name), Defaults.INDEX, Defaults.STORE, Defaults.TERM_VECTOR, Defaults.BOOST,
Defaults.OMIT_NORMS, Defaults.OMIT_TERM_FREQ_AND_POSITIONS, Lucene.KEYWORD_ANAL... |
public OpenALAudio () {
this(16, 512, 9);
}
| public OpenALAudio () {
this(16, 9, 512);
}
|
public void testBulkIndexingWhileInitializing() throws Exception {
int replica = randomInt(2);
cluster().ensureAtLeastNumNodes(1 + replica);
assertAcked(prepareCreate("test").setSettings(
ImmutableSettings.builder()
.put(indexSettings())
... | public void testBulkIndexingWhileInitializing() throws Exception {
int replica = randomInt(2);
cluster().ensureAtLeastNumDataNodes(1 + replica);
assertAcked(prepareCreate("test").setSettings(
ImmutableSettings.builder()
.put(indexSettings())
... |
public void testSimpleStats() throws Exception {
// clear all stats first
client().admin().indices().prepareStats().clear().execute().actionGet();
final int numNodes = immutableCluster().dataNodes();
assertThat(numNodes, greaterThanOrEqualTo(2));
final int shardsIdx1 = random... | public void testSimpleStats() throws Exception {
// clear all stats first
client().admin().indices().prepareStats().clear().execute().actionGet();
final int numNodes = immutableCluster().numDataNodes();
assertThat(numNodes, greaterThanOrEqualTo(2));
final int shardsIdx1 = ran... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.