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 Parcelable onSaveInstanceState() { SavedState savedState = new SavedState(super.onSaveInstanceState()); return this.mChecked; return savedState; }
public Parcelable onSaveInstanceState() { SavedState savedState = new SavedState(super.onSaveInstanceState()); <DeepExtract> return this.mChecked; </DeepExtract> return savedState; }
SamsungOneUi
positive
1,306
public int run(String[] args) throws IOException, ParseException { JobConf conf = new JobConf(getConf(), PersistLogBuilder.class); String line = null; Options options = new Options(); options.addOption("i", true, "input file list"); options.addOption("o", true, "output directory"); options.addOption("r", true, "number ...
public int run(String[] args) throws IOException, ParseException { JobConf conf = new JobConf(getConf(), PersistLogBuilder.class); String line = null; Options options = new Options(); options.addOption("i", true, "input file list"); options.addOption("o", true, "output directory"); options.addOption("r", true, "number ...
webarchive-discovery
positive
1,307
public void transferOwnership(Address newOwner) { require(Msg.sender().equals(owner), "Only the owner of the contract can execute it."); emit(new OwnershipTransferredEvent(owner, newOwner)); owner = newOwner; }
public void transferOwnership(Address newOwner) { <DeepExtract> require(Msg.sender().equals(owner), "Only the owner of the contract can execute it."); </DeepExtract> emit(new OwnershipTransferredEvent(owner, newOwner)); owner = newOwner; }
nuls-contracts
positive
1,308
public Builder setFp64Contents(int index, double value) { if (!((bitField0_ & 0x00000040) == 0x00000040)) { fp64Contents_ = new java.util.ArrayList<Double>(fp64Contents_); bitField0_ |= 0x00000040; } fp64Contents_.set(index, value); onChanged(); return this; }
public Builder setFp64Contents(int index, double value) { <DeepExtract> if (!((bitField0_ & 0x00000040) == 0x00000040)) { fp64Contents_ = new java.util.ArrayList<Double>(fp64Contents_); bitField0_ |= 0x00000040; } </DeepExtract> fp64Contents_.set(index, value); onChanged(); return this; }
dl_inference
positive
1,309
public static void main(String[] args) { CoinChange clz = new CoinChange(); int[] coins = { 1, 2, 3 }; if (12 <= 1) { return 12; } int[] f = new int[12 + 1]; Arrays.fill(f, Integer.MAX_VALUE); f[0] = 0; for (int i = 1; i * i <= 12; i++) { for (int j = 1; j <= 12; j++) { if (j - i * i < 0) continue; f[j] = Math.min(f[j]...
public static void main(String[] args) { CoinChange clz = new CoinChange(); int[] coins = { 1, 2, 3 }; if (12 <= 1) { return 12; } int[] f = new int[12 + 1]; Arrays.fill(f, Integer.MAX_VALUE); f[0] = 0; for (int i = 1; i * i <= 12; i++) { for (int j = 1; j <= 12; j++) { if (j - i * i < 0) continue; f[j] = Math.min(f[j]...
interviewprep
positive
1,311
@Test public void testThirdDslContainer() { ClientInterface clientInterface = ElasticSearchHelper.getConfigRestClientUtil(new BaseTemplateContainerImpl("testnamespace7") { @Override protected Map<String, TemplateMeta> loadTemplateMetas(String namespace) { try { List<BaseTemplateMeta> templateMetas = SQLExecutor.queryLi...
@Test public void testThirdDslContainer() { ClientInterface clientInterface = ElasticSearchHelper.getConfigRestClientUtil(new BaseTemplateContainerImpl("testnamespace7") { @Override protected Map<String, TemplateMeta> loadTemplateMetas(String namespace) { try { List<BaseTemplateMeta> templateMetas = SQLExecutor.queryLi...
elasticsearch-example
positive
1,312
@Override public void store(Path path, String name, BiConsumer<String, IOException> stored) throws IOException { if (Files.size(path) > MAX_SIZE) throw new IllegalArgumentException(path + " exceeds maximum size " + MAX_SIZE); try { checkAccount(); try { B2FileVersion fileInfo = client.getFileInfoByName(bucketInfo.getBu...
@Override public void store(Path path, String name, BiConsumer<String, IOException> stored) throws IOException { if (Files.size(path) > MAX_SIZE) throw new IllegalArgumentException(path + " exceeds maximum size " + MAX_SIZE); <DeepExtract> try { checkAccount(); try { B2FileVersion fileInfo = client.getFileInfoByName(bu...
unreal-archive
positive
1,313
@Override public Node next() { if (skip) { skip = false; return current; } Node nextNode = nextImpl(); return nextNode; return current; }
@Override public Node next() { if (skip) { skip = false; return current; } <DeepExtract> Node nextNode = nextImpl(); return nextNode; </DeepExtract> return current; }
libxml2-java
positive
1,314
@Override protected void onCreate(Bundle savedInstanceState) { Log.d(LOGTAG, "onCreate"); super.onCreate(savedInstanceState); vuforiaAppSession = new SampleApplicationSession(this); LayoutInflater inflater = LayoutInflater.from(this); mUILayout = (RelativeLayout) inflater.inflate(R.layout.camera_overlay, null, false); ...
@Override protected void onCreate(Bundle savedInstanceState) { Log.d(LOGTAG, "onCreate"); super.onCreate(savedInstanceState); vuforiaAppSession = new SampleApplicationSession(this); LayoutInflater inflater = LayoutInflater.from(this); mUILayout = (RelativeLayout) inflater.inflate(R.layout.camera_overlay, null, false); ...
Vuforia-Samples-Android-Studio
positive
1,315
@Test public void resolveViewNameNormalDeviceTabletSitePreferenceTabletPrefix() throws Exception { device.setDeviceType(DeviceType.NORMAL); request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device); request.setAttribute(SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE, SitePreference.TABLET); viewResolv...
@Test public void resolveViewNameNormalDeviceTabletSitePreferenceTabletPrefix() throws Exception { device.setDeviceType(DeviceType.NORMAL); request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device); request.setAttribute(SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE, SitePreference.TABLET); viewResolv...
spring-mobile
positive
1,316
public String readString(int nbytes) throws IOException { byte[] data = new byte[nbytes]; readFully(data, 0, data.length); return new String(data); }
public String readString(int nbytes) throws IOException { byte[] data = new byte[nbytes]; <DeepExtract> readFully(data, 0, data.length); </DeepExtract> return new String(data); }
NomadReader
positive
1,317
@Subscribe(threadMode = ThreadMode.MAIN) public void getSign(ViewSign sign) { user = uDao.selectOnLine(); list = cDao.selectAll(user.getUsername()); RecyclerView.LayoutManager manager = new LinearLayoutManager(this); recyclerView.setLayoutManager(manager); adapter = new AddBalanceAdapter(list, this); recyclerView.setAd...
@Subscribe(threadMode = ThreadMode.MAIN) public void getSign(ViewSign sign) { <DeepExtract> user = uDao.selectOnLine(); list = cDao.selectAll(user.getUsername()); RecyclerView.LayoutManager manager = new LinearLayoutManager(this); recyclerView.setLayoutManager(manager); adapter = new AddBalanceAdapter(list, this); recy...
CinemaTicket
positive
1,318
public DockerTest loginAsAlice() { this.commands.add(new DockerCommand(this.deployment, "Failed to login to Artipie", List.of("docker", "login", "--username", "alice", "--password", "123", this.registry), new ContainerResultMatcher())); return this; }
public DockerTest loginAsAlice() { <DeepExtract> this.commands.add(new DockerCommand(this.deployment, "Failed to login to Artipie", List.of("docker", "login", "--username", "alice", "--password", "123", this.registry), new ContainerResultMatcher())); return this; </DeepExtract> }
artipie
positive
1,320
@Override public void run() { mResults.remove(key); }
@Override public void run() { <DeepExtract> mResults.remove(key); </DeepExtract> }
POSA-15
positive
1,321
public RecordedProgram build() { RecordedProgram recordedProgram = new RecordedProgram(); if (this == mRecordedProgram) { return; } mAudioLanguages = mRecordedProgram.mAudioLanguages; mBroadcastGenres = mRecordedProgram.mBroadcastGenres; mCanonicalGenres = mRecordedProgram.mCanonicalGenres; mChannelId = mRecordedProgra...
public RecordedProgram build() { RecordedProgram recordedProgram = new RecordedProgram(); <DeepExtract> if (this == mRecordedProgram) { return; } mAudioLanguages = mRecordedProgram.mAudioLanguages; mBroadcastGenres = mRecordedProgram.mBroadcastGenres; mCanonicalGenres = mRecordedProgram.mCanonicalGenres; mChannelId = m...
androidtv-sample-inputs
positive
1,322
@Override protected void calculateOffsets() { float legendRight = 0f, legendBottom = 0f; float legendRight = 0f, legendBottom = 0f; if (mDrawLegend && mLegend != null && mLegend.getPosition() != LegendPosition.NONE) { if (mLegend.getPosition() == LegendPosition.RIGHT_OF_CHART || mLegend.getPosition() == LegendPosition....
@Override protected void calculateOffsets() { float legendRight = 0f, legendBottom = 0f; float legendRight = 0f, legendBottom = 0f; if (mDrawLegend && mLegend != null && mLegend.getPosition() != LegendPosition.NONE) { if (mLegend.getPosition() == LegendPosition.RIGHT_OF_CHART || mLegend.getPosition() == LegendPosition....
MPChartLib
positive
1,323
public void putSafeArray(SafeArray in) { if (m_pVariant != 0) { return getVariantType(); } else { throw new IllegalStateException("uninitialized Variant"); } putVariantSafeArray(in); }
public void putSafeArray(SafeArray in) { <DeepExtract> if (m_pVariant != 0) { return getVariantType(); } else { throw new IllegalStateException("uninitialized Variant"); } </DeepExtract> putVariantSafeArray(in); }
jacob
positive
1,324
@Test public void testReadAsBinary() throws Throwable { this.requestAction = http -> { final ByteArrayOutputStream body = new ByteArrayOutputStream(); http.<ByteBuffer>onchunk(data -> { byte[] bytes = new byte[data.remaining()]; data.get(bytes); body.write(bytes, 0, bytes.length); }).onend($ -> { threadAssertTrue(Array...
@Test public void testReadAsBinary() throws Throwable { <DeepExtract> this.requestAction = http -> { final ByteArrayOutputStream body = new ByteArrayOutputStream(); http.<ByteBuffer>onchunk(data -> { byte[] bytes = new byte[data.remaining()]; data.get(bytes); body.write(bytes, 0, bytes.length); }).onend($ -> { threadAs...
asity
positive
1,325
private static void solve(PegStack[] pegs) { int srcPeg = 0; int dstPeg = 2; int numberOfDisks = pegs[0].bottomValue(); if (numberOfDisks == 0) { return; } int tmpPeg = getTemporaryPeg(srcPeg, dstPeg); move(pegs, srcPeg, tmpPeg, numberOfDisks - 1); moveOneDisk(pegs, srcPeg, dstPeg); move(pegs, tmpPeg, dstPeg, numberOfD...
private static void solve(PegStack[] pegs) { int srcPeg = 0; int dstPeg = 2; int numberOfDisks = pegs[0].bottomValue(); <DeepExtract> if (numberOfDisks == 0) { return; } int tmpPeg = getTemporaryPeg(srcPeg, dstPeg); move(pegs, srcPeg, tmpPeg, numberOfDisks - 1); moveOneDisk(pegs, srcPeg, dstPeg); move(pegs, tmpPeg, dst...
data-structures-in-java
positive
1,326
public void final_binding(Token finalKeyword) { printRuleHeader(454, "final-binding", ""); System.out.println(); }
public void final_binding(Token finalKeyword) { printRuleHeader(454, "final-binding", ""); <DeepExtract> System.out.println(); </DeepExtract> }
open-fortran-parser
positive
1,327
@Override public void onClick(View v) { if (PViewSizeUtils.onDoubleClick()) { return; } Intent intent = new Intent(); intent.putExtra(ImagePicker.INTENT_KEY_PICKER_RESULT, mSelectList); setResult(true ? ImagePicker.REQ_PICKER_RESULT_CODE : RESULT_CANCELED, intent); finish(); }
@Override public void onClick(View v) { if (PViewSizeUtils.onDoubleClick()) { return; } <DeepExtract> Intent intent = new Intent(); intent.putExtra(ImagePicker.INTENT_KEY_PICKER_RESULT, mSelectList); setResult(true ? ImagePicker.REQ_PICKER_RESULT_CODE : RESULT_CANCELED, intent); finish(); </DeepExtract> }
BaseDemo
positive
1,328
public static void dragBy(final Node node, final double offsetX, final double offsetY, final double dx, final double dy) { final double startX = node.getLayoutX() + offsetX; final double startY = node.getLayoutY() + offsetY; final double dragX = startX + (node.getLayoutX() + dx - node.getLayoutX()); final double dragY ...
public static void dragBy(final Node node, final double offsetX, final double offsetY, final double dx, final double dy) { <DeepExtract> final double startX = node.getLayoutX() + offsetX; final double startY = node.getLayoutY() + offsetY; final double dragX = startX + (node.getLayoutX() + dx - node.getLayoutX()); final...
graph-editor
positive
1,329
@Override public void setNString(int arg0, String arg1) throws SQLException { if (arg0 <= 0) throw new SQLException("Invalid position for parameter (" + arg0 + ")"); this.parameters.put(Integer.valueOf(arg0), arg1); }
@Override public void setNString(int arg0, String arg1) throws SQLException { <DeepExtract> if (arg0 <= 0) throw new SQLException("Invalid position for parameter (" + arg0 + ")"); this.parameters.put(Integer.valueOf(arg0), arg1); </DeepExtract> }
jdbc-redis
positive
1,330
@Override public void keyTyped(KeyEvent ev) { if (surface != null && !surface.requestFocusInWindow()) { surface.requestFocus(); } ev.consume(); }
@Override public void keyTyped(KeyEvent ev) { <DeepExtract> if (surface != null && !surface.requestFocusInWindow()) { surface.requestFocus(); } </DeepExtract> ev.consume(); }
tvnjviewer
positive
1,331
static private String formatDouble(double dd, int minPrecision, int maxPrecision) { BigDecimal bd = new BigDecimal(dd, MathContext.DECIMAL128); bd = bd.setScale(maxPrecision, RoundingMode.HALF_UP); return formatBigDecimal(bd, 2, 7); }
static private String formatDouble(double dd, int minPrecision, int maxPrecision) { BigDecimal bd = new BigDecimal(dd, MathContext.DECIMAL128); bd = bd.setScale(maxPrecision, RoundingMode.HALF_UP); <DeepExtract> return formatBigDecimal(bd, 2, 7); </DeepExtract> }
tradelib
positive
1,332
private static void initializePackageLibraryGit(UnityProjectImportContext context, File packageDir, List<Runnable> writeCommits, Map<String, UnityAssemblyContext> asmdefs, LibraryTable.ModifiableModel librariesModModel) { VirtualFile packageVDir = LocalFileSystem.getInstance().findFileByIoFile(packageDir); if (packageV...
private static void initializePackageLibraryGit(UnityProjectImportContext context, File packageDir, List<Runnable> writeCommits, Map<String, UnityAssemblyContext> asmdefs, LibraryTable.ModifiableModel librariesModModel) { <DeepExtract> VirtualFile packageVDir = LocalFileSystem.getInstance().findFileByIoFile(packageDir)...
consulo-unity3d
positive
1,333
public Criteria andAgeBetween(Integer value1, Integer value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "age" + " cannot be null"); } criteria.add(new Criterion("age between", value1, value2)); return (Criteria) this; }
public Criteria andAgeBetween(Integer value1, Integer value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "age" + " cannot be null"); } criteria.add(new Criterion("age between", value1, value2)); </DeepExtract> return (Criteria) this; }
Whome
positive
1,334
@Override public int findColumn(String columnLabel) throws SQLException { if (isClosed()) { throw new SQLException("ResultSet is closed"); } if (columnLabel == null) { throw new SQLException("Column label is null"); } Integer index = fieldMap.get(columnLabel.toLowerCase(ENGLISH)); if (index == null) { throw new SQLExce...
@Override public int findColumn(String columnLabel) throws SQLException { if (isClosed()) { throw new SQLException("ResultSet is closed"); } <DeepExtract> if (columnLabel == null) { throw new SQLException("Column label is null"); } Integer index = fieldMap.get(columnLabel.toLowerCase(ENGLISH)); if (index == null) { thr...
presto-jdbc-java6
positive
1,335
public void draw() { if (!visible) return; if (bufferInvalid) { Graphics2D g2d = buffer.g2; bufferInvalid = false; buffer.beginDraw(); buffer.background(buffer.color(255, 0)); buffer.noStroke(); buffer.fill(palette[BACK_COLOR]); buffer.rect(0, 0, width, itemHeight); if (expanded) { buffer.fill(palette[ITEM_BACK_COLOR])...
public void draw() { if (!visible) return; <DeepExtract> if (bufferInvalid) { Graphics2D g2d = buffer.g2; bufferInvalid = false; buffer.beginDraw(); buffer.background(buffer.color(255, 0)); buffer.noStroke(); buffer.fill(palette[BACK_COLOR]); buffer.rect(0, 0, width, itemHeight); if (expanded) { buffer.fill(palette[ITE...
hid-serial
positive
1,336
private void setToolbarTitle(long id) { Cursor cursor = ShaderEditorApp.db.getShader(id); if (Database.closeIfEmpty(cursor)) { return; } setQualitySpinner(Database.getFloat(cursor, Database.SHADERS_QUALITY)); setToolbarTitle(cursor); cursor.close(); }
private void setToolbarTitle(long id) { Cursor cursor = ShaderEditorApp.db.getShader(id); if (Database.closeIfEmpty(cursor)) { return; } <DeepExtract> setQualitySpinner(Database.getFloat(cursor, Database.SHADERS_QUALITY)); </DeepExtract> setToolbarTitle(cursor); cursor.close(); }
ShaderEditor
positive
1,337
public _Fields fieldForId(int fieldId) { switch(fieldId) { case 1: return TRUE_AS_OF_SECS; default: return null; } }
public _Fields fieldForId(int fieldId) { <DeepExtract> switch(fieldId) { case 1: return TRUE_AS_OF_SECS; default: return null; } </DeepExtract> }
big-data-src
positive
1,338
@Override public TypeV remove(Object key) { if (NO_MATCH_OLD == null || TOMBSTONE == null) throw new NullPointerException(); final Object res = putIfMatch(this, _kvs, key, TOMBSTONE, NO_MATCH_OLD); assert !(res instanceof Prime); assert res != null; return res == TOMBSTONE ? null : (TypeV) res; }
@Override public TypeV remove(Object key) { <DeepExtract> if (NO_MATCH_OLD == null || TOMBSTONE == null) throw new NullPointerException(); final Object res = putIfMatch(this, _kvs, key, TOMBSTONE, NO_MATCH_OLD); assert !(res instanceof Prime); assert res != null; return res == TOMBSTONE ? null : (TypeV) res; </DeepExtr...
high-scale-lib
positive
1,339
@Override public Collection<JarContainer> load() throws DependencyException { final List<JarContainer> result = new ArrayList<JarContainer>(); final Map<String, String> properties = new HashMap<String, String>(); final SAXBuilder sxb = new SAXBuilder(); try { final Document document = sxb.build(new File(rootFileName));...
@Override public Collection<JarContainer> load() throws DependencyException { final List<JarContainer> result = new ArrayList<JarContainer>(); final Map<String, String> properties = new HashMap<String, String>(); final SAXBuilder sxb = new SAXBuilder(); try { final Document document = sxb.build(new File(rootFileName));...
sonos-java
positive
1,340
protected void onVisible() { if (hasLoaded) { return; } hasLoaded = true; }
protected void onVisible() { <DeepExtract> </DeepExtract> if (hasLoaded) { <DeepExtract> </DeepExtract> return; <DeepExtract> </DeepExtract> } <DeepExtract> </DeepExtract> hasLoaded = true; <DeepExtract> </DeepExtract> }
EnjoyLife
positive
1,341
@Override public void onClick(View v) { FileManager manager = new FileManager(getActivity().getApplicationContext()); File file = new File(manager.getMyQRPath()); if (!file.exists()) { manager.saveMyQRCode(QRExchange.makeQRFriendCode(getActivity(), manager)); } Bundle bundle = new Bundle(); bundle.putString("uri", Uri....
@Override public void onClick(View v) { <DeepExtract> FileManager manager = new FileManager(getActivity().getApplicationContext()); File file = new File(manager.getMyQRPath()); if (!file.exists()) { manager.saveMyQRCode(QRExchange.makeQRFriendCode(getActivity(), manager)); } Bundle bundle = new Bundle(); bundle.putStri...
ndn-photo-app
positive
1,342
public MethodInfo findSuperclassImplementation(HashSet notStrippable) { if (mReturnType == null) { return null; } if (mOverriddenMethod != null) { if (this.signature().equals(mOverriddenMethod.signature())) { return mOverriddenMethod; } } ArrayList<ClassInfo> queue = new ArrayList<ClassInfo>(); if (containingClass().re...
public MethodInfo findSuperclassImplementation(HashSet notStrippable) { if (mReturnType == null) { return null; } if (mOverriddenMethod != null) { if (this.signature().equals(mOverriddenMethod.signature())) { return mOverriddenMethod; } } ArrayList<ClassInfo> queue = new ArrayList<ClassInfo>(); if (containingClass().re...
TWRP2-CM7_build
positive
1,343
public void startForecastDownloader(Context context, Modes downloadMode, boolean forceBroadcast) { UpdatesManager manager = new UpdatesManager(context); List<Uri> uris = manager.getAllUpdateUris(); LocationDatabase locDb = this.getLocationDatabase(context); Log.i("UpdatesReceiver", "ensuring " + uris.size() + " widgets...
public void startForecastDownloader(Context context, Modes downloadMode, boolean forceBroadcast) { UpdatesManager manager = new UpdatesManager(context); List<Uri> uris = manager.getAllUpdateUris(); LocationDatabase locDb = this.getLocationDatabase(context); <DeepExtract> Log.i("UpdatesReceiver", "ensuring " + uris.size...
CanadaWeather
positive
1,345
@Override public void testPeriodic() { subsystems.outputToSmartDashboard(); robotState.outputToSmartDashboard(); enabledLooper.outputToSmartDashboard(); SmartDashboard.putBoolean("Enabled", ds.isEnabled()); SmartDashboard.putNumber("Match time", ds.getMatchTime()); }
@Override public void testPeriodic() { <DeepExtract> subsystems.outputToSmartDashboard(); robotState.outputToSmartDashboard(); enabledLooper.outputToSmartDashboard(); SmartDashboard.putBoolean("Enabled", ds.isEnabled()); SmartDashboard.putNumber("Match time", ds.getMatchTime()); </DeepExtract> }
2019DeepSpace
positive
1,346
public void putOption(final JSONObject option) { cache.put(option.optString(Keys.OBJECT_ID), Solos.clone(option)); final String category = option.optString(Option.OPTION_CATEGORY); categoryCache.remove(category); }
public void putOption(final JSONObject option) { cache.put(option.optString(Keys.OBJECT_ID), Solos.clone(option)); final String category = option.optString(Option.OPTION_CATEGORY); <DeepExtract> categoryCache.remove(category); </DeepExtract> }
solo
positive
1,347
public void mouseExited(java.awt.event.MouseEvent evt) { removeVehicleButton.setBackground(new Color(51, 0, 102)); }
public void mouseExited(java.awt.event.MouseEvent evt) { <DeepExtract> removeVehicleButton.setBackground(new Color(51, 0, 102)); </DeepExtract> }
vehler
positive
1,348
public static int[] crop(int[] argb, int width, Rect rect) { rect.left = Math.max(rect.left, 0); rect.right = Math.min(rect.right, width); int height = argb.length / width; rect.bottom = Math.min(rect.bottom, height); rect.sort(); int[] image = new int[rect.width() * rect.height()]; for (int i = rect.top; i < rect.bott...
public static int[] crop(int[] argb, int width, Rect rect) { <DeepExtract> rect.left = Math.max(rect.left, 0); rect.right = Math.min(rect.right, width); int height = argb.length / width; rect.bottom = Math.min(rect.bottom, height); rect.sort(); </DeepExtract> int[] image = new int[rect.width() * rect.height()]; for (in...
FaceLoginAndroid
positive
1,349
@Override public void changedUpdate(DocumentEvent e) { if (!isChangedNickname) { remoteNameText.setText(remoteHostText.getText() + COLON + remotePortText.getText()); } }
@Override public void changedUpdate(DocumentEvent e) { <DeepExtract> if (!isChangedNickname) { remoteNameText.setText(remoteHostText.getText() + COLON + remotePortText.getText()); } </DeepExtract> }
RemoteResources
positive
1,350
@Override public byte[] signTransaction(byte[] privateKey, byte[] unsignedTransaction) { byte[] signature; byte[] messageSha256 = getSha256().digest(unsignedTransaction); if (nativeEnabled()) { signature = nativeCurve25519.sign(messageSha256, privateKey); } else { signature = curve25519.sign(messageSha256, privateKey);...
@Override public byte[] signTransaction(byte[] privateKey, byte[] unsignedTransaction) { <DeepExtract> byte[] signature; byte[] messageSha256 = getSha256().digest(unsignedTransaction); if (nativeEnabled()) { signature = nativeCurve25519.sign(messageSha256, privateKey); } else { signature = curve25519.sign(messageSha256...
signumj
positive
1,351
public void getClients(List<TreeMap<String, Object>> list) { query("select * from " + "clients", list); }
public void getClients(List<TreeMap<String, Object>> list) { <DeepExtract> query("select * from " + "clients", list); </DeepExtract> }
MTX_HackerTools
positive
1,352
@Override public void run() { mLiveBanner.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null); mLiveBanner.setBackgroundResource(R.drawable.live_orange_bg); mLiveBanner.setTag(null); mLiveBanner.setText(getString(R.string.buffering)); mLiveBanner.bringToFront(); mLiveBanner.startAnimation(AnimationUtils.loa...
@Override public void run() { mLiveBanner.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null); mLiveBanner.setBackgroundResource(R.drawable.live_orange_bg); mLiveBanner.setTag(null); mLiveBanner.setText(getString(R.string.buffering)); <DeepExtract> mLiveBanner.bringToFront(); mLiveBanner.startAnimation(Anim...
kickflip-android-sdk
positive
1,353
@Override public String printTree(String indent) { StringBuffer print = new StringBuffer(); print.append("WordElement: base=").append(getBaseForm()).append(", category=").append(getCategory().toString()).append(", ").append(super.toString()).append('\n'); ElementCategory _category = getCategory(); StringBuffer buffer =...
@Override public String printTree(String indent) { StringBuffer print = new StringBuffer(); print.append("WordElement: base=").append(getBaseForm()).append(", category=").append(getCategory().toString()).append(", ").append(super.toString()).append('\n'); <DeepExtract> ElementCategory _category = getCategory(); StringB...
SimpleNLG-EnFr
positive
1,354
public void newarray_int() { if (this.count >= this.maxLength) { throw new CompileException("Write after end of stream."); } write(Bytecode.NEWARRAY.getBytecode() & 0xff); if (this.count >= this.maxLength) { throw new CompileException("Write after end of stream."); } write(0x0a & 0xff); }
public void newarray_int() { if (this.count >= this.maxLength) { throw new CompileException("Write after end of stream."); } write(Bytecode.NEWARRAY.getBytecode() & 0xff); <DeepExtract> if (this.count >= this.maxLength) { throw new CompileException("Write after end of stream."); } write(0x0a & 0xff); </DeepExtract> }
BASICCompiler
positive
1,355
public SparseDataset fitTransform(List<List<String>> documents) { int nrow = documents.size(); int ncol = tokenToIndex.size(); SparseDataset tfidf = new SparseDataset(ncol); for (int rowNo = 0; rowNo < nrow; rowNo++) { tfidf.set(rowNo, 0, 0.0); Multiset<String> row = HashMultiset.create(documents.get(rowNo)); for (Entr...
public SparseDataset fitTransform(List<List<String>> documents) { <DeepExtract> int nrow = documents.size(); int ncol = tokenToIndex.size(); SparseDataset tfidf = new SparseDataset(ncol); for (int rowNo = 0; rowNo < nrow; rowNo++) { tfidf.set(rowNo, 0, 0.0); Multiset<String> row = HashMultiset.create(documents.get(rowN...
mastering-java-data-science
positive
1,356
public int delete(Criteria criteria) { String sql = criteria.toSQL(); String table = Mapping.getInstance().getTableName(criteria.getRoot().getClazz()); if (Aorm.isDebug()) { log("delete " + table + " where: " + criteria.getWhere()); } int count = delete(table, criteria.getWhere(), criteria.getStringArgs()); if (listene...
public int delete(Criteria criteria) { String sql = criteria.toSQL(); String table = Mapping.getInstance().getTableName(criteria.getRoot().getClazz()); if (Aorm.isDebug()) { log("delete " + table + " where: " + criteria.getWhere()); } int count = delete(table, criteria.getWhere(), criteria.getStringArgs()); <DeepExtrac...
Android-ORM
positive
1,357
final public void SynchronizedStatement() { boolean jjtc000 = true; PsiBuilder.Marker jjtn000 = builder.mark(); IElementType actualType = builder.getTokenType(); if (actualType == SYNCHRONIZED) { builder.advanceLexer(); } else { if (builder.eof()) { if (!reportEof) { reportEof = true; builder.error("Unexpected end of f...
final public void SynchronizedStatement() { boolean jjtc000 = true; PsiBuilder.Marker jjtn000 = builder.mark(); IElementType actualType = builder.getTokenType(); if (actualType == SYNCHRONIZED) { builder.advanceLexer(); } else { if (builder.eof()) { if (!reportEof) { reportEof = true; builder.error("Unexpected end of f...
ideaCC
positive
1,358
public static int getApptVersion(File aapt) throws BrutException { if (!aapt.isFile()) { throw new BrutException("Could not identify aapt binary as executable."); } aapt.setExecutable(true); List<String> cmd = new ArrayList<>(); cmd.add(aapt.getAbsolutePath()); cmd.add("version"); String version = OS.execAndReturn(cmd....
public static int getApptVersion(File aapt) throws BrutException { if (!aapt.isFile()) { throw new BrutException("Could not identify aapt binary as executable."); } aapt.setExecutable(true); List<String> cmd = new ArrayList<>(); cmd.add(aapt.getAbsolutePath()); cmd.add("version"); String version = OS.execAndReturn(cmd....
ratel
positive
1,359
public XmlNode getParentNode() { if (node.getParentNode() == null) return null; if (node.getParentNode() instanceof Element) return new XmlElement((Element) node.getParentNode()); if (node.getParentNode() instanceof Document) return new XmlDocument((Document) node.getParentNode()); if (node.getParentNode() instanceof A...
public XmlNode getParentNode() { <DeepExtract> if (node.getParentNode() == null) return null; if (node.getParentNode() instanceof Element) return new XmlElement((Element) node.getParentNode()); if (node.getParentNode() instanceof Document) return new XmlDocument((Document) node.getParentNode()); if (node.getParentNode(...
cs2j
positive
1,360
public com.google.cloud.solutions.samples.timeseries.dataflow.application.proto.TimeSeriesProtos.TSProto getDefaultInstanceForType() { return DEFAULT_INSTANCE; }
public com.google.cloud.solutions.samples.timeseries.dataflow.application.proto.TimeSeriesProtos.TSProto getDefaultInstanceForType() { <DeepExtract> return DEFAULT_INSTANCE; </DeepExtract> }
data-timeseries-java
positive
1,361
VL eulerTrail() { _adjq = new EQ[n]; int nOdd = 0, start = 0; int nOdd = 0, start = 0; for (int u = 0; u < n; u++) { _adjq[u] = new EQ(); if (start == 0 && out[u] > 0) start = u; for (int i = 0; i < out[u]; i++) _adjq[u].add(edge(u, i)); } for (int v = 0; v < n; v++) { int diff = Math.abs(in[v] - out[v]); if (diff > 1)...
VL eulerTrail() { _adjq = new EQ[n]; int nOdd = 0, start = 0; int nOdd = 0, start = 0; for (int u = 0; u < n; u++) { _adjq[u] = new EQ(); if (start == 0 && out[u] > 0) start = u; for (int i = 0; i < out[u]; i++) _adjq[u].add(edge(u, i)); } for (int v = 0; v < n; v++) { int diff = Math.abs(in[v] - out[v]); if (diff > 1)...
pc-code
positive
1,362
public boolean putLongLite(String key, long value) { if (!valid) { throw new IllegalStateException("this should only be called when LitePrefs didn't initialize once"); } return getLiteInterface().putLongLite(key, value); }
public boolean putLongLite(String key, long value) { if (!valid) { throw new IllegalStateException("this should only be called when LitePrefs didn't initialize once"); } <DeepExtract> return getLiteInterface().putLongLite(key, value); </DeepExtract> }
PureNote
positive
1,363
@Override public void act() { isClimbing = on; swerve.setLowPowerScalar(0.25); }
@Override public void act() { <DeepExtract> isClimbing = on; swerve.setLowPowerScalar(0.25); </DeepExtract> }
2019DeepSpace
positive
1,364
public GrpcService.InferStatistics getDefaultInstanceForType() { return DEFAULT_INSTANCE; }
public GrpcService.InferStatistics getDefaultInstanceForType() { <DeepExtract> return DEFAULT_INSTANCE; </DeepExtract> }
dl_inference
positive
1,365
public Integer getMaxIntegerId() { String id; Query query = new Query(); query.with(Sort.by(new Order(Direction.DESC, "id"))); query.limit(1); T data = mongoTemplate.findOne(query, dao().getClassT()); try { id = data == null ? "0" : (String) dao().getClassT().getMethod("getId").invoke(data); } catch (Exception e) { id ...
public Integer getMaxIntegerId() { <DeepExtract> String id; Query query = new Query(); query.with(Sort.by(new Order(Direction.DESC, "id"))); query.limit(1); T data = mongoTemplate.findOne(query, dao().getClassT()); try { id = data == null ? "0" : (String) dao().getClassT().getMethod("getId").invoke(data); } catch (Exce...
resys-one
positive
1,366
@Test public void singleTerminalState_HasNoCycle_IsValid() { validate(StepFunctionBuilder.stateMachine().startAt("Initial").state("Initial", StepFunctionBuilder.succeedState())); }
@Test public void singleTerminalState_HasNoCycle_IsValid() { <DeepExtract> validate(StepFunctionBuilder.stateMachine().startAt("Initial").state("Initial", StepFunctionBuilder.succeedState())); </DeepExtract> }
light-workflow-4j
positive
1,367
private void updateProgressBars() { int currentLength = envelope.getText().length(); int smsLength = envelope.getSMSLength(); int maxTextLength = envelope.getMaxTextLength(); fullProgressBar.setMaximum(maxTextLength); int min = envelope.getPenultimateIndexOfCut(envelope.getText(), smsLength); int max = min + smsLength;...
private void updateProgressBars() { int currentLength = envelope.getText().length(); int smsLength = envelope.getSMSLength(); int maxTextLength = envelope.getMaxTextLength(); fullProgressBar.setMaximum(maxTextLength); int min = envelope.getPenultimateIndexOfCut(envelope.getText(), smsLength); int max = min + smsLength;...
esmska
positive
1,368
public CellReference composeFirstSimpleTextHeaderCellReference() { if (simpleTextHeaderRowIndex == null || firstDataColumn == null) { return null; } return new CellReference(simpleTextHeaderRowIndex, firstDataColumn); }
public CellReference composeFirstSimpleTextHeaderCellReference() { <DeepExtract> if (simpleTextHeaderRowIndex == null || firstDataColumn == null) { return null; } return new CellReference(simpleTextHeaderRowIndex, firstDataColumn); </DeepExtract> }
MemPOI
positive
1,369
@Override public Cursor cursor() { return new CursorImpl(tagSets, false); }
@Override public Cursor cursor() { <DeepExtract> return new CursorImpl(tagSets, false); </DeepExtract> }
metrics
positive
1,370
public static com.conveyal.transitwand.TransitWandProtos.Upload.Route.Point parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { com.conveyal.transitwand.TransitWandProtos.Upload.Route.Point result = buildPartial(); if (!result.i...
public static com.conveyal.transitwand.TransitWandProtos.Upload.Route.Point parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { <DeepExtract> com.conveyal.transitwand.TransitWandProtos.Upload.Route.Point result = buildPartial();...
transit-wand
positive
1,371
public void addMatchVlanPcp(String value) { parms.add(new Tuple<String, String>("vlan_pcp", value)); }
public void addMatchVlanPcp(String value) { <DeepExtract> parms.add(new Tuple<String, String>("vlan_pcp", value)); </DeepExtract> }
warp
positive
1,372
@Override public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) { bindEntityTexture((EntityBlunderShot) entity); GL11.glPushMatrix(); GL11.glTranslatef((float) d, (float) d1, (float) d2); Tessellator tessellator = Tessellator.instance; float f2 = 0.0F; float f3 = 5F / 16F; float f10 = 0...
@Override public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) { <DeepExtract> bindEntityTexture((EntityBlunderShot) entity); GL11.glPushMatrix(); GL11.glTranslatef((float) d, (float) d1, (float) d2); Tessellator tessellator = Tessellator.instance; float f2 = 0.0F; float f3 = 5F / 16F;...
balkons-weaponmod
positive
1,373
public static void setLong(long l, byte[] buf, int o) { buf[o] = (byte) ((int) (l & 0xffffffffL) & 255); o++; buf[o] = (byte) (((int) (l & 0xffffffffL) & 0xff00) >> 8); o++; buf[o] = (byte) (((int) (l & 0xffffffffL) & 0xff0000) >> 16); o++; buf[o] = (byte) (((int) (l & 0xffffffffL) & 0xff000000) >> 24); buf[o + 4] = (b...
public static void setLong(long l, byte[] buf, int o) { buf[o] = (byte) ((int) (l & 0xffffffffL) & 255); o++; buf[o] = (byte) (((int) (l & 0xffffffffL) & 0xff00) >> 8); o++; buf[o] = (byte) (((int) (l & 0xffffffffL) & 0xff0000) >> 16); o++; buf[o] = (byte) (((int) (l & 0xffffffffL) & 0xff000000) >> 24); <DeepExtract> b...
deployr-rserve
positive
1,374
public Call buildCall(Callback callback) { return okHttpRequest.generateRequest(callback); if (readTimeOut > 0 || writeTimeOut > 0 || connTimeOut > 0) { readTimeOut = readTimeOut > 0 ? readTimeOut : OkHttpUtils.DEFAULT_MILLISECONDS; writeTimeOut = writeTimeOut > 0 ? writeTimeOut : OkHttpUtils.DEFAULT_MILLISECONDS; conn...
public Call buildCall(Callback callback) { <DeepExtract> return okHttpRequest.generateRequest(callback); </DeepExtract> if (readTimeOut > 0 || writeTimeOut > 0 || connTimeOut > 0) { readTimeOut = readTimeOut > 0 ? readTimeOut : OkHttpUtils.DEFAULT_MILLISECONDS; writeTimeOut = writeTimeOut > 0 ? writeTimeOut : OkHttpUti...
Shopping
positive
1,377
public Criteria andUserPasswordGreaterThanOrEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "userPassword" + " cannot be null"); } criteria.add(new Criterion("user_password >=", value)); return (Criteria) this; }
public Criteria andUserPasswordGreaterThanOrEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "userPassword" + " cannot be null"); } criteria.add(new Criterion("user_password >=", value)); </DeepExtract> return (Criteria) this; }
LostAndFound
positive
1,378
@Override public void onClick(View v) { Intent intent = WelcomeActivity.getStartActivityIntent(this); startActivity(intent); finish(); }
@Override public void onClick(View v) { <DeepExtract> Intent intent = WelcomeActivity.getStartActivityIntent(this); startActivity(intent); finish(); </DeepExtract> }
input-samples
positive
1,379
public RetCode natr(int startIdx, int endIdx, float[] inHigh, float[] inLow, float[] inClose, int optInTimePeriod, MInteger outBegIdx, MInteger outNBElement, double[] outReal) { MInteger outBegIdx1 = new MInteger(); MInteger outNbElement1 = new MInteger(); double[] prevATRTemp = new double[1]; if (startIdx < 0) return ...
public RetCode natr(int startIdx, int endIdx, float[] inHigh, float[] inLow, float[] inClose, int optInTimePeriod, MInteger outBegIdx, MInteger outNBElement, double[] outReal) { MInteger outBegIdx1 = new MInteger(); MInteger outNbElement1 = new MInteger(); double[] prevATRTemp = new double[1]; if (startIdx < 0) return ...
clj-ta-lib
positive
1,380
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_gallery); ButterKnife.bind(this); context = this; photoSetId = getIntent().getStringExtra(PHOTO_SET); if (TextUtils.isEmpty(photoSetId)) { imgList = getIntent().getStringArrayListExtra(IMG...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_gallery); ButterKnife.bind(this); context = this; photoSetId = getIntent().getStringExtra(PHOTO_SET); if (TextUtils.isEmpty(photoSetId)) { imgList = getIntent().getStringArrayListExtra(IMG...
C9MJ
positive
1,381
@Override public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { executeMigrations(db, oldVersion, newVersion); }
@Override public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { <DeepExtract> executeMigrations(db, oldVersion, newVersion); </DeepExtract> }
ReActiveAndroid
positive
1,382
public void onPrepared(MediaPlayer mp) { Log.d("onPrepared"); mCurrentState = STATE_PREPARED; if (mOnPreparedListener != null) mOnPreparedListener.onPrepared(mMediaPlayer); if (mMediaController != null) mMediaController.setEnabled(true); return mVideoWidth; return mVideoHeight; return mVideoAspectRatio; long seekToPosi...
public void onPrepared(MediaPlayer mp) { Log.d("onPrepared"); mCurrentState = STATE_PREPARED; if (mOnPreparedListener != null) mOnPreparedListener.onPrepared(mMediaPlayer); if (mMediaController != null) mMediaController.setEnabled(true); return mVideoWidth; return mVideoHeight; <DeepExtract> return mVideoAspectRatio; <...
FunLive
positive
1,384
@Override public void run() { InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); } }
@Override public void run() { <DeepExtract> InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); } </DeepExtract> }
FrameModel
positive
1,385
private void setBorderSettingsVisibility() { ivBorder.setSelected(true); if (View.VISIBLE == null) return; if (selectedView == View.VISIBLE && rlColorChooser.getVisibility() == View.VISIBLE) { hideSettingBars(); return; } selectedView = View.VISIBLE; rlColorChooser.setVisibility(View.VISIBLE); unselectAllItems(); final...
private void setBorderSettingsVisibility() { ivBorder.setSelected(true); if (View.VISIBLE == null) return; if (selectedView == View.VISIBLE && rlColorChooser.getVisibility() == View.VISIBLE) { hideSettingBars(); return; } selectedView = View.VISIBLE; rlColorChooser.setVisibility(View.VISIBLE); unselectAllItems(); final...
Chimee
positive
1,386
@Test public void testExecute_WhenFinderMethodIsFindingEntityWithCompositeKeyList_WhenFindingByGlobalSecondaryHashAndRangeIndexHashAndRangeKey_WhereSecondaryHashKeyIsPrimaryRangeKey() throws ParseException { if ("playlistName" != null) { Mockito.when(mockPlaylistEntityMetadata.isRangeKeyAware()).thenReturn(true); } Moc...
@Test public void testExecute_WhenFinderMethodIsFindingEntityWithCompositeKeyList_WhenFindingByGlobalSecondaryHashAndRangeIndexHashAndRangeKey_WhereSecondaryHashKeyIsPrimaryRangeKey() throws ParseException { <DeepExtract> if ("playlistName" != null) { Mockito.when(mockPlaylistEntityMetadata.isRangeKeyAware()).thenRetur...
spring-data-dynamodb
positive
1,387
public static boolean touchValidateCaptchaCode(ServletRequest request, String captchaParamName) { String captcha = request.getParameter(captchaParamName); if (StringUtils.isBlank(captcha)) { throw new ServiceException("captcha required"); } captcha = captcha.toUpperCase(); captchaService = captchaService == null ? Spri...
public static boolean touchValidateCaptchaCode(ServletRequest request, String captchaParamName) { <DeepExtract> String captcha = request.getParameter(captchaParamName); if (StringUtils.isBlank(captcha)) { throw new ServiceException("captcha required"); } captcha = captcha.toUpperCase(); captchaService = captchaService ...
s2jh4net
positive
1,388
protected void onException(Exception e) throws RuntimeException { e.printStackTrace(); }
protected void onException(Exception e) throws RuntimeException { <DeepExtract> e.printStackTrace(); </DeepExtract> }
RxAndroidBootstrap
positive
1,389
public static MinigamesAPI setupAPI(JavaPlugin plugin_, String minigame, Class<?> arenaclass) { ArenasConfig arenasconfig = new ArenasConfig(plugin_); MessagesConfig messagesconfig = new MessagesConfig(plugin_); ClassesConfig classesconfig = new ClassesConfig(plugin_, false); StatsConfig statsconfig = new StatsConfig(p...
public static MinigamesAPI setupAPI(JavaPlugin plugin_, String minigame, Class<?> arenaclass) { <DeepExtract> ArenasConfig arenasconfig = new ArenasConfig(plugin_); MessagesConfig messagesconfig = new MessagesConfig(plugin_); ClassesConfig classesconfig = new ClassesConfig(plugin_, false); StatsConfig statsconfig = new...
MinigamesAPI
positive
1,390
private void deleteRows(ActionEvent e) { DefaultTableModel model = ((DefaultTableModel) (metadataTable.getModel())); int theRow = metadataTable.getSelectedRow(); int rowCount = metadataTable.getSelectedRowCount(); DefaultTableModel model = ((DefaultTableModel) (metadataTable.getModel())); Vector modelRows = model.getDa...
private void deleteRows(ActionEvent e) { DefaultTableModel model = ((DefaultTableModel) (metadataTable.getModel())); int theRow = metadataTable.getSelectedRow(); int rowCount = metadataTable.getSelectedRowCount(); <DeepExtract> DefaultTableModel model = ((DefaultTableModel) (metadataTable.getModel())); Vector modelRows...
jExifToolGUI
positive
1,391
@Override public void onResponse(Bitmap response) { mCache.putBitmap(cacheKey, response); BatchedImageRequest request = mInFlightRequests.remove(cacheKey); if (request != null) { request.mResponseBitmap = response; batchResponse(cacheKey, request); } }
@Override public void onResponse(Bitmap response) { <DeepExtract> mCache.putBitmap(cacheKey, response); BatchedImageRequest request = mInFlightRequests.remove(cacheKey); if (request != null) { request.mResponseBitmap = response; batchResponse(cacheKey, request); } </DeepExtract> }
BaoDian
positive
1,392
public void onClick(View v) { cpu.execute(); statusLabel.setText(cpu.getStatusText()); String speed = "(unknown)"; if (lastCycleCount > cpu.cycleCount) lastCycleCount = cpu.cycleCount; long cyclesElapsed = cpu.cycleCount - lastCycleCount; long time = System.currentTimeMillis(); long millisElapsed = time - lastActualUpd...
public void onClick(View v) { cpu.execute(); <DeepExtract> statusLabel.setText(cpu.getStatusText()); String speed = "(unknown)"; if (lastCycleCount > cpu.cycleCount) lastCycleCount = cpu.cycleCount; long cyclesElapsed = cpu.cycleCount - lastCycleCount; long time = System.currentTimeMillis(); long millisElapsed = time -...
ADCPU-16Emu
positive
1,393
@Test public void decodeJPEG() { assertEquals(TestResources.png().width, TestResources.jpeg().width); assertEquals(TestResources.png().height, TestResources.jpeg().height); double delta = 0, max = -1, min = 1; for (int x = 0; x < TestResources.jpeg().width; ++x) { for (int y = 0; y < TestResources.jpeg().height; ++y) {...
@Test public void decodeJPEG() { <DeepExtract> assertEquals(TestResources.png().width, TestResources.jpeg().width); assertEquals(TestResources.png().height, TestResources.jpeg().height); double delta = 0, max = -1, min = 1; for (int x = 0; x < TestResources.jpeg().width; ++x) { for (int y = 0; y < TestResources.jpeg()....
sourceafis-java
positive
1,394
@GetMapping("/clients/search/by-client-id/{clientId}") CustomClient getClientByClientId(@PathVariable("clientId") String clientId) { for (var client : CLIENTS) { if (CustomClient::getClientId.apply(client).equals(clientId)) { return client; } } return null; }
@GetMapping("/clients/search/by-client-id/{clientId}") CustomClient getClientByClientId(@PathVariable("clientId") String clientId) { <DeepExtract> for (var client : CLIENTS) { if (CustomClient::getClientId.apply(client).equals(clientId)) { return client; } } return null; </DeepExtract> }
keycloak-extension-playground
positive
1,395
public void clear() { if (loaded) { messageReference.decrementReferenceCount(); } message = null; dropped = false; loaded = false; destination = null; }
public void clear() { <DeepExtract> if (loaded) { messageReference.decrementReferenceCount(); } message = null; dropped = false; loaded = false; </DeepExtract> destination = null; }
pulsar-jms
positive
1,396
public void onSessionPut(HttpServletRequestEvent event, ActivityContextInterface aci) { if (super.logger.isWarningEnabled()) super.logger.warning("Received wrong HTTP method '" + "session.PUT" + "'."); HttpServletResponse response = event.getResponse(); response.setStatus(405); response.setContentType("text/plain"); P...
public void onSessionPut(HttpServletRequestEvent event, ActivityContextInterface aci) { <DeepExtract> if (super.logger.isWarningEnabled()) super.logger.warning("Received wrong HTTP method '" + "session.PUT" + "'."); HttpServletResponse response = event.getResponse(); response.setStatus(405); response.setContentType("t...
ussdgateway
positive
1,397
private XMLNode createLayer(Vector renderData, FDisplayListItem startItem) { XMLNode rootNode = new XMLNode("g"); if (startItem != null) { CXFORMALPHA aCXFORMALPHA = startItem.getCXFORMALPHA(); if (aCXFORMALPHA != null) { if (aCXFORMALPHA.HasAddTerms()) { if (aCXFORMALPHA.getAdd(3) > 0 && aCXFORMALPHA.getAdd(3) <= 255)...
private XMLNode createLayer(Vector renderData, FDisplayListItem startItem) { XMLNode rootNode = new XMLNode("g"); <DeepExtract> if (startItem != null) { CXFORMALPHA aCXFORMALPHA = startItem.getCXFORMALPHA(); if (aCXFORMALPHA != null) { if (aCXFORMALPHA.HasAddTerms()) { if (aCXFORMALPHA.getAdd(3) > 0 && aCXFORMALPHA.get...
SWFTools-Core
positive
1,398
public void processCard(CardPublicationData card, Optional<CurrentUserWithPerimeters> user, Optional<Jwt> jwt) { if (card.getPublisherType() == null) card.setPublisherType(PublisherTypeEnum.EXTERNAL); if (user.isPresent() && checkAuthenticationForCardSending && !cardPermissionControlService.isCardPublisherAllowedForUse...
public void processCard(CardPublicationData card, Optional<CurrentUserWithPerimeters> user, Optional<Jwt> jwt) { if (card.getPublisherType() == null) card.setPublisherType(PublisherTypeEnum.EXTERNAL); if (user.isPresent() && checkAuthenticationForCardSending && !cardPermissionControlService.isCardPublisherAllowedForUse...
operatorfabric-core
positive
1,399
private void validateConfig() throws DBException { if (StringUtil.isEmptyString(url)) throw new DBException("DB-D0007", "driverClassName"); if (StringUtil.isEmptyString(url)) throw new DBException("DB-D0007", "url"); if (StringUtil.isEmptyString(url)) throw new DBException("DB-D0007", "username"); }
private void validateConfig() throws DBException { if (StringUtil.isEmptyString(url)) throw new DBException("DB-D0007", "driverClassName"); if (StringUtil.isEmptyString(url)) throw new DBException("DB-D0007", "url"); <DeepExtract> if (StringUtil.isEmptyString(url)) throw new DBException("DB-D0007", "username"); </DeepE...
rexdb
positive
1,400
@SneakyThrows public static String getAggregateStoreDDL(@Nonnull Connection connection) { final String databaseName = JdbcUtils.getDatabaseName(connection); if (AGGREGATE_STORE_DDLS.get(databaseName) == null) { final String databaseName = JdbcUtils.getDatabaseName(connection); throw new IllegalArgumentException(String....
@SneakyThrows public static String getAggregateStoreDDL(@Nonnull Connection connection) { final String databaseName = JdbcUtils.getDatabaseName(connection); <DeepExtract> if (AGGREGATE_STORE_DDLS.get(databaseName) == null) { final String databaseName = JdbcUtils.getDatabaseName(connection); throw new IllegalArgumentExc...
jes
positive
1,401
public boolean visit(SimpleName node) { ITypeBinding tb = node.resolveTypeBinding(); if (tb != null) { if (tb.getName().equals("boolean")) { expressionsInScope.add(node); } } return true; }
public boolean visit(SimpleName node) { <DeepExtract> ITypeBinding tb = node.resolveTypeBinding(); if (tb != null) { if (tb.getName().equals("boolean")) { expressionsInScope.add(node); } } </DeepExtract> return true; }
genprog4java
positive
1,402
@Override public void run() { if (this.status != ZmqSocketStatus.PENDING) { this.status = ZmqSocketStatus.PENDING; metrics.setStatus(ZmqSocketStatus.PENDING); LOGGER.log(Level.INFO, "Socket [" + name + "@" + socketAddr + "] changed status: " + ZmqSocketStatus.PENDING); } do { final ZmqSocketStatus status = openSocket(t...
@Override public void run() { if (this.status != ZmqSocketStatus.PENDING) { this.status = ZmqSocketStatus.PENDING; metrics.setStatus(ZmqSocketStatus.PENDING); LOGGER.log(Level.INFO, "Socket [" + name + "@" + socketAddr + "] changed status: " + ZmqSocketStatus.PENDING); } do { final ZmqSocketStatus status = openSocket(t...
jeromq-jms
positive
1,403
public Criteria andUpdateTimeLessThan(Date value) { if (value == null) { throw new RuntimeException("Value for " + "updateTime" + " cannot be null"); } criteria.add(new Criterion("update_time <", value)); return (Criteria) this; }
public Criteria andUpdateTimeLessThan(Date value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "updateTime" + " cannot be null"); } criteria.add(new Criterion("update_time <", value)); </DeepExtract> return (Criteria) this; }
dubbo-mock
positive
1,404
@Test public void test2() throws Exception { String expected = "import static com.MyUtil.kuk;\n" + "import static org.junit.Assert.assertNotNull;\n" + "import static tmutil.StringUtil.replaceText;\n\n" + "import java.util.HashMap;\n" + "import java.util.Map;\n" + "\n" + "import org.jingle.mocquer.MockControl;\n" + N + ...
@Test public void test2() throws Exception { String expected = "import static com.MyUtil.kuk;\n" + "import static org.junit.Assert.assertNotNull;\n" + "import static tmutil.StringUtil.replaceText;\n\n" + "import java.util.HashMap;\n" + "import java.util.Map;\n" + "\n" + "import org.jingle.mocquer.MockControl;\n" + N + ...
EclipseCodeFormatter
positive
1,405
@PUT @WebMethod(name = "updateFailure") public JsonHttpResponse updateFailure(@JsonBody MyJsonObject body) { this.message = body.getMessage() + " - NOT UPDATED"; JsonHttpResponse error500 = new JsonHttpResponse(JSONObject.fromObject(body), 500); throw error500; }
@PUT @WebMethod(name = "updateFailure") public JsonHttpResponse updateFailure(@JsonBody MyJsonObject body) { <DeepExtract> this.message = body.getMessage() + " - NOT UPDATED"; </DeepExtract> JsonHttpResponse error500 = new JsonHttpResponse(JSONObject.fromObject(body), 500); throw error500; }
jenkins-test-harness
positive
1,406
public void chooseNewRoot() { DirectoryChooser chooser = new DirectoryChooser(); chooser.setTitle(I18n.t(Constants.I18N_DIRECTORY_CHOOSER_TITLE)); File selectedDirectory = chooser.showDialog(stage); if (selectedDirectory == null) return; Path path = selectedDirectory.toPath(); if (realRoots.containsKey(path.toString())...
public void chooseNewRoot() { DirectoryChooser chooser = new DirectoryChooser(); chooser.setTitle(I18n.t(Constants.I18N_DIRECTORY_CHOOSER_TITLE)); File selectedDirectory = chooser.showDialog(stage); if (selectedDirectory == null) return; Path path = selectedDirectory.toPath(); <DeepExtract> if (realRoots.containsKey(pa...
roda-in
positive
1,407
public void triggerAuthenticationDidCompleteWithPayload(JRDictionary rpx_result) { JRAuthenticatedUser user = new JRAuthenticatedUser(rpx_result, mCurrentlyAuthenticatingProvider.getName(), getWelcomeMessageFromCookieString()); mAuthenticatedUsersByProvider.put(mCurrentlyAuthenticatingProvider.getName(), user); Archive...
public void triggerAuthenticationDidCompleteWithPayload(JRDictionary rpx_result) { JRAuthenticatedUser user = new JRAuthenticatedUser(rpx_result, mCurrentlyAuthenticatingProvider.getName(), getWelcomeMessageFromCookieString()); mAuthenticatedUsersByProvider.put(mCurrentlyAuthenticatingProvider.getName(), user); Archive...
engage.android
positive
1,408
public Criteria andSaleEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "sale" + " cannot be null"); } criteria.add(new Criterion("sale =", value)); return (Criteria) this; }
public Criteria andSaleEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "sale" + " cannot be null"); } criteria.add(new Criterion("sale =", value)); </DeepExtract> return (Criteria) this; }
Tmall_SSM-master
positive
1,409
@Override public double toBytes(double d) { double limit = MAX / C_PIB; if (d > limit) { return Double.MAX_VALUE; } if (d < -limit) { return Double.MIN_VALUE; } return d * C_PIB; }
@Override public double toBytes(double d) { <DeepExtract> double limit = MAX / C_PIB; if (d > limit) { return Double.MAX_VALUE; } if (d < -limit) { return Double.MIN_VALUE; } return d * C_PIB; </DeepExtract> }
hive-io-experimental
positive
1,410
public Filter.Result filter(Logger arg0, Level arg1, Marker arg2, String message, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) { try { if (message == null || message.isEmpty()) { return Filter.Result.NEUTRAL; } else if (!Registry.ID_PATTERN.matcher(message).find() && !Registry.MENTION_TAG_CONVERTER....
public Filter.Result filter(Logger arg0, Level arg1, Marker arg2, String message, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) { <DeepExtract> try { if (message == null || message.isEmpty()) { return Filter.Result.NEUTRAL; } else if (!Registry.ID_PATTERN.matcher(message).find() && !Registry.MENTION_...
InteractiveChat
positive
1,411