Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
2213cb0
added tests
NileshVirkar Jul 9, 2017
84e01dd
added tests
NileshVirkar Jul 10, 2017
e46a6f5
added tests
NileshVirkar Jul 10, 2017
cc29f08
added tests
NileshVirkar Jul 11, 2017
c65b092
added tests
NileshVirkar Jul 11, 2017
b675f68
Changed clover version to open Clover
NileshVirkar Nov 12, 2017
5cc51f7
uploaded gammascan
NileshVirkar May 18, 2018
c562c19
Rename gammascan_cpp.json to .gammascan.json
NileshVirkar May 18, 2018
f35c55b
Update .gammascan.json
NileshVirkar May 18, 2018
fcb8c47
Update .gammascan.json
NileshVirkar Jun 5, 2018
7f03480
Update .gammascan.json
NileshVirkar Jun 5, 2018
91125e2
Update .gammascan.json
NileshVirkar Jun 5, 2018
f266377
Update .gammascan.json
NileshVirkar Jun 5, 2018
6598df9
Update .gammascan.json
NileshVirkar Jun 5, 2018
c0f1808
Update .gammascan.json
NileshVirkar Jun 5, 2018
ae0f744
Added spotbugs
NileshVirkar Jul 3, 2018
16b35bf
Merge branch 'master' of https://github.com/NileshVirkar/githubdemo
NileshVirkar Jul 3, 2018
1537fbc
updated code
NileshVirkar Aug 26, 2018
fec4493
Update .gammascan.json
NileshVirkar Aug 28, 2018
97f9b5d
Update .gammascan.json
NileshVirkar Jan 2, 2019
7a265a8
Update .gammascan.json
NileshVirkar Jan 3, 2019
90a28f7
Rename .gammascan.json to gammascan.json
NileshVirkar Jan 3, 2019
4bb1f83
Update gammascan.json
NileshVirkar Jan 3, 2019
35e96e6
Rename gammascan.json to .gammascan.json
vikrant-phadtare1101 Mar 14, 2019
7213128
Merge pull request #1 from vikrant-phadtare1101/patch-1
NileshVirkar Mar 14, 2019
5a9b03d
Update .gammascan.json
NileshVirkar Mar 28, 2019
b00a363
Add files via upload
NileshVirkar Mar 29, 2019
caaa863
Added nested structure
NileshVirkar Apr 4, 2019
b8c89f6
changes
NileshVirkar Apr 4, 2019
1d858b6
Added new code issues
NileshVirkar Apr 4, 2019
4300060
Update .gammascan.json
NileshVirkar Apr 10, 2019
8f59192
Update DemoSubproject.java
NileshVirkar Apr 10, 2019
d3f3146
Update .gammascan.json
NileshVirkar Apr 10, 2019
d52eaf6
commit
NileshVirkar Jun 19, 2019
56fcc4a
Merge branch 'master' of https://github.com/NileshVirkar/githubdemo
NileshVirkar Jun 19, 2019
056dc0d
commit
NileshVirkar Jun 19, 2019
e2aaec1
commit
NileshVirkar Jun 19, 2019
fe32106
commit
NileshVirkar Jun 19, 2019
ce452a2
commit
NileshVirkar Jun 19, 2019
4ec3ec0
commit
NileshVirkar Jun 19, 2019
b81042c
commit
NileshVirkar Jul 2, 2019
b34d5ac
commit
NileshVirkar Jul 2, 2019
8208283
commit
NileshVirkar Jul 2, 2019
b6b5a33
commit2 [force_commit]
NileshVirkar Jul 3, 2019
05d8e23
commit2
NileshVirkar Jul 3, 2019
7af6def
commit2
NileshVirkar Jul 3, 2019
45228a5
commit2 [force_commit]
NileshVirkar Jul 3, 2019
ee998b5
commit2 [gamma_force_commit]
NileshVirkar Jul 3, 2019
a4fba29
commit2 [gamma_force_commit]
NileshVirkar Jul 3, 2019
70b5be9
commit2 [gamma_force_commit]
NileshVirkar Jul 3, 2019
dce0d36
commit2 [gamma_force_commit]
NileshVirkar Jul 3, 2019
52b6a3f
commit_message
NileshVirkar Jul 4, 2019
73a5166
commit_message
NileshVirkar Jul 4, 2019
edcd3a7
commit_message [gamma_force_commit]
NileshVirkar Jul 4, 2019
711171a
commit_message
NileshVirkar Jul 4, 2019
bab8065
commit_message
NileshVirkar Jul 4, 2019
a74d7e5
commit_message [gamma_force_commit]
NileshVirkar Jul 4, 2019
6bd6bf8
commit_message
NileshVirkar Jul 4, 2019
027b85a
commit_message
NileshVirkar Jul 4, 2019
e4100c1
commit_message
NileshVirkar Jul 4, 2019
778df41
commit_message
NileshVirkar Jul 4, 2019
09b8d2d
commit_message
NileshVirkar Jul 4, 2019
c9914ef
commit_message [gamma_force_commit]
NileshVirkar Jul 4, 2019
73b151f
commit_message
NileshVirkar Jul 4, 2019
acd43cc
message
NileshVirkar Jul 22, 2019
5c3df4e
message
NileshVirkar Jul 22, 2019
36d2ced
message
NileshVirkar Jul 22, 2019
92fef21
commit message
NileshVirkar Jul 23, 2019
6d2ea41
commit message
NileshVirkar Jul 23, 2019
c376973
k
NileshVirkar Jul 23, 2019
e3fc7b0
commit message
NileshVirkar Jul 24, 2019
8d4db51
k
NileshVirkar Jul 24, 2019
a9a0a94
commit
NileshVirkar Jul 25, 2019
1843ba0
commit message [gamma_force_commit]
NileshVirkar Jul 28, 2019
434e7e2
commit message [gamma_force_commit]
NileshVirkar Jul 28, 2019
8b1f8bb
commit message [gamma_force_commit]
NileshVirkar Jul 29, 2019
a2fba39
commit
NileshVirkar Jul 29, 2019
c9bc76e
commit message
NileshVirkar Jul 30, 2019
a43c885
commit message
NileshVirkar Jul 30, 2019
301dec6
commit message [gamma_force_commit]
NileshVirkar Jul 30, 2019
41f6ad9
commit1
NileshVirkar Jul 31, 2019
2bef894
commit2
NileshVirkar Jul 31, 2019
20532ee
commit3
NileshVirkar Jul 31, 2019
bf8cee8
commit
NileshVirkar Jul 31, 2019
00897dc
commit_21_8
NileshVirkar Aug 1, 2019
8f360af
commit 21_12
NileshVirkar Aug 1, 2019
acdc550
commit 21_13
NileshVirkar Aug 1, 2019
ccc7873
added threading issue
NileshVirkar Aug 2, 2019
a66e7ab
Fixed sysout issue
NileshVirkar Aug 2, 2019
1a997a2
branch1 commit
NileshVirkar Aug 2, 2019
9e26a1e
commit
NileshVirkar Aug 2, 2019
e261981
hope this works
NileshVirkar Aug 2, 2019
fd0c61e
this gotta work
NileshVirkar Aug 2, 2019
8e442d4
Update .gammascan.json
NileshVirkar Sep 11, 2019
0e8af64
added dependencies
NileshVirkar Sep 18, 2019
7cc167c
added ci
NileshVirkar Sep 20, 2019
dceeb7e
added ci2
NileshVirkar Sep 20, 2019
2d7f775
added ci2
NileshVirkar Sep 20, 2019
a430720
fixed ci
NileshVirkar Sep 25, 2019
cf7903a
changed issue
NileshVirkar Sep 25, 2019
31d2655
commit
NileshVirkar Sep 25, 2019
1901a05
commit k
NileshVirkar Sep 25, 2019
06fd9de
added file
NileshVirkar Sep 26, 2019
17f787c
changes from github
NileshVirkar Sep 29, 2019
3e30f0f
text
NileshVirkar Sep 29, 2019
c62bb2a
text
NileshVirkar Sep 29, 2019
88cb2bb
text
NileshVirkar Sep 29, 2019
87ece96
Update DemoSubproject2.java
NileshVirkar Sep 29, 2019
de1a751
Update DemoSubproject2.java
NileshVirkar Sep 29, 2019
bf07d0d
text
NileshVirkar Oct 11, 2019
1e195a9
text
NileshVirkar Oct 18, 2019
6d2d538
text
NileshVirkar Oct 18, 2019
e99a0c1
text
NileshVirkar Oct 18, 2019
dd50fe8
text
NileshVirkar Oct 18, 2019
09b1217
text
NileshVirkar Oct 18, 2019
a3a10fa
junit tests
NileshVirkar Nov 29, 2019
427909a
junit tests
NileshVirkar Nov 29, 2019
a1895b1
Update .gammascan.json
NileshVirkar Dec 2, 2019
85c69e4
Create readme.md
NileshVirkar Dec 2, 2019
dea675d
Delete 1.xml
NileshVirkar Dec 3, 2019
e5fec71
test upadtes
NileshVirkar Dec 3, 2019
76b60e9
Merge branch 'master' of https://github.com/NileshVirkar/githubdemo
NileshVirkar Dec 3, 2019
73cf749
Update DemoSubprojectCopy.java
NileshVirkar Dec 4, 2019
6a57e8f
Update DemoTest.java
NileshVirkar Dec 4, 2019
59913b2
Update AppTest.java
NileshVirkar Dec 4, 2019
e6bf8d4
Update AppTest.java
NileshVirkar Dec 4, 2019
68e8fbe
Update DemoTest.java
NileshVirkar Dec 4, 2019
55033d0
Update .gammascan.json
NileshVirkar Dec 4, 2019
ca5e7b3
Update .gammascan.json
NileshVirkar Dec 4, 2019
51a67f2
Update DemoTest.java
NileshVirkar Dec 4, 2019
0ce4c9a
Update DemoTest.java
NileshVirkar Dec 4, 2019
8c5d0b9
Update DemoTest.java
NileshVirkar Dec 4, 2019
4f4a39f
Update DemoSubproject2.java
NileshVirkar Jan 8, 2020
d8531f1
Update DemoSubproject.java
NileshVirkar Jan 8, 2020
28e542f
Update DemoSubproject2.java
NileshVirkar Jan 8, 2020
7e5cdb7
Update DemoSubproject2.java
NileshVirkar Jan 9, 2020
00434af
commit
NileshVirkar Mar 27, 2020
67f52d9
Create embold.json
NileshVirkar Apr 9, 2020
f4d7f07
Update embold.json
NileshVirkar Apr 9, 2020
874dfd0
Update embold.json
NileshVirkar Apr 12, 2020
9f6f6f7
Update embold.json
NileshVirkar Apr 16, 2020
d590dc5
Update DemoSubprojectCopy.java
NileshVirkar Apr 21, 2020
e95e8f3
Update App.java
NileshVirkar Apr 24, 2020
f0e08b7
Update embold.json
NileshVirkar Apr 24, 2020
5e849ac
Rename embold.json to emboldk.json
NileshVirkar Apr 24, 2020
255ef44
Update and rename emboldk.json to embold.json
NileshVirkar Apr 24, 2020
d815493
Rename embold.json to emboldk.json
NileshVirkar Apr 24, 2020
afad814
Update and rename emboldk.json to embold.json
NileshVirkar Apr 24, 2020
ce521d1
Update embold.json
NileshVirkar Apr 26, 2020
d676880
Update embold.json
NileshVirkar Apr 26, 2020
00a5dca
Update embold.json
NileshVirkar Apr 26, 2020
ca71952
Update embold.json
NileshVirkar Apr 26, 2020
4b74286
Update embold.json
NileshVirkar Apr 26, 2020
7c73177
Update embold.json
NileshVirkar Apr 26, 2020
0c8f876
Update embold.json
NileshVirkar Apr 26, 2020
358aa5e
Update embold.json
NileshVirkar Apr 27, 2020
bc7a504
Update embold.json
NileshVirkar Apr 27, 2020
3029325
Update embold.json
NileshVirkar Apr 27, 2020
e097981
Update embold.json
NileshVirkar Apr 27, 2020
f87a1d8
Update embold.json
NileshVirkar Apr 28, 2020
9618aca
Update embold.json
NileshVirkar Apr 28, 2020
41096d4
Update embold.json
NileshVirkar Apr 28, 2020
e49eef1
Update embold.json
NileshVirkar Apr 28, 2020
bcf652d
Rename embold.json to embold_k.json
NileshVirkar Jun 21, 2020
2d2e019
Update .gammascan.json
NileshVirkar Jun 21, 2020
ecc60f8
Update .gammascan.json
NileshVirkar Jun 21, 2020
c9f86f2
Update .gammascan.json
NileshVirkar Jun 21, 2020
701e323
Update .gammascan.json
NileshVirkar Jun 22, 2020
69cbbcb
Update .gammascan.json
NileshVirkar Jun 22, 2020
5e08e42
Update .gammascan.json
NileshVirkar Jun 22, 2020
a20d607
Update .gammascan.json
NileshVirkar Jun 23, 2020
d34fa55
Update .gammascan.json
NileshVirkar Jun 23, 2020
9c9e332
Update .gammascan.json
NileshVirkar Jun 23, 2020
fe20714
Update .gammascan.json
NileshVirkar Jun 23, 2020
20cd299
Update .gammascan.json
NileshVirkar Jun 23, 2020
7f2e358
Update .gammascan.json
NileshVirkar Jun 24, 2020
3df3f4b
Update .gammascan.json
NileshVirkar Jun 24, 2020
2e7b999
Update .gammascan.json
NileshVirkar Jul 9, 2020
b845bdd
Update DemoSubproject2.java
NileshVirkar Nov 2, 2020
3682515
compilation error
NileshVirkar Nov 2, 2020
002ff2a
Update DemoSubproject2.java
NileshVirkar Nov 2, 2020
4d0af0e
Update DemoSubproject2.java
NileshVirkar Nov 2, 2020
7e2fe0f
Add files via upload
Preeti8600 Mar 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,12 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
<attribute name="maven.pomderived" value="true"/>
Expand Down
77 changes: 77 additions & 0 deletions .gammascan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"gammaAccess": {
"url": "",
"userName": "",
"password": ""
},
"repositories": [
{
"dataDir": "$WORKSPACE/temptk8",
"repository": {
"uid": "f1c3abdc163ec17ed10f0415fa1b967b",
"projectName": "githubdemo_jenkins",
"languages": [
"JAVA"
],
"sources": {
"baseDir": "$WORKSPACE",
"exclusions": []
}
},
"settings": {
"additionalOptions": [],
"includePaths": []
},
"modules": {
"codeissues": [
{
"name": "gamma_java",
"enabled": true,
"config": {
"rules": [],
"options": []
}
},
{
"name": "pmd",
"enabled": true,
"config": {
"rules": [],
"options": [
{
"name": "javaVersion",
"type": "text",
"value": "1.8",
"required": false
},
{
"name": "ruleSets",
"type": "text",
"value": "rulesets/java/strictexception.xml,rulesets/java/basic.xml,rulesets/java/design.xml",
"required": true
}
]
}
}
],
"unittest": [
{
"name": "junit",
"enabled": true,
"config": {
"rules": [],
"options": [
{
"name": "reportDir",
"type": "upload",
"value": "",
"required": true
}
]
}
}
]
}
}
]
}
88 changes: 88 additions & 0 deletions .githooks/commit-msg/commit-msg_k
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#!/bin/bash
#check Embold is disable
commit_msg=$(cat "${1:?Missing commit message file}")
commit_msg=$(echo "$commit_msg" | tr '[:upper:]' '[:lower:]')
if [[ $commit_msg == *"embold --skip"* ]]; then
echo "Embold Gated commit disable"
echo "[Embold Gated commit disabled]" >> $1
exit 0
fi
#check CORONA_HOME is not empty
corona_home=$CORONA_HOME
if [[ -z "$corona_home" ]]
then
exit 1
fi
#check if merge commit
hash=`git rev-parse -q --verify MERGE_HEAD`
if [[ ! -z "$hash" ]]
then
exit 0
fi
random_str=`(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 10 ; echo '')`
temp_dir=$corona_home/temp/$random_str
mkdir -p $temp_dir
echo "Embold Analysis started, Please wait..."
current_dir=$(pwd)
pluginxml=$corona_home/coronacli/config/plugins_empty.xml
$corona_home/coronacli/bin/coronacli -b "$current_dir" -c "$current_dir" -d "$temp_dir" -r "git" -p $pluginxml -g -lc > $corona_home/temp/gated_commit.log
quality_gate_output_file=$temp_dir/GatedCommit/quality_gate_output.txt
if [ ! -e $quality_gate_output_file ]
then
echo "Embold Analysis Failed"
exit 0
fi
var=`cat $quality_gate_output_file | grep Status`
status=`echo "$var" | cut -c 8-`
if [[ "$status" == "pass" ]]
then
echo "[Embold Quality Gate:Passed]" >> $1
rm -r $temp_dir
exit 0
elif [ "$status" == "warning" ]
then
echo "[Embold Quality Gate:Passed]" >> $1
while read line; do
echo $line
done < $quality_gate_output_file
rm -r $temp_dir
exit 0
elif [ "$status" == "EmboldFailed" ]
then
echo "[Embold Analysis failed]" >> $1
while read line; do
echo $line
done < $quality_gate_output_file
rm -r $temp_dir
exit 0
else
if [[ $commit_msg == *"embold --force-commit"* ]]; then
echo "Embold Quality Gate:Failed"
echo "[Embold Quality Gate:Failed]" >> $1
status_flag=false
while read line; do
if [ "$status_flag" = true ] ; then
echo $line >> $1
fi
if [ "$status_flag" = false ] ; then
status_flag=true
fi
done < $quality_gate_output_file
rm -r $temp_dir
exit 0
else
echo "Embold Quality Gate:Failed"
echo "Commit Status: Rejected"
status_flag=false
while read line; do
if [ "$status_flag" = true ] ; then
echo $line
fi
if [ "$status_flag" = false ] ; then
status_flag=true
fi
done < $quality_gate_output_file
rm -r $temp_dir
exit 1
fi
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
66 changes: 66 additions & 0 deletions ResourceLeak.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package com.mariten.kanatools;

