=====================================================================
Found a 121 line (629 tokens) duplication in the following files:
Starting at line 265 of /usr/local/java/src/java/nio/DirectCharBufferU.java
Starting at line 265 of /usr/local/java/src/java/nio/DirectCharBufferS.java
DirectCharBufferS sb = (DirectCharBufferS)src;
int spos = sb.position();
int slim = sb.limit();
assert (spos <= slim);
int srem = (spos <= slim ? slim - spos : 0);
int pos = position();
int lim = limit();
assert (pos <= lim);
int rem = (pos <= lim ? lim - pos : 0);
if (srem > rem)
throw new BufferOverflowException();
unsafe.copyMemory(sb.ix(spos), ix(pos), srem << 1);
sb.position(spos + srem);
position(pos + srem);
} else if (!src.isDirect()) {
int spos = src.position();
int slim = src.limit();
assert (spos <= slim);
int srem = (spos <= slim ? slim - spos : 0);
put(src.hb, src.offset + spos, srem);
src.position(spos + srem);
} else {
super.put(src);
}
return this;
}
public CharBuffer put(char[] src, int offset, int length) {
if ((length << 1) > Bits.JNI_COPY_FROM_ARRAY_THRESHOLD) {
checkBounds(offset, length, src.length);
int pos = position();
int lim = limit();
assert (pos <= lim);
int rem = (pos <= lim ? lim - pos : 0);
if (length > rem)
throw new BufferOverflowException();
if (order() != ByteOrder.nativeOrder())
Bits.copyFromCharArray(src, offset << 1,
ix(pos), length << 1);
else
Bits.copyFromByteArray(src, offset << 1,
ix(pos), length << 1);
position(pos + length);
} else {
super.put(src, offset, length);
}
return this;
}
public CharBuffer compact() {
int pos = position();
int lim = limit();
assert (pos <= lim);
int rem = (pos <= lim ? lim - pos : 0);
unsafe.copyMemory(ix(pos), ix(0), rem << 1);
position(rem);
limit(capacity());
return this;
}
public boolean isDirect() {
return true;
}
public boolean isReadOnly() {
return false;
}
public String toString(int start, int end) {
if ((end > limit()) || (start > end))
throw new IndexOutOfBoundsException();
try {
int len = end - start;
char[] ca = new char[len];
CharBuffer cb = CharBuffer.wrap(ca);
CharBuffer db = this.duplicate();
db.position(start);
db.limit(end);
cb.put(db);
return new String(ca);
} catch (StringIndexOutOfBoundsException x) {
throw new IndexOutOfBoundsException();
}
}
// --- Methods to support CharSequence ---
public CharSequence subSequence(int start, int end) {
int len = length();
int pos = position();
assert (pos <= len);
pos = (pos <= len ? pos : len);
if ((start < 0) || (end > len) || (start > end))
throw new IndexOutOfBoundsException();
int sublen = end - start;
int off = (pos + start) << 1;
return new DirectCharBufferS(this, -1, 0, sublen, sublen, off);
=====================================================================
Found a 294 line (531 tokens) duplication in the following files:
Starting at line 486 of /usr/local/java/src/java/lang/StrictMath.java
Starting at line 575 of /usr/local/java/src/java/lang/Math.java
public static int round(float a) {
return (int)floor(a + 0.5f);
}
/**
* Returns the closest <code>long</code> to the argument. The result
* is rounded to an integer by adding 1/2, taking the floor of the
* result, and casting the result to type <code>long</code>. In other
* words, the result is equal to the value of the expression:
* <p><pre>(long)Math.floor(a + 0.5d)</pre>
* <p>
* Special cases:
* <ul><li>If the argument is NaN, the result is 0.
* <li>If the argument is negative infinity or any value less than or
* equal to the value of <code>Long.MIN_VALUE</code>, the result is
* equal to the value of <code>Long.MIN_VALUE</code>.
* <li>If the argument is positive infinity or any value greater than or
* equal to the value of <code>Long.MAX_VALUE</code>, the result is
* equal to the value of <code>Long.MAX_VALUE</code>.</ul>
*
* @param a a floating-point value to be rounded to a
* <code>long</code>.
* @return the value of the argument rounded to the nearest
* <code>long</code> value.
* @see java.lang.Long#MAX_VALUE
* @see java.lang.Long#MIN_VALUE
*/
public static long round(double a) {
return (long)floor(a + 0.5d);
}
private static Random randomNumberGenerator;
private static synchronized void initRNG() {
if (randomNumberGenerator == null)
randomNumberGenerator = new Random();
}
/**
* Returns a <code>double</code> value with a positive sign, greater
* than or equal to <code>0.0</code> and less than <code>1.0</code>.
* Returned values are chosen pseudorandomly with (approximately)
* uniform distribution from that range.
* <p>
* When this method is first called, it creates a single new
* pseudorandom-number generator, exactly as if by the expression
* <blockquote><pre>new java.util.Random</pre></blockquote>
* This new pseudorandom-number generator is used thereafter for all
* calls to this method and is used nowhere else.
* <p>
* This method is properly synchronized to allow correct use by more
* than one thread. However, if many threads need to generate
* pseudorandom numbers at a great rate, it may reduce contention for
* each thread to have its own pseudorandom-number generator.
*
* @return a pseudorandom <code>double</code> greater than or equal
* to <code>0.0</code> and less than <code>1.0</code>.
* @see java.util.Random#nextDouble()
*/
public static double random() {
if (randomNumberGenerator == null) initRNG();
return randomNumberGenerator.nextDouble();
}
/**
* Returns the absolute value of an <code>int</code> value.
* If the argument is not negative, the argument is returned.
* If the argument is negative, the negation of the argument is returned.
* <p>
* Note that if the argument is equal to the value of
* <code>Integer.MIN_VALUE</code>, the most negative representable
* <code>int</code> value, the result is that same value, which is
* negative.
*
* @param a the argument whose absolute value is to be determined
* @return the absolute value of the argument.
* @see java.lang.Integer#MIN_VALUE
*/
public static int abs(int a) {
return (a < 0) ? -a : a;
}
/**
* Returns the absolute value of a <code>long</code> value.
* If the argument is not negative, the argument is returned.
* If the argument is negative, the negation of the argument is returned.
* <p>
* Note that if the argument is equal to the value of
* <code>Long.MIN_VALUE</code>, the most negative representable
* <code>long</code> value, the result is that same value, which is
* negative.
*
* @param a the argument whose absolute value is to be determined
* @return the absolute value of the argument.
* @see java.lang.Long#MIN_VALUE
*/
public static long abs(long a) {
return (a < 0) ? -a : a;
}
/**
* Returns the absolute value of a <code>float</code> value.
* If the argument is not negative, the argument is returned.
* If the argument is negative, the negation of the argument is returned.
* Special cases:
* <ul><li>If the argument is positive zero or negative zero, the
* result is positive zero.
* <li>If the argument is infinite, the result is positive infinity.
* <li>If the argument is NaN, the result is NaN.</ul>
* In other words, the result is the same as the value of the expression:
没有合适的资源?快使用搜索试试~ 我知道了~
pmd-bin-5.0.0.zip
共2000个文件
html:3159个
jar:18个
gif:18个
5星 · 超过95%的资源 需积分: 9 45 下载量 138 浏览量
2012-08-22
16:09:24
上传
评论
收藏 21.48MB ZIP 举报
温馨提示
统计Java代码覆盖和重复数量等工具,貌似为开源代码(我也是从sourceforget下载的),估计需要反编译
资源推荐
资源详情
资源评论
收起资源包目录
pmd-bin-5.0.0.zip (2000个子文件)
maven-theme.css 3KB
maven-base.css 2KB
stylesheet.css 2KB
stylesheet.css 2KB
stylesheet.css 1KB
fcoltable.css 1KB
print.css 222B
site.css 53B
checkstyle-aggregate.html 3.07MB
index-all.html 2.23MB
checkstyle.html 1.73MB
JavaParser.html 1.18MB
JspParserTokenManager.html 433KB
JavaParserTokenManager.html 289KB
Node.html 277KB
AbstractJavaRule.html 272KB
constant-values.html 263KB
surefire-report.html 241KB
JavaParserVisitorAdapter.html 235KB
JavaParserVisitor.html 217KB
JspParser.html 213KB
CppParserTokenManager.html 208KB
JavaParserVisitor.html 207KB
overview-tree.html 204KB
package-use.html 187KB
Rule.html 168KB
RuleSetFactoryTest.html 162KB
JavaParser.html 157KB
AbstractEcmascriptRule.html 133KB
SimpleNodeSubMenu.html 132KB
AttributesSubMenu.html 132KB
Designer.html 128KB
allclasses-frame.html 128KB
XPathFragmentAddingItem.html 126KB
ConstructorCallsOverridableMethodRule.html 125KB
ClassTypeResolver.html 125KB
PropertySource.html 120KB
CodeEditorTextPane.html 118KB
AbstractPropertySource.html 115KB
EcmascriptParserVisitorAdapter.html 114KB
allclasses-noframe.html 113KB
AbstractRule.html 111KB
XPathPanel.html 108KB
RuleContext.html 108KB
ImmutableLanguage.html 106KB
allclasses-frame.html 104KB
ASTNodePopupMenu.html 99KB
GUI.html 99KB
MainFrame.html 98KB
AbstractJavaRule.html 97KB
StatisticalRuleTest.html 96KB
ASTPanel.html 95KB
AbstractNcssCountRule.html 94KB
SourceCodePanel.html 93KB
CreateXMLRulePanel.html 93KB
ParseExceptionHandler.html 93KB
EvaluationResultsPanel.html 92KB
DFAPanel.DFACanvas.html 92KB
DFAPanel.html 91KB
AcceptanceTest.html 91KB
CppParserConstants.html 90KB
AbstractRule.html 89KB
JavaParserConstants.html 89KB
RuleSetFactory.html 88KB
ClassTypeResolver.html 88KB
JavaParserTreeConstants.html 87KB
EcmascriptParserVisitor.html 87KB
index.html 85KB
AbstractDelegateRule.html 84KB
AbstractNode.html 83KB
package-use.html 83KB
NPathComplexityRule.html 79KB
JavaNode.html 77KB
CyclomaticComplexityRule.html 76KB
JspParserConstants.html 76KB
AbstractJspRule.html 75KB
JavaParser.html 73KB
Rule.html 72KB
NcssTypeCountRule.html 72KB
GodClassRule.html 72KB
Node.html 71KB
PropertyDescriptor.html 70KB
ASTCompilationUnit.html 69KB
ASTMethodDeclaration.html 68KB
JspParser.html 68KB
ASTClassOrInterfaceDeclaration.html 68KB
AbstractNode.html 68KB
AvoidBranchingStatementAsLastInLoopRule.html 67KB
ScopeAndDeclarationFinder.html 67KB
EcmascriptNode.html 66KB
JavaCharStream.html 66KB
AvoidUsingHardCodedIPRule.html 66KB
AbstractJavaRule.html 64KB
EcmascriptParserVisitor.html 64KB
package-use.html 63KB
StatementAndBraceFinder.html 63KB
ParseException.html 62KB
LoosePackageCouplingRule.html 62KB
JDKVersionTest.html 61KB
CommentContentRule.html 61KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- zzq1209122014-11-18公司的pmd版本是4.2的,我下载了5.0版本的,有些方法还是不错的;
- zhuxiaoleiwoaini2013-01-22还没用,还不知道咋用呢
- 紫色砸去2014-11-25感谢分享,公司挂不了vpn
- 水中影子2013-03-23貌似不能用,不过谢谢分享!
- qq_252917792015-06-11貌似可以用
wb_rock
- 粉丝: 8
- 资源: 22
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 前端开发-什么是前端开发-关于前端开发的一些相关介绍
- Sora AI-关于文生视频的使用场景说明
- suno AI文生视频的相关教程和介绍使用
- 什么是后端开发-关于后端开发的一些小介绍分享
- Jurassic Pack Vol. II Dinosaurs 侏罗纪包卷恐龙二号Unity游戏模型资源unitypackage
- Jurassic Pack Vol. III Dinosaurs 侏罗纪包卷恐龙三号Unity游戏模型资源unitypackag
- Ultimate Seating Controller 终极座椅控制器Unity游戏开发插件资源unitypackage
- 什么是人工智能-关于人工智能的相关介绍说明
- Figma Converter for Unity适用Unity的Figma转换器Unity游戏开发插件unitypackage
- Creepy Animatronic Anims 令人毛骨悚然的电子动画Unity游戏动画插件资源unitypackage
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功