id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4,000 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.open | public boolean open(boolean anim) {
if (!mEnabled) {
return false;
}
if (mOpened) {
return true;
}
if (!mShowing) {
show();
}
if (anim) {
animateOpen();
} else {
onEndOpen();
}
... | java | public boolean open(boolean anim) {
if (!mEnabled) {
return false;
}
if (mOpened) {
return true;
}
if (!mShowing) {
show();
}
if (anim) {
animateOpen();
} else {
onEndOpen();
}
... | [
"public",
"boolean",
"open",
"(",
"boolean",
"anim",
")",
"{",
"if",
"(",
"!",
"mEnabled",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"mOpened",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"!",
"mShowing",
")",
"{",
"show",
"(",
")",
... | Open the board.
@param anim pull-down animation.
@return boolean false, if the board is disabled. | [
"Open",
"the",
"board",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L385-L404 |
4,001 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setInitialTouchArea | public void setInitialTouchArea(int l, int t, int r, int b) {
mContentView.setTouchToOpen(l, t, r, b);
} | java | public void setInitialTouchArea(int l, int t, int r, int b) {
mContentView.setTouchToOpen(l, t, r, b);
} | [
"public",
"void",
"setInitialTouchArea",
"(",
"int",
"l",
",",
"int",
"t",
",",
"int",
"r",
",",
"int",
"b",
")",
"{",
"mContentView",
".",
"setTouchToOpen",
"(",
"l",
",",
"t",
",",
"r",
",",
"b",
")",
";",
"}"
] | Set the touch area where the user can touch to pull the board down.
@param l
@param t
@param r
@param b | [
"Set",
"the",
"touch",
"area",
"where",
"the",
"user",
"can",
"touch",
"to",
"pull",
"the",
"board",
"down",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L544-L546 |
4,002 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setHeaderMargin | public void setHeaderMargin(int l, int t, int r, int b) {
mHeader.setMargin(l, t, r, b);
} | java | public void setHeaderMargin(int l, int t, int r, int b) {
mHeader.setMargin(l, t, r, b);
} | [
"public",
"void",
"setHeaderMargin",
"(",
"int",
"l",
",",
"int",
"t",
",",
"int",
"r",
",",
"int",
"b",
")",
"{",
"mHeader",
".",
"setMargin",
"(",
"l",
",",
"t",
",",
"r",
",",
"b",
")",
";",
"}"
] | Set the margin of the header.
@param l
@param t
@param r
@param b | [
"Set",
"the",
"margin",
"of",
"the",
"header",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L556-L558 |
4,003 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setFooterMargin | public void setFooterMargin(int l, int t, int r, int b) {
mFooter.setMargin(l, t, r, b);
} | java | public void setFooterMargin(int l, int t, int r, int b) {
mFooter.setMargin(l, t, r, b);
} | [
"public",
"void",
"setFooterMargin",
"(",
"int",
"l",
",",
"int",
"t",
",",
"int",
"r",
",",
"int",
"b",
")",
"{",
"mFooter",
".",
"setMargin",
"(",
"l",
",",
"t",
",",
"r",
",",
"b",
")",
";",
"}"
] | Set the margin of the footer.
@param l
@param t
@param r
@param b | [
"Set",
"the",
"margin",
"of",
"the",
"footer",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L568-L570 |
4,004 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setBodyMargin | public void setBodyMargin(int l, int t, int r, int b) {
mBody.setMargin(l, t, r, b);
} | java | public void setBodyMargin(int l, int t, int r, int b) {
mBody.setMargin(l, t, r, b);
} | [
"public",
"void",
"setBodyMargin",
"(",
"int",
"l",
",",
"int",
"t",
",",
"int",
"r",
",",
"int",
"b",
")",
"{",
"mBody",
".",
"setMargin",
"(",
"l",
",",
"t",
",",
"r",
",",
"b",
")",
";",
"}"
] | Set the margin of the body.
@param l
@param t
@param r
@param b | [
"Set",
"the",
"margin",
"of",
"the",
"body",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L580-L582 |
4,005 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setRowMargin | public void setRowMargin(int l, int t, int r, int b) {
mRowMargin[0] = l; mRowMargin[1] = t; mRowMargin[2] = r; mRowMargin[3] = b;
} | java | public void setRowMargin(int l, int t, int r, int b) {
mRowMargin[0] = l; mRowMargin[1] = t; mRowMargin[2] = r; mRowMargin[3] = b;
} | [
"public",
"void",
"setRowMargin",
"(",
"int",
"l",
",",
"int",
"t",
",",
"int",
"r",
",",
"int",
"b",
")",
"{",
"mRowMargin",
"[",
"0",
"]",
"=",
"l",
";",
"mRowMargin",
"[",
"1",
"]",
"=",
"t",
";",
"mRowMargin",
"[",
"2",
"]",
"=",
"r",
";"... | Set the margin of each row.
@param l
@param t
@param r
@param b | [
"Set",
"the",
"margin",
"of",
"each",
"row",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L592-L594 |
4,006 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.addHeaderView | public void addHeaderView(View view, int index, ViewGroup.LayoutParams lp) {
mHeader.addView(view, index, lp);
} | java | public void addHeaderView(View view, int index, ViewGroup.LayoutParams lp) {
mHeader.addView(view, index, lp);
} | [
"public",
"void",
"addHeaderView",
"(",
"View",
"view",
",",
"int",
"index",
",",
"ViewGroup",
".",
"LayoutParams",
"lp",
")",
"{",
"mHeader",
".",
"addView",
"(",
"view",
",",
"index",
",",
"lp",
")",
";",
"}"
] | Add header view.
@param view
@param index
@param lp | [
"Add",
"header",
"view",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L666-L668 |
4,007 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.addFooterView | public void addFooterView(View view, int index, ViewGroup.LayoutParams lp) {
mFooter.addView(view, index, lp);
} | java | public void addFooterView(View view, int index, ViewGroup.LayoutParams lp) {
mFooter.addView(view, index, lp);
} | [
"public",
"void",
"addFooterView",
"(",
"View",
"view",
",",
"int",
"index",
",",
"ViewGroup",
".",
"LayoutParams",
"lp",
")",
"{",
"mFooter",
".",
"addView",
"(",
"view",
",",
"index",
",",
"lp",
")",
";",
"}"
] | Add footer view.
@param view
@param index
@param lp | [
"Add",
"footer",
"view",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L714-L716 |
4,008 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.addBodyView | public void addBodyView(View view, int index, ViewGroup.LayoutParams lp) {
mBody.addView(view, index, lp);
} | java | public void addBodyView(View view, int index, ViewGroup.LayoutParams lp) {
mBody.addView(view, index, lp);
} | [
"public",
"void",
"addBodyView",
"(",
"View",
"view",
",",
"int",
"index",
",",
"ViewGroup",
".",
"LayoutParams",
"lp",
")",
"{",
"mBody",
".",
"addView",
"(",
"view",
",",
"index",
",",
"lp",
")",
";",
"}"
] | Add body view.
@param view
@param index
@param lp | [
"Add",
"body",
"view",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L762-L764 |
4,009 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setHeaderDivider | public void setHeaderDivider(Drawable drawable) {
mHeaderDivider = drawable;
if (drawable != null) {
mHeaderDividerHeight = drawable.getIntrinsicHeight();
} else {
mHeaderDividerHeight = 0;
}
mContentView.setWillNotDraw(drawable == null);
mContentV... | java | public void setHeaderDivider(Drawable drawable) {
mHeaderDivider = drawable;
if (drawable != null) {
mHeaderDividerHeight = drawable.getIntrinsicHeight();
} else {
mHeaderDividerHeight = 0;
}
mContentView.setWillNotDraw(drawable == null);
mContentV... | [
"public",
"void",
"setHeaderDivider",
"(",
"Drawable",
"drawable",
")",
"{",
"mHeaderDivider",
"=",
"drawable",
";",
"if",
"(",
"drawable",
"!=",
"null",
")",
"{",
"mHeaderDividerHeight",
"=",
"drawable",
".",
"getIntrinsicHeight",
"(",
")",
";",
"}",
"else",
... | Set header divider.
@param drawable | [
"Set",
"header",
"divider",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L808-L817 |
4,010 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setFooterDivider | public void setFooterDivider(Drawable drawable) {
mFooterDivider = drawable;
if (drawable != null) {
mFooterDividerHeight = drawable.getIntrinsicHeight();
} else {
mFooterDividerHeight = 0;
}
mContentView.setWillNotDraw(drawable == null);
mContentV... | java | public void setFooterDivider(Drawable drawable) {
mFooterDivider = drawable;
if (drawable != null) {
mFooterDividerHeight = drawable.getIntrinsicHeight();
} else {
mFooterDividerHeight = 0;
}
mContentView.setWillNotDraw(drawable == null);
mContentV... | [
"public",
"void",
"setFooterDivider",
"(",
"Drawable",
"drawable",
")",
"{",
"mFooterDivider",
"=",
"drawable",
";",
"if",
"(",
"drawable",
"!=",
"null",
")",
"{",
"mFooterDividerHeight",
"=",
"drawable",
".",
"getIntrinsicHeight",
"(",
")",
";",
"}",
"else",
... | Set footer divider.
@param drawable | [
"Set",
"footer",
"divider",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L860-L869 |
4,011 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setClearView | public void setClearView(View view) {
mClearView = view;
if (view != null) {
view.setVisibility(mOpened ? VISIBLE : INVISIBLE);
view.setOnClickListener(mOnClickListenerClearView);
}
} | java | public void setClearView(View view) {
mClearView = view;
if (view != null) {
view.setVisibility(mOpened ? VISIBLE : INVISIBLE);
view.setOnClickListener(mOnClickListenerClearView);
}
} | [
"public",
"void",
"setClearView",
"(",
"View",
"view",
")",
"{",
"mClearView",
"=",
"view",
";",
"if",
"(",
"view",
"!=",
"null",
")",
"{",
"view",
".",
"setVisibility",
"(",
"mOpened",
"?",
"VISIBLE",
":",
"INVISIBLE",
")",
";",
"view",
".",
"setOnCli... | Set clear view. If clicked, all notifications will be canceled.
@param view | [
"Set",
"clear",
"view",
".",
"If",
"clicked",
"all",
"notifications",
"will",
"be",
"canceled",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1023-L1029 |
4,012 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setBoardPadding | public void setBoardPadding(int l, int t, int r, int b) {
mContentView.setPadding(l, t, r, b);
} | java | public void setBoardPadding(int l, int t, int r, int b) {
mContentView.setPadding(l, t, r, b);
} | [
"public",
"void",
"setBoardPadding",
"(",
"int",
"l",
",",
"int",
"t",
",",
"int",
"r",
",",
"int",
"b",
")",
"{",
"mContentView",
".",
"setPadding",
"(",
"l",
",",
"t",
",",
"r",
",",
"b",
")",
";",
"}"
] | Set the margin of the entire board.
@param l
@param t
@param r
@param b | [
"Set",
"the",
"margin",
"of",
"the",
"entire",
"board",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1087-L1089 |
4,013 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setBoardTranslationX | public void setBoardTranslationX(float x) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardTranslationX(this, x);
}
}
mContentView.setTranslationX(x);
} | java | public void setBoardTranslationX(float x) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardTranslationX(this, x);
}
}
mContentView.setTranslationX(x);
} | [
"public",
"void",
"setBoardTranslationX",
"(",
"float",
"x",
")",
"{",
"if",
"(",
"mListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"StateListener",
"l",
":",
"mListeners",
")",
"{",
"l",
".",
"onBoardTranslationX",
"(",
"this",
",",
"x",
")",
";",
"}"... | Set the x translation of this board.
@param x | [
"Set",
"the",
"x",
"translation",
"of",
"this",
"board",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1126-L1133 |
4,014 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setBoardTranslationY | public void setBoardTranslationY(float y) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardTranslationY(this, y);
}
}
mContentView.setTranslationY(y);
} | java | public void setBoardTranslationY(float y) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardTranslationY(this, y);
}
}
mContentView.setTranslationY(y);
} | [
"public",
"void",
"setBoardTranslationY",
"(",
"float",
"y",
")",
"{",
"if",
"(",
"mListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"StateListener",
"l",
":",
"mListeners",
")",
"{",
"l",
".",
"onBoardTranslationY",
"(",
"this",
",",
"y",
")",
";",
"}"... | Set the y translation of this board.
@param y | [
"Set",
"the",
"y",
"translation",
"of",
"this",
"board",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1149-L1156 |
4,015 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setBoardPivotX | public void setBoardPivotX(float x) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardPivotX(this, x);
}
}
mContentView.setPivotX(x);
} | java | public void setBoardPivotX(float x) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardPivotX(this, x);
}
}
mContentView.setPivotX(x);
} | [
"public",
"void",
"setBoardPivotX",
"(",
"float",
"x",
")",
"{",
"if",
"(",
"mListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"StateListener",
"l",
":",
"mListeners",
")",
"{",
"l",
".",
"onBoardPivotX",
"(",
"this",
",",
"x",
")",
";",
"}",
"}",
"... | Set the x location of pivot point around which this board is rotated.
@param x | [
"Set",
"the",
"x",
"location",
"of",
"pivot",
"point",
"around",
"which",
"this",
"board",
"is",
"rotated",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1172-L1179 |
4,016 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setBoardPivotY | public void setBoardPivotY(float y) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardPivotY(this, y);
}
}
mContentView.setPivotY(y);
} | java | public void setBoardPivotY(float y) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardPivotY(this, y);
}
}
mContentView.setPivotY(y);
} | [
"public",
"void",
"setBoardPivotY",
"(",
"float",
"y",
")",
"{",
"if",
"(",
"mListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"StateListener",
"l",
":",
"mListeners",
")",
"{",
"l",
".",
"onBoardPivotY",
"(",
"this",
",",
"y",
")",
";",
"}",
"}",
"... | Set the y location of pivot point around which this board is rotated.
@param y | [
"Set",
"the",
"y",
"location",
"of",
"pivot",
"point",
"around",
"which",
"this",
"board",
"is",
"rotated",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1195-L1202 |
4,017 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setBoardRotationX | public void setBoardRotationX(float x) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardRotationX(this, x);
}
}
mContentView.setRotationX(x);
} | java | public void setBoardRotationX(float x) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardRotationX(this, x);
}
}
mContentView.setRotationX(x);
} | [
"public",
"void",
"setBoardRotationX",
"(",
"float",
"x",
")",
"{",
"if",
"(",
"mListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"StateListener",
"l",
":",
"mListeners",
")",
"{",
"l",
".",
"onBoardRotationX",
"(",
"this",
",",
"x",
")",
";",
"}",
"}... | Set the x degree that this board is rotated.
@param x | [
"Set",
"the",
"x",
"degree",
"that",
"this",
"board",
"is",
"rotated",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1218-L1225 |
4,018 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setBoardRotationY | public void setBoardRotationY(float y) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardRotationY(this, y);
}
}
mContentView.setRotationY(y);
} | java | public void setBoardRotationY(float y) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardRotationY(this, y);
}
}
mContentView.setRotationY(y);
} | [
"public",
"void",
"setBoardRotationY",
"(",
"float",
"y",
")",
"{",
"if",
"(",
"mListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"StateListener",
"l",
":",
"mListeners",
")",
"{",
"l",
".",
"onBoardRotationY",
"(",
"this",
",",
"y",
")",
";",
"}",
"}... | Set the y degree that this board is rotated.
@param y | [
"Set",
"the",
"y",
"degree",
"that",
"this",
"board",
"is",
"rotated",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1241-L1248 |
4,019 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setBoardAlpha | public void setBoardAlpha(float alpha) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardAlpha(this, alpha);
}
}
mContentView.setAlpha(alpha);
} | java | public void setBoardAlpha(float alpha) {
if (mListeners != null) {
for (StateListener l : mListeners) {
l.onBoardAlpha(this, alpha);
}
}
mContentView.setAlpha(alpha);
} | [
"public",
"void",
"setBoardAlpha",
"(",
"float",
"alpha",
")",
"{",
"if",
"(",
"mListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"StateListener",
"l",
":",
"mListeners",
")",
"{",
"l",
".",
"onBoardAlpha",
"(",
"this",
",",
"alpha",
")",
";",
"}",
"}... | Set the opacity of this board.
@param alpha | [
"Set",
"the",
"opacity",
"of",
"this",
"board",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1264-L1271 |
4,020 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.dimAt | public void dimAt(float alpha) {
if (!mDimEnabled) {
return;
}
if (mDimView == null) {
mDimView = makeDimView();
}
if (!mDimView.isShown()) {
mDimView.setVisibility(VISIBLE);
mDimView.setBackgroundColor(mDimColor);
}
... | java | public void dimAt(float alpha) {
if (!mDimEnabled) {
return;
}
if (mDimView == null) {
mDimView = makeDimView();
}
if (!mDimView.isShown()) {
mDimView.setVisibility(VISIBLE);
mDimView.setBackgroundColor(mDimColor);
}
... | [
"public",
"void",
"dimAt",
"(",
"float",
"alpha",
")",
"{",
"if",
"(",
"!",
"mDimEnabled",
")",
"{",
"return",
";",
"}",
"if",
"(",
"mDimView",
"==",
"null",
")",
"{",
"mDimView",
"=",
"makeDimView",
"(",
")",
";",
"}",
"if",
"(",
"!",
"mDimView",
... | Set the dim-behind layer a specific opacity.
@param alpha | [
"Set",
"the",
"dim",
"-",
"behind",
"layer",
"a",
"specific",
"opacity",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1339-L1351 |
4,021 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.dim | public void dim(int duration) {
if (!mDimEnabled) {
return;
}
if (mDimView == null) {
mDimView = makeDimView();
}
if (!mDimView.isShown()) {
mDimView.setVisibility(VISIBLE);
mDimView.setBackgroundColor(mDimColor);
}
... | java | public void dim(int duration) {
if (!mDimEnabled) {
return;
}
if (mDimView == null) {
mDimView = makeDimView();
}
if (!mDimView.isShown()) {
mDimView.setVisibility(VISIBLE);
mDimView.setBackgroundColor(mDimColor);
}
... | [
"public",
"void",
"dim",
"(",
"int",
"duration",
")",
"{",
"if",
"(",
"!",
"mDimEnabled",
")",
"{",
"return",
";",
"}",
"if",
"(",
"mDimView",
"==",
"null",
")",
"{",
"mDimView",
"=",
"makeDimView",
"(",
")",
";",
"}",
"if",
"(",
"!",
"mDimView",
... | Start the dim animation.
@param duration | [
"Start",
"the",
"dim",
"animation",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1358-L1374 |
4,022 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.undim | public void undim(int duration) {
if (mDimView != null && mDimView.isShown() && mDimView.getAlpha() != 0) {
mDimView.animate().cancel();
mDimView.animate().alpha(0.0f)
.setListener(mDimAnimatorListener)
.setDuration(duration)
.start();
... | java | public void undim(int duration) {
if (mDimView != null && mDimView.isShown() && mDimView.getAlpha() != 0) {
mDimView.animate().cancel();
mDimView.animate().alpha(0.0f)
.setListener(mDimAnimatorListener)
.setDuration(duration)
.start();
... | [
"public",
"void",
"undim",
"(",
"int",
"duration",
")",
"{",
"if",
"(",
"mDimView",
"!=",
"null",
"&&",
"mDimView",
".",
"isShown",
"(",
")",
"&&",
"mDimView",
".",
"getAlpha",
"(",
")",
"!=",
"0",
")",
"{",
"mDimView",
".",
"animate",
"(",
")",
".... | Start the undim animation.
@param duration | [
"Start",
"the",
"undim",
"animation",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L1381-L1389 |
4,023 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/npm/YarnDependencyCollector.java | YarnDependencyCollector.isDescendant | private boolean isDescendant(DependencyInfo ancestor, DependencyInfo descendant){
for (DependencyInfo child : ancestor.getChildren()){
if (child.equals(descendant)){
return true;
}
if (isDescendant(child, descendant)){
return true;
... | java | private boolean isDescendant(DependencyInfo ancestor, DependencyInfo descendant){
for (DependencyInfo child : ancestor.getChildren()){
if (child.equals(descendant)){
return true;
}
if (isDescendant(child, descendant)){
return true;
... | [
"private",
"boolean",
"isDescendant",
"(",
"DependencyInfo",
"ancestor",
",",
"DependencyInfo",
"descendant",
")",
"{",
"for",
"(",
"DependencyInfo",
"child",
":",
"ancestor",
".",
"getChildren",
"(",
")",
")",
"{",
"if",
"(",
"child",
".",
"equals",
"(",
"d... | preventing circular dependencies by making sure the dependency is not a descendant of its own | [
"preventing",
"circular",
"dependencies",
"by",
"making",
"sure",
"the",
"dependency",
"is",
"not",
"a",
"descendant",
"of",
"its",
"own"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/npm/YarnDependencyCollector.java#L163-L173 |
4,024 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/gradle/GradleDependencyResolver.java | GradleDependencyResolver.copyProjectFolder | private boolean copyProjectFolder(String projectFolder, File buildGradleTempDirectory) {
try {
FileUtils.copyDirectory(new File(projectFolder), buildGradleTempDirectory);
} catch (IOException e) {
logger.error("Could not copy the folder {} to {} , the cause {}", projectFolder, bu... | java | private boolean copyProjectFolder(String projectFolder, File buildGradleTempDirectory) {
try {
FileUtils.copyDirectory(new File(projectFolder), buildGradleTempDirectory);
} catch (IOException e) {
logger.error("Could not copy the folder {} to {} , the cause {}", projectFolder, bu... | [
"private",
"boolean",
"copyProjectFolder",
"(",
"String",
"projectFolder",
",",
"File",
"buildGradleTempDirectory",
")",
"{",
"try",
"{",
"FileUtils",
".",
"copyDirectory",
"(",
"new",
"File",
"(",
"projectFolder",
")",
",",
"buildGradleTempDirectory",
")",
";",
"... | copy project to local temp directory | [
"copy",
"project",
"to",
"local",
"temp",
"directory"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/gradle/GradleDependencyResolver.java#L276-L285 |
4,025 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/gradle/GradleDependencyResolver.java | GradleDependencyResolver.appendTaskToBomFile | private boolean appendTaskToBomFile(File buildGradleTmp) {
FileReader fileReader;
BufferedReader bufferedReader = null;
InputStream inputStream = null;
boolean hasDependencies = false;
try {
// appending the task only if the build.gradle file has 'dependencies {' node... | java | private boolean appendTaskToBomFile(File buildGradleTmp) {
FileReader fileReader;
BufferedReader bufferedReader = null;
InputStream inputStream = null;
boolean hasDependencies = false;
try {
// appending the task only if the build.gradle file has 'dependencies {' node... | [
"private",
"boolean",
"appendTaskToBomFile",
"(",
"File",
"buildGradleTmp",
")",
"{",
"FileReader",
"fileReader",
";",
"BufferedReader",
"bufferedReader",
"=",
"null",
";",
"InputStream",
"inputStream",
"=",
"null",
";",
"boolean",
"hasDependencies",
"=",
"false",
"... | append new task to bom file | [
"append",
"new",
"task",
"to",
"bom",
"file"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/gradle/GradleDependencyResolver.java#L288-L344 |
4,026 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/gradle/GradleDependencyResolver.java | GradleDependencyResolver.runPreStepCommand | private void runPreStepCommand(File bomFile) {
String directory = bomFile.getParent();
String[] gradleCommandParams = gradleCli.getGradleCommandParams(GradleMvnCommand.COPY_DEPENDENCIES);
if (StringUtils.isNotEmpty(directory) && gradleCommandParams.length > 0) {
gradleCli.runGradleCm... | java | private void runPreStepCommand(File bomFile) {
String directory = bomFile.getParent();
String[] gradleCommandParams = gradleCli.getGradleCommandParams(GradleMvnCommand.COPY_DEPENDENCIES);
if (StringUtils.isNotEmpty(directory) && gradleCommandParams.length > 0) {
gradleCli.runGradleCm... | [
"private",
"void",
"runPreStepCommand",
"(",
"File",
"bomFile",
")",
"{",
"String",
"directory",
"=",
"bomFile",
".",
"getParent",
"(",
")",
";",
"String",
"[",
"]",
"gradleCommandParams",
"=",
"gradleCli",
".",
"getGradleCommandParams",
"(",
"GradleMvnCommand",
... | run pre step command gradle copyDependencies | [
"run",
"pre",
"step",
"command",
"gradle",
"copyDependencies"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/gradle/GradleDependencyResolver.java#L361-L369 |
4,027 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/gradle/GradleDependencyResolver.java | GradleDependencyResolver.removeTaskFromBomFile | private void removeTaskFromBomFile(File buildGradleTmp) {
FileReader fileReader;
BufferedReader bufferedReader = null;
try {
fileReader = new FileReader(buildGradleTmp);
bufferedReader = new BufferedReader(fileReader);
String currLine;
String origi... | java | private void removeTaskFromBomFile(File buildGradleTmp) {
FileReader fileReader;
BufferedReader bufferedReader = null;
try {
fileReader = new FileReader(buildGradleTmp);
bufferedReader = new BufferedReader(fileReader);
String currLine;
String origi... | [
"private",
"void",
"removeTaskFromBomFile",
"(",
"File",
"buildGradleTmp",
")",
"{",
"FileReader",
"fileReader",
";",
"BufferedReader",
"bufferedReader",
"=",
"null",
";",
"try",
"{",
"fileReader",
"=",
"new",
"FileReader",
"(",
"buildGradleTmp",
")",
";",
"buffer... | therefore, after running the copy-dependencies task removing it from the build.gradle file | [
"therefore",
"after",
"running",
"the",
"copy",
"-",
"dependencies",
"task",
"removing",
"it",
"from",
"the",
"build",
".",
"gradle",
"file"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/gradle/GradleDependencyResolver.java#L373-L404 |
4,028 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/hex/HexDependencyResolver.java | HexDependencyResolver.getSha1 | private String getSha1(String name, String version) {
if (dotHexCachePath == null || name == null || version == null){
logger.warn("Can't calculate SHA1, missing information: .hex-cache = {}, name = {}, version = {}", dotHexCachePath, name, version);
return null;
}
File t... | java | private String getSha1(String name, String version) {
if (dotHexCachePath == null || name == null || version == null){
logger.warn("Can't calculate SHA1, missing information: .hex-cache = {}, name = {}, version = {}", dotHexCachePath, name, version);
return null;
}
File t... | [
"private",
"String",
"getSha1",
"(",
"String",
"name",
",",
"String",
"version",
")",
"{",
"if",
"(",
"dotHexCachePath",
"==",
"null",
"||",
"name",
"==",
"null",
"||",
"version",
"==",
"null",
")",
"{",
"logger",
".",
"warn",
"(",
"\"Can't calculate SHA1,... | this method is used when there's a known version | [
"this",
"method",
"is",
"used",
"when",
"there",
"s",
"a",
"known",
"version"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/hex/HexDependencyResolver.java#L348-L361 |
4,029 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/hex/HexDependencyResolver.java | HexDependencyResolver.isDescendant | private boolean isDescendant(DependencyInfo parentDependency, DependencyInfo childDependency){
for (DependencyInfo dependencyInfo : childDependency.getChildren()){
if (dependencyInfo.equals(parentDependency))
return true;
return isDescendant(dependencyInfo, childDependenc... | java | private boolean isDescendant(DependencyInfo parentDependency, DependencyInfo childDependency){
for (DependencyInfo dependencyInfo : childDependency.getChildren()){
if (dependencyInfo.equals(parentDependency))
return true;
return isDescendant(dependencyInfo, childDependenc... | [
"private",
"boolean",
"isDescendant",
"(",
"DependencyInfo",
"parentDependency",
",",
"DependencyInfo",
"childDependency",
")",
"{",
"for",
"(",
"DependencyInfo",
"dependencyInfo",
":",
"childDependency",
".",
"getChildren",
"(",
")",
")",
"{",
"if",
"(",
"dependenc... | avoiding circular-dependencies | [
"avoiding",
"circular",
"-",
"dependencies"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/hex/HexDependencyResolver.java#L386-L393 |
4,030 | lamydev/Android-Notification | core/src/zemin/notification/NotificationView.java | NotificationView.pause | public void pause() {
if (hasState(TICKING) && !hasState(PAUSED)) {
if (DBG) Log.v(TAG, "pause. " + mEntries.size());
mContentView.animate().cancel();
addState(PAUSED);
cancel(-1);
}
} | java | public void pause() {
if (hasState(TICKING) && !hasState(PAUSED)) {
if (DBG) Log.v(TAG, "pause. " + mEntries.size());
mContentView.animate().cancel();
addState(PAUSED);
cancel(-1);
}
} | [
"public",
"void",
"pause",
"(",
")",
"{",
"if",
"(",
"hasState",
"(",
"TICKING",
")",
"&&",
"!",
"hasState",
"(",
"PAUSED",
")",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"pause. \"",
"+",
"mEntries",
".",
"size",
"(",
... | Pause. Any notification delivered here will be suspended. | [
"Pause",
".",
"Any",
"notification",
"delivered",
"here",
"will",
"be",
"suspended",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationView.java#L336-L343 |
4,031 | lamydev/Android-Notification | core/src/zemin/notification/NotificationView.java | NotificationView.setContentPadding | public void setContentPadding(int l, int t, int r, int b) {
mContentPadding[0] = l;
mContentPadding[1] = t;
mContentPadding[2] = r;
mContentPadding[3] = b;
} | java | public void setContentPadding(int l, int t, int r, int b) {
mContentPadding[0] = l;
mContentPadding[1] = t;
mContentPadding[2] = r;
mContentPadding[3] = b;
} | [
"public",
"void",
"setContentPadding",
"(",
"int",
"l",
",",
"int",
"t",
",",
"int",
"r",
",",
"int",
"b",
")",
"{",
"mContentPadding",
"[",
"0",
"]",
"=",
"l",
";",
"mContentPadding",
"[",
"1",
"]",
"=",
"t",
";",
"mContentPadding",
"[",
"2",
"]",... | Set padding.
@param l
@param t
@param r
@param b | [
"Set",
"padding",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationView.java#L476-L481 |
4,032 | lamydev/Android-Notification | core/src/zemin/notification/NotificationView.java | NotificationView.setContentMargin | public void setContentMargin(int l, int t, int r, int b) {
mContentMargin[0] = l;
mContentMargin[1] = t;
mContentMargin[2] = r;
mContentMargin[3] = b;
} | java | public void setContentMargin(int l, int t, int r, int b) {
mContentMargin[0] = l;
mContentMargin[1] = t;
mContentMargin[2] = r;
mContentMargin[3] = b;
} | [
"public",
"void",
"setContentMargin",
"(",
"int",
"l",
",",
"int",
"t",
",",
"int",
"r",
",",
"int",
"b",
")",
"{",
"mContentMargin",
"[",
"0",
"]",
"=",
"l",
";",
"mContentMargin",
"[",
"1",
"]",
"=",
"t",
";",
"mContentMargin",
"[",
"2",
"]",
"... | Set margin.
@param l
@param t
@param r
@param b | [
"Set",
"margin",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationView.java#L491-L496 |
4,033 | lamydev/Android-Notification | core/src/zemin/notification/NotificationView.java | NotificationView.setContentViewVisibility | public void setContentViewVisibility(int vis) {
if (DBG) Log.v(TAG, "setContentVisibility - vis=" + vis);
mContentView.setVisibility(vis);
} | java | public void setContentViewVisibility(int vis) {
if (DBG) Log.v(TAG, "setContentVisibility - vis=" + vis);
mContentView.setVisibility(vis);
} | [
"public",
"void",
"setContentViewVisibility",
"(",
"int",
"vis",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"setContentVisibility - vis=\"",
"+",
"vis",
")",
";",
"mContentView",
".",
"setVisibility",
"(",
"vis",
")",
";",
"}"
] | Set visibility of the contentView.
@param vis | [
"Set",
"visibility",
"of",
"the",
"contentView",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationView.java#L627-L630 |
4,034 | lamydev/Android-Notification | core/src/zemin/notification/NotificationView.java | NotificationView.setContentView | public void setContentView(int resId) {
if (mCurrentLayoutId != resId) {
View view = inflate(mContext, resId, null);
if (mDefaultContentView == null &&
resId == mCallback.getContentViewDefaultLayoutId(this)) {
mDefaultContentView = view;
mD... | java | public void setContentView(int resId) {
if (mCurrentLayoutId != resId) {
View view = inflate(mContext, resId, null);
if (mDefaultContentView == null &&
resId == mCallback.getContentViewDefaultLayoutId(this)) {
mDefaultContentView = view;
mD... | [
"public",
"void",
"setContentView",
"(",
"int",
"resId",
")",
"{",
"if",
"(",
"mCurrentLayoutId",
"!=",
"resId",
")",
"{",
"View",
"view",
"=",
"inflate",
"(",
"mContext",
",",
"resId",
",",
"null",
")",
";",
"if",
"(",
"mDefaultContentView",
"==",
"null... | Set contentView.
@param resId | [
"Set",
"contentView",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationView.java#L637-L648 |
4,035 | lamydev/Android-Notification | core/src/zemin/notification/NotificationView.java | NotificationView.setContentViewPivotX | public void setContentViewPivotX(float x) {
if (DBG) Log.v(TAG, "setContentViewPivotX - x=" + x);
mContentView.setPivotY(x);
} | java | public void setContentViewPivotX(float x) {
if (DBG) Log.v(TAG, "setContentViewPivotX - x=" + x);
mContentView.setPivotY(x);
} | [
"public",
"void",
"setContentViewPivotX",
"(",
"float",
"x",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"setContentViewPivotX - x=\"",
"+",
"x",
")",
";",
"mContentView",
".",
"setPivotY",
"(",
"x",
")",
";",
"}"
] | Set the x location of pivot point around which the contentView is rotated.
@param x | [
"Set",
"the",
"x",
"location",
"of",
"pivot",
"point",
"around",
"which",
"the",
"contentView",
"is",
"rotated",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationView.java#L898-L901 |
4,036 | lamydev/Android-Notification | core/src/zemin/notification/NotificationView.java | NotificationView.setContentViewPivotY | public void setContentViewPivotY(float y) {
if (DBG) Log.v(TAG, "setContentViewPivotY - y=" + y);
mContentView.setPivotY(y);
} | java | public void setContentViewPivotY(float y) {
if (DBG) Log.v(TAG, "setContentViewPivotY - y=" + y);
mContentView.setPivotY(y);
} | [
"public",
"void",
"setContentViewPivotY",
"(",
"float",
"y",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"setContentViewPivotY - y=\"",
"+",
"y",
")",
";",
"mContentView",
".",
"setPivotY",
"(",
"y",
")",
";",
"}"
] | Set the y location of pivot point around which the contentView is rotated.
@param y | [
"Set",
"the",
"y",
"location",
"of",
"pivot",
"point",
"around",
"which",
"the",
"contentView",
"is",
"rotated",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationView.java#L917-L920 |
4,037 | lamydev/Android-Notification | core/src/zemin/notification/NotificationView.java | NotificationView.animateContentViewRotationY | public void animateContentViewRotationY(float degree, float alpha,
Animator.AnimatorListener listener,
int duration) {
if (DBG) Log.v(TAG, "animateContentViewRotationY - " +
"degree=" + degree + ", al... | java | public void animateContentViewRotationY(float degree, float alpha,
Animator.AnimatorListener listener,
int duration) {
if (DBG) Log.v(TAG, "animateContentViewRotationY - " +
"degree=" + degree + ", al... | [
"public",
"void",
"animateContentViewRotationY",
"(",
"float",
"degree",
",",
"float",
"alpha",
",",
"Animator",
".",
"AnimatorListener",
"listener",
",",
"int",
"duration",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"animateContent... | Rotate the contentView to y degree with animation.
@param degree
@param alpha
@param listener
@param duration | [
"Rotate",
"the",
"contentView",
"to",
"y",
"degree",
"with",
"animation",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationView.java#L963-L977 |
4,038 | lamydev/Android-Notification | core/src/zemin/notification/NotificationView.java | NotificationView.animateContentViewTranslationX | public void animateContentViewTranslationX(float x, float alpha,
Animator.AnimatorListener listener,
int duration) {
if (DBG) Log.v(TAG, "animateContentViewTranslationX - " +
"x=" + x + ", alpha... | java | public void animateContentViewTranslationX(float x, float alpha,
Animator.AnimatorListener listener,
int duration) {
if (DBG) Log.v(TAG, "animateContentViewTranslationX - " +
"x=" + x + ", alpha... | [
"public",
"void",
"animateContentViewTranslationX",
"(",
"float",
"x",
",",
"float",
"alpha",
",",
"Animator",
".",
"AnimatorListener",
"listener",
",",
"int",
"duration",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"animateContentVi... | Move the contentView to x position with animation.
@param x
@param alpha
@param listener
@param duration | [
"Move",
"the",
"contentView",
"to",
"x",
"position",
"with",
"animation",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationView.java#L987-L1001 |
4,039 | lamydev/Android-Notification | core/src/zemin/notification/NotificationView.java | NotificationView.animateContentViewTranslationY | public void animateContentViewTranslationY(float y, float alpha,
Animator.AnimatorListener listener,
int duration) {
if (DBG) Log.v(TAG, "animateContentViewTranslationY - " +
"y=" + y + ", alpha... | java | public void animateContentViewTranslationY(float y, float alpha,
Animator.AnimatorListener listener,
int duration) {
if (DBG) Log.v(TAG, "animateContentViewTranslationY - " +
"y=" + y + ", alpha... | [
"public",
"void",
"animateContentViewTranslationY",
"(",
"float",
"y",
",",
"float",
"alpha",
",",
"Animator",
".",
"AnimatorListener",
"listener",
",",
"int",
"duration",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"animateContentVi... | Move the contentView to y position with animation.
@param y
@param alpha
@param listener
@param duration | [
"Move",
"the",
"contentView",
"to",
"y",
"position",
"with",
"animation",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationView.java#L1011-L1025 |
4,040 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/sbt/SbtDependencyResolver.java | SbtDependencyResolver.runPreStep | private void runPreStep(String folderPath) {
Cli cli = new Cli();
boolean success = false;
List<String> compileOutput = cli.runCmd(folderPath, cli.getCommandParams(SBT, COMPILE));
if (!compileOutput.isEmpty()) {
if (compileOutput.get(compileOutput.size() - 1).contains(SUCCESS... | java | private void runPreStep(String folderPath) {
Cli cli = new Cli();
boolean success = false;
List<String> compileOutput = cli.runCmd(folderPath, cli.getCommandParams(SBT, COMPILE));
if (!compileOutput.isEmpty()) {
if (compileOutput.get(compileOutput.size() - 1).contains(SUCCESS... | [
"private",
"void",
"runPreStep",
"(",
"String",
"folderPath",
")",
"{",
"Cli",
"cli",
"=",
"new",
"Cli",
"(",
")",
";",
"boolean",
"success",
"=",
"false",
";",
"List",
"<",
"String",
">",
"compileOutput",
"=",
"cli",
".",
"runCmd",
"(",
"folderPath",
... | creating the xml report using 'sbt "compile"' command | [
"creating",
"the",
"xml",
"report",
"using",
"sbt",
"compile",
"command"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/sbt/SbtDependencyResolver.java#L199-L211 |
4,041 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/sbt/SbtDependencyResolver.java | SbtDependencyResolver.findTargetFolders | private Collection<String> findTargetFolders(String folderPath) {
logger.debug("Scanning target folder {}", folderPath);
Cli cli = new Cli();
List<String> lines;
List<String> targetFolders = new LinkedList<>();
lines = cli.runCmd(folderPath, cli.getCommandParams(SBT, TARGET));
... | java | private Collection<String> findTargetFolders(String folderPath) {
logger.debug("Scanning target folder {}", folderPath);
Cli cli = new Cli();
List<String> lines;
List<String> targetFolders = new LinkedList<>();
lines = cli.runCmd(folderPath, cli.getCommandParams(SBT, TARGET));
... | [
"private",
"Collection",
"<",
"String",
">",
"findTargetFolders",
"(",
"String",
"folderPath",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Scanning target folder {}\"",
",",
"folderPath",
")",
";",
"Cli",
"cli",
"=",
"new",
"Cli",
"(",
")",
";",
"List",
"<",
... | Trying to get all the paths of target folders | [
"Trying",
"to",
"get",
"all",
"the",
"paths",
"of",
"target",
"folders"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/sbt/SbtDependencyResolver.java#L214-L246 |
4,042 | whitesource/fs-agent | src/main/java/org/whitesource/agent/utils/FilesScanner.java | FilesScanner.getDirectoryContent | public String[] getDirectoryContent(String scannerBaseDir, String[] includes, String[] excludes, boolean followSymlinks, boolean globCaseSensitive, boolean scanDirectories) {
File file = new File(scannerBaseDir);
String[] fileNames;
if (file.exists() && file.isDirectory()) {
Director... | java | public String[] getDirectoryContent(String scannerBaseDir, String[] includes, String[] excludes, boolean followSymlinks, boolean globCaseSensitive, boolean scanDirectories) {
File file = new File(scannerBaseDir);
String[] fileNames;
if (file.exists() && file.isDirectory()) {
Director... | [
"public",
"String",
"[",
"]",
"getDirectoryContent",
"(",
"String",
"scannerBaseDir",
",",
"String",
"[",
"]",
"includes",
",",
"String",
"[",
"]",
"excludes",
",",
"boolean",
"followSymlinks",
",",
"boolean",
"globCaseSensitive",
",",
"boolean",
"scanDirectories"... | get the content of directory by includes, excludes, followSymlinks and globCaseSensitive, the scanDirectories property define if the scanner will scan to find directories | [
"get",
"the",
"content",
"of",
"directory",
"by",
"includes",
"excludes",
"followSymlinks",
"and",
"globCaseSensitive",
"the",
"scanDirectories",
"property",
"define",
"if",
"the",
"scanner",
"will",
"scan",
"to",
"find",
"directories"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/utils/FilesScanner.java#L45-L66 |
4,043 | nomis/slf4j-android | src/main/java/uk/uuid/slf4j/android/CategoryMap.java | CategoryMap.get | final LoggerConfig get(String name) {
final LoggerConfig config = new LoggerConfig();
if (categories.isEmpty()) {
config.merge(LoggerConfig.DEFAULT);
return config;
}
if (name == null) {
name = "";
}
while (true) {
final int index = name.lastIndexOf('.');
if (config.merge(categories.get(n... | java | final LoggerConfig get(String name) {
final LoggerConfig config = new LoggerConfig();
if (categories.isEmpty()) {
config.merge(LoggerConfig.DEFAULT);
return config;
}
if (name == null) {
name = "";
}
while (true) {
final int index = name.lastIndexOf('.');
if (config.merge(categories.get(n... | [
"final",
"LoggerConfig",
"get",
"(",
"String",
"name",
")",
"{",
"final",
"LoggerConfig",
"config",
"=",
"new",
"LoggerConfig",
"(",
")",
";",
"if",
"(",
"categories",
".",
"isEmpty",
"(",
")",
")",
"{",
"config",
".",
"merge",
"(",
"LoggerConfig",
".",
... | Returns the merged config of all matching category names for the given input, using the defaults if no categories match. | [
"Returns",
"the",
"merged",
"config",
"of",
"all",
"matching",
"category",
"names",
"for",
"the",
"given",
"input",
"using",
"the",
"defaults",
"if",
"no",
"categories",
"match",
"."
] | e2b72adce8187663e95208e9be8f4647792fb4c1 | https://github.com/nomis/slf4j-android/blob/e2b72adce8187663e95208e9be8f4647792fb4c1/src/main/java/uk/uuid/slf4j/android/CategoryMap.java#L42-L69 |
4,044 | nomis/slf4j-android | src/main/java/uk/uuid/slf4j/android/CategoryMap.java | CategoryMap.put | final void put(final String name, final LoggerConfig value) {
LoggerConfig config = categories.get(name);
if (config != null) {
config.merge(value);
} else {
categories.put(name, value);
}
} | java | final void put(final String name, final LoggerConfig value) {
LoggerConfig config = categories.get(name);
if (config != null) {
config.merge(value);
} else {
categories.put(name, value);
}
} | [
"final",
"void",
"put",
"(",
"final",
"String",
"name",
",",
"final",
"LoggerConfig",
"value",
")",
"{",
"LoggerConfig",
"config",
"=",
"categories",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"config",
"!=",
"null",
")",
"{",
"config",
".",
"merge"... | Add a category to the config map. | [
"Add",
"a",
"category",
"to",
"the",
"config",
"map",
"."
] | e2b72adce8187663e95208e9be8f4647792fb4c1 | https://github.com/nomis/slf4j-android/blob/e2b72adce8187663e95208e9be8f4647792fb4c1/src/main/java/uk/uuid/slf4j/android/CategoryMap.java#L74-L81 |
4,045 | nomis/slf4j-android | src/main/java/uk/uuid/slf4j/android/LoggerFactory.java | LoggerFactory.createTag | static final String createTag(final String name) {
if (name.length() <= MAX_TAG_LEN) {
return name;
}
final char[] tag = name.toCharArray();
final int arrayLen = tag.length;
int len = 0;
int mark = 0;
for (int i = 0; i < arrayLen; i++, len++) {
if (tag[i] == '.') {
len = mark;
if (tag[len... | java | static final String createTag(final String name) {
if (name.length() <= MAX_TAG_LEN) {
return name;
}
final char[] tag = name.toCharArray();
final int arrayLen = tag.length;
int len = 0;
int mark = 0;
for (int i = 0; i < arrayLen; i++, len++) {
if (tag[i] == '.') {
len = mark;
if (tag[len... | [
"static",
"final",
"String",
"createTag",
"(",
"final",
"String",
"name",
")",
"{",
"if",
"(",
"name",
".",
"length",
"(",
")",
"<=",
"MAX_TAG_LEN",
")",
"{",
"return",
"name",
";",
"}",
"final",
"char",
"[",
"]",
"tag",
"=",
"name",
".",
"toCharArra... | Create a compatible logging tag for Android based on the logger name. | [
"Create",
"a",
"compatible",
"logging",
"tag",
"for",
"Android",
"based",
"on",
"the",
"logger",
"name",
"."
] | e2b72adce8187663e95208e9be8f4647792fb4c1 | https://github.com/nomis/slf4j-android/blob/e2b72adce8187663e95208e9be8f4647792fb4c1/src/main/java/uk/uuid/slf4j/android/LoggerFactory.java#L88-L137 |
4,046 | goshippo/shippo-java-client | src/main/java/com/shippo/model/Batch.java | Batch.all | public static Batch[] all() throws AuthenticationException, InvalidRequestException, APIConnectionException,
APIException, UnsupportedEncodingException, MalformedURLException {
List<Batch> all_batches = new ArrayList<Batch>();
Map<String, String> params = new HashMap<String, String>();
while (true) {
Map<St... | java | public static Batch[] all() throws AuthenticationException, InvalidRequestException, APIConnectionException,
APIException, UnsupportedEncodingException, MalformedURLException {
List<Batch> all_batches = new ArrayList<Batch>();
Map<String, String> params = new HashMap<String, String>();
while (true) {
Map<St... | [
"public",
"static",
"Batch",
"[",
"]",
"all",
"(",
")",
"throws",
"AuthenticationException",
",",
"InvalidRequestException",
",",
"APIConnectionException",
",",
"APIException",
",",
"UnsupportedEncodingException",
",",
"MalformedURLException",
"{",
"List",
"<",
"Batch",... | Get all batches created in the account.
@return Array of Batch object | [
"Get",
"all",
"batches",
"created",
"in",
"the",
"account",
"."
] | eecf801c7e07a627c3677a331c0cfcf36cb1678b | https://github.com/goshippo/shippo-java-client/blob/eecf801c7e07a627c3677a331c0cfcf36cb1678b/src/main/java/com/shippo/model/Batch.java#L154-L174 |
4,047 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java | JDBCPersistenceManagerImpl.isSchemaValid | private boolean isSchemaValid() throws SQLException {
logger.entering(CLASSNAME, "isSchemaValid");
Connection conn = getConnectionToDefaultSchema();
DatabaseMetaData dbmd = conn.getMetaData();
ResultSet rs = dbmd.getSchemas();
while(rs.next()) {
if (schema.equalsIgnoreCase(rs.getString("TABLE_SCHEM")... | java | private boolean isSchemaValid() throws SQLException {
logger.entering(CLASSNAME, "isSchemaValid");
Connection conn = getConnectionToDefaultSchema();
DatabaseMetaData dbmd = conn.getMetaData();
ResultSet rs = dbmd.getSchemas();
while(rs.next()) {
if (schema.equalsIgnoreCase(rs.getString("TABLE_SCHEM")... | [
"private",
"boolean",
"isSchemaValid",
"(",
")",
"throws",
"SQLException",
"{",
"logger",
".",
"entering",
"(",
"CLASSNAME",
",",
"\"isSchemaValid\"",
")",
";",
"Connection",
"conn",
"=",
"getConnectionToDefaultSchema",
"(",
")",
";",
"DatabaseMetaData",
"dbmd",
"... | Checks if the default schema JBATCH or the schema defined in batch-config exists.
@return true if the schema exists, false otherwise.
@throws SQLException | [
"Checks",
"if",
"the",
"default",
"schema",
"JBATCH",
"or",
"the",
"schema",
"defined",
"in",
"batch",
"-",
"config",
"exists",
"."
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java#L164-L179 |
4,048 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java | JDBCPersistenceManagerImpl.createSchema | private void createSchema() throws SQLException {
logger.entering(CLASSNAME, "createSchema");
Connection conn = getConnectionToDefaultSchema();
logger.log(Level.INFO, schema + " schema does not exists. Trying to create it.");
PreparedStatement ps = null;
ps = conn.prepareStatement("CREATE SCHEMA " + sc... | java | private void createSchema() throws SQLException {
logger.entering(CLASSNAME, "createSchema");
Connection conn = getConnectionToDefaultSchema();
logger.log(Level.INFO, schema + " schema does not exists. Trying to create it.");
PreparedStatement ps = null;
ps = conn.prepareStatement("CREATE SCHEMA " + sc... | [
"private",
"void",
"createSchema",
"(",
")",
"throws",
"SQLException",
"{",
"logger",
".",
"entering",
"(",
"CLASSNAME",
",",
"\"createSchema\"",
")",
";",
"Connection",
"conn",
"=",
"getConnectionToDefaultSchema",
"(",
")",
";",
"logger",
".",
"log",
"(",
"Le... | Creates the default schema JBATCH or the schema defined in batch-config.
@throws SQLException | [
"Creates",
"the",
"default",
"schema",
"JBATCH",
"or",
"the",
"schema",
"defined",
"in",
"batch",
"-",
"config",
"."
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java#L195-L206 |
4,049 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java | JDBCPersistenceManagerImpl.checkAllTables | private void checkAllTables() throws SQLException {
logger.entering(CLASSNAME, "checkAllTables");
createIfNotExists(CHECKPOINTDATA_TABLE, CREATE_TAB_CHECKPOINTDATA);
executeStatement(CREATE_CHECKPOINTDATA_INDEX);
createIfNotExists(JOBINSTANCEDATA_TABLE, CREATE_TAB_JOBINSTANCEDATA);
createIfNotExists(... | java | private void checkAllTables() throws SQLException {
logger.entering(CLASSNAME, "checkAllTables");
createIfNotExists(CHECKPOINTDATA_TABLE, CREATE_TAB_CHECKPOINTDATA);
executeStatement(CREATE_CHECKPOINTDATA_INDEX);
createIfNotExists(JOBINSTANCEDATA_TABLE, CREATE_TAB_JOBINSTANCEDATA);
createIfNotExists(... | [
"private",
"void",
"checkAllTables",
"(",
")",
"throws",
"SQLException",
"{",
"logger",
".",
"entering",
"(",
"CLASSNAME",
",",
"\"checkAllTables\"",
")",
";",
"createIfNotExists",
"(",
"CHECKPOINTDATA_TABLE",
",",
"CREATE_TAB_CHECKPOINTDATA",
")",
";",
"executeStatem... | Checks if all the runtime batch table exists. If not, it creates them.
@throws SQLException | [
"Checks",
"if",
"all",
"the",
"runtime",
"batch",
"table",
"exists",
".",
"If",
"not",
"it",
"creates",
"them",
"."
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java#L213-L229 |
4,050 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java | JDBCPersistenceManagerImpl.createIfNotExists | private void createIfNotExists(String tableName, String createTableStatement) throws SQLException {
logger.entering(CLASSNAME, "createIfNotExists", new Object[] {tableName, createTableStatement});
Connection conn = getConnection();
DatabaseMetaData dbmd = conn.getMetaData();
ResultSet rs = dbmd.getTables(... | java | private void createIfNotExists(String tableName, String createTableStatement) throws SQLException {
logger.entering(CLASSNAME, "createIfNotExists", new Object[] {tableName, createTableStatement});
Connection conn = getConnection();
DatabaseMetaData dbmd = conn.getMetaData();
ResultSet rs = dbmd.getTables(... | [
"private",
"void",
"createIfNotExists",
"(",
"String",
"tableName",
",",
"String",
"createTableStatement",
")",
"throws",
"SQLException",
"{",
"logger",
".",
"entering",
"(",
"CLASSNAME",
",",
"\"createIfNotExists\"",
",",
"new",
"Object",
"[",
"]",
"{",
"tableNam... | Creates tableName using the createTableStatement DDL.
@param tableName
@param createTableStatement
@throws SQLException | [
"Creates",
"tableName",
"using",
"the",
"createTableStatement",
"DDL",
"."
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java#L238-L253 |
4,051 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java | JDBCPersistenceManagerImpl.executeStatement | private void executeStatement(String statement) throws SQLException {
logger.entering(CLASSNAME, "executeStatement", statement);
Connection conn = getConnection();
PreparedStatement ps = null;
ps = conn.prepareStatement(statement);
ps.executeUpdate();
cleanupConnection(conn, ps);
logger.exiti... | java | private void executeStatement(String statement) throws SQLException {
logger.entering(CLASSNAME, "executeStatement", statement);
Connection conn = getConnection();
PreparedStatement ps = null;
ps = conn.prepareStatement(statement);
ps.executeUpdate();
cleanupConnection(conn, ps);
logger.exiti... | [
"private",
"void",
"executeStatement",
"(",
"String",
"statement",
")",
"throws",
"SQLException",
"{",
"logger",
".",
"entering",
"(",
"CLASSNAME",
",",
"\"executeStatement\"",
",",
"statement",
")",
";",
"Connection",
"conn",
"=",
"getConnection",
"(",
")",
";"... | Executes the provided SQL statement
@param statement
@throws SQLException | [
"Executes",
"the",
"provided",
"SQL",
"statement"
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java#L261-L272 |
4,052 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java | JDBCPersistenceManagerImpl.setSchemaOnConnection | private void setSchemaOnConnection(Connection connection) throws SQLException {
logger.finest("Entering " + CLASSNAME +".setSchemaOnConnection()");
String dbProductName = connection.getMetaData().getDatabaseProductName();
if (!"Oracle".equals(dbProductName) && !"Microsoft SQL Server".equals(dbProductName)) {
... | java | private void setSchemaOnConnection(Connection connection) throws SQLException {
logger.finest("Entering " + CLASSNAME +".setSchemaOnConnection()");
String dbProductName = connection.getMetaData().getDatabaseProductName();
if (!"Oracle".equals(dbProductName) && !"Microsoft SQL Server".equals(dbProductName)) {
... | [
"private",
"void",
"setSchemaOnConnection",
"(",
"Connection",
"connection",
")",
"throws",
"SQLException",
"{",
"logger",
".",
"finest",
"(",
"\"Entering \"",
"+",
"CLASSNAME",
"+",
"\".setSchemaOnConnection()\"",
")",
";",
"String",
"dbProductName",
"=",
"connection... | Set the default schema JBATCH or the schema defined in batch-config on the connection object.
@param connection
@throws SQLException | [
"Set",
"the",
"default",
"schema",
"JBATCH",
"or",
"the",
"schema",
"defined",
"in",
"batch",
"-",
"config",
"on",
"the",
"connection",
"object",
"."
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java#L392-L409 |
4,053 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java | JDBCPersistenceManagerImpl.queryCheckpointData | private CheckpointData queryCheckpointData(Object key) {
logger.entering(CLASSNAME, "queryCheckpointData", new Object[] {key, SELECT_CHECKPOINTDATA});
Connection conn = null;
PreparedStatement statement = null;
ResultSet rs = null;
ObjectInputStream objectIn = null;
CheckpointData data = null;
try ... | java | private CheckpointData queryCheckpointData(Object key) {
logger.entering(CLASSNAME, "queryCheckpointData", new Object[] {key, SELECT_CHECKPOINTDATA});
Connection conn = null;
PreparedStatement statement = null;
ResultSet rs = null;
ObjectInputStream objectIn = null;
CheckpointData data = null;
try ... | [
"private",
"CheckpointData",
"queryCheckpointData",
"(",
"Object",
"key",
")",
"{",
"logger",
".",
"entering",
"(",
"CLASSNAME",
",",
"\"queryCheckpointData\"",
",",
"new",
"Object",
"[",
"]",
"{",
"key",
",",
"SELECT_CHECKPOINTDATA",
"}",
")",
";",
"Connection"... | select data from DB table
@param key - the IPersistenceDataKey object
@return List of serializable objects store in the DB table
Ex. select id, obj from tablename where id = ? | [
"select",
"data",
"from",
"DB",
"table"
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java#L419-L453 |
4,054 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java | JDBCPersistenceManagerImpl.insertCheckpointData | private <T> void insertCheckpointData(Object key, T value) {
logger.entering(CLASSNAME, "insertCheckpointData", new Object[] {key, value});
Connection conn = null;
PreparedStatement statement = null;
ByteArrayOutputStream baos = null;
ObjectOutputStream oout = null;
byte[] b;
try {
conn = getCo... | java | private <T> void insertCheckpointData(Object key, T value) {
logger.entering(CLASSNAME, "insertCheckpointData", new Object[] {key, value});
Connection conn = null;
PreparedStatement statement = null;
ByteArrayOutputStream baos = null;
ObjectOutputStream oout = null;
byte[] b;
try {
conn = getCo... | [
"private",
"<",
"T",
">",
"void",
"insertCheckpointData",
"(",
"Object",
"key",
",",
"T",
"value",
")",
"{",
"logger",
".",
"entering",
"(",
"CLASSNAME",
",",
"\"insertCheckpointData\"",
",",
"new",
"Object",
"[",
"]",
"{",
"key",
",",
"value",
"}",
")",... | insert data to DB table
@param key - the IPersistenceDataKey object
@param value - serializable object to store
Ex. insert into tablename values(?, ?) | [
"insert",
"data",
"to",
"DB",
"table"
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java#L464-L505 |
4,055 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java | JDBCPersistenceManagerImpl.cleanupConnection | private void cleanupConnection(Connection conn, ResultSet rs, PreparedStatement statement) {
logger.logp(Level.FINEST, CLASSNAME, "cleanupConnection", "Entering", new Object[] {conn, rs==null ? "<null>" : rs, statement==null ? "<null>" : statement});
if (statement != null) {
try {
statement.close();... | java | private void cleanupConnection(Connection conn, ResultSet rs, PreparedStatement statement) {
logger.logp(Level.FINEST, CLASSNAME, "cleanupConnection", "Entering", new Object[] {conn, rs==null ? "<null>" : rs, statement==null ? "<null>" : statement});
if (statement != null) {
try {
statement.close();... | [
"private",
"void",
"cleanupConnection",
"(",
"Connection",
"conn",
",",
"ResultSet",
"rs",
",",
"PreparedStatement",
"statement",
")",
"{",
"logger",
".",
"logp",
"(",
"Level",
".",
"FINEST",
",",
"CLASSNAME",
",",
"\"cleanupConnection\"",
",",
"\"Entering\"",
"... | closes connection, result set and statement
@param conn - connection object to close
@param rs - result set object to close
@param statement - statement object to close | [
"closes",
"connection",
"result",
"set",
"and",
"statement"
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java#L568-L602 |
4,056 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java | JDBCPersistenceManagerImpl.getPartitionLevelJobInstanceWildCard | private String getPartitionLevelJobInstanceWildCard(long rootJobInstanceId, String stepName) {
StringBuilder sb = new StringBuilder(":");
sb.append(Long.toString(rootJobInstanceId));
sb.append(":");
sb.append(stepName);
sb.append(":%");
return sb.toString();
} | java | private String getPartitionLevelJobInstanceWildCard(long rootJobInstanceId, String stepName) {
StringBuilder sb = new StringBuilder(":");
sb.append(Long.toString(rootJobInstanceId));
sb.append(":");
sb.append(stepName);
sb.append(":%");
return sb.toString();
} | [
"private",
"String",
"getPartitionLevelJobInstanceWildCard",
"(",
"long",
"rootJobInstanceId",
",",
"String",
"stepName",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"\":\"",
")",
";",
"sb",
".",
"append",
"(",
"Long",
".",
"toString",
"("... | Obviously would be nice if the code writing this special format were in the same place as this
code reading it.
Assumes format like:
JOBINSTANCEDATA
(jobinstanceid name, ...)
1197,"partitionMetrics","NOTSET"
1198,":1197:step1:0","NOTSET"
1199,":1197:step1:1","NOTSET"
1200,":1197:step2:0","NOTSET"
@param rootJobExec... | [
"Obviously",
"would",
"be",
"nice",
"if",
"the",
"code",
"writing",
"this",
"special",
"format",
"were",
"in",
"the",
"same",
"place",
"as",
"this",
"code",
"reading",
"it",
"."
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/impl/JDBCPersistenceManagerImpl.java#L1919-L1928 |
4,057 | overview/mime-types | src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java | MimeTypeDetector.unwrapFutureString | private static String unwrapFutureString(CompletionStage<String> future) throws GetBytesException {
try {
return future.toCompletableFuture().get();
} catch (Throwable e) {
if (e.getCause() instanceof GetBytesException) {
throw (GetBytesException) e.getCause();
... | java | private static String unwrapFutureString(CompletionStage<String> future) throws GetBytesException {
try {
return future.toCompletableFuture().get();
} catch (Throwable e) {
if (e.getCause() instanceof GetBytesException) {
throw (GetBytesException) e.getCause();
... | [
"private",
"static",
"String",
"unwrapFutureString",
"(",
"CompletionStage",
"<",
"String",
">",
"future",
")",
"throws",
"GetBytesException",
"{",
"try",
"{",
"return",
"future",
".",
"toCompletableFuture",
"(",
")",
".",
"get",
"(",
")",
";",
"}",
"catch",
... | Waits for a CompletionStage, for non-async methods. | [
"Waits",
"for",
"a",
"CompletionStage",
"for",
"non",
"-",
"async",
"methods",
"."
] | d5c45302049c0cd5e634a50954304d8ddeb9abb4 | https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L82-L91 |
4,058 | overview/mime-types | src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java | MimeTypeDetector.detectMimeTypeAsync | public CompletionStage<String> detectMimeTypeAsync(String filename, Supplier<CompletionStage<byte[]>> getBytesAsync) {
Set<WeightedMimeType> weightedMimeTypes = filenameToWmts(filename);
Set<String> globMimeTypes = findBestMimeTypes(weightedMimeTypes);
if (globMimeTypes.size() == 1) {
return CompletableFutu... | java | public CompletionStage<String> detectMimeTypeAsync(String filename, Supplier<CompletionStage<byte[]>> getBytesAsync) {
Set<WeightedMimeType> weightedMimeTypes = filenameToWmts(filename);
Set<String> globMimeTypes = findBestMimeTypes(weightedMimeTypes);
if (globMimeTypes.size() == 1) {
return CompletableFutu... | [
"public",
"CompletionStage",
"<",
"String",
">",
"detectMimeTypeAsync",
"(",
"String",
"filename",
",",
"Supplier",
"<",
"CompletionStage",
"<",
"byte",
"[",
"]",
">",
">",
"getBytesAsync",
")",
"{",
"Set",
"<",
"WeightedMimeType",
">",
"weightedMimeTypes",
"=",... | Detects a MIME type from a filename and bytes.
<p>
This method follows the Shared Mime Info database's
<a href="http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html#idm140625828606432">Recommended
Checking Order</a>. The only difference: it tests for
<tt>text/plain</tt> thoroughly, ... | [
"Detects",
"a",
"MIME",
"type",
"from",
"a",
"filename",
"and",
"bytes",
"."
] | d5c45302049c0cd5e634a50954304d8ddeb9abb4 | https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L130-L159 |
4,059 | overview/mime-types | src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java | MimeTypeDetector.detectMimeType | public String detectMimeType(String filename, Callable<byte[]> getBytes) throws GetBytesException {
Supplier<CompletionStage<byte[]>> supplier = () -> {
try {
return CompletableFuture.completedFuture(getBytes.call());
} catch (Exception ex) {
throw new CompletionEx... | java | public String detectMimeType(String filename, Callable<byte[]> getBytes) throws GetBytesException {
Supplier<CompletionStage<byte[]>> supplier = () -> {
try {
return CompletableFuture.completedFuture(getBytes.call());
} catch (Exception ex) {
throw new CompletionEx... | [
"public",
"String",
"detectMimeType",
"(",
"String",
"filename",
",",
"Callable",
"<",
"byte",
"[",
"]",
">",
"getBytes",
")",
"throws",
"GetBytesException",
"{",
"Supplier",
"<",
"CompletionStage",
"<",
"byte",
"[",
"]",
">",
">",
"supplier",
"=",
"(",
")... | Synchronously detects a MIME type from a filename and bytes.
<p>
This method follows the Shared Mime Info database's
<a href="http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html#idm140625828606432">Recommended
Checking Order</a>. The only difference: it tests for
<tt>text/plain</tt... | [
"Synchronously",
"detects",
"a",
"MIME",
"type",
"from",
"a",
"filename",
"and",
"bytes",
"."
] | d5c45302049c0cd5e634a50954304d8ddeb9abb4 | https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L192-L201 |
4,060 | overview/mime-types | src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java | MimeTypeDetector.detectMimeType | public String detectMimeType(String filename, final InputStream is) throws GetBytesException {
Callable<byte[]> getBytes = new Callable<byte[]>() {
public byte[] call() throws IOException {
return inputStreamToFirstBytes(is);
}
};
return detectMimeType(filename, getBytes);
} | java | public String detectMimeType(String filename, final InputStream is) throws GetBytesException {
Callable<byte[]> getBytes = new Callable<byte[]>() {
public byte[] call() throws IOException {
return inputStreamToFirstBytes(is);
}
};
return detectMimeType(filename, getBytes);
} | [
"public",
"String",
"detectMimeType",
"(",
"String",
"filename",
",",
"final",
"InputStream",
"is",
")",
"throws",
"GetBytesException",
"{",
"Callable",
"<",
"byte",
"[",
"]",
">",
"getBytes",
"=",
"new",
"Callable",
"<",
"byte",
"[",
"]",
">",
"(",
")",
... | Determines the MIME type of a file with a given input stream.
<p>
The InputStream must exist. It must point to the beginning of the file
contents. And {@link java.io.InputStream#markSupported()} must return
{@literal true}. (When in doubt, pass a
{@link java.io.BufferedInputStream}.)
</p>
@param filename Name of file... | [
"Determines",
"the",
"MIME",
"type",
"of",
"a",
"file",
"with",
"a",
"given",
"input",
"stream",
"."
] | d5c45302049c0cd5e634a50954304d8ddeb9abb4 | https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L219-L227 |
4,061 | overview/mime-types | src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java | MimeTypeDetector.detectMimeTypeAsync | public CompletionStage<String> detectMimeTypeAsync(final Path path) {
String filename = path.getFileName().toString();
Supplier<CompletionStage<byte[]>> supplier = () -> {
final CompletableFuture<byte[]> futureBytes = new CompletableFuture<byte[]>();
AsynchronousFileChannel channel;
... | java | public CompletionStage<String> detectMimeTypeAsync(final Path path) {
String filename = path.getFileName().toString();
Supplier<CompletionStage<byte[]>> supplier = () -> {
final CompletableFuture<byte[]> futureBytes = new CompletableFuture<byte[]>();
AsynchronousFileChannel channel;
... | [
"public",
"CompletionStage",
"<",
"String",
">",
"detectMimeTypeAsync",
"(",
"final",
"Path",
"path",
")",
"{",
"String",
"filename",
"=",
"path",
".",
"getFileName",
"(",
")",
".",
"toString",
"(",
")",
";",
"Supplier",
"<",
"CompletionStage",
"<",
"byte",
... | Determines the MIME type of a file.
<p>
The file must exist and be readable.
</p>
<p>
The CompletionStage may return a {@link ExecutionException} which is caused
by a {@link GetBytesException}. (That, in turn, will wrap a
{@link IOException} or other exception that prevented getBytesAsync() from
working.
</p>
@param... | [
"Determines",
"the",
"MIME",
"type",
"of",
"a",
"file",
"."
] | d5c45302049c0cd5e634a50954304d8ddeb9abb4 | https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L279-L312 |
4,062 | overview/mime-types | src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java | MimeTypeDetector.matchletMagicCompareOr | private boolean matchletMagicCompareOr(int nMatchlets, int firstMatchletOffset, byte[] data) {
for (int i = 0, matchletOffset = firstMatchletOffset; i < nMatchlets; i++, matchletOffset += 32) {
if (matchletMagicCompare(matchletOffset, data)) {
return true;
}
}
... | java | private boolean matchletMagicCompareOr(int nMatchlets, int firstMatchletOffset, byte[] data) {
for (int i = 0, matchletOffset = firstMatchletOffset; i < nMatchlets; i++, matchletOffset += 32) {
if (matchletMagicCompare(matchletOffset, data)) {
return true;
}
}
... | [
"private",
"boolean",
"matchletMagicCompareOr",
"(",
"int",
"nMatchlets",
",",
"int",
"firstMatchletOffset",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"matchletOffset",
"=",
"firstMatchletOffset",
";",
"i",
"<",
"nMatchl... | Returns whether one of the specified matchlets matches the data. | [
"Returns",
"whether",
"one",
"of",
"the",
"specified",
"matchlets",
"matches",
"the",
"data",
"."
] | d5c45302049c0cd5e634a50954304d8ddeb9abb4 | https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L391-L399 |
4,063 | overview/mime-types | src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java | MimeTypeDetector.subArraysEqual | private boolean subArraysEqual(byte[] a, int aStart, byte[] b, int bStart, int len) {
for (int i = aStart, j = bStart; len > 0; i++, j++, len--) {
if (a[i] != b[j]) {
return false;
}
}
return true;
} | java | private boolean subArraysEqual(byte[] a, int aStart, byte[] b, int bStart, int len) {
for (int i = aStart, j = bStart; len > 0; i++, j++, len--) {
if (a[i] != b[j]) {
return false;
}
}
return true;
} | [
"private",
"boolean",
"subArraysEqual",
"(",
"byte",
"[",
"]",
"a",
",",
"int",
"aStart",
",",
"byte",
"[",
"]",
"b",
",",
"int",
"bStart",
",",
"int",
"len",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"aStart",
",",
"j",
"=",
"bStart",
";",
"len",
... | Returns true if subarrays are equal. | [
"Returns",
"true",
"if",
"subarrays",
"are",
"equal",
"."
] | d5c45302049c0cd5e634a50954304d8ddeb9abb4 | https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L404-L412 |
4,064 | overview/mime-types | src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java | MimeTypeDetector.subArraysEqualWithMask | private boolean subArraysEqualWithMask(byte[] a, int aStart, byte[] b, int bStart, byte[] mask, int maskStart, int len) {
for (int i = aStart, j = bStart, k = maskStart; len > 0; i++, j++, k++, len--) {
if ((a[i] & mask[k]) != (b[j] & mask[k])) {
return false;
}
}... | java | private boolean subArraysEqualWithMask(byte[] a, int aStart, byte[] b, int bStart, byte[] mask, int maskStart, int len) {
for (int i = aStart, j = bStart, k = maskStart; len > 0; i++, j++, k++, len--) {
if ((a[i] & mask[k]) != (b[j] & mask[k])) {
return false;
}
}... | [
"private",
"boolean",
"subArraysEqualWithMask",
"(",
"byte",
"[",
"]",
"a",
",",
"int",
"aStart",
",",
"byte",
"[",
"]",
"b",
",",
"int",
"bStart",
",",
"byte",
"[",
"]",
"mask",
",",
"int",
"maskStart",
",",
"int",
"len",
")",
"{",
"for",
"(",
"in... | Returns true if subarrays are equal, with the given mask.
<p>
The mask must have length <tt>len</tt>.
</p> | [
"Returns",
"true",
"if",
"subarrays",
"are",
"equal",
"with",
"the",
"given",
"mask",
"."
] | d5c45302049c0cd5e634a50954304d8ddeb9abb4 | https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L421-L429 |
4,065 | overview/mime-types | src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java | MimeTypeDetector.matchletMagicCompare | private boolean matchletMagicCompare(int offset, byte[] data) {
if (oneMatchletMagicEquals(offset, data)) {
int nChildren = content.getInt(offset + 24);
if (nChildren > 0) {
int firstChildOffset = content.getInt(offset + 28);
return matchletMagicCompareOr(nC... | java | private boolean matchletMagicCompare(int offset, byte[] data) {
if (oneMatchletMagicEquals(offset, data)) {
int nChildren = content.getInt(offset + 24);
if (nChildren > 0) {
int firstChildOffset = content.getInt(offset + 28);
return matchletMagicCompareOr(nC... | [
"private",
"boolean",
"matchletMagicCompare",
"(",
"int",
"offset",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"oneMatchletMagicEquals",
"(",
"offset",
",",
"data",
")",
")",
"{",
"int",
"nChildren",
"=",
"content",
".",
"getInt",
"(",
"offset",
... | Returns whether data satisfies the matchlet and its children. | [
"Returns",
"whether",
"data",
"satisfies",
"the",
"matchlet",
"and",
"its",
"children",
"."
] | d5c45302049c0cd5e634a50954304d8ddeb9abb4 | https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L466-L479 |
4,066 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/impl/RetryHandler.java | RetryHandler.isRetryable | private boolean isRetryable(Exception e)
{
final String mName = "isRetryable";
String exClassName = e.getClass().getName();
boolean retVal = containsException(_retryIncludeExceptions, e) && !containsException(_retryExcludeExceptions, e);
if(logger.isLoggable(Level.FINE))
... | java | private boolean isRetryable(Exception e)
{
final String mName = "isRetryable";
String exClassName = e.getClass().getName();
boolean retVal = containsException(_retryIncludeExceptions, e) && !containsException(_retryExcludeExceptions, e);
if(logger.isLoggable(Level.FINE))
... | [
"private",
"boolean",
"isRetryable",
"(",
"Exception",
"e",
")",
"{",
"final",
"String",
"mName",
"=",
"\"isRetryable\"",
";",
"String",
"exClassName",
"=",
"e",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
";",
"boolean",
"retVal",
"=",
"containsE... | Check the retryable exception lists to determine whether
the given Exception is retryable. | [
"Check",
"the",
"retryable",
"exception",
"lists",
"to",
"determine",
"whether",
"the",
"given",
"Exception",
"is",
"retryable",
"."
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/impl/RetryHandler.java#L327-L339 |
4,067 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.spi/src/main/java/com/ibm/jbatch/spi/BatchSPIManager.java | BatchSPIManager.registerPlatformMode | public void registerPlatformMode(PlatformMode mode) {
platformMode = mode;
if (mode.equals(PlatformMode.EE)) {
logger.config("Batch configured in EE mode by SPI, taking precedence over properties file");
} else if (mode.equals(PlatformMode.SE)) {
logger.config("Batch configured in SE mode by SPI, t... | java | public void registerPlatformMode(PlatformMode mode) {
platformMode = mode;
if (mode.equals(PlatformMode.EE)) {
logger.config("Batch configured in EE mode by SPI, taking precedence over properties file");
} else if (mode.equals(PlatformMode.SE)) {
logger.config("Batch configured in SE mode by SPI, t... | [
"public",
"void",
"registerPlatformMode",
"(",
"PlatformMode",
"mode",
")",
"{",
"platformMode",
"=",
"mode",
";",
"if",
"(",
"mode",
".",
"equals",
"(",
"PlatformMode",
".",
"EE",
")",
")",
"{",
"logger",
".",
"config",
"(",
"\"Batch configured in EE mode by ... | Override properties-file based config with programmatic setting of SE or EE
platform mode.
Note that by not calling this method, we do not get a given default behavior,
we simply defer to looking at other config mechanisms (properties files, etc.)
@param mode - Configures the batch runtime in EE mode or SE mode. | [
"Override",
"properties",
"-",
"file",
"based",
"config",
"with",
"programmatic",
"setting",
"of",
"SE",
"or",
"EE",
"platform",
"mode",
"."
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.spi/src/main/java/com/ibm/jbatch/spi/BatchSPIManager.java#L123-L132 |
4,068 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/impl/SkipHandler.java | SkipHandler.isSkippable | private boolean isSkippable(Exception e)
{
final String mName = "isSkippable";
String exClassName = e.getClass().getName();
boolean retVal = containsSkippable(_skipIncludeExceptions, e) && !containsSkippable(_skipExcludeExceptions, e);
if(logger.isLoggable(Level.FINE))
logger.... | java | private boolean isSkippable(Exception e)
{
final String mName = "isSkippable";
String exClassName = e.getClass().getName();
boolean retVal = containsSkippable(_skipIncludeExceptions, e) && !containsSkippable(_skipExcludeExceptions, e);
if(logger.isLoggable(Level.FINE))
logger.... | [
"private",
"boolean",
"isSkippable",
"(",
"Exception",
"e",
")",
"{",
"final",
"String",
"mName",
"=",
"\"isSkippable\"",
";",
"String",
"exClassName",
"=",
"e",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
";",
"boolean",
"retVal",
"=",
"containsS... | Check the skipCount and skippable exception lists to determine whether
the given Exception is skippable. | [
"Check",
"the",
"skipCount",
"and",
"skippable",
"exception",
"lists",
"to",
"determine",
"whether",
"the",
"given",
"Exception",
"is",
"skippable",
"."
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/impl/SkipHandler.java#L273-L285 |
4,069 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/impl/SkipHandler.java | SkipHandler.containsSkippable | private boolean containsSkippable(Set<String> skipList, Exception e)
{
final String mName = "containsSkippable";
boolean retVal = false;
for ( Iterator it = skipList.iterator(); it.hasNext(); ) {
String exClassName = (String) it.next();
try {
ClassLoader tccl... | java | private boolean containsSkippable(Set<String> skipList, Exception e)
{
final String mName = "containsSkippable";
boolean retVal = false;
for ( Iterator it = skipList.iterator(); it.hasNext(); ) {
String exClassName = (String) it.next();
try {
ClassLoader tccl... | [
"private",
"boolean",
"containsSkippable",
"(",
"Set",
"<",
"String",
">",
"skipList",
",",
"Exception",
"e",
")",
"{",
"final",
"String",
"mName",
"=",
"\"containsSkippable\"",
";",
"boolean",
"retVal",
"=",
"false",
";",
"for",
"(",
"Iterator",
"it",
"=",
... | Check whether given exception is in skippable exception list | [
"Check",
"whether",
"given",
"exception",
"is",
"in",
"skippable",
"exception",
"list"
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/impl/SkipHandler.java#L290-L310 |
4,070 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/impl/ChunkStepControllerImpl.java | ChunkStepControllerImpl.processItem | private Object processItem(Object itemRead) {
logger.entering(sourceClass, "processItem", itemRead);
Object processedItem = null;
// if no processor defined for this chunk
if (processorProxy == null){
return itemRead;
}
try {
// call process listeners before and after the actual process ... | java | private Object processItem(Object itemRead) {
logger.entering(sourceClass, "processItem", itemRead);
Object processedItem = null;
// if no processor defined for this chunk
if (processorProxy == null){
return itemRead;
}
try {
// call process listeners before and after the actual process ... | [
"private",
"Object",
"processItem",
"(",
"Object",
"itemRead",
")",
"{",
"logger",
".",
"entering",
"(",
"sourceClass",
",",
"\"processItem\"",
",",
"itemRead",
")",
";",
"Object",
"processedItem",
"=",
"null",
";",
"// if no processor defined for this chunk\r",
"if... | Process an item previously read by the reader
@param itemRead
the item read
@return the processed item | [
"Process",
"an",
"item",
"previously",
"read",
"by",
"the",
"reader"
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/impl/ChunkStepControllerImpl.java#L394-L463 |
4,071 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/servicesmanager/ServicesManagerImpl.java | ServicesManagerImpl.initPlatformSEorEE | private void initPlatformSEorEE() {
String seMode = serviceImplClassNames.get(Name.JAVA_EDITION_IS_SE_DUMMY_SERVICE);
if (seMode.equalsIgnoreCase("true")) {
platformMode = PlatformMode.SE;
batchConfigImpl.setJ2seMode(true);
} else {
platformMode = PlatformMode.EE;
batchConfigImpl.setJ2seMode(fa... | java | private void initPlatformSEorEE() {
String seMode = serviceImplClassNames.get(Name.JAVA_EDITION_IS_SE_DUMMY_SERVICE);
if (seMode.equalsIgnoreCase("true")) {
platformMode = PlatformMode.SE;
batchConfigImpl.setJ2seMode(true);
} else {
platformMode = PlatformMode.EE;
batchConfigImpl.setJ2seMode(fa... | [
"private",
"void",
"initPlatformSEorEE",
"(",
")",
"{",
"String",
"seMode",
"=",
"serviceImplClassNames",
".",
"get",
"(",
"Name",
".",
"JAVA_EDITION_IS_SE_DUMMY_SERVICE",
")",
";",
"if",
"(",
"seMode",
".",
"equalsIgnoreCase",
"(",
"\"true\"",
")",
")",
"{",
... | Push hardened config value onto batchConfigImpl and cache the value in a field. | [
"Push",
"hardened",
"config",
"value",
"onto",
"batchConfigImpl",
"and",
"cache",
"the",
"value",
"in",
"a",
"field",
"."
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/servicesmanager/ServicesManagerImpl.java#L285-L294 |
4,072 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/jsl/util/ValidatorHelper.java | ValidatorHelper.getXJCLSchema | public static synchronized Schema getXJCLSchema() {
if (schema == null) {
try {
URL url = ValidatorHelper.class.getResource("/" + SCHEMA_LOCATION);
schema = sf.newSchema(url);
} catch (SAXException e) {
throw new RuntimeException(e);
... | java | public static synchronized Schema getXJCLSchema() {
if (schema == null) {
try {
URL url = ValidatorHelper.class.getResource("/" + SCHEMA_LOCATION);
schema = sf.newSchema(url);
} catch (SAXException e) {
throw new RuntimeException(e);
... | [
"public",
"static",
"synchronized",
"Schema",
"getXJCLSchema",
"(",
")",
"{",
"if",
"(",
"schema",
"==",
"null",
")",
"{",
"try",
"{",
"URL",
"url",
"=",
"ValidatorHelper",
".",
"class",
".",
"getResource",
"(",
"\"/\"",
"+",
"SCHEMA_LOCATION",
")",
";",
... | This method must be synchronized as SchemaFactory is not thread-safe | [
"This",
"method",
"must",
"be",
"synchronized",
"as",
"SchemaFactory",
"is",
"not",
"thread",
"-",
"safe"
] | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/jsl/util/ValidatorHelper.java#L39-L49 |
4,073 | WASdev/standards.jsr352.jbatch | com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/impl/SplitControllerImpl.java | SplitControllerImpl.buildSubJobBatchWorkUnits | private void buildSubJobBatchWorkUnits() {
List<Flow> flows = this.split.getFlows();
parallelBatchWorkUnits = new ArrayList<BatchFlowInSplitWorkUnit>();
// Build all sub jobs from flows in split
synchronized (subJobs) {
for (Flow flow : flows) {
subJobs.add(PartitionedStepBuilder.buildFlowInS... | java | private void buildSubJobBatchWorkUnits() {
List<Flow> flows = this.split.getFlows();
parallelBatchWorkUnits = new ArrayList<BatchFlowInSplitWorkUnit>();
// Build all sub jobs from flows in split
synchronized (subJobs) {
for (Flow flow : flows) {
subJobs.add(PartitionedStepBuilder.buildFlowInS... | [
"private",
"void",
"buildSubJobBatchWorkUnits",
"(",
")",
"{",
"List",
"<",
"Flow",
">",
"flows",
"=",
"this",
".",
"split",
".",
"getFlows",
"(",
")",
";",
"parallelBatchWorkUnits",
"=",
"new",
"ArrayList",
"<",
"BatchFlowInSplitWorkUnit",
">",
"(",
")",
";... | Note we restart all flows. There is no concept of "the flow completed". It is only steps
within the flows that may have already completed and so may not have needed to be rerun. | [
"Note",
"we",
"restart",
"all",
"flows",
".",
"There",
"is",
"no",
"concept",
"of",
"the",
"flow",
"completed",
".",
"It",
"is",
"only",
"steps",
"within",
"the",
"flows",
"that",
"may",
"have",
"already",
"completed",
"and",
"so",
"may",
"not",
"have",
... | e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f | https://github.com/WASdev/standards.jsr352.jbatch/blob/e267e79dccd4f0bd4bf9c2abc41a8a47b65be28f/com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/impl/SplitControllerImpl.java#L138-L163 |
4,074 | weld/api | weld-spi/src/main/java/org/jboss/weld/bootstrap/api/SingletonProvider.java | SingletonProvider.initializeWithDefaultScope | private static void initializeWithDefaultScope() {
try {
Class<?> aClass = Class.forName(DEFAULT_SCOPE_FACTORY);
INSTANCE = (SingletonProvider) aClass.newInstance();
} catch (Exception e) {
throw new RuntimeException(e);
}
} | java | private static void initializeWithDefaultScope() {
try {
Class<?> aClass = Class.forName(DEFAULT_SCOPE_FACTORY);
INSTANCE = (SingletonProvider) aClass.newInstance();
} catch (Exception e) {
throw new RuntimeException(e);
}
} | [
"private",
"static",
"void",
"initializeWithDefaultScope",
"(",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"aClass",
"=",
"Class",
".",
"forName",
"(",
"DEFAULT_SCOPE_FACTORY",
")",
";",
"INSTANCE",
"=",
"(",
"SingletonProvider",
")",
"aClass",
".",
"newI... | Initialize with the default instance | [
"Initialize",
"with",
"the",
"default",
"instance"
] | d28bafe36798e2c1dc6a69b6b9df14fd600f97d9 | https://github.com/weld/api/blob/d28bafe36798e2c1dc6a69b6b9df14fd600f97d9/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/SingletonProvider.java#L75-L82 |
4,075 | weld/api | weld-spi/src/main/java/org/jboss/weld/bootstrap/api/SingletonProvider.java | SingletonProvider.initialize | public static void initialize(SingletonProvider instance) {
synchronized (SingletonProvider.class) {
if (INSTANCE == null) {
INSTANCE = instance;
} else {
throw new RuntimeException("SingletonProvider is already initialized with " + INSTANCE);
... | java | public static void initialize(SingletonProvider instance) {
synchronized (SingletonProvider.class) {
if (INSTANCE == null) {
INSTANCE = instance;
} else {
throw new RuntimeException("SingletonProvider is already initialized with " + INSTANCE);
... | [
"public",
"static",
"void",
"initialize",
"(",
"SingletonProvider",
"instance",
")",
"{",
"synchronized",
"(",
"SingletonProvider",
".",
"class",
")",
"{",
"if",
"(",
"INSTANCE",
"==",
"null",
")",
"{",
"INSTANCE",
"=",
"instance",
";",
"}",
"else",
"{",
"... | Initialize with an explicit instance
@param instance the explicit instance | [
"Initialize",
"with",
"an",
"explicit",
"instance"
] | d28bafe36798e2c1dc6a69b6b9df14fd600f97d9 | https://github.com/weld/api/blob/d28bafe36798e2c1dc6a69b6b9df14fd600f97d9/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/SingletonProvider.java#L89-L97 |
4,076 | googlegenomics/dataflow-java | src/main/java/com/google/cloud/genomics/dataflow/functions/pca/PCoAnalysis.java | PCoAnalysis.getPcaData | private List<GraphResult> getPcaData(double[][] data, BiMap<Integer, String> dataNames) {
int rows = data.length;
int cols = data.length;
// Center the similarity matrix.
double matrixSum = 0;
double[] rowSums = new double[rows];
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; ... | java | private List<GraphResult> getPcaData(double[][] data, BiMap<Integer, String> dataNames) {
int rows = data.length;
int cols = data.length;
// Center the similarity matrix.
double matrixSum = 0;
double[] rowSums = new double[rows];
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; ... | [
"private",
"List",
"<",
"GraphResult",
">",
"getPcaData",
"(",
"double",
"[",
"]",
"[",
"]",
"data",
",",
"BiMap",
"<",
"Integer",
",",
"String",
">",
"dataNames",
")",
"{",
"int",
"rows",
"=",
"data",
".",
"length",
";",
"int",
"cols",
"=",
"data",
... | Convert the similarity matrix to an Eigen matrix. | [
"Convert",
"the",
"similarity",
"matrix",
"to",
"an",
"Eigen",
"matrix",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/functions/pca/PCoAnalysis.java#L127-L196 |
4,077 | googlegenomics/dataflow-java | src/main/java/com/google/cloud/genomics/dataflow/readers/bam/BAMShard.java | BAMShard.addBin | public void addBin(List<Chunk> chunksToAdd, long lastLocus) {
assert chunks != null;
contig = new Contig(contig.referenceName, contig.start, lastLocus);
chunks.addAll(chunksToAdd);
updateSpan();
} | java | public void addBin(List<Chunk> chunksToAdd, long lastLocus) {
assert chunks != null;
contig = new Contig(contig.referenceName, contig.start, lastLocus);
chunks.addAll(chunksToAdd);
updateSpan();
} | [
"public",
"void",
"addBin",
"(",
"List",
"<",
"Chunk",
">",
"chunksToAdd",
",",
"long",
"lastLocus",
")",
"{",
"assert",
"chunks",
"!=",
"null",
";",
"contig",
"=",
"new",
"Contig",
"(",
"contig",
".",
"referenceName",
",",
"contig",
".",
"start",
",",
... | Appends chunks from another bin to the list and moved the end position. | [
"Appends",
"chunks",
"from",
"another",
"bin",
"to",
"the",
"list",
"and",
"moved",
"the",
"end",
"position",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/readers/bam/BAMShard.java#L71-L76 |
4,078 | googlegenomics/dataflow-java | src/main/java/htsjdk/samtools/BAMShardIndexer.java | BAMShardIndexer.finish | public long finish() {
final BAMIndexContent content = indexBuilder.processReference(referenceIndex);
outputWriter.writeReference(content);
outputWriter.close();
return indexBuilder.getNoCoordinateRecordCount();
} | java | public long finish() {
final BAMIndexContent content = indexBuilder.processReference(referenceIndex);
outputWriter.writeReference(content);
outputWriter.close();
return indexBuilder.getNoCoordinateRecordCount();
} | [
"public",
"long",
"finish",
"(",
")",
"{",
"final",
"BAMIndexContent",
"content",
"=",
"indexBuilder",
".",
"processReference",
"(",
"referenceIndex",
")",
";",
"outputWriter",
".",
"writeReference",
"(",
"content",
")",
";",
"outputWriter",
".",
"close",
"(",
... | Finalizes writing and closes the file.
@return count of records with no coordinates. | [
"Finalizes",
"writing",
"and",
"closes",
"the",
"file",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/htsjdk/samtools/BAMShardIndexer.java#L42-L47 |
4,079 | googlegenomics/dataflow-java | src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/Solver.java | Solver.gridSearch | static Interval gridSearch(UnivariateFunction fn, double start,
double end, double step) {
double lowMax = start; // lower bound on interval surrounding alphaMax
double alphaMax = start - step;
double likMax = 0.0;
double lastAlpha = start;
double alpha = start;
while (alpha < end) {
... | java | static Interval gridSearch(UnivariateFunction fn, double start,
double end, double step) {
double lowMax = start; // lower bound on interval surrounding alphaMax
double alphaMax = start - step;
double likMax = 0.0;
double lastAlpha = start;
double alpha = start;
while (alpha < end) {
... | [
"static",
"Interval",
"gridSearch",
"(",
"UnivariateFunction",
"fn",
",",
"double",
"start",
",",
"double",
"end",
",",
"double",
"step",
")",
"{",
"double",
"lowMax",
"=",
"start",
";",
"// lower bound on interval surrounding alphaMax",
"double",
"alphaMax",
"=",
... | Runs a grid search for the maximum value of a univariate function.
@param fn the likelihood function to minimize
@param start lower bound of the interval to search
@param end upper bound of the interval to search
@param step grid step size
@return an Interval bracketing the minimum | [
"Runs",
"a",
"grid",
"search",
"for",
"the",
"maximum",
"value",
"of",
"a",
"univariate",
"function",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/Solver.java#L42-L70 |
4,080 | googlegenomics/dataflow-java | src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/Solver.java | Solver.maximize | public static double maximize(UnivariateFunction fn, double gridStart, double gridEnd,
double gridStep, double relErr, double absErr, int maxIter, int maxEval) {
Interval interval = gridSearch(fn, gridStart, gridEnd, gridStep);
BrentOptimizer bo = new BrentOptimizer(relErr, absErr);
UnivariatePointVal... | java | public static double maximize(UnivariateFunction fn, double gridStart, double gridEnd,
double gridStep, double relErr, double absErr, int maxIter, int maxEval) {
Interval interval = gridSearch(fn, gridStart, gridEnd, gridStep);
BrentOptimizer bo = new BrentOptimizer(relErr, absErr);
UnivariatePointVal... | [
"public",
"static",
"double",
"maximize",
"(",
"UnivariateFunction",
"fn",
",",
"double",
"gridStart",
",",
"double",
"gridEnd",
",",
"double",
"gridStep",
",",
"double",
"relErr",
",",
"double",
"absErr",
",",
"int",
"maxIter",
",",
"int",
"maxEval",
")",
"... | Maximizes a univariate function using a grid search followed by Brent's algorithm.
@param fn the likelihood function to minimize
@param gridStart the lower bound for the grid search
@param gridEnd the upper bound for the grid search
@param gridStep step size for the grid search
@param relErr relative error tolerance f... | [
"Maximizes",
"a",
"univariate",
"function",
"using",
"a",
"grid",
"search",
"followed",
"by",
"Brent",
"s",
"algorithm",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/Solver.java#L86-L97 |
4,081 | googlegenomics/dataflow-java | src/main/java/com/google/cloud/genomics/dataflow/readers/bam/Reader.java | Reader.passesFilter | static boolean passesFilter(SAMRecord record, Filter filter,
String referenceName) {
// If we are looking for only mapped or only unmapped reads then we will use
// the UnmappedFlag to decide if this read should be rejected.
if (filter == Filter.UNMAPPED_ONLY && !record.getReadUnmappedFlag()) {
... | java | static boolean passesFilter(SAMRecord record, Filter filter,
String referenceName) {
// If we are looking for only mapped or only unmapped reads then we will use
// the UnmappedFlag to decide if this read should be rejected.
if (filter == Filter.UNMAPPED_ONLY && !record.getReadUnmappedFlag()) {
... | [
"static",
"boolean",
"passesFilter",
"(",
"SAMRecord",
"record",
",",
"Filter",
"filter",
",",
"String",
"referenceName",
")",
"{",
"// If we are looking for only mapped or only unmapped reads then we will use",
"// the UnmappedFlag to decide if this read should be rejected.",
"if",
... | Checks if the record matches our filter. | [
"Checks",
"if",
"the",
"record",
"matches",
"our",
"filter",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/readers/bam/Reader.java#L133-L159 |
4,082 | googlegenomics/dataflow-java | src/main/java/htsjdk/samtools/BinaryBAMShardIndexWriter.java | BinaryBAMShardIndexWriter.writeReference | @Override
public void writeReference(final BAMIndexContent content) {
if (content == null) {
writeNullContent();
return;
}
// write bins
final BAMIndexContent.BinList bins = content.getBins();
final int size = bins == null ? 0 : content.getNumberOfNonNullBins();
... | java | @Override
public void writeReference(final BAMIndexContent content) {
if (content == null) {
writeNullContent();
return;
}
// write bins
final BAMIndexContent.BinList bins = content.getBins();
final int size = bins == null ? 0 : content.getNumberOfNonNullBins();
... | [
"@",
"Override",
"public",
"void",
"writeReference",
"(",
"final",
"BAMIndexContent",
"content",
")",
"{",
"if",
"(",
"content",
"==",
"null",
")",
"{",
"writeNullContent",
"(",
")",
";",
"return",
";",
"}",
"// write bins",
"final",
"BAMIndexContent",
".",
... | Write this content as binary output | [
"Write",
"this",
"content",
"as",
"binary",
"output"
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/htsjdk/samtools/BinaryBAMShardIndexWriter.java#L37-L93 |
4,083 | googlegenomics/dataflow-java | src/main/java/htsjdk/samtools/BinaryBAMShardIndexWriter.java | BinaryBAMShardIndexWriter.writeChunkMetaData | private void writeChunkMetaData(final BAMIndexMetaData metaData) {
codec.writeInt(GenomicIndexUtil.MAX_BINS);
final int nChunk = 2;
codec.writeInt(nChunk);
codec.writeLong(metaData.getFirstOffset());
codec.writeLong(metaData.getLastOffset());
codec.writeLong(metaData.getAlignedRecord... | java | private void writeChunkMetaData(final BAMIndexMetaData metaData) {
codec.writeInt(GenomicIndexUtil.MAX_BINS);
final int nChunk = 2;
codec.writeInt(nChunk);
codec.writeLong(metaData.getFirstOffset());
codec.writeLong(metaData.getLastOffset());
codec.writeLong(metaData.getAlignedRecord... | [
"private",
"void",
"writeChunkMetaData",
"(",
"final",
"BAMIndexMetaData",
"metaData",
")",
"{",
"codec",
".",
"writeInt",
"(",
"GenomicIndexUtil",
".",
"MAX_BINS",
")",
";",
"final",
"int",
"nChunk",
"=",
"2",
";",
"codec",
".",
"writeInt",
"(",
"nChunk",
"... | Write the meta data represented by the chunkLists associated with bin MAX_BINS 37450
@param metaData information describing numAligned records, numUnAligned, etc | [
"Write",
"the",
"meta",
"data",
"represented",
"by",
"the",
"chunkLists",
"associated",
"with",
"bin",
"MAX_BINS",
"37450"
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/htsjdk/samtools/BinaryBAMShardIndexWriter.java#L138-L147 |
4,084 | googlegenomics/dataflow-java | src/main/java/com/google/cloud/genomics/dataflow/functions/ibs/SharedAllelesRatioCalculator.java | SharedAllelesRatioCalculator.similarity | @Override
public double similarity(VariantCall call1, VariantCall call2) {
int minNumberOfGenotypes = Math.min(call1.getGenotypeCount(), call2.getGenotypeCount());
int numberOfSharedAlleles = 0;
for (int i = 0; i < minNumberOfGenotypes; ++i) {
if (call1.getGenotype(i) == call2.getGenotype(i)) {
... | java | @Override
public double similarity(VariantCall call1, VariantCall call2) {
int minNumberOfGenotypes = Math.min(call1.getGenotypeCount(), call2.getGenotypeCount());
int numberOfSharedAlleles = 0;
for (int i = 0; i < minNumberOfGenotypes; ++i) {
if (call1.getGenotype(i) == call2.getGenotype(i)) {
... | [
"@",
"Override",
"public",
"double",
"similarity",
"(",
"VariantCall",
"call1",
",",
"VariantCall",
"call2",
")",
"{",
"int",
"minNumberOfGenotypes",
"=",
"Math",
".",
"min",
"(",
"call1",
".",
"getGenotypeCount",
"(",
")",
",",
"call2",
".",
"getGenotypeCount... | scores when the number of alleles is different than 2 and when the genotypes are unphased. | [
"scores",
"when",
"the",
"number",
"of",
"alleles",
"is",
"different",
"than",
"2",
"and",
"when",
"the",
"genotypes",
"are",
"unphased",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/functions/ibs/SharedAllelesRatioCalculator.java#L29-L40 |
4,085 | googlegenomics/dataflow-java | src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/ReadFunctions.java | ReadFunctions.extractReadBases | public static List<ReadBaseWithReference> extractReadBases(Read read) {
// Make sure this read has a valid alignment with Cigar Units
if (!read.hasAlignment() || (read.getAlignment().getCigarCount() == 0)) {
return null;
}
ImmutableList.Builder<ReadBaseWithReference> bases = ImmutableList.builde... | java | public static List<ReadBaseWithReference> extractReadBases(Read read) {
// Make sure this read has a valid alignment with Cigar Units
if (!read.hasAlignment() || (read.getAlignment().getCigarCount() == 0)) {
return null;
}
ImmutableList.Builder<ReadBaseWithReference> bases = ImmutableList.builde... | [
"public",
"static",
"List",
"<",
"ReadBaseWithReference",
">",
"extractReadBases",
"(",
"Read",
"read",
")",
"{",
"// Make sure this read has a valid alignment with Cigar Units",
"if",
"(",
"!",
"read",
".",
"hasAlignment",
"(",
")",
"||",
"(",
"read",
".",
"getAlig... | Use the given read to build a list of aligned read and reference base
information.
@param read The read with the alignment information
@return read and reference information. For a read without an alignment
or cigar units, null is returned. | [
"Use",
"the",
"given",
"read",
"to",
"build",
"a",
"list",
"of",
"aligned",
"read",
"and",
"reference",
"base",
"information",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/ReadFunctions.java#L45-L122 |
4,086 | googlegenomics/dataflow-java | src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/LikelihoodFn.java | LikelihoodFn.pGenotype | private static double pGenotype(Genotype g, double refProb) {
switch(g) {
case REF_HOMOZYGOUS:
return refProb * refProb;
case HETEROZYGOUS:
return refProb * (1.0 - refProb);
case NONREF_HOMOZYGOUS:
return (1.0 - refProb) * (1.0 - refProb);
default:
throw new I... | java | private static double pGenotype(Genotype g, double refProb) {
switch(g) {
case REF_HOMOZYGOUS:
return refProb * refProb;
case HETEROZYGOUS:
return refProb * (1.0 - refProb);
case NONREF_HOMOZYGOUS:
return (1.0 - refProb) * (1.0 - refProb);
default:
throw new I... | [
"private",
"static",
"double",
"pGenotype",
"(",
"Genotype",
"g",
",",
"double",
"refProb",
")",
"{",
"switch",
"(",
"g",
")",
"{",
"case",
"REF_HOMOZYGOUS",
":",
"return",
"refProb",
"*",
"refProb",
";",
"case",
"HETEROZYGOUS",
":",
"return",
"refProb",
"... | Compute the probability of a genotype given the reference allele probability. | [
"Compute",
"the",
"probability",
"of",
"a",
"genotype",
"given",
"the",
"reference",
"allele",
"probability",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/LikelihoodFn.java#L105-L116 |
4,087 | googlegenomics/dataflow-java | src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/LikelihoodFn.java | LikelihoodFn.probObsGivenTruth | private static double probObsGivenTruth(Base observed, Genotype trueGenotype,
ReadStatus trueStatus) {
return P_OBS_GIVEN_TRUTH.get(toTableIndex(observed, trueGenotype, trueStatus));
} | java | private static double probObsGivenTruth(Base observed, Genotype trueGenotype,
ReadStatus trueStatus) {
return P_OBS_GIVEN_TRUTH.get(toTableIndex(observed, trueGenotype, trueStatus));
} | [
"private",
"static",
"double",
"probObsGivenTruth",
"(",
"Base",
"observed",
",",
"Genotype",
"trueGenotype",
",",
"ReadStatus",
"trueStatus",
")",
"{",
"return",
"P_OBS_GIVEN_TRUTH",
".",
"get",
"(",
"toTableIndex",
"(",
"observed",
",",
"trueGenotype",
",",
"tru... | Look up the probability of an observation conditioned on the underlying state. | [
"Look",
"up",
"the",
"probability",
"of",
"an",
"observation",
"conditioned",
"on",
"the",
"underlying",
"state",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/LikelihoodFn.java#L121-L124 |
4,088 | googlegenomics/dataflow-java | src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/LikelihoodFn.java | LikelihoodFn.value | @Override
public double value(double alpha) {
double logLikelihood = 0.0;
for (ReadCounts rc : readCounts.values()) {
double refProb = rc.getRefFreq();
double pPosition = 0.0;
for (Genotype trueGenotype1 : Genotype.values()) {
double pGenotype1 = pGenotype(trueGenotype1, refProb);
... | java | @Override
public double value(double alpha) {
double logLikelihood = 0.0;
for (ReadCounts rc : readCounts.values()) {
double refProb = rc.getRefFreq();
double pPosition = 0.0;
for (Genotype trueGenotype1 : Genotype.values()) {
double pGenotype1 = pGenotype(trueGenotype1, refProb);
... | [
"@",
"Override",
"public",
"double",
"value",
"(",
"double",
"alpha",
")",
"{",
"double",
"logLikelihood",
"=",
"0.0",
";",
"for",
"(",
"ReadCounts",
"rc",
":",
"readCounts",
".",
"values",
"(",
")",
")",
"{",
"double",
"refProb",
"=",
"rc",
".",
"getR... | Compute the likelihood of a contaminant fraction alpha.
<p>See equation (2) in Jun et al. | [
"Compute",
"the",
"likelihood",
"of",
"a",
"contaminant",
"fraction",
"alpha",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/LikelihoodFn.java#L131-L167 |
4,089 | googlegenomics/dataflow-java | src/main/java/com/google/cloud/genomics/dataflow/readers/bam/ReadBAMTransform.java | ReadBAMTransform.getReadsFromBAMFileSharded | @Deprecated
public static PCollection<Read> getReadsFromBAMFileSharded(
Pipeline p,
PipelineOptions pipelineOptions,
OfflineAuth auth,
List<Contig> contigs,
ReaderOptions options,
String BAMFile,
ShardingPolicy shardingPolicy) throws IOException {
ReadBAMTransform readBAM... | java | @Deprecated
public static PCollection<Read> getReadsFromBAMFileSharded(
Pipeline p,
PipelineOptions pipelineOptions,
OfflineAuth auth,
List<Contig> contigs,
ReaderOptions options,
String BAMFile,
ShardingPolicy shardingPolicy) throws IOException {
ReadBAMTransform readBAM... | [
"@",
"Deprecated",
"public",
"static",
"PCollection",
"<",
"Read",
">",
"getReadsFromBAMFileSharded",
"(",
"Pipeline",
"p",
",",
"PipelineOptions",
"pipelineOptions",
",",
"OfflineAuth",
"auth",
",",
"List",
"<",
"Contig",
">",
"contigs",
",",
"ReaderOptions",
"op... | Get reads from a single BAM file by serially reading one shard at a time.
This is useful when reads from a subset of genomic regions is desired.
This method is marked as deprecated because getReadsFromBAMFilesSharded offers
the same functionality but shard reading occurs in parallel.
This method should be removed wh... | [
"Get",
"reads",
"from",
"a",
"single",
"BAM",
"file",
"by",
"serially",
"reading",
"one",
"shard",
"at",
"a",
"time",
"."
] | ef2c56ed1a6397843c55102748b8c2b12aaa4772 | https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/readers/bam/ReadBAMTransform.java#L115-L133 |
4,090 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoaderConfig.java | CClassLoaderConfig.addFile | public void addFile(
String loaderPath,
URL file
) {
List list = (List) filesMap.get(loaderPath);
if (list == null) {
list = new ArrayList();
filesMap.put(
loaderPath,
list
);
}
list.add(file);
... | java | public void addFile(
String loaderPath,
URL file
) {
List list = (List) filesMap.get(loaderPath);
if (list == null) {
list = new ArrayList();
filesMap.put(
loaderPath,
list
);
}
list.add(file);
... | [
"public",
"void",
"addFile",
"(",
"String",
"loaderPath",
",",
"URL",
"file",
")",
"{",
"List",
"list",
"=",
"(",
"List",
")",
"filesMap",
".",
"get",
"(",
"loaderPath",
")",
";",
"if",
"(",
"list",
"==",
"null",
")",
"{",
"list",
"=",
"new",
"Arra... | add a file to the given loader
@param loaderPath the path of the loader
@param file the jar file to add | [
"add",
"a",
"file",
"to",
"the",
"given",
"loader"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoaderConfig.java#L49-L64 |
4,091 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CMutex.java | CMutex.releaseMultiple | public static final void releaseMultiple(CMutex mutex[]) {
Arrays.sort(mutex, new CMutexComparator());
for (int i = mutex.length - 1; i >= 0; i--) {
mutex[i].release();
}
} | java | public static final void releaseMultiple(CMutex mutex[]) {
Arrays.sort(mutex, new CMutexComparator());
for (int i = mutex.length - 1; i >= 0; i--) {
mutex[i].release();
}
} | [
"public",
"static",
"final",
"void",
"releaseMultiple",
"(",
"CMutex",
"mutex",
"[",
"]",
")",
"{",
"Arrays",
".",
"sort",
"(",
"mutex",
",",
"new",
"CMutexComparator",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"mutex",
".",
"length",
"-",
"1"... | Releases an array of mutex previously acquired
@param mutex
the mutex array to release | [
"Releases",
"an",
"array",
"of",
"mutex",
"previously",
"acquired"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CMutex.java#L118-L124 |
4,092 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CMutex.java | CMutex.release | public final void release() {
synchronized (this.LOCK) {
if ((this.owner != null)
&& (this.owner.get() == Thread.currentThread())) {
this.acquire--;
if (this.acquire == 0) {
this.owner = null;
this.LOCK.notify();
}
return;
}
if ((this.owner != null) && (this.owner.get() == n... | java | public final void release() {
synchronized (this.LOCK) {
if ((this.owner != null)
&& (this.owner.get() == Thread.currentThread())) {
this.acquire--;
if (this.acquire == 0) {
this.owner = null;
this.LOCK.notify();
}
return;
}
if ((this.owner != null) && (this.owner.get() == n... | [
"public",
"final",
"void",
"release",
"(",
")",
"{",
"synchronized",
"(",
"this",
".",
"LOCK",
")",
"{",
"if",
"(",
"(",
"this",
".",
"owner",
"!=",
"null",
")",
"&&",
"(",
"this",
".",
"owner",
".",
"get",
"(",
")",
"==",
"Thread",
".",
"current... | Releases the mutex
@throws IllegalMonitorStateException
If currentThread is not the owner. | [
"Releases",
"the",
"mutex"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CMutex.java#L226-L252 |
4,093 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/CDocumentCut.java | CDocumentCut.isDescendant | private static boolean isDescendant(
final Node n,
final Node ref) {
if (ref == null) {
return false;
} // end if
if (n == ref) {
return true;
} // end if
NodeList nl = ref.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
boolean result = isDescendant(n, nl.item(i));
if (resul... | java | private static boolean isDescendant(
final Node n,
final Node ref) {
if (ref == null) {
return false;
} // end if
if (n == ref) {
return true;
} // end if
NodeList nl = ref.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
boolean result = isDescendant(n, nl.item(i));
if (resul... | [
"private",
"static",
"boolean",
"isDescendant",
"(",
"final",
"Node",
"n",
",",
"final",
"Node",
"ref",
")",
"{",
"if",
"(",
"ref",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"// end if",
"if",
"(",
"n",
"==",
"ref",
")",
"{",
"return",
"... | return true if n is a descendant of ref
@param n node to test
@param ref reference node
@return true if n is a descendant of ref | [
"return",
"true",
"if",
"n",
"is",
"a",
"descendant",
"of",
"ref"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/CDocumentCut.java#L412-L434 |
4,094 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/CDocumentCut.java | CDocumentCut.getPbDocs | private static PbDocument [] getPbDocs(final NodeList nl) {
List list = new ArrayList();
Element prevpb = null;
for (int i = 0; i < nl.getLength(); i++) {
Element pb = (Element) nl.item(i);
PbDocument pbdoc = new PbDocument(prevpb, pb);
list.add(pbdoc);
prevpb = pb;
if (i == (nl.getLen... | java | private static PbDocument [] getPbDocs(final NodeList nl) {
List list = new ArrayList();
Element prevpb = null;
for (int i = 0; i < nl.getLength(); i++) {
Element pb = (Element) nl.item(i);
PbDocument pbdoc = new PbDocument(prevpb, pb);
list.add(pbdoc);
prevpb = pb;
if (i == (nl.getLen... | [
"private",
"static",
"PbDocument",
"[",
"]",
"getPbDocs",
"(",
"final",
"NodeList",
"nl",
")",
"{",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"Element",
"prevpb",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nl"... | Return the pagebreaks
@param nl pagebreaks nodelist
@return an array of subdoc composed of space between pb. | [
"Return",
"the",
"pagebreaks"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/CDocumentCut.java#L443-L466 |
4,095 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/CDocumentCut.java | CDocumentCut.copyHeader | private static void copyHeader(
final Document doc,
final Document ndoc) {
NodeList headnl = doc.getElementsByTagName("head");
if (headnl.getLength() > 0) {
Element head = (Element) headnl.item(0);
ndoc.getDocumentElement()
.insertBefore(ndoc.adoptNode(head.cloneNode(true)),
ndoc.getDocumentEle... | java | private static void copyHeader(
final Document doc,
final Document ndoc) {
NodeList headnl = doc.getElementsByTagName("head");
if (headnl.getLength() > 0) {
Element head = (Element) headnl.item(0);
ndoc.getDocumentElement()
.insertBefore(ndoc.adoptNode(head.cloneNode(true)),
ndoc.getDocumentEle... | [
"private",
"static",
"void",
"copyHeader",
"(",
"final",
"Document",
"doc",
",",
"final",
"Document",
"ndoc",
")",
"{",
"NodeList",
"headnl",
"=",
"doc",
".",
"getElementsByTagName",
"(",
"\"head\"",
")",
";",
"if",
"(",
"headnl",
".",
"getLength",
"(",
")... | Copy the html header from doc to ndoc
@param doc source of html header
@param ndoc destination | [
"Copy",
"the",
"html",
"header",
"from",
"doc",
"to",
"ndoc"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/CDocumentCut.java#L474-L485 |
4,096 | allcolor/YaHP-Converter | YaHPSample/src/org/allcolor/yahp/sample/CSimpleConversion.java | CSimpleConversion.getParameter | private static String getParameter(
final String args[],
final String name) {
for (int i = 0; i < args.length; i++) {
if (args[i].equals(name)) {
if ((i + 1) < args.length) {
return args[i + 1];
} // end if
break;
} // end if
} // end for
return null;
} | java | private static String getParameter(
final String args[],
final String name) {
for (int i = 0; i < args.length; i++) {
if (args[i].equals(name)) {
if ((i + 1) < args.length) {
return args[i + 1];
} // end if
break;
} // end if
} // end for
return null;
} | [
"private",
"static",
"String",
"getParameter",
"(",
"final",
"String",
"args",
"[",
"]",
",",
"final",
"String",
"name",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"args",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"args"... | Return the value of the given parameter if set
@param args startup arguments
@param name parameter name
@return the value of the given parameter if set or null | [
"Return",
"the",
"value",
"of",
"the",
"given",
"parameter",
"if",
"set"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPSample/src/org/allcolor/yahp/sample/CSimpleConversion.java#L159-L173 |
4,097 | allcolor/YaHP-Converter | YaHPSample/src/org/allcolor/yahp/sample/CSimpleConversion.java | CSimpleConversion.hasParameter | private static boolean hasParameter(
final String args[],
final String name) {
for (int i = 0; i < args.length; i++) {
if (args[i].equals(name)) {
return true;
} // end if
} // end for
return false;
} | java | private static boolean hasParameter(
final String args[],
final String name) {
for (int i = 0; i < args.length; i++) {
if (args[i].equals(name)) {
return true;
} // end if
} // end for
return false;
} | [
"private",
"static",
"boolean",
"hasParameter",
"(",
"final",
"String",
"args",
"[",
"]",
",",
"final",
"String",
"name",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"args",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"args... | return true if the given parameter is on the command line
@param args startup arguments
@param name parameter name
@return true if the given parameter is on the command line | [
"return",
"true",
"if",
"the",
"given",
"parameter",
"is",
"on",
"the",
"command",
"line"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPSample/src/org/allcolor/yahp/sample/CSimpleConversion.java#L183-L193 |
4,098 | allcolor/YaHP-Converter | YaHPSample/src/org/allcolor/yahp/sample/CSimpleConversion.java | CSimpleConversion.showUsage | private static void showUsage(final String message) {
if (message != null) {
System.out.println(message);
} // end if
System.out.println(
"Usage :\n\tjava -cp yahp-sample.jar:yahp.jar org.allcolor.yahp.sample.CSimpleConversion" +
" --url [http|file]://myuri --out /path/to.pdf [font options] [renderer op... | java | private static void showUsage(final String message) {
if (message != null) {
System.out.println(message);
} // end if
System.out.println(
"Usage :\n\tjava -cp yahp-sample.jar:yahp.jar org.allcolor.yahp.sample.CSimpleConversion" +
" --url [http|file]://myuri --out /path/to.pdf [font options] [renderer op... | [
"private",
"static",
"void",
"showUsage",
"(",
"final",
"String",
"message",
")",
"{",
"if",
"(",
"message",
"!=",
"null",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"message",
")",
";",
"}",
"// end if",
"System",
".",
"out",
".",
"println",... | Show the usage of the tool
@param message An error message | [
"Show",
"the",
"usage",
"of",
"the",
"tool"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPSample/src/org/allcolor/yahp/sample/CSimpleConversion.java#L200-L224 |
4,099 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CJarLoaderURLStreamHandler.java | CJarLoaderURLStreamHandler.addClassPreload | public void addClassPreload(final String path, final byte array[]) {
try {
this.preload.put(path, new SoftReference(
new CGCCleaner(path, array)));
} catch (Exception ignore) {
}
} | java | public void addClassPreload(final String path, final byte array[]) {
try {
this.preload.put(path, new SoftReference(
new CGCCleaner(path, array)));
} catch (Exception ignore) {
}
} | [
"public",
"void",
"addClassPreload",
"(",
"final",
"String",
"path",
",",
"final",
"byte",
"array",
"[",
"]",
")",
"{",
"try",
"{",
"this",
".",
"preload",
".",
"put",
"(",
"path",
",",
"new",
"SoftReference",
"(",
"new",
"CGCCleaner",
"(",
"path",
","... | add a class byte representation in the preload map
@param path
path to the class inside the jar
@param array
byte representation | [
"add",
"a",
"class",
"byte",
"representation",
"in",
"the",
"preload",
"map"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CJarLoaderURLStreamHandler.java#L86-L92 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.