before stringlengths 12 3.21M | after stringlengths 41 3.21M | repo stringlengths 1 56 | type stringclasses 1
value | __index_level_0__ int64 0 442k |
|---|---|---|---|---|
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mToolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(mToolbar);
} | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
<DeepExtract>
mToolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(mToolbar);
</DeepExtract>
} | AndroidDemoProjects | positive | 5,256 |
final public void ModifierList(List<Double> list) throws ParseException {
Token sign = null, digitsBefore = null, digitsAfter = null;
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case SIGN:
sign = jj_consume_token(SIGN);
break;
default:
jj_la1[17] = jj_gen;
;
}
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case DIGITS:
... | final public void ModifierList(List<Double> list) throws ParseException {
<DeepExtract>
Token sign = null, digitsBefore = null, digitsAfter = null;
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case SIGN:
sign = jj_consume_token(SIGN);
break;
default:
jj_la1[17] = jj_gen;
;
}
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {... | Visolate | positive | 5,257 |
private void createModel(ExperimentState experimentState, GeppettoModel gm) throws GeppettoVisitingException, GeppettoInitializationException {
VariableValue vv = GeppettoFactory.eINSTANCE.createVariableValue();
Pointer p = ValuesFactory.eINSTANCE.createPointer();
String varName, typeName;
StringTokenizer st = new Stri... | private void createModel(ExperimentState experimentState, GeppettoModel gm) throws GeppettoVisitingException, GeppettoInitializationException {
VariableValue vv = GeppettoFactory.eINSTANCE.createVariableValue();
Pointer p = ValuesFactory.eINSTANCE.createPointer();
String varName, typeName;
StringTokenizer st = new Stri... | org.geppetto.core | positive | 5,258 |
@Override
public String getContentType() {
int index = resourceURL_.lastIndexOf('.');
String mimeType = MimeTypes.getMimeType(index == -1 ? null : resourceURL_.substring(index));
return mimeType == null ? MIME_APPLICATION_OCTET_STREAM : mimeType;
} | @Override
public String getContentType() {
int index = resourceURL_.lastIndexOf('.');
<DeepExtract>
String mimeType = MimeTypes.getMimeType(index == -1 ? null : resourceURL_.substring(index));
return mimeType == null ? MIME_APPLICATION_OCTET_STREAM : mimeType;
</DeepExtract>
} | DJ-Sweet | positive | 5,259 |
public void run() {
if (Constants.IS_LOGGABLE) {
Log.v(Constants.LOG_TAG, String.format("Requested opt-out state is %b", Boolean.valueOf(isOptingOut)));
}
if (isOptedOut(mProvider, mApiKey) == isOptingOut) {
return;
}
if (null == getOpenSessionId(mProvider)) {
open(true, null);
tagEvent(isOptingOut ? OPT_OUT_EVENT : OP... | public void run() {
<DeepExtract>
if (Constants.IS_LOGGABLE) {
Log.v(Constants.LOG_TAG, String.format("Requested opt-out state is %b", Boolean.valueOf(isOptingOut)));
}
if (isOptedOut(mProvider, mApiKey) == isOptingOut) {
return;
}
if (null == getOpenSessionId(mProvider)) {
open(true, null);
tagEvent(isOptingOut ? OPT_... | Beats | positive | 5,260 |
public Criteria andField_tinyint4NotEqualToColumn(TestEntity.Column column) {
if (new StringBuilder("field_tinyint4 <> ").append(column.getEscapedColumnName()).toString() == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(new StringBuilder("field_tinyint4 <> ").app... | public Criteria andField_tinyint4NotEqualToColumn(TestEntity.Column column) {
<DeepExtract>
if (new StringBuilder("field_tinyint4 <> ").append(column.getEscapedColumnName()).toString() == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(new StringBuilder("field_tiny... | mybatis-generator-gui-extension | positive | 5,261 |
@Override
public void onSessionResumed(CastSession castSession, boolean b) {
Log.i("cast", "resumed " + b);
if (listener != null)
listener.onConnected(castSession);
} | @Override
public void onSessionResumed(CastSession castSession, boolean b) {
Log.i("cast", "resumed " + b);
<DeepExtract>
if (listener != null)
listener.onConnected(castSession);
</DeepExtract>
} | player_sdk_android | positive | 5,262 |
public static String format2Decimals(String str) {
DecimalFormat df = new DecimalFormat("0.00");
return df.format(stringToDouble(str));
} | public static String format2Decimals(String str) {
<DeepExtract>
DecimalFormat df = new DecimalFormat("0.00");
return df.format(stringToDouble(str));
</DeepExtract>
} | MyBaseProject | positive | 5,263 |
public Builder green() {
this.currentColor = FontColor.GREEN;
if (currentColor != FontColor.NONE)
append(FontColor.GREEN.prefix);
return get();
} | public Builder green() {
<DeepExtract>
this.currentColor = FontColor.GREEN;
if (currentColor != FontColor.NONE)
append(FontColor.GREEN.prefix);
return get();
</DeepExtract>
} | script-api | positive | 5,264 |
@Override
public void onInitialized() {
super.onInitialized();
mHue = mHue;
float hueAdjust = (mHue % 360.0f) * (float) Math.PI / 180.0f;
setFloat(mHueLocation, hueAdjust);
} | @Override
public void onInitialized() {
super.onInitialized();
<DeepExtract>
mHue = mHue;
float hueAdjust = (mHue % 360.0f) * (float) Math.PI / 180.0f;
setFloat(mHueLocation, hueAdjust);
</DeepExtract>
} | PhotoEditDemo | positive | 5,265 |
public void settingsWarningDialogOk() {
mHasLoggingInfo = true;
mContext.sendBroadcast(newLoggingBroadcast(LoggingEvents.VoiceIme.SETTINGS_WARNING_DIALOG_OK));
} | public void settingsWarningDialogOk() {
<DeepExtract>
mHasLoggingInfo = true;
</DeepExtract>
mContext.sendBroadcast(newLoggingBroadcast(LoggingEvents.VoiceIme.SETTINGS_WARNING_DIALOG_OK));
} | Gingerbread-Keyboard | positive | 5,266 |
private boolean generateSVGFile(String dotFilePath, String svgFilePath, short prg) {
String[] cmdArray = new String[(cfgMngr.FORCE_SILENT) ? 7 : 6];
switch(prg) {
case DOT_PROGRAM:
{
cmdArray[0] = ConfigManager.m_DotPath.toString();
}
case NEATO_PROGRAM:
{
cmdArray[0] = ConfigManager.m_NeatoPath.toString();
}
case TWOP... | private boolean generateSVGFile(String dotFilePath, String svgFilePath, short prg) {
String[] cmdArray = new String[(cfgMngr.FORCE_SILENT) ? 7 : 6];
<DeepExtract>
switch(prg) {
case DOT_PROGRAM:
{
cmdArray[0] = ConfigManager.m_DotPath.toString();
}
case NEATO_PROGRAM:
{
cmdArray[0] = ConfigManager.m_NeatoPath.toString(... | LLFI | positive | 5,267 |
public void start() throws IOException {
this.server.start();
for (Map.Entry<HodorRaftGroup, HodorRaftStateMachine> stateMachineEntry : raftOptions.getStateMachineMap().entrySet()) {
final RaftGroup raftGroup = stateMachineEntry.getKey().getRaftGroup();
try (final RaftClient raftClient = RaftUtils.createClient(raftGrou... | public void start() throws IOException {
this.server.start();
<DeepExtract>
for (Map.Entry<HodorRaftGroup, HodorRaftStateMachine> stateMachineEntry : raftOptions.getStateMachineMap().entrySet()) {
final RaftGroup raftGroup = stateMachineEntry.getKey().getRaftGroup();
try (final RaftClient raftClient = RaftUtils.createC... | hodor | positive | 5,268 |
public void setIntValue(Key<Integer> key, int v) {
integerRegisters.put(key, v);
if (pending) {
return;
}
pending = true;
ThreadUtils.get().schedule(() -> {
pending = false;
try {
doSave();
} catch (Exception e) {
Logger.error("saving config failed", e);
}
}, 1, TimeUnit.SECONDS);
} | public void setIntValue(Key<Integer> key, int v) {
integerRegisters.put(key, v);
<DeepExtract>
if (pending) {
return;
}
pending = true;
ThreadUtils.get().schedule(() -> {
pending = false;
try {
doSave();
} catch (Exception e) {
Logger.error("saving config failed", e);
}
}, 1, TimeUnit.SECONDS);
</DeepExtract>
} | Chara | positive | 5,269 |
public static void showShortToast(Context context, int resId, Object... args) {
showToast(context, String.format(context.getResources().getString(resId), args), Toast.LENGTH_SHORT);
} | public static void showShortToast(Context context, int resId, Object... args) {
<DeepExtract>
showToast(context, String.format(context.getResources().getString(resId), args), Toast.LENGTH_SHORT);
</DeepExtract>
} | HeavenlyModule | positive | 5,270 |
public static void main(String[] args) throws IOException {
while (true) {
int wait = selector.select();
if (wait == 0)
continue;
Set<SelectionKey> keys = selector.selectedKeys();
Iterator<SelectionKey> iterator = keys.iterator();
while (iterator.hasNext()) {
SelectionKey key = (SelectionKey) iterator.next();
iterator.... | public static void main(String[] args) throws IOException {
<DeepExtract>
while (true) {
int wait = selector.select();
if (wait == 0)
continue;
Set<SelectionKey> keys = selector.selectedKeys();
Iterator<SelectionKey> iterator = keys.iterator();
while (iterator.hasNext()) {
SelectionKey key = (SelectionKey) iterator.nex... | gupao-tom | positive | 5,271 |
@Override
public Writable serialize(Object obj, ObjectInspector objInspector) throws SerDeException {
final StructObjectInspector outputRowOI = (StructObjectInspector) objInspector;
final List<? extends StructField> outputFieldRefs = outputRowOI.getAllStructFieldRefs();
if (outputFieldRefs.size() != numCols) {
throw ne... | @Override
public Writable serialize(Object obj, ObjectInspector objInspector) throws SerDeException {
final StructObjectInspector outputRowOI = (StructObjectInspector) objInspector;
final List<? extends StructField> outputFieldRefs = outputRowOI.getAllStructFieldRefs();
if (outputFieldRefs.size() != numCols) {
throw ne... | ides | positive | 5,272 |
@Test
public void testFailsSyntaxAndSchemeValidation() {
assertFailsValidation(new IterableStringBean(ImmutableList.of("ftp://1.2.3.4/path|dummy")), "values", "Invalid URIs: Invalid syntax: ftp://1.2.3.4/path|dummy", ValidUri.class);
} | @Test
public void testFailsSyntaxAndSchemeValidation() {
<DeepExtract>
assertFailsValidation(new IterableStringBean(ImmutableList.of("ftp://1.2.3.4/path|dummy")), "values", "Invalid URIs: Invalid syntax: ftp://1.2.3.4/path|dummy", ValidUri.class);
</DeepExtract>
} | event-collector | positive | 5,273 |
public void typeInWysiwyg(String text) {
WebDriver driver = getDriver();
String windowHandle = driver.getWindowHandle();
try {
WebElement iframe = driver.findElement(By.className("mceEditorIframe"));
driver.switchTo().frame(iframe).switchTo().activeElement().sendKeys(text);
} finally {
driver.switchTo().window(windowHa... | public void typeInWysiwyg(String text) {
<DeepExtract>
WebDriver driver = getDriver();
String windowHandle = driver.getWindowHandle();
try {
WebElement iframe = driver.findElement(By.className("mceEditorIframe"));
driver.switchTo().frame(iframe).switchTo().activeElement().sendKeys(text);
} finally {
driver.switchTo().w... | xwiki-enterprise | positive | 5,274 |
public void setState(TristateState state) {
this.state = state;
super.setSelected(state != TristateState.DESELECTED);
super.setArmed(state == TristateState.INDETERMINATE);
super.setPressed(state == TristateState.INDETERMINATE);
if (state == TristateState.INDETERMINATE && isEnabled()) {
fireStateChanged();
int indetermi... | public void setState(TristateState state) {
this.state = state;
<DeepExtract>
super.setSelected(state != TristateState.DESELECTED);
super.setArmed(state == TristateState.INDETERMINATE);
super.setPressed(state == TristateState.INDETERMINATE);
</DeepExtract>
if (state == TristateState.INDETERMINATE && isEnabled()) {
fire... | Slipstream-Mod-Manager | positive | 5,275 |
public static int findKthNum(int[] arr1, int[] arr2, int kth) {
if (arr1 == null || arr2 == null) {
throw new RuntimeException("Your arr is invalid!");
}
if (kth < 1 || kth > arr1.length + arr2.length) {
throw new RuntimeException("K is invalid!");
}
int[] longs = arr1.length >= arr2.length ? arr1 : arr2;
int[] shorts ... | public static int findKthNum(int[] arr1, int[] arr2, int kth) {
if (arr1 == null || arr2 == null) {
throw new RuntimeException("Your arr is invalid!");
}
if (kth < 1 || kth > arr1.length + arr2.length) {
throw new RuntimeException("K is invalid!");
}
int[] longs = arr1.length >= arr2.length ? arr1 : arr2;
int[] shorts ... | coding-interview-guide | positive | 5,276 |
public static int jumpMinTimes1(int N, int start, int end, int[] arr) {
boolean[] map = new boolean[N + 1];
if (start < 1 || start > N) {
return -1;
}
if (map[start]) {
return -1;
}
if (start == end) {
return 0;
}
map[start] = true;
int ans1 = f1(N, start + arr[start - 1], end, 0 + 1, arr, map);
int ans2 = f1(N, start ... | public static int jumpMinTimes1(int N, int start, int end, int[] arr) {
boolean[] map = new boolean[N + 1];
<DeepExtract>
if (start < 1 || start > N) {
return -1;
}
if (map[start]) {
return -1;
}
if (start == end) {
return 0;
}
map[start] = true;
int ans1 = f1(N, start + arr[start - 1], end, 0 + 1, arr, map);
int ans2 ... | publicclass2020 | positive | 5,277 |
@Test
public void testGenerateLicense04() throws Exception {
try {
Field field = LicenseCreator.class.getDeclaredField("instance");
field.setAccessible(true);
field.set(null, null);
} catch (Exception e) {
throw new RuntimeException(e);
}
MockPasswordProvider passwordProvider = new MockPasswordProvider();
String fileNa... | @Test
public void testGenerateLicense04() throws Exception {
<DeepExtract>
try {
Field field = LicenseCreator.class.getDeclaredField("instance");
field.setAccessible(true);
field.set(null, null);
} catch (Exception e) {
throw new RuntimeException(e);
}
</DeepExtract>
MockPasswordProvider passwordProvider = new MockPass... | java-license-manager | positive | 5,278 |
@Override
public boolean onTouchEvent(MotionEvent event) {
float x = event.getX() - (width / 2);
float y = -(event.getY() - (height / 2));
double r = Math.sqrt((x * x) + (y * y));
double pa = Math.asin(x / r) / (2 * Math.PI) * 360;
if (y < 0) {
if (x < 0) {
pa = -pa - 180;
} else {
pa = 180 - pa;
}
}
if (pa < 0) {
pa +... | @Override
public boolean onTouchEvent(MotionEvent event) {
float x = event.getX() - (width / 2);
float y = -(event.getY() - (height / 2));
double r = Math.sqrt((x * x) + (y * y));
double pa = Math.asin(x / r) / (2 * Math.PI) * 360;
if (y < 0) {
if (x < 0) {
pa = -pa - 180;
} else {
pa = 180 - pa;
}
}
if (pa < 0) {
pa +... | LView | positive | 5,279 |
@Override
public void setDisplayedChild(int position) {
EmulatorView view = (EmulatorView) getCurrentView();
if (view == null) {
return;
}
view.onPause();
super.setDisplayedChild(position);
if (getChildCount() == 0) {
return;
}
EmulatorView view = (EmulatorView) getCurrentView();
if (view == null) {
return;
}
TermSessi... | @Override
public void setDisplayedChild(int position) {
EmulatorView view = (EmulatorView) getCurrentView();
if (view == null) {
return;
}
view.onPause();
super.setDisplayedChild(position);
if (getChildCount() == 0) {
return;
}
EmulatorView view = (EmulatorView) getCurrentView();
if (view == null) {
return;
}
TermSessi... | Ansole | positive | 5,281 |
public void setListVideos(List<ListVideo> listVideos) {
this.listVideos = listVideos;
if (listVideos != null && listVideos.size() > 0) {
ListVideo video = listVideos.get(0);
if (listVideos.size() == 1) {
this.title = video.getText();
listVideos.clear();
}
this.playurl = video.getUrl();
} else {
this.playurl = albumUrl;... | public void setListVideos(List<ListVideo> listVideos) {
this.listVideos = listVideos;
<DeepExtract>
if (listVideos != null && listVideos.size() > 0) {
ListVideo video = listVideos.get(0);
if (listVideos.size() == 1) {
this.title = video.getText();
listVideos.clear();
}
this.playurl = video.getUrl();
} else {
this.playu... | ShuiyeVideo | positive | 5,282 |
public static Bitmap getImageCompress(final String srcPath) {
Options newOpts = new Options();
newOpts.inJustDecodeBounds = true;
Bitmap bitmap = BitmapFactory.decodeFile(srcPath, newOpts);
newOpts.inJustDecodeBounds = false;
int w = newOpts.outWidth;
int h = newOpts.outHeight;
float hh = 800f;
float ww = 480f;
int be ... | public static Bitmap getImageCompress(final String srcPath) {
Options newOpts = new Options();
newOpts.inJustDecodeBounds = true;
Bitmap bitmap = BitmapFactory.decodeFile(srcPath, newOpts);
newOpts.inJustDecodeBounds = false;
int w = newOpts.outWidth;
int h = newOpts.outHeight;
float hh = 800f;
float ww = 480f;
int be ... | SimpleImageEditor | positive | 5,283 |
public void visit(OWLAnnotationPropertyRangeAxiom axiom) {
if (!axiom.getProperty().isAnonymous()) {
referencedEntities.add(axiom.getProperty().asOWLClass());
}
} | public void visit(OWLAnnotationPropertyRangeAxiom axiom) {
<DeepExtract>
if (!axiom.getProperty().isAnonymous()) {
referencedEntities.add(axiom.getProperty().asOWLClass());
}
</DeepExtract>
} | protege-server | positive | 5,284 |
@Override
public Task validateAssignPermissionOnTask(String taskId, String userId, String assignee) {
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
if (task == null) {
throw new FlowableObjectNotFoundException("Task with id: " + taskId + " does not exist");
}
UserTask userTask = (UserTask) Fl... | @Override
public Task validateAssignPermissionOnTask(String taskId, String userId, String assignee) {
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
if (task == null) {
throw new FlowableObjectNotFoundException("Task with id: " + taskId + " does not exist");
}
<DeepExtract>
UserTask userTask =... | zjmzxfzhl | positive | 5,285 |
public static String getLog(int printFlags) {
String result = "";
if ((logMessages == null) || (logFlags == null) || (logTimeStamps == null)) {
logMessages = new String[LOG_MAX_CAPACITY];
logFlags = new int[LOG_MAX_CAPACITY];
logTimeStamps = new long[LOG_MAX_CAPACITY];
cnt = 0;
totalCnt = 0;
}
if (totalCnt == 0) {
retu... | public static String getLog(int printFlags) {
String result = "";
<DeepExtract>
if ((logMessages == null) || (logFlags == null) || (logTimeStamps == null)) {
logMessages = new String[LOG_MAX_CAPACITY];
logFlags = new int[LOG_MAX_CAPACITY];
logTimeStamps = new long[LOG_MAX_CAPACITY];
cnt = 0;
totalCnt = 0;
}
</DeepExtra... | InputStickAPI-Android | positive | 5,286 |
@Override
public void status(TaskId taskId, Phase phase) {
if (dir == null) {
return;
}
final Path path = Paths.get(dir, eventFilename());
try {
Serialization.serialize(listener -> listener.status(taskId, phase), path);
} catch (SerializationException e) {
throw new RuntimeException(e);
}
} | @Override
public void status(TaskId taskId, Phase phase) {
<DeepExtract>
if (dir == null) {
return;
}
final Path path = Paths.get(dir, eventFilename());
try {
Serialization.serialize(listener -> listener.status(taskId, phase), path);
} catch (SerializationException e) {
throw new RuntimeException(e);
}
</DeepExtract>
} | flo | positive | 5,287 |
public ResultActions assertPocketEvent(ResultActions resultActions) throws Exception {
ResultActions asserts = resultActions.andExpect(jsonPath("$.[*].amountDelta").value(hasItem(new BigDecimal("5.21").doubleValue()))).andExpect(jsonPath("$.[*].id").value(hasItem(1))).andExpect(jsonPath("$.[*].pocketId").value(hasItem(... | public ResultActions assertPocketEvent(ResultActions resultActions) throws Exception {
ResultActions asserts = resultActions.andExpect(jsonPath("$.[*].amountDelta").value(hasItem(new BigDecimal("5.21").doubleValue()))).andExpect(jsonPath("$.[*].id").value(hasItem(1))).andExpect(jsonPath("$.[*].pocketId").value(hasItem(... | xm-ms-balance | positive | 5,288 |
public void start(View view) {
int cityid = Integer.parseInt(cidView.getText().toString());
mOffline.start(cityid);
LinearLayout cl = (LinearLayout) findViewById(R.id.citylist_layout);
LinearLayout lm = (LinearLayout) findViewById(R.id.localmap_layout);
lm.setVisibility(View.VISIBLE);
cl.setVisibility(View.GONE);
Toast... | public void start(View view) {
int cityid = Integer.parseInt(cidView.getText().toString());
mOffline.start(cityid);
LinearLayout cl = (LinearLayout) findViewById(R.id.citylist_layout);
LinearLayout lm = (LinearLayout) findViewById(R.id.localmap_layout);
lm.setVisibility(View.VISIBLE);
cl.setVisibility(View.GONE);
Toast... | BaiduMapSDK | positive | 5,289 |
public void setValue(DayEntity entity, ColorScheme scheme) {
if (null != getValue()) {
getValue().recycle();
}
this.entity = entity;
tvDay.setText(entity.value());
switch(entity.valueStatus()) {
case DayStatus.NORMAL:
tvDay.setTextColor(scheme.dayNormalTextColor());
break;
case DayStatus.INVALID:
tvDay.setTextColor(sch... | public void setValue(DayEntity entity, ColorScheme scheme) {
if (null != getValue()) {
getValue().recycle();
}
this.entity = entity;
tvDay.setText(entity.value());
switch(entity.valueStatus()) {
case DayStatus.NORMAL:
tvDay.setTextColor(scheme.dayNormalTextColor());
break;
case DayStatus.INVALID:
tvDay.setTextColor(sch... | AndroidPicker | positive | 5,290 |
public Criteria andCreateByLessThan(Date value) {
if (value == null) {
throw new RuntimeException("Value for " + "createBy" + " cannot be null");
}
criteria.add(new Criterion("create_by <", value));
return (Criteria) this;
} | public Criteria andCreateByLessThan(Date value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "createBy" + " cannot be null");
}
criteria.add(new Criterion("create_by <", value));
</DeepExtract>
return (Criteria) this;
} | MyBlog | positive | 5,291 |
public static void logInfo(String message) {
newLogItem(new LogItem(LogLevel.INFO, message), false);
} | public static void logInfo(String message) {
<DeepExtract>
newLogItem(new LogItem(LogLevel.INFO, message), false);
</DeepExtract>
} | nizvpn | positive | 5,293 |
public void onUpdate() {
if (!mTermFd.getFileDescriptor().valid())
return;
try {
Exec.setPtyUTF8ModeInternal(getIntFd(mTermFd), getUTF8Mode());
} catch (IOException e) {
Log.e("exec", "Failed to set UTF mode: " + e.getMessage());
if (isFailFast())
throw new IllegalStateException(e);
}
} | public void onUpdate() {
<DeepExtract>
if (!mTermFd.getFileDescriptor().valid())
return;
try {
Exec.setPtyUTF8ModeInternal(getIntFd(mTermFd), getUTF8Mode());
} catch (IOException e) {
Log.e("exec", "Failed to set UTF mode: " + e.getMessage());
if (isFailFast())
throw new IllegalStateException(e);
}
</DeepExtract>
} | Ansole | positive | 5,294 |
void writeVersionDirective(final String version_text) throws IOException {
stream.write(("%YAML " + version_text).getBytes());
ByteList xdata = null;
if (xdata == null) {
xdata = env.bestLinebreak;
}
env.whitespace = true;
env.indentation = true;
env.line++;
env.column = 0;
stream.write(xdata.bytes, 0, xdata.realSize);... | void writeVersionDirective(final String version_text) throws IOException {
stream.write(("%YAML " + version_text).getBytes());
<DeepExtract>
ByteList xdata = null;
if (xdata == null) {
xdata = env.bestLinebreak;
}
env.whitespace = true;
env.indentation = true;
env.line++;
env.column = 0;
stream.write(xdata.bytes, 0, xd... | jvyamlb | positive | 5,295 |
public Criteria andNoticeNotIn(List<String> values) {
if (values == null) {
throw new RuntimeException("Value for " + "notice" + " cannot be null");
}
criteria.add(new Criterion("notice not in", values));
return (Criteria) this;
} | public Criteria andNoticeNotIn(List<String> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "notice" + " cannot be null");
}
criteria.add(new Criterion("notice not in", values));
</DeepExtract>
return (Criteria) this;
} | webim | positive | 5,296 |
public JobWithDetails clearDescription() throws IOException {
return updateDescription(EMPTY_DESCRIPTION, false);
} | public JobWithDetails clearDescription() throws IOException {
<DeepExtract>
return updateDescription(EMPTY_DESCRIPTION, false);
</DeepExtract>
} | java-client-api | positive | 5,297 |
public Criteria andIsshowLike(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "isshow" + " cannot be null");
}
criteria.add(new Criterion("ISSHOW like", value));
return (Criteria) this;
} | public Criteria andIsshowLike(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "isshow" + " cannot be null");
}
criteria.add(new Criterion("ISSHOW like", value));
</DeepExtract>
return (Criteria) this;
} | console | positive | 5,299 |
@Override
public boolean add(ModelHolder modelHolder) {
if (0 != 0) {
throw new RuntimeException(getClass().getCanonicalName() + " can handle only one modelHolder with index 0.");
}
this.models = modelHolder;
return true;
} | @Override
public boolean add(ModelHolder modelHolder) {
<DeepExtract>
if (0 != 0) {
throw new RuntimeException(getClass().getCanonicalName() + " can handle only one modelHolder with index 0.");
}
this.models = modelHolder;
</DeepExtract>
return true;
} | Gossip-Learning-Framework | positive | 5,300 |
public static String getHours() {
String formatDate = null;
if (StringUtils.isNotBlank("HH:mm")) {
formatDate = DateFormatUtils.format(new Date(), "HH:mm");
} else {
formatDate = DateFormatUtils.format(new Date(), "yyyy-MM-dd");
}
return formatDate;
} | public static String getHours() {
<DeepExtract>
String formatDate = null;
if (StringUtils.isNotBlank("HH:mm")) {
formatDate = DateFormatUtils.format(new Date(), "HH:mm");
} else {
formatDate = DateFormatUtils.format(new Date(), "yyyy-MM-dd");
}
return formatDate;
</DeepExtract>
} | school-bus | positive | 5,301 |
private void initData() {
Intent intent = getIntent();
long id = intent.getLongExtra("entryId", 0);
mEntryDao = new EntryDao(this);
mEntry = mEntryDao.query(id);
mDataSet = new ArrayList<>();
TagDao td = new TagDao(this);
List<Tag> allTags = td.queryAll();
String[] tagStr = mEntry.getTags().split(",");
List<String> che... | private void initData() {
Intent intent = getIntent();
long id = intent.getLongExtra("entryId", 0);
mEntryDao = new EntryDao(this);
mEntry = mEntryDao.query(id);
mDataSet = new ArrayList<>();
TagDao td = new TagDao(this);
List<Tag> allTags = td.queryAll();
<DeepExtract>
String[] tagStr = mEntry.getTags().split(",");
Li... | Keep | positive | 5,302 |
@Override
public Progress setLabel(String text) {
if (disposed)
throw new SWTException(SWT.ERROR_WIDGET_DISPOSED);
display.asyncExec(() -> {
if (progressTitle.isDisposed() || progressBar.isDisposed())
return;
() -> {
progressTitle.setText(text);
progressTitle.pack();
}.run();
});
return this;
} | @Override
public Progress setLabel(String text) {
<DeepExtract>
if (disposed)
throw new SWTException(SWT.ERROR_WIDGET_DISPOSED);
display.asyncExec(() -> {
if (progressTitle.isDisposed() || progressBar.isDisposed())
return;
() -> {
progressTitle.setText(text);
progressTitle.pack();
}.run();
});
</DeepExtract>
return thi... | SWET | positive | 5,303 |
public BigRational divide(BigRational value) {
if (value.equals(ONE)) {
return this;
}
if (numerator.multiply(value.denominator).signum() == 0 && denominator.multiply(value.numerator).signum() != 0) {
return ZERO;
}
if (numerator.multiply(value.denominator).compareTo(BigDecimal.ONE) == 0 && denominator.multiply(value.n... | public BigRational divide(BigRational value) {
if (value.equals(ONE)) {
return this;
}
<DeepExtract>
if (numerator.multiply(value.denominator).signum() == 0 && denominator.multiply(value.numerator).signum() != 0) {
return ZERO;
}
if (numerator.multiply(value.denominator).compareTo(BigDecimal.ONE) == 0 && denominator.mu... | skript-parser | positive | 5,304 |
@Override
public void onSelectorEnd() {
} | @Override
<DeepExtract>
</DeepExtract>
public void onSelectorEnd() {
<DeepExtract>
</DeepExtract>
} | remoting | positive | 5,305 |
public static int windowBackground(Context context, int defaultValue) {
if (value == null)
value = new TypedValue();
try {
Theme theme = context.getTheme();
if (theme != null && theme.resolveAttribute(android.R.attr.windowBackground, value, true)) {
if (value.type >= TypedValue.TYPE_FIRST_INT && value.type <= TypedValu... | public static int windowBackground(Context context, int defaultValue) {
<DeepExtract>
if (value == null)
value = new TypedValue();
try {
Theme theme = context.getTheme();
if (theme != null && theme.resolveAttribute(android.R.attr.windowBackground, value, true)) {
if (value.type >= TypedValue.TYPE_FIRST_INT && value.typ... | NguiLib | positive | 5,306 |
public static String orderReverse(Map<String, String> params, String certPath, String certPass) {
return doPostSsl(getReqUrl(PayApiEnum.REVERSE), params, certPath, certPass);
} | public static String orderReverse(Map<String, String> params, String certPath, String certPass) {
<DeepExtract>
return doPostSsl(getReqUrl(PayApiEnum.REVERSE), params, certPath, certPass);
</DeepExtract>
} | IJPay | positive | 5,307 |
public void performIntraProceduralVSA(Function function) {
Queue<Instruction> worklist = new LinkedList<>();
Transformer transformer = new ESILTransformer(VSA.commands);
Instruction entry = Traversals.functionToEntryInstruction(function);
if (entry == null) {
return;
}
assignment.put(entry, createInitialAbstractEnviron... | public void performIntraProceduralVSA(Function function) {
Queue<Instruction> worklist = new LinkedList<>();
Transformer transformer = new ESILTransformer(VSA.commands);
Instruction entry = Traversals.functionToEntryInstruction(function);
if (entry == null) {
return;
}
<DeepExtract>
assignment.put(entry, createInitialA... | bjoern | positive | 5,308 |
@Override
protected void onCreate(Bundle savedInstanceState) {
if (Constants.LOG_V)
Log.v(TAG, "onCreate(" + savedInstanceState + ")");
Util.setFullscreenMode(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.folders);
Bundle extras = getIntent().getExtras();
return extras.getLong(Constants.EXTRA_FOLDE... | @Override
protected void onCreate(Bundle savedInstanceState) {
if (Constants.LOG_V)
Log.v(TAG, "onCreate(" + savedInstanceState + ")");
Util.setFullscreenMode(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.folders);
<DeepExtract>
Bundle extras = getIntent().getExtras();
return extras.getLong(Constan... | andoku | positive | 5,309 |
@Override
public void run() {
Log.w(TAG, "createNewUser Error: " + exception);
postExceptionToCallback(cb, exception);
} | @Override
public void run() {
<DeepExtract>
Log.w(TAG, "createNewUser Error: " + exception);
postExceptionToCallback(cb, exception);
</DeepExtract>
} | kickflip-android-sdk | positive | 5,310 |
@Override
public void dragOver(DropTargetEvent e) {
if (dropTargetIsValid(e)) {
setDropOperation(e);
}
} | @Override
public void dragOver(DropTargetEvent e) {
<DeepExtract>
if (dropTargetIsValid(e)) {
setDropOperation(e);
}
</DeepExtract>
} | ccw | positive | 5,311 |
@Override
public void onClick(View v) {
RadioButton rb = v.findViewById(R.id.provider_rb);
if (lastSelected != null) {
lastSelected.setChecked(false);
}
rb.setChecked(true);
lastSelected = rb;
selected[0] = providers.indexOf("B2");
} | @Override
public void onClick(View v) {
RadioButton rb = v.findViewById(R.id.provider_rb);
<DeepExtract>
if (lastSelected != null) {
lastSelected.setChecked(false);
}
rb.setChecked(true);
lastSelected = rb;
selected[0] = providers.indexOf("B2");
</DeepExtract>
} | rcloneExplorer | positive | 5,312 |
public void addActiveChannel(HodorChannel activeChannel) {
String remoteIp = HostUtils.getIp(activeChannel.remoteAddress());
activeChannels.put(remoteIp, activeChannel);
long currentTimeMillis = System.currentTimeMillis();
if (currentTimeMillis - lastFireTime < 60 * 1000) {
return;
}
lastFireTime = currentTimeMillis;
a... | public void addActiveChannel(HodorChannel activeChannel) {
String remoteIp = HostUtils.getIp(activeChannel.remoteAddress());
activeChannels.put(remoteIp, activeChannel);
<DeepExtract>
long currentTimeMillis = System.currentTimeMillis();
if (currentTimeMillis - lastFireTime < 60 * 1000) {
return;
}
lastFireTime = curren... | hodor | positive | 5,314 |
public String toJsonP(String functionName, Object object) {
try {
return mapper.writeValueAsString(new JSONPObject(functionName, object));
} catch (IOException e) {
return null;
}
} | public String toJsonP(String functionName, Object object) {
<DeepExtract>
try {
return mapper.writeValueAsString(new JSONPObject(functionName, object));
} catch (IOException e) {
return null;
}
</DeepExtract>
} | wechatty-project | positive | 5,317 |
@Override
public void buttonPressed(Button bt) {
if (treeView.getCheckmarksEnabled())
for (int i = 0; i < facade.getTreeData().getLength(); i++) treeView.setNodeChecked(new Path(i), true);
} | @Override
public void buttonPressed(Button bt) {
<DeepExtract>
if (treeView.getCheckmarksEnabled())
for (int i = 0; i < facade.getTreeData().getLength(); i++) treeView.setNodeChecked(new Path(i), true);
</DeepExtract>
} | setupmaker | positive | 5,318 |
protected Object unwrapIncoming(Object wrapped) {
if (wrapped == null)
return null;
if (wrapped instanceof Wrapper) {
return ((Wrapper) wrapped).getHandle();
} else if (wrapped instanceof List) {
throw new IllegalArgumentException("Can only insert a WrappedList.");
} else if (wrapped instanceof Map) {
throw new Illegal... | protected Object unwrapIncoming(Object wrapped) {
<DeepExtract>
if (wrapped == null)
return null;
if (wrapped instanceof Wrapper) {
return ((Wrapper) wrapped).getHandle();
} else if (wrapped instanceof List) {
throw new IllegalArgumentException("Can only insert a WrappedList.");
} else if (wrapped instanceof Map) {
thr... | AdditionsAPI | positive | 5,319 |
public <T> TypeInformation<T> getInputTypeInfo() {
if (currentTransform.getInput() instanceof TypedPValue) {
Coder<?> outputCoder = ((TypedPValue) currentTransform.getInput()).getCoder();
if (outputCoder instanceof KvCoder) {
return new KvCoderTypeInformation((KvCoder) outputCoder);
} else {
return new CoderTypeInforma... | public <T> TypeInformation<T> getInputTypeInfo() {
<DeepExtract>
if (currentTransform.getInput() instanceof TypedPValue) {
Coder<?> outputCoder = ((TypedPValue) currentTransform.getInput()).getCoder();
if (outputCoder instanceof KvCoder) {
return new KvCoderTypeInformation((KvCoder) outputCoder);
} else {
return new Co... | flink-dataflow | positive | 5,320 |
public static String getSDCardSizeInfo(String sdcardPath) {
double freeSize;
StatFs sf = new StatFs(sdcardPath);
if (Build.VERSION.SDK_INT > 18) {
freeSize = sf.getFreeBytes() / 1024.00 / 1024.00 / 1024.00;
} else {
int blockSize = sf.getBlockSize();
int freeBlocks = sf.getAvailableBlocks();
freeSize = Math.abs((freeBl... | public static String getSDCardSizeInfo(String sdcardPath) {
double freeSize;
StatFs sf = new StatFs(sdcardPath);
if (Build.VERSION.SDK_INT > 18) {
freeSize = sf.getFreeBytes() / 1024.00 / 1024.00 / 1024.00;
} else {
int blockSize = sf.getBlockSize();
int freeBlocks = sf.getAvailableBlocks();
freeSize = Math.abs((freeBl... | MDFolder | positive | 5,321 |
public Builder appendEncodedPath(String newSegment) {
this.opaquePart = null;
this.path = PathPart.appendEncodedSegment(path, newSegment);
return this;
} | public Builder appendEncodedPath(String newSegment) {
<DeepExtract>
this.opaquePart = null;
this.path = PathPart.appendEncodedSegment(path, newSegment);
return this;
</DeepExtract>
} | ndef-tools-for-android | positive | 5,322 |
public Fenix andNotStartsWith(String field, Object value, String name) {
if (true) {
this.source.setPrefix(SymbolConst.AND).setSymbol(false ? SymbolConst.LIKE : SymbolConst.NOT_LIKE).setOthers(startMap);
new JavaSqlInfoBuilder(this.source).buildLikeSql(field, StringHelper.isBlank(name) ? StringHelper.fixDot(field) : na... | public Fenix andNotStartsWith(String field, Object value, String name) {
<DeepExtract>
if (true) {
this.source.setPrefix(SymbolConst.AND).setSymbol(false ? SymbolConst.LIKE : SymbolConst.NOT_LIKE).setOthers(startMap);
new JavaSqlInfoBuilder(this.source).buildLikeSql(field, StringHelper.isBlank(name) ? StringHelper.fixD... | fenix | positive | 5,323 |
@Override
public void onServicesDiscovered(BluetoothGatt gatt, int status) {
if (Looper.myLooper() != Looper.getMainLooper()) {
mHandler.post(() -> onServicesDiscoveredMain(gatt, status));
} else {
() -> onServicesDiscoveredMain(gatt, status).run();
}
} | @Override
public void onServicesDiscovered(BluetoothGatt gatt, int status) {
<DeepExtract>
if (Looper.myLooper() != Looper.getMainLooper()) {
mHandler.post(() -> onServicesDiscoveredMain(gatt, status));
} else {
() -> onServicesDiscoveredMain(gatt, status).run();
}
</DeepExtract>
} | BLELib | positive | 5,324 |
private void load(Index<TestRecord> index, int nObjects, int zCount) throws IOException, InterruptedException {
for (int id = 0; id < nObjects; id++) {
TestSpatialObject spatialObject = new TestSpatialObject(id);
for (long c = 0; c < zCount; c++) {
long z = z((id + c) * GAP);
TestRecord record = index.newRecord();
reco... | private void load(Index<TestRecord> index, int nObjects, int zCount) throws IOException, InterruptedException {
<DeepExtract>
</DeepExtract>
for (int id = 0; id < nObjects; id++) {
<DeepExtract>
</DeepExtract>
TestSpatialObject spatialObject = new TestSpatialObject(id);
<DeepExtract>
</DeepExtract>
for (long c = 0; c <... | geophile | positive | 5,325 |
public static ArrayList<Double> updateLinkReverse(BPMathModelRelation r, ArrayList<DataNodeAndMu> rMuOfK, RelationshipMismatchProvider mismatchProvider, MismatchRelationshipType mismatchRelationshipType) {
String linkMismatchPrefix = r.getBaseRelation().getFromNode() + "," + r.getBaseRelation().getToNode() + ",";
Array... | public static ArrayList<Double> updateLinkReverse(BPMathModelRelation r, ArrayList<DataNodeAndMu> rMuOfK, RelationshipMismatchProvider mismatchProvider, MismatchRelationshipType mismatchRelationshipType) {
String linkMismatchPrefix = r.getBaseRelation().getFromNode() + "," + r.getBaseRelation().getToNode() + ",";
<Deep... | pattern-matching | positive | 5,326 |
@Override
public void onChanged() {
boolean needPopulate = mItems.size() < 3 && mItems.size() < mAdapter.getCount();
int newCurrItem = -1;
for (int i = 0; i < mItems.size(); i++) {
final ItemInfo ii = mItems.get(i);
final int newPos = mAdapter.getItemPosition(ii.object);
if (newPos == PagerAdapter.POSITION_UNCHANGED) {... | @Override
public void onChanged() {
<DeepExtract>
boolean needPopulate = mItems.size() < 3 && mItems.size() < mAdapter.getCount();
int newCurrItem = -1;
for (int i = 0; i < mItems.size(); i++) {
final ItemInfo ii = mItems.get(i);
final int newPos = mAdapter.getItemPosition(ii.object);
if (newPos == PagerAdapter.POSITIO... | Lazy | positive | 5,327 |
public List<List<Integer>> allPathsSourceTarget(int[][] graph) {
List<List<Integer>> res = new ArrayList<>();
LinkedList<Integer> list = new LinkedList<>();
list.add(0);
if (0 == graph.length - 1) {
res.add(new ArrayList<>(list));
return;
}
for (int nei : graph[0]) {
list.addLast(nei);
dfs(graph, nei, list, res);
list.... | public List<List<Integer>> allPathsSourceTarget(int[][] graph) {
List<List<Integer>> res = new ArrayList<>();
LinkedList<Integer> list = new LinkedList<>();
list.add(0);
<DeepExtract>
if (0 == graph.length - 1) {
res.add(new ArrayList<>(list));
return;
}
for (int nei : graph[0]) {
list.addLast(nei);
dfs(graph, nei, lis... | Algo | positive | 5,328 |
public void append(StringBuilder b, String f, float[] v, boolean d) {
if (f != null)
b.append(f).append(ATTR_SEPARATOR);
if (v == null)
appendNull(b, f);
else if (d)
appendDetails(b, f, v);
else
appendSummary(b, f, v);
b.append(FIELD_SEPARATOR);
} | public void append(StringBuilder b, String f, float[] v, boolean d) {
if (f != null)
b.append(f).append(ATTR_SEPARATOR);
if (v == null)
appendNull(b, f);
else if (d)
appendDetails(b, f, v);
else
appendSummary(b, f, v);
<DeepExtract>
b.append(FIELD_SEPARATOR);
</DeepExtract>
} | lite-pool | positive | 5,330 |
@Test
void prependAndAppend() {
Record a;
Record a = Records.empty();
assertThat(a.keys()).isEmpty();
assertThat(a.values()).isEmpty();
assertThat(a.entries()).isEmpty();
Value text = Values.ofText("some text");
assertThat(a.prepend(Keys.TEXT, text)).isEqualTo(a.append(Keys.TEXT, text));
assertThat(a.append(Keys.TEXT, ... | @Test
void prependAndAppend() {
<DeepExtract>
Record a;
Record a = Records.empty();
assertThat(a.keys()).isEmpty();
assertThat(a.values()).isEmpty();
assertThat(a.entries()).isEmpty();
</DeepExtract>
Value text = Values.ofText("some text");
assertThat(a.prepend(Keys.TEXT, text)).isEqualTo(a.append(Keys.TEXT, text));
as... | hosh | positive | 5,331 |
@Override
public String toLongString() {
return "sort";
} | @Override
public String toLongString() {
<DeepExtract>
return "sort";
</DeepExtract>
} | MathEngine | positive | 5,332 |
private void doVerifyGoogleClientState() {
assertThat(googlePhotosClient.getAllItems(), containsInAnyOrder(allOf(itemForFile(rootPhoto), itemWithNoAlbum(), itemWithDescription(optionalWithValue(equalTo(rootPhoto.getFileName().toString())))), allOf(itemForFile(outerAlbumPhoto), itemInAlbumWithId(equalTo("outer-album")),... | private void doVerifyGoogleClientState() {
assertThat(googlePhotosClient.getAllItems(), containsInAnyOrder(allOf(itemForFile(rootPhoto), itemWithNoAlbum(), itemWithDescription(optionalWithValue(equalTo(rootPhoto.getFileName().toString())))), allOf(itemForFile(outerAlbumPhoto), itemInAlbumWithId(equalTo("outer-album")),... | jiotty-photos-uploader | positive | 5,333 |
public static Sha256Hash twiceOf(byte[] contents) {
return wrap(CryptoUtils.HEX.decode(hashTwice(contents)));
} | public static Sha256Hash twiceOf(byte[] contents) {
<DeepExtract>
return wrap(CryptoUtils.HEX.decode(hashTwice(contents)));
</DeepExtract>
} | Swiftglobal | positive | 5,334 |
public final T debug(String msg, String... params) {
if (!Config.get().debug)
return (T) this;
for (ChatColor colour : ChatColor.values()) {
msg = msg.replace("<" + colour.name().toLowerCase() + ">", colour + "");
}
return msg;
for (String param : params) msg = msg.replaceFirst("\\<\\?\\>", param);
getServer().getConso... | public final T debug(String msg, String... params) {
if (!Config.get().debug)
return (T) this;
<DeepExtract>
for (ChatColor colour : ChatColor.values()) {
msg = msg.replace("<" + colour.name().toLowerCase() + ">", colour + "");
}
return msg;
</DeepExtract>
for (String param : params) msg = msg.replaceFirst("\\<\\?\\>",... | FactionsPlus | positive | 5,336 |
byte[] decryptBase64(String src, String key) {
if (key == null || key.length() != 16) {
throw new IllegalArgumentException("illegal key");
}
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, skeySpec);
return c... | byte[] decryptBase64(String src, String key) {
<DeepExtract>
if (key == null || key.length() != 16) {
throw new IllegalArgumentException("illegal key");
}
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, skeyS... | jetlinks-supports | positive | 5,337 |
@Override
public Integer load(Object o) {
if (o instanceof Number) {
return ((Number) o).intValue();
}
if (o instanceof String) {
try {
return Integer.parseInt((String) o);
} catch (NumberFormatException ex) {
return null;
}
}
return null;
} | @Override
public Integer load(Object o) {
<DeepExtract>
if (o instanceof Number) {
return ((Number) o).intValue();
}
if (o instanceof String) {
try {
return Integer.parseInt((String) o);
} catch (NumberFormatException ex) {
return null;
}
}
return null;
</DeepExtract>
} | tree-feller | positive | 5,338 |
private static void addIntMappings(int interval, int max) {
try {
for (int i = interval; i <= max; i = i + interval) {
final ParameterType type = ParameterType.build("INT" + i);
final String className = "org.web3j.abi.datatypes.generated.Int" + i;
final Class<? extends Type> clazz = (Class<? extends Type>) Class.forNam... | private static void addIntMappings(int interval, int max) {
<DeepExtract>
try {
for (int i = interval; i <= max; i = i + interval) {
final ParameterType type = ParameterType.build("INT" + i);
final String className = "org.web3j.abi.datatypes.generated.Int" + i;
final Class<? extends Type> clazz = (Class<? extends Type>... | eventeum | positive | 5,339 |
public void actionPerformed(java.awt.event.ActionEvent evt) {
setElement(btn_Lu, 71, 177, 0, 175);
} | public void actionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
setElement(btn_Lu, 71, 177, 0, 175);
</DeepExtract>
} | ERSN-OpenMC | positive | 5,340 |
public void actionPerformed(java.awt.event.ActionEvent evt) {
ConvertColoumnsDialog cdialog = new ConvertColoumnsDialog(this, true);
cdialog.setLocationRelativeTo(this);
cdialog.setVisible(true);
} | public void actionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
ConvertColoumnsDialog cdialog = new ConvertColoumnsDialog(this, true);
cdialog.setLocationRelativeTo(this);
cdialog.setVisible(true);
</DeepExtract>
} | HBase-Manager | positive | 5,341 |
@Test(timeout = TIMEOUT)
public void testChildrenOfNodeBAfterMakingMultigraphWithTwoNodes() {
testMakeCompleteGraphWithTwoNodes();
assertTrue(dgraph.addEdge(NODE_A, NODE_B, EDGE_AB2));
edges.add(new LabeledEdge<String, String>("a", "BA"));
edges.add(new LabeledEdge<String, String>("b", "BB"));
assertEquals(edges, dgrap... | @Test(timeout = TIMEOUT)
public void testChildrenOfNodeBAfterMakingMultigraphWithTwoNodes() {
<DeepExtract>
testMakeCompleteGraphWithTwoNodes();
assertTrue(dgraph.addEdge(NODE_A, NODE_B, EDGE_AB2));
</DeepExtract>
edges.add(new LabeledEdge<String, String>("a", "BA"));
edges.add(new LabeledEdge<String, String>("b", "BB"... | CSE331 | positive | 5,342 |
@Override
protected void onFinishInflate() {
super.onFinishInflate();
Context context = getContext();
((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(layoutId, this);
label = (TextView) findViewById(R.id.infodock_label);
shortLabel = (TextView) findViewById(R.id.infodock_shortlabel)... | @Override
protected void onFinishInflate() {
super.onFinishInflate();
Context context = getContext();
((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(layoutId, this);
label = (TextView) findViewById(R.id.infodock_label);
shortLabel = (TextView) findViewById(R.id.infodock_shortlabel)... | Gaggle | positive | 5,343 |
public void doesNotHaveSummoningSickness() {
try {
matagBrowser.findElement(cardCssSelector(".summoning-sickness"));
matagBrowser.wait(invisibilityOfElementLocated(cardCssSelector(".summoning-sickness")));
} catch (NotFoundException e) {
System.out.println("Element " + cardCssSelector(".summoning-sickness") + " is not ... | public void doesNotHaveSummoningSickness() {
<DeepExtract>
try {
matagBrowser.findElement(cardCssSelector(".summoning-sickness"));
matagBrowser.wait(invisibilityOfElementLocated(cardCssSelector(".summoning-sickness")));
} catch (NotFoundException e) {
System.out.println("Element " + cardCssSelector(".summoning-sickness... | matag-the-game | positive | 5,344 |
@Test
public void pass_token_org_space_and_service_name_with_uri_credentials_give_appropriate_database_ref() throws DatabaseExtractionException, ServiceKeyException {
when(databaseRefRepo.exists((String) notNull())).thenReturn(false);
when(databaseServiceRepo.exists((String) notNull())).thenReturn(false);
Map<String, O... | @Test
public void pass_token_org_space_and_service_name_with_uri_credentials_give_appropriate_database_ref() throws DatabaseExtractionException, ServiceKeyException {
when(databaseRefRepo.exists((String) notNull())).thenReturn(false);
when(databaseServiceRepo.exists((String) notNull())).thenReturn(false);
Map<String, O... | db-dumper-service | positive | 5,345 |
public static Date nextDay(Date day) {
return calendarAdd(day, Calendar.DAY_OF_MONTH, 1);
} | public static Date nextDay(Date day) {
<DeepExtract>
return calendarAdd(day, Calendar.DAY_OF_MONTH, 1);
</DeepExtract>
} | spring-boot-plugins | positive | 5,346 |
public String calculateSha1ByNameVersionRevisionLayerTagLanguage(String name, String version, String revision, String layer, String tag, DependencyType type) throws IOException {
String sha1ToCalc = name + UNDERSCORE + version + UNDERSCORE + revision + UNDERSCORE + layer + UNDERSCORE + tag + UNDERSCORE + type.toString(... | public String calculateSha1ByNameVersionRevisionLayerTagLanguage(String name, String version, String revision, String layer, String tag, DependencyType type) throws IOException {
String sha1ToCalc = name + UNDERSCORE + version + UNDERSCORE + revision + UNDERSCORE + layer + UNDERSCORE + tag + UNDERSCORE + type.toString(... | agents | positive | 5,347 |
public static List<File> getFilesFromResourceDir(String dirName) throws URISyntaxException {
File dir = new File(AllCoreTest.class.getResource(dirName).toURI());
if ((dir == null) || (!dir.exists()) || (!dir.isDirectory())) {
throw new IllegalArgumentException("Argument dirname:" + dir.getAbsolutePath() + " is not an e... | public static List<File> getFilesFromResourceDir(String dirName) throws URISyntaxException {
File dir = new File(AllCoreTest.class.getResource(dirName).toURI());
<DeepExtract>
if ((dir == null) || (!dir.exists()) || (!dir.isDirectory())) {
throw new IllegalArgumentException("Argument dirname:" + dir.getAbsolutePath() +... | scape | positive | 5,348 |
public void windowClosing(java.awt.event.WindowEvent evt) {
jButtonStop.setText("Stop");
jButtonStop.doClick();
setEnabled(false);
saveSettings();
closeButtonFileSave();
properShutdown = true;
textEditor.jTextPane1FocusLost(null);
} | public void windowClosing(java.awt.event.WindowEvent evt) {
<DeepExtract>
jButtonStop.setText("Stop");
jButtonStop.doClick();
setEnabled(false);
saveSettings();
closeButtonFileSave();
properShutdown = true;
textEditor.jTextPane1FocusLost(null);
</DeepExtract>
} | 8085simulator | positive | 5,349 |
public void actionPerformed(java.awt.event.ActionEvent evt) {
moveDownTrace();
} | public void actionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
moveDownTrace();
</DeepExtract>
} | gchisto | positive | 5,350 |
public Criteria andAsyncScriptNotEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "asyncScript" + " cannot be null");
}
criteria.add(new Criterion("async_script <>", value));
return (Criteria) this;
} | public Criteria andAsyncScriptNotEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "asyncScript" + " cannot be null");
}
criteria.add(new Criterion("async_script <>", value));
</DeepExtract>
return (Criteria) this;
} | AnyMock | positive | 5,351 |
public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift... | public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift... | imooc-Docker-Kubernetes-k8s | positive | 5,352 |
@Test
public void fromLinesStar() {
final PointD[] points = { new PointD(-1, -2), new PointD(0, 0), new PointD(-1, 2), new PointD(1, 2), new PointD(1, -2) };
final LineD[] lines = { new LineD(points[0], points[1]), new LineD(points[1], points[2]), new LineD(points[1], points[3]), new LineD(points[4], points[1]) };
fina... | @Test
public void fromLinesStar() {
<DeepExtract>
final PointD[] points = { new PointD(-1, -2), new PointD(0, 0), new PointD(-1, 2), new PointD(1, 2), new PointD(1, -2) };
final LineD[] lines = { new LineD(points[0], points[1]), new LineD(points[1], points[2]), new LineD(points[1], points[3]), new LineD(points[4], poin... | tektosyne | positive | 5,354 |
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main_radio, container, false);
rilMcc = (TextView) rootView.findViewById(R.id.rilMcc);
rilMnc = (TextView) rootView.findViewById(R.id.rilMnc);
rilCellId = (Tex... | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main_radio, container, false);
rilMcc = (TextView) rootView.findViewById(R.id.rilMcc);
rilMnc = (TextView) rootView.findViewById(R.id.rilMnc);
rilCellId = (Tex... | S-Tools | positive | 5,355 |
public JSONWriter value(Object o) throws JSONException {
if (JSONObject.valueToString(o) == null) {
throw new JSONException("Null pointer");
}
if (this.mode == 'o' || this.mode == 'a') {
try {
if (this.comma && this.mode == 'a') {
this.writer.write(',');
}
this.writer.write(JSONObject.valueToString(o));
} catch (IOExce... | public JSONWriter value(Object o) throws JSONException {
<DeepExtract>
if (JSONObject.valueToString(o) == null) {
throw new JSONException("Null pointer");
}
if (this.mode == 'o' || this.mode == 'a') {
try {
if (this.comma && this.mode == 'a') {
this.writer.write(',');
}
this.writer.write(JSONObject.valueToString(o));
}... | javapns-jdk16 | positive | 5,358 |
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
initParams();
initClickEvents();
initListeners();
} | @Override
public void initialize(URL url, ResourceBundle resourceBundle) {
<DeepExtract>
initParams();
initClickEvents();
initListeners();
</DeepExtract>
} | RubberTranslator | positive | 5,359 |
@Override
public List<Map<String, Object>> listAllFollowedUserInfoModelList(int userId) {
List<Integer> userIdList = JsonUtil.toListByJsonArrayString(this.getUserActionDONotNull(userId).getFollowedUserIdJsonArray());
List<Map<String, Object>> userInfoMapList = new ArrayList<>(userIdList.size());
for (int userId : userI... | @Override
public List<Map<String, Object>> listAllFollowedUserInfoModelList(int userId) {
<DeepExtract>
List<Integer> userIdList = JsonUtil.toListByJsonArrayString(this.getUserActionDONotNull(userId).getFollowedUserIdJsonArray());
List<Map<String, Object>> userInfoMapList = new ArrayList<>(userIdList.size());
for (int ... | neubbs | positive | 5,360 |
@Test
public void testPullDeleteKey() {
String cacheName = "cache:name:cluster:3-0-2";
String cacheKey1 = "cache:key:302-1";
LayeringCache cache1 = (LayeringCache) cacheManager.getCache(cacheName, layeringCacheSetting6);
cache1.get(cacheKey1, String.class, () -> initCache(String.class));
String cacheKey2 = "cache:key:3... | @Test
public void testPullDeleteKey() {
String cacheName = "cache:name:cluster:3-0-2";
String cacheKey1 = "cache:key:302-1";
LayeringCache cache1 = (LayeringCache) cacheManager.getCache(cacheName, layeringCacheSetting6);
cache1.get(cacheKey1, String.class, () -> initCache(String.class));
String cacheKey2 = "cache:key:3... | layering-cache | positive | 5,361 |
@Test
public void test() throws IOException {
OraCdcCQLobPersistenceTest qt = new OraCdcCQLobPersistenceTest();
final String tmpDir = System.getProperty("java.io.tmpdir");
final Path queuesRoot = FileSystems.getDefault().getPath(tmpDir);
final String xid = "0000270016000000";
final OraCdcTransaction transaction = new O... | @Test
public void test() throws IOException {
OraCdcCQLobPersistenceTest qt = new OraCdcCQLobPersistenceTest();
<DeepExtract>
final String tmpDir = System.getProperty("java.io.tmpdir");
final Path queuesRoot = FileSystems.getDefault().getPath(tmpDir);
final String xid = "0000270016000000";
final OraCdcTransaction trans... | oracdc | positive | 5,362 |
public Criteria andSonglistcountIsNull() {
if ("songListCount is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("songListCount is null"));
return (Criteria) this;
} | public Criteria andSonglistcountIsNull() {
<DeepExtract>
if ("songListCount is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("songListCount is null"));
</DeepExtract>
return (Criteria) this;
} | music | positive | 5,363 |
protected void init(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, RouteResult routeResult) throws Exception {
this.servletContext = servletContext;
this.request = request;
this.response = response;
this.session = request.getSession();
this.controllerName = routeResult.getContr... | protected void init(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, RouteResult routeResult) throws Exception {
this.servletContext = servletContext;
this.request = request;
this.response = response;
this.session = request.getSession();
this.controllerName = routeResult.getContr... | etmvc | positive | 5,364 |
protected void doInit() {
currentVal = new int[4];
currentVal[0] = 0x67452301;
currentVal[1] = 0xEFCDAB89;
currentVal[2] = 0x98BADCFE;
currentVal[3] = 0x10325476;
} | protected void doInit() {
currentVal = new int[4];
<DeepExtract>
currentVal[0] = 0x67452301;
currentVal[1] = 0xEFCDAB89;
currentVal[2] = 0x98BADCFE;
currentVal[3] = 0x10325476;
</DeepExtract>
} | pocminer | positive | 5,365 |
public static void main(String[] args) {
seventh LL = new seventh(1);
if (head == null) {
head = new node(5);
return;
}
node temp = head;
while (temp.next != null) temp = temp.next;
temp.next = new node(5);
if (head == null) {
head = new node(3);
return;
}
node temp = head;
while (temp.next != null) temp = temp.next;
t... | public static void main(String[] args) {
seventh LL = new seventh(1);
if (head == null) {
head = new node(5);
return;
}
node temp = head;
while (temp.next != null) temp = temp.next;
temp.next = new node(5);
if (head == null) {
head = new node(3);
return;
}
node temp = head;
while (temp.next != null) temp = temp.next;
t... | Interview-Questions | positive | 5,366 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.