Skip to content

Commit 38fbae1

Browse files
committed
Light cleanup:
- Remove unused imports - Add missing '@OverRide' annotations - Add missing '@OverRide' annotations to implementations of interface methods - Add missing '@deprecated' annotations - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
1 parent 5074cb2 commit 38fbae1

File tree

30 files changed

+673
-674
lines changed

30 files changed

+673
-674
lines changed

biojava-alignment/src/main/java/org/biojava/nbio/alignment/Alignments.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ public static <S extends Sequence<C>, C extends Compound> Profile<S, C> getMulti
158158
@SuppressWarnings("unchecked") // compound types must be equal since compound sets are equal
159159
SubstitutionMatrix<C> temp = (SubstitutionMatrix<C>) SubstitutionMatrixHelper.getNuc4_4();
160160
subMatrix = temp;
161-
161+
162162
} else if (cs == AmbiguityDNACompoundSet.getDNACompoundSet()) {
163163
@SuppressWarnings("unchecked") // compound types must be equal since compound sets are equal
164164
SubstitutionMatrix<C> temp = (SubstitutionMatrix<C>) SubstitutionMatrixHelper.getNuc4_4();
165165
subMatrix = temp;
166-
166+
167167
}
168168
ProfileProfileAlignerType pa = ProfileProfileAlignerType.GLOBAL;
169169
for (Object o : settings) {

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/StructureTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ public void testReadPDBFile() throws Exception {
111111
assertEquals(0 , c.getAtomGroups(GroupType.HETATM).size());
112112

113113
Chain c2 = structure.getChain(1);
114-
115-
// The second (unnamed) chain in te file contains 63 molecules of deutarated
114+
115+
// The second (unnamed) chain in te file contains 63 molecules of deutarated
116116
// water + 1 PO4 molecule + 1 UNK hetatom molecule
117-
// Since the UNK chemcomp is considered a peptide linked molecule (unknown aminoacid),
117+
// Since the UNK chemcomp is considered a peptide linked molecule (unknown aminoacid),
118118
// then we have only 64 HETATMs
119119
assertEquals(64, c2.getAtomGroups(GroupType.HETATM).size());
120120
assertEquals(0, c2.getAtomGroups(GroupType.NUCLEOTIDE).size());

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/Test1a4w.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ public class Test1a4w extends TestCase{
4141

4242
private static Structure structure = null;
4343

44-
44+
4545
@Override
4646
protected void setUp() throws Exception {
4747
// TODO Auto-generated method stub
4848
super.setUp();
49-
49+
5050
if ( structure != null )
5151
return;
5252

@@ -69,7 +69,7 @@ public void test1a4wPDBFile() throws IOException
6969
{
7070

7171
// structure = null;
72-
72+
7373

7474
assertNotNull(structure);
7575

@@ -167,41 +167,41 @@ public void testChemComps(){
167167

168168
boolean noWater = true;
169169
boolean darPresent = false;
170-
170+
171171

172172
for ( Group g : ligands){
173173
String pdbName = g.getPDBName();
174174
if ( pdbName.equals("QWE"))
175175
darPresent = true;
176-
176+
177177
else if ( pdbName.equals("H2O"))
178178
noWater = false;
179179
}
180180

181181
assertTrue("Found water in ligands list!", noWater );
182182

183183
assertTrue("Did not find QWE in ligands list!", darPresent);
184-
184+
185185
assertEquals("Did not find the correct nr of ligands in chain! " , 3,ligands.size());
186186
} catch (Exception e){
187187
e.printStackTrace();
188188
fail(e.getMessage());
189189
}
190190

191191
}
192-
192+
193193
public void testLigandLoading(){
194194
Chain c2 = structure.getChain(1);
195195
assertTrue(c2.getChainID().equals("H"));
196196

197197
List<Group> ligands = c2.getAtomLigands();
198-
199-
198+
199+
200200
System.out.println("LIGANDS:" + ligands);
201201
assertEquals("Did not find the correct nr of ligands in chain! " , 6,ligands.size());
202-
202+
203203
List<Group> lignads2 = StructureTools.filterLigands(c2.getAtomGroups());
204-
204+
205205
assertEquals("Did not get the same nr of ligands from different access methods! ",ligands.size(), lignads2.size());
206206

207207
}
@@ -210,7 +210,7 @@ public void testSiteGroups(){
210210
try {
211211

212212
assertNotNull(structure);
213-
213+
214214
// Structure s = TmpAtomCache.cache.getStructure("1a4w");
215215

216216
// test1a4wPDBFile();
@@ -294,10 +294,10 @@ public void testGetHetGroups() {
294294
// FORMUL 8 HOH *157(H2 O)
295295

296296
List<Group> hets = struct.getHetGroups();
297-
297+
298298
assertEquals(7, hets.size());
299299

300-
300+
301301

302302

303303
// } catch (Exception e) {

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align/fatcat/MyTestHelper.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
public class MyTestHelper
3737
{
3838

39-
39+
4040
public static final String pdbPath = System.getProperty("java.io.tmpdir");
4141

4242
public static String compareAlignment(String pdb1, String chain1, String pdb2, String chain2, String originalOutput, boolean doRigid){
@@ -46,18 +46,18 @@ public static String compareAlignment(String pdb1, String chain1, String pdb2, S
4646
PDBFileReader pdbpars = new PDBFileReader();
4747
pdbpars.setPath(pdbPath);
4848
pdbpars.setFetchBehavior(FetchBehavior.FETCH_FILES);
49-
49+
5050
FileParsingParameters params = new FileParsingParameters();
5151
params.setAlignSeqRes(true);
5252
params.setParseCAOnly(true);
5353
pdbpars.setFileParsingParameters(params);
54-
54+
5555
Structure structure1;
5656
Structure structure2;
5757

5858
// default: new:
59-
// 1buz - 1ali : time: 8.3s eqr 68 rmsd 3.1 score 161 | time 6.4 eqr 58 rmsd 3.0 scre 168 | rigid: identical, flexible: not significant alignment,
60-
// 5pti - 1tap : time: 6.2s eqr 48 rmsd 2.67 score 164 | time 5.2 eqr 49 rmsd 2.9 score 151 | rigid:
59+
// 1buz - 1ali : time: 8.3s eqr 68 rmsd 3.1 score 161 | time 6.4 eqr 58 rmsd 3.0 scre 168 | rigid: identical, flexible: not significant alignment,
60+
// 5pti - 1tap : time: 6.2s eqr 48 rmsd 2.67 score 164 | time 5.2 eqr 49 rmsd 2.9 score 151 | rigid:
6161
// 1cdg - 8tim
6262
// 1jbe - 1ord : identical with fatcat
6363
// 1nbw.A - 1kid : rigid: identical, flexible: not identical, alignment not significant.
@@ -72,7 +72,7 @@ public static String compareAlignment(String pdb1, String chain1, String pdb2, S
7272
//structure1 = pdbpars.getStructureById("1cdg");
7373
Chain c1 = structure1.getChainByPDB(chain1);
7474

75-
//structure2 = pdbpars.getStructureById("2aaa");
75+
//structure2 = pdbpars.getStructureById("2aaa");
7676
Chain c2 = structure2.getChainByPDB(chain2);
7777

7878
Structure s3 = new StructureImpl();
@@ -97,8 +97,8 @@ public static String compareAlignment(String pdb1, String chain1, String pdb2, S
9797
FatCatParameters fparams = new FatCatParameters();
9898

9999
if ( doRigid)
100-
fatCat = new FatCatRigid();
101-
else
100+
fatCat = new FatCatRigid();
101+
else
102102
fatCat = new FatCatFlexible();
103103

104104
afpChain = fatCat.align(ca1, ca2, fparams);
@@ -125,7 +125,7 @@ public static String compareAlignment(String pdb1, String chain1, String pdb2, S
125125
System.out.println(result);
126126
System.out.println("***");
127127
System.out.println(resultSerialized);
128-
throw new StructureException("the JFatCat alignment image does not look identical after XML serialization.");
128+
throw new StructureException("the JFatCat alignment image does not look identical after XML serialization.");
129129
}
130130

131131
if ( ! afpChain.toString().equals(newChain.toString())){

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/io/Test3th3.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,44 +42,44 @@
4242
*/
4343
public class Test3th3 {
4444

45-
@Test
45+
@Test
4646
public void test3th3() throws StructureException, IOException {
4747
AtomCache cache = new AtomCache();
48-
48+
4949
FileParsingParameters params = cache.getFileParsingParams();
5050
params.setUseInternalChainId(false);
5151
params.setCreateAtomBonds(true);
5252
StructureIO.setAtomCache(cache);
53-
53+
5454
Structure s = StructureIO.getStructure("3th3");
55-
55+
5656
// there's 2 residues with residue number 201 in chain T: LYS and a sugar BGC
57-
// that's more like bad annotation in the file but it's good if we can parse
57+
// that's more like bad annotation in the file but it's good if we can parse
5858
// the file without crashing and produce a good warning
59-
60-
// below we make sure that we parse both residues but that we can only lookup the
59+
60+
// below we make sure that we parse both residues but that we can only lookup the
6161
// aminoacid residue (see ChainImpl.addChain)
62-
62+
6363
Chain c = s.getChainByPDB("T");
64-
64+
6565
ResidueNumber rn = ResidueNumber.fromString("201");
6666
rn.setChainId("T");
67-
67+
6868
Group g = c.getGroupByPDB(rn);
69-
69+
7070
// we get the aminoacid residue and not the BGC sugar residue
7171
assertEquals("LYS", g.getPDBName());
72-
73-
72+
73+
7474
// let's see if we have both the residues with that number:
7575
int count = 0;
76-
76+
7777
for (Group gr : c.getAtomGroups()) {
7878
if (gr.getResidueNumber().equals(rn)) count++;
7979
}
80-
80+
8181
assertEquals(2, count);
8282
}
8383

84-
84+
8585
}

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/io/Test4v5a.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
/**
3636
* Test for a difficult large mmCIF file (a ribosome) with many 2-letter chain ids.
3737
* Both tests are set to Ignore because the parsing of the file takes too long.
38-
*
38+
*
3939
* @author Jose Duarte
4040
*
4141
*/
@@ -44,36 +44,36 @@ public class Test4v5a {
4444
@Test @Ignore
4545
public void test4v5a() throws StructureException, IOException {
4646
AtomCache cache = new AtomCache();
47-
47+
4848
FileParsingParameters params = cache.getFileParsingParams();
4949
params.setUseInternalChainId(false);
5050
params.setCreateAtomBonds(true);
5151
StructureIO.setAtomCache(cache);
52-
52+
5353
StructureIO.getStructure("4v5a");
54-
55-
54+
55+
5656
}
5757

5858
@Test @Ignore
5959
public void test4v5aInternalChainIds() throws StructureException, IOException {
6060
AtomCache cache = new AtomCache();
61-
61+
6262
FileParsingParameters params = cache.getFileParsingParams();
6363
params.setUseInternalChainId(true);
6464
params.setCreateAtomBonds(true);
6565
StructureIO.setAtomCache(cache);
66-
67-
68-
// this would throw an exception when making ss bonds from struct_conn because
69-
// chain id "AD" is both an author chain id and an asym chain id and the chains were
66+
67+
68+
// this would throw an exception when making ss bonds from struct_conn because
69+
// chain id "AD" is both an author chain id and an asym chain id and the chains were
7070
// getting mixed
7171
StructureIO.getStructure("4v5a");
72-
72+
7373
//for (Chain c : s.getChains()) {
7474
// System.out.println(c.getChainID()+" "+c.getInternalChainID()+" "+c.getAtomLength());
7575
//}
7676

77-
77+
7878
}
7979
}

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/io/TestLongPdbVsMmCifParsing.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,11 @@ private void testSingleChain(Chain cPdb, Chain cCif) {
429429

430430

431431
assertEquals("failed for getAtomLength (chain "+chainId+"):",cPdb.getAtomLength(),cCif.getAtomLength());
432-
432+
433433
// entries with polymers composed of all unknowns (giving only-X sequences) can't be aligned seqres-to-atom (for PDB files)
434434
// we've got to skip them because they won't have seqres groups
435435
// e.g. is 1jnv chain A
436-
436+
437437
if (cPdb.getAtomSequence().matches("^X+$")) return;
438438

439439
// note for getSeqResLength to work one needs the setAlignSeqRes option in the parsers

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/io/TestSeqResParsing.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* http://www.biojava.org/
1919
*
2020
* created at 20 Mar 2014
21-
* Author: ap3
21+
* Author: ap3
2222
*/
2323

2424
package org.biojava.nbio.structure.test.io;
@@ -75,5 +75,5 @@ public void test11GS() throws IOException, StructureException{
7575
assertEquals(AminoAcid.ATOMRECORD, aathird.getRecordType());
7676

7777
}
78-
78+
7979
}

biojava-modfinder/src/test/java/org/biojava/nbio/protmod/structure/TmpAtomCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* http://www.biojava.org/
1919
*
2020
* Created on May 11, 2010
21-
* Author: Andreas Prlic
21+
* Author: Andreas Prlic
2222
*
2323
*/
2424

biojava-protein-disorder/src/test/java/org/biojava/nbio/ronn/NonstandardProteinCompoundTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
* Asx (B), 5-hydroxytryptamine receptor 1F, UniProt Q9N2D9
4141
* Xaa (X), DNA-3-methyladenine glycosylase (Fragment), UniProt P23571
4242
* Glx (Z), 14-3-3 protein gamma-1, UniProt Q6UFZ3
43-
*
44-
*
43+
*
44+
*
4545
*/
4646
public class NonstandardProteinCompoundTest {
4747

0 commit comments

Comments
 (0)