before
stringlengths
33
3.21M
after
stringlengths
63
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
public void set(String varName, String value) { variables.set(varName, value); SMSPersistence.save(this); }
public void set(String varName, String value) { variables.set(varName, value); <DeepExtract> SMSPersistence.save(this); </DeepExtract> }
ScrollingMenuSign
positive
435,031
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); overridePendingTransition(R.anim.slideright, R.anim.slideright2); setContentView(R.layout.mypaper); myname = (TextView) findViewById(R.id.tvParty); myimg = (ImageView) findViewById(R.id.imgParty); myname.setText("My Paper...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); overridePendingTransition(R.anim.slideright, R.anim.slideright2); setContentView(R.layout.mypaper); myname = (TextView) findViewById(R.id.tvParty); myimg = (ImageView) findViewById(R.id.imgParty); myname.setText("My Paper...
Android-Practice-for-Beginners
positive
435,032
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { SellerService service = new SellerServiceImpl(); int goodsId = 0; String gId = request.getParameter("goodsId"); if (!StringUtil.isEmpty(gId)) goodsId = Integer.parseInt(gId); int days = 0; String d = r...
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { <DeepExtract> SellerService service = new SellerServiceImpl(); int goodsId = 0; String gId = request.getParameter("goodsId"); if (!StringUtil.isEmpty(gId)) goodsId = Integer.parseInt(gId); int days = 0...
OnlineShoppingSystem
positive
435,035
@Override protected void visitTrackedMethodInsn(int opcode, String owner, String name, String desc, boolean intf) { assert !context.isInternalLocation() : context; Label start = new Label(); Label end = new Label(); Label handler = new Label(); Label done = new Label(); pushLocationStack(); mv.push(AProfRegistry.regist...
@Override protected void visitTrackedMethodInsn(int opcode, String owner, String name, String desc, boolean intf) { assert !context.isInternalLocation() : context; Label start = new Label(); Label end = new Label(); Label handler = new Label(); Label done = new Label(); pushLocationStack(); mv.push(AProfRegistry.regist...
aprof
positive
435,036
public int splitArray(int[] nums, int m) { int[][] memo = new int[nums.length][nums.length]; int j = memo.length - m - 1; if (memo[0][m - 1] != 0) return memo[0][m - 1]; int min = Integer.MAX_VALUE, sum = 0; for (int k = 0; k < j; k++) { sum += nums[k]; int value = m - 1 > 0 && sum < min ? recurSubArrays(nums, memo, m ...
public int splitArray(int[] nums, int m) { int[][] memo = new int[nums.length][nums.length]; <DeepExtract> int j = memo.length - m - 1; if (memo[0][m - 1] != 0) return memo[0][m - 1]; int min = Integer.MAX_VALUE, sum = 0; for (int k = 0; k < j; k++) { sum += nums[k]; int value = m - 1 > 0 && sum < min ? recurSubArrays(...
computer-science
positive
435,038
public static void setFlailThrown(EntityPlayer player, boolean flag) { try { int i = player.getDataWatcher().getWatchableObjectInt(BOOLEANS); i = setBoolean(i, FLAIL_THROWN, flag); player.getDataWatcher().updateObject(BOOLEANS, i); } catch (NullPointerException e) { unavailableError(player, BOOLEANS); } }
public static void setFlailThrown(EntityPlayer player, boolean flag) { <DeepExtract> try { int i = player.getDataWatcher().getWatchableObjectInt(BOOLEANS); i = setBoolean(i, FLAIL_THROWN, flag); player.getDataWatcher().updateObject(BOOLEANS, i); } catch (NullPointerException e) { unavailableError(player, BOOLEANS); } <...
balkons-weaponmod
positive
435,040
@Override public boolean generate(TerrainGenerator generator, int chunkX, int chunkZ, ChunkRand rand) { RuinedPortal ruinedPortal = new RuinedPortal(generator.getBiomeSource().getDimension(), this.getVersion()); if (!ruinedPortal.canStart((RegionStructure.Data<RuinedPortal>) ruinedPortal.at(chunkX, chunkZ), generator.g...
@Override public boolean generate(TerrainGenerator generator, int chunkX, int chunkZ, ChunkRand rand) { <DeepExtract> RuinedPortal ruinedPortal = new RuinedPortal(generator.getBiomeSource().getDimension(), this.getVersion()); if (!ruinedPortal.canStart((RegionStructure.Data<RuinedPortal>) ruinedPortal.at(chunkX, chunkZ...
FeatureUtils
positive
435,042
@Override public INDArray transform(Collection<Writable> record) { Counter<String> wordFrequencies = wordFrequenciesForRecord(record); INDArray ret = Nd4j.create(cache.vocabWords().size()); Counter<String> docFrequencies = (Counter<String>) new Object[] { wordFrequencies }[0]; for (int i = 0; i < cache.vocabWords().siz...
@Override public INDArray transform(Collection<Writable> record) { Counter<String> wordFrequencies = wordFrequenciesForRecord(record); <DeepExtract> INDArray ret = Nd4j.create(cache.vocabWords().size()); Counter<String> docFrequencies = (Counter<String>) new Object[] { wordFrequencies }[0]; for (int i = 0; i < cache.vo...
Canova
positive
435,043
@Override public MonetaryAmount apply(MonetaryAmount estimatedDividends) { return estimatedDividends.divide(requiredRateOfReturn.get().subtract(growthRate.get())); }
@Override public MonetaryAmount apply(MonetaryAmount estimatedDividends) { <DeepExtract> return estimatedDividends.divide(requiredRateOfReturn.get().subtract(growthRate.get())); </DeepExtract> }
javamoney-lib
positive
435,044
@SuppressWarnings("unchecked") public Event<Object> event() { if (container == null || !container.isRunning()) { throw new IllegalStateException("Weld container is not running"); } try { Method eventMethod = container.getClass().getMethod("event"); return (Event<Object>) eventMethod.invoke(container); } catch (NoSuchMe...
@SuppressWarnings("unchecked") public Event<Object> event() { <DeepExtract> if (container == null || !container.isRunning()) { throw new IllegalStateException("Weld container is not running"); } </DeepExtract> try { Method eventMethod = container.getClass().getMethod("event"); return (Event<Object>) eventMethod.invoke(...
weld-junit
positive
435,045
public AutoSettle addFlag(AutoSettleFlag autoSettleFlag) { return flag; return this; }
public AutoSettle addFlag(AutoSettleFlag autoSettleFlag) { <DeepExtract> return flag; </DeepExtract> return this; }
rxp-remote-java
positive
435,046
@Override public void onSuccess(Call<ZulipBackendResponse> call, Response<ZulipBackendResponse> response) { View view = LoginActivity.this.getCurrentFocus(); if (view != null) { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(...
@Override public void onSuccess(Call<ZulipBackendResponse> call, Response<ZulipBackendResponse> response) { View view = LoginActivity.this.getCurrentFocus(); if (view != null) { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(...
zulip-android
positive
435,048
public static ArrayList<Fixture> odds(String competition, int year, String add) throws IOException, ParseException, InterruptedException { if (add == null) { address = EntryPoints.getOddsLink(competition, year); } else address = add; System.out.println(address); Set<Fixture> result = new HashSet<>(); WebDriver driver =...
public static ArrayList<Fixture> odds(String competition, int year, String add) throws IOException, ParseException, InterruptedException { if (add == null) { address = EntryPoints.getOddsLink(competition, year); } else address = add; System.out.println(address); Set<Fixture> result = new HashSet<>(); WebDriver driver =...
Soccer
positive
435,050
public ItemStackBuilder setLore(String... lore) { ItemMeta itemMeta = itemStack.getItemMeta(); itemMeta.setLore(Strings.format(Lists.newArrayList(lore))); this.itemStack.setItemMeta(itemMeta); return this; return this; }
public ItemStackBuilder setLore(String... lore) { ItemMeta itemMeta = itemStack.getItemMeta(); itemMeta.setLore(Strings.format(Lists.newArrayList(lore))); <DeepExtract> this.itemStack.setItemMeta(itemMeta); return this; </DeepExtract> return this; }
StaffPlus
positive
435,052
public void collapse() { mExpanded = false; mMore.setImageResource(false ? R.drawable.ic_up : R.drawable.ic_down); mContent.setVisibility(false ? View.VISIBLE : View.GONE); }
public void collapse() { <DeepExtract> mExpanded = false; mMore.setImageResource(false ? R.drawable.ic_up : R.drawable.ic_down); mContent.setVisibility(false ? View.VISIBLE : View.GONE); </DeepExtract> }
Tribler-streaming
positive
435,053
@Override public void evalAssign(final AssignExpr assign) { for (final FuncStmt func : this.funcs) { evalFunc(func); } stack.push(isNull); }
@Override public void evalAssign(final AssignExpr assign) { <DeepExtract> for (final FuncStmt func : this.funcs) { evalFunc(func); } </DeepExtract> stack.push(isNull); }
qupla
positive
435,054
@Test public void shouldParseConfigWithValidateArtifactAndReferencedListOfMissing() { initAppContext("/TestBomDependencyNotFoundFilterParser-validatedArtifactWithReferencedListOfMissing.xml"); assertNumberOfBeansWithType(ExceptionFilter.class, 2); List<BomDependencyNotFoundExceptionFilter> filters = getAllMatchingBeans...
@Test public void shouldParseConfigWithValidateArtifactAndReferencedListOfMissing() { initAppContext("/TestBomDependencyNotFoundFilterParser-validatedArtifactWithReferencedListOfMissing.xml"); assertNumberOfBeansWithType(ExceptionFilter.class, 2); List<BomDependencyNotFoundExceptionFilter> filters = getAllMatchingBeans...
redhat-repository-validator
positive
435,055
public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) { if (evt.isControlDown()) { if (evt.getWheelRotation() < 0) { zoom(1); } else if (evt.getWheelRotation() > 0) { zoom(-1); } } }
public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) { <DeepExtract> if (evt.isControlDown()) { if (evt.getWheelRotation() < 0) { zoom(1); } else if (evt.getWheelRotation() > 0) { zoom(-1); } } </DeepExtract> }
unravl
positive
435,056
@Override public <R, D> R accept(TreeVisitor<R, D> visitor, D data) { return Unifier.unifyNullable(data, getExpression(), this.getExpression()); }
@Override public <R, D> R accept(TreeVisitor<R, D> visitor, D data) { <DeepExtract> return Unifier.unifyNullable(data, getExpression(), this.getExpression()); </DeepExtract> }
Refaster
positive
435,057
@Override String toCString(boolean useMarkdown) { return "D:" + type() + "," + value(); }
@Override String toCString(boolean useMarkdown) { <DeepExtract> return "D:" + type() + "," + value(); </DeepExtract> }
ML
positive
435,060
public MaterialCamera primaryColorAttr(@AttrRes int colorAttr) { mPrimaryColor = DialogUtils.resolveColor(mContext, colorAttr); return this; }
public MaterialCamera primaryColorAttr(@AttrRes int colorAttr) { <DeepExtract> mPrimaryColor = DialogUtils.resolveColor(mContext, colorAttr); return this; </DeepExtract> }
Android-Instagram-Clone
positive
435,061
protected static void verticalBlockPermutation(Sudoku sudoku) { int rowsPerBlock = sudoku.getSudokuType().getBlockSize().getY(); int numberOfVertikalBlocks = sudoku.getSudokuType().getSize().getY() / rowsPerBlock; new Rotate90().permutate(sudoku); for (int i = 0; i < numberOfVertikalBlocks - 1; i++) TransformationUtili...
protected static void verticalBlockPermutation(Sudoku sudoku) { int rowsPerBlock = sudoku.getSudokuType().getBlockSize().getY(); int numberOfVertikalBlocks = sudoku.getSudokuType().getSize().getY() / rowsPerBlock; new Rotate90().permutate(sudoku); for (int i = 0; i < numberOfVertikalBlocks - 1; i++) TransformationUtili...
SudoQ
positive
435,062
public static String getYyyyMmDdHhMmSs(Object time) { if (time == null) return ""; try { SimpleDateFormat sdf = new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS); if (time instanceof Long) return sdf.format(new Date((long) time * 1000)); else if (time instanceof String) return sdf.format(Long.parseLong((String) time) * 1000); ...
public static String getYyyyMmDdHhMmSs(Object time) { <DeepExtract> if (time == null) return ""; try { SimpleDateFormat sdf = new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS); if (time instanceof Long) return sdf.format(new Date((long) time * 1000)); else if (time instanceof String) return sdf.format(Long.parseLong((String) t...
android-frame
positive
435,063
@Test public void testBasicWorldResolve() { setPermissions(TEST_PLAYER, TEST_PLAYER_UUID, false, "basic.perm1", TEST_WORLD1 + ":basic.perm2", TEST_WORLD2 + ":basic.perm3"); permissions = resolve(TEST_PLAYER, TEST_PLAYER_UUID, TEST_WORLD1); assertPermission(permissions, "basic.perm1", true); assertPermission(permissions...
@Test public void testBasicWorldResolve() { setPermissions(TEST_PLAYER, TEST_PLAYER_UUID, false, "basic.perm1", TEST_WORLD1 + ":basic.perm2", TEST_WORLD2 + ":basic.perm3"); permissions = resolve(TEST_PLAYER, TEST_PLAYER_UUID, TEST_WORLD1); assertPermission(permissions, "basic.perm1", true); assertPermission(permissions...
zPermissions
positive
435,065
public void writeFloat(float paramFloat) { this.mDataList.add(new FloatData(paramFloat)); this.mPayloadSize += new FloatData(paramFloat).getByteSize(); }
public void writeFloat(float paramFloat) { <DeepExtract> this.mDataList.add(new FloatData(paramFloat)); this.mPayloadSize += new FloatData(paramFloat).getByteSize(); </DeepExtract> }
OpenFit
positive
435,066
public List<Activity> listActivityOnBook(Long userId, QueryFilter... filters) { assert userId != null; Criteria crit = session.createCriteria(AbstractBookActivity.class); crit.add(Restrictions.eq("user.id", userId)).createCriteria("book").createAlias("users", "u").add(Restrictions.eq("u.id", userId)); super.applyFilter...
public List<Activity> listActivityOnBook(Long userId, QueryFilter... filters) { assert userId != null; Criteria crit = session.createCriteria(AbstractBookActivity.class); crit.add(Restrictions.eq("user.id", userId)).createCriteria("book").createAlias("users", "u").add(Restrictions.eq("u.id", userId)); <DeepExtract> sup...
wooki
positive
435,068
public static void exe(String s) { if (process == null) ; try { process = Runtime.getRuntime().exec("su"); return; } catch (Exception localException) { LLogger.error("SuUtil.initProcess", localException); } OutputStream outputstream = process.getOutputStream(); try { outputstream.write("export LD_LIBRARY_PATH=/vendor/l...
public static void exe(String s) { if (process == null) ; try { process = Runtime.getRuntime().exec("su"); return; } catch (Exception localException) { LLogger.error("SuUtil.initProcess", localException); } OutputStream outputstream = process.getOutputStream(); try { outputstream.write("export LD_LIBRARY_PATH=/vendor/l...
ChangephoneUPoint
positive
435,069
private void firstAnimation() { loadMapping(); calculation = new String(""); numbers = new String(""); String longstring = new String(""); total = 0; for (int i = 0; i < string.length(); i++) { String s = string.charAt(i) + ""; Integer value = map.get(s); if (value == null) { value = 0; } longstring = longstring.concat...
private void firstAnimation() { loadMapping(); calculation = new String(""); numbers = new String(""); String longstring = new String(""); total = 0; for (int i = 0; i < string.length(); i++) { String s = string.charAt(i) + ""; Integer value = map.get(s); if (value == null) { value = 0; } longstring = longstring.concat...
Sylladex--Captchalogue-Deck
positive
435,070
public void updateFieldsWhenEditsChange() { boolean hasEdits = !edits.isEmpty(); if (sizeSlider == null) { return; } String lockedMessage = " This is locked because this map has edits."; sizeSlider.setEnabled(!hasEdits); if (hasEdits) { if (lblSize != null) { addToTooltip(lblSize, lockedMessage); } addToTooltip(sizeSli...
public void updateFieldsWhenEditsChange() { boolean hasEdits = !edits.isEmpty(); if (sizeSlider == null) { return; } String lockedMessage = " This is locked because this map has edits."; sizeSlider.setEnabled(!hasEdits); if (hasEdits) { if (lblSize != null) { addToTooltip(lblSize, lockedMessage); } addToTooltip(sizeSli...
nortantis
positive
435,071
public Criteria andSNameIn(List<String> values) { if (values == null) { throw new RuntimeException("Value for " + "sName" + " cannot be null"); } criteria.add(new Criterion("s_name in", values)); return (Criteria) this; }
public Criteria andSNameIn(List<String> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "sName" + " cannot be null"); } criteria.add(new Criterion("s_name in", values)); </DeepExtract> return (Criteria) this; }
webike
positive
435,074
public Criteria andEndTimeNotEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "endTime" + " cannot be null"); } criteria.add(new Criterion("endTime <>", value)); return (Criteria) this; }
public Criteria andEndTimeNotEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "endTime" + " cannot be null"); } criteria.add(new Criterion("endTime <>", value)); </DeepExtract> return (Criteria) this; }
jtt808-simulator
positive
435,076
public String checkIfUserPresent(String userName) throws UnsupportedEncodingException, ParserConfigurationException, IOException, SAXException, DASTProxyException, XPathExpressionException { LOGGER.debug("Inside checkIfUserPresent....1"); final XPathFactory factory = XPathFactory.newInstance(); final XPath xpath = fact...
public String checkIfUserPresent(String userName) throws UnsupportedEncodingException, ParserConfigurationException, IOException, SAXException, DASTProxyException, XPathExpressionException { LOGGER.debug("Inside checkIfUserPresent....1"); final XPathFactory factory = XPathFactory.newInstance(); final XPath xpath = fact...
DASTProxy
positive
435,077
private void init(AttributeSet attrs, int defStyle) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.AVLoadingIndicatorView); mIndicatorId = a.getInt(R.styleable.AVLoadingIndicatorView_indicator, BallPulse); mIndicatorColor = a.getColor(R.styleable.AVLoadingIndicatorView_indicator_color, Color.WH...
private void init(AttributeSet attrs, int defStyle) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.AVLoadingIndicatorView); mIndicatorId = a.getInt(R.styleable.AVLoadingIndicatorView_indicator, BallPulse); mIndicatorColor = a.getColor(R.styleable.AVLoadingIndicatorView_indicator_color, Color.WH...
AndroidPlayground
positive
435,078
public IToken nextToken() { if (mPosition >= mEnd) { return Token.EOF; } mTokenStart = mPosition; Token result; switch(lookahead()) { case '#': { consume(); if (lookahead() == '|') { consume(); result = scanMultilineComment(); } else if (lookahead() == '<') { result = scanHereString(); } else if (lookahead() == ';') { ...
public IToken nextToken() { if (mPosition >= mEnd) { return Token.EOF; } mTokenStart = mPosition; <DeepExtract> Token result; switch(lookahead()) { case '#': { consume(); if (lookahead() == '|') { consume(); result = scanMultilineComment(); } else if (lookahead() == '<') { result = scanHereString(); } else if (lookahea...
SchemeScript
positive
435,079
public Criteria andHasReadGreaterThan(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "hasRead" + " cannot be null"); } criteria.add(new Criterion("has_read >", value)); return (Criteria) this; }
public Criteria andHasReadGreaterThan(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "hasRead" + " cannot be null"); } criteria.add(new Criterion("has_read >", value)); </DeepExtract> return (Criteria) this; }
chat-software
positive
435,080
private void lap(Workout workout, List<Snapshot> snapshots) throws IOException { serializer.startTag(null, "Lap"); serializer.attribute(null, "StartTime", dateFormat.format(workout.start.get())); serializer.startTag(null, "TotalTimeSeconds"); if (workout.duration.get().toString() != null) { serializer.text(workout.dura...
private void lap(Workout workout, List<Snapshot> snapshots) throws IOException { serializer.startTag(null, "Lap"); serializer.attribute(null, "StartTime", dateFormat.format(workout.start.get())); serializer.startTag(null, "TotalTimeSeconds"); if (workout.duration.get().toString() != null) { serializer.text(workout.dura...
coxswain
positive
435,081
@Override protected void onPostExecute(Void result) { m_progressDialog.hide(); m_progressDialog.dismiss(); m_progressDialog = null; if (m_gotoLibrary) { m_libraryInfo.setFiles(null); showDirectory(m_libraryInfo, 0, true, true); ((FileBrowser) getContext()).refresh(true); } super.onPostExecute(result); }
@Override protected void onPostExecute(Void result) { m_progressDialog.hide(); m_progressDialog.dismiss(); m_progressDialog = null; <DeepExtract> if (m_gotoLibrary) { m_libraryInfo.setFiles(null); showDirectory(m_libraryInfo, 0, true, true); ((FileBrowser) getContext()).refresh(true); } </DeepExtract> super.onPostExecu...
NomadReader
positive
435,082
@Override public void send(ConfirmationEmailMessage confirmationEmailMessage) { LOG.info("Message to <{}> exchange. Message content: {}", REGISTER_CONFIRMATION_EMAIL_ROUTING_KEY, toJsonOrReferenceString(confirmationEmailMessage)); this.amqpMessageService.send(REGISTER_CONFIRMATION_EMAIL_ROUTING_KEY, confirmationEmailMe...
@Override public void send(ConfirmationEmailMessage confirmationEmailMessage) { <DeepExtract> LOG.info("Message to <{}> exchange. Message content: {}", REGISTER_CONFIRMATION_EMAIL_ROUTING_KEY, toJsonOrReferenceString(confirmationEmailMessage)); this.amqpMessageService.send(REGISTER_CONFIRMATION_EMAIL_ROUTING_KEY, confi...
ICOnator-backend
positive
435,085
public void onClick(View v) { if (v != null) { v.vibrate(20); } if (Tools.isMediaMounted()) { Intent i = new Intent(); i.setClass(MenuHome.this, MenuFileChooser.class); startActivityForResult(i, SELECT_MUSIC); } }
public void onClick(View v) { <DeepExtract> if (v != null) { v.vibrate(20); } </DeepExtract> if (Tools.isMediaMounted()) { Intent i = new Intent(); i.setClass(MenuHome.this, MenuFileChooser.class); startActivityForResult(i, SELECT_MUSIC); } }
Beats
positive
435,086
public static Method getFieldGettersMethod(Class<?> clazz, String fieldName) { if (null == clazz || StringUtils.isEmpty(fieldName)) { return null; } return getAllMethods(clazz, withModifier(Modifier.PUBLIC), withName(buildGetters(fieldName)), withParametersCount(0)).parallelStream().findFirst().orElse(null); }
public static Method getFieldGettersMethod(Class<?> clazz, String fieldName) { if (null == clazz || StringUtils.isEmpty(fieldName)) { return null; } <DeepExtract> return getAllMethods(clazz, withModifier(Modifier.PUBLIC), withName(buildGetters(fieldName)), withParametersCount(0)).parallelStream().findFirst().orElse(nul...
spring-boot-start-current
positive
435,088
public void sig() { boolean holding = Thread.holdsLock(lock); if (!holding) { l(); } if (false && name != null && name.length() > 0) { Log.d("LOCK:" + name, "SIG"); } con.signalAll(); if (!holding) { ul(); } }
public void sig() { boolean holding = Thread.holdsLock(lock); if (!holding) { l(); } <DeepExtract> if (false && name != null && name.length() > 0) { Log.d("LOCK:" + name, "SIG"); } </DeepExtract> con.signalAll(); if (!holding) { ul(); } }
Mooshimeter-AndroidApp
positive
435,090
@Override public void run() { List<Listener> listenersCpy = new ArrayList<>(mListeners); for (Listener listener : listenersCpy) { listener.onDroneConnectionChanged(mDroneState); } }
@Override public void run() { <DeepExtract> List<Listener> listenersCpy = new ArrayList<>(mListeners); for (Listener listener : listenersCpy) { listener.onDroneConnectionChanged(mDroneState); } </DeepExtract> }
MyoParrot
positive
435,092
public void addChild(XMLNode node) { this.parent = this; this.children.add(node); }
public void addChild(XMLNode node) { <DeepExtract> this.parent = this; </DeepExtract> this.children.add(node); }
rinzo-xml-editor
positive
435,093
@Override public boolean runTest() throws Exception { System.out.println("============== testRestApiExample()"); System.out.println("-------------- Updating installations"); List<String> channels = Arrays.asList("", "foo"); currentInstallation.subscribeToChannels(channels); currentInstallation.save(); ParseInstallation...
@Override public boolean runTest() throws Exception { System.out.println("============== testRestApiExample()"); System.out.println("-------------- Updating installations"); List<String> channels = Arrays.asList("", "foo"); currentInstallation.subscribeToChannels(channels); currentInstallation.save(); ParseInstallation...
parse4cn1
positive
435,094
@Override public EarningsBreakdownCanonicalDescription read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); for (EarningsBreakdownCanonicalDescription b : EarningsBreakdownCanonicalDescription.values()) { if (b.value.equals(value)) { return b; } } return null; }
@Override public EarningsBreakdownCanonicalDescription read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); <DeepExtract> for (EarningsBreakdownCanonicalDescription b : EarningsBreakdownCanonicalDescription.values()) { if (b.value.equals(value)) { return b; } } return null; </D...
plaid-java
positive
435,096
private void init() { OkHttpClient.Builder builder = new OkHttpClient.Builder(); Interceptor loggingIntercept = new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); long t1 = System.nanoTime(); Log.e("TAG", String.format("Sending request %s on %s%n...
private void init() { OkHttpClient.Builder builder = new OkHttpClient.Builder(); Interceptor loggingIntercept = new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); long t1 = System.nanoTime(); Log.e("TAG", String.format("Sending request %s on %s%n...
Red
positive
435,098
private void setMoo(String moo) { CredentialStorage.moo = moo; propMoo.set(moo); CredentialStorage.isMooValid = true; propIsMooValid.set(true); cfg.save(); }
private void setMoo(String moo) { CredentialStorage.moo = moo; propMoo.set(moo); <DeepExtract> CredentialStorage.isMooValid = true; propIsMooValid.set(true); cfg.save(); </DeepExtract> }
Cowlection
positive
435,099
public static void main(String[] args) { Unsettled u = new Unsettled(); System.out.println("Unsettled!"); }
public static void main(String[] args) { Unsettled u = new Unsettled(); <DeepExtract> System.out.println("Unsettled!"); </DeepExtract> }
Eckel
positive
435,100
@Override public ServletResponseContent createDocumentForLastTurn(VoiceXmlLastTurn lastTurn, HttpServletRequest request, HttpServletResponse response, VoiceXmlDialogueContext voiceXmlDialogueContext) throws StepRendererException { Assert.notNull(lastTurn, "turn"); Document voiceXmlDocument; try { voiceXmlDocument = las...
@Override public ServletResponseContent createDocumentForLastTurn(VoiceXmlLastTurn lastTurn, HttpServletRequest request, HttpServletResponse response, VoiceXmlDialogueContext voiceXmlDialogueContext) throws StepRendererException { <DeepExtract> Assert.notNull(lastTurn, "turn"); Document voiceXmlDocument; try { voiceXml...
rivr
positive
435,101
@Override protected void textFieldChangedHandler() { switch(layer.getProperties().getInput().getType()) { case ONE_DIMENSION: layer.getProperties().getInput().setX(TextFieldUtil.parseInteger(textFieldInputSize1D)); break; case ONE_DIMENSION_WITH_CHANNEL: layer.getProperties().getInput().setX(TextFieldUtil.parseInteger(...
@Override protected void textFieldChangedHandler() { switch(layer.getProperties().getInput().getType()) { case ONE_DIMENSION: layer.getProperties().getInput().setX(TextFieldUtil.parseInteger(textFieldInputSize1D)); break; case ONE_DIMENSION_WITH_CHANNEL: layer.getProperties().getInput().setX(TextFieldUtil.parseInteger(...
Dluid
positive
435,103
@Override public void run() { List<String> subFiles = getSubfiles(mCurrentFolder); mRv.setAdapter(new MyGalleryAdapter(this, subFiles, mCurrentFolder.getAbsolutePath())); mRv.setLayoutManager(new StaggeredGridLayoutManager(SPAN_COUNT, StaggeredGridLayoutManager.VERTICAL)); mTvDirName.setText(mCurrentFolder.getName()); ...
@Override public void run() { <DeepExtract> List<String> subFiles = getSubfiles(mCurrentFolder); mRv.setAdapter(new MyGalleryAdapter(this, subFiles, mCurrentFolder.getAbsolutePath())); mRv.setLayoutManager(new StaggeredGridLayoutManager(SPAN_COUNT, StaggeredGridLayoutManager.VERTICAL)); mTvDirName.setText(mCurrentFolde...
PlayTogether
positive
435,104
public static FileObject getControllerDirectory(PhpModule phpModule) { if (phpModule == null) { return null; } String path = String.format(FUEL_APP_CLASSES_CONTROLLER_DIR, FuelPhpPreferences.getFuelName(phpModule)); FileObject sourceDirectory = phpModule.getSourceDirectory(); if (sourceDirectory == null) { return null;...
public static FileObject getControllerDirectory(PhpModule phpModule) { <DeepExtract> if (phpModule == null) { return null; } String path = String.format(FUEL_APP_CLASSES_CONTROLLER_DIR, FuelPhpPreferences.getFuelName(phpModule)); FileObject sourceDirectory = phpModule.getSourceDirectory(); if (sourceDirectory == null) ...
fuelphp-netbeans
positive
435,108
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setHeader("Pragma", "no-cache"); String link = request.getRequestURI(); String alias = request.getParameter(ALIAS); ConnectionPoolDefinitionIF def = null; if (alias != null) { try { def = Prox...
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { <DeepExtract> response.setHeader("Pragma", "no-cache"); String link = request.getRequestURI(); String alias = request.getParameter(ALIAS); ConnectionPoolDefinitionIF def = null; if (alias != null) { tr...
proxool
positive
435,109
@FXML private void doLocal() { if (showFileChooser(true) != null && !showFileChooser(true).getFilenames().isEmpty()) { eventService.loadFiles(showFileChooser(true).getFilenames(), showFileChooser(true).getFilter(), EventService.FILE_TYPE_LOCAL); } }
@FXML private void doLocal() { <DeepExtract> if (showFileChooser(true) != null && !showFileChooser(true).getFilenames().isEmpty()) { eventService.loadFiles(showFileChooser(true).getFilenames(), showFileChooser(true).getFilter(), EventService.FILE_TYPE_LOCAL); } </DeepExtract> }
CloudTrailViewer
positive
435,110
@Test public void uploadFileTest4() throws IOException { String path = ClassLoader.getSystemResource("123456.txt").getPath(); StorePath storePath = storageClient.uploadFile(path, "txt"); logger.info("==========uploadFileTest4()######fullPath : " + storePath.getFullPath()); resultFileId.add(storePath.getFullPath()); }
@Test public void uploadFileTest4() throws IOException { String path = ClassLoader.getSystemResource("123456.txt").getPath(); StorePath storePath = storageClient.uploadFile(path, "txt"); logger.info("==========uploadFileTest4()######fullPath : " + storePath.getFullPath()); <DeepExtract> resultFileId.add(storePath.getFu...
fastdfs-client
positive
435,111
public void startTimer() { mView.startTimer(); if (countDown < 0) { currentTime = countDown * frame_millis + manualOffset; nextFrame(); countDown++; } else if (countDown == 0) { mp.startPlaying(); travelOffset = h.travel_offset_ms(); musicCurrentPosition = mp.getCurrentPosition(); musicStartTime = musicCurrentPosition ...
public void startTimer() { mView.startTimer(); <DeepExtract> if (countDown < 0) { currentTime = countDown * frame_millis + manualOffset; nextFrame(); countDown++; } else if (countDown == 0) { mp.startPlaying(); travelOffset = h.travel_offset_ms(); musicCurrentPosition = mp.getCurrentPosition(); musicStartTime = musicCu...
Beats
positive
435,112
@Before public void setUp() throws Exception { tool = new RepositoryTool(this.getClass()); rootDir = tool.getRootDir(); context = tool.getContext(); cut = new Fim(); cut.run(new String[] { "init", "-y" }, context); tool.createOneFile(); }
@Before public void setUp() throws Exception { tool = new RepositoryTool(this.getClass()); rootDir = tool.getRootDir(); context = tool.getContext(); cut = new Fim(); <DeepExtract> cut.run(new String[] { "init", "-y" }, context); tool.createOneFile(); </DeepExtract> }
fim
positive
435,115
protected List<String> getExpectedList(final String expectedFile) { List<String> expectedList; try { InputStream is = ITestBase.class.getResourceAsStream(expectedFile); expectedList = IOUtils.readLines(is, "UTF-8"); } catch (IOException e) { expectedList = new ArrayList<String>(); } try { expectedList = substituteVaria...
protected List<String> getExpectedList(final String expectedFile) { <DeepExtract> List<String> expectedList; try { InputStream is = ITestBase.class.getResourceAsStream(expectedFile); expectedList = IOUtils.readLines(is, "UTF-8"); } catch (IOException e) { expectedList = new ArrayList<String>(); } </DeepExtract> try { e...
scoopi-scraper
positive
435,116
@Override public void setComplement(String newComplement) { clearComplements(); addObject(newComplement); }
@Override public void setComplement(String newComplement) { <DeepExtract> clearComplements(); addObject(newComplement); </DeepExtract> }
SimpleNLG-EnFr
positive
435,117
public long hashBooleans(@NotNull boolean[] input, int off, int len) { if (len < 0 || off < 0 || off + len > input.length || off + len < 0) throw new IndexOutOfBoundsException(); return hash(booleanArrayAccessor().handle(input), booleanArrayAccessor().access(), booleanArrayAccessor().offset(input, off), booleanArrayAcc...
public long hashBooleans(@NotNull boolean[] input, int off, int len) { if (len < 0 || off < 0 || off + len > input.length || off + len < 0) throw new IndexOutOfBoundsException(); <DeepExtract> return hash(booleanArrayAccessor().handle(input), booleanArrayAccessor().access(), booleanArrayAccessor().offset(input, off), b...
Chronicle-Algorithms
positive
435,118
public void showHome() { ctx.getHomePanel().refresh(); ria.showHome(); homeButton.setStyleName("mf-menuButtonOff"); employeesButton.setStyleName("mf-menuButtonOff"); periodPreferencesButton.setStyleName("mf-menuButtonOff"); periodSolutionsButton.setStyleName("mf-menuButtonOff"); settingsButton.setStyleName("mf-menuButt...
public void showHome() { ctx.getHomePanel().refresh(); ria.showHome(); <DeepExtract> homeButton.setStyleName("mf-menuButtonOff"); employeesButton.setStyleName("mf-menuButtonOff"); periodPreferencesButton.setStyleName("mf-menuButtonOff"); periodSolutionsButton.setStyleName("mf-menuButtonOff"); settingsButton.setStyleNam...
shifts-solver
positive
435,120
public void acceptVisitor(TmlVisitor visitor) throws TeslaSchemaException, IOException { String namespace = this.getTml().getNamespace() == null ? null : this.getTml().getNamespace().getName(); for (Object t : this.getTml().getTypes().getClazzOrEnum()) { if (t instanceof Tml.Types.Class) { Tml.Types.Class clss = (Tml.T...
public void acceptVisitor(TmlVisitor visitor) throws TeslaSchemaException, IOException { <DeepExtract> String namespace = this.getTml().getNamespace() == null ? null : this.getTml().getNamespace().getName(); for (Object t : this.getTml().getTypes().getClazzOrEnum()) { if (t instanceof Tml.Types.Class) { Tml.Types.Class...
tesla
positive
435,121
public QueryCondition<T, Byte> or(byte x) { query.addConditionToken(ConditionAndOr.OR); A alias = query.getPrimitiveAliasByValue(x); if (alias == null) { return new QueryCondition<T, A>(query, x); } return new QueryCondition<T, A>(query, alias); }
public QueryCondition<T, Byte> or(byte x) { <DeepExtract> query.addConditionToken(ConditionAndOr.OR); A alias = query.getPrimitiveAliasByValue(x); if (alias == null) { return new QueryCondition<T, A>(query, x); } return new QueryCondition<T, A>(query, alias); </DeepExtract> }
iciql
positive
435,122
@Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { if (!(msg instanceof MqttMessage)) { return; } MqttMessage msg = (MqttMessage) msg; String clientID = NettyUtils.clientID(ctx.channel()); MqttMessageType messageType = msg.fixedHeader().messageType(); switch(me...
@Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { <DeepExtract> if (!(msg instanceof MqttMessage)) { return; } MqttMessage msg = (MqttMessage) msg; String clientID = NettyUtils.clientID(ctx.channel()); MqttMessageType messageType = msg.fixedHeader().messageTyp...
moquette
positive
435,123
@Nonnull public static InetAddress decrement(@Nonnull InetAddress in) { try { return InetAddress.getByAddress(decrement(in.getAddress())); } catch (UnknownHostException e) { throw Throwables.propagate(e); } }
@Nonnull public static InetAddress decrement(@Nonnull InetAddress in) { <DeepExtract> try { return InetAddress.getByAddress(decrement(in.getAddress())); } catch (UnknownHostException e) { throw Throwables.propagate(e); } </DeepExtract> }
dhcp4j
positive
435,126
public void mouseReleased(java.awt.event.MouseEvent evt) { Collection<? extends Note> notes = result.allInstances(); if (null != lastNoteSeen) { final String sourceurl = lastNoteSeen.getSourceurl(); if (null != sourceurl) { try { URL url = new URL(sourceurl); URI uri = new URI(url.getProtocol(), url.getHost(), url.getP...
public void mouseReleased(java.awt.event.MouseEvent evt) { <DeepExtract> Collection<? extends Note> notes = result.allInstances(); if (null != lastNoteSeen) { final String sourceurl = lastNoteSeen.getSourceurl(); if (null != sourceurl) { try { URL url = new URL(sourceurl); URI uri = new URI(url.getProtocol(), url.getHo...
en4j
positive
435,128
public void run() { Thread.currentThread().setName("thread-two"); synchronized (this) { method2(); } }
public void run() { Thread.currentThread().setName("thread-two"); <DeepExtract> synchronized (this) { method2(); } </DeepExtract> }
wildfly-samples
positive
435,129
@Override public void onChange(byte[] data) { OtaStatus.OtaCmd cmdType = this.valueToCmd(data[2] & 255); if (cmdType == null) { this.otaPrintBytes(data, "Notify data: "); this.serErrorCode(OtaStatus.OtaResult.OTA_RESULT_RECEIVED_INVALID_PACKET); } else { switch(data[3]) { case 0: this.serErrorCode(OtaStatus.OtaResult.O...
@Override public void onChange(byte[] data) { <DeepExtract> OtaStatus.OtaCmd cmdType = this.valueToCmd(data[2] & 255); if (cmdType == null) { this.otaPrintBytes(data, "Notify data: "); this.serErrorCode(OtaStatus.OtaResult.OTA_RESULT_RECEIVED_INVALID_PACKET); } else { switch(data[3]) { case 0: this.serErrorCode(OtaStat...
Android-BLE
positive
435,130
public void setLeftBottomCorner(int leftBottomCorner) { mLeftBottomCorner = leftBottomCorner; mCorners = new float[] { mLeftTopCorner, mLeftTopCorner, mRightTopCorner, mRightTopCorner, mRightBottomCorner, mRightBottomCorner, mLeftBottomCorner, mLeftBottomCorner }; addRoundRectPath(getWidth(), getHeight()); invalidate()...
public void setLeftBottomCorner(int leftBottomCorner) { mLeftBottomCorner = leftBottomCorner; <DeepExtract> mCorners = new float[] { mLeftTopCorner, mLeftTopCorner, mRightTopCorner, mRightTopCorner, mRightBottomCorner, mRightBottomCorner, mLeftBottomCorner, mLeftBottomCorner }; addRoundRectPath(getWidth(), getHeight())...
MeiWidgetView
positive
435,131
protected void createStaticBlock() { write().body().staticInvoke(cls(), "write").arg(_this().ref("value")).arg(ref("out")); writeConstructor().body()._return(cls().staticInvoke("writeConstructor").arg(_this().ref("value")).arg(ref("out"))); writeBody().body().staticInvoke(cls(), "writeBody").arg(ref("formatCode")).arg(...
protected void createStaticBlock() { <DeepExtract> write().body().staticInvoke(cls(), "write").arg(_this().ref("value")).arg(ref("out")); writeConstructor().body()._return(cls().staticInvoke("writeConstructor").arg(_this().ref("value")).arg(ref("out"))); writeBody().body().staticInvoke(cls(), "writeBody").arg(ref("form...
fuse-extra
positive
435,132
public <T> T loadFirst(Map<String, Object> queryParameter, Class<T> entityClass) { Page<T> page = new Page<T>(1, 0); Collection<T> list; DetachedCriteria detachedCriteria = buildDetachedCriteria(queryParameter, null, null, entityClass); if (page != null) { this.pagingQuery(page, detachedCriteria); list = page.getEntiti...
public <T> T loadFirst(Map<String, Object> queryParameter, Class<T> entityClass) { Page<T> page = new Page<T>(1, 0); <DeepExtract> Collection<T> list; DetachedCriteria detachedCriteria = buildDetachedCriteria(queryParameter, null, null, entityClass); if (page != null) { this.pagingQuery(page, detachedCriteria); list = ...
coke
positive
435,133
public void setInitialSearchParameters(SearchParameters searchParameters) { engineIsWhite = board.getTurn(); startTime = System.currentTimeMillis(); nodeCount = 0; stop = false; this.searchParameters = searchParameters; thinkToNodes = searchParameters.getNodes(); thinkToDepth = searchParameters.getDepth(); thinkToTime ...
public void setInitialSearchParameters(SearchParameters searchParameters) { engineIsWhite = board.getTurn(); startTime = System.currentTimeMillis(); nodeCount = 0; stop = false; <DeepExtract> this.searchParameters = searchParameters; thinkToNodes = searchParameters.getNodes(); thinkToDepth = searchParameters.getDepth()...
carballo
positive
435,134
@Override public void createNewFiles(final String host, final String[] fileNames, final String[] fileContents, final String[] paths) { if (fileNames.length != fileContents.length || fileContents.length != paths.length) { throw new IllegalArgumentException(String.format("invalid arguments: length of fileNames, fileConte...
@Override public void createNewFiles(final String host, final String[] fileNames, final String[] fileContents, final String[] paths) { if (fileNames.length != fileContents.length || fileContents.length != paths.length) { throw new IllegalArgumentException(String.format("invalid arguments: length of fileNames, fileConte...
cymbal
positive
435,135
@Get public String getHandler(String jsonRequest) { Map<String, Map<String, Object>> entries = (Map<String, Map<String, Object>>) getContext().getAttributes().get("entries"); ForkJoinPool pool = (ForkJoinPool) getContext().getAttributes().get("pool"); ObserverTask<Integer, RestApiTask> observerTask = (ObserverTask<Inte...
@Get public String getHandler(String jsonRequest) { <DeepExtract> Map<String, Map<String, Object>> entries = (Map<String, Map<String, Object>>) getContext().getAttributes().get("entries"); ForkJoinPool pool = (ForkJoinPool) getContext().getAttributes().get("pool"); ObserverTask<Integer, RestApiTask> observerTask = (Obs...
warp
positive
435,137
@Override protected void setIndicators(WidgetEntry eventEntry, RemoteViews rv) { CalendarEntry entry = (CalendarEntry) eventEntry; boolean showIndicator = entry.isAlarmActive() && getSettings().getIndicateAlerts(); for (AlarmIndicatorScaled indicator : AlarmIndicatorScaled.values()) { setIndicator(entry, rv, showIndica...
@Override protected void setIndicators(WidgetEntry eventEntry, RemoteViews rv) { CalendarEntry entry = (CalendarEntry) eventEntry; boolean showIndicator = entry.isAlarmActive() && getSettings().getIndicateAlerts(); for (AlarmIndicatorScaled indicator : AlarmIndicatorScaled.values()) { setIndicator(entry, rv, showIndica...
calendar-widget
positive
435,138
@NotNull @Override public PsiMember createField(@NotNull MemberCreationParameters parameters) { StringBuilder methodText = new StringBuilder(); methodText.append("def ").append(parameters.withSignature(getterFor(parameters.member.name), parameters.member.type).member.name); if (!parameters.withSignature(getterFor(param...
@NotNull @Override public PsiMember createField(@NotNull MemberCreationParameters parameters) { <DeepExtract> StringBuilder methodText = new StringBuilder(); methodText.append("def ").append(parameters.withSignature(getterFor(parameters.member.name), parameters.member.type).member.name); if (!parameters.withSignature(g...
idea-concordion-support
positive
435,139
public static void main(String[] args) { Graph graph = new Graph(); graph.addvertex("0"); graph.addvertex("1"); graph.addvertex("2"); graph.addvertex("3"); graph.addvertex("4"); graph.addvertex("5"); graph.addvertex("6"); graph.addvertex("7"); graph.addvertex("8"); graph.addedge("0", "2", 1); graph.addedge("0", "5", 1)...
public static void main(String[] args) { Graph graph = new Graph(); graph.addvertex("0"); graph.addvertex("1"); graph.addvertex("2"); graph.addvertex("3"); graph.addvertex("4"); graph.addvertex("5"); graph.addvertex("6"); graph.addvertex("7"); graph.addvertex("8"); graph.addedge("0", "2", 1); graph.addedge("0", "5", 1)...
Java-Solutions
positive
435,140
private void deleteGroupAccessRules(final Group group) { logger.debug("in deleteGroupAccessRules()"); final List<AccessRule> deleteList = new ArrayList<>(); for (final AccessRule rule : accessRules) { if (rule.getGroup() != null && rule.getGroup().equals(group)) { logger.debug("remove group " + rule.getGroup().getName(...
private void deleteGroupAccessRules(final Group group) { logger.debug("in deleteGroupAccessRules()"); final List<AccessRule> deleteList = new ArrayList<>(); for (final AccessRule rule : accessRules) { if (rule.getGroup() != null && rule.getGroup().equals(group)) { logger.debug("remove group " + rule.getGroup().getName(...
suafe
positive
435,141
public Rule buildRule(Context c) { String html = "I" + "<sub>" + LOZENGE + "*</sub>"; Variable<Formula> F = new Variable<Formula>("F"); FormulaReference fref = new FormulaReference(F, c.getFormulaCodeMap().code(F)); Variable<Agent> i = new Variable<Agent>("i"); AgentReference iref = new AgentReference(i, c.getAgentCode...
public Rule buildRule(Context c) { <DeepExtract> String html = "I" + "<sub>" + LOZENGE + "*</sub>"; Variable<Formula> F = new Variable<Formula>("F"); FormulaReference fref = new FormulaReference(F, c.getFormulaCodeMap().code(F)); Variable<Agent> i = new Variable<Agent>("i"); AgentReference iref = new AgentReference(i, ...
oops
positive
435,144
public String placeLimitOrder(LimitOrder limitOrder) { if (!useMargin(limitOrder)) { BigDecimal counterDelta = getCounterDelta(limitOrder); BigDecimal baseDelta = getBaseDelta(limitOrder); if (exchange.getPaperAccountService().getBalance(limitOrder.getCurrencyPair().counter).add(counterDelta).compareTo(BigDecimal.ZERO)...
public String placeLimitOrder(LimitOrder limitOrder) { <DeepExtract> if (!useMargin(limitOrder)) { BigDecimal counterDelta = getCounterDelta(limitOrder); BigDecimal baseDelta = getBaseDelta(limitOrder); if (exchange.getPaperAccountService().getBalance(limitOrder.getCurrencyPair().counter).add(counterDelta).compareTo(Bi...
arbitrader
positive
435,147
private void internalClearErrors(BTNode node) { internalClearErrors(this.root); for (BTNode child : node.getChildren()) { internalClearErrors(child); } }
private void internalClearErrors(BTNode node) { <DeepExtract> internalClearErrors(this.root); </DeepExtract> for (BTNode child : node.getChildren()) { internalClearErrors(child); } }
jbt
positive
435,148
private JsonObject _get(String url) throws IOException { HttpGet req = new HttpGet(url); req.addHeader("Authorization", apiKey); CloseableHttpResponse res = client.execute(req); try { if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { HttpEntity entity = res.getEntity(); if (entity != null) { ContentType co...
private JsonObject _get(String url) throws IOException { HttpGet req = new HttpGet(url); req.addHeader("Authorization", apiKey); CloseableHttpResponse res = client.execute(req); <DeepExtract> try { if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { HttpEntity entity = res.getEntity(); if (entity != null) { ...
tigase-extension
positive
435,149
@Override public void animationFinished(ImagePlus result) { this.contrastPanel.setRenderingSettings(renderer.getRenderingState().clone().getChannelProperties()); this.contrastPanel.setBackground(renderer.getRenderingState().getBackgroundColor()); this.contrastPanel.setRenderingAlgorithm(renderer.getRenderingState().get...
@Override public void animationFinished(ImagePlus result) { this.contrastPanel.setRenderingSettings(renderer.getRenderingState().clone().getChannelProperties()); this.contrastPanel.setBackground(renderer.getRenderingState().getBackgroundColor()); this.contrastPanel.setRenderingAlgorithm(renderer.getRenderingState().get...
3Dscript
positive
435,150
public synchronized void increment(int count) throws DecodingException { counter += count; if (counter >= limit) { throw new DecodingException(new TooLongFrameException(errorMessage + "[" + (counter - limit) + "] counts")); } }
public synchronized void increment(int count) throws DecodingException { counter += count; <DeepExtract> if (counter >= limit) { throw new DecodingException(new TooLongFrameException(errorMessage + "[" + (counter - limit) + "] counts")); } </DeepExtract> }
netty-icap
positive
435,151
@TimberLogTask(name = EVENT) private void testOngoingTask1(String[] taskId1Arr, String[] taskId2Arr, String[] ongoingTaskIdArr, String ctx, String ctx1, String ctx2, String ctx3, String metric1, String metric2, String metric3, String text1, String text2, String text3, String string1, String string2, String string3, Str...
@TimberLogTask(name = EVENT) private void testOngoingTask1(String[] taskId1Arr, String[] taskId2Arr, String[] ongoingTaskIdArr, String ctx, String ctx1, String ctx2, String ctx3, String metric1, String metric2, String metric3, String text1, String text2, String text3, String string1, String string2, String string3, Str...
Timbermill
positive
435,152
public void addGoldValue(int goldValue) { this._goldVal += goldValue; _goldValLabel.setText(String.valueOf(_goldVal)); for (StatusObserver observer : _observers) { observer.onNotify(_goldVal, StatusObserver.StatusEvent.UPDATED_GP); } }
public void addGoldValue(int goldValue) { this._goldVal += goldValue; _goldValLabel.setText(String.valueOf(_goldVal)); <DeepExtract> for (StatusObserver observer : _observers) { observer.onNotify(_goldVal, StatusObserver.StatusEvent.UPDATED_GP); } </DeepExtract> }
BludBourne
positive
435,153
private void open(File walletFile) { EosWallet eosWallet = new EosWallet(); eosWallet.setWalletFilePath(walletFile.getAbsolutePath()); String fileName = walletFile.getName(); int extPos = fileName.lastIndexOf(EOS_WALLET_FILE_EXT); if (extPos < 0) { nameWithoutExt = fileName; } else { nameWithoutExt = fileName.substring...
private void open(File walletFile) { EosWallet eosWallet = new EosWallet(); eosWallet.setWalletFilePath(walletFile.getAbsolutePath()); String fileName = walletFile.getName(); int extPos = fileName.lastIndexOf(EOS_WALLET_FILE_EXT); if (extPos < 0) { nameWithoutExt = fileName; } else { nameWithoutExt = fileName.substring...
EosCommander
positive
435,154
public void setEx(String key, Object value, Duration timeout) { try { if (timeout > 0) { redisTemplate.opsForValue().set(key, value, timeout, TimeUnit.SECONDS); } else { set(key, value); } return true; } catch (Exception e) { e.printStackTrace(); return false; } }
public void setEx(String key, Object value, Duration timeout) { <DeepExtract> try { if (timeout > 0) { redisTemplate.opsForValue().set(key, value, timeout, TimeUnit.SECONDS); } else { set(key, value); } return true; } catch (Exception e) { e.printStackTrace(); return false; } </DeepExtract> }
Bright-Cloud
positive
435,155
public Identifier toPhysicalSequenceName(Identifier name, JdbcEnvironment jdbcEnvironment) { if (name == null) { return null; } else { StringBuilder builder = new StringBuilder(name.getText().replace('.', '_')); for (int i = 1; i < builder.length() - 1; ++i) { if (this.isUnderscoreRequired(builder.charAt(i - 1), builde...
public Identifier toPhysicalSequenceName(Identifier name, JdbcEnvironment jdbcEnvironment) { <DeepExtract> if (name == null) { return null; } else { StringBuilder builder = new StringBuilder(name.getText().replace('.', '_')); for (int i = 1; i < builder.length() - 1; ++i) { if (this.isUnderscoreRequired(builder.charAt(...
enumdemo
positive
435,157
public void fileUpdated(File f) { if (!f.exists()) { levelDatStatusBar.setText("No level.dat found."); return; } try { FileInputStream is = new FileInputStream(f); try { NBTInputStream nis = NBTInputStream.gzipOpen(is); CompoundTag t = (CompoundTag) nis.readTag(); CompoundTag d = (CompoundTag) t.getValue().get("Data");...
public void fileUpdated(File f) { <DeepExtract> if (!f.exists()) { levelDatStatusBar.setText("No level.dat found."); return; } try { FileInputStream is = new FileInputStream(f); try { NBTInputStream nis = NBTInputStream.gzipOpen(is); CompoundTag t = (CompoundTag) nis.readTag(); CompoundTag d = (CompoundTag) t.getValue(...
TMCMG
positive
435,158
public String getAsString(EnumSet<SizeUnit> sizeUnits) { if (sizeUnits == null || sizeUnits.size() == 0) return toString(); StringBuilder sb = new StringBuilder(); MemorySize ms = this; Object[] unitsAsArr = sizeUnits.toArray(); int len = unitsAsArr.length; for (int i = len - 1; i > -1; i--) { prevMs = ms; ms = ms.trun...
public String getAsString(EnumSet<SizeUnit> sizeUnits) { if (sizeUnits == null || sizeUnits.size() == 0) return toString(); StringBuilder sb = new StringBuilder(); MemorySize ms = this; Object[] unitsAsArr = sizeUnits.toArray(); int len = unitsAsArr.length; for (int i = len - 1; i > -1; i--) { prevMs = ms; ms = ms.trun...
linkedin-utils
positive
435,159
public Map[] publisherCampaignStatistics(Integer id, Date startDate, Date endDate) throws XmlRpcException { if (!isValidSessionId()) throw new IllegalArgumentException("Not logined to server"); return publisherService.publisherCampaignStatistics(id, startDate, endDate); }
public Map[] publisherCampaignStatistics(Integer id, Date startDate, Date endDate) throws XmlRpcException { <DeepExtract> if (!isValidSessionId()) throw new IllegalArgumentException("Not logined to server"); </DeepExtract> return publisherService.publisherCampaignStatistics(id, startDate, endDate); }
openx-2.8.8
positive
435,160
public void enable() { CousinWare.INSTANCE.getEventManager().addEventListener(this); MinecraftForge.EVENT_BUS.register(this); visableOnArray = true; anima = 0; enabled = true; if (HackManager.getHackByName("ToggleMsgs").isEnabled() && !this.name.equalsIgnoreCase("clickgui")) { Command.sendClientSideMessage("Enabled " +...
public void enable() { <DeepExtract> </DeepExtract> CousinWare.INSTANCE.getEventManager().addEventListener(this); <DeepExtract> </DeepExtract> MinecraftForge.EVENT_BUS.register(this); <DeepExtract> </DeepExtract> visableOnArray = true; <DeepExtract> </DeepExtract> anima = 0; <DeepExtract> </DeepExtract> enabled = true;...
CousinWare
positive
435,161
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { controller.processChannelEvent(ChannelEvent.newChannelWritabilityChangedEvent(ctx)); }
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { <DeepExtract> controller.processChannelEvent(ChannelEvent.newChannelWritabilityChangedEvent(ctx)); </DeepExtract> }
mallet
positive
435,162
protected void stopProcess() { try { IIPCService selected = getSelectedService(); if (selected != null) { selected.stopRunning(); } } catch (IOException e) { getLogger().log(Level.WARNING, "Unable to stop service...", e); } SwingUtil.TableUtil.clearTable(frame.tIpc); SwingUtil.TableUtil.setRowNumber(frame.tIpc, IPCServ...
protected void stopProcess() { try { IIPCService selected = getSelectedService(); if (selected != null) { selected.stopRunning(); } } catch (IOException e) { getLogger().log(Level.WARNING, "Unable to stop service...", e); } <DeepExtract> SwingUtil.TableUtil.clearTable(frame.tIpc); SwingUtil.TableUtil.setRowNumber(frame...
Repeat
positive
435,163
public String hashSystemEnv() { List<String> system = new ArrayList<String>(); for (Entry<Object, Object> el : System.getProperties().entrySet()) { system.add(el.getKey() + " " + el.getValue()); } Map<String, String> env = System.getenv(); for (Entry<String, String> el : env.entrySet()) { system.add(el.getKey() + " " +...
public String hashSystemEnv() { List<String> system = new ArrayList<String>(); for (Entry<Object, Object> el : System.getProperties().entrySet()) { system.add(el.getKey() + " " + el.getValue()); } Map<String, String> env = System.getenv(); for (Entry<String, String> el : env.entrySet()) { system.add(el.getKey() + " " +...
ekstazi
positive
435,164
public static String toHexString(int value) { if (intToBytes(value) == null || intToBytes(value).length == 0) { return ""; } StringBuffer str = new StringBuffer(intToBytes(value).length * 4); for (int i = 0; i < intToBytes(value).length; i++) { str.append(hex[(intToBytes(value)[i] >> 4) & 0x0f]); str.append(hex[intToBy...
public static String toHexString(int value) { <DeepExtract> if (intToBytes(value) == null || intToBytes(value).length == 0) { return ""; } StringBuffer str = new StringBuffer(intToBytes(value).length * 4); for (int i = 0; i < intToBytes(value).length; i++) { str.append(hex[(intToBytes(value)[i] >> 4) & 0x0f]); str.appe...
hdd
positive
435,165
@Test public void testPropertEnd() { Properties properties = mock(Properties.class); when(properties.getProperty("result-statistics")).thenReturn(MockStatistics.class.getName()); when(properties.getProperty("result-writer")).thenReturn(MockWriter.class.getName()); when(properties.getProperty("result-storage")).thenRetu...
@Test public void testPropertEnd() { Properties properties = mock(Properties.class); when(properties.getProperty("result-statistics")).thenReturn(MockStatistics.class.getName()); when(properties.getProperty("result-writer")).thenReturn(MockWriter.class.getName()); when(properties.getProperty("result-storage")).thenRetu...
arquillian-rusheye
positive
435,166
@Override public void onReceive(Context context, Intent intent) { outgoing = true; String outgoingNumber = getResultData(); String location = phoneLocationEngine.getLocation(this, outgoingNumber); if (TextUtils.isEmpty(location)) { location = getString(R.string.unknown); } tvLocation.setText(location); floatToast.show(...
@Override public void onReceive(Context context, Intent intent) { outgoing = true; String outgoingNumber = getResultData(); <DeepExtract> String location = phoneLocationEngine.getLocation(this, outgoingNumber); if (TextUtils.isEmpty(location)) { location = getString(R.string.unknown); } tvLocation.setText(location); fl...
MobileGuard
positive
435,167
@Test public void list() throws Exception { createPermissionUsingRepository(); String embeddedReqString = LinkPath.EMBEDDED + REQ_STRING; String[] sortParams = { "name,desc", "label" }; mvc.perform(get(apiPrefix + "/" + REQ_STRING).header(authHeader, tokenType + " " + accessToken).accept(MediaType.APPLICATION_JSON).par...
@Test public void list() throws Exception { <DeepExtract> createPermissionUsingRepository(); </DeepExtract> String embeddedReqString = LinkPath.EMBEDDED + REQ_STRING; String[] sortParams = { "name,desc", "label" }; mvc.perform(get(apiPrefix + "/" + REQ_STRING).header(authHeader, tokenType + " " + accessToken).accept(Me...
gms
positive
435,170