import com.sun.org.slf4j.internal.LoggerFactory;

import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;

public class ResourceLeak {
private boolean active;
public void setActive(boolean b)
{
this.active = b;
}

LoggerFactory logger = new LoggerFactory();
String count;
public void process() {
SecureRandom secureRandom = new SecureRandom();
System.runFinalizersOnExit(true);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I detect that this code is problematic. According to the Bad practice (BAD_PRACTICE), Dm: Method invokes dangerous method runFinalizersOnExit (DM_RUN_FINALIZERS_ON_EXIT).
Never call System.runFinalizersOnExit or Runtime.runFinalizersOnExit for any reason: they are among the most dangerous methods in the Java libraries. -- Joshua Bloch

try {
PrintWriter out = new PrintWriter("");
out.println("the text");
System.out.println("");
System.out.println("");
out.close();
Cipher c1 = Cipher.getInstance("DES");
} catch (IOException | NoSuchAlgorithmException | NoSuchPaddingException e) {
System.err.println();
System.err.println();



}

}
public void process2() {
try {
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("out.txt", true)));
out.println("the text");
} catch (IOException e) {
logger.error("Resource is not closed anywhere.",e);
}
}


public void demo(String name, String surName,String count,String preeti) {
String surName = surName;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I detect that this code is problematic. According to the Dodgy code (STYLE), SA: Self assignment of local variable (SA_LOCAL_SELF_ASSIGNMENT).
This method contains a self assignment of a local variable; e.g.
Such assignments are useless, and may indicate a logic error or typo.

name = name;
this.count = count;
preeti += preeti;
preeti = preeti;
r += r;
}
public void method() {
Thread myThread = new Thread();
// EMB-ISSUE: CodeIssueNames.RUN_SHOULD_NOT_BE_CALLED_DIRECTLY
myThread.run();
}

}
2 changes: 2 additions & 0 deletions commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ticket subproject/src/main/java/subproject/DemoSubproject.java
ticket subproject/src/main/java/subproject/DemoSubproject.java
Loading