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 Criteria andGmtEndGreaterThanOrEqualTo(Long value) {
if (value == null) {
throw new RuntimeException("Value for " + "gmtEnd" + " cannot be null");
}
criteria.add(new Criterion("gmt_end >=", value));
return (Criteria) this;
} | public Criteria andGmtEndGreaterThanOrEqualTo(Long value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "gmtEnd" + " cannot be null");
}
criteria.add(new Criterion("gmt_end >=", value));
</DeepExtract>
return (Criteria) this;
} | community | positive | 4,889 |
protected <T> T queryForClass(String sql, Object[] params, int[] sqlTypes, Class<T> clazz) {
LOGGER.info(String.format("Executing SQL query [%s] with parameters [%s] and SQL types [%s] for class [%s]", sql, Arrays.toString(params), Arrays.toString(sqlTypes), clazz));
List<T> results = queryForList(sql, params, sqlTypes... | protected <T> T queryForClass(String sql, Object[] params, int[] sqlTypes, Class<T> clazz) {
LOGGER.info(String.format("Executing SQL query [%s] with parameters [%s] and SQL types [%s] for class [%s]", sql, Arrays.toString(params), Arrays.toString(sqlTypes), clazz));
<DeepExtract>
List<T> results = queryForList(sql, pa... | elucidate-server | positive | 4,890 |
@Override
public void initializeViewParts() {
Form form = Form.of();
List<Group> groups = categoryModel.getGroups();
if (groups == null) {
groups = new ArrayList<>();
}
List<com.dlsc.formsfx.model.structure.Group> formGroups = form.getGroups();
for (int i = 0; i < groups.size(); i++) {
PreferencesFxGroup preferencesGro... | @Override
public void initializeViewParts() {
Form form = Form.of();
List<Group> groups = categoryModel.getGroups();
if (groups == null) {
groups = new ArrayList<>();
}
List<com.dlsc.formsfx.model.structure.Group> formGroups = form.getGroups();
for (int i = 0; i < groups.size(); i++) {
PreferencesFxGroup preferencesGro... | PreferencesFX | positive | 4,891 |
@Test(timeout = 1000)
public void testTransferDataIntegrity2Hop() {
CountDown cancellationCountDown = new CountDown(2, () -> PeerConfiguration.twoHopRoutedConfiguration().runloop.stop());
PeerConfiguration.twoHopRoutedConfiguration().startAndExecuteAfterDiscovery(() -> {
PeerConfiguration.twoHopRoutedConfiguration().pe... | @Test(timeout = 1000)
public void testTransferDataIntegrity2Hop() {
<DeepExtract>
CountDown cancellationCountDown = new CountDown(2, () -> PeerConfiguration.twoHopRoutedConfiguration().runloop.stop());
PeerConfiguration.twoHopRoutedConfiguration().startAndExecuteAfterDiscovery(() -> {
PeerConfiguration.twoHopRoutedConf... | jReto | positive | 4,892 |
@Override
public void onVectorSetted(VectorSet evtSrc, int vecid, int[] old, int[] vector) {
if (evtSrc == this.source && sorters.containsKey(vecid)) {
sorters.get(vecid).reset();
}
if (evtSrc == this.source) {
target.rescore(source.key(), vecid, vector, this);
} else if (evtSrc == this.target) {
int tgtVecId = vecid;
... | @Override
public void onVectorSetted(VectorSet evtSrc, int vecid, int[] old, int[] vector) {
if (evtSrc == this.source && sorters.containsKey(vecid)) {
sorters.get(vecid).reset();
}
<DeepExtract>
if (evtSrc == this.source) {
target.rescore(source.key(), vecid, vector, this);
} else if (evtSrc == this.target) {
int tgtV... | simbase | positive | 4,893 |
private String truststore() {
if (this.context.getProperties().get(HTTP_SERVER_TRUST_STORE) == null) {
return null;
} else {
return String.valueOf(this.context.getProperties().get(HTTP_SERVER_TRUST_STORE));
}
} | private String truststore() {
<DeepExtract>
if (this.context.getProperties().get(HTTP_SERVER_TRUST_STORE) == null) {
return null;
} else {
return String.valueOf(this.context.getProperties().get(HTTP_SERVER_TRUST_STORE));
}
</DeepExtract>
} | SilverWare | positive | 4,894 |
public static byte[] encodeAsUnsignedLong(long value) {
assert 8 > 0 && 8 <= Long.BYTES;
assert Long.BYTES == 8;
assert Byte.BYTES == 1;
byte[] res = new byte[8];
int startByte = 8 - 1;
for (int i = 0; i < 8; i++) {
int byteOffset = 8 * (startByte - i);
res[i] = (byte) ((value >> byteOffset) & 0xFF);
}
return res;
} | public static byte[] encodeAsUnsignedLong(long value) {
<DeepExtract>
assert 8 > 0 && 8 <= Long.BYTES;
assert Long.BYTES == 8;
assert Byte.BYTES == 1;
byte[] res = new byte[8];
int startByte = 8 - 1;
for (int i = 0; i < 8; i++) {
int byteOffset = 8 * (startByte - i);
res[i] = (byte) ((value >> byteOffset) & 0xFF);
}
re... | Simulizer | positive | 4,895 |
public Criteria andMaxTimeIsNull() {
if ("maxTime is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("maxTime is null"));
return (Criteria) this;
} | public Criteria andMaxTimeIsNull() {
<DeepExtract>
if ("maxTime is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("maxTime is null"));
</DeepExtract>
return (Criteria) this;
} | jtt808-simulator | positive | 4,896 |
public Criteria andIntroNotIn(List<String> values) {
if (values == null) {
throw new RuntimeException("Value for " + "intro" + " cannot be null");
}
criteria.add(new Criterion("intro not in", values));
return (Criteria) this;
} | public Criteria andIntroNotIn(List<String> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "intro" + " cannot be null");
}
criteria.add(new Criterion("intro not in", values));
</DeepExtract>
return (Criteria) this;
} | ReptilianDemo | positive | 4,897 |
public static boolean build(World world, Random rand, int i, int j, int k) {
world.setBlock(i + 0, j + 11, k + 1, StructureGenHelper.randomBlock(rand, new Block[] { Blocks.stone_stairs, Blocks.stone_stairs, Blocks.air }), 4, 2);
world.setBlock(i + 0, j + 11, k + 2, StructureGenHelper.randomBlock(rand, new Block[] { Blo... | public static boolean build(World world, Random rand, int i, int j, int k) {
world.setBlock(i + 0, j + 11, k + 1, StructureGenHelper.randomBlock(rand, new Block[] { Blocks.stone_stairs, Blocks.stone_stairs, Blocks.air }), 4, 2);
world.setBlock(i + 0, j + 11, k + 2, StructureGenHelper.randomBlock(rand, new Block[] { Blo... | Artifacts | positive | 4,898 |
public Criteria andBorrowNumberLessThan(Integer value) {
if (value == null) {
throw new RuntimeException("Value for " + "borrowNumber" + " cannot be null");
}
criteria.add(new Criterion("borrow_number <", value));
return (Criteria) this;
} | public Criteria andBorrowNumberLessThan(Integer value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "borrowNumber" + " cannot be null");
}
criteria.add(new Criterion("borrow_number <", value));
</DeepExtract>
return (Criteria) this;
} | BookLibrarySystem | positive | 4,899 |
private int getStringRemapRules(final Field field, @Nullable final Map<Integer, GroupKey> groupKeys, Map<Integer, GroupKey> newGroupKeys, final GroupMultiRemapRule[] rules, final int ruleIndex, int positiveGroup, final int group, final List<String> termList) {
final RegroupCondition[] conditions = new RegroupCondition[... | private int getStringRemapRules(final Field field, @Nullable final Map<Integer, GroupKey> groupKeys, Map<Integer, GroupKey> newGroupKeys, final GroupMultiRemapRule[] rules, final int ruleIndex, int positiveGroup, final int group, final List<String> termList) {
final RegroupCondition[] conditions = new RegroupCondition[... | iql | positive | 4,900 |
@Override
public User findByMobile(String mobile) {
User user = userDao.findByMobile(mobile);
if (user == null) {
return null;
}
List<Role> roleList = userRoleMapper.findByUserId(user.getId());
List<RoleDTO> roleDTOList = roleList.stream().map(e -> {
return new RoleDTO().setId(e.getId()).setName(e.getName());
}).collec... | @Override
public User findByMobile(String mobile) {
User user = userDao.findByMobile(mobile);
<DeepExtract>
if (user == null) {
return null;
}
List<Role> roleList = userRoleMapper.findByUserId(user.getId());
List<RoleDTO> roleDTOList = roleList.stream().map(e -> {
return new RoleDTO().setId(e.getId()).setName(e.getName... | xboot | positive | 4,901 |
@Override
public void run() {
if (!isEnabledI()) {
return;
}
if (Util.isUrlFilteredOut(url)) {
logger.debug("Deep link (" + url.toString() + ") processing skipped");
return;
}
ActivityPackage sdkClickPackage = PackageFactory.buildDeeplinkSdkClickPackage(url, clickTime, activityState, adjustConfig, deviceInfo, sessionPa... | @Override
public void run() {
<DeepExtract>
if (!isEnabledI()) {
return;
}
if (Util.isUrlFilteredOut(url)) {
logger.debug("Deep link (" + url.toString() + ") processing skipped");
return;
}
ActivityPackage sdkClickPackage = PackageFactory.buildDeeplinkSdkClickPackage(url, clickTime, activityState, adjustConfig, deviceI... | adobe_air_sdk | positive | 4,902 |
@Test
public void shouldNotCallWriteSnapshotOnListenerWhenSnapshotTimeoutOccursAndSnapshotExistsAndNotEnoughLogEntriesHaveBeenCommittedNoOverlap() throws StorageException {
SnapshotsStore.ExtendedSnapshot storedSnapshot = new UnitTestSnapshot(6L, 1);
final LogEntry[] entries = new LogEntry[] { CLIENT(7, 3, new UnitTest... | @Test
public void shouldNotCallWriteSnapshotOnListenerWhenSnapshotTimeoutOccursAndSnapshotExistsAndNotEnoughLogEntriesHaveBeenCommittedNoOverlap() throws StorageException {
SnapshotsStore.ExtendedSnapshot storedSnapshot = new UnitTestSnapshot(6L, 1);
final LogEntry[] entries = new LogEntry[] { CLIENT(7, 3, new UnitTest... | libraft | positive | 4,903 |
@Override
public void onClick(View v) {
if (onViewClickListener != null) {
onViewClickListener.onDownload(downLoadTag);
}
} | @Override
public void onClick(View v) {
<DeepExtract>
if (onViewClickListener != null) {
onViewClickListener.onDownload(downLoadTag);
}
</DeepExtract>
} | my_aliplayer | positive | 4,904 |
public void AddImageStream(ByteBuffer stream) {
ImageStream = stream;
boolean blockY0HasAcComponents = false;
boolean blockY1HasAcComponents = false;
boolean blockY2HasAcComponents = false;
boolean blockY3HasAcComponents = false;
boolean blockCbHasAcComponents = false;
boolean blockCrHasAcComponents = false;
StreamFiel... | public void AddImageStream(ByteBuffer stream) {
ImageStream = stream;
<DeepExtract>
boolean blockY0HasAcComponents = false;
boolean blockY1HasAcComponents = false;
boolean blockY2HasAcComponents = false;
boolean blockY3HasAcComponents = false;
boolean blockCbHasAcComponents = false;
boolean blockCrHasAcComponents = fal... | YADrone | positive | 4,905 |
public BigDecimalWrapper plus(double value) {
BigDecimal calculate = BigDecimalUtils.calculate(this.bigDecimal).plus(value);
if (calculate == null || calculate.isEmpty()) {
return new BigDecimalWrapper("0");
}
return new BigDecimalWrapper(calculate);
} | public BigDecimalWrapper plus(double value) {
BigDecimal calculate = BigDecimalUtils.calculate(this.bigDecimal).plus(value);
<DeepExtract>
if (calculate == null || calculate.isEmpty()) {
return new BigDecimalWrapper("0");
}
return new BigDecimalWrapper(calculate);
</DeepExtract>
} | Clean-Architecture-Coin | positive | 4,907 |
@Step
public void searchesFor(String searchTerm) {
searchField.type(searchTerm);
searchButton.click();
} | @Step
public void searchesFor(String searchTerm) {
searchField.type(searchTerm);
<DeepExtract>
searchButton.click();
</DeepExtract>
} | serenity-cucumber5 | positive | 4,908 |
@Override
protected void onPreExecute() {
super.onPreExecute();
if (downloadProgressDialog != null)
downloadProgressDialog.dismiss();
downloadProgressDialog = new ProgressDialog(this);
downloadProgressDialog.setIndeterminate(true);
downloadProgressDialog.setMessage(getString(R.string.downloading_widget));
downloadProgr... | @Override
protected void onPreExecute() {
super.onPreExecute();
<DeepExtract>
if (downloadProgressDialog != null)
downloadProgressDialog.dismiss();
downloadProgressDialog = new ProgressDialog(this);
downloadProgressDialog.setIndeterminate(true);
downloadProgressDialog.setMessage(getString(R.string.downloading_widget));... | Webinos-Platform | positive | 4,909 |
public void actionPerformed(java.awt.event.ActionEvent evt) {
enableMsgfJCheckBox.setSelected(!enableMsgfJCheckBox.isSelected());
enableMsgfJCheckBoxActionPerformed(null);
} | public void actionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
enableMsgfJCheckBox.setSelected(!enableMsgfJCheckBox.isSelected());
enableMsgfJCheckBoxActionPerformed(null);
</DeepExtract>
} | searchgui | positive | 4,910 |
public Criteria andIconLessThan(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "icon" + " cannot be null");
}
criteria.add(new Criterion("icon <", value));
return (Criteria) this;
} | public Criteria andIconLessThan(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "icon" + " cannot be null");
}
criteria.add(new Criterion("icon <", value));
</DeepExtract>
return (Criteria) this;
} | common-admin | positive | 4,911 |
@Async
public void sendEmailFromTemplate(User user, String templateName, String titleKey) {
Locale locale = Locale.forLanguageTag(user.getLangKey());
Context context = new Context(locale);
context.setVariable(USER, user);
context.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl());
String content = templat... | @Async
public void sendEmailFromTemplate(User user, String templateName, String titleKey) {
Locale locale = Locale.forLanguageTag(user.getLangKey());
Context context = new Context(locale);
context.setVariable(USER, user);
context.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl());
String content = templat... | ionic-jhipster-example | positive | 4,912 |
@SuppressWarnings("unused")
public synchronized void requestPermissionsIfNecessaryForResult(@NonNull Fragment fragment, @NonNull String[] permissions, @Nullable PermissionsResultAction action) {
Activity activity = fragment.getActivity();
if (activity == null) {
return;
}
if (action == null) {
return;
}
action.register... | @SuppressWarnings("unused")
public synchronized void requestPermissionsIfNecessaryForResult(@NonNull Fragment fragment, @NonNull String[] permissions, @Nullable PermissionsResultAction action) {
Activity activity = fragment.getActivity();
if (activity == null) {
return;
}
<DeepExtract>
if (action == null) {
return;
}
a... | ndileber | positive | 4,913 |
@SuppressWarnings("deprecation")
@SuppressLint("NewApi")
@Override
public void onGlobalLayout() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
getViewTreeObserver().removeGlobalOnLayoutListener(this);
} else {
getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
currentPosition = pager.getCurren... | @SuppressWarnings("deprecation")
@SuppressLint("NewApi")
@Override
public void onGlobalLayout() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
getViewTreeObserver().removeGlobalOnLayoutListener(this);
} else {
getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
currentPosition = pager.getCurren... | funnyDemo | positive | 4,914 |
public Criteria andReadnumberGreaterThanOrEqualTo(Integer value) {
if (value == null) {
throw new RuntimeException("Value for " + "readnumber" + " cannot be null");
}
criteria.add(new Criterion("readnumber >=", value));
return (Criteria) this;
} | public Criteria andReadnumberGreaterThanOrEqualTo(Integer value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "readnumber" + " cannot be null");
}
criteria.add(new Criterion("readnumber >=", value));
</DeepExtract>
return (Criteria) this;
} | zheng-lite | positive | 4,916 |
@Override
public void onBottomToTop(float endVelocity) {
if (endVelocity > 0) {
if (CustomFlingListener.DIRECTION_UP == CustomFlingListener.DIRECTION_UP) {
notificationCardsLayout.animate().translationY(-lLayout.getHeight()).setInterpolator(new DecelerateInterpolator(endVelocity / 2)).alpha(CARDS_MIN_ALPHA).setListener... | @Override
public void onBottomToTop(float endVelocity) {
<DeepExtract>
if (endVelocity > 0) {
if (CustomFlingListener.DIRECTION_UP == CustomFlingListener.DIRECTION_UP) {
notificationCardsLayout.animate().translationY(-lLayout.getHeight()).setInterpolator(new DecelerateInterpolator(endVelocity / 2)).alpha(CARDS_MIN_ALPH... | SmartLockScreen | positive | 4,917 |
private static boolean ImmutableTypeDef_2(PsiBuilder b, int l) {
if (!recursion_guard_(b, l, "ImmutableTypeDef_2"))
return false;
if (!recursion_guard_(b, l + 1, "TypeParameters"))
return false;
boolean r;
Marker m = enter_section_(b, l + 1, _NONE_, "<type parameters>");
r = consumeToken(b, "{");
r = r && ExpList(b, l ... | private static boolean ImmutableTypeDef_2(PsiBuilder b, int l) {
if (!recursion_guard_(b, l, "ImmutableTypeDef_2"))
return false;
<DeepExtract>
if (!recursion_guard_(b, l + 1, "TypeParameters"))
return false;
boolean r;
Marker m = enter_section_(b, l + 1, _NONE_, "<type parameters>");
r = consumeToken(b, "{");
r = r &&... | juliafy | positive | 4,918 |
@Override
public synchronized void run() {
serverLaufen = true;
StatsUpload.getInstance().sendCrawlStart();
Config.setStop(false);
if (CrawlerConfig.dirFilme.isEmpty()) {
Log.sysLog("Kein Pfad der Filmlisten angegeben");
System.exit(-1);
}
CrawlerTool.startMsg();
Log.sysLog("");
Log.sysLog("");
filmeSuchen.addAdListene... | @Override
public synchronized void run() {
serverLaufen = true;
StatsUpload.getInstance().sendCrawlStart();
Config.setStop(false);
if (CrawlerConfig.dirFilme.isEmpty()) {
Log.sysLog("Kein Pfad der Filmlisten angegeben");
System.exit(-1);
}
CrawlerTool.startMsg();
Log.sysLog("");
Log.sysLog("");
filmeSuchen.addAdListene... | MServer | positive | 4,919 |
@Deprecated
public void setSwipeListener(SwipeListener listener) {
if (mListeners == null) {
mListeners = new ArrayList<SwipeListener>();
}
mListeners.add(listener);
} | @Deprecated
public void setSwipeListener(SwipeListener listener) {
<DeepExtract>
if (mListeners == null) {
mListeners = new ArrayList<SwipeListener>();
}
mListeners.add(listener);
</DeepExtract>
} | 9GAG | positive | 4,920 |
@Override
public int getDestroyBaseScore(Base card) {
int defaultScore = card.getCost();
CardRules cardRules = getCardRules(card, destroyBaseRulesMap);
if (cardRules != null) {
return getCardScore(card, cardRules, defaultScore);
}
return defaultScore;
} | @Override
public int getDestroyBaseScore(Base card) {
int defaultScore = card.getCost();
<DeepExtract>
CardRules cardRules = getCardRules(card, destroyBaseRulesMap);
if (cardRules != null) {
return getCardScore(card, cardRules, defaultScore);
}
return defaultScore;
</DeepExtract>
} | star-realms-simulator | positive | 4,921 |
private void loadProperties() {
final ApplicationVersion currentApplicationVersion = CoreUtils.getCurrentApplicationVersion();
currentVersionLabel.setText(currentApplicationVersion.getVersion());
currentBetaLabel.setVisible(currentApplicationVersion.isBeta());
final Beta beta = currentApplicationVersion.getBeta();
curr... | private void loadProperties() {
<DeepExtract>
final ApplicationVersion currentApplicationVersion = CoreUtils.getCurrentApplicationVersion();
currentVersionLabel.setText(currentApplicationVersion.getVersion());
currentBetaLabel.setVisible(currentApplicationVersion.isBeta());
final Beta beta = currentApplicationVersion.g... | WeblocOpener | positive | 4,922 |
public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) wallsTree.getLastSelectedPathComponent();
if (node != null && node.isLeaf() && node.getUserObject() != WallUpdater.currentData) {
mapPanel.getLoop().syncAndExecute(() -> {
WallUpdater.currentData ... | public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
<DeepExtract>
DefaultMutableTreeNode node = (DefaultMutableTreeNode) wallsTree.getLastSelectedPathComponent();
if (node != null && node.isLeaf() && node.getUserObject() != WallUpdater.currentData) {
mapPanel.getLoop().syncAndExecute(() -> {
WallUpdate... | DeedPlanner-2 | positive | 4,923 |
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
trackCount = new SimpleIntegerProperty();
albumCount = new SimpleIntegerProperty();
totalLength = new SimpleIntegerProperty();
name = new SimpleStringProperty();
albums = FXCollections.observableArrayList(... | private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
trackCount = new SimpleIntegerProperty();
albumCount = new SimpleIntegerProperty();
totalLength = new SimpleIntegerProperty();
name = new SimpleStringProperty();
albums = FXCollections.observableArrayList(... | HypnosMusicPlayer | positive | 4,925 |
public float getInertia() {
float userValueScale = (float) (USER_VALUE_MAX - inertia.getCurrentValue()) / (float) (USER_VALUE_MAX);
return ((3f - 0.75f) * userValueScale) + 0.75f;
} | public float getInertia() {
<DeepExtract>
float userValueScale = (float) (USER_VALUE_MAX - inertia.getCurrentValue()) / (float) (USER_VALUE_MAX);
return ((3f - 0.75f) * userValueScale) + 0.75f;
</DeepExtract>
} | Alien-Ark | positive | 4,926 |
public static void logError(String text) {
try {
if (DBG) {
if (true) {
Log.println(Log.ERROR, TAG, text);
} else {
final int chunkSize = 1000;
if (text.length() > chunkSize)
log("Splitting logError into chunks. Length: " + text.length());
for (int i = 0; i < text.length(); i += chunkSize) Log.println(Log.ERROR, TAG, t... | public static void logError(String text) {
<DeepExtract>
try {
if (DBG) {
if (true) {
Log.println(Log.ERROR, TAG, text);
} else {
final int chunkSize = 1000;
if (text.length() > chunkSize)
log("Splitting logError into chunks. Length: " + text.length());
for (int i = 0; i < text.length(); i += chunkSize) Log.println(Log... | librus-client | positive | 4,927 |
@ParameterizedTest
@MethodSource("makeBoardDecoratorTestContexts")
void IfFieldIsNotMarkedOnTheBoard_ItShouldBeNotMarkedEither(BoardDecoratorTestContext cxt) {
this.decoree = cxt.getDecoree();
this.sut = cxt.getSut();
boolean actual = sut.isMarked(new Field(0, 0));
assertFalse(actual);
this.decoree = null;
this.sut = n... | @ParameterizedTest
@MethodSource("makeBoardDecoratorTestContexts")
void IfFieldIsNotMarkedOnTheBoard_ItShouldBeNotMarkedEither(BoardDecoratorTestContext cxt) {
this.decoree = cxt.getDecoree();
this.sut = cxt.getSut();
boolean actual = sut.isMarked(new Field(0, 0));
assertFalse(actual);
<DeepExtract>
this.decoree = null... | BoardGames.TDD-London-School | positive | 4,928 |
public Builder mergeFrom(com.game.pb.server.rpc.hello.HelloReply other) {
if (other == com.game.pb.server.rpc.hello.HelloReply.getDefaultInstance())
return this;
if (!other.getMessage().isEmpty()) {
message_ = other.message_;
onChanged();
}
return super.mergeUnknownFields(other.unknownFields);
onChanged();
return this;... | public Builder mergeFrom(com.game.pb.server.rpc.hello.HelloReply other) {
if (other == com.game.pb.server.rpc.hello.HelloReply.getDefaultInstance())
return this;
if (!other.getMessage().isEmpty()) {
message_ = other.message_;
onChanged();
}
<DeepExtract>
return super.mergeUnknownFields(other.unknownFields);
</DeepExtra... | game-server | positive | 4,929 |
@Override
public void run() {
if (getViewState() == STATE_LOADING && MultiStateView.STATE_CONTENT != STATE_LOADING) {
long diff = System.currentTimeMillis() - mLoadingStartTime;
if (diff < MIN_SHOW_TIME) {
mTargetState = MultiStateView.STATE_CONTENT;
postDelayed(mLoadingHide, MIN_DELAY);
} else {
super.setViewState(Mul... | @Override
public void run() {
<DeepExtract>
if (getViewState() == STATE_LOADING && MultiStateView.STATE_CONTENT != STATE_LOADING) {
long diff = System.currentTimeMillis() - mLoadingStartTime;
if (diff < MIN_SHOW_TIME) {
mTargetState = MultiStateView.STATE_CONTENT;
postDelayed(mLoadingHide, MIN_DELAY);
} else {
super.se... | DavyNews | positive | 4,930 |
@Override
public void run() {
root_layout.invalidate();
} | @Override
<DeepExtract>
</DeepExtract>
public void run() {
<DeepExtract>
</DeepExtract>
root_layout.invalidate();
<DeepExtract>
</DeepExtract>
} | android-mvc-framework | positive | 4,931 |
@Override
public void onClick(View v) {
tvJaxx.setSelected(false);
ivJaxx.setVisibility(View.GONE);
tvLedger.setSelected(false);
ivLedger.setVisibility(View.GONE);
tvCustom.setSelected(false);
ivCustom.setVisibility(View.GONE);
switch(v.getId()) {
case R.id.rl_jaxx:
selection = 0;
tvJaxx.setSelected(true);
ivJaxx.setVi... | @Override
public void onClick(View v) {
<DeepExtract>
tvJaxx.setSelected(false);
ivJaxx.setVisibility(View.GONE);
tvLedger.setSelected(false);
ivLedger.setVisibility(View.GONE);
tvCustom.setSelected(false);
ivCustom.setVisibility(View.GONE);
</DeepExtract>
switch(v.getId()) {
case R.id.rl_jaxx:
selection = 0;
tvJaxx.se... | ETHWallet | positive | 4,932 |
@Override
public void onAdCompleted() {
if (DEBUG) {
Log.i(TAG, "Ad completed");
}
if (mCurrentChannel != null && mNeedToCheckChannelAd) {
SharedPreferences.Editor editor = mContext.getSharedPreferences(Constants.PREFERENCES_FILE_KEY, Context.MODE_PRIVATE).edit();
editor.putLong(Constants.SHARED_PREFERENCES_KEY_LAST_CH... | @Override
public void onAdCompleted() {
if (DEBUG) {
Log.i(TAG, "Ad completed");
}
if (mCurrentChannel != null && mNeedToCheckChannelAd) {
SharedPreferences.Editor editor = mContext.getSharedPreferences(Constants.PREFERENCES_FILE_KEY, Context.MODE_PRIVATE).edit();
editor.putLong(Constants.SHARED_PREFERENCES_KEY_LAST_CH... | Tsutaeru | positive | 4,933 |
public static void setUserName(String username) {
Map<String, Object> map = getLocalMap();
map.put(SecurityConstants.DETAILS_USERNAME, username == null ? StringUtils.EMPTY : username);
} | public static void setUserName(String username) {
<DeepExtract>
Map<String, Object> map = getLocalMap();
map.put(SecurityConstants.DETAILS_USERNAME, username == null ? StringUtils.EMPTY : username);
</DeepExtract>
} | PassJava-Platform | positive | 4,934 |
public final void showNoNetwork(View view, ViewGroup.LayoutParams layoutParams) {
if (null == view) {
throw new NullPointerException("No network view is null!");
}
mViewStatus = STATUS_NO_NETWORK;
if (null == mNoNetworkView) {
mNoNetworkView = view;
View noNetworkRetryView = mNoNetworkView.findViewById(R.id.no_network_... | public final void showNoNetwork(View view, ViewGroup.LayoutParams layoutParams) {
if (null == view) {
throw new NullPointerException("No network view is null!");
}
mViewStatus = STATUS_NO_NETWORK;
if (null == mNoNetworkView) {
mNoNetworkView = view;
View noNetworkRetryView = mNoNetworkView.findViewById(R.id.no_network_... | Football-Lottery | positive | 4,935 |
private static void reduceNamedOnly(OWLOntology ontology, OWLReasonerFactory reasonerFactory, boolean preserveAnnotatedAxioms) {
Map<OWLClass, Map<OWLClass, Set<OWLSubClassOfAxiom>>> assertions = new HashMap<>();
Set<OWLSubClassOfAxiom> assertedSubClassAxioms = ontology.getAxioms(AxiomType.SUBCLASS_OF);
for (OWLSubClas... | private static void reduceNamedOnly(OWLOntology ontology, OWLReasonerFactory reasonerFactory, boolean preserveAnnotatedAxioms) {
Map<OWLClass, Map<OWLClass, Set<OWLSubClassOfAxiom>>> assertions = new HashMap<>();
Set<OWLSubClassOfAxiom> assertedSubClassAxioms = ontology.getAxioms(AxiomType.SUBCLASS_OF);
for (OWLSubClas... | robot | positive | 4,936 |
public static void main(String[] args) {
TextJustification clz = new TextJustification();
List<String> result = new ArrayList<String>();
int last = 0;
int currLen = 0;
for (int i = 0; i < new String[] { "a", "b", "c", "d", "e" }.length; i++) {
String word = new String[] { "a", "b", "c", "d", "e" }[i];
if (word.length()... | public static void main(String[] args) {
TextJustification clz = new TextJustification();
<DeepExtract>
List<String> result = new ArrayList<String>();
int last = 0;
int currLen = 0;
for (int i = 0; i < new String[] { "a", "b", "c", "d", "e" }.length; i++) {
String word = new String[] { "a", "b", "c", "d", "e" }[i];
if ... | interviewprep | positive | 4,937 |
public Criteria andRealReturnTimeIn(List<Date> values) {
if (values == null) {
throw new RuntimeException("Value for " + "realReturnTime" + " cannot be null");
}
criteria.add(new Criterion("real_return_time in", values));
return (Criteria) this;
} | public Criteria andRealReturnTimeIn(List<Date> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "realReturnTime" + " cannot be null");
}
criteria.add(new Criterion("real_return_time in", values));
</DeepExtract>
return (Criteria) this;
} | SSM_BookSystem | positive | 4,938 |
public void initializeFromTrainingData() {
documentD = 0;
ArrayList<Integer> wordVectorT = new ArrayList<Integer>(), documentVectorT = new ArrayList<Integer>(), sentenceVectorT = new ArrayList<Integer>();
while ((dataReader = trainDirReader.nextDocumentReader()) != null) {
try {
String[][] sentence;
while ((sentence = ... | public void initializeFromTrainingData() {
documentD = 0;
ArrayList<Integer> wordVectorT = new ArrayList<Integer>(), documentVectorT = new ArrayList<Integer>(), sentenceVectorT = new ArrayList<Integer>();
while ((dataReader = trainDirReader.nextDocumentReader()) != null) {
try {
String[][] sentence;
while ((sentence = ... | acceptability_prediction | positive | 4,939 |
public int sumBetween(int a, int b) {
if (b <= a) {
throw new IllegalArgumentException("b must be greater than or equal to a");
}
int sum = 0;
for (int i = a; i < b; i++) {
sum += i;
}
return sum;
} | public int sumBetween(int a, int b) {
<DeepExtract>
if (b <= a) {
throw new IllegalArgumentException("b must be greater than or equal to a");
}
</DeepExtract>
int sum = 0;
for (int i = a; i < b; i++) {
sum += i;
}
return sum;
} | spork | positive | 4,940 |
@Override
public void computeScroll() {
if (mScroller.isFinished()) {
return;
}
mScroller.computeScrollOffset();
final int y = mScroller.getCurrY();
int unconsumed = y - mLastScrollerY;
mLastScrollerY = y;
mScrollConsumed[1] = 0;
return mChildHelper.dispatchNestedPreScroll(0, unconsumed, mScrollConsumed, null, ViewComp... | @Override
public void computeScroll() {
if (mScroller.isFinished()) {
return;
}
mScroller.computeScrollOffset();
final int y = mScroller.getCurrY();
int unconsumed = y - mLastScrollerY;
mLastScrollerY = y;
mScrollConsumed[1] = 0;
<DeepExtract>
return mChildHelper.dispatchNestedPreScroll(0, unconsumed, mScrollConsumed, ... | CoordinatorLayoutExample | positive | 4,941 |
@Override
public boolean checkArgs(RampartStageArgs args) {
return args.getClass().getSimpleName().equals(Amp.Args.class.getSimpleName());
} | @Override
public boolean checkArgs(RampartStageArgs args) {
<DeepExtract>
return args.getClass().getSimpleName().equals(Amp.Args.class.getSimpleName());
</DeepExtract>
} | RAMPART | positive | 4,942 |
@Override
public void render(PoseStack matrices, int mouseX, int mouseY, float delta) {
super.render(matrices, mouseX, mouseY, delta);
int mid = width / 2;
int top = leftButtonYOffset;
int colorsLeft = mid - ((colors.size() * 21) / 2);
if (hasScreenshot) {
colorsTop = top + 117;
coordsTop = top + 141;
} else if (atEntr... | @Override
public void render(PoseStack matrices, int mouseX, int mouseY, float delta) {
super.render(matrices, mouseX, mouseY, delta);
int mid = width / 2;
int top = leftButtonYOffset;
int colorsLeft = mid - ((colors.size() * 21) / 2);
if (hasScreenshot) {
colorsTop = top + 117;
coordsTop = top + 141;
} else if (atEntr... | Strange | positive | 4,943 |
public String chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket) {
out.print("TestKeyManager.chooseClientAlias");
out.print(" | keyTypes: ");
for (String keyType : keyTypes) {
out.print(keyType);
out.print(' ');
}
out.print(" | issuers: ");
if (issuers == null) {
out.print("null");
return;
}
for (... | public String chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket) {
out.print("TestKeyManager.chooseClientAlias");
out.print(" | keyTypes: ");
for (String keyType : keyTypes) {
out.print(keyType);
out.print(' ');
}
out.print(" | issuers: ");
if (issuers == null) {
out.print("null");
return;
}
for (... | HttpResponseCache | positive | 4,944 |
@Override
public int getTransportControlFlags() {
while (true) {
if (mState == State.DONE) {
return mResult;
} else if (mState == State.IDLE) {
start();
}
try {
wait(500);
} catch (InterruptedException e) {
}
}
} | @Override
public int getTransportControlFlags() {
<DeepExtract>
while (true) {
if (mState == State.DONE) {
return mResult;
} else if (mState == State.IDLE) {
start();
}
try {
wait(500);
} catch (InterruptedException e) {
}
}
</DeepExtract>
} | PlayerHater | positive | 4,945 |
public static void rotateArray(int[] a, int n, int k) {
for (int i = 0, j = k - 1; i < j; i++, j--) {
int temp = a[i];
a[i] = a[j];
a[j] = temp;
}
for (int i = k, j = n - 1; i < j; i++, j--) {
int temp = a[i];
a[i] = a[j];
a[j] = temp;
}
for (int i = 0, j = n - 1; i < j; i++, j--) {
int temp = a[i];
a[i] = a[j];
a[j] =... | public static void rotateArray(int[] a, int n, int k) {
for (int i = 0, j = k - 1; i < j; i++, j--) {
int temp = a[i];
a[i] = a[j];
a[j] = temp;
}
for (int i = k, j = n - 1; i < j; i++, j--) {
int temp = a[i];
a[i] = a[j];
a[j] = temp;
}
<DeepExtract>
for (int i = 0, j = n - 1; i < j; i++, j--) {
int temp = a[i];
a[i] ... | Problem-Solving-in-Data-Structures-Algorithms-using-Java | positive | 4,946 |
@Override
public void onClick(View view) {
MediaPlayer mediaPlayer = new MediaPlayer();
try {
mediaPlayer.setDataSource(listData.get(position).getContent());
mediaPlayer.prepare();
mediaPlayer.start();
} catch (IOException e) {
e.printStackTrace();
}
} | @Override
public void onClick(View view) {
<DeepExtract>
MediaPlayer mediaPlayer = new MediaPlayer();
try {
mediaPlayer.setDataSource(listData.get(position).getContent());
mediaPlayer.prepare();
mediaPlayer.start();
} catch (IOException e) {
e.printStackTrace();
}
</DeepExtract>
} | CoolChat | positive | 4,947 |
@Override
public void onRoomDisconnected() {
Log.d(LOG_TAG, "Room disconnected.");
DCHECK(callbackExecutor);
synchronized (statesLock) {
this.roomStates = RoomStates.DISCONNECTED;
}
callbackExecutor.execute(() -> {
closeInternal();
for (ConferenceClientObserver observer : observers) {
observer.onServerDisconnected();
}... | @Override
public void onRoomDisconnected() {
Log.d(LOG_TAG, "Room disconnected.");
DCHECK(callbackExecutor);
<DeepExtract>
synchronized (statesLock) {
this.roomStates = RoomStates.DISCONNECTED;
}
</DeepExtract>
callbackExecutor.execute(() -> {
closeInternal();
for (ConferenceClientObserver observer : observers) {
obser... | owt-client-android | positive | 4,948 |
@Override
public void closeInventory(EntityPlayer player) {
this.isTrading = false;
} | @Override
public void closeInventory(EntityPlayer player) {
<DeepExtract>
this.isTrading = false;
</DeepExtract>
} | MrCrayfishFurnitureMod | positive | 4,949 |
@Override
public void cancelRequest() {
responseFuture.cancel(true);
if (listener != null) {
listener.onActionEvent(new QQActionEvent(QQActionEvent.Type.EVT_CANCELED, null, actionFuture));
}
} | @Override
public void cancelRequest() {
responseFuture.cancel(true);
<DeepExtract>
if (listener != null) {
listener.onActionEvent(new QQActionEvent(QQActionEvent.Type.EVT_CANCELED, null, actionFuture));
}
</DeepExtract>
} | webqq-core | positive | 4,950 |
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
if (!mReady) {
mSetupPending = true;
return;
}
if (mBitmap == null) {
return;
}
mBitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
mBitmapPaint.setAntiAlias(true);
mBit... | @Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
<DeepExtract>
if (!mReady) {
mSetupPending = true;
return;
}
if (mBitmap == null) {
return;
}
mBitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
mBitmapPaint.setAntiAli... | BabySay | positive | 4,952 |
private void init() {
filterLayout = (LinearLayout) findViewById(R.id.layout_filter);
filterListView = (RecyclerView) findViewById(R.id.filter_listView);
btnShutter = (ImageView) findViewById(R.id.camera_shutter);
btnMode = (ImageView) findViewById(R.id.camera_mode);
btnFilter = (ImageView) findViewById(R.id.camera_fil... | private void init() {
filterLayout = (LinearLayout) findViewById(R.id.layout_filter);
filterListView = (RecyclerView) findViewById(R.id.filter_listView);
btnShutter = (ImageView) findViewById(R.id.camera_shutter);
btnMode = (ImageView) findViewById(R.id.camera_mode);
btnFilter = (ImageView) findViewById(R.id.camera_fil... | MagicShow | positive | 4,953 |
static int qChecksum(@NonNull byte[] data) {
int crc = 0xffff;
int crcHighBitMask = 0x8000;
for (byte b : data) {
int c = reflect(b, 8);
for (int j = 0x80; j > 0; j >>= 1) {
int highBit = crc & crcHighBitMask;
crc <<= 1;
if ((c & j) > 0) {
highBit ^= crcHighBitMask;
}
if (highBit > 0) {
crc ^= 0x1021;
}
}
}
int j = 1, ... | static int qChecksum(@NonNull byte[] data) {
int crc = 0xffff;
int crcHighBitMask = 0x8000;
for (byte b : data) {
int c = reflect(b, 8);
for (int j = 0x80; j > 0; j >>= 1) {
int highBit = crc & crcHighBitMask;
crc <<= 1;
if ((c & j) > 0) {
highBit ^= crcHighBitMask;
}
if (highBit > 0) {
crc ^= 0x1021;
}
}
}
<DeepExtrac... | QuasselDroid | positive | 4,956 |
public boolean isValidBST(TreeNode root) {
if (root == null) {
return;
}
inOrder(root.left);
result.add(root.val);
inOrder(root.right);
for (int i = 1; i < result.size(); i++) {
if (result.get(i) <= result.get(i - 1)) {
return false;
}
}
return true;
} | public boolean isValidBST(TreeNode root) {
<DeepExtract>
if (root == null) {
return;
}
inOrder(root.left);
result.add(root.val);
inOrder(root.right);
</DeepExtract>
for (int i = 1; i < result.size(); i++) {
if (result.get(i) <= result.get(i - 1)) {
return false;
}
}
return true;
} | DataStructureAlgorithmsJava | positive | 4,957 |
public Criteria andOuterTitleNotLike(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "outerTitle" + " cannot be null");
}
criteria.add(new Criterion("OUTER_TITLE not like", value));
return (Criteria) this;
} | public Criteria andOuterTitleNotLike(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "outerTitle" + " cannot be null");
}
criteria.add(new Criterion("OUTER_TITLE not like", value));
</DeepExtract>
return (Criteria) this;
} | communitycode | positive | 4,958 |
public String getSQLForWhereAppend() {
StringBuilder sql = new StringBuilder();
if (InnerCommonUtils.isNotBlank(condition)) {
sql.append(" AND ");
if (isOrExpression) {
sql.append("(");
}
sql.append(condition);
if (isOrExpression) {
sql.append(")");
}
}
if (InnerCommonUtils.isNotEmpty(groupBy)) {
sql.append(" GROUP BY ... | public String getSQLForWhereAppend() {
StringBuilder sql = new StringBuilder();
if (InnerCommonUtils.isNotBlank(condition)) {
sql.append(" AND ");
if (isOrExpression) {
sql.append("(");
}
sql.append(condition);
if (isOrExpression) {
sql.append(")");
}
}
if (InnerCommonUtils.isNotEmpty(groupBy)) {
sql.append(" GROUP BY ... | nimble-orm | positive | 4,960 |
@Override
public String toString() {
StringWriter sw = new StringWriter();
new PrintWriter(sw).println(Util.getSpaces(0) + "Cardholder Verification Rule");
String indentStr = Util.getSpaces(0 + Log.INDENT_SIZE);
new PrintWriter(sw).println(indentStr + "Rule: " + getRuleString());
new PrintWriter(sw).println(indentStr +... | @Override
public String toString() {
StringWriter sw = new StringWriter();
<DeepExtract>
new PrintWriter(sw).println(Util.getSpaces(0) + "Cardholder Verification Rule");
String indentStr = Util.getSpaces(0 + Log.INDENT_SIZE);
new PrintWriter(sw).println(indentStr + "Rule: " + getRuleString());
new PrintWriter(sw).print... | javaemvreader | positive | 4,961 |
public LocalTime withSecond(int second) {
if (this.second == second) {
return this;
}
SECOND_OF_MINUTE.checkValidValue(second);
if ((this.minute | second | this.nano) == 0) {
return HOURS[this.hour];
}
return new LocalTime(this.hour, this.minute, second, this.nano);
} | public LocalTime withSecond(int second) {
if (this.second == second) {
return this;
}
SECOND_OF_MINUTE.checkValidValue(second);
<DeepExtract>
if ((this.minute | second | this.nano) == 0) {
return HOURS[this.hour];
}
return new LocalTime(this.hour, this.minute, second, this.nano);
</DeepExtract>
} | gwt-time | positive | 4,963 |
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
block3: {
int dWheel;
block2: {
dWheel = Mouse.getDWheel();
if (dWheel >= 0)
break block2;
for (Component component : this.components) {
component.setY(component.getY() - 10);
}
break block3;
}
if (dWheel <= 0)
break block3;
for (Component component :... | public void drawScreen(int mouseX, int mouseY, float partialTicks) {
<DeepExtract>
block3: {
int dWheel;
block2: {
dWheel = Mouse.getDWheel();
if (dWheel >= 0)
break block2;
for (Component component : this.components) {
component.setY(component.getY() - 10);
}
break block3;
}
if (dWheel <= 0)
break block3;
for (Compone... | TrollGodCC-v1.5.4-Source-Code | positive | 4,964 |
public static int maxNumber1(int[] arr, int limit) {
tmp = 0;
Arrays.sort(arr);
limit--;
int offset = 1;
while (offset <= limit / 10) {
offset *= 10;
}
if (offset == 0) {
if (0 <= limit) {
tmp = Math.max(tmp, 0);
}
} else {
for (int cur : arr) {
process1(arr, 0 * 10 + cur, offset / 10, limit);
}
}
if (tmp == 0) {
int r... | public static int maxNumber1(int[] arr, int limit) {
tmp = 0;
Arrays.sort(arr);
limit--;
int offset = 1;
while (offset <= limit / 10) {
offset *= 10;
}
<DeepExtract>
if (offset == 0) {
if (0 <= limit) {
tmp = Math.max(tmp, 0);
}
} else {
for (int cur : arr) {
process1(arr, 0 * 10 + cur, offset / 10, limit);
}
}
</DeepE... | publicclass2020 | positive | 4,965 |
@Test
public void testSynthesize1() throws SynthesiseException {
ApiSynthesizerJustReturn inner = new ApiSynthesizerJustReturn();
String result = new ApiSynthesizerRewriteEvidenceDecorator(inner).synthesise("nothing", ONE).iterator().next();
Assert.assertEquals("nothing", result);
result = new ApiSynthesizerRewriteEvid... | @Test
public void testSynthesize1() throws SynthesiseException {
<DeepExtract>
ApiSynthesizerJustReturn inner = new ApiSynthesizerJustReturn();
String result = new ApiSynthesizerRewriteEvidenceDecorator(inner).synthesise("nothing", ONE).iterator().next();
Assert.assertEquals("nothing", result);
result = new ApiSynthesi... | bayou | positive | 4,966 |
@Override
public Path immediatelyBeforeSibling(Path path) {
verifyRelationBetweenElements(path);
String myXpath = getXPath().get();
boolean isInside = insideXpath.isPresent();
String processedXpath = isInside ? format("%s[ancestor::%s]", getXPathWithoutInsideClause().get(), insideXpath.get()) : myXpath;
String newAlter... | @Override
public Path immediatelyBeforeSibling(Path path) {
<DeepExtract>
verifyRelationBetweenElements(path);
String myXpath = getXPath().get();
boolean isInside = insideXpath.isPresent();
String processedXpath = isInside ? format("%s[ancestor::%s]", getXPathWithoutInsideClause().get(), insideXpath.get()) : myXpath;
S... | dollarx | positive | 4,967 |
public BranchNode applyTransform(AffineTransform at) {
this.suggestedPoint = at.transform(getSuggestedPoint(), null);
for (BranchNode c : this.getChildren()) {
c.applyTransform(at);
}
return this;
} | public BranchNode applyTransform(AffineTransform at) {
<DeepExtract>
this.suggestedPoint = at.transform(getSuggestedPoint(), null);
</DeepExtract>
for (BranchNode c : this.getChildren()) {
c.applyTransform(at);
}
return this;
} | molvec | positive | 4,968 |
public EodStagingInputBuilder withDisciminator1(String discriminator1) {
setInput(EodInput.DISCRIMINATOR_1.toString(), discriminator1);
return this;
} | public EodStagingInputBuilder withDisciminator1(String discriminator1) {
<DeepExtract>
setInput(EodInput.DISCRIMINATOR_1.toString(), discriminator1);
</DeepExtract>
return this;
} | staging-client-java | positive | 4,969 |
@Override
public void destroySessionBack(final C context, final String ticket) {
String trackSessionId = (String) store.get(ticket);
if (StringUtils.isEmpty(trackSessionId)) {
logger.error("No trackSessionId available for this web context");
return;
}
store.remove(ticket);
final SessionStore sessionStore = context.getS... | @Override
public void destroySessionBack(final C context, final String ticket) {
<DeepExtract>
String trackSessionId = (String) store.get(ticket);
if (StringUtils.isEmpty(trackSessionId)) {
logger.error("No trackSessionId available for this web context");
return;
}
store.remove(ticket);
final SessionStore sessionStore ... | colossus-shop | positive | 4,970 |
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
if (mListener != null) {
mListener.onNavigationItemSelected(position, id);
}
View selected = mView.getSelectedView();
if (selected == null) {
return;
}
selected.setActivated(mExpanded);
} | public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
if (mListener != null) {
mListener.onNavigationItemSelected(position, id);
}
<DeepExtract>
View selected = mView.getSelectedView();
if (selected == null) {
return;
}
selected.setActivated(mExpanded);
</DeepExtract>
} | android-demos | positive | 4,971 |
@Override
public void actionPerformed(ActionEvent e) {
MessageHandler.addInfo("");
tablePaste.setEnabled(false);
ClipboardData<DataTable> clipboardData = InMemoryClipboard.getData();
if (clipboardData != null) {
DataTable table = clipboardData.getData();
owner.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
... | @Override
public void actionPerformed(ActionEvent e) {
MessageHandler.addInfo("");
<DeepExtract>
tablePaste.setEnabled(false);
ClipboardData<DataTable> clipboardData = InMemoryClipboard.getData();
if (clipboardData != null) {
DataTable table = clipboardData.getData();
owner.setCursor(Cursor.getPredefinedCursor(Cursor.W... | hrider | positive | 4,972 |
private void startCutscene() {
getPlayfieldEl().setVisibility(false);
canvasEl.setVisibility(true);
canvasEl.showChrome(false);
canvasEl.createCutsceneField();
cutscene = CUTSCENES.get(Integer.valueOf(cutsceneId));
cutsceneSequenceId = -1;
frightModeTime = levelConfig.frightTotalTime;
getCutsceneFieldEl().createActors(... | private void startCutscene() {
getPlayfieldEl().setVisibility(false);
canvasEl.setVisibility(true);
canvasEl.showChrome(false);
canvasEl.createCutsceneField();
cutscene = CUTSCENES.get(Integer.valueOf(cutsceneId));
cutsceneSequenceId = -1;
frightModeTime = levelConfig.frightTotalTime;
getCutsceneFieldEl().createActors(... | google-pacman | positive | 4,973 |
public void copyPosAndAllele(Snp snp) throws DataInconsistencyException {
copyPosition(snp);
boolean snpHasBeenSeenInGWAS = false;
if (minorAllele_ != 'N' || majorAllele_ != 'N') {
snpHasBeenSeenInGWAS = true;
}
if (Pascal.set.withZScore_ && minorAllele_ != snp.getMinorAllele()) {
if (snp.getMinorAllele() != majorAllel... | public void copyPosAndAllele(Snp snp) throws DataInconsistencyException {
copyPosition(snp);
<DeepExtract>
boolean snpHasBeenSeenInGWAS = false;
if (minorAllele_ != 'N' || majorAllele_ != 'N') {
snpHasBeenSeenInGWAS = true;
}
if (Pascal.set.withZScore_ && minorAllele_ != snp.getMinorAllele()) {
if (snp.getMinorAllele()... | Pascal | positive | 4,975 |
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, PICK_PHOTO);
} | @Override
public void onClick(View v) {
<DeepExtract>
Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, PICK_PHOTO);
</DeepExtract>
} | ndn-photo-app | positive | 4,976 |
private void renderArc() {
batch.begin();
if (!pause) {
moveArcPosition();
adjustRotationIfNeccessary();
}
if (isThrusting) {
exhaustSprite.draw(batch);
}
sprite.draw(batch);
if (index == 0 && App.TUTORIAL_CONTROLLER.isForcedPlanet01()) {
markerScale = (markerScale + 0.01f) % 1f;
planetMarkerSprite.setPosition(sprite.g... | private void renderArc() {
batch.begin();
if (!pause) {
moveArcPosition();
adjustRotationIfNeccessary();
}
if (isThrusting) {
exhaustSprite.draw(batch);
}
<DeepExtract>
sprite.draw(batch);
if (index == 0 && App.TUTORIAL_CONTROLLER.isForcedPlanet01()) {
markerScale = (markerScale + 0.01f) % 1f;
planetMarkerSprite.setPos... | Alien-Ark | positive | 4,977 |
public RetCode macdExt(int startIdx, int endIdx, float[] inReal, int optInFastPeriod, MAType optInFastMAType, int optInSlowPeriod, MAType optInSlowMAType, int optInSignalPeriod, MAType optInSignalMAType, MInteger outBegIdx, MInteger outNBElement, double[] outMACD, double[] outMACDSignal, double[] outMACDHist) {
MIntege... | public RetCode macdExt(int startIdx, int endIdx, float[] inReal, int optInFastPeriod, MAType optInFastMAType, int optInSlowPeriod, MAType optInSlowMAType, int optInSignalPeriod, MAType optInSignalMAType, MInteger outBegIdx, MInteger outNBElement, double[] outMACD, double[] outMACDSignal, double[] outMACDHist) {
MIntege... | clj-ta-lib | positive | 4,978 |
public static void loadConfig(boolean shouldChange) {
mirrorEnabled = config.getBoolean("mirror-enabled", CATEGORY_SETTINGS, true, "Determines whether the mirror will be rendered.");
mirrorClouds = config.getBoolean("mirror-clouds", CATEGORY_SETTINGS, false, "Set whether the mirror should render clouds.");
mirrorFov = ... | public static void loadConfig(boolean shouldChange) {
mirrorEnabled = config.getBoolean("mirror-enabled", CATEGORY_SETTINGS, true, "Determines whether the mirror will be rendered.");
mirrorClouds = config.getBoolean("mirror-clouds", CATEGORY_SETTINGS, false, "Set whether the mirror should render clouds.");
mirrorFov = ... | MrCrayfishFurnitureMod | positive | 4,980 |
@Override
public void localeChange(LocaleChangeEvent event) {
titleLabel.setText(getTranslation("new.blog.post.title"));
contentLabel.setText(getTranslation("new.blog.post.content"));
save.setText(getTranslation("common.save"));
reset.setText(getTranslation("common.reset"));
} | @Override
public void localeChange(LocaleChangeEvent event) {
<DeepExtract>
titleLabel.setText(getTranslation("new.blog.post.title"));
contentLabel.setText(getTranslation("new.blog.post.content"));
save.setText(getTranslation("common.save"));
reset.setText(getTranslation("common.reset"));
</DeepExtract>
} | flow-demo | positive | 4,981 |
@Override
public void actionPerformed(ActionEvent e) {
try {
KeyStore keystore = keyStoreDialog.getKeyStore();
String alias = keyStoreDialog.getAlias();
if (keystore != null) {
String className = this.getParameter(AppletConfig.PARAM_APPLET_ACTION_EXECUTE.getKey());
AppletExecute appletExecute = AppletExecuteFactory.fac... | @Override
public void actionPerformed(ActionEvent e) {
<DeepExtract>
try {
KeyStore keystore = keyStoreDialog.getKeyStore();
String alias = keyStoreDialog.getAlias();
if (keystore != null) {
String className = this.getParameter(AppletConfig.PARAM_APPLET_ACTION_EXECUTE.getKey());
AppletExecute appletExecute = AppletExec... | certificate | positive | 4,983 |
@Override
public void handle(ActionEvent arg0) {
if (callbackBeforeSave == null)
return;
callbackBeforeSave.run();
FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Insert save path");
fileChooser.setInitialDirectory(new File(System.getProperty("user.home")));
fileChooser.getExtensionFilters().addAll(e... | @Override
public void handle(ActionEvent arg0) {
<DeepExtract>
if (callbackBeforeSave == null)
return;
callbackBeforeSave.run();
</DeepExtract>
FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Insert save path");
fileChooser.setInitialDirectory(new File(System.getProperty("user.home")));
fileChooser.g... | Dluid | positive | 4,984 |
protected void tearDown() throws Exception {
super.tearDown();
GeoMysqlAdapterTest.geoMySqlAdapter = null;
} | protected void tearDown() throws Exception {
super.tearDown();
<DeepExtract>
GeoMysqlAdapterTest.geoMySqlAdapter = null;
</DeepExtract>
} | opensoc-streaming | positive | 4,985 |
@Override
public void draw(Graphics2D g, int width, int height) {
Rectangle bounds = getOwner().getAbsoluteBackgroundBounds();
CSSDecoder dec = new CSSDecoder(getOwner().getVisualContext());
if (position == BackgroundPosition.LEFT)
imgx = 0;
else if (position == BackgroundPosition.RIGHT)
imgx = bounds.width - getIntrin... | @Override
public void draw(Graphics2D g, int width, int height) {
Rectangle bounds = getOwner().getAbsoluteBackgroundBounds();
<DeepExtract>
CSSDecoder dec = new CSSDecoder(getOwner().getVisualContext());
if (position == BackgroundPosition.LEFT)
imgx = 0;
else if (position == BackgroundPosition.RIGHT)
imgx = bounds.wid... | CSSBox | positive | 4,986 |
public Criteria andCategoryIdGreaterThan(Integer value) {
if (value == null) {
throw new RuntimeException("Value for " + "categoryId" + " cannot be null");
}
criteria.add(new Criterion("category_id >", value));
return (Criteria) this;
} | public Criteria andCategoryIdGreaterThan(Integer value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "categoryId" + " cannot be null");
}
criteria.add(new Criterion("category_id >", value));
</DeepExtract>
return (Criteria) this;
} | zheng-lite | positive | 4,988 |
public boolean isExecBlacklisted(String exec) {
try {
PreparedStatement pSt = connection.prepareStatement("SELECT count(*) FROM BlacklistedExec WHERE Command LIKE ?");
pSt.setString(1, exec);
try (ResultSet rs = pSt.executeQuery()) {
if (rs.next()) {
if (rs.getInt("count(*)") > 0) {
return true;
}
}
}
} catch (SQLExcep... | public boolean isExecBlacklisted(String exec) {
<DeepExtract>
try {
PreparedStatement pSt = connection.prepareStatement("SELECT count(*) FROM BlacklistedExec WHERE Command LIKE ?");
pSt.setString(1, exec);
try (ResultSet rs = pSt.executeQuery()) {
if (rs.next()) {
if (rs.getInt("count(*)") > 0) {
return true;
}
}
}
} c... | MCAntiMalware | positive | 4,989 |
public Builder setStop(int index, com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop.Builder builderForValue) {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
stop_ = new java.util.ArrayList<com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop>(stop_);
bitField0_ |= 0x00000004;
}
stop_.set(index, b... | public Builder setStop(int index, com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop.Builder builderForValue) {
<DeepExtract>
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
stop_ = new java.util.ArrayList<com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop>(stop_);
bitField0_ |= 0x00000004;
}
</De... | transit-wand | positive | 4,990 |
@Override
public String imageZoomOut(String relativeFilePath, int maxWidth, int maxHeight) {
String newRelativeFilePath = localAttachmentFileStoreService.imageZoomOut(relativeFilePath, maxWidth, maxHeight);
if (StringUtils.isBlank(bucketName)) {
return newRelativeFilePath;
}
boolean found = buildOssClient().doesObjectE... | @Override
public String imageZoomOut(String relativeFilePath, int maxWidth, int maxHeight) {
String newRelativeFilePath = localAttachmentFileStoreService.imageZoomOut(relativeFilePath, maxWidth, maxHeight);
<DeepExtract>
if (StringUtils.isBlank(bucketName)) {
return newRelativeFilePath;
}
boolean found = buildOssClient... | s2jh4net | positive | 4,991 |
private void readEngagement(ModelRootImpl modelRoot, JsonNode engagementNode, int readModelVersion) {
String engagementName = engagementNode.get("engagementName").asText(null);
String engagementType = engagementNode.get("engagementType").asText(null);
String clientName = engagementNode.get("clientName").asText(null);
S... | private void readEngagement(ModelRootImpl modelRoot, JsonNode engagementNode, int readModelVersion) {
String engagementName = engagementNode.get("engagementName").asText(null);
String engagementType = engagementNode.get("engagementType").asText(null);
String clientName = engagementNode.get("clientName").asText(null);
S... | solicitor | positive | 4,992 |
public void limparBusca() {
mTextoBusca = TextUtils.isEmpty(null) ? null : null;
getLoaderManager().restartLoader(0, null, this);
} | public void limparBusca() {
<DeepExtract>
mTextoBusca = TextUtils.isEmpty(null) ? null : null;
getLoaderManager().restartLoader(0, null, this);
</DeepExtract>
} | dominando_android | positive | 4,993 |
public Move setX(double x) {
this.x = x;
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __X_ISSET_ID, true);
return this;
} | public Move setX(double x) {
this.x = x;
<DeepExtract>
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __X_ISSET_ID, true);
</DeepExtract>
return this;
} | tiny-mmo | positive | 4,994 |
private void shouldHandleMultipleSessions(final int iteration) throws Exception {
if (client != null) {
client.close();
}
client = Vertx.vertx().createHttpClient(new HttpClientOptions().setMaxPoolSize(ACTIVE_CLIENT_COUNT));
final List<WebSocket> clientSockets = new ArrayList<>();
for (int i = 0; i < ACTIVE_CLIENT_COUNT... | private void shouldHandleMultipleSessions(final int iteration) throws Exception {
<DeepExtract>
if (client != null) {
client.close();
}
client = Vertx.vertx().createHttpClient(new HttpClientOptions().setMaxPoolSize(ACTIVE_CLIENT_COUNT));
</DeepExtract>
final List<WebSocket> clientSockets = new ArrayList<>();
for (int i... | babl | positive | 4,995 |
@RequestMapping(value = "/add", method = RequestMethod.PUT)
public JsonResponse addJob(@RequestBody final JobConfig config) {
if (Strings.isNullOrEmpty(config.getDependency()) && Strings.isNullOrEmpty(config.getCron())) {
return JsonResponse.notOk("Dependency or cron need to be configured,and only one be configured.");... | @RequestMapping(value = "/add", method = RequestMethod.PUT)
public JsonResponse addJob(@RequestBody final JobConfig config) {
if (Strings.isNullOrEmpty(config.getDependency()) && Strings.isNullOrEmpty(config.getCron())) {
return JsonResponse.notOk("Dependency or cron need to be configured,and only one be configured.");... | cronner | positive | 4,996 |
@Test
public void testOneToOne() throws IOException, DbException, TransactionAbortedException {
ArrayList<ArrayList<Integer>> sourceTuples = new ArrayList<ArrayList<Integer>>();
HeapFile source = SystemTestUtil.createRandomHeapFile(1, 1, null, sourceTuples);
assert sourceTuples.size() == 1;
ArrayList<ArrayList<Integer>... | @Test
public void testOneToOne() throws IOException, DbException, TransactionAbortedException {
<DeepExtract>
ArrayList<ArrayList<Integer>> sourceTuples = new ArrayList<ArrayList<Integer>>();
HeapFile source = SystemTestUtil.createRandomHeapFile(1, 1, null, sourceTuples);
assert sourceTuples.size() == 1;
ArrayList<Arra... | cs143-simpledb | positive | 4,997 |
private void toggleLines() {
hasLines = !hasLines;
data = new ComboLineColumnChartData(generateColumnData(), generateLineData());
if (hasAxes) {
Axis axisX = new Axis();
Axis axisY = new Axis().setHasLines(true);
if (hasAxesNames) {
axisX.setName("Axis X");
axisY.setName("Axis Y");
}
data.setAxisXBottom(axisX);
data.se... | private void toggleLines() {
hasLines = !hasLines;
<DeepExtract>
data = new ComboLineColumnChartData(generateColumnData(), generateLineData());
if (hasAxes) {
Axis axisX = new Axis();
Axis axisY = new Axis().setHasLines(true);
if (hasAxesNames) {
axisX.setName("Axis X");
axisY.setName("Axis Y");
}
data.setAxisXBottom(a... | hellocharts-android | positive | 4,998 |
public static void error() {
File f = new File(error);
if (f.canRead()) {
try {
Clip clip = AudioSystem.getClip();
AudioInputStream inputStream = AudioSystem.getAudioInputStream(f);
clip.open(inputStream);
clip.start();
} catch (Exception e) {
}
}
} | public static void error() {
<DeepExtract>
File f = new File(error);
if (f.canRead()) {
try {
Clip clip = AudioSystem.getClip();
AudioInputStream inputStream = AudioSystem.getAudioInputStream(f);
clip.open(inputStream);
clip.start();
} catch (Exception e) {
}
}
</DeepExtract>
} | AML-Project | positive | 4,999 |
protected GLM refitGaussianRegressor(int[] attrs, boolean[] selected, int[][] indices, double[][] values, double[] y, int maxNumIters) {
List<int[]> indicesList = new ArrayList<>();
List<double[]> valuesList = new ArrayList<>();
for (int j = 0; j < attrs.length; j++) {
if (selected[j]) {
indicesList.add(indices[j]);
va... | protected GLM refitGaussianRegressor(int[] attrs, boolean[] selected, int[][] indices, double[][] values, double[] y, int maxNumIters) {
List<int[]> indicesList = new ArrayList<>();
List<double[]> valuesList = new ArrayList<>();
for (int j = 0; j < attrs.length; j++) {
if (selected[j]) {
indicesList.add(indices[j]);
va... | mltk | positive | 5,000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.