before stringlengths 12 3.21M | after stringlengths 41 3.21M | repo stringlengths 1 56 | type stringclasses 1
value | __index_level_0__ int64 0 442k |
|---|---|---|---|---|
public Criteria andVersionIsNotNull() {
if ("version is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("version is not null"));
return (Criteria) this;
} | public Criteria andVersionIsNotNull() {
<DeepExtract>
if ("version is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("version is not null"));
</DeepExtract>
return (Criteria) this;
} | common-admin | positive | 2,285 |
protected JLanguageTool newLanguageTool() {
new JLanguageTool(resolveLanguage()).getAllRules().stream().filter(rule -> !rule.isDictionaryBasedSpellingRule()).forEach(nonDictionaryBasedSpellingRule -> new JLanguageTool(resolveLanguage()).disableRule(nonDictionaryBasedSpellingRule.getId()));
return new JLanguageTool(reso... | protected JLanguageTool newLanguageTool() {
<DeepExtract>
new JLanguageTool(resolveLanguage()).getAllRules().stream().filter(rule -> !rule.isDictionaryBasedSpellingRule()).forEach(nonDictionaryBasedSpellingRule -> new JLanguageTool(resolveLanguage()).disableRule(nonDictionaryBasedSpellingRule.getId()));
return new JLan... | contacts-application | positive | 2,286 |
public void enableLineBlending() {
GlStateManager.enableBlend();
GlStateManager.blendFunc(770, 771);
GL11.glEnable(2848);
GL11.glHint(3154, 4354);
} | public void enableLineBlending() {
<DeepExtract>
GlStateManager.enableBlend();
GlStateManager.blendFunc(770, 771);
</DeepExtract>
GL11.glEnable(2848);
GL11.glHint(3154, 4354);
} | Aer-Client | positive | 2,288 |
public Vector rotateAroundY(double angle) {
double angleCos = Math.cos(angle);
double angleSin = Math.sin(angle);
double x = angleCos * getX() + angleSin * getZ();
double z = -angleSin * getX() + angleCos * getZ();
this.z = z;
return this;
} | public Vector rotateAroundY(double angle) {
double angleCos = Math.cos(angle);
double angleSin = Math.sin(angle);
double x = angleCos * getX() + angleSin * getZ();
double z = -angleSin * getX() + angleCos * getZ();
<DeepExtract>
this.z = z;
return this;
</DeepExtract>
} | Limbo | positive | 2,289 |
@Test
public void testSchemolution() throws AvroBaseException, IOException {
AvroBase<User, byte[]> userHAB = AvroBaseFactory.createAvroBase(new HABModule(), HAB.class, AvroFormat.JSON);
User saved = new User();
saved.firstName = $("Sam");
saved.lastName = $("Pullara");
saved.birthday = $("1212");
saved.gender = Gender... | @Test
public void testSchemolution() throws AvroBaseException, IOException {
<DeepExtract>
AvroBase<User, byte[]> userHAB = AvroBaseFactory.createAvroBase(new HABModule(), HAB.class, AvroFormat.JSON);
User saved = new User();
saved.firstName = $("Sam");
saved.lastName = $("Pullara");
saved.birthday = $("1212");
saved.g... | havrobase | positive | 2,290 |
@Override
public MrrtReportTemplate parse(String mrrtTemplate) throws IOException {
validator.validate(mrrtTemplate);
final Document doc = Jsoup.parse(mrrtTemplate, "");
final MrrtReportTemplate result = new MrrtReportTemplate();
final Elements metaTags = doc.getElementsByTag("meta");
result.setPath(doc.baseUri());
res... | @Override
public MrrtReportTemplate parse(String mrrtTemplate) throws IOException {
validator.validate(mrrtTemplate);
final Document doc = Jsoup.parse(mrrtTemplate, "");
final MrrtReportTemplate result = new MrrtReportTemplate();
<DeepExtract>
final Elements metaTags = doc.getElementsByTag("meta");
result.setPath(doc.b... | openmrs-module-radiology | positive | 2,291 |
public String bs() {
@SuppressWarnings("unchecked")
List<List<String>> buzzwordLists = (List<List<String>>) faker.fakeValuesService().fetchObject("company.bs");
List<String> words = new ArrayList<String>();
for (List<String> list : buzzwordLists) {
words.add(list.get(faker.random().nextInt(list.size())));
}
return join... | public String bs() {
@SuppressWarnings("unchecked")
List<List<String>> buzzwordLists = (List<List<String>>) faker.fakeValuesService().fetchObject("company.bs");
<DeepExtract>
List<String> words = new ArrayList<String>();
for (List<String> list : buzzwordLists) {
words.add(list.get(faker.random().nextInt(list.size())));... | javafaker | positive | 2,293 |
@Override
public void onAnimationEnd(final Animator animator) {
expandingLayout.setVisibility(View.GONE);
cardView.setExpanded(false);
if (listView instanceof CardListView) {
CardListView cardListView = (CardListView) listView;
if (cardListView.mAdapter != null) {
cardListView.mAdapter.notifyDataSetChanged();
} else if... | @Override
public void onAnimationEnd(final Animator animator) {
expandingLayout.setVisibility(View.GONE);
cardView.setExpanded(false);
<DeepExtract>
if (listView instanceof CardListView) {
CardListView cardListView = (CardListView) listView;
if (cardListView.mAdapter != null) {
cardListView.mAdapter.notifyDataSetChange... | BabySay | positive | 2,294 |
public void setAuthMethod(AuthMethod method) {
SharedPreferences.Editor editor = mPrefs.edit();
if (method.toString() != null) {
editor.putString(AUTH_METHOD, method.toString());
} else {
editor.remove(AUTH_METHOD);
}
editor.apply();
} | public void setAuthMethod(AuthMethod method) {
<DeepExtract>
SharedPreferences.Editor editor = mPrefs.edit();
if (method.toString() != null) {
editor.putString(AUTH_METHOD, method.toString());
} else {
editor.remove(AUTH_METHOD);
}
editor.apply();
</DeepExtract>
} | natrium-android-wallet | positive | 2,295 |
@Override
protected void onCreate(Bundle savedInstanceState) {
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.tab_song);
myApplication = (MyApplication) getApplication();
myHandler = new MyHandler();
myApplication.setTabSongActivity(this);
radioGroup = (R... | @Override
protected void onCreate(Bundle savedInstanceState) {
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.tab_song);
myApplication = (MyApplication) getApplication();
myHandler = new MyHandler();
myApplication.setTabSongActivity(this);
<DeepExtract>
r... | MyMusicPlayer | positive | 2,296 |
public void init() {
if (inited) {
return;
}
inited = true;
customers = new ArrayList<Customer>();
orders = new ArrayList<Order>();
products = new ArrayList<Product>();
c("John Doe", "123 Willow Road", "Menlo Park", "USA", "650-734-2187");
c("Mary Lane", "75 State Street", "Atlanta", "USA", "302-145-8765");
c("Charlie ... | public void init() {
if (inited) {
return;
}
inited = true;
customers = new ArrayList<Customer>();
orders = new ArrayList<Order>();
products = new ArrayList<Product>();
c("John Doe", "123 Willow Road", "Menlo Park", "USA", "650-734-2187");
c("Mary Lane", "75 State Street", "Atlanta", "USA", "302-145-8765");
c("Charlie ... | el-spec | positive | 2,297 |
public boolean newStatement(T lhs, IPAAbstractOperator<T> operator, T op1, T op2, boolean toWorkList, boolean eager) {
IPAGeneralStatement<T> s = new Statement(lhs, operator, op1, op2);
if (getFixedPointSystem().containsStatement(s)) {
return false;
}
if (lhs != null) {
lhs.setOrderNumber(nextOrderNumber++);
}
nCreated... | public boolean newStatement(T lhs, IPAAbstractOperator<T> operator, T op1, T op2, boolean toWorkList, boolean eager) {
IPAGeneralStatement<T> s = new Statement(lhs, operator, op1, op2);
if (getFixedPointSystem().containsStatement(s)) {
return false;
}
if (lhs != null) {
lhs.setOrderNumber(nextOrderNumber++);
}
nCreated... | Incremental_Points_to_Analysis | positive | 2,298 |
public LSOLayer addBitmapLayer(LSOAsset asset, long atCompUs) {
if (renderer == null) {
renderer = new LSOAexSegmentPlayerRender(getContext());
setupSuccess = false;
}
if (renderer != null && setup()) {
return renderer.addBitmapLayer(asset, atCompUs);
} else {
return null;
}
} | public LSOLayer addBitmapLayer(LSOAsset asset, long atCompUs) {
<DeepExtract>
if (renderer == null) {
renderer = new LSOAexSegmentPlayerRender(getContext());
setupSuccess = false;
}
</DeepExtract>
if (renderer != null && setup()) {
return renderer.addBitmapLayer(asset, atCompUs);
} else {
return null;
}
} | video-edit-sdk-android | positive | 2,299 |
public static void showIndefiniteSnackbar(View parent, CharSequence text, @ColorInt int textColor, @ColorInt int bgColor, CharSequence actionText, int actionTextColor, View.OnClickListener listener) {
SpannableString spannableString = new SpannableString(text);
ForegroundColorSpan colorSpan = new ForegroundColorSpan(te... | public static void showIndefiniteSnackbar(View parent, CharSequence text, @ColorInt int textColor, @ColorInt int bgColor, CharSequence actionText, int actionTextColor, View.OnClickListener listener) {
<DeepExtract>
SpannableString spannableString = new SpannableString(text);
ForegroundColorSpan colorSpan = new Foregrou... | HBase | positive | 2,300 |
public static String getStatcatPrologue() {
String ret = "Division I";
String propertyValue = getPropertiesFile().getProperty("statcat.prologue");
if (propertyValue != null) {
ret = propertyValue;
}
if (ret == null) {
throw new RuntimeException("You must specify a value for property '" + "statcat.prologue" + "' in " + ... | public static String getStatcatPrologue() {
<DeepExtract>
String ret = "Division I";
String propertyValue = getPropertiesFile().getProperty("statcat.prologue");
if (propertyValue != null) {
ret = propertyValue;
}
if (ret == null) {
throw new RuntimeException("You must specify a value for property '" + "statcat.prologue... | developerWorks | positive | 2,301 |
void start() {
if (0 != currentSpeedLevelIndex) {
currentSpeedLevelIndex = 0;
int speed = SPEED_LEVEL_SPEEDS[0];
timer.changeSpeed(isFF ? speed : -speed);
ui.onFFRewindSpeed(SPEED_LEVELS[0]);
}
timer.run();
} | void start() {
<DeepExtract>
if (0 != currentSpeedLevelIndex) {
currentSpeedLevelIndex = 0;
int speed = SPEED_LEVEL_SPEEDS[0];
timer.changeSpeed(isFF ? speed : -speed);
ui.onFFRewindSpeed(SPEED_LEVELS[0]);
}
</DeepExtract>
timer.run();
} | homerplayer | positive | 2,302 |
public Criteria andGenderGreaterThanOrEqualTo(Integer value) {
if (value == null) {
throw new RuntimeException("Value for " + "gender" + " cannot be null");
}
criteria.add(new Criterion("gender >=", value));
return (Criteria) this;
} | public Criteria andGenderGreaterThanOrEqualTo(Integer value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "gender" + " cannot be null");
}
criteria.add(new Criterion("gender >=", value));
</DeepExtract>
return (Criteria) this;
} | SSM_BookSystem | positive | 2,303 |
@Override
protected void onStartup() {
if (triggered.compareAndSet(false, true)) {
getTargetQueue().execute(this);
}
} | @Override
protected void onStartup() {
<DeepExtract>
if (triggered.compareAndSet(false, true)) {
getTargetQueue().execute(this);
}
</DeepExtract>
} | hawtdispatch | positive | 2,304 |
private static void bc(DB db) throws Exception {
RKv SET = db.getrKv();
long startTime = System.currentTimeMillis();
w_times -> set(SET, 1000000).call(100);
long endTime = System.currentTimeMillis();
System.out.println("benchmark " + "SET" + ":" + ((1000000 * 1.0 / (endTime - startTime)) * 1000 + " per second"));
long ... | private static void bc(DB db) throws Exception {
RKv SET = db.getrKv();
long startTime = System.currentTimeMillis();
w_times -> set(SET, 1000000).call(100);
long endTime = System.currentTimeMillis();
System.out.println("benchmark " + "SET" + ":" + ((1000000 * 1.0 / (endTime - startTime)) * 1000 + " per second"));
long ... | KitDB | positive | 2,305 |
public static Builder builder() {
VideoFrameRateParams.Builder.setOnlyClassDefaults(new AutoValue_CameraParams.Builder());
VideoScaleParams.Builder.setOnlyClassDefaults(new AutoValue_CameraParams.Builder());
VideoSizeParams.Builder.setOnlyClassDefaults(new AutoValue_CameraParams.Builder());
return setOnlyClassDefaults(... | public static Builder builder() {
<DeepExtract>
VideoFrameRateParams.Builder.setOnlyClassDefaults(new AutoValue_CameraParams.Builder());
VideoScaleParams.Builder.setOnlyClassDefaults(new AutoValue_CameraParams.Builder());
VideoSizeParams.Builder.setOnlyClassDefaults(new AutoValue_CameraParams.Builder());
return setOnly... | FFmpegVideoRecorder | positive | 2,306 |
public void onDownloadFileFailure(String name) {
if (BuildConfig.DEBUG)
Log.d(TAG, "onDownloadFileFailure");
mFirebaseAnalytics.logEvent(MainConsts.FIREBASE_CUSTOM_EVENT_DOWNLOAD_FILE_FAILURE, null);
if (!MediaScanner.isMovie(name)) {
String sharePath = MediaScanner.getSharedMediaPathFromOrigName(name);
MediaScanner.re... | public void onDownloadFileFailure(String name) {
if (BuildConfig.DEBUG)
Log.d(TAG, "onDownloadFileFailure");
mFirebaseAnalytics.logEvent(MainConsts.FIREBASE_CUSTOM_EVENT_DOWNLOAD_FILE_FAILURE, null);
if (!MediaScanner.isMovie(name)) {
String sharePath = MediaScanner.getSharedMediaPathFromOrigName(name);
MediaScanner.re... | camarada-android-experiment | positive | 2,307 |
@Override
public String resolve(final PullRequest pullRequest, final PrnfbPullRequestAction prnfbPullRequestAction, final ApplicationUser applicationUser, final RepositoryService repositoryService, final ApplicationPropertiesService propertiesService, final PrnfbNotification prnfbNotification, final Map<PrnfbVariable, ... | @Override
public String resolve(final PullRequest pullRequest, final PrnfbPullRequestAction prnfbPullRequestAction, final ApplicationUser applicationUser, final RepositoryService repositoryService, final ApplicationPropertiesService propertiesService, final PrnfbNotification prnfbNotification, final Map<PrnfbVariable, ... | pull-request-notifier-for-bitbucket | positive | 2,309 |
public String dateToISOString(Date date) {
return formatter.format(date, getLocale());
} | public String dateToISOString(Date date) {
<DeepExtract>
return formatter.format(date, getLocale());
</DeepExtract>
} | openmrs-module-uiframework | positive | 2,311 |
public Criteria andNextRetryGreaterThanOrEqualTo(Date value) {
if (value == null) {
throw new RuntimeException("Value for " + "nextRetry" + " cannot be null");
}
criteria.add(new Criterion("next_retry >=", value));
return (Criteria) this;
} | public Criteria andNextRetryGreaterThanOrEqualTo(Date value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "nextRetry" + " cannot be null");
}
criteria.add(new Criterion("next_retry >=", value));
</DeepExtract>
return (Criteria) this;
} | cloud | positive | 2,312 |
@Test
public void testFilterByPathNoMatch() throws Exception {
return new FilterSorter(SEARCH_DISTANCE, TAG_LANDSCAPE, filterRepository, tagRepository, imageRepository, Paths.get("bar"));
cut.start();
cut.join();
assertThat(result, is(emptyMultiMap));
} | @Test
public void testFilterByPathNoMatch() throws Exception {
return new FilterSorter(SEARCH_DISTANCE, TAG_LANDSCAPE, filterRepository, tagRepository, imageRepository, Paths.get("bar"));
<DeepExtract>
cut.start();
cut.join();
</DeepExtract>
assertThat(result, is(emptyMultiMap));
} | similarImage | positive | 2,313 |
public static void loadModules(@Nonnull ASMDataTable table, boolean isClient) {
HashMap<String, Triple<String, String, String>> moduleData = new HashMap<>();
Set<String> enabled = new HashSet<>();
String annotationClassName = MCLoader.class.getCanonicalName();
Set<ASMData> asmDatas = new HashSet<>(table.getAll(annotati... | public static void loadModules(@Nonnull ASMDataTable table, boolean isClient) {
HashMap<String, Triple<String, String, String>> moduleData = new HashMap<>();
Set<String> enabled = new HashSet<>();
String annotationClassName = MCLoader.class.getCanonicalName();
Set<ASMData> asmDatas = new HashSet<>(table.getAll(annotati... | Mariculture | positive | 2,314 |
private void syncUserActionAndNotifyDispatcher(UserActionEntity userAction) {
mLogger.d(TAG, "syncUserActionAndNotifyDispatcher(); user action: " + userAction);
String entityType = userAction.getEntityType();
String actionType = userAction.getActionType();
boolean userActionSyncedSuccessfully = true;
try {
switch(entit... | private void syncUserActionAndNotifyDispatcher(UserActionEntity userAction) {
mLogger.d(TAG, "syncUserActionAndNotifyDispatcher(); user action: " + userAction);
String entityType = userAction.getEntityType();
String actionType = userAction.getActionType();
boolean userActionSyncedSuccessfully = true;
try {
switch(entit... | idocare-android | positive | 2,315 |
@Override
public void logout(Access access) {
if (access == null) {
throw new IllegalArgumentException("Parameter access cannot be empty.");
}
PrincipalInfo principalInfo = access.getPrincipalInfo();
if (principalInfo != null) {
this.onLogout(principalInfo);
}
Session session = access.getSession(false);
if (session != ... | @Override
public void logout(Access access) {
if (access == null) {
throw new IllegalArgumentException("Parameter access cannot be empty.");
}
PrincipalInfo principalInfo = access.getPrincipalInfo();
if (principalInfo != null) {
this.onLogout(principalInfo);
}
<DeepExtract>
Session session = access.getSession(false);
i... | easylimit | positive | 2,316 |
public static int[] readInts() {
String[] fields = readAllStrings();
int[] vals = new int[fields.length];
for (int i = 0; i < fields.length; i++) vals[i] = Integer.parseInt(fields[i]);
return vals;
} | public static int[] readInts() {
<DeepExtract>
String[] fields = readAllStrings();
int[] vals = new int[fields.length];
for (int i = 0; i < fields.length; i++) vals[i] = Integer.parseInt(fields[i]);
return vals;
</DeepExtract>
} | skeleton-sp18 | positive | 2,317 |
private void setSlice(final long i) {
if (i == currentHyperSliceIndex)
return;
else
changeSliceAccess((int) i);
} | private void setSlice(final long i) {
<DeepExtract>
if (i == currentHyperSliceIndex)
return;
else
changeSliceAccess((int) i);
</DeepExtract>
} | bigdataprocessor2 | positive | 2,319 |
public Builder clearSectionId() {
java.lang.Object ref = sectionId_;
if (ref instanceof java.lang.String) {
sectionId_ = (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sectionId_ = s;
sectionId_ = s;
}
onChanged();
retur... | public Builder clearSectionId() {
<DeepExtract>
java.lang.Object ref = sectionId_;
if (ref instanceof java.lang.String) {
sectionId_ = (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sectionId_ = s;
sectionId_ = s;
}
</De... | sharedstreets-builder | positive | 2,320 |
public Criteria andIdGreaterThan(Integer value) {
if (value == null) {
throw new RuntimeException("Value for " + "id" + " cannot be null");
}
criteria.add(new Criterion("id >", value));
return (Criteria) this;
} | public Criteria andIdGreaterThan(Integer value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "id" + " cannot be null");
}
criteria.add(new Criterion("id >", value));
</DeepExtract>
return (Criteria) this;
} | springcloud-e-book | positive | 2,321 |
public void visitType(@NotNull PonyType o) {
visitElement(o);
} | public void visitType(@NotNull PonyType o) {
<DeepExtract>
visitElement(o);
</DeepExtract>
} | intellij-pony | positive | 2,322 |
@Override
public LocaleContext resolveLocaleContext(final HttpServletRequest request) {
if (request.getAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME) == null) {
Cookie cookie = WebUtils.getCookie(request, getCookieName());
Locale locale = null;
TimeZone timeZone = null;
if (cookie != null) {
String value = cookie.getValue();... | @Override
public LocaleContext resolveLocaleContext(final HttpServletRequest request) {
<DeepExtract>
if (request.getAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME) == null) {
Cookie cookie = WebUtils.getCookie(request, getCookieName());
Locale locale = null;
TimeZone timeZone = null;
if (cookie != null) {
String value = cook... | jhipster-experimental-microservices | positive | 2,323 |
public List<String> getScopesSupported() {
return JsonUtil.get(docJson, SCOPES_SUPPORTED);
} | public List<String> getScopesSupported() {
<DeepExtract>
return JsonUtil.get(docJson, SCOPES_SUPPORTED);
</DeepExtract>
} | active-directory-b2c-android-native-appauth | positive | 2,324 |
public String getJobConfig() {
StringBuilder sb = new StringBuilder();
sb.append("job_id:").append(jobId);
sb.append(" status:").append(this.getStatusString(this.getStatus()));
sb.append(" taskcount:").append(this.getTaskCount());
sb.append(" starttime:").append(this.getStartTime());
sb.append(" lastTaskTime:").append(... | public String getJobConfig() {
<DeepExtract>
StringBuilder sb = new StringBuilder();
sb.append("job_id:").append(jobId);
sb.append(" status:").append(this.getStatusString(this.getStatus()));
sb.append(" taskcount:").append(this.getTaskCount());
sb.append(" starttime:").append(this.getStartTime());
sb.append(" lastTaskT... | lemongrenade | positive | 2,325 |
public Criteria andCouponTypeIn(List<Integer> values) {
if (values == null) {
throw new RuntimeException("Value for " + "couponType" + " cannot be null");
}
criteria.add(new Criterion("coupon_type in", values));
return (Criteria) this;
} | public Criteria andCouponTypeIn(List<Integer> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "couponType" + " cannot be null");
}
criteria.add(new Criterion("coupon_type in", values));
</DeepExtract>
return (Criteria) this;
} | oauth2-resource | positive | 2,326 |
private void drawLabel(Canvas canvas) {
float yAxisBtm = mCanvasH - mOffBtm;
int offset = DensityUtil.dp2px(1);
int valueH = Util.getTextHeight(mXValues.get(0), mTextPaint);
float xAxisTxt_Y = yAxisBtm + valueH + offset;
mXAxisTxt_Y = xAxisTxt_Y;
for (int i = 0; i < mXAxisCount; i++) {
key = mXValues.get(i);
int valueW... | private void drawLabel(Canvas canvas) {
float yAxisBtm = mCanvasH - mOffBtm;
int offset = DensityUtil.dp2px(1);
int valueH = Util.getTextHeight(mXValues.get(0), mTextPaint);
float xAxisTxt_Y = yAxisBtm + valueH + offset;
<DeepExtract>
mXAxisTxt_Y = xAxisTxt_Y;
</DeepExtract>
for (int i = 0; i < mXAxisCount; i++) {
key ... | WidgetCase | positive | 2,327 |
public ForeignKeyConstraintClause addRefColumns(Column... columns) {
_refColumns.addObjects(Converter.CUSTOM_COLUMN_TO_OBJ, (Object[]) columns);
return this;
} | public ForeignKeyConstraintClause addRefColumns(Column... columns) {
<DeepExtract>
_refColumns.addObjects(Converter.CUSTOM_COLUMN_TO_OBJ, (Object[]) columns);
return this;
</DeepExtract>
} | sqlbuilder | positive | 2,328 |
@Override
public Boolean component2() {
return (Boolean) get(1);
} | @Override
public Boolean component2() {
<DeepExtract>
return (Boolean) get(1);
</DeepExtract>
} | wdumper | positive | 2,329 |
@Override
public void delete(int memberId, int index) throws GondolaException {
double r = Math.random();
if (enabled && r < .001) {
throw new GondolaException(GondolaException.Code.ERROR, "Nasty exception for index=" + index);
}
return r;
storage.delete(memberId, index);
} | @Override
public void delete(int memberId, int index) throws GondolaException {
<DeepExtract>
double r = Math.random();
if (enabled && r < .001) {
throw new GondolaException(GondolaException.Code.ERROR, "Nasty exception for index=" + index);
}
return r;
</DeepExtract>
storage.delete(memberId, index);
} | gondola | positive | 2,330 |
@Override
public DataProcessor handleError(ByteChannel socketChannel, Throwable e) throws IOException {
Peer self = myContext.getPeersStorage().getSelf();
Handshake handshake = Handshake.craft(myTorrentHash.getInfoHash(), self.getPeerIdArray());
if (handshake == null) {
logger.warn("can not craft handshake message. Sel... | @Override
public DataProcessor handleError(ByteChannel socketChannel, Throwable e) throws IOException {
<DeepExtract>
Peer self = myContext.getPeersStorage().getSelf();
Handshake handshake = Handshake.craft(myTorrentHash.getInfoHash(), self.getPeerIdArray());
if (handshake == null) {
logger.warn("can not craft handshak... | ttorrent | positive | 2,331 |
@Override
public File get(String imageUri) {
String fileName = fileNameGenerator.generate(imageUri);
File dir = cacheDir;
if (!cacheDir.exists() && !cacheDir.mkdirs()) {
if (reserveCacheDir != null && (reserveCacheDir.exists() || reserveCacheDir.mkdirs())) {
dir = reserveCacheDir;
}
}
return new File(dir, fileName);
} | @Override
public File get(String imageUri) {
<DeepExtract>
String fileName = fileNameGenerator.generate(imageUri);
File dir = cacheDir;
if (!cacheDir.exists() && !cacheDir.mkdirs()) {
if (reserveCacheDir != null && (reserveCacheDir.exists() || reserveCacheDir.mkdirs())) {
dir = reserveCacheDir;
}
}
return new File(dir,... | KM-Popup-Image-Slider | positive | 2,332 |
public Criteria andARealNameIsNull() {
if ("a_real_name is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("a_real_name is null"));
return (Criteria) this;
} | public Criteria andARealNameIsNull() {
<DeepExtract>
if ("a_real_name is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("a_real_name is null"));
</DeepExtract>
return (Criteria) this;
} | webike | positive | 2,333 |
@Override
public void onStop() {
super.onStop();
if (users != null)
users.deleteObserver(this);
BusProvider.getInstance().unregister(this);
} | @Override
public void onStop() {
super.onStop();
<DeepExtract>
if (users != null)
users.deleteObserver(this);
</DeepExtract>
BusProvider.getInstance().unregister(this);
} | QuasselDroid | positive | 2,334 |
public static void loadImageSmall(SimpleDraweeView simpleDraweeView, String url) {
if (TextUtils.isEmpty(url) || simpleDraweeView == null) {
return;
}
Uri uri = Uri.parse(url);
ImageRequestBuilder imageRequestBuilder = ImageRequestBuilder.newBuilderWithSource(uri);
imageRequestBuilder.setRotationOptions(RotationOptions... | public static void loadImageSmall(SimpleDraweeView simpleDraweeView, String url) {
if (TextUtils.isEmpty(url) || simpleDraweeView == null) {
return;
}
Uri uri = Uri.parse(url);
<DeepExtract>
ImageRequestBuilder imageRequestBuilder = ImageRequestBuilder.newBuilderWithSource(uri);
imageRequestBuilder.setRotationOptions(R... | fresco-helper | positive | 2,335 |
public void setNClob(int parameterIndex, NClob value) throws SQLException {
setCharacterStream(parameterIndex, value.getCharacterStream());
} | public void setNClob(int parameterIndex, NClob value) throws SQLException {
<DeepExtract>
setCharacterStream(parameterIndex, value.getCharacterStream());
</DeepExtract>
} | cassandra-jdbc-driver | positive | 2,336 |
public static Field getFieldAnnotatedWith(Object object, Class<? extends Annotation> annotationType) {
assertObjectInGetInternalStateIsNotNull(object);
Field foundField = null;
final Class<?> originalStartClass = getType(object);
while (getType(object) != null) {
final Field[] declaredFields = getType(object).getDeclar... | public static Field getFieldAnnotatedWith(Object object, Class<? extends Annotation> annotationType) {
<DeepExtract>
assertObjectInGetInternalStateIsNotNull(object);
Field foundField = null;
final Class<?> originalStartClass = getType(object);
while (getType(object) != null) {
final Field[] declaredFields = getType(obj... | awaitility | positive | 2,337 |
@Test
public void resolveViewNameTabletDeviceNoSitePreferenceTabletPrefixAndSuffix() throws Exception {
device.setDeviceType(DeviceType.TABLET);
request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);
viewResolver.setTabletPrefix("tablet/");
viewResolver.setTabletSuffix(".tab");
expect(delegateViewResolver.... | @Test
public void resolveViewNameTabletDeviceNoSitePreferenceTabletPrefixAndSuffix() throws Exception {
device.setDeviceType(DeviceType.TABLET);
request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);
viewResolver.setTabletPrefix("tablet/");
viewResolver.setTabletSuffix(".tab");
<DeepExtract>
expect(delegat... | spring-mobile | positive | 2,338 |
public ElementValue css(String css) {
new CssSelector(css).setSource(source);
actions.add(new CssSelector(css));
return new ElementValue(this, field);
} | public ElementValue css(String css) {
<DeepExtract>
new CssSelector(css).setSource(source);
actions.add(new CssSelector(css));
return new ElementValue(this, field);
</DeepExtract>
} | Elise | positive | 2,340 |
@Override
protected boolean matches(Object item, Description mismatch) {
Object actual;
try {
actual = field.get(item);
} catch (Exception e) {
throw new AssertionError(format("IllegalAccess, reading field '%s' from %s", field.getName(), item));
}
if (!matcher.matches(actual)) {
mismatch.appendText("'").appendText(fiel... | @Override
protected boolean matches(Object item, Description mismatch) {
<DeepExtract>
Object actual;
try {
actual = field.get(item);
} catch (Exception e) {
throw new AssertionError(format("IllegalAccess, reading field '%s' from %s", field.getName(), item));
}
</DeepExtract>
if (!matcher.matches(actual)) {
mismatch.ap... | JavaHamcrest | positive | 2,341 |
public void actionPerformed(java.awt.event.ActionEvent evt) {
setElement(btn_Al, 13, 28, 0, 27);
} | public void actionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
setElement(btn_Al, 13, 28, 0, 27);
</DeepExtract>
} | ERSN-OpenMC | positive | 2,342 |
private void onFoundReconnectionPeripheral(@NotNull final BluetoothPeripheral peripheral) {
final String peripheralAddress = peripheral.getAddress();
final BluetoothPeripheralCallback peripheralCallback = reconnectCallbacks.get(peripheralAddress);
logger.info(String.format("found peripheral to autoconnect '%s'", periph... | private void onFoundReconnectionPeripheral(@NotNull final BluetoothPeripheral peripheral) {
final String peripheralAddress = peripheral.getAddress();
final BluetoothPeripheralCallback peripheralCallback = reconnectCallbacks.get(peripheralAddress);
logger.info(String.format("found peripheral to autoconnect '%s'", periph... | blessed-bluez | positive | 2,343 |
public Criteria andIsmenuEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "ismenu" + " cannot be null");
}
criteria.add(new Criterion("ISMENU =", value));
return (Criteria) this;
} | public Criteria andIsmenuEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "ismenu" + " cannot be null");
}
criteria.add(new Criterion("ISMENU =", value));
</DeepExtract>
return (Criteria) this;
} | console | positive | 2,344 |
public static int createdmesgInfo(FlatBufferBuilder builder, byte level, long seconds, int message) {
builder.startObject(3);
builder.addLong(1, seconds, 0);
builder.addOffset(2, message, 0);
builder.addByte(0, level, 6);
int o = builder.endObject();
return o;
} | public static int createdmesgInfo(FlatBufferBuilder builder, byte level, long seconds, int message) {
builder.startObject(3);
builder.addLong(1, seconds, 0);
builder.addOffset(2, message, 0);
builder.addByte(0, level, 6);
<DeepExtract>
int o = builder.endObject();
return o;
</DeepExtract>
} | OSMonitor | positive | 2,345 |
protected boolean removeEldestEntry(Map.Entry eldest) {
if (removalPolicy != null && eldest != null) {
Stack locals = new Stack();
locals.push(eldest.getValue());
locals.push(SleepUtils.getScalar(eldest.getKey().toString()));
locals.push(SleepUtils.getHashScalar(this));
Scalar value = removalPolicy.callClosure("remove"... | protected boolean removeEldestEntry(Map.Entry eldest) {
<DeepExtract>
if (removalPolicy != null && eldest != null) {
Stack locals = new Stack();
locals.push(eldest.getValue());
locals.push(SleepUtils.getScalar(eldest.getKey().toString()));
locals.push(SleepUtils.getHashScalar(this));
Scalar value = removalPolicy.callCl... | sleep | positive | 2,346 |
private void jMenuItemDeleteActionPerformed(java.awt.event.ActionEvent evt) {
int index = jTableHTTPHeaders.getSelectedRow();
manager.HTTPheaders.removeElementAt(index);
httpHeaderTableModel = new HTTPHeaderTableModel(this.manager.getHTTPHeaders());
jTableHTTPHeaders.setModel(httpHeaderTableModel);
htmlParseTableModel ... | private void jMenuItemDeleteActionPerformed(java.awt.event.ActionEvent evt) {
int index = jTableHTTPHeaders.getSelectedRow();
manager.HTTPheaders.removeElementAt(index);
<DeepExtract>
httpHeaderTableModel = new HTTPHeaderTableModel(this.manager.getHTTPHeaders());
jTableHTTPHeaders.setModel(httpHeaderTableModel);
htmlPa... | DirBuster | positive | 2,347 |
@Override
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) {
if (thumbBounds.isEmpty() || !scrollbar.isEnabled()) {
return;
}
g.translate(thumbBounds.x, thumbBounds.y);
final boolean vertical = isVertical();
int hGap = vertical ? 2 : 1;
int vGap = vertical ? 1 : 2;
int w = adjustThumbWidth(thu... | @Override
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) {
if (thumbBounds.isEmpty() || !scrollbar.isEnabled()) {
return;
}
g.translate(thumbBounds.x, thumbBounds.y);
<DeepExtract>
final boolean vertical = isVertical();
int hGap = vertical ? 2 : 1;
int vGap = vertical ? 1 : 2;
int w = adjust... | SequencePlugin | positive | 2,348 |
protected void initView(View view) {
mBackImageView = view.findViewById(R.id.iv_back);
mLineView = view.findViewById(R.id.view_line);
mFinishImageView = view.findViewById(R.id.iv_finish);
mTitleTextView = view.findViewById(R.id.toolbar_title);
mBackImageView.setOnClickListener(mOnClickListener);
mFinishImageView.setOnC... | protected void initView(View view) {
mBackImageView = view.findViewById(R.id.iv_back);
mLineView = view.findViewById(R.id.view_line);
mFinishImageView = view.findViewById(R.id.iv_finish);
mTitleTextView = view.findViewById(R.id.toolbar_title);
mBackImageView.setOnClickListener(mOnClickListener);
mFinishImageView.setOnC... | CloudBlindDate | positive | 2,349 |
public void retrievePlayerInfo(long queueId) {
JsonObject object = new JsonObject();
object.addProperty("queueId", queueId);
return client.sendRpcAndWait(SERVICE, "call", uuid, mode.name(), "retrievePlayerInfoV3", new JsonObject().toString());
} | public void retrievePlayerInfo(long queueId) {
JsonObject object = new JsonObject();
object.addProperty("queueId", queueId);
<DeepExtract>
return client.sendRpcAndWait(SERVICE, "call", uuid, mode.name(), "retrievePlayerInfoV3", new JsonObject().toString());
</DeepExtract>
} | riotapi | positive | 2,350 |
public static void main(String[] args) {
SpeedMonitor1 monitor = new SpeedMonitor1();
Speedometer1 speedo = new Speedometer1();
speedo.addObserver(monitor);
speedo.addObserver(new AutomaticGearbox());
speedo.setCurrentSpeed(50);
speedo.setCurrentSpeed(70);
speedo.setCurrentSpeed(40);
speedo.setCurrentSpeed(100);
speedo... | public static void main(String[] args) {
SpeedMonitor1 monitor = new SpeedMonitor1();
Speedometer1 speedo = new Speedometer1();
speedo.addObserver(monitor);
speedo.addObserver(new AutomaticGearbox());
speedo.setCurrentSpeed(50);
speedo.setCurrentSpeed(70);
speedo.setCurrentSpeed(40);
speedo.setCurrentSpeed(100);
speedo... | jdpe2 | positive | 2,351 |
@BeforeMethod
public void setUp() throws IOException {
tempFiles = new TempFiles();
communicationManagerList = new ArrayList<CommunicationManager>();
Logger.getRootLogger().setLevel(Utils.getLogLevel());
int port = 6969;
this.tracker = new Tracker(port, "http://" + InetAddress.getLocalHost().getHostAddress() + ":" + po... | @BeforeMethod
public void setUp() throws IOException {
tempFiles = new TempFiles();
communicationManagerList = new ArrayList<CommunicationManager>();
Logger.getRootLogger().setLevel(Utils.getLogLevel());
<DeepExtract>
int port = 6969;
this.tracker = new Tracker(port, "http://" + InetAddress.getLocalHost().getHostAddres... | ttorrent | positive | 2,352 |
@Override
public void onServiceConnected(ComponentName name, IBinder binder) {
mBinder = (DownloadManagerService.DMBinder) binder;
mManager = setupDownloadManager(mBinder);
mAdapter = new MissionAdapter(mActivity, mBinder, mManager, mLinear);
if (mLinear) {
mList.setLayoutManager(mLinearManager);
} else {
mList.setLayo... | @Override
public void onServiceConnected(ComponentName name, IBinder binder) {
mBinder = (DownloadManagerService.DMBinder) binder;
mManager = setupDownloadManager(mBinder);
<DeepExtract>
mAdapter = new MissionAdapter(mActivity, mBinder, mManager, mLinear);
if (mLinear) {
mList.setLayoutManager(mLinearManager);
} else {... | Float-Tube | positive | 2,353 |
@Override
public void onDestroy() {
super.onDestroy();
if (unreadTask != null) {
try {
if (unreadTask.isRunning())
unreadTask.cancel(true);
} catch (NullPointerException ignored) {
}
}
if (markAsReadTask != null) {
try {
if (markAsReadTask.isRunning())
markAsReadTask.cancel(true);
} catch (NullPointerException ignored)... | @Override
public void onDestroy() {
super.onDestroy();
<DeepExtract>
if (unreadTask != null) {
try {
if (unreadTask.isRunning())
unreadTask.cancel(true);
} catch (NullPointerException ignored) {
}
}
</DeepExtract>
if (markAsReadTask != null) {
try {
if (markAsReadTask.isRunning())
markAsReadTask.cancel(true);
} catch (... | mTHMMY | positive | 2,354 |
public void changedUpdate(DocumentEvent e) {
clickSaveConnection.setVisible(true);
DIRTY_ITEM = (String) comboConnectionList.getSelectedItem();
SAVE_NEEDED = true;
} | public void changedUpdate(DocumentEvent e) {
<DeepExtract>
clickSaveConnection.setVisible(true);
DIRTY_ITEM = (String) comboConnectionList.getSelectedItem();
SAVE_NEEDED = true;
</DeepExtract>
} | HBase-Manager | positive | 2,355 |
public static void mergearray(int[] arr1, int[] arr2) {
int i = arr1.length - 1, j = 0;
int i = arr1.length - 1, j = 0;
while (i >= 0 && j < arr2.length) {
if (arr1[i] > arr2[j]) {
int temp = arr1[i];
arr1[i] = arr2[j];
arr2[j] = temp;
i--;
j++;
} else {
break;
}
}
for (int i = 0; i < arr1.length - 1; i++) {
if (arr1[i... | public static void mergearray(int[] arr1, int[] arr2) {
int i = arr1.length - 1, j = 0;
int i = arr1.length - 1, j = 0;
while (i >= 0 && j < arr2.length) {
if (arr1[i] > arr2[j]) {
int temp = arr1[i];
arr1[i] = arr2[j];
arr2[j] = temp;
i--;
j++;
} else {
break;
}
}
for (int i = 0; i < arr1.length - 1; i++) {
if (arr1[i... | Java-Solutions | positive | 2,356 |
public Criteria andItemsnumLessThan(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "itemsnum" + " cannot be null");
}
criteria.add(new Criterion("itemsNum <", value));
return (Criteria) this;
} | public Criteria andItemsnumLessThan(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "itemsnum" + " cannot be null");
}
criteria.add(new Criterion("itemsNum <", value));
</DeepExtract>
return (Criteria) this;
} | Maven-Spring-SpringMVC-Mybatis | positive | 2,357 |
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
if (hasMultiTouch)
return false;
if (!imgLargeWidth && !imgLargeHeight)
return false;
if (mTranslate.isRunning)
return false;
float vx = velocityX;
float vy = velocityY;
if (Math.round(mImgRect.left) >= mCropRect.left |... | @Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
if (hasMultiTouch)
return false;
if (!imgLargeWidth && !imgLargeHeight)
return false;
if (mTranslate.isRunning)
return false;
float vx = velocityX;
float vy = velocityY;
if (Math.round(mImgRect.left) >= mCropRect.left |... | BaseDemo | positive | 2,358 |
public Criteria andNumberIsNull() {
if ("number is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("number is null"));
return (Criteria) this;
} | public Criteria andNumberIsNull() {
<DeepExtract>
if ("number is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("number is null"));
</DeepExtract>
return (Criteria) this;
} | BookLibrarySystem | positive | 2,359 |
public synchronized UploadRequest<T> option(String name, Object value) {
if (dispatched) {
throw new IllegalStateException("Request already dispatched");
}
if (options == null) {
synchronized (optionsLockObject) {
if (options == null) {
options = new HashMap<>();
}
}
}
options.put(name, value);
return this;
} | public synchronized UploadRequest<T> option(String name, Object value) {
if (dispatched) {
throw new IllegalStateException("Request already dispatched");
}
<DeepExtract>
if (options == null) {
synchronized (optionsLockObject) {
if (options == null) {
options = new HashMap<>();
}
}
}
</DeepExtract>
options.put(name, val... | cloudinary_android | positive | 2,360 |
private List<Item> tree2List(final Class<? extends Item> cla, final SmartForest<Item> forest) throws InstantiationException, IllegalAccessException {
final List<Item> all = new ArrayList<Item>();
final SmartForest<Item>[] branches = forest.getBranches();
if (branches == null) {
return;
}
for (final SmartForest<Item> br... | private List<Item> tree2List(final Class<? extends Item> cla, final SmartForest<Item> forest) throws InstantiationException, IllegalAccessException {
final List<Item> all = new ArrayList<Item>();
<DeepExtract>
final SmartForest<Item>[] branches = forest.getBranches();
if (branches == null) {
return;
}
for (final SmartF... | nlp-lang | positive | 2,361 |
public E poll(long timeout, TimeUnit unit) throws InterruptedException {
long nanos = unit.toNanos(timeout);
final ReentrantLock lock = this.lock;
lock.lockInterruptibly();
try {
E x;
while ((x = unlinkFirst()) == null) {
if (nanos <= 0)
return null;
nanos = notEmpty.awaitNanos(nanos);
}
return x;
} finally {
lock.unlo... | public E poll(long timeout, TimeUnit unit) throws InterruptedException {
<DeepExtract>
long nanos = unit.toNanos(timeout);
final ReentrantLock lock = this.lock;
lock.lockInterruptibly();
try {
E x;
while ((x = unlinkFirst()) == null) {
if (nanos <= 0)
return null;
nanos = notEmpty.awaitNanos(nanos);
}
return x;
} final... | Android-Universal-Image-Loader-Modify | positive | 2,362 |
public static CarsDao carsDao() {
try {
Class<CarsDao> carsDaoClass = (Class<CarsDao>) Class.forName(properties.getProperty("dao.cars.classname"));
Constructor<CarsDao> carsDaoConstructor = carsDaoClass.getConstructor(DataSource.class);
return carsDaoConstructor.newInstance(dataSource());
} catch (ReflectiveOperationEx... | public static CarsDao carsDao() {
<DeepExtract>
try {
Class<CarsDao> carsDaoClass = (Class<CarsDao>) Class.forName(properties.getProperty("dao.cars.classname"));
Constructor<CarsDao> carsDaoConstructor = carsDaoClass.getConstructor(DataSource.class);
return carsDaoConstructor.newInstance(dataSource());
} catch (Reflect... | JAVA_IT_PARK_WORK_3 | positive | 2,363 |
private ObjectFormatter initFormatterForType(Class<?> fieldClazz, String[] params) {
if (fieldClazz.equals(String.class) || List.class.isAssignableFrom(fieldClazz)) {
return null;
}
Class<? extends ObjectFormatter> formatterClass = ObjectFormatters.get(BasicTypeFormatter.detectBasicClass(fieldClazz));
if (formatterClas... | private ObjectFormatter initFormatterForType(Class<?> fieldClazz, String[] params) {
if (fieldClazz.equals(String.class) || List.class.isAssignableFrom(fieldClazz)) {
return null;
}
Class<? extends ObjectFormatter> formatterClass = ObjectFormatters.get(BasicTypeFormatter.detectBasicClass(fieldClazz));
if (formatterClas... | webmagic | positive | 2,364 |
public void disconnect() {
reportReader.shutdown();
try {
if (!reportReader.awaitTermination(1000, TimeUnit.MILLISECONDS)) {
this.interrupt();
}
} catch (InterruptedException e2) {
logger.catching(e2);
}
functionLock.lock();
reportReader.shutdownNow();
try {
sendCommand("d");
} catch (InvalidKeyException | IOException ... | public void disconnect() {
reportReader.shutdown();
try {
if (!reportReader.awaitTermination(1000, TimeUnit.MILLISECONDS)) {
this.interrupt();
}
} catch (InterruptedException e2) {
logger.catching(e2);
}
functionLock.lock();
reportReader.shutdownNow();
try {
sendCommand("d");
} catch (InvalidKeyException | IOException ... | FoxTrotUpscaler | positive | 2,365 |
@Override
public void windowClosing(WindowEvent e) {
dispose();
} | @Override
public void windowClosing(WindowEvent e) {
<DeepExtract>
dispose();
</DeepExtract>
} | WeblocOpener | positive | 2,366 |
public static void loadMessageDataWithPayloadAtDefaultOffset(byte[] messageData, byte[] target, byte[] site, Bool8 device) {
int offset = PAYLOAD_OFFSET;
byte[] memberData;
memberData = target;
for (int i = 0; i < (memberData.length); i++) {
messageData[(offset + i)] = memberData[i];
}
offset += memberData.length;
memb... | public static void loadMessageDataWithPayloadAtDefaultOffset(byte[] messageData, byte[] target, byte[] site, Bool8 device) {
int offset = PAYLOAD_OFFSET;
<DeepExtract>
byte[] memberData;
memberData = target;
for (int i = 0; i < (memberData.length); i++) {
messageData[(offset + i)] = memberData[i];
}
offset += memberDat... | lifx-sdk-android | positive | 2,367 |
@Override
public void onSaveVideoSuccess(String filePath) {
Log.i(TAG, "save edit success filePath: " + filePath);
mProcessingDialog.dismiss();
Intent intent = new Intent(VideoEditActivity.this, VideoEditActivity.class);
intent.putExtra(MP4_PATH, filePath);
VideoEditActivity.this.startActivity(intent);
} | @Override
public void onSaveVideoSuccess(String filePath) {
Log.i(TAG, "save edit success filePath: " + filePath);
mProcessingDialog.dismiss();
<DeepExtract>
Intent intent = new Intent(VideoEditActivity.this, VideoEditActivity.class);
intent.putExtra(MP4_PATH, filePath);
VideoEditActivity.this.startActivity(intent);
</... | eden | positive | 2,368 |
public QueryRow setEventLocation(Object obj) {
mRow.put(CalendarContract.Instances.EVENT_LOCATION, new TypedValue(obj));
return this;
} | public QueryRow setEventLocation(Object obj) {
<DeepExtract>
mRow.put(CalendarContract.Instances.EVENT_LOCATION, new TypedValue(obj));
return this;
</DeepExtract>
} | calendar-widget | positive | 2,370 |
public Criteria andShorepicBetween(String value1, String value2) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "shorepic" + " cannot be null");
}
criteria.add(new Criterion("shorePic between", value1, value2));
return (Criteria) this;
} | public Criteria andShorepicBetween(String value1, String value2) {
<DeepExtract>
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "shorepic" + " cannot be null");
}
criteria.add(new Criterion("shorePic between", value1, value2));
</DeepExtract>
return (Criteria) this;
} | Ordering | positive | 2,371 |
public void loadIrregular(InputStream inputStream) {
this.init();
this.table.load(inputStream + File.separator + FILENAME.POS_TABLE);
this.observation.load(inputStream + File.separator + FILENAME.OBSERVATION);
this.transition.load(inputStream + File.separator + FILENAME.TRANSITION);
this.irrTrie.load(inputStream + File... | public void loadIrregular(InputStream inputStream) {
<DeepExtract>
this.init();
this.table.load(inputStream + File.separator + FILENAME.POS_TABLE);
this.observation.load(inputStream + File.separator + FILENAME.OBSERVATION);
this.transition.load(inputStream + File.separator + FILENAME.TRANSITION);
this.irrTrie.load(inpu... | KOMORAN | positive | 2,372 |
public void notifyCreated(String itemPath, String clientId) {
itemPath = StringUtil.trimEnd(StringUtil.trimStart(itemPath, "/"), "/");
final TextMessage textMessage = new TextMessage(new Notification(itemPath, "created").toString());
send(clientId, textMessage);
} | public void notifyCreated(String itemPath, String clientId) {
<DeepExtract>
itemPath = StringUtil.trimEnd(StringUtil.trimStart(itemPath, "/"), "/");
final TextMessage textMessage = new TextMessage(new Notification(itemPath, "created").toString());
send(clientId, textMessage);
</DeepExtract>
} | WebDAVServerSamplesJava | positive | 2,373 |
public static DefaultFuture newFuture(Channel channel, Request request, int timeout) {
final DefaultFuture future = new DefaultFuture(channel, request, timeout);
return future;
} | public static DefaultFuture newFuture(Channel channel, Request request, int timeout) {
<DeepExtract>
</DeepExtract>
final DefaultFuture future = new DefaultFuture(channel, request, timeout);
<DeepExtract>
</DeepExtract>
return future;
<DeepExtract>
</DeepExtract>
} | netty-action | positive | 2,374 |
public void setShadowLayer(float radius, float dx, float dy, int color) {
super.setShadowLayer(radius, dx, dy, color);
mBorderSize = radius;
mBorderColor = color;
requestLayout();
invalidate();
mTextPaint = new TextPaint();
mTextPaint.setAntiAlias(true);
mTextPaint.setTextSize(getTextSize());
mTextPaint.setColor(mColor... | public void setShadowLayer(float radius, float dx, float dy, int color) {
super.setShadowLayer(radius, dx, dy, color);
mBorderSize = radius;
mBorderColor = color;
requestLayout();
invalidate();
<DeepExtract>
mTextPaint = new TextPaint();
mTextPaint.setAntiAlias(true);
mTextPaint.setTextSize(getTextSize());
mTextPaint.s... | MD-BiliBili | positive | 2,375 |
public void visitFeature(FeatureTree tree) {
Iterator<Tree> childrenIterator = tree.childrenIterator();
Tree child;
while (childrenIterator.hasNext()) {
child = childrenIterator.next();
if (child != null) {
child.accept(this);
}
}
} | public void visitFeature(FeatureTree tree) {
<DeepExtract>
Iterator<Tree> childrenIterator = tree.childrenIterator();
Tree child;
while (childrenIterator.hasNext()) {
child = childrenIterator.next();
if (child != null) {
child.accept(this);
}
}
</DeepExtract>
} | sonar-gherkin-plugin | positive | 2,376 |
public SQL function(String function, String column) {
keywords.add(function);
lastCall = KEYWORD;
return this;
lastCall = FUNCTION;
lastCall = "_OPEN_PAREN_";
return chars("(");
smartCommaFnField();
openParen();
field(column);
closeParen();
lastCall = FIELD;
return this;
lastCall = "_CLOSE_PAREN_";
return chars(")");
l... | public SQL function(String function, String column) {
keywords.add(function);
lastCall = KEYWORD;
return this;
lastCall = FUNCTION;
lastCall = "_OPEN_PAREN_";
return chars("(");
smartCommaFnField();
openParen();
field(column);
closeParen();
lastCall = FIELD;
return this;
<DeepExtract>
lastCall = "_CLOSE_PAREN_";
return... | java-crud-api | positive | 2,378 |
public String getExpressionSummary() {
StringBuilder buf = new StringBuilder();
buf.append("seconds: ");
buf.append(getExpressionSetSummary(seconds));
buf.append("\n");
buf.append("minutes: ");
buf.append(getExpressionSetSummary(minutes));
buf.append("\n");
buf.append("hours: ");
buf.append(getExpressionSetSummary(hour... | public String getExpressionSummary() {
StringBuilder buf = new StringBuilder();
buf.append("seconds: ");
buf.append(getExpressionSetSummary(seconds));
buf.append("\n");
buf.append("minutes: ");
buf.append(getExpressionSetSummary(minutes));
buf.append("\n");
buf.append("hours: ");
buf.append(getExpressionSetSummary(hour... | java-bucket | positive | 2,379 |
@Test
public void testAddCommand() {
catalog.addCommand("AddingCommand", new AddingCommand("", null));
catalog.addCommand("DelegatingCommand", new DelegatingCommand(""));
catalog.addCommand("DelegatingFilter", new DelegatingFilter("", ""));
catalog.addCommand("ExceptionCommand", new ExceptionCommand(""));
catalog.addCo... | @Test
public void testAddCommand() {
<DeepExtract>
catalog.addCommand("AddingCommand", new AddingCommand("", null));
catalog.addCommand("DelegatingCommand", new DelegatingCommand(""));
catalog.addCommand("DelegatingFilter", new DelegatingFilter("", ""));
catalog.addCommand("ExceptionCommand", new ExceptionCommand(""));... | commons-chain | positive | 2,380 |
@Override
public Long value1() {
return (Long) get(0);
} | @Override
public Long value1() {
<DeepExtract>
return (Long) get(0);
</DeepExtract>
} | openvsx | positive | 2,381 |
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_player);
mMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(mMetrics);
mVideoView = (VideoView) findViewById(R.id.videoView);
mStartText = (TextView) findViewB... | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_player);
mMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(mMetrics);
mVideoView = (VideoView) findViewById(R.id.videoView);
mStartText = (TextView) findViewB... | BuildingForAndroidTV | positive | 2,382 |
public static VertxCradlePlatform createDefaultInstance() {
if (cradlePlatform != null) {
cradlePlatform.shutdown();
cradlePlatform = null;
}
JsonDocumentReaderWriter jdrw = new JsonDocumentReaderWriter();
createVertxEnviornmentVariables();
platform = PlatformLocator.factory.createPlatformManager(port, host);
vertx = p... | public static VertxCradlePlatform createDefaultInstance() {
if (cradlePlatform != null) {
cradlePlatform.shutdown();
cradlePlatform = null;
}
JsonDocumentReaderWriter jdrw = new JsonDocumentReaderWriter();
<DeepExtract>
createVertxEnviornmentVariables();
platform = PlatformLocator.factory.createPlatformManager(port, ho... | platform | positive | 2,383 |
public static byte[] selectPSE() {
return Iso7816Commands.selectByDFName(Util.fromHexString("31 50 41 59 2E 53 59 53 2E 44 44 46 30 31"), true, (byte) 0x00);
} | public static byte[] selectPSE() {
<DeepExtract>
return Iso7816Commands.selectByDFName(Util.fromHexString("31 50 41 59 2E 53 59 53 2E 44 44 46 30 31"), true, (byte) 0x00);
</DeepExtract>
} | javaemvreader | positive | 2,384 |
public void prepare() {
if (rendererBuildingState == RENDERER_BUILDING_STATE_BUILT) {
player.stop();
}
rendererBuilder.cancel();
videoFormat = null;
videoRenderer = null;
rendererBuildingState = RENDERER_BUILDING_STATE_BUILDING;
boolean playWhenReady = player.getPlayWhenReady();
int playbackState = getPlaybackState();
... | public void prepare() {
if (rendererBuildingState == RENDERER_BUILDING_STATE_BUILT) {
player.stop();
}
rendererBuilder.cancel();
videoFormat = null;
videoRenderer = null;
rendererBuildingState = RENDERER_BUILDING_STATE_BUILDING;
<DeepExtract>
boolean playWhenReady = player.getPlayWhenReady();
int playbackState = getPla... | androidtv-sample-inputs | positive | 2,385 |
public Criteria andC_enableNotEqualTo(Boolean value) {
if (value == null) {
throw new RuntimeException("Value for " + "c_enable" + " cannot be null");
}
criteria.add(new Criterion("c_enable <>", value));
return (Criteria) this;
} | public Criteria andC_enableNotEqualTo(Boolean value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "c_enable" + " cannot be null");
}
criteria.add(new Criterion("c_enable <>", value));
</DeepExtract>
return (Criteria) this;
} | BaiChengNews | positive | 2,386 |
public Criteria andCoursenameNotEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "coursename" + " cannot be null");
}
criteria.add(new Criterion("courseName <>", value));
return (Criteria) this;
} | public Criteria andCoursenameNotEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "coursename" + " cannot be null");
}
criteria.add(new Criterion("courseName <>", value));
</DeepExtract>
return (Criteria) this;
} | examination_system- | positive | 2,387 |
public static BoxType parse(String typeString) {
try {
type = BoxType.valueOf(typeString.toUpperCase());
} catch (Exception e) {
type = UNKNOWN;
}
this.typeString = typeString;
return type;
} | public static BoxType parse(String typeString) {
try {
type = BoxType.valueOf(typeString.toUpperCase());
} catch (Exception e) {
type = UNKNOWN;
}
<DeepExtract>
this.typeString = typeString;
</DeepExtract>
return type;
} | flazr | positive | 2,388 |
void completeFields() {
text = "";
for (Name name : person.getNames()) {
text += U.firstAndLastName(name, " ") + " ";
}
for (EventFact event : person.getEventsFacts()) {
if (!("SEX".equals(event.getTag()) || "Y".equals(event.getValue())))
text += ProfileFactsFragment.writeEventText(event) + " ";
}
text = text.toLowerCa... | void completeFields() {
text = "";
for (Name name : person.getNames()) {
text += U.firstAndLastName(name, " ") + " ";
}
for (EventFact event : person.getEventsFacts()) {
if (!("SEX".equals(event.getTag()) || "Y".equals(event.getValue())))
text += ProfileFactsFragment.writeEventText(event) + " ";
}
text = text.toLowerCa... | FamilyGem | positive | 2,389 |
public void subscribe(String channelName, Handler handler) {
if (runner != null && !internalIsSubscribed(channelName)) {
runner.subscribe(channelName);
}
if (channels.containsKey(channelName)) {
Handler h = channels.get(channelName);
if (h instanceof MultiHandler) {
MultiHandler mh = (MultiHandler) h;
mh.add(handler);
... | public void subscribe(String channelName, Handler handler) {
if (runner != null && !internalIsSubscribed(channelName)) {
runner.subscribe(channelName);
}
<DeepExtract>
if (channels.containsKey(channelName)) {
Handler h = channels.get(channelName);
if (h instanceof MultiHandler) {
MultiHandler mh = (MultiHandler) h;
mh.... | oocsi | positive | 2,390 |
public Then thenCase() {
methodNode.instructions.add(new JumpInsnNode(GOTO, endIf));
if (logger.isLoggable(Level.FINE)) {
String s = "";
new JumpInsnNode(GOTO, endIf).accept(methodVisitor);
List<String> text = methodVisitor.getText();
for (; currentOp < text.size(); currentOp++) {
String t = text.get(currentOp);
while ... | public Then thenCase() {
methodNode.instructions.add(new JumpInsnNode(GOTO, endIf));
if (logger.isLoggable(Level.FINE)) {
String s = "";
new JumpInsnNode(GOTO, endIf).accept(methodVisitor);
List<String> text = methodVisitor.getText();
for (; currentOp < text.size(); currentOp++) {
String t = text.get(currentOp);
while ... | brennus | positive | 2,391 |
public void sendReset() throws IOException {
out.write(CMD_RESET.getBytes());
out.write(ln);
out.flush();
try {
Thread.sleep(5000);
} catch (InterruptedException ignored) {
}
} | public void sendReset() throws IOException {
<DeepExtract>
out.write(CMD_RESET.getBytes());
out.write(ln);
out.flush();
</DeepExtract>
try {
Thread.sleep(5000);
} catch (InterruptedException ignored) {
}
} | JErgometer | positive | 2,392 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.