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 run() throws Exception { keyFilename = SignatureUtils.getFullFilePath(keyFilename); KeyFactory kf = KeyFactory.getInstance("DSA"); byte[] privateKeyBytes = DatatypeConverter.parseBase64Binary(IOUtils.toString(new FileInputStream(keyFilename), "UTF-8")); KeySpec privateSpec = new PKCS8EncodedKeySpec(private...
private void run() throws Exception { <DeepExtract> keyFilename = SignatureUtils.getFullFilePath(keyFilename); KeyFactory kf = KeyFactory.getInstance("DSA"); byte[] privateKeyBytes = DatatypeConverter.parseBase64Binary(IOUtils.toString(new FileInputStream(keyFilename), "UTF-8")); KeySpec privateSpec = new PKCS8EncodedK...
nanopub-java
positive
437,280
public Qe<T> c() { Qe q = new Qe(this.clz); q.clear(); q.where = new StringBuffer(" "); return q; }
public Qe<T> c() { <DeepExtract> Qe q = new Qe(this.clz); q.clear(); q.where = new StringBuffer(" "); return q; </DeepExtract> }
act-eagle-allone
positive
437,281
@Override public DTXContext create(String groupId) throws TransactionException { try { fastStorage.initGroup(groupId); } catch (FastStorageException e) { if (e.getCode() != FastStorageException.EX_CODE_REPEAT_GROUP) { throw new TransactionException(e); } } return new DefaultDTXContext(groupId, fastStorage); }
@Override public DTXContext create(String groupId) throws TransactionException { try { fastStorage.initGroup(groupId); } catch (FastStorageException e) { if (e.getCode() != FastStorageException.EX_CODE_REPEAT_GROUP) { throw new TransactionException(e); } } <DeepExtract> return new DefaultDTXContext(groupId, fastStorage...
tx-lcn
positive
437,283
public <T> void init(Stage stage, HashMap<String, T> parameters) { super.init(stage, parameters); tableService = new ArrayList<TableService>(); tableService.add(new TableService(() -> configureProductTable())); tableService.add(new TableService(() -> configureEmployeeTable())); tableService.add(new TableService(() -> c...
public <T> void init(Stage stage, HashMap<String, T> parameters) { super.init(stage, parameters); tableService = new ArrayList<TableService>(); tableService.add(new TableService(() -> configureProductTable())); tableService.add(new TableService(() -> configureEmployeeTable())); tableService.add(new TableService(() -> c...
spring-javafx-material-design-admin
positive
437,284
public void setTotalCount(long totalCount) { this.totalCount = totalCount; pageCount = (int) totalCount / pageSize; if (totalCount % pageSize > 0 || pageCount == 0) { pageCount++; } params.put("startIndex", getStartIndex()); params.put("startRow", getStartIndex()); params.put("pageSize", getPageSize()); }
public void setTotalCount(long totalCount) { this.totalCount = totalCount; <DeepExtract> pageCount = (int) totalCount / pageSize; if (totalCount % pageSize > 0 || pageCount == 0) { pageCount++; } params.put("startIndex", getStartIndex()); params.put("startRow", getStartIndex()); params.put("pageSize", getPageSize()); <...
molicode
positive
437,285
private void measureChild(RecyclerView.Recycler recycler, int position, int widthSize, int heightSize, int[] dimensions) { try { child = recycler.getViewForPosition(position); } catch (IndexOutOfBoundsException e) { if (BuildConfig.DEBUG) { Log.w("LinearLayoutManager", "LinearLayoutManager doesn't work well with animat...
private void measureChild(RecyclerView.Recycler recycler, int position, int widthSize, int heightSize, int[] dimensions) { try { child = recycler.getViewForPosition(position); } catch (IndexOutOfBoundsException e) { if (BuildConfig.DEBUG) { Log.w("LinearLayoutManager", "LinearLayoutManager doesn't work well with animat...
Loop
positive
437,286
@Override protected CharSequence toStringInternal() { return Hex.from(optionData); }
@Override protected CharSequence toStringInternal() { <DeepExtract> return Hex.from(optionData); </DeepExtract> }
minidns
positive
437,287
@Test public void testRandInteger() { String sql1 = "SELECT floor(rand() * (icol - 2 + 1) + 2) FROM test.tableOne"; String expectedSql1 = "SELECT CAST(FLOOR(\"RANDOM\"() * (\"tableone\".\"icol\" - 2 + 1) + 2) AS BIGINT)\n" + "FROM \"test\".\"tableone\" AS \"tableone\""; String trinoSql = toTrinoSql(sql1); validate(trin...
@Test public void testRandInteger() { String sql1 = "SELECT floor(rand() * (icol - 2 + 1) + 2) FROM test.tableOne"; String expectedSql1 = "SELECT CAST(FLOOR(\"RANDOM\"() * (\"tableone\".\"icol\" - 2 + 1) + 2) AS BIGINT)\n" + "FROM \"test\".\"tableone\" AS \"tableone\""; String trinoSql = toTrinoSql(sql1); validate(trin...
coral
positive
437,291
public void check() { if (this.getKey() == null || this.getKey().length() == 0 || this.getKey().length() > 255) { throw new TransInfoException("key is null or too long, max size is 255."); } this.key = this.getKey().trim(); if (HashCheckUtil.illegalCharacterCheck(this.key)) { throw new TransInfoException("key have Ille...
public void check() { if (this.getKey() == null || this.getKey().length() == 0 || this.getKey().length() > 255) { throw new TransInfoException("key is null or too long, max size is 255."); } this.key = this.getKey().trim(); if (HashCheckUtil.illegalCharacterCheck(this.key)) { throw new TransInfoException("key have Ille...
jbcc
positive
437,292
@Override public void run(CliContext context, CommandLine args) { this.ctx = context; this.io = context.getIo(); WorkDir workdir = ctx.getWorkDir(); if (!ctx.checkIsLoggedIn(false, true)) { return; } if (!parseArgs(args)) { return; } List<Exercise> exercises = workdir.getExercises(); if (exercises.size() != 1) { io.err...
@Override public void run(CliContext context, CommandLine args) { this.ctx = context; this.io = context.getIo(); WorkDir workdir = ctx.getWorkDir(); if (!ctx.checkIsLoggedIn(false, true)) { return; } if (!parseArgs(args)) { return; } List<Exercise> exercises = workdir.getExercises(); if (exercises.size() != 1) { io.err...
tmc-cli
positive
437,294
public static String getMD5ofStr(String inbuf) { count[0] = 0L; count[1] = 0L; state[0] = 0x67452301L; state[1] = 0xefcdab89L; state[2] = 0x98badcfeL; state[3] = 0x10325476L; return; int i, index, partLen; byte[] block = new byte[64]; index = (int) (count[0] >>> 3) & 0x3F; if ((count[0] += (inbuf.length() << 3)) < (inb...
public static String getMD5ofStr(String inbuf) { count[0] = 0L; count[1] = 0L; state[0] = 0x67452301L; state[1] = 0xefcdab89L; state[2] = 0x98badcfeL; state[3] = 0x10325476L; return; int i, index, partLen; byte[] block = new byte[64]; index = (int) (count[0] >>> 3) & 0x3F; if ((count[0] += (inbuf.length() << 3)) < (inb...
framework
positive
437,296
public static void playMessage() { if (soundsLoaded && soundEnabled && mSoundPoolMap != null) { Integer soundID = mSoundPoolMap.get(ID_MESSAGE); if (soundID != null) { mSoundPool.play(soundID, 0.66f, 0.66f, 1, 0, 1); } } if (hapticFn != null) { hapticFn.run(); } }
public static void playMessage() { <DeepExtract> if (soundsLoaded && soundEnabled && mSoundPoolMap != null) { Integer soundID = mSoundPoolMap.get(ID_MESSAGE); if (soundID != null) { mSoundPool.play(soundID, 0.66f, 0.66f, 1, 0, 1); } } if (hapticFn != null) { hapticFn.run(); } </DeepExtract> }
Vector-Pinball
positive
437,297
@Override public void setRaw(CommandPart part, List<String> raw) { allParts.add(part); List<CommandPart> parts = allPartsByName.computeIfAbsent(part.getName(), key -> new ArrayList<>()); if (!parts.contains(part)) { parts.add(part); } rawBindings.put(part, raw); }
@Override public void setRaw(CommandPart part, List<String> raw) { <DeepExtract> allParts.add(part); List<CommandPart> parts = allPartsByName.computeIfAbsent(part.getName(), key -> new ArrayList<>()); if (!parts.contains(part)) { parts.add(part); } </DeepExtract> rawBindings.put(part, raw); }
CommandFlow
positive
437,298
public boolean matchesFolder(String... pathSegments) { if (segmentPatterns.length == 1) { return pathSegments.length == 0; } if (0 == segmentPatterns.length - 1) { return 0 == pathSegments.length; } if (0 == pathSegments.length) { if (segmentPatterns[0] == PathSegmentPattern.ANY_NUMBER) { return match(0 + 1, 0, pathSeg...
public boolean matchesFolder(String... pathSegments) { if (segmentPatterns.length == 1) { return pathSegments.length == 0; } <DeepExtract> if (0 == segmentPatterns.length - 1) { return 0 == pathSegments.length; } if (0 == pathSegments.length) { if (segmentPatterns[0] == PathSegmentPattern.ANY_NUMBER) { return match(0 +...
jshint-eclipse
positive
437,299
public void registerHookFor(Item item) { LOGGER.debug("Calling registerHooks() for {}", notNull(item, "Item can't be null").getFullName()); URL hookUrl; try { hookUrl = GitHubPlugin.configuration().getHookUrl(); } catch (GHPluginConfigException e) { LOGGER.error("Skip registration of GHHook ({})", e.getMessage()); retu...
public void registerHookFor(Item item) { <DeepExtract> LOGGER.debug("Calling registerHooks() for {}", notNull(item, "Item can't be null").getFullName()); URL hookUrl; try { hookUrl = GitHubPlugin.configuration().getHookUrl(); } catch (GHPluginConfigException e) { LOGGER.error("Skip registration of GHHook ({})", e.getMe...
github-plugin
positive
437,302
private ArrayList<WnnWord> getWords() { WnnWord word = new WnnWord(); OpenWnnEvent event = new OpenWnnEvent(OpenWnnEvent.LIST_WORDS_IN_USER_DICTIONARY, WnnEngine.DICTIONARY_TYPE_USER, word); sendEventToIME(event); ArrayList<WnnWord> list = new ArrayList<WnnWord>(); for (int i = 0; i < MAX_WORD_COUNT; i++) { event = new...
private ArrayList<WnnWord> getWords() { WnnWord word = new WnnWord(); OpenWnnEvent event = new OpenWnnEvent(OpenWnnEvent.LIST_WORDS_IN_USER_DICTIONARY, WnnEngine.DICTIONARY_TYPE_USER, word); sendEventToIME(event); ArrayList<WnnWord> list = new ArrayList<WnnWord>(); for (int i = 0; i < MAX_WORD_COUNT; i++) { event = new...
SoftWareTest
positive
437,303
@GetMapping(value = "/investorsbyacceptheader", headers = "Accept=application/investors-v1+json, application/investors-v1.1+json") public List<Investor> fetchAllInvestorsForGivenVersionAsAcceptHeader() throws VersionNotSupportedException { if (!("1.1".equals("1.1") || "1.1".equals("1.0"))) { throw new VersionNotSupport...
@GetMapping(value = "/investorsbyacceptheader", headers = "Accept=application/investors-v1+json, application/investors-v1.1+json") public List<Investor> fetchAllInvestorsForGivenVersionAsAcceptHeader() throws VersionNotSupportedException { <DeepExtract> if (!("1.1".equals("1.1") || "1.1".equals("1.0"))) { throw new Ver...
Hands-On-RESTful-API-Design-Patterns-and-Best-Practices
positive
437,306
public void run() { if (writerOwned) { setState(5); message1("Waiting to Downgrade WRITE lock...", ConcurrentExampleConstants.WARNING_MESSAGE_COLOR); message2(" ", ConcurrentExampleConstants.WARNING_MESSAGE_COLOR); downgrade = true; synchronized (MUTEX) { MUTEX.notify(); } } }
public void run() { <DeepExtract> if (writerOwned) { setState(5); message1("Waiting to Downgrade WRITE lock...", ConcurrentExampleConstants.WARNING_MESSAGE_COLOR); message2(" ", ConcurrentExampleConstants.WARNING_MESSAGE_COLOR); downgrade = true; synchronized (MUTEX) { MUTEX.notify(); } } </DeepExtract> }
java-concurrent-animated
positive
437,307
@Nullable public static AbstractInstruction parse(@NotNull InputStream is) throws IOException { int opcode = is.read() & 0xff; int highop = opcode & 0xf0; ModRM modrm = null; SIB sib = null; switch(highop) { case 0x0: switch(opcode) { case 0x03: modrm = new ModRM(is.read()); imm32 = readDoubleWord(is); return new ADD(o...
@Nullable public static AbstractInstruction parse(@NotNull InputStream is) throws IOException { int opcode = is.read() & 0xff; int highop = opcode & 0xf0; ModRM modrm = null; SIB sib = null; switch(highop) { case 0x0: switch(opcode) { case 0x03: modrm = new ModRM(is.read()); imm32 = readDoubleWord(is); return new ADD(o...
PE
positive
437,308
public void notifyChatRoomMemberJoined(ChatRoomMember member) { boolean sendNotification = false; Call sipCall = gatewaySession.getSipCall(); Call jvbCall = gatewaySession.getJvbCall(); if (sipCall != null) { sendNotification = (sendNotification || sipCall.getCallState() == CallState.CALL_IN_PROGRESS); } if (jvbCall !=...
public void notifyChatRoomMemberJoined(ChatRoomMember member) { boolean sendNotification = false; Call sipCall = gatewaySession.getSipCall(); Call jvbCall = gatewaySession.getJvbCall(); if (sipCall != null) { sendNotification = (sendNotification || sipCall.getCallState() == CallState.CALL_IN_PROGRESS); } if (jvbCall !=...
jigasi
positive
437,314
public ConditionBuilder ne(String property, Object value) { if (value == null) { isOr(); return instance; } if (SqliStringUtil.isNullOrEmpty(value)) { isOr(); return instance; } if (value instanceof List || value.getClass().isArray()) { throw new IllegalArgumentException(property + " " + Op.NE + " " + value + ", try " ...
public ConditionBuilder ne(String property, Object value) { <DeepExtract> if (value == null) { isOr(); return instance; } if (SqliStringUtil.isNullOrEmpty(value)) { isOr(); return instance; } if (value instanceof List || value.getClass().isArray()) { throw new IllegalArgumentException(property + " " + Op.NE + " " + val...
sqli
positive
437,315
public void resetRaceResults() { AppState.getInstance().resetRaceResults(); ExpandableListView listView = (ExpandableListView) mRootView.findViewById(R.id.elvResults); mAdapter = new RaceResultsListAdapter(getContext(), AppState.getInstance().raceResults); listView.setAdapter(mAdapter); }
public void resetRaceResults() { AppState.getInstance().resetRaceResults(); <DeepExtract> ExpandableListView listView = (ExpandableListView) mRootView.findViewById(R.id.elvResults); mAdapter = new RaceResultsListAdapter(getContext(), AppState.getInstance().raceResults); listView.setAdapter(mAdapter); </DeepExtract> }
Chorus-RF-Laptimer
positive
437,316
public void changeMessage(String title, String message) { Message message = Message.obtain(handler, SHOW_DIALOG); Bundle bundle = new Bundle(); bundle.putString("title", title); bundle.putString("message", message); message.setData(bundle); message.sendToTarget(); }
public void changeMessage(String title, String message) { <DeepExtract> Message message = Message.obtain(handler, SHOW_DIALOG); Bundle bundle = new Bundle(); bundle.putString("title", title); bundle.putString("message", message); message.setData(bundle); message.sendToTarget(); </DeepExtract> }
oandbackup
positive
437,317
public void inBrowser() { final Actions actionBuilder = new Actions(driver); a -> a.keyUp(key).apply(actionBuilder).build().perform(); }
public void inBrowser() { <DeepExtract> final Actions actionBuilder = new Actions(driver); a -> a.keyUp(key).apply(actionBuilder).build().perform(); </DeepExtract> }
dollarx
positive
437,318
public static OffsetDateTime now(Clock clock) { Jdk7Methods.Objects_requireNonNull(clock, "clock"); final Instant now = clock.instant(); Jdk7Methods.Objects_requireNonNull(now, "instant"); Jdk7Methods.Objects_requireNonNull(clock.getZone().getRules().getOffset(now), "zone"); ZoneRules rules = clock.getZone().getRules()...
public static OffsetDateTime now(Clock clock) { Jdk7Methods.Objects_requireNonNull(clock, "clock"); final Instant now = clock.instant(); <DeepExtract> Jdk7Methods.Objects_requireNonNull(now, "instant"); Jdk7Methods.Objects_requireNonNull(clock.getZone().getRules().getOffset(now), "zone"); ZoneRules rules = clock.getZon...
gwt-time
positive
437,320
@Override public String putFilter(String userId, String filter) { try (Connection conn = pool.get()) { return conn -> { PreparedStatement stmt = conn.prepareStatement(putFilterSql); stmt.setString(1, userId); stmt.setString(2, filter); ResultSet rSet = stmt.executeQuery(); if (!rSet.next()) { throw new RuntimeException...
@Override public String putFilter(String userId, String filter) { <DeepExtract> try (Connection conn = pool.get()) { return conn -> { PreparedStatement stmt = conn.prepareStatement(putFilterSql); stmt.setString(1, userId); stmt.setString(2, filter); ResultSet rSet = stmt.executeQuery(); if (!rSet.next()) { throw new Ru...
mxhsd
positive
437,321
@Override public void onChangeLayout(IMELanguageWrapper item, String newLayout) { VertexInputMethodManager.getInstance().onLayoutChanged(item, newLayout); dataSet.clear(); if (VertexInputMethodManager.getInstance().isMultiTypeMode()) { updateMultiMode(); } else { updateSingleMode(); } subtypeAdapter.setDataSet(dataSet)...
@Override public void onChangeLayout(IMELanguageWrapper item, String newLayout) { VertexInputMethodManager.getInstance().onLayoutChanged(item, newLayout); <DeepExtract> dataSet.clear(); if (VertexInputMethodManager.getInstance().isMultiTypeMode()) { updateMultiMode(); } else { updateSingleMode(); } subtypeAdapter.setDa...
Android-Keyboard
positive
437,322
private static Node buildTree(int[] preOrder, int[] inOrder) { for (int i = 0; i < inOrder.length; i++) { inOrderValueIndicesMap.put(inOrder[i], i); } preOrderIndex = 0; if (0 > inOrder.length - 1) return null; Node rootNode = new Node(preOrder[preOrderIndex]); preOrderIndex++; if (rootNode == null || 0 == inOrder.leng...
private static Node buildTree(int[] preOrder, int[] inOrder) { for (int i = 0; i < inOrder.length; i++) { inOrderValueIndicesMap.put(inOrder[i], i); } preOrderIndex = 0; <DeepExtract> if (0 > inOrder.length - 1) return null; Node rootNode = new Node(preOrder[preOrderIndex]); preOrderIndex++; if (rootNode == null || 0 =...
GeeksforGeeks
positive
437,325
@Override public final boolean isConsistent() { this.matrix.transitiveClosure(); final int size = this.matrix.rows(); boolean acyclic = true; int i = 0; while (i < size && acyclic) { acyclic &= !this.matrix.get(i, i); i++; } return acyclic; }
@Override public final boolean isConsistent() { <DeepExtract> this.matrix.transitiveClosure(); </DeepExtract> final int size = this.matrix.rows(); boolean acyclic = true; int i = 0; while (i < size && acyclic) { acyclic &= !this.matrix.get(i, i); i++; } return acyclic; }
pddl4j
positive
437,326
@Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); QPMManager.getInstance().setH5MonitorData("", 0); }
@Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); <DeepExtract> QPMManager.getInstance().setH5MonitorData("", 0); </DeepExtract> }
QPM
positive
437,327
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_custom_tooltip_with_jsfunction); Intent intent = getIntent(); String chartType = intent.getStringExtra("chartType"); AAOptions aaOptions; switch(chartType) { case "customDoubleXAxesChart":...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_custom_tooltip_with_jsfunction); Intent intent = getIntent(); String chartType = intent.getStringExtra("chartType"); <DeepExtract> AAOptions aaOptions; switch(chartType) { case "customDoub...
AAChartCore
positive
437,328
public static void ClearCache(Context ctx) { SharedPreferences sp = ctx.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); sp.edit().putString(KEY_SEARCH_HISTORY, null).apply(); }
public static void ClearCache(Context ctx) { <DeepExtract> SharedPreferences sp = ctx.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); sp.edit().putString(KEY_SEARCH_HISTORY, null).apply(); </DeepExtract> }
TradeIn
positive
437,329
public void setListContent(UserFavoriteList userFavoriteList) { mUserFavoriteList = userFavoriteList; mlist.clear(); for (int i = 0, count = mUserFavoriteList.getLists().size(); i < count; i++) { Map<String, Object> map = new HashMap<String, Object>(); map.put("name", mUserFavoriteList.getLists().get(i).getTitle()); ma...
public void setListContent(UserFavoriteList userFavoriteList) { mUserFavoriteList = userFavoriteList; mlist.clear(); <DeepExtract> for (int i = 0, count = mUserFavoriteList.getLists().size(); i < count; i++) { Map<String, Object> map = new HashMap<String, Object>(); map.put("name", mUserFavoriteList.getLists().get(i).g...
android-app
positive
437,331
@Override public Queries.Projection value(Instant value) { OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByProperty(name, String.valueOf(value))); return new GraphProjection(repository, pipeline); }
@Override public Queries.Projection value(Instant value) { <DeepExtract> OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByProperty(name, String.valueOf(value))); return new GraphProjection(repository, pipeline); </DeepExtract> }
universal-graph-client
positive
437,332
@Override public void receiveContext(Context context) { this.context = context; updateableTracker = new UpdateableTracker(context.getFramework().getBundleContext()); updateableTracker.open(); updateables.add(getContext().getServerThread()); updateables.add(getContext().getClients()); updateables.add(getContext().getCha...
@Override public void receiveContext(Context context) { this.context = context; updateableTracker = new UpdateableTracker(context.getFramework().getBundleContext()); updateableTracker.open(); updateables.add(getContext().getServerThread()); updateables.add(getContext().getClients()); <DeepExtract> updateables.add(getCo...
SpringLS
positive
437,333
public String textDigester(String message) { if (stringDigester == null) { stringDigester = new PooledStringDigester(); stringDigester.setPoolSize(Runtime.getRuntime().availableProcessors()); stringDigester.setIterations(5); stringDigester.setSaltGenerator(new RandomSaltGenerator()); } return stringDigester.digest(mess...
public String textDigester(String message) { <DeepExtract> if (stringDigester == null) { stringDigester = new PooledStringDigester(); stringDigester.setPoolSize(Runtime.getRuntime().availableProcessors()); stringDigester.setIterations(5); stringDigester.setSaltGenerator(new RandomSaltGenerator()); } </DeepExtract> retu...
spring-boot-web
positive
437,336
@Override public void remove() { if (_size != StringBuilder.this.size()) { throw new ConcurrentModificationException(); } StringBuilder.this.remove(_cur--); _size--; }
@Override public void remove() { <DeepExtract> if (_size != StringBuilder.this.size()) { throw new ConcurrentModificationException(); } </DeepExtract> StringBuilder.this.remove(_cur--); _size--; }
javaalgorithm
positive
437,338
@Override public void initialize(URL location, ResourceBundle resources) { if (location.equals(FXMLmin)) { initializeMin(); return; } hbox.setLayoutX(-600); showingPane = pane1; link.stateProperty().addListener((ob, old, newv) -> { switch(newv) { case READY: case SCHEDULED: progress.setStyleClass(StyleProgress.Red); br...
@Override public void initialize(URL location, ResourceBundle resources) { if (location.equals(FXMLmin)) { initializeMin(); return; } hbox.setLayoutX(-600); showingPane = pane1; <DeepExtract> link.stateProperty().addListener((ob, old, newv) -> { switch(newv) { case READY: case SCHEDULED: progress.setStyleClass(StylePro...
Ariafx
positive
437,339
@Override public void invalidate() { super.invalidate(); if (this.lasers != null) for (int i = 0; i < this.lasers.length; i++) this.lasers[i] = null; if (!this.worldObj.isRemote) PacketHandler.sendPacketToAround(new YogpstopPacket(this), this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.zCoord); }
@Override public void invalidate() { super.invalidate(); <DeepExtract> if (this.lasers != null) for (int i = 0; i < this.lasers.length; i++) this.lasers[i] = null; if (!this.worldObj.isRemote) PacketHandler.sendPacketToAround(new YogpstopPacket(this), this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.z...
QuarryPlus
positive
437,341
@Override @Nonnull public List<BakedQuad> getQuads(@Nullable IBlockState state, @Nullable EnumFacing side, long rand) { List<BakedQuad> quads = new ArrayList<>(); if (state == null) { post_left.addToList(quads, side); post_right.addToList(quads, side); west.addToList(quads, side); west_top.addToList(quads, side); } els...
@Override @Nonnull public List<BakedQuad> getQuads(@Nullable IBlockState state, @Nullable EnumFacing side, long rand) { List<BakedQuad> quads = new ArrayList<>(); <DeepExtract> if (state == null) { post_left.addToList(quads, side); post_right.addToList(quads, side); west.addToList(quads, side); west_top.addToList(quads...
MysticalLib
positive
437,342
@Test public void shouldTranslateOtherDataIntoAnEvent() { StubEvent event = StubEvent.EVENT_FACTORY.newInstance(); EventTranslator<StubEvent> eventTranslator = new ExampleEventTranslator(TEST_VALUE); event.setTestString(testValue); Assert.assertEquals(TEST_VALUE, event.getTestString()); }
@Test public void shouldTranslateOtherDataIntoAnEvent() { StubEvent event = StubEvent.EVENT_FACTORY.newInstance(); EventTranslator<StubEvent> eventTranslator = new ExampleEventTranslator(TEST_VALUE); <DeepExtract> event.setTestString(testValue); </DeepExtract> Assert.assertEquals(TEST_VALUE, event.getTestString()); }
disruptor-translation
positive
437,343
@Test public void testRandomAccessOfMetadataAtom() { File temp = new File(FILE_PATH); if (!temp.exists()) { temp.mkdir(); } FlvWriter writer = new FlvWriter(FILE_NAME); if (true) { writer.write(new MetadataAmf0("onMetaData")); } writer.write(new Audio(Utils.fromHex("00000000"))); writer.write(new Video(Utils.fromHex("0...
@Test public void testRandomAccessOfMetadataAtom() { <DeepExtract> File temp = new File(FILE_PATH); if (!temp.exists()) { temp.mkdir(); } FlvWriter writer = new FlvWriter(FILE_NAME); if (true) { writer.write(new MetadataAmf0("onMetaData")); } writer.write(new Audio(Utils.fromHex("00000000"))); writer.write(new Video(Ut...
flazr
positive
437,344
private void writeFloat32(final float f, final boolean tag) throws IOException { if (tag) writeTypeTag(TAG_FLOAT32); writeByte(Float.floatToRawIntBits(f) >>> 24); writeByte(Float.floatToRawIntBits(f) >>> 16); writeByte(Float.floatToRawIntBits(f) >>> 8); writeByte(Float.floatToRawIntBits(f) >>> 0); }
private void writeFloat32(final float f, final boolean tag) throws IOException { if (tag) writeTypeTag(TAG_FLOAT32); <DeepExtract> writeByte(Float.floatToRawIntBits(f) >>> 24); writeByte(Float.floatToRawIntBits(f) >>> 16); writeByte(Float.floatToRawIntBits(f) >>> 8); writeByte(Float.floatToRawIntBits(f) >>> 0); </DeepE...
mgen
positive
437,345
@Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException { GenericBeanDefinition jdbcDaoProxyDefinition = new GenericBeanDefinition(); jdbcDaoProxyDefinition.setBeanClass(DaoProxy.class); registry.registerBeanDefinition("daoProxy", jdbcDaoProxyDefinition); EasyDaoCl...
@Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException { <DeepExtract> GenericBeanDefinition jdbcDaoProxyDefinition = new GenericBeanDefinition(); jdbcDaoProxyDefinition.setBeanClass(DaoProxy.class); registry.registerBeanDefinition("daoProxy", jdbcDaoProxyDefiniti...
EasyJdbc
positive
437,346
protected void processMediatorLifeTime(List<String> mediatorArgs, final String arg) throws IllegalArgumentException { if ((arg == null) || "".equals(arg)) { throw new IllegalArgumentException(MEDIATOR_LIFETIME); } System.out.println("added max lifetime \"" + arg + "\" to mediator arguments"); logger.info("added max lif...
protected void processMediatorLifeTime(List<String> mediatorArgs, final String arg) throws IllegalArgumentException { if ((arg == null) || "".equals(arg)) { throw new IllegalArgumentException(MEDIATOR_LIFETIME); } <DeepExtract> System.out.println("added max lifetime \"" + arg + "\" to mediator arguments"); logger.info(...
UCE
positive
437,353
@Override public void onClick() { if (mCurrentScreenMode == AliyunScreenMode.Small) { targetMode = AliyunScreenMode.Full; } else { targetMode = AliyunScreenMode.Small; } VcPlayerLog.d(TAG, "mIsFullScreenLocked = " + mIsFullScreenLocked + " , targetMode = " + targetMode); AliyunScreenMode finalScreenMode = targetMode;...
@Override public void onClick() { if (mCurrentScreenMode == AliyunScreenMode.Small) { targetMode = AliyunScreenMode.Full; } else { targetMode = AliyunScreenMode.Small; } <DeepExtract> VcPlayerLog.d(TAG, "mIsFullScreenLocked = " + mIsFullScreenLocked + " , targetMode = " + targetMode); AliyunScreenMode finalScreenMode...
my_aliplayer
positive
437,354
private void drawSelect(Canvas canvas, int verticalOffset, int horizontalOffset) { int delta = (int) ((indicatorGap + indicatorWidth) * (isSnap ? 0 : positionOffset)); selectRect.left = horizontalOffset + (indicatorWidth + indicatorGap) * currentItem + delta; selectRect.top = verticalOffset; selectRect.right = selectRe...
private void drawSelect(Canvas canvas, int verticalOffset, int horizontalOffset) { int delta = (int) ((indicatorGap + indicatorWidth) * (isSnap ? 0 : positionOffset)); selectRect.left = horizontalOffset + (indicatorWidth + indicatorGap) * currentItem + delta; selectRect.top = verticalOffset; selectRect.right = selectRe...
JianshuApp
positive
437,355
private ImmutableSolution internalSolve(int[] startingAssignment, boolean greedy) { MutableSolution initialSol = null; if (startingAssignment != null) { initialSol = new MutableSolution(problem, startingAssignment); } else { initialSol = new MutableSolution(problem, null); } if (isEmptyProblem()) { return initialSol; }...
private ImmutableSolution internalSolve(int[] startingAssignment, boolean greedy) { MutableSolution initialSol = null; if (startingAssignment != null) { initialSol = new MutableSolution(problem, startingAssignment); } else { initialSol = new MutableSolution(problem, null); } if (isEmptyProblem()) { return initialSol; }...
territorium
positive
437,356
void setNames(List<String> names) { namesDialog.setNames(names); pickingHat.clear(); final List<String> names = namesDialog.getNames(); for (int i = 0; i < namesDialog.getMaxPicks(); ++i) { pickingHat.addAll(names); } model.fireContentsChanged(); }
void setNames(List<String> names) { namesDialog.setNames(names); <DeepExtract> pickingHat.clear(); final List<String> names = namesDialog.getNames(); for (int i = 0; i < namesDialog.getMaxPicks(); ++i) { pickingHat.addAll(names); } model.fireContentsChanged(); </DeepExtract> }
dbschools
positive
437,357
public void goToDir(@NonNull T file) { mCurrentPath = file; mCheckedItems.clear(); mCheckedVisibleViewHolders.clear(); if (hasPermission()) { getLoaderManager().restartLoader(0, null, AbstractFilePickerFragment.this); } else { handlePermission(); } }
public void goToDir(@NonNull T file) { mCurrentPath = file; mCheckedItems.clear(); mCheckedVisibleViewHolders.clear(); <DeepExtract> if (hasPermission()) { getLoaderManager().restartLoader(0, null, AbstractFilePickerFragment.this); } else { handlePermission(); } </DeepExtract> }
XInsta
positive
437,359
public static MifareDESFireKey mifare_desfire_des_key_new(byte[] value) { byte[] data = new byte[8]; C.memcpy(data, value, 8); for (int n = 0; n < 8; n++) data[n] &= 0xfe; MifareDESFireKey key = new MifareDESFireKey(); key.setType(DesfireKeyType.DES); C.memcpy(key.getData(), data, 8); C.memcpy(key.getData(), 8, data, 0...
public static MifareDESFireKey mifare_desfire_des_key_new(byte[] value) { byte[] data = new byte[8]; C.memcpy(data, value, 8); for (int n = 0; n < 8; n++) data[n] &= 0xfe; <DeepExtract> MifareDESFireKey key = new MifareDESFireKey(); key.setType(DesfireKeyType.DES); C.memcpy(key.getData(), data, 8); C.memcpy(key.getData...
desfire-tools-for-android
positive
437,360
public RAM getSelectedRam() { for (RAM r : RAM.values()) { if (r.display.equals((String) comboBoxRam.getSelectedItem())) { return r; } } return null; }
public RAM getSelectedRam() { <DeepExtract> for (RAM r : RAM.values()) { if (r.display.equals((String) comboBoxRam.getSelectedItem())) { return r; } } return null; </DeepExtract> }
ForgeScratch
positive
437,361
public Criteria andAdminPasswordGreaterThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "adminPassword" + " cannot be null"); } criteria.add(new Criterion("admin_password >", value)); return (Criteria) this; }
public Criteria andAdminPasswordGreaterThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "adminPassword" + " cannot be null"); } criteria.add(new Criterion("admin_password >", value)); </DeepExtract> return (Criteria) this; }
health_online
positive
437,362
@Override public void run() { ServerConnection conn = new ServerConnection(failed.getAdress(), failed.getPort(), failed.getLogger(), failed.getAuthHandler()); try { conn.connect(); } catch (Auth403Exception e) { conn.getLogger().error("Auth was invalid, no automated reconnecting possible", e); System.exit(0); } catch (...
@Override public void run() { ServerConnection conn = new ServerConnection(failed.getAdress(), failed.getPort(), failed.getLogger(), failed.getAuthHandler()); <DeepExtract> try { conn.connect(); } catch (Auth403Exception e) { conn.getLogger().error("Auth was invalid, no automated reconnecting possible", e); System.exit...
Angelia-core
positive
437,363
@Override public int readLegacy(byte[] data, int off) { int aidLen = data[off++]; mAID = new AID(data, off, aidLen); off += aidLen; mState = data[off++]; mPrivileges = new byte[] { data[off++] }; return off; mModules = new ArrayList<>(); return off; }
@Override public int readLegacy(byte[] data, int off) { <DeepExtract> int aidLen = data[off++]; mAID = new AID(data, off, aidLen); off += aidLen; mState = data[off++]; mPrivileges = new byte[] { data[off++] }; return off; </DeepExtract> mModules = new ArrayList<>(); return off; }
openjavacard-tools
positive
437,364
@Override public Object registerBean(Class clazz, Object object) { if (isRefresh) { awareAndCapableBean(object); } Object result = ((BaseBeanFactory) beanFactory).registerBean(clazz, object); if (clazz instanceof Class) { Class clazz = (Class) clazz; if (result == null) { Logger.debugln(String.format("class named %s ha...
@Override public Object registerBean(Class clazz, Object object) { if (isRefresh) { awareAndCapableBean(object); } Object result = ((BaseBeanFactory) beanFactory).registerBean(clazz, object); <DeepExtract> if (clazz instanceof Class) { Class clazz = (Class) clazz; if (result == null) { Logger.debugln(String.format("cla...
muppet
positive
437,366
@Override public void updateDrawState(TextPaint ds) { int oldStyle; Typeface old = ds.getTypeface(); if (old == null) { oldStyle = 0; } else { oldStyle = old.getStyle(); } int want = oldStyle | mStyle; Typeface tf; if (old == null) { tf = Typeface.defaultFromStyle(want); } else { tf = Typeface.create(old, want); } int ...
@Override public void updateDrawState(TextPaint ds) { <DeepExtract> int oldStyle; Typeface old = ds.getTypeface(); if (old == null) { oldStyle = 0; } else { oldStyle = old.getStyle(); } int want = oldStyle | mStyle; Typeface tf; if (old == null) { tf = Typeface.defaultFromStyle(want); } else { tf = Typeface.create(old,...
Jota-Text-Editor-old
positive
437,367
static int firstInvalidCookieNameOctet(CharSequence cs) { for (int i = 0; i < cs.length(); i++) { char c = cs.charAt(i); if (!VALID_COOKIE_NAME_OCTETS.get(c)) { return i; } } return -1; }
static int firstInvalidCookieNameOctet(CharSequence cs) { <DeepExtract> for (int i = 0; i < cs.length(); i++) { char c = cs.charAt(i); if (!VALID_COOKIE_NAME_OCTETS.get(c)) { return i; } } return -1; </DeepExtract> }
micronaut-aws
positive
437,368
@Override public void onClick(DialogInterface dialog, int which) { mLeaving = true; return RealmManager.getInstance().getChatFromRealm(getRealm(), mChatJID); if (mChat.getType() == Chat.TYPE_MUC_LIGHT) { disconnectRoomFromServer(); mRoomManager.destroyMUCLight(mChatJID); finish(); } }
@Override public void onClick(DialogInterface dialog, int which) { mLeaving = true; <DeepExtract> return RealmManager.getInstance().getChatFromRealm(getRealm(), mChatJID); </DeepExtract> if (mChat.getType() == Chat.TYPE_MUC_LIGHT) { disconnectRoomFromServer(); mRoomManager.destroyMUCLight(mChatJID); finish(); } }
mangosta-android
positive
437,370
public static boolean putInt(String key, int value) { checkValid(); return mUtil.putInt(key, value); }
public static boolean putInt(String key, int value) { <DeepExtract> checkValid(); return mUtil.putInt(key, value); </DeepExtract> }
PureNote
positive
437,371
public void visitScenarioOutline(ScenarioOutlineTree tree) { Iterator<Tree> childrenIterator = tree.childrenIterator(); Tree child; while (childrenIterator.hasNext()) { child = childrenIterator.next(); if (child != null) { child.accept(this); } } }
public void visitScenarioOutline(ScenarioOutlineTree tree) { <DeepExtract> Iterator<Tree> childrenIterator = tree.childrenIterator(); Tree child; while (childrenIterator.hasNext()) { child = childrenIterator.next(); if (child != null) { child.accept(this); } } </DeepExtract> }
sonar-gherkin-plugin
positive
437,372
public UserInfo getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transpor...
public UserInfo getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transpor...
imooc-Docker-Kubernetes-k8s
positive
437,374
public void actionPerformed(java.awt.event.ActionEvent evt) { if (pcb_height_combo.getSelectedIndex() == 0) pcb_height_tf.setText("16"); else if (pcb_height_combo.getSelectedIndex() == 1) pcb_height_tf.setText("31"); else if (pcb_height_combo.getSelectedIndex() == 2) pcb_height_tf.setText("62"); }
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> if (pcb_height_combo.getSelectedIndex() == 0) pcb_height_tf.setText("16"); else if (pcb_height_combo.getSelectedIndex() == 1) pcb_height_tf.setText("31"); else if (pcb_height_combo.getSelectedIndex() == 2) pcb_height_tf.setText("62"); </DeepExt...
jPCBSim
positive
437,375
public static CharSequence Url(CharSequence str) { SpannableStringBuilder ssb = new SpannableStringBuilder(str); for (CharacterStyle c : new URLSpan(str.toString())) { ssb.setSpan(c, 0, str.length(), 0); } return ssb; }
public static CharSequence Url(CharSequence str) { <DeepExtract> SpannableStringBuilder ssb = new SpannableStringBuilder(str); for (CharacterStyle c : new URLSpan(str.toString())) { ssb.setSpan(c, 0, str.length(), 0); } return ssb; </DeepExtract> }
gtalksms
positive
437,377
public void setConfig(String file) throws IOException { InputStream is = LGProperties.getStream(file); String content = getContent(is); JSONObject configJSON = new JSONObject(content); Config conf = new Config(); Iterator<?> keyRing = configJSON.keys(); while (keyRing.hasNext()) { String key = (String) keyRing.next(); ...
public void setConfig(String file) throws IOException { <DeepExtract> InputStream is = LGProperties.getStream(file); String content = getContent(is); JSONObject configJSON = new JSONObject(content); Config conf = new Config(); Iterator<?> keyRing = configJSON.keys(); while (keyRing.hasNext()) { String key = (String) ke...
lemongrenade
positive
437,378
@Subscribe public void noInternet(NoInternetEvent event) { Snackbar.make(mainFrame, getString(R.string.download_failed), Snackbar.LENGTH_LONG).setAction(R.string.retry_download, view -> { if (null == null) OpenEventApp.postEventOnUIThread(new DataDownloadEvent()); else OpenEventApp.postEventOnUIThread(null); }).show();...
@Subscribe public void noInternet(NoInternetEvent event) { <DeepExtract> Snackbar.make(mainFrame, getString(R.string.download_failed), Snackbar.LENGTH_LONG).setAction(R.string.retry_download, view -> { if (null == null) OpenEventApp.postEventOnUIThread(new DataDownloadEvent()); else OpenEventApp.postEventOnUIThread(nul...
open-event-android
positive
437,379
@Override @Transactional(rollbackFor = Exception.class) public void activate(long userId) throws DatabaseException { Customer customer; Customer customer = em.find(Customer.class, userId); if (customer == null) { throw new DatabaseException("No customer with userId " + userId); } else { customer = customer; } try { cus...
@Override @Transactional(rollbackFor = Exception.class) public void activate(long userId) throws DatabaseException { <DeepExtract> Customer customer; Customer customer = em.find(Customer.class, userId); if (customer == null) { throw new DatabaseException("No customer with userId " + userId); } else { customer = custome...
BikeMan
positive
437,381
@Override public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(SQL_DELETE_LOCATION_TABLE); Log.d(this.getClass().getName(), SQL_DELETE_LOCATION_TABLE); db.execSQL(SQL_DELETE_CONFIG_TABLE); Log.d(this.getClass().getName(), SQL_DELETE_CONFIG_TABLE); onCreate(db); }
@Override public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { <DeepExtract> db.execSQL(SQL_DELETE_LOCATION_TABLE); Log.d(this.getClass().getName(), SQL_DELETE_LOCATION_TABLE); db.execSQL(SQL_DELETE_CONFIG_TABLE); Log.d(this.getClass().getName(), SQL_DELETE_CONFIG_TABLE); onCreate(db); </DeepExt...
background-geolocation-android
positive
437,382
public Criteria andPlanIdLessThanOrEqualTo(Long value) { if (value == null) { throw new RuntimeException("Value for " + "planId" + " cannot be null"); } criteria.add(new Criterion("PLANID <=", value)); return (Criteria) this; }
public Criteria andPlanIdLessThanOrEqualTo(Long value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "planId" + " cannot be null"); } criteria.add(new Criterion("PLANID <=", value)); </DeepExtract> return (Criteria) this; }
compass
positive
437,383
public HGrid eval(String expr) { HGridBuilder b = new HGridBuilder(); b.addCol("expr"); b.addRow(new HVal[] { HStr.make(expr) }); HGrid req = b.toGrid(); HGrid res = postGrid("eval", req); if (res.isErr()) throw new CallErrException(res); return res; }
public HGrid eval(String expr) { HGridBuilder b = new HGridBuilder(); b.addCol("expr"); b.addRow(new HVal[] { HStr.make(expr) }); HGrid req = b.toGrid(); <DeepExtract> HGrid res = postGrid("eval", req); if (res.isErr()) throw new CallErrException(res); return res; </DeepExtract> }
haystack-java
positive
437,385
public void actionPerformed(ActionEvent ev) { display.getInput().setText(""); synchronized (this) { if (ev.getActionCommand().trim().equals("")) { return; } Command temp = new Command(); temp.token = null; temp.text = ev.getActionCommand(); commands.add(temp); } }
public void actionPerformed(ActionEvent ev) { display.getInput().setText(""); <DeepExtract> synchronized (this) { if (ev.getActionCommand().trim().equals("")) { return; } Command temp = new Command(); temp.token = null; temp.text = ev.getActionCommand(); commands.add(temp); } </DeepExtract> }
armitage
positive
437,386
public static void main(String[] args) throws Exception { LocalProvenanceClient client = new LocalProvenanceClient(User.DEFAULT_USER_GOD); List<PLUSWorkflow> wfs = client.listWorkflows(20); for (PLUSWorkflow wf : wfs) { col = client.getWorkflowMembers(wf.getId(), 2); if (col.countNodes() <= 0) { continue; } col = clien...
public static void main(String[] args) throws Exception { <DeepExtract> LocalProvenanceClient client = new LocalProvenanceClient(User.DEFAULT_USER_GOD); List<PLUSWorkflow> wfs = client.listWorkflows(20); for (PLUSWorkflow wf : wfs) { col = client.getWorkflowMembers(wf.getId(), 2); if (col.countNodes() <= 0) { continue;...
plus
positive
437,387
@Override public PostTagLinksRecord values(Long value1, Integer value2) { setPostId(value1); return this; setPostTagId(value2); return this; return this; }
@Override public PostTagLinksRecord values(Long value1, Integer value2) { setPostId(value1); return this; <DeepExtract> setPostTagId(value2); return this; </DeepExtract> return this; }
StubbornJava
positive
437,389
public void show(Item item, float x, float y) { this.setPosition(x, y); this.setVisible(true); switch(item.rarity) { case 0: this.getTitleLabel().setStyle(common); break; case 1: this.getTitleLabel().setStyle(rare); break; case 2: this.getTitleLabel().setStyle(epic); break; case 3: this.getTitleLabel().setStyle(legenda...
public void show(Item item, float x, float y) { this.setPosition(x, y); this.setVisible(true); <DeepExtract> switch(item.rarity) { case 0: this.getTitleLabel().setStyle(common); break; case 1: this.getTitleLabel().setStyle(rare); break; case 2: this.getTitleLabel().setStyle(epic); break; case 3: this.getTitleLabel().se...
Unlucky
positive
437,390
@Test public void testMatch() { p("=== Testing " + "anyMatch" + " ==="); p("[1,2,3,4].stream().anyMatch(e->e == 3)"); Object ret = elp.eval("[1,2,3,4].stream().anyMatch(e->e == 3)"); p(" = returns ="); if (ret.getClass().isArray()) { int size = Array.getLength(ret); assertTrue(size == Boolean.TRUE.length); for (int i =...
@Test public void testMatch() { p("=== Testing " + "anyMatch" + " ==="); p("[1,2,3,4].stream().anyMatch(e->e == 3)"); Object ret = elp.eval("[1,2,3,4].stream().anyMatch(e->e == 3)"); p(" = returns ="); if (ret.getClass().isArray()) { int size = Array.getLength(ret); assertTrue(size == Boolean.TRUE.length); for (int i =...
el-spec
positive
437,391
@Override public void run() { context = akkaContextFactory.createContext(1); socket = akkaSocketFactory.createConsumerSocket(context, endpoint.getSocketType()); String addr = endpoint.getSocketAddress(); if (endpoint.getMode() == null || endpoint.getMode().equals("CONNECT")) { LOGGER.info("Connecting to server [{}]", a...
@Override public void run() { <DeepExtract> context = akkaContextFactory.createContext(1); socket = akkaSocketFactory.createConsumerSocket(context, endpoint.getSocketType()); String addr = endpoint.getSocketAddress(); if (endpoint.getMode() == null || endpoint.getMode().equals("CONNECT")) { LOGGER.info("Connecting to s...
camel-extra
positive
437,393
private void selectAll(boolean selected, boolean toast) { int count = entryList.getCount(); int selectedCount = 0; for (int i = 0; i < count; i++) { MusicDirectory.Entry entry = (MusicDirectory.Entry) entryList.getItemAtPosition(i); if (entry != null && !entry.isDirectory() && !entry.isVideo()) { entryList.setItemCheck...
private void selectAll(boolean selected, boolean toast) { int count = entryList.getCount(); int selectedCount = 0; for (int i = 0; i < count; i++) { MusicDirectory.Entry entry = (MusicDirectory.Entry) entryList.getItemAtPosition(i); if (entry != null && !entry.isDirectory() && !entry.isVideo()) { entryList.setItemCheck...
Subsonic-Android
positive
437,394
public Builder mergeFrom(Heart other) { if (other == Heart.getDefaultInstance()) return this; if (!other.getUserId().isEmpty()) { userId_ = other.userId_; onChanged(); } return super.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public Builder mergeFrom(Heart other) { if (other == Heart.getDefaultInstance()) return this; if (!other.getUserId().isEmpty()) { userId_ = other.userId_; onChanged(); } <DeepExtract> return super.mergeUnknownFields(other.unknownFields); </DeepExtract> onChanged(); return this; }
NettyIM
positive
437,395
@Override public void createArtifacts() throws KubernetesPluginException { DeploymentModel model = this.dataHolder.getDeploymentModel(); OUT.println(); Path helmBaseOutputDir = this.dataHolder.getK8sArtifactOutputPath(); if (helmBaseOutputDir.endsWith("target" + File.separator + "kubernetes" + File.separator)) { helmBa...
@Override public void createArtifacts() throws KubernetesPluginException { DeploymentModel model = this.dataHolder.getDeploymentModel(); OUT.println(); Path helmBaseOutputDir = this.dataHolder.getK8sArtifactOutputPath(); if (helmBaseOutputDir.endsWith("target" + File.separator + "kubernetes" + File.separator)) { helmBa...
module-ballerina-kubernetes
positive
437,396
public void widgetSelected(SelectionEvent e) { if (_windowShell != null) _windowShell.dispose(); _windowShell = null; }
public void widgetSelected(SelectionEvent e) { <DeepExtract> if (_windowShell != null) _windowShell.dispose(); _windowShell = null; </DeepExtract> }
TelosysToolsPlugin
positive
437,398
public static void main(String[] args) { int[] dist = new int[N]; dist[N - 1] = 0; for (int i = N - 2; i >= 0; i--) { dist[i] = INF; for (int j = 1; j < N; j++) { if (graph[i][j] == INF) { continue; } dist[i] = Math.min(dist[i], graph[i][j] + dist[j]); } } System.out.println(dist[0]); }
public static void main(String[] args) { <DeepExtract> int[] dist = new int[N]; dist[N - 1] = 0; for (int i = N - 2; i >= 0; i--) { dist[i] = INF; for (int j = 1; j < N; j++) { if (graph[i][j] == INF) { continue; } dist[i] = Math.min(dist[i], graph[i][j] + dist[j]); } } System.out.println(dist[0]); </DeepExtract> }
DSA_Java
positive
437,401
public void run() { if (uiIsInList(device)) { return; } final Map<String, Object> record = new HashMap<String, Object>(); record.put(sName, device.getName()); record.put(sAddr, device.getAddress()); record.put(sDevice, device); record.put(sExtra, type); mRecords.add(record); mAdapter.notifyDataSetChanged(); }
public void run() { <DeepExtract> if (uiIsInList(device)) { return; } final Map<String, Object> record = new HashMap<String, Object>(); record.put(sName, device.getName()); record.put(sAddr, device.getAddress()); record.put(sDevice, device); record.put(sExtra, type); mRecords.add(record); mAdapter.notifyDataSetChanged(...
Bluebit
positive
437,402
private void onOK() { PropertiesComponent.getInstance().setValue(PLUS_DBURL, dbUrlTextField.getText()); PropertiesComponent.getInstance().setValue(PLUS_DBTYPE, jdbcDriverComboBox.getSelectedIndex(), 0); PropertiesComponent.getInstance().setValue(PLUS_USERNAME, userTextField.getText()); PropertiesComponent.getInstance()...
private void onOK() { <DeepExtract> PropertiesComponent.getInstance().setValue(PLUS_DBURL, dbUrlTextField.getText()); PropertiesComponent.getInstance().setValue(PLUS_DBTYPE, jdbcDriverComboBox.getSelectedIndex(), 0); PropertiesComponent.getInstance().setValue(PLUS_USERNAME, userTextField.getText()); PropertiesComponent...
mybatis-plus-plugin
positive
437,405
public static <F, T> Set<T> transformSetNotNull(List<F> fromList, Function<? super F, ? extends T> function) { if (CollectionUtils.isEmpty(fromList)) { return new HashSet<T>(0); } HashSet<T> resultList = new HashSet<T>(fromList.size()); for (F f : fromList) { T data = function.apply(f); if (true && data == null) { cont...
public static <F, T> Set<T> transformSetNotNull(List<F> fromList, Function<? super F, ? extends T> function) { <DeepExtract> if (CollectionUtils.isEmpty(fromList)) { return new HashSet<T>(0); } HashSet<T> resultList = new HashSet<T>(fromList.size()); for (F f : fromList) { T data = function.apply(f); if (true && data =...
molicode
positive
437,408
public void replaceData(double[] newXData, double[] newYData, double[] newExtraValues) { if (newExtraValues != null && newExtraValues.length != newYData.length) { throw new IllegalArgumentException("error bars and Y-Axis sizes are not the same!!!"); } if (newXData.length != newYData.length) { throw new IllegalArgumentE...
public void replaceData(double[] newXData, double[] newYData, double[] newExtraValues) { if (newExtraValues != null && newExtraValues.length != newYData.length) { throw new IllegalArgumentException("error bars and Y-Axis sizes are not the same!!!"); } if (newXData.length != newYData.length) { throw new IllegalArgumentE...
lodax
positive
437,409
@Override protected void execute(DeploymentProcessorTarget processorTarget) { processorTarget.addDeploymentProcessor(HASingletonExtension.SUBSYSTEM_NAME, Phase.INSTALL, 200, new HASingletonInstaller()); processorTarget.addDeploymentProcessor(HASingletonExtension.SUBSYSTEM_NAME, Phase.INSTALL, 200, new CoordinationMapIn...
@Override protected void execute(DeploymentProcessorTarget processorTarget) { <DeepExtract> processorTarget.addDeploymentProcessor(HASingletonExtension.SUBSYSTEM_NAME, Phase.INSTALL, 200, new HASingletonInstaller()); processorTarget.addDeploymentProcessor(HASingletonExtension.SUBSYSTEM_NAME, Phase.INSTALL, 200, new Coo...
jboss-polyglot
positive
437,410
private void transform(TreeNode node) throws URISyntaxException { try { hash(node); hash = Base64.getUrlEncoder().withoutPadding().encodeToString(md.digest()); } finally { md.reset(); } if (node.isArray()) { for (int i = 0; i < node.size(); i++) { treeWalk(null, null, vf.createIRI(baseURI + hash).stringValue() + ":" + ...
private void transform(TreeNode node) throws URISyntaxException { try { hash(node); hash = Base64.getUrlEncoder().withoutPadding().encodeToString(md.digest()); } finally { md.reset(); } <DeepExtract> if (node.isArray()) { for (int i = 0; i < node.size(); i++) { treeWalk(null, null, vf.createIRI(baseURI + hash).stringVa...
Halyard
positive
437,411
public void setUseNoTabs(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_USE_NOTABS); if (null == el) { el = new Element(SETTING_USE_NOTABS); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); }
public void setUseNoTabs(boolean val) { <DeepExtract> Element el = settingsFile.getRootElement().getChild(SETTING_USE_NOTABS); if (null == el) { el = new Element(SETTING_USE_NOTABS); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); </DeepExtract> }
Relaunch64
positive
437,412
public Uri save(ContentResolver contentResolver) { if (this.following != null) { this.following.save(contentResolver); } if (this.getUser() != null) { this.getUser().save(contentResolver); } ContentValues values = new ContentValues(); values.put(Follows.GUID, this.guid); values.put(Follows.FOLLOWINGID, this.followingID...
public Uri save(ContentResolver contentResolver) { if (this.following != null) { this.following.save(contentResolver); } if (this.getUser() != null) { this.getUser().save(contentResolver); } ContentValues values = new ContentValues(); <DeepExtract> values.put(Follows.GUID, this.guid); values.put(Follows.FOLLOWINGID, th...
sichu_android
positive
437,413
@Override @NbBundle.Messages({ "TemplatePanelChangeListener.invalid.empty=Name must be set.", "TemplatePanelChangeListener.invalid.existing=It already exisits." }) public void stateChanged(ChangeEvent e) { String templateName = templatePanel.getTemplateName(); if ((templateName == null || templateName.isEmpty())) { not...
@Override @NbBundle.Messages({ "TemplatePanelChangeListener.invalid.empty=Name must be set.", "TemplatePanelChangeListener.invalid.existing=It already exisits." }) public void stateChanged(ChangeEvent e) { String templateName = templatePanel.getTemplateName(); if ((templateName == null || templateName.isEmpty())) { not...
netbeans-github-issues-plugin
positive
437,414
public static void setStateParam(String name, String value, HttpServletRequest req, HttpServletResponse res, boolean httpOnly) { if (StringUtils.isBlank(name) || value == null || req == null || res == null) { return; } String expires = DateFormatUtils.format(System.currentTimeMillis() + (-1 * 1000), "EEE, dd-MMM-yyyy H...
public static void setStateParam(String name, String value, HttpServletRequest req, HttpServletResponse res, boolean httpOnly) { <DeepExtract> if (StringUtils.isBlank(name) || value == null || req == null || res == null) { return; } String expires = DateFormatUtils.format(System.currentTimeMillis() + (-1 * 1000), "EEE,...
scoold
positive
437,415
public void executeSerial(DisposableObserver<T> observer, Params params) { Preconditions.checkNotNull(observer); final Observable<T> observable = this.buildUseCaseObservable(params).subscribeOn(Schedulers.from(serialThreadExecutor)).observeOn(postExecutionThread.getScheduler()); Preconditions.checkNotNull(observable.su...
public void executeSerial(DisposableObserver<T> observer, Params params) { Preconditions.checkNotNull(observer); final Observable<T> observable = this.buildUseCaseObservable(params).subscribeOn(Schedulers.from(serialThreadExecutor)).observeOn(postExecutionThread.getScheduler()); <DeepExtract> Preconditions.checkNotNull...
Style
positive
437,416
public void testDontFillROTSystemProperty() { System.out.println(Thread.currentThread().getName() + " " + "testDontFillROTSystemProperty: started"); VariantViaEvent.class.getName(); if (ROT.getThreadObjects(true).entrySet().size() < 1) { debug("Failure: ROT should have objects in it as soon as Variant class loaded."); ...
public void testDontFillROTSystemProperty() { System.out.println(Thread.currentThread().getName() + " " + "testDontFillROTSystemProperty: started"); VariantViaEvent.class.getName(); if (ROT.getThreadObjects(true).entrySet().size() < 1) { debug("Failure: ROT should have objects in it as soon as Variant class loaded."); ...
jacob
positive
437,418
public static Quadruple two() { negative = 2.negative; exponent = 2.exponent; mantHi = 2.mantHi; mantLo = 2.mantLo; return this; }
public static Quadruple two() { <DeepExtract> negative = 2.negative; exponent = 2.exponent; mantHi = 2.mantHi; mantLo = 2.mantLo; return this; </DeepExtract> }
Quadruple
positive
437,420
@Override public void onClick(DialogInterface dialog, int which) { customColor = colorPickerDialog.getColor(); drawSurfaceView.setColor(customColor); barImageView.setImageDrawable(new ColorDrawable(customColor)); getSharedPreferences("settings", 0).edit().putInt("color", customColor).commit(); renderStroke(); }
@Override public void onClick(DialogInterface dialog, int which) { customColor = colorPickerDialog.getColor(); <DeepExtract> drawSurfaceView.setColor(customColor); barImageView.setImageDrawable(new ColorDrawable(customColor)); getSharedPreferences("settings", 0).edit().putInt("color", customColor).commit(); renderStrok...
Stacks-Flashcards
positive
437,421
public static void writeSuiteSummary(TestSuite suite, File output) { if (!(suite.size() > 0)) { return; } String buffer = ""; if (!TestDriver.TINDERBOX) { System.out.println("total :" + suite.totalCases); } if (!TestDriver.TINDERBOX) { System.out.println("passed :" + suite.casesPassed); } if (!TestDriver.TINDERBOX) { S...
public static void writeSuiteSummary(TestSuite suite, File output) { if (!(suite.size() > 0)) { return; } String buffer = ""; if (!TestDriver.TINDERBOX) { System.out.println("total :" + suite.totalCases); } if (!TestDriver.TINDERBOX) { System.out.println("passed :" + suite.casesPassed); } <DeepExtract> if (!TestDriver....
WebKit
positive
437,422
public User getPartner() throws SkypeException { synchronized (calls) { if (!calls.containsKey(getPartnerId())) { calls.put(getPartnerId(), new Call(getPartnerId())); } return calls.get(getPartnerId()); } }
public User getPartner() throws SkypeException { <DeepExtract> synchronized (calls) { if (!calls.containsKey(getPartnerId())) { calls.put(getPartnerId(), new Call(getPartnerId())); } return calls.get(getPartnerId()); } </DeepExtract> }
skype-java-api
positive
437,423
private void setTabBarVisibility(AwesomeFragment current) { StackFragment stackFragment = current.getStackFragment(); if (stackFragment == null || stackFragment.getTabBarFragment() != this) { return; } if (stackFragment.shouldShowTabBarWhenPushed()) { showTabBar(); return; } if (stackFragment.getTopFragment() == stackF...
private void setTabBarVisibility(AwesomeFragment current) { StackFragment stackFragment = current.getStackFragment(); if (stackFragment == null || stackFragment.getTabBarFragment() != this) { return; } if (stackFragment.shouldShowTabBarWhenPushed()) { showTabBar(); return; } if (stackFragment.getTopFragment() == stackF...
AndroidNavigation
positive
437,424
public CommonAgentBuilder additionalHttpHeader(String k, String v) { if (headers == null) headers = new ArrayMap<>(); headers.put(k, v); return this; }
public CommonAgentBuilder additionalHttpHeader(String k, String v) { <DeepExtract> if (headers == null) headers = new ArrayMap<>(); headers.put(k, v); </DeepExtract> return this; }
AgentWebX5
positive
437,425
@Override public void add(final E e) { if (UntracedArrayList.this.modCount != this.expectedModCount) throw new ConcurrentModificationException(); try { UntracedArrayList.this.add(this.cursor++, e); this.lastRet = -1; this.expectedModCount = UntracedArrayList.this.modCount; } catch (final IndexOutOfBoundsException ex) {...
@Override public void add(final E e) { <DeepExtract> if (UntracedArrayList.this.modCount != this.expectedModCount) throw new ConcurrentModificationException(); </DeepExtract> try { UntracedArrayList.this.add(this.cursor++, e); this.lastRet = -1; this.expectedModCount = UntracedArrayList.this.modCount; } catch (final In...
javaslicer
positive
437,427