Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] CodeNose Eclipse plug-in, code smell detection

Hi,

A quick google search didn't show interesting for me except for
someone's master's thesis from 2005.  I'm guessing this plugin is no
longer maintained, but you could try talking to the author of the
thesis to see if he can send you the source code.

On Tue, Dec 13, 2011 at 2:21 AM, Kotrappa Sirbi <kotrappa06@xxxxxxxxx> wrote:
> Hello,
>
> Where we can find " CodeNose Eclipse  plug-in-  code smell detector".
>
> Please help me.
>
> Regards
>
> S Kotrappa
>
> On Tue, Dec 13, 2011 at 2:43 PM, <aspectj-users-request@xxxxxxxxxxx> wrote:
>>
>> Send aspectj-users mailing list submissions to
>>        aspectj-users@xxxxxxxxxxx
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>        https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> or, via email, send a message with subject or body 'help' to
>>        aspectj-users-request@xxxxxxxxxxx
>>
>> You can reach the person managing the list at
>>        aspectj-users-owner@xxxxxxxxxxx
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of aspectj-users digest..."
>>
>>
>> Today's Topics:
>>
>>   1. @Pointcut("@target ...) matching all ... intended (Neale Upstone)
>>   2. Re: question about using ajc with command line (Andy Clement)
>>   3. Re: @Pointcut("@target ...) matching all ...      intended
>>      (Andy Clement)
>>   4. Re: How can I make ITD available in the code of the aspect
>>      subject? (Andy Clement)
>>   5. Code Smells in AOP (Kotrappa Sirbi)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Mon, 12 Dec 2011 17:11:40 +0000
>> From: "Neale Upstone" <neale@xxxxxxxxxxxxxxxx>
>> To: aspectj-users@xxxxxxxxxxx
>> Subject: [aspectj-users] @Pointcut("@target ...) matching all ...
>>        intended
>> Message-ID:
>>        <1323709900.5001.140661010644113@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Hi,
>>
>> Is there a reason why this seems to match all when using Spring proxy
>> based AOP?
>>
>>        @Pointcut("@target(org.springframework.stereotype.Service)")
>>        void service() {}
>>
>> I'd take a guess at it being something to do with the proxy target not
>> being known at the point of creating the proxy, but it's not obvious.
>>
>> Cheers,
>>
>> Neale
>>
>> --
>>  Neale Upstone
>>  neale@xxxxxxxxxxxxxxxx
>>
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Mon, 12 Dec 2011 10:34:31 -0800
>> From: Andy Clement <andrew.clement@xxxxxxxxx>
>> To: aspectj-users@xxxxxxxxxxx
>> Subject: Re: [aspectj-users] question about using ajc with command
>>        line
>> Message-ID:
>>
>>  <CAAu=NOn-eFhX16-FWj2ktV8Z=ZdsO3Dd7_dFguDrWykDWApMyg@xxxxxxxxxxxxxx>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> When you say dep.jar is on the classpath, I presume that is for the
>> compilation and for the execution of the resultant out.jar? (since
>> those types will be needed at runtime).
>>
>> Your command looks OK although I wouldn't normally specify -nosourceroots:
>> ajc -inpath source.jar -1.6 aspect.aj -outjar out.jar
>>
>> Are you weaving an rt.jar??  If you are and are placing it in a
>> special location on the classpath (e.g. boot classpath), you would
>> also need to put dep.jar there so that the classloader can see both
>> the contents of the modified jar and the dependencies.  From what you
>> describe, it does sound a bit like a classloader visibility issue.
>>
>> cheers,
>> Andy
>>
>>
>> On 12 December 2011 03:06, shaoxiaozhe09
>> <shaoxiaozhe09@xxxxxxxxxxxxxxxxxx> wrote:
>> > I want to weave a file aspect.aj to a executable java file like
>> > source.jar,
>> > and the output class files into the jar file out.jar.
>> >
>> > I use the command?following:
>> > ajc -inpath source.jar -1.6 -sourceroots aspect.aj -outjar out.jar
>> >
>> > And the out.jar can be created without any error or warning.?aspect.aj
>> > dependents on dep.jar. And dep.jar has been set in classpath. But when
>> > execute out.jar, NoClassDefFoundError exception will be reported?about
>> > some
>> > class in dep.jar.
>> >
>> > Is the command right? What change should I do?
>> > 2011-12-12
>> > ________________________________
>> > shaoxiaozhe09
>> >
>> > _______________________________________________
>> > aspectj-users mailing list
>> > aspectj-users@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> >
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Mon, 12 Dec 2011 10:36:59 -0800
>> From: Andy Clement <andrew.clement@xxxxxxxxx>
>> To: aspectj-users@xxxxxxxxxxx
>> Subject: Re: [aspectj-users] @Pointcut("@target ...) matching all ...
>>        intended
>> Message-ID:
>>
>>  <CAAu=NOm7p7bXnFRxqNwOg26OLiy6VWw2LTWb8u9_Ad3W_G9O_A@xxxxxxxxxxxxxx>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> That is going to result in a runtime test for the annotation.
>> Answering from an AspectJ point of view, the type involved at runtime
>> may be different to that involved at compile time (a subtype or impl)
>> so we can't statically match @target reliably.  Whether this could be
>> optimized in a Spring AOP scenario, I don't know.  A statically
>> matching pointcut would be:
>>
>> within(@Service *)
>>
>> cheers,
>> Andy
>>
>> On 12 December 2011 09:11, Neale Upstone <neale@xxxxxxxxxxxxxxxx> wrote:
>> > Hi,
>> >
>> > Is there a reason why this seems to match all when using Spring proxy
>> > based AOP?
>> >
>> > ? ? ? ?@Pointcut("@target(org.springframework.stereotype.Service)")
>> > ? ? ? ?void service() {}
>> >
>> > I'd take a guess at it being something to do with the proxy target not
>> > being known at the point of creating the proxy, but it's not obvious.
>> >
>> > Cheers,
>> >
>> > Neale
>> >
>> > --
>> > ?Neale Upstone
>> > ?neale@xxxxxxxxxxxxxxxx
>> >
>> > _______________________________________________
>> > aspectj-users mailing list
>> > aspectj-users@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Mon, 12 Dec 2011 15:10:20 -0800
>> From: Andy Clement <andrew.clement@xxxxxxxxx>
>> To: aspectj-users@xxxxxxxxxxx
>> Subject: Re: [aspectj-users] How can I make ITD available in the code
>>        of the aspect subject?
>> Message-ID:
>>
>>  <CAAu=NO=w_FHw_EeFqyLyFtKOuKGRtUZ5o2H_9YgDC=VwDX_rcg@xxxxxxxxxxxxxx>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> I finally found a minute to look at this.
>>
>> Unfortunately it just works for me.  I distilled it down to these two
>> files:
>>
>> ==== Enroler.java ====
>> import java.util.ArrayList;
>> import java.util.Collection;
>>
>> public class Enroler {
>>        public static Collection<? extends Role> getAllRoles() {
>>                ArrayList<Role> result = new ArrayList<Role>(2);
>>                collectAllRoles(result);
>>                return result;
>>        }
>> }
>> ====
>>
>> ==== EnrolerHelperAspect.aj ====
>> public class Enroler implements org.restlet.security.Enroler {
>>  public final static Role USER = new Role("user", "A limited user.");
>>  public final static Role ADMINISTRATOR = new Role("admin", "The
>> system administrator.");
>>
>>  public static Collection<? extends Role> getAllRoles() {
>>    ArrayList<Role> result = new ArrayList<Role>(2);
>>    collectAllRoles(result);
>>    return result;
>>  }
>>
>> }
>> ====
>>
>> and they compile OK.  Few things you can check:
>> - are you on a recent AJDT? (a dev build? they are at this update
>> site: http://download.eclipse.org/tools/ajdt/37/dev/update )
>> - have you tried doing a project clean, does it make a difference?
>> - have you tried removing the generics from the ITD declaration and
>> making the 'result' just a Collection (this is just to see what
>> happens)
>> - do the gutter annotations appear correct, i.e. an outgoing arrow
>> from the aspect and an incoming arrow into the target?
>>
>> Rather than me try to recreate your scenario, if you can send me a zip
>> file of a broken project, that would mean I am setup exactly the same
>> as you and I can debug a bit further.  (I don't have this type:
>> "org.restlet.security.Enroler" which I suppose *could* make a
>> difference, although it shouldn't)
>>
>> cheers,
>> Andy
>>
>>
>> On 8 December 2011 11:40, Mark <mark.kharitonov@xxxxxxxxx> wrote:
>> > Please, view it on Nabble -
>> >
>> > http://aspectj.2085585.n4.nabble.com/How-can-I-make-ITD-available-in-the-code-of-the-aspect-subject-td4169901.html
>> >
>> > Eclipse archives seems to remove everything between the
>> > &lt;raw&gt;&lt;/raw&gt; tags. I will cease using them to delimit the
>> > code
>> > samples.
>> >
>> > --
>> > View this message in context:
>> > http://aspectj.2085585.n4.nabble.com/How-can-I-make-ITD-available-in-the-code-of-the-aspect-subject-tp4169901p4173983.html
>> > Sent from the AspectJ - users mailing list archive at Nabble.com.
>> > _______________________________________________
>> > aspectj-users mailing list
>> > aspectj-users@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>>
>> ------------------------------
>>
>> Message: 5
>> Date: Tue, 13 Dec 2011 14:43:01 +0530
>> From: Kotrappa Sirbi <kotrappa06@xxxxxxxxx>
>> To: aspectj-users@xxxxxxxxxxx
>> Subject: [aspectj-users] Code Smells in AOP
>> Message-ID:
>>
>>  <CACbPoryykvTcvoPt+S74zt5m1xApiyNQP7tRVHyYK8VMJp=Xyg@xxxxxxxxxxxxxx>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hi !!
>>
>> Greetings, i was trying to findout  code smells detection in AOP AspectJ
>> applications and i found one paper on "Code-Smells in AOP". Author address
>> code smells like., Hashes, Synchronizations, generous decorations and
>> bottlenecks are code smells introduction because of AOP AspectJ.
>> I want to  know  from you and your thought /idea on this code smells
>> particularly AOP AspectJ Design Patterns.
>>
>> Thanking You,
>>
>> Regards
>>
>> S Kotrappa
>>
>> On Sun, Dec 11, 2011 at 10:30 PM, <aspectj-users-request@xxxxxxxxxxx>
>> wrote:
>>
>> > Send aspectj-users mailing list submissions to
>> >        aspectj-users@xxxxxxxxxxx
>> >
>> > To subscribe or unsubscribe via the World Wide Web, visit
>> >        https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> > or, via email, send a message with subject or body 'help' to
>> >        aspectj-users-request@xxxxxxxxxxx
>> >
>> > You can reach the person managing the list at
>> >        aspectj-users-owner@xxxxxxxxxxx
>> >
>> > When replying, please edit your Subject line so it is more specific
>> > than "Re: Contents of aspectj-users digest..."
>> >
>> >
>> > Today's Topics:
>> >
>> >   1. How to deduce the method owning the catch statement referred
>> >      by the handler join point? (Mark)
>> >   2. Why would one ever want to use Load Time Weaving? (Mark)
>> >   3. Re: How to deduce the method owning the catch statement
>> >      referred by the handler join point? (Andy Clement)
>> >   4. Re: How to deduce the method owning the catch statement
>> >      referred by the handler join point? (Mark)
>> >
>> >
>> > ----------------------------------------------------------------------
>> >
>> > Message: 1
>> > Date: Sat, 10 Dec 2011 11:42:39 -0800 (PST)
>> > From: Mark <mark.kharitonov@xxxxxxxxx>
>> > To: aspectj-users@xxxxxxxxxxx
>> > Subject: [aspectj-users] How to deduce the method owning the catch
>> >        statement referred by the handler join point?
>> > Message-ID: <1323546159867-4181004.post@xxxxxxxxxxxxx>
>> > Content-Type: text/plain; charset=us-ascii
>> >
>> > I have the following advice code:
>> > =========================================================
>> >  pointcut caughtException(Exception e) : handler(Exception+) && args(e);
>> >  before (Exception e) : caughtException(e) && loggedScope() &&
>> > loggedMethodScope() {
>> >    logCaughtException(getLogger(thisJoinPointStaticPart), thisJoinPoint,
>> > e);
>> >  }
>> > =========================================================
>> >
>> > My wish is that the logCaughtException method output the name and the
>> > parameters of the method owning the adviced catch statement. However,
>> > thisJoinPoint.getSignature() returns a CatchClauseSignature instance,
>> > from
>> > which it is unclear to me how to extract the signature of the owning
>> > method.
>> >
>> > How can I do it?
>> >
>> > Thanks.
>> >
>> > --
>> > View this message in context:
>> >
>> > http://aspectj.2085585.n4.nabble.com/How-to-deduce-the-method-owning-the-catch-statement-referred-by-the-handler-join-point-tp4181004p4181004.html
>> > Sent from the AspectJ - users mailing list archive at Nabble.com.
>> >
>> >
>> > ------------------------------
>> >
>> > Message: 2
>> > Date: Sat, 10 Dec 2011 14:25:13 -0800 (PST)
>> > From: Mark <mark.kharitonov@xxxxxxxxx>
>> > To: aspectj-users@xxxxxxxxxxx
>> > Subject: [aspectj-users] Why would one ever want to use Load Time
>> >        Weaving?
>> > Message-ID: <1323555913294-4181328.post@xxxxxxxxxxxxx>
>> > Content-Type: text/plain; charset=us-ascii
>> >
>> > The title says it all.
>> > Thanks.
>> >
>> > --
>> > View this message in context:
>> >
>> > http://aspectj.2085585.n4.nabble.com/Why-would-one-ever-want-to-use-Load-Time-Weaving-tp4181328p4181328.html
>> > Sent from the AspectJ - users mailing list archive at Nabble.com.
>> >
>> >
>> > ------------------------------
>> >
>> > Message: 3
>> > Date: Sat, 10 Dec 2011 14:57:55 -0800
>> > From: Andy Clement <andrew.clement@xxxxxxxxx>
>> > To: aspectj-users@xxxxxxxxxxx
>> > Subject: Re: [aspectj-users] How to deduce the method owning the catch
>> >        statement referred by the handler join point?
>> > Message-ID:
>> >
>> >  <CAAu=NOmt-eKPOunLs0q2j7n8zTtH0Dh8vsTgVc6WyC0X8CL1fQ@xxxxxxxxxxxxxx
>> > >
>> > Content-Type: text/plain; charset=ISO-8859-1
>> >
>> > You need to use thisEnclosingJoinPointStaticPart - another 'well
>> > known' name like thisJoinPoint that will give you access to the
>> > joinpoint enclosing your handler join point (i.e. the method
>> > containing the catch block).
>> >
>> > cheers,
>> > Andy
>> >
>> > On 10 December 2011 11:42, Mark <mark.kharitonov@xxxxxxxxx> wrote:
>> > > I have the following advice code:
>> > > =========================================================
>> > > ?pointcut caughtException(Exception e) : handler(Exception+) &&
>> > > args(e);
>> > > ?before (Exception e) : caughtException(e) && loggedScope() &&
>> > > loggedMethodScope() {
>> > > ? ?logCaughtException(getLogger(thisJoinPointStaticPart),
>> > > thisJoinPoint,
>> > > e);
>> > > ?}
>> > > =========================================================
>> > >
>> > > My wish is that the logCaughtException method output the name and the
>> > > parameters of the method owning the adviced catch statement. However,
>> > > thisJoinPoint.getSignature() returns a CatchClauseSignature instance,
>> > from
>> > > which it is unclear to me how to extract the signature of the owning
>> > method.
>> > >
>> > > How can I do it?
>> > >
>> > > Thanks.
>> > >
>> > > --
>> > > View this message in context:
>> >
>> > http://aspectj.2085585.n4.nabble.com/How-to-deduce-the-method-owning-the-catch-statement-referred-by-the-handler-join-point-tp4181004p4181004.html
>> > > Sent from the AspectJ - users mailing list archive at Nabble.com.
>> > > _______________________________________________
>> > > aspectj-users mailing list
>> > > aspectj-users@xxxxxxxxxxx
>> > > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> >
>> >
>> > ------------------------------
>> >
>> > Message: 4
>> > Date: Sun, 11 Dec 2011 01:35:23 -0800 (PST)
>> > From: Mark <mark.kharitonov@xxxxxxxxx>
>> > To: aspectj-users@xxxxxxxxxxx
>> > Subject: Re: [aspectj-users] How to deduce the method owning the catch
>> >        statement referred by the handler join point?
>> > Message-ID: <1323596123014-4182370.post@xxxxxxxxxxxxx>
>> > Content-Type: text/plain; charset=us-ascii
>> >
>> > Which means I cannot get the arguments of the method, since the
>> > enclosing
>> > part is static, can I?
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> > http://aspectj.2085585.n4.nabble.com/How-to-deduce-the-method-owning-the-catch-statement-referred-by-the-handler-join-point-tp4181004p4182370.html
>> > Sent from the AspectJ - users mailing list archive at Nabble.com.
>> >
>> >
>> > ------------------------------
>> >
>> > _______________________________________________
>> > aspectj-users mailing list
>> > aspectj-users@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> >
>> >
>> > End of aspectj-users Digest, Vol 82, Issue 11
>> > *********************************************
>> >
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>> <https://dev.eclipse.org/mailman/private/aspectj-users/attachments/20111213/f8bb1c21/attachment.htm>
>>
>> ------------------------------
>>
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>>
>> End of aspectj-users Digest, Vol 82, Issue 13
>> *********************************************
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top