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 public void onBindViewHolder(ViewHolder holder, int position) { Glide.with(MyApplication.applicationContext).load(mList.get(position).getUrl()).crossFade(500).placeholder(R.mipmap.item_bg).diskCacheStrategy(DiskCacheStrategy.SOURCE).into(mImg); holder.mImg.setOnClickListener(v -> { if (mListener != null) { mL...
@Override public void onBindViewHolder(ViewHolder holder, int position) { <DeepExtract> Glide.with(MyApplication.applicationContext).load(mList.get(position).getUrl()).crossFade(500).placeholder(R.mipmap.item_bg).diskCacheStrategy(DiskCacheStrategy.SOURCE).into(mImg); </DeepExtract> holder.mImg.setOnClickListener(v -> ...
DingDingMap
positive
1,412
public int read(char[] cbuf, int off, int len) throws IOException { if (internalIn2 != null) return; String encoding; byte[] bom = new byte[BOM_SIZE]; int n, unread; n = internalIn.read(bom, 0, bom.length); if ((bom[0] == (byte) 0x00) && (bom[1] == (byte) 0x00) && (bom[2] == (byte) 0xFE) && (bom[3] == (byte) 0xFF)) { e...
public int read(char[] cbuf, int off, int len) throws IOException { <DeepExtract> if (internalIn2 != null) return; String encoding; byte[] bom = new byte[BOM_SIZE]; int n, unread; n = internalIn.read(bom, 0, bom.length); if ((bom[0] == (byte) 0x00) && (bom[1] == (byte) 0x00) && (bom[2] == (byte) 0xFE) && (bom[3] == (by...
YGORoid
positive
1,413
public static void errPrintln(Object msg) { System.out.println(msg); }
public static void errPrintln(Object msg) { <DeepExtract> System.out.println(msg); </DeepExtract> }
lmntal-compiler
positive
1,414
private void putEntry(String key, CacheHeader entry) { if (!mEntries.containsKey(key)) { mTotalSize += entry.size; } else { CacheHeader oldEntry = mEntries.get(key); mTotalSize += (entry.size - oldEntry.size); } pruneIfNeeded(entry.data.length); File file = getFileForKey(key); try { BufferedOutputStream fos = new Buffe...
private void putEntry(String key, CacheHeader entry) { if (!mEntries.containsKey(key)) { mTotalSize += entry.size; } else { CacheHeader oldEntry = mEntries.get(key); mTotalSize += (entry.size - oldEntry.size); } <DeepExtract> pruneIfNeeded(entry.data.length); File file = getFileForKey(key); try { BufferedOutputStream f...
BaoDian
positive
1,415
public final void removeLatencies() { for (Component c : getComponents()) c.setLatency(0); calculateAccumulatedLatencies(false); determineClockPeriodAndFrequency(); if (isPerformanceInstructionDependent()) calculateAccumulatedLatencies(true); determineCriticalPath(); }
public final void removeLatencies() { for (Component c : getComponents()) c.setLatency(0); <DeepExtract> calculateAccumulatedLatencies(false); determineClockPeriodAndFrequency(); if (isPerformanceInstructionDependent()) calculateAccumulatedLatencies(true); determineCriticalPath(); </DeepExtract> }
drmips
positive
1,416
public void actionPerformed(java.awt.event.ActionEvent evt) { if (!UiUtils.showQuestionDialog(Bundle.CommentPanel_message_delete_issue())) { return; } isDeleted = true; firePropertyChange(CommentsPanel.PROP_COMMENT_DELETED, null, null); }
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> if (!UiUtils.showQuestionDialog(Bundle.CommentPanel_message_delete_issue())) { return; } isDeleted = true; firePropertyChange(CommentsPanel.PROP_COMMENT_DELETED, null, null); </DeepExtract> }
netbeans-github-issues-plugin
positive
1,417
default String resolveDSEVersion() { return ofNullable(NodeProperties::getDSEVersion.apply(this)).orElseGet(() -> getParent().map(p -> p.resolve(NodeProperties::getDSEVersion, null)).orElse(null)); }
default String resolveDSEVersion() { <DeepExtract> return ofNullable(NodeProperties::getDSEVersion.apply(this)).orElseGet(() -> getParent().map(p -> p.resolve(NodeProperties::getDSEVersion, null)).orElse(null)); </DeepExtract> }
simulacron
positive
1,418
public static Complex sin(Complex z) { return this.mul(conj(new Complex(0, 2))).div(norm(new Complex(0, 2))); }
public static Complex sin(Complex z) { <DeepExtract> return this.mul(conj(new Complex(0, 2))).div(norm(new Complex(0, 2))); </DeepExtract> }
fractals
positive
1,419
public static ErrorType notAuthorized(String systemMsg, String userMsg) { return new ErrorType().withCode(ErrorCodeType.AUTH_NOT_AUTHORIZED).withNonFatal(true).withSystemMessage(systemMsg).withUserMessage(userMsg); }
public static ErrorType notAuthorized(String systemMsg, String userMsg) { <DeepExtract> return new ErrorType().withCode(ErrorCodeType.AUTH_NOT_AUTHORIZED).withNonFatal(true).withSystemMessage(systemMsg).withUserMessage(userMsg); </DeepExtract> }
BikeMan
positive
1,421
public void insert(T item) { items.add(item); int k = items.size() - 1; while (k > 0) { int p = (k - 1) / 2; T item = items.get(k); T parent = items.get(p); if (item.compareTo(parent) > 0) { items.set(k, parent); items.set(p, item); k = p; } else { break; } } }
public void insert(T item) { items.add(item); <DeepExtract> int k = items.size() - 1; while (k > 0) { int p = (k - 1) / 2; T item = items.get(k); T parent = items.get(p); if (item.compareTo(parent) > 0) { items.set(k, parent); items.set(p, item); k = p; } else { break; } } </DeepExtract> }
CS112-Rutgers
positive
1,422
@Override public void clear() { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID1_ISSET_ID, false); this.uid1 = 0; __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID2_ISSET_ID, false); this.uid2 = 0; }
@Override public void clear() { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID1_ISSET_ID, false); this.uid1 = 0; <DeepExtract> __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID2_ISSET_ID, false); </DeepExtract> this.uid2 = 0; }
thrift-rpc
positive
1,423
@Override protected Object getCurrentProperty(final String propertyName) { if (myGone.get()) { final ManagedObjectNotFound cause = new ManagedObjectNotFound(); cause.setObj(getMOR()); throw new RuntimeException(cause); } return super.getCurrentProperty(propertyName); }
@Override protected Object getCurrentProperty(final String propertyName) { <DeepExtract> if (myGone.get()) { final ManagedObjectNotFound cause = new ManagedObjectNotFound(); cause.setObj(getMOR()); throw new RuntimeException(cause); } </DeepExtract> return super.getCurrentProperty(propertyName); }
teamcity-vmware-plugin
positive
1,424
@Override public void onClick(DialogInterface dialog, int which) { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri.fromParts("package", context.getPackageName(), null); intent.setData(uri); if (activityOrFragment instanceof Activity) { ((Activity) activityOrFragment).startActivit...
@Override public void onClick(DialogInterface dialog, int which) { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri.fromParts("package", context.getPackageName(), null); intent.setData(uri); <DeepExtract> if (activityOrFragment instanceof Activity) { ((Activity) activityOrFragment...
CustomProject
positive
1,425
public void set(int position, byte value) throws ArrayIndexOutOfBoundsException { if (position < 0 || position >= length) { throw new ArrayIndexOutOfBoundsException("Position is " + position + ", array size is " + length); } int arrayPos = position / 2; boolean setOnLeftFourBits = (position % 2) != 0; byte previous = b...
public void set(int position, byte value) throws ArrayIndexOutOfBoundsException { if (position < 0 || position >= length) { throw new ArrayIndexOutOfBoundsException("Position is " + position + ", array size is " + length); } <DeepExtract> int arrayPos = position / 2; boolean setOnLeftFourBits = (position % 2) != 0; byt...
Trident
positive
1,428
public Criteria andCUpdateTimeNotIn(List<Date> values) { if (values == null) { throw new RuntimeException("Value for " + "cUpdateTime" + " cannot be null"); } criteria.add(new Criterion("c_update_time not in", values)); return (Criteria) this; }
public Criteria andCUpdateTimeNotIn(List<Date> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "cUpdateTime" + " cannot be null"); } criteria.add(new Criterion("c_update_time not in", values)); </DeepExtract> return (Criteria) this; }
webike
positive
1,429
public final void controllerAvailable(final GraphController controller) { if (graphController != null) { removeGraphController(); } graphController = controller; setEnabled(true); }
public final void controllerAvailable(final GraphController controller) { if (graphController != null) { removeGraphController(); } graphController = controller; <DeepExtract> setEnabled(true); </DeepExtract> }
GrandUI
positive
1,430
protected void rankCandidatePaths(Network network, int volume, List<PartedPath> candidatePaths) { if (candidatePaths.isEmpty()) throw new NoSpectrumAvailableException("There are no candidate paths to allocate the demand."); applyMetricsToCandidatePaths(network, volume, candidatePaths); if (candidatePaths.isEmpty()) thr...
protected void rankCandidatePaths(Network network, int volume, List<PartedPath> candidatePaths) { if (candidatePaths.isEmpty()) throw new NoSpectrumAvailableException("There are no candidate paths to allocate the demand."); applyMetricsToCandidatePaths(network, volume, candidatePaths); if (candidatePaths.isEmpty()) thr...
ceons
positive
1,431
@Override public Optional<X> getFromCache(@Nonnull K key) { Preconditions.checkNotNull(key); Preconditions.checkNotNull(key); return controller(key).cache(); }
@Override public Optional<X> getFromCache(@Nonnull K key) { Preconditions.checkNotNull(key); <DeepExtract> Preconditions.checkNotNull(key); return controller(key).cache(); </DeepExtract> }
Payload
positive
1,432
public Criteria andGarbagetipLessThanOrEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "garbagetip" + " cannot be null"); } criteria.add(new Criterion("garbageTip <=", value)); return (Criteria) this; }
public Criteria andGarbagetipLessThanOrEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "garbagetip" + " cannot be null"); } criteria.add(new Criterion("garbageTip <=", value)); </DeepExtract> return (Criteria) this; }
garbage-collection
positive
1,433
public static void keep_login_info_hook() { Client.login_screen = SCREEN_USERNAME_PASSWORD_LOGIN; if (Reflection.setLoginText == null) return; try { if (Client.login_screen == Client.SCREEN_USERNAME_PASSWORD_LOGIN) { if ("Please enter your username and password" == null || "Please enter your username and password".leng...
public static void keep_login_info_hook() { Client.login_screen = SCREEN_USERNAME_PASSWORD_LOGIN; <DeepExtract> if (Reflection.setLoginText == null) return; try { if (Client.login_screen == Client.SCREEN_USERNAME_PASSWORD_LOGIN) { if ("Please enter your username and password" == null || "Please enter your username and ...
rscplus
positive
1,434
@Override public StandardUsernameCredentials getCredentials() { return new BasicSSHUserPrivateKey(CredentialsScope.SYSTEM, CREDENTIAL_ID, user, new BasicSSHUserPrivateKey.DirectEntryPrivateKeySource(privateKey), null, "private key for docker ssh agent"); }
@Override public StandardUsernameCredentials getCredentials() { <DeepExtract> return new BasicSSHUserPrivateKey(CredentialsScope.SYSTEM, CREDENTIAL_ID, user, new BasicSSHUserPrivateKey.DirectEntryPrivateKeySource(privateKey), null, "private key for docker ssh agent"); </DeepExtract> }
docker-plugin
positive
1,435
public Ps setInOut(int index, BigDecimal value) { set(parameters, index, new SqlInOutParameter(Types.NUMERIC, value)); return this; }
public Ps setInOut(int index, BigDecimal value) { <DeepExtract> set(parameters, index, new SqlInOutParameter(Types.NUMERIC, value)); return this; </DeepExtract> }
rexdb
positive
1,436
@Override public T clone(T value) { return factory.copy(value, pop()); }
@Override public T clone(T value) { <DeepExtract> return factory.copy(value, pop()); </DeepExtract> }
Ents
positive
1,437
public Criteria andMenuHrefLessThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "menuHref" + " cannot be null"); } criteria.add(new Criterion("MENU_HREF <", value)); return (Criteria) this; }
public Criteria andMenuHrefLessThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "menuHref" + " cannot be null"); } criteria.add(new Criterion("MENU_HREF <", value)); </DeepExtract> return (Criteria) this; }
console
positive
1,438
private void loadConfigFiles() throws IOException, FileNotValidetedException { InputStream jarConfigFile = getResource("config.yml"); InputStream jarCommandsFile = getResource("commands.yml"); InputStream jarDropFile = getResource("drop.yml"); YamlFileCreator yamlFileCreator = new YamlFileCreator(); StandardCopyOption ...
private void loadConfigFiles() throws IOException, FileNotValidetedException { InputStream jarConfigFile = getResource("config.yml"); InputStream jarCommandsFile = getResource("commands.yml"); InputStream jarDropFile = getResource("drop.yml"); YamlFileCreator yamlFileCreator = new YamlFileCreator(); StandardCopyOption ...
OpenGuild
positive
1,439
@Override public void run() { try { previewRequestBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_START); previewState = STATE_WAITING_LOCK; captureSession.capture(previewRequestBuilder.build(), captureCallback, backgroundHandler); } catch (Exception ignore) { } }
@Override public void run() { <DeepExtract> try { previewRequestBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_START); previewState = STATE_WAITING_LOCK; captureSession.capture(previewRequestBuilder.build(), captureCallback, backgroundHandler); } catch (Exception ignore) { } </DeepExtr...
CameraFragment
positive
1,440
@Override public PreparedStatement sql_insertSnapshotEventEntry(Connection conn, String eventIdentifier, String aggregateIdentifier, long sequenceNumber, DateTime timestamp, String eventType, String eventRevision, T eventPayload, T eventMetaData, String aggregateType) throws SQLException { final String sql = "INSERT IN...
@Override public PreparedStatement sql_insertSnapshotEventEntry(Connection conn, String eventIdentifier, String aggregateIdentifier, long sequenceNumber, DateTime timestamp, String eventType, String eventRevision, T eventPayload, T eventMetaData, String aggregateType) throws SQLException { <DeepExtract> final String sq...
evaluation
positive
1,441
@Override public void inputApkSigningBlock(DataSource apkSigningBlock) { if (mClosed) { throw new IllegalStateException("Engine closed"); } if ((apkSigningBlock == null) || (apkSigningBlock.size() == 0)) { return; } if (mOtherSignersSignaturesPreserved) { return; } }
@Override public void inputApkSigningBlock(DataSource apkSigningBlock) { <DeepExtract> if (mClosed) { throw new IllegalStateException("Engine closed"); } </DeepExtract> if ((apkSigningBlock == null) || (apkSigningBlock.size() == 0)) { return; } if (mOtherSignersSignaturesPreserved) { return; } }
ApkMultiChannelPlugin
positive
1,442
public Future<Long> append(K key, V value) { CommandArgs<K, V> args = new CommandArgs<K, V>(codec).addKey(key).addValue(value); return dispatch(APPEND, new IntegerOutput<K, V>(codec), args); }
public Future<Long> append(K key, V value) { <DeepExtract> CommandArgs<K, V> args = new CommandArgs<K, V>(codec).addKey(key).addValue(value); return dispatch(APPEND, new IntegerOutput<K, V>(codec), args); </DeepExtract> }
lettuce
positive
1,443
@Test public void acquireReadLocksOnTwoPages() throws Exception { bp.getPage(tid1, p0, Permissions.READ_ONLY); grabLock(tid2, p1, Permissions.READ_ONLY, true); }
@Test public void acquireReadLocksOnTwoPages() throws Exception { <DeepExtract> bp.getPage(tid1, p0, Permissions.READ_ONLY); grabLock(tid2, p1, Permissions.READ_ONLY, true); </DeepExtract> }
simple-db-hw
positive
1,444
@Deprecated public IndexOptions SetNoStopwords() { stopwords = new ArrayList<>(0); return this; }
@Deprecated public IndexOptions SetNoStopwords() { <DeepExtract> stopwords = new ArrayList<>(0); return this; </DeepExtract> }
JRediSearch
positive
1,445
@Test public void onUploadSuccessful_withChallengeResponse_ifLastImageOfChallengeWasUploaded_verifyWillBeCalled() { this.bwsToken = VERIFICATION_TOKEN_WITH_CHALLENGE; this.successfulUploads = 3; presenter.onUploadSuccessful(); assertThat(presenter.verifyCalled, is(true)); }
@Test public void onUploadSuccessful_withChallengeResponse_ifLastImageOfChallengeWasUploaded_verifyWillBeCalled() { this.bwsToken = VERIFICATION_TOKEN_WITH_CHALLENGE; <DeepExtract> this.successfulUploads = 3; </DeepExtract> presenter.onUploadSuccessful(); assertThat(presenter.verifyCalled, is(true)); }
BWS-Android
positive
1,446
public void saveFrame(File file) throws IOException { if (!mEglCore.isCurrent(mEGLSurface)) { throw new RuntimeException("Expected EGL context/surface is not current"); } String filename = file.toString(); int width; if (mWidth < 0) { width = mEglCore.querySurface(mEGLSurface, EGL14.EGL_WIDTH); } else { width = mWidth;...
public void saveFrame(File file) throws IOException { if (!mEglCore.isCurrent(mEGLSurface)) { throw new RuntimeException("Expected EGL context/surface is not current"); } String filename = file.toString(); int width; if (mWidth < 0) { width = mEglCore.querySurface(mEGLSurface, EGL14.EGL_WIDTH); } else { width = mWidth;...
android-gpuimage-support
positive
1,447
@Test public void testFastNavigationToSelectImage() { clickMenu(MENU_IMAGE); assertTrue(isMenuEnabled(MENU_INSERT_ATTACHED_IMAGE)); clickMenu(MENU_INSERT_ATTACHED_IMAGE); waitForDialogToLoad(); getDriver().waitUntilElementIsVisible(By.className(STEP_CURRENT_PAGE_SELECTOR)); getSelenium().click("//*[contains(@class, 'xL...
@Test public void testFastNavigationToSelectImage() { clickMenu(MENU_IMAGE); assertTrue(isMenuEnabled(MENU_INSERT_ATTACHED_IMAGE)); clickMenu(MENU_INSERT_ATTACHED_IMAGE); waitForDialogToLoad(); getDriver().waitUntilElementIsVisible(By.className(STEP_CURRENT_PAGE_SELECTOR)); getSelenium().click("//*[contains(@class, 'xL...
xwiki-enterprise
positive
1,448
public static String getOutputFilePath(File directory, String extension) throws IOException { if (!(directory.isDirectory() || directory.mkdirs())) { throw new IOException("Couldn't create directory '" + directory + "'"); } return directory; String filename = UUID.randomUUID().toString(); return directory + File.separa...
public static String getOutputFilePath(File directory, String extension) throws IOException { <DeepExtract> if (!(directory.isDirectory() || directory.mkdirs())) { throw new IOException("Couldn't create directory '" + directory + "'"); } return directory; </DeepExtract> String filename = UUID.randomUUID().toString(); r...
react-native-camera-continued-shooting
positive
1,449
private void handleAudioMessage(final AudioMessageHolder holder, final MessageItem mItem, final View parent) { holder.time.setText(TimeUtil.getChatTime(mItem.getDate())); holder.time.setVisibility(View.VISIBLE); holder.head.setBackgroundResource(PushApplication.heads[mItem.getHeadImg()]); holder.progressBar.setVisibili...
private void handleAudioMessage(final AudioMessageHolder holder, final MessageItem mItem, final View parent) { <DeepExtract> holder.time.setText(TimeUtil.getChatTime(mItem.getDate())); holder.time.setVisibility(View.VISIBLE); holder.head.setBackgroundResource(PushApplication.heads[mItem.getHeadImg()]); holder.progressB...
zfIMDemo
positive
1,450
public static WebInspector connectToRealDevice(String udid) throws IOException { return new WebInspector(BinaryPlistSocket.openToRealDevice(udid)); }
public static WebInspector connectToRealDevice(String udid) throws IOException { <DeepExtract> return new WebInspector(BinaryPlistSocket.openToRealDevice(udid)); </DeepExtract> }
ios-device-control
positive
1,452
@Override public void onClick(DialogInterface dialog, int which) { if (promptDialog != null) promptDialog.dismiss(); if (pJsResult != null) pJsResult.cancel(); }
@Override public void onClick(DialogInterface dialog, int which) { if (promptDialog != null) promptDialog.dismiss(); <DeepExtract> if (pJsResult != null) pJsResult.cancel(); </DeepExtract> }
AgentWebX5
positive
1,453
public List<UserDetail> findAll() { String sql = "select * from userDetail"; Object[] params = {}; List<UserDetail> list = new ArrayList<UserDetail>(); ResultSet rs = dbUtil.executeQuery(sql, params); try { while (rs.next()) { UserDetail user = new UserDetail(rs.getInt("id"), rs.getString("userName"), rs.getString("use...
public List<UserDetail> findAll() { String sql = "select * from userDetail"; Object[] params = {}; <DeepExtract> List<UserDetail> list = new ArrayList<UserDetail>(); ResultSet rs = dbUtil.executeQuery(sql, params); try { while (rs.next()) { UserDetail user = new UserDetail(rs.getInt("id"), rs.getString("userName"), rs....
cailiao
positive
1,454
private void initBitmap() { if (indicatorDrawableId != 0) { this.indicatorDrawableId = indicatorDrawableId; indicatorBitmap = BitmapFactory.decodeResource(getResources(), indicatorDrawableId); } if (thumbDrawableId != 0 && getResources() != null) { this.thumbDrawableId = thumbDrawableId; thumbBitmap = Utils.drawableToB...
private void initBitmap() { if (indicatorDrawableId != 0) { this.indicatorDrawableId = indicatorDrawableId; indicatorBitmap = BitmapFactory.decodeResource(getResources(), indicatorDrawableId); } if (thumbDrawableId != 0 && getResources() != null) { this.thumbDrawableId = thumbDrawableId; thumbBitmap = Utils.drawableToB...
ExpectLauncher
positive
1,455
@Test public void getCountOfUniqueTest() throws Exception { PaymentModel testPaymentModel = createTestPaymentModel(); prepareGraphDb(createDefaultOperationProperties(testPaymentModel)); testUniqCardTokensByEmail(testPaymentModel.getEmail(), 3); testUniqCardTokensByFingerprint(testPaymentModel.getFingerprint(), 3); test...
@Test public void getCountOfUniqueTest() throws Exception { PaymentModel testPaymentModel = createTestPaymentModel(); prepareGraphDb(createDefaultOperationProperties(testPaymentModel)); testUniqCardTokensByEmail(testPaymentModel.getEmail(), 3); testUniqCardTokensByFingerprint(testPaymentModel.getFingerprint(), 3); test...
fraudbusters
positive
1,456
public void read(org.apache.thrift.protocol.TProtocol iprot, face_sim_args struct) throws org.apache.thrift.TException { iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch(schemeField.id) { case 1: if (schemeFiel...
public void read(org.apache.thrift.protocol.TProtocol iprot, face_sim_args struct) throws org.apache.thrift.TException { <DeepExtract> </DeepExtract> iprot.readStructBegin(); <DeepExtract> </DeepExtract> while (true) { <DeepExtract> </DeepExtract> schemeField = iprot.readFieldBegin(); <DeepExtract> </DeepExtract> if (s...
aiop-core
positive
1,458
public void putInt(String key, int value) { mMap.put(key, value); }
public void putInt(String key, int value) { <DeepExtract> mMap.put(key, value); </DeepExtract> }
SpiderJackson
positive
1,459
protected void tickHardware(World world) { if (StrictMath.abs(steer) <= 0.01f) { steer = 0.0f; } facing += steer * STEER_RATE; float s; if (StrictMath.abs(motor) <= 0.01f) { motor = 0.0f; return; } if (motor < 0) { s = motor * 0.5f * SPEED_MAX; } else { s = motor * SPEED_MAX; } float tx = x + (float) StrictMath.cos(fac...
protected void tickHardware(World world) { if (StrictMath.abs(steer) <= 0.01f) { steer = 0.0f; } facing += steer * STEER_RATE; float s; if (StrictMath.abs(motor) <= 0.01f) { motor = 0.0f; return; } if (motor < 0) { s = motor * 0.5f * SPEED_MAX; } else { s = motor * SPEED_MAX; } float tx = x + (float) StrictMath.cos(fac...
runtime
positive
1,460
@Override public boolean onKeyUp(int keyCode, KeyEvent event) { Log.i(TAG, "onKeyUp(int keyCode, KeyEvent event) keyCode = " + keyCode + " event = " + event); return super.onKeyUp(keyCode, event); }
@Override public boolean onKeyUp(int keyCode, KeyEvent event) { <DeepExtract> Log.i(TAG, "onKeyUp(int keyCode, KeyEvent event) keyCode = " + keyCode + " event = " + event); </DeepExtract> return super.onKeyUp(keyCode, event); }
AndroidExercises
positive
1,461
public Criteria andUser_messageNotBetween(String value1, String value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "user_message" + " cannot be null"); } criteria.add(new Criterion("user_message not between", value1, value2)); return (Criteria) this; }
public Criteria andUser_messageNotBetween(String value1, String value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "user_message" + " cannot be null"); } criteria.add(new Criterion("user_message not between", value1, value2)); </DeepExtract> return (Criter...
Tmall_SSM-master
positive
1,462
public void onServiceConnected(ComponentName className, IBinder service) { return WallPaper.this; if (null != single.env) { dataService.setDataProviders(single.env.getDataProviders()); } }
public void onServiceConnected(ComponentName className, IBinder service) { <DeepExtract> return WallPaper.this; </DeepExtract> if (null != single.env) { dataService.setDataProviders(single.env.getDataProviders()); } }
moss
positive
1,463
@Override public void doRenderLayer(EntityLivingBase entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) { ItemStack itemstack = entitylivingbaseIn.getItemStackFromSlot(EntityEquipmentSlot.CHEST); if (itemstack.getItem() insta...
@Override public void doRenderLayer(EntityLivingBase entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) { ItemStack itemstack = entitylivingbaseIn.getItemStackFromSlot(EntityEquipmentSlot.CHEST); if (itemstack.getItem() insta...
ExampleMod-1.12
positive
1,464
private void init() { mAvatarMaxSize = mContext.getResources().getDimension(R.dimen.image_width); }
private void init() { <DeepExtract> mAvatarMaxSize = mContext.getResources().getDimension(R.dimen.image_width); </DeepExtract> }
Nimbus
positive
1,465
public static void loadDefaults() { logger.finer("setting DefaultProperties"); Properties props = new Properties(); props.setProperty(XOPKEYS.DOMAIN, "proxy"); comments.put(XOPKEYS.DOMAIN, "The domain name for this proxy instance."); props.setProperty(XOPKEYS.PORT, "5222"); comments.put(XOPKEYS.PORT, "The port to run t...
public static void loadDefaults() { <DeepExtract> logger.finer("setting DefaultProperties"); Properties props = new Properties(); props.setProperty(XOPKEYS.DOMAIN, "proxy"); comments.put(XOPKEYS.DOMAIN, "The domain name for this proxy instance."); props.setProperty(XOPKEYS.PORT, "5222"); comments.put(XOPKEYS.PORT, "The...
xmpp-overlay
positive
1,466
@Override public void onGetNetworks(NetInfo[] nets) { Message m = Message.obtain(null, MsgId.GET_NETWORKS); m.setData(Utils.netArray2Bundle(nets)); if (mClientMessenger != null) try { Log.d(TAG, "forward a msg to clientMessenger"); mClientMessenger.send(m); } catch (RemoteException e) { Log.e(TAG, "failed to forward ms...
@Override public void onGetNetworks(NetInfo[] nets) { Message m = Message.obtain(null, MsgId.GET_NETWORKS); m.setData(Utils.netArray2Bundle(nets)); <DeepExtract> if (mClientMessenger != null) try { Log.d(TAG, "forward a msg to clientMessenger"); mClientMessenger.send(m); } catch (RemoteException e) { Log.e(TAG, "failed...
PeerDeviceNet_Src
positive
1,467
public void refresh() { for (int i = templatePanels.size() - 1; i >= 0; i--) { var templatePanel = templatePanels.get(i); mainPanel.remove(templatePanel); templatePanels.remove(templatePanel); } var loadedCopyTemplates = ConfigLogic.getInstance().getUserOptions().getCopyTemplates(); if (loadedCopyTemplates == null) { r...
public void refresh() { for (int i = templatePanels.size() - 1; i >= 0; i--) { var templatePanel = templatePanels.get(i); mainPanel.remove(templatePanel); templatePanels.remove(templatePanel); } <DeepExtract> var loadedCopyTemplates = ConfigLogic.getInstance().getUserOptions().getCopyTemplates(); if (loadedCopyTemplate...
integrated-security-testing-environment
positive
1,468
@Override public <T> int update(T entity, IncludeType includeType) { if (entity == null) return -1; getInterceptorChain().beforePasreEntity(entity, SuidType.UPDATE); String sql = getObjToSQLRich().toUpdateSQL(entity, includeType); if (entity == null) return; HoneyContext.regEntityClass(entity.getClass()); sql = doAfter...
@Override public <T> int update(T entity, IncludeType includeType) { if (entity == null) return -1; getInterceptorChain().beforePasreEntity(entity, SuidType.UPDATE); String sql = getObjToSQLRich().toUpdateSQL(entity, includeType); <DeepExtract> if (entity == null) return; HoneyContext.regEntityClass(entity.getClass());...
honey
positive
1,469
public ErrorCode configSetParameter(int param, double value, int subValue, int ordinal, int timeoutMs) { int retval = PigeonImuJNI.JNI_ConfigSetParameter(m_handle, param, value, subValue, ordinal, timeoutMs); for (CalibrationMode e : CalibrationMode.values()) { if (e.value == retval) { return e; } } return Unknown; }
public ErrorCode configSetParameter(int param, double value, int subValue, int ordinal, int timeoutMs) { int retval = PigeonImuJNI.JNI_ConfigSetParameter(m_handle, param, value, subValue, ordinal, timeoutMs); <DeepExtract> for (CalibrationMode e : CalibrationMode.values()) { if (e.value == retval) { return e; } } retur...
Phoenix-api
positive
1,470
public static RoundedBitmapDrawable getRoundedDrawable(Context context, Bitmap bitmap, float cornerRadius) { RoundedBitmapDrawable roundedBitmapDrawable = RoundedBitmapDrawableFactory.create(context.getResources(), bitmap); roundedBitmapDrawable.setAntiAlias(true); mCornerRadius = cornerRadius; return roundedBitmapDraw...
public static RoundedBitmapDrawable getRoundedDrawable(Context context, Bitmap bitmap, float cornerRadius) { RoundedBitmapDrawable roundedBitmapDrawable = RoundedBitmapDrawableFactory.create(context.getResources(), bitmap); roundedBitmapDrawable.setAntiAlias(true); <DeepExtract> mCornerRadius = cornerRadius; </DeepExtr...
BGAPhotoPicker-Android
positive
1,471
void observe() { final ContentResolver resolver = mContext.getContentResolver(); resolver.registerContentObserver(Settings.System.getUriFor(SETTING_EXPANDED_DESKTOP_STATE), false, this); updateSettings(false); }
void observe() { final ContentResolver resolver = mContext.getContentResolver(); resolver.registerContentObserver(Settings.System.getUriFor(SETTING_EXPANDED_DESKTOP_STATE), false, this); <DeepExtract> updateSettings(false); </DeepExtract> }
GravityBox
positive
1,472
@Override public boolean onHitEntity(Entity entityHit, DamageSource source, float ammount) { source.setExplosion(); if (!this.world.isRemote) { this.world.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, getExplosionStrength(), canBreakBlocks()); this.setDead(); } return false; }
@Override public boolean onHitEntity(Entity entityHit, DamageSource source, float ammount) { source.setExplosion(); <DeepExtract> if (!this.world.isRemote) { this.world.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, getExplosionStrength(), canBreakBlocks()); this.setDead(); } </DeepExtract> retur...
Battlegear2
positive
1,473
public BufferedImage getBufferedImage() { if (image == null || abort) return null; BufferedImage img = new BufferedImage(getIntrinsicWidth(), getIntrinsicHeight(), BufferedImage.TYPE_INT_RGB); Graphics2D g = img.createGraphics(); g.drawImage(image, null, null); if (image != null) image.flush(); image = null; return img...
public BufferedImage getBufferedImage() { if (image == null || abort) return null; BufferedImage img = new BufferedImage(getIntrinsicWidth(), getIntrinsicHeight(), BufferedImage.TYPE_INT_RGB); Graphics2D g = img.createGraphics(); g.drawImage(image, null, null); <DeepExtract> if (image != null) image.flush(); image = nu...
CSSBox
positive
1,474
public static CardConsultationData createSimpleCard(String processSuffix, Instant publication, Instant start, Instant end, String login, String[] groups, String[] entities, String[] userAcks, String[] userReads, String[] entitiesAcks) { CardConsultationData.CardConsultationDataBuilder cardBuilder = CardConsultationData...
public static CardConsultationData createSimpleCard(String processSuffix, Instant publication, Instant start, Instant end, String login, String[] groups, String[] entities, String[] userAcks, String[] userReads, String[] entitiesAcks) { CardConsultationData.CardConsultationDataBuilder cardBuilder = CardConsultationData...
operatorfabric-core
positive
1,475
@Override public void process(final Throwable exception) throws Exception { System.out.println("Clear => " + exception); System.out.println("Get => " + null); rp.processResponse(null); }
@Override public void process(final Throwable exception) throws Exception { System.out.println("Clear => " + exception); <DeepExtract> System.out.println("Get => " + null); rp.processResponse(null); </DeepExtract> }
JActor
positive
1,476
protected void initComponents() { JFrame frame = new JFrame("Demo JFrame"); frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); Image iconImage = null; try { URL imageURL = FrameDemo.class.getResource("resources/images/swingingduke.gif"); iconImage = ImageIO.read(imageURL); } catch (Exception e) { } frame.setIconImag...
protected void initComponents() { JFrame frame = new JFrame("Demo JFrame"); frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); Image iconImage = null; try { URL imageURL = FrameDemo.class.getResource("resources/images/swingingduke.gif"); iconImage = ImageIO.read(imageURL); } catch (Exception e) { } frame.setIconImag...
swingset3
positive
1,477
@Override public Object arrayOfField(int size) { return acquireByteBuffer(null, sizeOf0(size)).asCharBuffer(); }
@Override public Object arrayOfField(int size) { <DeepExtract> return acquireByteBuffer(null, sizeOf0(size)).asCharBuffer(); </DeepExtract> }
Collections
positive
1,478
public static AdditionalServiceType createTimestampService() { final AdditionalServiceType s = MssClient.mssObjFactory.createAdditionalServiceType(); final MssURIType d = MssClient.mssObjFactory.createMssURIType(); d.setMssURI(URI_TIMESTAMP); s.setDescription(d); return s; }
public static AdditionalServiceType createTimestampService() { <DeepExtract> final AdditionalServiceType s = MssClient.mssObjFactory.createAdditionalServiceType(); final MssURIType d = MssClient.mssObjFactory.createMssURIType(); d.setMssURI(URI_TIMESTAMP); s.setDescription(d); return s; </DeepExtract> }
laverca
positive
1,479
void setAttribute(String elName, String name, int type, String enumeration, String value, int valueType) throws java.lang.Exception { Object[] element = (Object[]) elementInfo.get(elName); if (element == null) { attlist = null; } return (Hashtable) element[2]; if (attlist == null) { attlist = new Hashtable(); } if (att...
void setAttribute(String elName, String name, int type, String enumeration, String value, int valueType) throws java.lang.Exception { <DeepExtract> Object[] element = (Object[]) elementInfo.get(elName); if (element == null) { attlist = null; } return (Hashtable) element[2]; </DeepExtract> if (attlist == null) { attlist...
AnalyseSI
positive
1,480
public String getFlowControlOutString() { switch(m_FlowControlOut) { case SerialPort.FLOWCONTROL_NONE: return "none"; case SerialPort.FLOWCONTROL_XONXOFF_OUT: return "xon/xoff out"; case SerialPort.FLOWCONTROL_XONXOFF_IN: return "xon/xoff in"; case SerialPort.FLOWCONTROL_RTSCTS_IN: return "rts/cts in"; case SerialPort....
public String getFlowControlOutString() { <DeepExtract> switch(m_FlowControlOut) { case SerialPort.FLOWCONTROL_NONE: return "none"; case SerialPort.FLOWCONTROL_XONXOFF_OUT: return "xon/xoff out"; case SerialPort.FLOWCONTROL_XONXOFF_IN: return "xon/xoff in"; case SerialPort.FLOWCONTROL_RTSCTS_IN: return "rts/cts in"; ca...
jamod
positive
1,481
@Override public SearchResultJson search(ISearchService.Options options) { var json = new SearchResultJson(); var size = options.requestedSize; if (size <= 0 || !search.isEnabled()) { json.extensions = Collections.emptyList(); return json; } var searchHits = search.search(options); var serverUrl = UrlUtil.getBaseUrl();...
@Override public SearchResultJson search(ISearchService.Options options) { var json = new SearchResultJson(); var size = options.requestedSize; if (size <= 0 || !search.isEnabled()) { json.extensions = Collections.emptyList(); return json; } var searchHits = search.search(options); <DeepExtract> var serverUrl = UrlUtil...
openvsx
positive
1,482
public void setSelectorDrawable(int res) { mViewBehind.setSelectorBitmap(BitmapFactory.decodeResource(getResources(), res)); }
public void setSelectorDrawable(int res) { <DeepExtract> mViewBehind.setSelectorBitmap(BitmapFactory.decodeResource(getResources(), res)); </DeepExtract> }
WLANAudit-Android
positive
1,483
public static ShowcaseView insertShowcaseView(float x, float y, Activity activity, String title, String detailText, ConfigOptions options) { ShowcaseView sv = new ShowcaseView(activity); if (options != null) sv.setConfigOptions(options); if (sv.getConfigOptions().insert == INSERT_TO_DECOR) { ((ViewGroup) activity.getWi...
public static ShowcaseView insertShowcaseView(float x, float y, Activity activity, String title, String detailText, ConfigOptions options) { ShowcaseView sv = new ShowcaseView(activity); if (options != null) sv.setConfigOptions(options); if (sv.getConfigOptions().insert == INSERT_TO_DECOR) { ((ViewGroup) activity.getWi...
android_packages_apps_Focal
positive
1,484
public void addColor(Color addition) { for (ColorSwatch swatch : swatches) { swatch.setSelected(false); } dashTimer.stop(); repaint(); ColorSwatch swatch = new ColorSwatch(addition, dashTimer, ml); this.swatches.add(swatch); return swatches == null ? 0 : swatches.size(); add(swatch, gbc); }
public void addColor(Color addition) { for (ColorSwatch swatch : swatches) { swatch.setSelected(false); } dashTimer.stop(); repaint(); ColorSwatch swatch = new ColorSwatch(addition, dashTimer, ml); this.swatches.add(swatch); <DeepExtract> return swatches == null ? 0 : swatches.size(); </DeepExtract> add(swatch, gbc); }
ChatGameFontificator
positive
1,485
@Override public void onQueryExecuted(List<DerpibooruTagDetailed> hiddenTags) { super.executeQuery(new CommentListParser(spoileredTags, hiddenTags)); }
@Override public void onQueryExecuted(List<DerpibooruTagDetailed> hiddenTags) { <DeepExtract> super.executeQuery(new CommentListParser(spoileredTags, hiddenTags)); </DeepExtract> }
Derpibooru
positive
1,486
public static String encryptSHA224ToString(byte[] data) { if (encryptSHA224(data) == null) return null; int len = encryptSHA224(data).length; if (len <= 0) return null; char[] ret = new char[len << 1]; for (int i = 0, j = 0; i < len; i++) { ret[j++] = hexDigits[encryptSHA224(data)[i] >>> 4 & 0x0f]; ret[j++] = hexDigits...
public static String encryptSHA224ToString(byte[] data) { <DeepExtract> if (encryptSHA224(data) == null) return null; int len = encryptSHA224(data).length; if (len <= 0) return null; char[] ret = new char[len << 1]; for (int i = 0, j = 0; i < len; i++) { ret[j++] = hexDigits[encryptSHA224(data)[i] >>> 4 & 0x0f]; ret[j+...
HBase
positive
1,487
public void manipulatePdf(String dest) throws IOException, SQLException { PageSize postCard = new PageSize(283, 416); PdfDocument pdfDoc = new PdfDocument(new PdfWriter(SOURCE)); Document doc = new Document(pdfDoc, postCard); doc.setMargins(30, 30, 30, 30); PdfPage page = pdfDoc.addNewPage(); PdfCanvas under = new PdfC...
public void manipulatePdf(String dest) throws IOException, SQLException { <DeepExtract> PageSize postCard = new PageSize(283, 416); PdfDocument pdfDoc = new PdfDocument(new PdfWriter(SOURCE)); Document doc = new Document(pdfDoc, postCard); doc.setMargins(30, 30, 30, 30); PdfPage page = pdfDoc.addNewPage(); PdfCanvas un...
i7js-book
positive
1,488
private void convertTableNamesToRows(String[] types, List<Object[]> rows, String projectName, String schemaName, List<String> names) throws OdpsException { LinkedList<Table> tables = new LinkedList<>(); tables.addAll(conn.getOdps().tables().loadTables(projectName, schemaName, names)); for (Table t : tables) { String ta...
private void convertTableNamesToRows(String[] types, List<Object[]> rows, String projectName, String schemaName, List<String> names) throws OdpsException { LinkedList<Table> tables = new LinkedList<>(); tables.addAll(conn.getOdps().tables().loadTables(projectName, schemaName, names)); <DeepExtract> for (Table t : table...
aliyun-odps-jdbc
positive
1,490
public Criteria andBookNameBetween(String value1, String value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "bookName" + " cannot be null"); } criteria.add(new Criterion("book_name between", value1, value2)); return (Criteria) this; }
public Criteria andBookNameBetween(String value1, String value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "bookName" + " cannot be null"); } criteria.add(new Criterion("book_name between", value1, value2)); </DeepExtract> return (Criteria) this; }
library_manager_system
positive
1,491
public void delete() throws IOException { if (journalWriter == null) { return; } for (Entry entry : new ArrayList<Entry>(lruEntries.values())) { if (entry.currentEditor != null) { entry.currentEditor.abort(); } } trimToSize(); journalWriter.close(); journalWriter = null; Util.deleteContents(directory); }
public void delete() throws IOException { <DeepExtract> if (journalWriter == null) { return; } for (Entry entry : new ArrayList<Entry>(lruEntries.values())) { if (entry.currentEditor != null) { entry.currentEditor.abort(); } } trimToSize(); journalWriter.close(); journalWriter = null; </DeepExtract> Util.deleteContents...
phonegap-custom-camera-plugin
positive
1,492
public long hashLongs(@NotNull long[] input, int off, int len) { if (len < 0 || off < 0 || off + len > input.length || off + len < 0) throw new IndexOutOfBoundsException(); return hash(longArrayAccessor().handle(input), longArrayAccessor().access(), longArrayAccessor().offset(input, off), longArrayAccessor().size(len))...
public long hashLongs(@NotNull long[] input, int off, int len) { if (len < 0 || off < 0 || off + len > input.length || off + len < 0) throw new IndexOutOfBoundsException(); <DeepExtract> return hash(longArrayAccessor().handle(input), longArrayAccessor().access(), longArrayAccessor().offset(input, off), longArrayAccesso...
Chronicle-Algorithms
positive
1,493
@Override public Verification withArrayClaim(String name, Long... items) throws IllegalArgumentException { if (name == null) { throw new IllegalArgumentException("The Custom Claim's name can't be null."); } expectedChecks.add(constructExpectedCheck(name, (claim, decodedJWT) -> { if (claim.isMissing()) { throw new Missi...
@Override public Verification withArrayClaim(String name, Long... items) throws IllegalArgumentException { if (name == null) { throw new IllegalArgumentException("The Custom Claim's name can't be null."); } <DeepExtract> expectedChecks.add(constructExpectedCheck(name, (claim, decodedJWT) -> { if (claim.isMissing()) { t...
java-jwt
positive
1,494
@Override public void execute() { addContentFragment(PollsListFragment.inGroupAnnouncements(_item.getId())); }
@Override public void execute() { <DeepExtract> addContentFragment(PollsListFragment.inGroupAnnouncements(_item.getId())); </DeepExtract> }
getsocial-android-sdk
positive
1,495
public void actionPerformed(ActionEvent ee) { task.theory = "md"; if (task.operation.equals("")) { task.operation = "energy"; } ; nwchem_Task t_temp; taskModel.setSize(tasks.size()); for (int i = 0; i < tasks.size(); i++) { t_temp = (nwchem_Task) tasks.elementAt(i); System.out.println("task " + (i + 1) + ": " + t_temp....
public void actionPerformed(ActionEvent ee) { task.theory = "md"; if (task.operation.equals("")) { task.operation = "energy"; } ; <DeepExtract> nwchem_Task t_temp; taskModel.setSize(tasks.size()); for (int i = 0; i < tasks.size(); i++) { t_temp = (nwchem_Task) tasks.elementAt(i); System.out.println("task " + (i + 1) + ...
nwchem-git-svn-deprecated
positive
1,496
public static Ping onAddress(@NonNull InetAddress paramInetAddress) { Ping localPing = new Ping(); this.address = paramInetAddress; return localPing; }
public static Ping onAddress(@NonNull InetAddress paramInetAddress) { Ping localPing = new Ping(); <DeepExtract> this.address = paramInetAddress; </DeepExtract> return localPing; }
fakegumtree
positive
1,497
public void setRawData(byte[] ndata) { int length = Math.min(10, ndata.length); System.arraycopy(ndata, 0, this.data, 5, length); if ((byte) length > 10) (byte) length = 10; data[3] = (byte) length; }
public void setRawData(byte[] ndata) { int length = Math.min(10, ndata.length); System.arraycopy(ndata, 0, this.data, 5, length); <DeepExtract> if ((byte) length > 10) (byte) length = 10; data[3] = (byte) length; </DeepExtract> }
JArduino
positive
1,498
public static ChildProcess startSuCommand(String cmd) { String[] cmdarray = new String[3]; cmdarray[0] = "su"; cmdarray[1] = "-c"; cmdarray[2] = cmd; return new ChildProcess(cmdarray, null); }
public static ChildProcess startSuCommand(String cmd) { String[] cmdarray = new String[3]; cmdarray[0] = "su"; cmdarray[1] = "-c"; cmdarray[2] = cmd; <DeepExtract> return new ChildProcess(cmdarray, null); </DeepExtract> }
APKreator
positive
1,499
public static Request parse(BufferedReader reader) throws IOException { while (reader.ready()) { final String headerLine; headerLine = reader.readLine(); if (CRLF.equals(headerLine) || "".equals(headerLine)) { break; } } return new Request(readBody(reader)); }
public static Request parse(BufferedReader reader) throws IOException { <DeepExtract> while (reader.ready()) { final String headerLine; headerLine = reader.readLine(); if (CRLF.equals(headerLine) || "".equals(headerLine)) { break; } } </DeepExtract> return new Request(readBody(reader)); }
selenium-grid
positive
1,500
public void release() { if (mWakeLock != null) { if (false && !mWakeLock.isHeld()) { mWakeLock.acquire(); } else if (!false && mWakeLock.isHeld()) { mWakeLock.release(); } } mStayAwake = false; updateSurfaceScreenOn(); if (mSurfaceHolder != null) mSurfaceHolder.setKeepScreenOn(mScreenOnWhilePlaying && mStayAwake); nati...
public void release() { if (mWakeLock != null) { if (false && !mWakeLock.isHeld()) { mWakeLock.acquire(); } else if (!false && mWakeLock.isHeld()) { mWakeLock.release(); } } mStayAwake = false; updateSurfaceScreenOn(); if (mSurfaceHolder != null) mSurfaceHolder.setKeepScreenOn(mScreenOnWhilePlaying && mStayAwake); nati...
dttv-android
positive
1,501
public void showRefreshAnimation(MenuItem item) { if (refreshItem != null) { View view = refreshItem.getActionView(); if (view != null) { view.clearAnimation(); refreshItem.setActionView(null); } } refreshItem = item; View refreshActionView = getLayoutInflater().inflate(R.layout.item_refresh_menu, null); item.setAction...
public void showRefreshAnimation(MenuItem item) { <DeepExtract> if (refreshItem != null) { View view = refreshItem.getActionView(); if (view != null) { view.clearAnimation(); refreshItem.setActionView(null); } } </DeepExtract> refreshItem = item; View refreshActionView = getLayoutInflater().inflate(R.layout.item_refres...
Android_Expression_Package
positive
1,503
public String getPathNatives() { if (natives == null) return null; if (_artifact == null) { _artifact = new Artifact(name); } String ret = String.format("%s/%s/%s/%s-%s", domain.replace('.', '/'), name, version, name, version); if (natives.get(OS.CURRENT) != null && natives.get(OS.CURRENT).indexOf('$') > -1) { natives....
public String getPathNatives() { if (natives == null) return null; if (_artifact == null) { _artifact = new Artifact(name); } <DeepExtract> String ret = String.format("%s/%s/%s/%s-%s", domain.replace('.', '/'), name, version, name, version); if (natives.get(OS.CURRENT) != null && natives.get(OS.CURRENT).indexOf('$') > ...
ForgeGradle
positive
1,504
public SpannableText setBackgroundColor(int color) { setSpan(new BackgroundColorSpan(color), SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE); return this; return this; }
public SpannableText setBackgroundColor(int color) { <DeepExtract> setSpan(new BackgroundColorSpan(color), SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE); return this; </DeepExtract> return this; }
Utils-Everywhere
positive
1,505
public static void setSearchCriteria(@Nullable Context context, SearchCriteria searchCriteria) { if (null == context) { return; } if (null == context) { return; } Editor edit = PreferenceManager.getDefaultSharedPreferences(context).edit(); edit.putString(context.getString(R.string.key_SearchCriteria), searchCriteria.to...
public static void setSearchCriteria(@Nullable Context context, SearchCriteria searchCriteria) { if (null == context) { return; } <DeepExtract> if (null == context) { return; } Editor edit = PreferenceManager.getDefaultSharedPreferences(context).edit(); edit.putString(context.getString(R.string.key_SearchCriteria), sea...
mtg-familiar
positive
1,506
@Override public void startSession(String appKey) { if (isDebug) { Log.d(TAG, "startSession invoked!"); } MobclickAgent.onResume(mContext); }
@Override public void startSession(String appKey) { <DeepExtract> if (isDebug) { Log.d(TAG, "startSession invoked!"); } </DeepExtract> MobclickAgent.onResume(mContext); }
HelloRuby
positive
1,507
private static void getAttestationRecord(JSONObject jsonObject, X509Certificate certificate) throws Exception { ParsedAttestationRecord parsedAttestationRecord = ParsedAttestationRecord.createParsedAttestationRecord(certificate); jsonObject.put("attestationVersion", parsedAttestationRecord.attestationVersion); jsonObje...
private static void getAttestationRecord(JSONObject jsonObject, X509Certificate certificate) throws Exception { ParsedAttestationRecord parsedAttestationRecord = ParsedAttestationRecord.createParsedAttestationRecord(certificate); jsonObject.put("attestationVersion", parsedAttestationRecord.attestationVersion); jsonObje...
MobileInfo
positive
1,508
public void driveRobotCentric(double strafeSpeed, double forwardSpeed, double turnSpeed) { strafeSpeed = clipRange(strafeSpeed); forwardSpeed = clipRange(forwardSpeed); turnSpeed = clipRange(turnSpeed); Vector2d input = new Vector2d(strafeSpeed, forwardSpeed); input = input.rotateBy(-0.0); double theta = input.angle();...
public void driveRobotCentric(double strafeSpeed, double forwardSpeed, double turnSpeed) { <DeepExtract> strafeSpeed = clipRange(strafeSpeed); forwardSpeed = clipRange(forwardSpeed); turnSpeed = clipRange(turnSpeed); Vector2d input = new Vector2d(strafeSpeed, forwardSpeed); input = input.rotateBy(-0.0); double theta = ...
FTCLib
positive
1,509
@Test public void insertPartialBatchTest() throws DBException { teardown(); setupWithBatch(10); try { String insertKey = "user0"; HashMap<String, ByteIterator> insertMap = insertRow(insertKey); ResultSet resultSet = jdbcConnection.prepareStatement(String.format("SELECT * FROM %s", TABLE_NAME)).executeQuery(); assertFal...
@Test public void insertPartialBatchTest() throws DBException { <DeepExtract> teardown(); setupWithBatch(10); try { String insertKey = "user0"; HashMap<String, ByteIterator> insertMap = insertRow(insertKey); ResultSet resultSet = jdbcConnection.prepareStatement(String.format("SELECT * FROM %s", TABLE_NAME)).executeQuer...
anna
positive
1,510
@Override public CampaignResponse method() { return executeSyncApiCall(api.updateLoyaltyCampaign(id, updateCampaign)); }
@Override public CampaignResponse method() { <DeepExtract> return executeSyncApiCall(api.updateLoyaltyCampaign(id, updateCampaign)); </DeepExtract> }
voucherify-java-sdk
positive
1,511
public void addHollowCylinder(AxisAlignedBB genBox) { if (!isWorking) throw new IllegalStateException("Can't worlgen if not generating!"); if (worldObj.isRemote) throw new IllegalArgumentException("Worldgen on CLIENT side is not allowed!"); return isWorking; double minX = genBox.minX; double minY = genBox.minY; double ...
public void addHollowCylinder(AxisAlignedBB genBox) { if (!isWorking) throw new IllegalStateException("Can't worlgen if not generating!"); if (worldObj.isRemote) throw new IllegalArgumentException("Worldgen on CLIENT side is not allowed!"); return isWorking; double minX = genBox.minX; double minY = genBox.minY; double ...
DummyCore
positive
1,512
@Test public void parsePointsQuotesInTags() { Assert.assertNotNull("t159,label=hey\\ \"ya a=1i,value=0i"); Stream.of("t159,label=hey\\ \"ya a=1i,value=0i").forEach(lineProtocol -> { InfluxLineProtocolParser parse; try { parse = InfluxLineProtocolParser.parse(lineProtocol).report(); } catch (NotParsableInlineProtocolDat...
@Test public void parsePointsQuotesInTags() { Assert.assertNotNull("t159,label=hey\\ \"ya a=1i,value=0i"); Stream.of("t159,label=hey\\ \"ya a=1i,value=0i").forEach(lineProtocol -> { InfluxLineProtocolParser parse; try { parse = InfluxLineProtocolParser.parse(lineProtocol).report(); } catch (NotParsableInlineProtocolDat...
nifi-influxdb-bundle
positive
1,513
public Criteria andAppNameNotBetween(String value1, String value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "appName" + " cannot be null"); } criteria.add(new Criterion("app_name not between", value1, value2)); return (Criteria) this; }
public Criteria andAppNameNotBetween(String value1, String value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "appName" + " cannot be null"); } criteria.add(new Criterion("app_name not between", value1, value2)); </DeepExtract> return (Criteria) this; }
oauth4j
positive
1,514
public Criteria andUserNameGreaterThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "userName" + " cannot be null"); } criteria.add(new Criterion("user_name >", value)); return (Criteria) this; }
public Criteria andUserNameGreaterThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "userName" + " cannot be null"); } criteria.add(new Criterion("user_name >", value)); </DeepExtract> return (Criteria) this; }
SSM_BookSystem
positive
1,516
public String getTemplateDisableWarningUnused() { return codeTemplates.getProperty("DisableWarningUnused") == null ? "" : codeTemplates.getProperty("DisableWarningUnused"); }
public String getTemplateDisableWarningUnused() { <DeepExtract> return codeTemplates.getProperty("DisableWarningUnused") == null ? "" : codeTemplates.getProperty("DisableWarningUnused"); </DeepExtract> }
OpenCOLLADA
positive
1,517
public void pred16x16(int[] src, int src_offset, int stride) { int i; for (i = 0; i < 16; i++) { src[src_offset + i * stride + 0] = src[src_offset + i * stride + 1] = src[src_offset + i * stride + 2] = src[src_offset + i * stride + 3] = src[src_offset + i * stride + 4] = src[src_offset + i * stride + 5] = src[src_offse...
public void pred16x16(int[] src, int src_offset, int stride) { <DeepExtract> int i; for (i = 0; i < 16; i++) { src[src_offset + i * stride + 0] = src[src_offset + i * stride + 1] = src[src_offset + i * stride + 2] = src[src_offset + i * stride + 3] = src[src_offset + i * stride + 4] = src[src_offset + i * stride + 5] =...
h264j
positive
1,518
public boolean downloadExpenseFile(String id, String idFromServer, boolean isAudio) throws IOException { if (isAudio) { extension = ".amr"; file = fileHelper.getAudioFileEntry(id); } else { extension = ".jpg"; file = fileHelper.getCameraFileLargeEntry(id); } Log.d("******************** Downloading File ****************...
public boolean downloadExpenseFile(String id, String idFromServer, boolean isAudio) throws IOException { if (isAudio) { extension = ".amr"; file = fileHelper.getAudioFileEntry(id); } else { extension = ".jpg"; file = fileHelper.getCameraFileLargeEntry(id); } <DeepExtract> Log.d("******************** Downloading File **...
expense-tracker
positive
1,519