before
stringlengths
33
3.21M
after
stringlengths
63
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
private void incrementProgressInternal() { m_Progress++; float f = (float) m_Progress / m_Max; log("getDegree -- f is " + f + " progress is " + m_Progress + " max is " + m_Max); return (int) (360.f * f); }
private void incrementProgressInternal() { m_Progress++; <DeepExtract> float f = (float) m_Progress / m_Max; log("getDegree -- f is " + f + " progress is " + m_Progress + " max is " + m_Max); return (int) (360.f * f); </DeepExtract> }
WaveHeartRate
positive
4,537
private void pageChanged(IWorkbenchPage page) { if (page == null) { return; } IWorkbenchWindow workbenchWindow = page.getWorkbenchWindow(); if (workbenchWindow == null) { return; } Shell shell = workbenchWindow.getShell(); runUpdate(shell); }
private void pageChanged(IWorkbenchPage page) { if (page == null) { return; } IWorkbenchWindow workbenchWindow = page.getWorkbenchWindow(); <DeepExtract> if (workbenchWindow == null) { return; } Shell shell = workbenchWindow.getShell(); runUpdate(shell); </DeepExtract> }
ccw
positive
4,538
private TypeSpec createType(int sdk, boolean debuggable) { TypeSpec.Builder result = TypeSpec.classBuilder(bindingClassName.simpleName()).addModifiers(PUBLIC).addOriginatingElement(enclosingElement); if (isFinal) { result.addModifiers(FINAL); } if (parentBinding != null) { result.superclass(parentBinding.getBindingClas...
private TypeSpec createType(int sdk, boolean debuggable) { TypeSpec.Builder result = TypeSpec.classBuilder(bindingClassName.simpleName()).addModifiers(PUBLIC).addOriginatingElement(enclosingElement); if (isFinal) { result.addModifiers(FINAL); } if (parentBinding != null) { result.superclass(parentBinding.getBindingClas...
butterknife
positive
4,539
public static void update(boolean minimize, boolean compress, boolean cache, boolean inMemoryCache) { GreenScriptPlugin.updateMinimizer(minimize, compress, cache, inMemoryCache); flash.success("Setting updated"); flash.keep(); GreenScriptPlugin gs = GreenScriptPlugin.getInstance(); List<String> jsDeps = new ArrayList<S...
public static void update(boolean minimize, boolean compress, boolean cache, boolean inMemoryCache) { GreenScriptPlugin.updateMinimizer(minimize, compress, cache, inMemoryCache); flash.success("Setting updated"); flash.keep(); <DeepExtract> GreenScriptPlugin gs = GreenScriptPlugin.getInstance(); List<String> jsDeps = n...
greenscript
positive
4,540
private static void registerAllBlocks() { int logCount = 0; for (final LogBlock block : logBlocks) { registerLogBlock(block, String.format("logs%d", logCount), block.getSubBlockNames()); logCount++; } int leavesCount = 0; for (final Block block : leavesBlocks) { registerLeavesBlock(block, String.format("leaves%d", leav...
private static void registerAllBlocks() { int logCount = 0; for (final LogBlock block : logBlocks) { registerLogBlock(block, String.format("logs%d", logCount), block.getSubBlockNames()); logCount++; } int leavesCount = 0; for (final Block block : leavesBlocks) { registerLeavesBlock(block, String.format("leaves%d", leav...
ancient-trees
positive
4,541
private void emitLineTo(final double x1, final double y1) { final int outcode0 = this.cOutCode; if (clipRect != null) { final int outcode1 = DHelpers.outcode(x1, y1, clipRect); final int orCode = (outcode0 | outcode1); if (orCode != 0) { final int sideCode = outcode0 & outcode1; if (sideCode == 0) { if (subdivide) { su...
private void emitLineTo(final double x1, final double y1) { <DeepExtract> final int outcode0 = this.cOutCode; if (clipRect != null) { final int outcode1 = DHelpers.outcode(x1, y1, clipRect); final int orCode = (outcode0 | outcode1); if (orCode != 0) { final int sideCode = outcode0 & outcode1; if (sideCode == 0) { if (s...
marlin-fx
positive
4,542
@Override public void run() { ready = true; executorService.execute(onReadyHandler); }
@Override public void run() { <DeepExtract> ready = true; executorService.execute(onReadyHandler); </DeepExtract> }
reactive-grpc
positive
4,543
@Override public Object arrayOfField(int size) { return (T[]) Array.newInstance(type, size); }
@Override public Object arrayOfField(int size) { <DeepExtract> return (T[]) Array.newInstance(type, size); </DeepExtract> }
Collections
positive
4,544
@Override public synchronized void receive(FeedQuote aFeedQuote) { String symbol = aFeedQuote.symbol(); CollatedFeedQuotes collated = this.collatedFeedQuotes.get(symbol); if (collated == null) { collated = new CollatedFeedQuotes(); this.collatedFeedQuotes.put(symbol, collated); } this.feedQuotes.add(aFeedQuote); Map<St...
@Override public synchronized void receive(FeedQuote aFeedQuote) { String symbol = aFeedQuote.symbol(); CollatedFeedQuotes collated = this.collatedFeedQuotes.get(symbol); if (collated == null) { collated = new CollatedFeedQuotes(); this.collatedFeedQuotes.put(symbol, collated); } this.feedQuotes.add(aFeedQuote); <DeepE...
IDDD_NYSE
positive
4,545
@Override public int executeMethod(HostConfiguration hostconfig, HttpMethod method, HttpState state) throws IOException, HttpException { final TraceeFilterConfiguration filterConfiguration = backend.getConfiguration(profile); if (!backend.isEmpty() && filterConfiguration.shouldProcessContext(OutgoingRequest)) { final M...
@Override public int executeMethod(HostConfiguration hostconfig, HttpMethod method, HttpState state) throws IOException, HttpException { <DeepExtract> final TraceeFilterConfiguration filterConfiguration = backend.getConfiguration(profile); if (!backend.isEmpty() && filterConfiguration.shouldProcessContext(OutgoingReque...
tracee
positive
4,547
@Test public void testTextOnly() { Template template = parser.parse("xyz"); Template expected = CarmlTemplate.build(Arrays.asList(new Text("xyz"))); assertEquals(expected, template); }
@Test public void testTextOnly() { <DeepExtract> Template template = parser.parse("xyz"); Template expected = CarmlTemplate.build(Arrays.asList(new Text("xyz"))); assertEquals(expected, template); </DeepExtract> }
carml
positive
4,548
public Fenix andGreaterThanEqual(String field, Object value, String name) { if (true) { this.source.setPrefix(SymbolConst.AND).setSymbol(SymbolConst.GTE); new JavaSqlInfoBuilder(this.source).buildNormalSql(field, StringHelper.isBlank(name) ? StringHelper.fixDot(field) : name, value); this.source.reset(); } return this;...
public Fenix andGreaterThanEqual(String field, Object value, String name) { <DeepExtract> if (true) { this.source.setPrefix(SymbolConst.AND).setSymbol(SymbolConst.GTE); new JavaSqlInfoBuilder(this.source).buildNormalSql(field, StringHelper.isBlank(name) ? StringHelper.fixDot(field) : name, value); this.source.reset(); ...
fenix
positive
4,549
@Override public void handleParseResult(Object obj) { data.setSrc(obj.toString()); newsWebView.loadData(obj.toString(), "text/html; charset=utf-8", "utf-8"); new Thread() { @Override public void run() { super.run(); ContentValues values = new ContentValues(); values.put(TableContract.TableNews._ID, data.getId()); value...
@Override public void handleParseResult(Object obj) { data.setSrc(obj.toString()); <DeepExtract> newsWebView.loadData(obj.toString(), "text/html; charset=utf-8", "utf-8"); </DeepExtract> new Thread() { @Override public void run() { super.run(); ContentValues values = new ContentValues(); values.put(TableContract.TableN...
SicauHelper
positive
4,550
private void btnTimKiemActionPerformed(java.awt.event.ActionEvent evt) { txt_TenNKH.setText(""); txt_Ma_NKH.setText(""); txt_Ma_NKH.setEnabled(true); tar_Mota.setText(""); btnThem.setEnabled(true); tab_KhachHang.clearSelection(); lbl_Cus_ID_Hint.setVisible(false); lbl_MaNKH_Search_Hint.setVisible(false); tableModel = n...
private void btnTimKiemActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> txt_TenNKH.setText(""); txt_Ma_NKH.setText(""); txt_Ma_NKH.setEnabled(true); tar_Mota.setText(""); btnThem.setEnabled(true); tab_KhachHang.clearSelection(); lbl_Cus_ID_Hint.setVisible(false); lbl_MaNKH_Search_Hint.setVisible(false); ...
StoreManager
positive
4,551
@Override public void rescan() throws ConfigParseException, IOException, SQLException { logger.info(Log.PROCESS, "Rescan"); Log.setJobContext(agentName); logger.debug(Log.INIT, "scan"); ArrayList<AppJobRunner> joblist = getJobList(); if (joblist.size() > 0) { Database database = profile.getDatabase(); for (AppJobRunner...
@Override public void rescan() throws ConfigParseException, IOException, SQLException { logger.info(Log.PROCESS, "Rescan"); <DeepExtract> Log.setJobContext(agentName); logger.debug(Log.INIT, "scan"); ArrayList<AppJobRunner> joblist = getJobList(); if (joblist.size() > 0) { Database database = profile.getDatabase(); for...
sndml3
positive
4,552
public static <T> List<T> readDataFromFile(File file, Class<T> clazz) throws IOException { List<T> dataList = new ArrayList<>(); List<Map<String, Object>> list = ExcelUtil.getReader(Files.newInputStream(file.toPath())).readAll(); IoUtil.close(Files.newInputStream(file.toPath())); if (CollectionUtils.isEmpty(list)) { re...
public static <T> List<T> readDataFromFile(File file, Class<T> clazz) throws IOException { <DeepExtract> List<T> dataList = new ArrayList<>(); List<Map<String, Object>> list = ExcelUtil.getReader(Files.newInputStream(file.toPath())).readAll(); IoUtil.close(Files.newInputStream(file.toPath())); if (CollectionUtils.isEmp...
minimal-boot
positive
4,553
public static NBTTagCompound getRandomBuffCompound(int lvl) { NBTTagCompound compound = new NBTTagCompound(); compound.setIntArray(NBT_BUFF_ARRAY_NAME, getRandomBuffSet(lvl)); return compound; }
public static NBTTagCompound getRandomBuffCompound(int lvl) { NBTTagCompound compound = new NBTTagCompound(); <DeepExtract> compound.setIntArray(NBT_BUFF_ARRAY_NAME, getRandomBuffSet(lvl)); </DeepExtract> return compound; }
Aura-Cascade
positive
4,554
public PasetoV2 build() { super.fillInDefaults(); if (v2CryptoProvider == null) { v2CryptoProvider = V2CryptoLoader.getProvider(); } if (nonceGenerator == null) { nonceGenerator = v2CryptoProvider.getNonceGenerator(); } return new PasetoV2(base64Provider, encodingProvider, v2CryptoProvider, nonceGenerator); }
public PasetoV2 build() { <DeepExtract> super.fillInDefaults(); if (v2CryptoProvider == null) { v2CryptoProvider = V2CryptoLoader.getProvider(); } if (nonceGenerator == null) { nonceGenerator = v2CryptoProvider.getNonceGenerator(); } </DeepExtract> return new PasetoV2(base64Provider, encodingProvider, v2CryptoProvider,...
paseto
positive
4,555
public void resetOriginals() { mStartingStartTrim = 0; mStartingEndTrim = 0; mStartingRotation = 0; mStartTrim = 0; invalidateSelf(); mEndTrim = 0; invalidateSelf(); mRotation = 0; invalidateSelf(); }
public void resetOriginals() { mStartingStartTrim = 0; mStartingEndTrim = 0; mStartingRotation = 0; mStartTrim = 0; invalidateSelf(); mEndTrim = 0; invalidateSelf(); <DeepExtract> mRotation = 0; invalidateSelf(); </DeepExtract> }
TaobaoUnion
positive
4,556
public void actionPerformed(java.awt.event.ActionEvent evt) { migrationNameTextField.setEnabled(false); migrationTableNameTextField.setEnabled(true); migrationFromTextField.setEnabled(false); migrationToTextField.setEnabled(false); setEnabledMigrationTable(false); }
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> migrationNameTextField.setEnabled(false); migrationTableNameTextField.setEnabled(true); migrationFromTextField.setEnabled(false); migrationToTextField.setEnabled(false); setEnabledMigrationTable(false); </DeepExtract> }
fuelphp-netbeans
positive
4,557
@Override public V remove(Object key) { WeakReference<V> ref; WeakReference<V> ref = hashMap.get(key); if (ref == null) { remove(key); ref = null; } else ref = ref.get(); if (ref == null) { return null; } else { hashMap.remove(key); return ref.get(); } }
@Override public V remove(Object key) { <DeepExtract> WeakReference<V> ref; WeakReference<V> ref = hashMap.get(key); if (ref == null) { remove(key); ref = null; } else ref = ref.get(); </DeepExtract> if (ref == null) { return null; } else { hashMap.remove(key); return ref.get(); } }
java-baidupcs
positive
4,558
@Override public void enable() { if (find_in_hotbar() == -1) { this.set_disable(); } holes.clear(); for (BlockPos pos : WurstplusBlockInteractHelper.getSphere(WurstplusPlayerUtil.GetLocalPlayerPosFloored(), hole_range.get_value(1), (int) hole_range.get_value(1), false, true, 0)) { if (!mc.world.getBlockState(pos).getBl...
@Override public void enable() { if (find_in_hotbar() == -1) { this.set_disable(); } <DeepExtract> holes.clear(); for (BlockPos pos : WurstplusBlockInteractHelper.getSphere(WurstplusPlayerUtil.GetLocalPlayerPosFloored(), hole_range.get_value(1), (int) hole_range.get_value(1), false, true, 0)) { if (!mc.world.getBlockSt...
wurstplus-two
positive
4,559
@Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { int pos = viewHolder.getAdapterPosition(); if (swipedPos != pos) recoverQueue.add(swipedPos); swipedPos = pos; if (buttonsBuffer.containsKey(swipedPos)) buttons = buttonsBuffer.get(swipedPos); else buttons.clear(); buttonsBuffer.clear()...
@Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { int pos = viewHolder.getAdapterPosition(); if (swipedPos != pos) recoverQueue.add(swipedPos); swipedPos = pos; if (buttonsBuffer.containsKey(swipedPos)) buttons = buttonsBuffer.get(swipedPos); else buttons.clear(); buttonsBuffer.clear()...
micopacks
positive
4,560
public void actionPerformed(java.awt.event.ActionEvent evt) { JFileChooser chooser = new JFileChooser(busDescriptionTextField.getText()); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { busDescriptionTextField.setText(chooser.getSelectedFil...
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> JFileChooser chooser = new JFileChooser(busDescriptionTextField.getText()); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { busDescriptionTextField.setText(chooser....
Kayak
positive
4,561
public static Block registerBlockByFullName(Block block, ItemBlock itemBlock, String name) { block.setRegistryName(new ResourceLocation(name)); return GameRegistry.register(block); itemBlock.setRegistryName(new ResourceLocation(name)); return GameRegistry.register(itemBlock); return block; }
public static Block registerBlockByFullName(Block block, ItemBlock itemBlock, String name) { block.setRegistryName(new ResourceLocation(name)); return GameRegistry.register(block); <DeepExtract> itemBlock.setRegistryName(new ResourceLocation(name)); return GameRegistry.register(itemBlock); </DeepExtract> return block; ...
ImmersivePetroleum
positive
4,562
@Override public void onInitialized() { super.onInitialized(); mGamma = mGamma; setFloat(mGammaLocation, mGamma); }
@Override public void onInitialized() { super.onInitialized(); <DeepExtract> mGamma = mGamma; setFloat(mGammaLocation, mGamma); </DeepExtract> }
KSYStreamer_Android
positive
4,563
private void onUpgradeFailure() { mIcon.setVisibility(View.VISIBLE); mProgressText.setVisibility(View.GONE); mProgressText.setText("0%"); mUpgradeStatus.setText(R.string.main_entry_upgrade); mUpgradeReminder.setVisibility(true ? View.VISIBLE : View.GONE); String currentVersion = SoundBarORM.getSettingValue(this.getActi...
private void onUpgradeFailure() { <DeepExtract> mIcon.setVisibility(View.VISIBLE); mProgressText.setVisibility(View.GONE); mProgressText.setText("0%"); mUpgradeStatus.setText(R.string.main_entry_upgrade); mUpgradeReminder.setVisibility(true ? View.VISIBLE : View.GONE); </DeepExtract> String currentVersion = SoundBarORM...
misound
positive
4,566
private static String getLowerCamelCaseField(FieldDescriptorProto fdp) { StringBuilder sb = new StringBuilder(); if (ACTIONSCRIPT_KEYWORDS.contains(fdp.getName())) { sb.append("__"); } sb.append(Character.toLowerCase(fdp.getName().charAt(0))); boolean upper = false; for (int i = 1; i < fdp.getName().length(); i++) { ch...
private static String getLowerCamelCaseField(FieldDescriptorProto fdp) { <DeepExtract> StringBuilder sb = new StringBuilder(); if (ACTIONSCRIPT_KEYWORDS.contains(fdp.getName())) { sb.append("__"); } sb.append(Character.toLowerCase(fdp.getName().charAt(0))); boolean upper = false; for (int i = 1; i < fdp.getName().lengt...
protohx
positive
4,567
public void openFile(File file, int sheetNo) throws IOException, FileNotFoundException { this.openWorkbook(new File(file)); openSheet = openWorkbook.getSheetAt(sheetNo); }
public void openFile(File file, int sheetNo) throws IOException, FileNotFoundException { <DeepExtract> this.openWorkbook(new File(file)); </DeepExtract> openSheet = openWorkbook.getSheetAt(sheetNo); }
taf
positive
4,568
@Override public JsonGenerator writeNumber(BigInteger value) throws JacksonException { if (value == null) { writeNull(); return this; } if (!_streamWriteContext.writeValue()) { _reportError("Cannot " + "write number" + ", expecting a property name"); } if (_nextName == null) { handleMissingName(); } try { if (_nextIsAt...
@Override public JsonGenerator writeNumber(BigInteger value) throws JacksonException { if (value == null) { writeNull(); return this; } <DeepExtract> if (!_streamWriteContext.writeValue()) { _reportError("Cannot " + "write number" + ", expecting a property name"); } </DeepExtract> if (_nextName == null) { handleMissing...
jackson-dataformat-xml
positive
4,569
@Override public void onClick(DialogInterface dialog, int which) { info.setHost(host); info.setPort(port); info.setUsername(username); info.setPassword(password); info.setDbname(dbname); dao.update(info); Toast.makeText(getApplicationContext(), R.string.update_conn_succ, Toast.LENGTH_LONG).show(); setResult(RESULT_CODE...
@Override public void onClick(DialogInterface dialog, int which) { info.setHost(host); info.setPort(port); info.setUsername(username); info.setPassword(password); info.setDbname(dbname); dao.update(info); Toast.makeText(getApplicationContext(), R.string.update_conn_succ, Toast.LENGTH_LONG).show(); <DeepExtract> setResu...
aMysqlClient
positive
4,571
private void setContentTypeText() { if (contentType != null) throw new IllegalStateException("Content type already set to " + contentType); else { contentType = false ? CONTENT_IMAGE : CONTENT_TEXT; response.setContentType(contentType); } }
private void setContentTypeText() { <DeepExtract> if (contentType != null) throw new IllegalStateException("Content type already set to " + contentType); else { contentType = false ? CONTENT_IMAGE : CONTENT_TEXT; response.setContentType(contentType); } </DeepExtract> }
ditaa
positive
4,572
public Builder driveDirection(DriveDirection driveDirection) { if (created) { throw new IllegalStateException("Already created"); } val.driveDirection = driveDirection; return this; }
public Builder driveDirection(DriveDirection driveDirection) { <DeepExtract> if (created) { throw new IllegalStateException("Already created"); } </DeepExtract> val.driveDirection = driveDirection; return this; }
camdenm
positive
4,573
private static void e(@NonNull Object tag, @NonNull ImmutableValue<String> origin, @NonNull String message, @NonNull Throwable t) { AssertUtil.assertTrue(BuildConfig.DEBUG); try { if (Async.TRACE_ASYNC_ORIGIN && Async.WORKER != null) { originAsync().then(ccOrigin -> { origin.then(o -> { if (Async.SHOW_ERROR_STACK_TRACE...
private static void e(@NonNull Object tag, @NonNull ImmutableValue<String> origin, @NonNull String message, @NonNull Throwable t) { AssertUtil.assertTrue(BuildConfig.DEBUG); <DeepExtract> try { if (Async.TRACE_ASYNC_ORIGIN && Async.WORKER != null) { originAsync().then(ccOrigin -> { origin.then(o -> { if (Async.SHOW_ERR...
cascade
positive
4,574
@RequestMapping(value = "/getAllKinds.do") @ResponseBody public List<AllKinds> getAllKind() { return allKindsService.selectAll(); }
@RequestMapping(value = "/getAllKinds.do") @ResponseBody public List<AllKinds> getAllKind() { <DeepExtract> return allKindsService.selectAll(); </DeepExtract> }
Used-Trading-Platform
positive
4,575
@Override public String getEntityTypeName() { return fieldName; }
@Override public String getEntityTypeName() { <DeepExtract> return fieldName; </DeepExtract> }
tmdm-common
positive
4,577
public void removeSessionCallbackParameterI(String key) { if (!Util.isValidParameter(key, "key", "Session Callback")) return; if (sessionParameters.callbackParameters == null) { logger.warn("Session Callback parameters are not set"); return; } String oldValue = sessionParameters.callbackParameters.remove(key); if (oldV...
public void removeSessionCallbackParameterI(String key) { if (!Util.isValidParameter(key, "key", "Session Callback")) return; if (sessionParameters.callbackParameters == null) { logger.warn("Session Callback parameters are not set"); return; } String oldValue = sessionParameters.callbackParameters.remove(key); if (oldV...
adobe_air_sdk
positive
4,578
@Override protected List<String> getClassPaths() { List<String> classPath = super.getClassPaths(); classPath.add(getSourcePathFromClass(Props.class)); classPath.add(getSourcePathFromClass(JavaProcessJob.class)); classPath.add(getSourcePathFromClass(HadoopSecurePigWrapper.class)); classPath.add(getSourcePathFromClass(Ha...
@Override protected List<String> getClassPaths() { List<String> classPath = super.getClassPaths(); classPath.add(getSourcePathFromClass(Props.class)); classPath.add(getSourcePathFromClass(JavaProcessJob.class)); classPath.add(getSourcePathFromClass(HadoopSecurePigWrapper.class)); classPath.add(getSourcePathFromClass(Ha...
hodor
positive
4,581
public String getCupsStdString() { if (ppdRec.stdList == null) { return ""; } String cupsString = ""; boolean isNext = false; for (PpdSectionList group : ppdRec.stdList) { for (PpdItemList section : group) { if (section.defaultValue.equals(section.savedValue)) { continue; } if (isNext) cupsString = cupsString + "#"; el...
public String getCupsStdString() { <DeepExtract> if (ppdRec.stdList == null) { return ""; } String cupsString = ""; boolean isNext = false; for (PpdSectionList group : ppdRec.stdList) { for (PpdItemList section : group) { if (section.defaultValue.equals(section.savedValue)) { continue; } if (isNext) cupsString = cupsSt...
JfCupsPrintService
positive
4,583
public SQL DROP_TABLE() { keywords.add("TABLE"); lastCall = KEYWORD; return this; }
public SQL DROP_TABLE() { <DeepExtract> keywords.add("TABLE"); lastCall = KEYWORD; return this; </DeepExtract> }
java-crud-api
positive
4,584
public static WpanNodeDiscover parse(AtCommandResponse response) { if (!response.getCommand().equals("ND")) { throw new IllegalArgumentException("This method is only applicable for the ND command"); } int[] data = response.getValue(); if (data == null || data.length == 0) { throw new IllegalArgumentException("ND comman...
public static WpanNodeDiscover parse(AtCommandResponse response) { if (!response.getCommand().equals("ND")) { throw new IllegalArgumentException("This method is only applicable for the ND command"); } int[] data = response.getValue(); if (data == null || data.length == 0) { throw new IllegalArgumentException("ND comman...
xbee-api
positive
4,585
public void validateCloudSdk() throws CloudSdkNotFoundException, CloudSdkOutOfDateException, CloudSdkVersionFileException { if (!Files.isDirectory(sdkPath)) { throw new CloudSdkNotFoundException("Validation Error: SDK location '" + sdkPath + "' is not a directory."); } if (!Files.isRegularFile(getGCloudPath())) { throw...
public void validateCloudSdk() throws CloudSdkNotFoundException, CloudSdkOutOfDateException, CloudSdkVersionFileException { if (!Files.isDirectory(sdkPath)) { throw new CloudSdkNotFoundException("Validation Error: SDK location '" + sdkPath + "' is not a directory."); } if (!Files.isRegularFile(getGCloudPath())) { throw...
appengine-plugins-core
positive
4,586
public static <K> void mergeSort(Queue<K> S, Comparator<K> comp) { int n = S.size(); if (n < 2) { return; } int mid = n / 2; Queue<K> S1 = new LinkedQueue<>(); Queue<K> S2 = new LinkedQueue<>(); while (S1.size() < mid) { S1.enqueue(S.dequeue()); } while (!S.isEmpty()) { S2.enqueue(S.dequeue()); } mergeSort(S1, comp); m...
public static <K> void mergeSort(Queue<K> S, Comparator<K> comp) { int n = S.size(); if (n < 2) { return; } int mid = n / 2; Queue<K> S1 = new LinkedQueue<>(); Queue<K> S2 = new LinkedQueue<>(); while (S1.size() < mid) { S1.enqueue(S.dequeue()); } while (!S.isEmpty()) { S2.enqueue(S.dequeue()); } mergeSort(S1, comp); m...
data-structures-and-algorithms
positive
4,589
Symbol addConstantModule(final String moduleName) { int hashCode = hash(Symbol.CONSTANT_MODULE_TAG, moduleName); Entry entry = get(hashCode); while (entry != null) { if (entry.tag == Symbol.CONSTANT_MODULE_TAG && entry.hashCode == hashCode && entry.value.equals(moduleName)) { return entry; } entry = entry.next; } const...
Symbol addConstantModule(final String moduleName) { <DeepExtract> int hashCode = hash(Symbol.CONSTANT_MODULE_TAG, moduleName); Entry entry = get(hashCode); while (entry != null) { if (entry.tag == Symbol.CONSTANT_MODULE_TAG && entry.hashCode == hashCode && entry.value.equals(moduleName)) { return entry; } entry = entry...
LunarClientSpoofer
positive
4,590
public Criteria andOrderStatusIsNull() { if ("order_status is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("order_status is null")); return (Criteria) this; }
public Criteria andOrderStatusIsNull() { <DeepExtract> if ("order_status is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("order_status is null")); </DeepExtract> return (Criteria) this; }
sihai-maven-ssm-alipay
positive
4,592
@Test @Tag("slow") void testMate8() { searchEngine.getBoard().setFen("8/2p5/3k4/1p1p1K2/8/1P1P4/2P5/8 w"); System.out.println("Looking for " + "b3b4"); searchEngine.go(SearchParameters.get(5000)); String bestOperation = Move.toString(searchEngine.getBestMove()); System.out.println(); assertEquals("b3b4", bestOperation)...
@Test @Tag("slow") void testMate8() { <DeepExtract> searchEngine.getBoard().setFen("8/2p5/3k4/1p1p1K2/8/1P1P4/2P5/8 w"); System.out.println("Looking for " + "b3b4"); searchEngine.go(SearchParameters.get(5000)); String bestOperation = Move.toString(searchEngine.getBestMove()); System.out.println(); assertEquals("b3b4", ...
carballo
positive
4,593
@Deprecated public CSVFormat withEscape(final char escape) { return new CSVFormat(this); }
@Deprecated public CSVFormat withEscape(final char escape) { <DeepExtract> return new CSVFormat(this); </DeepExtract> }
commons-csv
positive
4,595
public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields; switch(fieldId) { case 1: fields = TRUE_AS_OF_SECS; default: fields = null; } if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; }
public static _Fields findByThriftIdOrThrow(int fieldId) { <DeepExtract> _Fields fields; switch(fieldId) { case 1: fields = TRUE_AS_OF_SECS; default: fields = null; } </DeepExtract> if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; }
big-data-src
positive
4,596
public RetCode cdlAdvanceBlock(int startIdx, int endIdx, float[] inOpen, float[] inHigh, float[] inLow, float[] inClose, MInteger outBegIdx, MInteger outNBElement, int[] outInteger) { double[] ShadowShortPeriodTotal = new double[3]; double[] ShadowLongPeriodTotal = new double[2]; double[] NearPeriodTotal = new double[3...
public RetCode cdlAdvanceBlock(int startIdx, int endIdx, float[] inOpen, float[] inHigh, float[] inLow, float[] inClose, MInteger outBegIdx, MInteger outNBElement, int[] outInteger) { double[] ShadowShortPeriodTotal = new double[3]; double[] ShadowLongPeriodTotal = new double[2]; double[] NearPeriodTotal = new double[3...
clj-ta-lib
positive
4,597
public Object[][] getInnerData() { Object[][] data = new Object[this.results.size()][3]; int i = 0; for (PassageDistancesResult result : this.results) { data[i][0] = result.getDocumentAId(); data[i][1] = result.getDocumentBId(); Double value = new Double(result.getDistance()); DecimalFormat df = new DecimalFormat("#0.0...
public Object[][] getInnerData() { <DeepExtract> Object[][] data = new Object[this.results.size()][3]; int i = 0; for (PassageDistancesResult result : this.results) { data[i][0] = result.getDocumentAId(); data[i][1] = result.getDocumentBId(); Double value = new Double(result.getDistance()); DecimalFormat df = new Decim...
tml
positive
4,598
public TestSource appendTestFields(TestField... fields) { this.specs.addAll(Arrays.asList(Arrays.stream(fields).map(TestField::createFieldSpec).toArray(FieldSpec[]::new))); return this; }
public TestSource appendTestFields(TestField... fields) { <DeepExtract> this.specs.addAll(Arrays.asList(Arrays.stream(fields).map(TestField::createFieldSpec).toArray(FieldSpec[]::new))); return this; </DeepExtract> }
Akatsuki
positive
4,599
public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) { final int recoverAnimSize = dX.size(); for (int i = 0; i < recoverAnimSize; i++) { final SakaItemTouchHelper.RecoverAnimation anim = dX.get(i); anim.update()...
public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) { <DeepExtract> final int recoverAnimSize = dX.size(); for (int i = 0; i < recoverAnimSize; i++) { final SakaItemTouchHelper.RecoverAnimation anim = dX.get(i);...
TimeLine
positive
4,600
@Test public void preciseMatch() { LocaleMapping lm = impl(); assertThat(lm.findClosestMatch(candidateLocales, new Locale("a", "b", "c")), is(new Locale("a", "b", "c"))); LocaleMapping lm = impl(); assertThat(lm.findClosestMatch(candidateLocales, new Locale("a", "b")), is(new Locale("a", "b"))); LocaleMapping lm = impl...
@Test public void preciseMatch() { LocaleMapping lm = impl(); assertThat(lm.findClosestMatch(candidateLocales, new Locale("a", "b", "c")), is(new Locale("a", "b", "c"))); LocaleMapping lm = impl(); assertThat(lm.findClosestMatch(candidateLocales, new Locale("a", "b")), is(new Locale("a", "b"))); <DeepExtract> LocaleMap...
c10n
positive
4,601
void start() { this.removeMessages(MESSAGE_TICK); this.mStatus = MARQUEE_RUNNING; if (mStatus != MARQUEE_RUNNING) { return; } removeMessages(MESSAGE_TICK); final TextView textView = mView.get(); if (textView != null) { if (mScroll >= mMaxScrollX) { mScrollUpdate = -mScrollUnit; } else if (mScroll < mMinScrollX) { mScro...
void start() { this.removeMessages(MESSAGE_TICK); this.mStatus = MARQUEE_RUNNING; <DeepExtract> if (mStatus != MARQUEE_RUNNING) { return; } removeMessages(MESSAGE_TICK); final TextView textView = mView.get(); if (textView != null) { if (mScroll >= mMaxScrollX) { mScrollUpdate = -mScrollUnit; } else if (mScroll < mMinSc...
Pure-File-Manager
positive
4,602
public int[][] updateMatrix(int[][] matrix) { Queue<int[]> queue = new LinkedList<>(); ; int m = matrix.length, n = matrix[0].length; boolean[][] used = new boolean[m][n]; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (matrix[i][j] == 0) { queue.offer(new int[] { i, j }); used[i][j] = true; } } } int[]...
public int[][] updateMatrix(int[][] matrix) { <DeepExtract> Queue<int[]> queue = new LinkedList<>(); ; int m = matrix.length, n = matrix[0].length; boolean[][] used = new boolean[m][n]; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (matrix[i][j] == 0) { queue.offer(new int[] { i, j }); used[i][j] = tru...
LeetCode
positive
4,603
@Override protected void onSetUpView() { fileMessageBody = (NormalFileMessageBody) message.getBody(); String filePath = fileMessageBody.getLocalUrl(); fileNameView.setText(fileMessageBody.getFileName()); fileSizeView.setText(TextFormater.getDataSize(fileMessageBody.getFileSize())); if (message.direct == EMMessage.Direc...
@Override protected void onSetUpView() { fileMessageBody = (NormalFileMessageBody) message.getBody(); String filePath = fileMessageBody.getLocalUrl(); fileNameView.setText(fileMessageBody.getFileName()); fileSizeView.setText(TextFormater.getDataSize(fileMessageBody.getFileSize())); if (message.direct == EMMessage.Direc...
EaseUICustomer
positive
4,604
public static void killProcess(String processName) { if (hasBusyBox()) { fastRebootCommand = "busybox killall " + processName; } else { fastRebootCommand = "killall " + processName; } ShellCommand cmd = new ShellCommand(new String[] { fastRebootCommand }, true); return Shell.runCommand(cmd); }
public static void killProcess(String processName) { if (hasBusyBox()) { fastRebootCommand = "busybox killall " + processName; } else { fastRebootCommand = "killall " + processName; } <DeepExtract> ShellCommand cmd = new ShellCommand(new String[] { fastRebootCommand }, true); return Shell.runCommand(cmd); </DeepExtract...
apptoolkit
positive
4,605
public Criteria andCreatetimeIsNotNull() { if ("createtime is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("createtime is not null")); return (Criteria) this; }
public Criteria andCreatetimeIsNotNull() { <DeepExtract> if ("createtime is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("createtime is not null")); </DeepExtract> return (Criteria) this; }
Maven-Spring-SpringMVC-Mybatis
positive
4,606
public void testRideImporterShortRide() throws IOException, ParseException { InputStream is = getClass().getClassLoader().getResourceAsStream("assets/ride-short.ride"); BikeyRideImporter importer = new BikeyRideImporter(mContentResolver, is, getRideImporterProgressListener()); importer.doImport(); RideSelection rideSel...
public void testRideImporterShortRide() throws IOException, ParseException { InputStream is = getClass().getClassLoader().getResourceAsStream("assets/ride-short.ride"); BikeyRideImporter importer = new BikeyRideImporter(mContentResolver, is, getRideImporterProgressListener()); importer.doImport(); RideSelection rideSel...
bikey
positive
4,607
private void initStarImageViews() { removeAllViews(); for (int i = 0; i < starCount; ++i) { ImageView imageView = new ImageView(getContext()); LayoutParams param = new LayoutParams(starWidth, starHeight, 1.0f); imageView.setLayoutParams(param); imageView.setPadding(starPaddingBoth, 0, starPaddingBoth, 0); imageView.set...
private void initStarImageViews() { removeAllViews(); for (int i = 0; i < starCount; ++i) { ImageView imageView = new ImageView(getContext()); LayoutParams param = new LayoutParams(starWidth, starHeight, 1.0f); imageView.setLayoutParams(param); imageView.setPadding(starPaddingBoth, 0, starPaddingBoth, 0); imageView.set...
QuickDevFramework
positive
4,609
public RetCode cdl2Crows(int startIdx, int endIdx, double[] inOpen, double[] inHigh, double[] inLow, double[] inClose, MInteger outBegIdx, MInteger outNBElement, int[] outInteger) { if (startIdx < 0) return RetCode.OutOfRangeStartIndex; if ((endIdx < 0) || (endIdx < startIdx)) return RetCode.OutOfRangeEndIndex; return ...
public RetCode cdl2Crows(int startIdx, int endIdx, double[] inOpen, double[] inHigh, double[] inLow, double[] inClose, MInteger outBegIdx, MInteger outNBElement, int[] outInteger) { if (startIdx < 0) return RetCode.OutOfRangeStartIndex; if ((endIdx < 0) || (endIdx < startIdx)) return RetCode.OutOfRangeEndIndex; <DeepEx...
clj-ta-lib
positive
4,611
@Override public void moveTo(float x, float y) throws IOException { if (rectanglePath == null) { rectanglePath = new Rectangle2D.Double(x, y, 0, 0); } else { rectanglePath.add(x, y); } }
@Override public void moveTo(float x, float y) throws IOException { <DeepExtract> if (rectanglePath == null) { rectanglePath = new Rectangle2D.Double(x, y, 0, 0); } else { rectanglePath.add(x, y); } </DeepExtract> }
testarea-pdfbox2
positive
4,612
private void setFunctions(byte[] buffer, int length) { StringBuilder funcList = new StringBuilder(); functions = new ArrayList<>(); for (int ptr = 5, max = length - 2; ptr < max; ptr++) { if (buffer[ptr] == 0) { functions.add(Function.BIND_IMAGE); funcList.append("BIND, "); } else if (buffer[ptr] == 2) { functions.add(...
private void setFunctions(byte[] buffer, int length) { StringBuilder funcList = new StringBuilder(); functions = new ArrayList<>(); for (int ptr = 5, max = length - 2; ptr < max; ptr++) { if (buffer[ptr] == 0) { functions.add(Function.BIND_IMAGE); funcList.append("BIND, "); } else if (buffer[ptr] == 2) { functions.add(...
dm3270
positive
4,613
public final K lastKey() { if (subHighest() == null) throw new NoSuchElementException(); return subHighest().key; }
public final K lastKey() { <DeepExtract> if (subHighest() == null) throw new NoSuchElementException(); return subHighest().key; </DeepExtract> }
bbst-showdown
positive
4,614
public String getLimitString(String sql, int offset, int limit) { if (offset > 0) { throw new UnsupportedOperationException("sql server has no offset"); } return new StringBuffer(sql.length() + 8).append(sql).insert(getAfterSelectInsertPoint(sql), " top " + limit).toString(); }
public String getLimitString(String sql, int offset, int limit) { <DeepExtract> if (offset > 0) { throw new UnsupportedOperationException("sql server has no offset"); } return new StringBuffer(sql.length() + 8).append(sql).insert(getAfterSelectInsertPoint(sql), " top " + limit).toString(); </DeepExtract> }
redis-admin
positive
4,615
public void actionPerformed(java.awt.event.ActionEvent evt) { if (restrart_a_previous_run_option.isSelected() == false) { Options_8 = " empty "; Options_9 = " empty "; restart_a_previous_run_box.setText(""); } }
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> if (restrart_a_previous_run_option.isSelected() == false) { Options_8 = " empty "; Options_9 = " empty "; restart_a_previous_run_box.setText(""); } </DeepExtract> }
ERSN-OpenMC
positive
4,617
public void onClick(View view) { mResponse.arg1 = R.id.button_do_nothing; mResponse.sendToTarget(); dismiss(); }
public void onClick(View view) { <DeepExtract> mResponse.arg1 = R.id.button_do_nothing; mResponse.sendToTarget(); dismiss(); </DeepExtract> }
practical-android
positive
4,618
public void reset() { super.reset(); resetThreadCountField(threadCountField, 4); primeSet.clear(); setState(0); GlobalConcurrentMap.set(new ConcurrentHashMap<Integer, String>()); message1(" ", ConcurrentExampleConstants.DEFAULT_BACKGROUND); message2(" ", ConcurrentExampleConstants.DEFAULT_BACKGROUND); }
public void reset() { super.reset(); <DeepExtract> resetThreadCountField(threadCountField, 4); </DeepExtract> primeSet.clear(); setState(0); GlobalConcurrentMap.set(new ConcurrentHashMap<Integer, String>()); message1(" ", ConcurrentExampleConstants.DEFAULT_BACKGROUND); message2(" ", ConcurrentExampleConstants.DEFAULT_B...
java-concurrent-animated
positive
4,619
@Test public void testGetSecretAsParamAsync() throws Exception { final SsmAsyncClient ssmAsyncClient = TestUtils.getClientSSMAsyncV2(); final SecretsManagerAsyncClient secretsManagerAsyncClient = TestUtils.getClientSecretsManagerAsyncV2(); final String secretName = "test-s-" + UUID.randomUUID().toString(); createReq ->...
@Test public void testGetSecretAsParamAsync() throws Exception { final SsmAsyncClient ssmAsyncClient = TestUtils.getClientSSMAsyncV2(); final SecretsManagerAsyncClient secretsManagerAsyncClient = TestUtils.getClientSecretsManagerAsyncV2(); <DeepExtract> final String secretName = "test-s-" + UUID.randomUUID().toString()...
localstack-java-utils
positive
4,620
private void processGTIDEvent(RawEventData eventData, String lastGTIDSet) { this.metrics.getRegistry().counter("augmenter_context.type.gtid").inc(1L); GTIDRawEventData gtidRawEventData = GTIDRawEventData.class.cast(eventData); this.gtidSet.set(lastGTIDSet); this.shouldAugmentFlag.set(false); this.queryType.set(QueryAug...
private void processGTIDEvent(RawEventData eventData, String lastGTIDSet) { this.metrics.getRegistry().counter("augmenter_context.type.gtid").inc(1L); GTIDRawEventData gtidRawEventData = GTIDRawEventData.class.cast(eventData); this.gtidSet.set(lastGTIDSet); this.shouldAugmentFlag.set(false); this.queryType.set(QueryAug...
replicator
positive
4,622
@Override public void widgetSelected(SelectionEvent e) { int index = configTable.getSelectionIndex(); if (index >= 0) { JettyLaunchConfigEntry entry = configEntryList.get(index); IWorkbench workbench = PlatformUI.getWorkbench(); IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); IWorkbenchPage page = windo...
@Override public void widgetSelected(SelectionEvent e) { <DeepExtract> int index = configTable.getSelectionIndex(); if (index >= 0) { JettyLaunchConfigEntry entry = configEntryList.get(index); IWorkbench workbench = PlatformUI.getWorkbench(); IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); IWorkbenchPag...
eclipse-jetty-plugin
positive
4,623
public void addJdkRequirement(@NotNull Set<Requirement> requirements, @NotNull TaskDefinition taskDefinition, @NotNull String cfgJdkLabel) { final String builderLabel = taskDefinition.getConfiguration().get(cfgJdkLabel); if (builderLabel != null) { requirements.add(new RequirementImpl(Jdk.CAPABILITY_JDK_PREFIX + "." + ...
public void addJdkRequirement(@NotNull Set<Requirement> requirements, @NotNull TaskDefinition taskDefinition, @NotNull String cfgJdkLabel) { <DeepExtract> final String builderLabel = taskDefinition.getConfiguration().get(cfgJdkLabel); if (builderLabel != null) { requirements.add(new RequirementImpl(Jdk.CAPABILITY_JDK_P...
bamboo-artifactory-plugin
positive
4,624
public void doEnterCity(Long chatId, String city) { Matcher matcher = CITY_PATTERN.matcher(city); if (!matcher.find()) { telegramService.sendMessage(new MessageSend(chatId, "You entered the incorrect city, try again.")); return; } Order order = orderStepService.findCachedOrderByChatId(chatId); order.getClient().setCity...
public void doEnterCity(Long chatId, String city) { Matcher matcher = CITY_PATTERN.matcher(city); if (!matcher.find()) { telegramService.sendMessage(new MessageSend(chatId, "You entered the incorrect city, try again.")); return; } Order order = orderStepService.findCachedOrderByChatId(chatId); order.getClient().setCity...
shop-telegram-bot
positive
4,625
public static ChunkBinary fromChunk(Chunk chunk, NamedTag nbt, boolean isEntities) throws IOException { if (nbt == null) { return null; } if (Config.writeChunksAsNbt()) { String filename = (isEntities ? "E" : "B") + chunk.location.getX() + "_" + chunk.location.getZ(); Path output = PathUtils.toPath(Config.getWorldOutpu...
public static ChunkBinary fromChunk(Chunk chunk, NamedTag nbt, boolean isEntities) throws IOException { if (nbt == null) { return null; } if (Config.writeChunksAsNbt()) { String filename = (isEntities ? "E" : "B") + chunk.location.getX() + "_" + chunk.location.getZ(); Path output = PathUtils.toPath(Config.getWorldOutpu...
minecraft-world-downloader
positive
4,626
private void btn_comment_materialsMouseEntered(java.awt.event.MouseEvent evt) { btn_comment_materials.setBackground(Color.RED); int caretPosition = guide_materials.getCaretPosition(); guide_materials.setText("Comment"); guide_materials.setCaretPosition(Math.min(caretPosition, guide_materials.getText().length())); }
private void btn_comment_materialsMouseEntered(java.awt.event.MouseEvent evt) { btn_comment_materials.setBackground(Color.RED); <DeepExtract> int caretPosition = guide_materials.getCaretPosition(); guide_materials.setText("Comment"); guide_materials.setCaretPosition(Math.min(caretPosition, guide_materials.getText().len...
ERSN-OpenMC
positive
4,628
@ResponseStatus(value = HttpStatus.NOT_FOUND) @ExceptionHandler(FileNotFoundException.class) public VndErrors fileNotFoundException(FileNotFoundException ex) { String msg = Optional.of(ex.getMessage()).orElse(ex.getClass().getSimpleName()); return new VndErrors(ex.getLocalizedMessage(), msg); }
@ResponseStatus(value = HttpStatus.NOT_FOUND) @ExceptionHandler(FileNotFoundException.class) public VndErrors fileNotFoundException(FileNotFoundException ex) { <DeepExtract> String msg = Optional.of(ex.getMessage()).orElse(ex.getClass().getSimpleName()); return new VndErrors(ex.getLocalizedMessage(), msg); </DeepExtrac...
building-microservices
positive
4,629
public String execute(Shell ci, String[] args) { long totalMem = Runtime.getRuntime().totalMemory(); long freeMem = Runtime.getRuntime().freeMemory(); if ("Free Memory : " + freeMem / (1024.0 * 1024) + " mbytes" != null && "Free Memory : " + freeMem / (1024.0 * 1024) + " mbytes".length() > 0) { System.out.println("Fr...
public String execute(Shell ci, String[] args) { long totalMem = Runtime.getRuntime().totalMemory(); long freeMem = Runtime.getRuntime().freeMemory(); if ("Free Memory : " + freeMem / (1024.0 * 1024) + " mbytes" != null && "Free Memory : " + freeMem / (1024.0 * 1024) + " mbytes".length() > 0) { System.out.println("Fr...
jEN
positive
4,630
@Override public IQ handleIQRequest(IQ iqRequest) { Boolean doMute = (MuteIq) iqRequest.getMute(); Jid from = (MuteIq) iqRequest.getFrom(); if (doMute == null || !from.getResourceOrEmpty().toString().equals(this.gatewaySession.getFocusResourceAddr())) { return IQ.createErrorResponse((MuteIq) iqRequest, StanzaError.getB...
@Override public IQ handleIQRequest(IQ iqRequest) { <DeepExtract> Boolean doMute = (MuteIq) iqRequest.getMute(); Jid from = (MuteIq) iqRequest.getFrom(); if (doMute == null || !from.getResourceOrEmpty().toString().equals(this.gatewaySession.getFocusResourceAddr())) { return IQ.createErrorResponse((MuteIq) iqRequest, St...
jigasi
positive
4,631
public Saudacao setNovaSaudacao(Saudacao novaSaudacao, String autorizacao) { String email = jwtService.getUsuarioId(autorizacao); novaSaudacao.setUsuario(usuarioService.getUsuario(email)); saudacoesDAO.save(novaSaudacao); return saudacoesDAO.findById((int) saudacoesDAO.count()).get(); }
public Saudacao setNovaSaudacao(Saudacao novaSaudacao, String autorizacao) { String email = jwtService.getUsuarioId(autorizacao); novaSaudacao.setUsuario(usuarioService.getUsuario(email)); saudacoesDAO.save(novaSaudacao); <DeepExtract> return saudacoesDAO.findById((int) saudacoesDAO.count()).get(); </DeepExtract> }
psoft
positive
4,632
public static boolean isAssignableBound(Type lhsType, Type rhsType) { if (rhsType == null) { return true; } if (lhsType == null) { return false; } Assert.notNull(lhsType, "Left-hand side type must not be null"); Assert.notNull(rhsType, "Right-hand side type must not be null"); if (lhsType.equals(rhsType) || lhsType.equ...
public static boolean isAssignableBound(Type lhsType, Type rhsType) { if (rhsType == null) { return true; } if (lhsType == null) { return false; } <DeepExtract> Assert.notNull(lhsType, "Left-hand side type must not be null"); Assert.notNull(rhsType, "Right-hand side type must not be null"); if (lhsType.equals(rhsType) ...
seny-devpkg
positive
4,633
public void selectFromTable(Class<? extends DAO> daoClass) throws DatabaseException { ModelDef model = em.getDefinition(daoClass); this.selectModel = model; involve(model); }
public void selectFromTable(Class<? extends DAO> daoClass) throws DatabaseException { ModelDef model = em.getDefinition(daoClass); <DeepExtract> this.selectModel = model; involve(model); </DeepExtract> }
orm
positive
4,634
public static String getVersion(Context context) { String versionName; try { PackageInfo pi = context.getPackageManager().getPackageInfo(context.getPackageName(), 0); versionName = pi.versionName; } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); versionName = context.getString(R.string.version_un...
public static String getVersion(Context context) { String versionName; try { PackageInfo pi = context.getPackageManager().getPackageInfo(context.getPackageName(), 0); versionName = pi.versionName; } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); versionName = context.getString(R.string.version_un...
guanggoo-android
positive
4,637
public void run() { System.out.format("%s: %s" + " 早上好!%n", this.name, lisi.getName()); lisi.bowBack(this); }
public void run() { <DeepExtract> System.out.format("%s: %s" + " 早上好!%n", this.name, lisi.getName()); lisi.bowBack(this); </DeepExtract> }
java-study
positive
4,640
public void onCreate() { mSensorManager = (SensorManager) activity.getSystemService(Context.SENSOR_SERVICE); if (mSensorManager == null) { throw new UnsupportedOperationException(); } Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); if (sensor == null) { throw new UnsupportedOperationExceptio...
public void onCreate() { <DeepExtract> mSensorManager = (SensorManager) activity.getSystemService(Context.SENSOR_SERVICE); if (mSensorManager == null) { throw new UnsupportedOperationException(); } Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); if (sensor == null) { throw new UnsupportedOpe...
cniao5-shop
positive
4,642
public long hash(byte[] buffer, long initialValue) { a = 0x09e3779b9L; b = 0x09e3779b9L; c = 0x0E6359A60L; pos = 0; for (len = buffer.length; len >= 12; len -= 12) { a = add(a, fourByteToLong(buffer, pos)); b = add(b, fourByteToLong(buffer, pos + 4)); c = add(c, fourByteToLong(buffer, pos + 8)); hashMix(); pos += 12; }...
public long hash(byte[] buffer, long initialValue) { a = 0x09e3779b9L; b = 0x09e3779b9L; c = 0x0E6359A60L; pos = 0; for (len = buffer.length; len >= 12; len -= 12) { a = add(a, fourByteToLong(buffer, pos)); b = add(b, fourByteToLong(buffer, pos + 4)); c = add(c, fourByteToLong(buffer, pos + 8)); hashMix(); pos += 12; }...
DeFacto
positive
4,643
public static void main(String[] args) { Scanner scan = new Scanner(System.in); Random rand = new Random(); System.out.println("Enter n:"); n = scan.nextInt(); k = n / 2; binaryArray = new int[n]; result = new int[n]; weights = new int[n]; for (int i = 0; i < weights.length; i++) { weights[i] = rand.nextInt(10); System...
public static void main(String[] args) { Scanner scan = new Scanner(System.in); Random rand = new Random(); System.out.println("Enter n:"); n = scan.nextInt(); k = n / 2; binaryArray = new int[n]; result = new int[n]; weights = new int[n]; for (int i = 0; i < weights.length; i++) { weights[i] = rand.nextInt(10); System...
masters
positive
4,644
public Hdr getTextHdr(WordprocessingMLPackage wordprocessingMLPackage, ObjectFactory factory, Part sourcePart, String content, JcEnumeration jcEnumeration) throws Exception { Hdr hdr = factory.createHdr(); P headP = factory.createP(); Text text = factory.createText(); text.setValue(content); R run = factory.createR(); ...
public Hdr getTextHdr(WordprocessingMLPackage wordprocessingMLPackage, ObjectFactory factory, Part sourcePart, String content, JcEnumeration jcEnumeration) throws Exception { Hdr hdr = factory.createHdr(); P headP = factory.createP(); Text text = factory.createText(); text.setValue(content); R run = factory.createR(); ...
docx4j-template
positive
4,645
@Override public void onSuccess(String t) { L.i("android:" + t.toString()); try { JSONObject jsonObject = new JSONObject(t); JSONArray jsonArrayResults = jsonObject.getJSONArray("results"); for (int i = 0; i < jsonArrayResults.length(); i++) { JSONObject json = (JSONObject) jsonArrayResults.get(i); StandardData data = ...
@Override public void onSuccess(String t) { L.i("android:" + t.toString()); <DeepExtract> try { JSONObject jsonObject = new JSONObject(t); JSONArray jsonArrayResults = jsonObject.getJSONArray("results"); for (int i = 0; i < jsonArrayResults.length(); i++) { JSONObject json = (JSONObject) jsonArrayResults.get(i); Standa...
LateNight
positive
4,646
public static String EnycrptDes(String src, String key, String charSet) throws Exception { String keyLen = StringUtils.EMPTY; if (key.length() >= 24) { keyLen = StringUtils.substring(key, key.length() - 24); } else { keyLen = StringUtils.leftPad(key, 24, "0"); } return keyLen; String ret = StringUtils.EMPTY; if (String...
public static String EnycrptDes(String src, String key, String charSet) throws Exception { <DeepExtract> String keyLen = StringUtils.EMPTY; if (key.length() >= 24) { keyLen = StringUtils.substring(key, key.length() - 24); } else { keyLen = StringUtils.leftPad(key, 24, "0"); } return keyLen; </DeepExtract> String ret = ...
carshop
positive
4,647
private void initData() { mGymCoach = new ArrayList<>(); mYogaCoach = new ArrayList<>(); mAdapter = new CoachListAdapter(getActivity()); mCoachListView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener<ListView>() { @Override public void onRefresh(PullToRefreshBase<ListView> pullToRefreshBase) { startGetRemo...
private void initData() { mGymCoach = new ArrayList<>(); mYogaCoach = new ArrayList<>(); mAdapter = new CoachListAdapter(getActivity()); mCoachListView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener<ListView>() { @Override public void onRefresh(PullToRefreshBase<ListView> pullToRefreshBase) { startGetRemo...
AppKit
positive
4,648
@Override protected void onResume() { super.onResume(); Units.instance.setFromPrefs(this); Bundle summaryBundle = getIntent().getExtras(); FlightSummary summary = new FlightSummary(summaryBundle); Units units = Units.instance; String altUnits = units.getAltitudeUnits(); String distUnits = units.getDistanceUnits(); Stri...
@Override protected void onResume() { super.onResume(); Units.instance.setFromPrefs(this); <DeepExtract> Bundle summaryBundle = getIntent().getExtras(); FlightSummary summary = new FlightSummary(summaryBundle); Units units = Units.instance; String altUnits = units.getAltitudeUnits(); String distUnits = units.getDistanc...
Gaggle
positive
4,649
@EventHandler public void onPlayerKick(PlayerKickEvent event) { if (!containsPlayer(event.getPlayer())) return; inRange.remove(event.getPlayer()); leavesRange(event.getPlayer()); }
@EventHandler public void onPlayerKick(PlayerKickEvent event) { <DeepExtract> if (!containsPlayer(event.getPlayer())) return; inRange.remove(event.getPlayer()); leavesRange(event.getPlayer()); </DeepExtract> }
KOTH
positive
4,650
public void readNsHead(InputStream in) throws IOException { _id = EndianUtils.readSwappedShort(in); _version = EndianUtils.readSwappedShort(in); _logid = EndianUtils.readSwappedInteger(in); int count = 0; while (count < _provider.length) { int cnt = in.read(_provider, count, (_provider.length - count)); if (cnt == -1) ...
public void readNsHead(InputStream in) throws IOException { _id = EndianUtils.readSwappedShort(in); _version = EndianUtils.readSwappedShort(in); _logid = EndianUtils.readSwappedInteger(in); <DeepExtract> int count = 0; while (count < _provider.length) { int cnt = in.read(_provider, count, (_provider.length - count)); i...
bae-java-sdk
positive
4,651
public Criteria andTextLessThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "text" + " cannot be null"); } criteria.add(new Criterion("text <", value)); return (Criteria) this; }
public Criteria andTextLessThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "text" + " cannot be null"); } criteria.add(new Criterion("text <", value)); </DeepExtract> return (Criteria) this; }
Tmall_SSM-master
positive
4,652
@Override public void write(DataOutput output) throws IOException { output.writeByte(GET_ATTRIBUTE); output.writeInt(correlationId); output.writeByte(OBJECT_NAME); Marshaller marshaller = prepareForMarshalling(output); marshaller.writeObject(name); marshaller.writeByte(STRING); marshaller.writeUTF(attribute); if (manag...
@Override public void write(DataOutput output) throws IOException { output.writeByte(GET_ATTRIBUTE); output.writeInt(correlationId); output.writeByte(OBJECT_NAME); Marshaller marshaller = prepareForMarshalling(output); marshaller.writeObject(name); marshaller.writeByte(STRING); marshaller.writeUTF(attribute); <DeepExtr...
remoting-jmx
positive
4,653
@Override public void onComplete() { Bundle b = new Bundle(); b.putInt("task", this.getId()); b.putString("data", null); Message m = new Message(); m.what = BaseTask.TASK_COMPLETE; m.setData(b); handler.sendMessage(m); }
@Override public void onComplete() { <DeepExtract> Bundle b = new Bundle(); b.putInt("task", this.getId()); b.putString("data", null); Message m = new Message(); m.what = BaseTask.TASK_COMPLETE; m.setData(b); handler.sendMessage(m); </DeepExtract> }
DutSchedule
positive
4,654
@Test public void test401(TestContext context) { Async async = context.async(); getJSON("/json/fail/" + 401, response -> { context.assertEquals(401, response.statusCode()); response.bodyHandler(buff -> { JsonObject json = new JsonObject(buff.toString()); JsonObject error = json.getJsonObject("error"); context.assertEqu...
@Test public void test401(TestContext context) { <DeepExtract> Async async = context.async(); getJSON("/json/fail/" + 401, response -> { context.assertEquals(401, response.statusCode()); response.bodyHandler(buff -> { JsonObject json = new JsonObject(buff.toString()); JsonObject error = json.getJsonObject("error"); con...
nubes
positive
4,655
public Criteria andResourceIdNotBetween(Integer value1, Integer value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "resourceId" + " cannot be null"); } criteria.add(new Criterion("resource_id not between", value1, value2)); return (Criteria) this; }
public Criteria andResourceIdNotBetween(Integer value1, Integer value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "resourceId" + " cannot be null"); } criteria.add(new Criterion("resource_id not between", value1, value2)); </DeepExtract> return (Criteria)...
wukong-framework
positive
4,656
public static String parseDate(Date date) { Instant instant = date.toInstant(); ZoneId zone = ZoneId.systemDefault(); LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, zone); return localDateTime.format(DateTimeFormatter.ofPattern(DATE_FORMAT_DATETIME)); }
public static String parseDate(Date date) { Instant instant = date.toInstant(); ZoneId zone = ZoneId.systemDefault(); LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, zone); <DeepExtract> return localDateTime.format(DateTimeFormatter.ofPattern(DATE_FORMAT_DATETIME)); </DeepExtract> }
mykit-transaction-message
positive
4,657
@Override public void update(DownloadInfo downloadInfo) { super.update(downloadInfo); label.setText(downloadInfo.getLabel()); state.setText(downloadInfo.getState().toString()); progressBar.setProgress(downloadInfo.getProgress()); stopBtn.setVisibility(View.VISIBLE); stopBtn.setText(x.app().getString(R.string.stop)); Do...
@Override public void update(DownloadInfo downloadInfo) { super.update(downloadInfo); <DeepExtract> label.setText(downloadInfo.getLabel()); state.setText(downloadInfo.getState().toString()); progressBar.setProgress(downloadInfo.getProgress()); stopBtn.setVisibility(View.VISIBLE); stopBtn.setText(x.app().getString(R.str...
xUtils3
positive
4,658