Seems like PMD bug
496357
@SuppressWarnings("PMD.UnusedPrivateMethod")
    private static void log(final int level,
                            @NonNull final String messageFormat,
                            @Nullable final Object... args) {
        if (shouldLog(level)) {
            Log.println(level, TAG, String.format(messageFormat, args));
        }
    }
774103
public void poll_command(final DeviceProxy deviceProxy, final String cmdname, final int period)
		    throws DevFailed {
		poll_object(deviceProxy, cmdname, "command", period);
    }
146430
@Override
    public void sawOpcode(int seen) {
        int pc = 0;
        try {
            stack.precomputation(this);

            switch (state) {
                case SAW_NOTHING:
                    pc = sawOpcodeAfterNothing(seen);
                break;

                case SAW_CTOR:
                    if ((seen == Const.POP) || (seen == Const.RETURN)) {
                        bugReporter.reportBug(new BugInstance(this, BugType.SEC_SIDE_EFFECT_CONSTRUCTOR.name(), NORMAL_PRIORITY).addClass(this).addMethod(this)
                                .addSourceLine(this));
                    }
                    state = State.SAW_NOTHING;
                break;
            }
        } finally {
            TernaryPatcher.pre(stack, seen);
            stack.sawOpcode(this, seen);
            TernaryPatcher.post(stack, seen);
            if ((pc != 0) && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                item.setUserValue(Integer.valueOf(pc));
            }
        }
    }
92290
@SuppressWarnings("unused")
	@Scheduled(fixedDelay = DateUtils.MILLIS_PER_MINUTE)
	public void syncSubscriptions() {
		if (!mySyncSubscriptionsSemaphore.tryAcquire()) {
			return;
		}
		try {
			doSyncSubscriptionsWithRetry();
		} finally {
			mySyncSubscriptionsSemaphore.release();
		}
	}
222037
void one_more_trigg() throws DevFailed {
	Util.out5.println("Polling thread has received a trigger");

	WorkItem item = null;
	for (int i = 0; i < ext_trig_works.size(); i++) {
	    final WorkItem w = (WorkItem) ext_trig_works.elementAt(i);
	    if (w.dev == local_cmd.dev && w.type == local_cmd.type && w.name.equals(local_cmd.name)) {
		item = w;
	    }
	}

	// Check that the object to poll has been installed.
	// If not, simply returns. This case should never happens because it is
	// tested in the Util::trigger_polling() method before the trigger is
	// effectively sent to this thread.
	if (item == null) {
	    Util.out5.println("Object externally triggered not found !!!");
	    {
		shared_cmd.trigger = false;
		p_mon.signal();
	    }
	    return;
	}

	// Inform requesting thread that the work is done
	{
	    shared_cmd.trigger = false;
	    p_mon.signal();
	}

	// Do the job
	final WorkItem tmp = item;
	if (polling_stop == false) {
	    if (tmp.type == Tango_POLL_CMD) {
		poll_cmd(tmp);
	    } else {
		poll_attr(tmp);
	    }
	}
    }
814973
def pmt_with_id(self, pmt_id):
        """"""
        try:
            return self.pmts[self._pmt_index_by_pmt_id[pmt_id]]
        except KeyError:
            raise KeyError("No PMT found for ID: {0}".format(pmt_id))
345269
public boolean checkForProblems(Set<CmsUUID> resourceIds) {

        List<CmsPublishResource> pubResources = new ArrayList<CmsPublishResource>();
        Set<CmsUUID> publishIds = getResourcesToPublish();
        for (CmsUUID publishId : publishIds) {
            pubResources.add(m_model.getPublishResources().get(publishId));
        }
        for (CmsPublishResource pubResource : pubResources) {
            String parentPath = CmsResource.getParentFolder(pubResource.getName());
            CmsPublishResource parent = m_model.getPublishResourcesByPath().get(parentPath);
            if (parent != null) {
                boolean parentIsNew = parent.getResourceState().isNew();
                boolean parentIsDeleted = parent.getResourceState().isDeleted();
                if (parentIsNew || parentIsDeleted) {
                    if (!resourceIds.contains(parent.getId())) {
                        String title = Messages.get().key(Messages.ERR_CANT_PUBLISH_RESOURCE_TITLE_0);
                        String message = null;
                        if (parentIsNew) {
                            message = Messages.get().key(
                                Messages.ERR_PUBLISH_CANT_PUBLISH_NEW_RESOURCE_2,
                                pubResource.getName(),
                                parent.getName());
                        }
                        if (parentIsDeleted) {
                            message = Messages.get().key(
                                Messages.ERR_PUBLISH_CANT_PUBLISH_DELETED_RESOURCE_2,
                                pubResource.getName(),
                                parent.getName());
                        }
                        CmsAlertDialog alert = new CmsAlertDialog(title, message);
                        alert.center();
                        return true;
                    }
                }
            }
        }
        return false;
    }
528456
public function checkUpdate()
    {
        $url = 'https://repo.packagist.org/p/ironphp/ironphp.json';
        $packagistJson = @file_get_contents($url);
        if($packagistJson === true) {
            $packagistArray = json_decode($packagistJson,true);
            $packagistData = $packagistArray['packages']['ironphp/ironphp']['dev-master'];
            $time = $packagistData['time'];
            $version = $packagistData['version']; //dev-master
            $branchAlias = $packagistData['extra']['branch-alias']['dev-master']; // 0.0.1-dev
            date_default_timezone_set('Asia/Kolkata');
            $parsedTime = date_parse($time);
            $timeStamp = mktime($parsedTime['hour'], $parsedTime['minute'], $parsedTime['second'], $parsedTime['month'], $parsedTime['day'], $parsedTime['year']);
        }
        $installData = $this->app->getIntallTime();

        if($packagistJson === true) {
            echo Colors::WHITE." ".str_replace('T', ' ', substr(date(DATE_ATOM, $timeStamp), 0, 19));
            echo Colors::GREEN."\nChecking updates... ".Colors::WHITE;
            if($timeStamp > $installData->time) {
                if($branchAlias != $this->app->version()) {
                    print "Package have an update ".$branchAlias;
                }
                else {
                    print "Package have an update ".$version;
                }
            }
            else {
                print "There is no update.";
            }
        }
        else {
            echo Colors::GREEN."\nChecking updates... ".Colors::WHITE." No internet!";
        }
    }
103877
final void cmdRemoveExpiring(final long lockId, final PersistentTransaction transaction) throws ProtocolException, TransactionException, SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "cmdRemoveExpiring", new Object[] { "Item Link:   " + this, "Stream Link: " + _owningStreamLink, formatLockId(lockId),
                                                                     "Transaction: " + transaction });

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.debug(this, tc, "expiring item " + _tuple.getUniqueId());

        synchronized (this)
        {
            if (ItemLinkState.STATE_LOCKED_FOR_EXPIRY == _itemLinkState)
            {
                if (_lockID != lockId)
                {
                    throw new LockIdMismatch(_lockID, lockId);
                }

                ListStatistics stats = getParentStatistics();
                synchronized (stats)
                {
                    stats.decrementExpiring();
                    stats.incrementRemoving();
                }

                _transactionId = transaction.getPersistentTranId();
                _itemLinkState = ItemLinkState.STATE_REMOVING_EXPIRING;
            }
            else
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                    SibTr.event(this, tc, "Invalid Item state: " + _itemLinkState);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(this, tc, "cmdRemoveExpiring");
                throw new StateException(_itemLinkState.toString());
            }
        }
        final Task task = new RemoveLockedTask(this);
        transaction.addWork(task);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "cmdRemoveExpiring");
    }
1289228
void poll_cmd(final WorkItem to_do) throws DevFailed {
	Util.out5.println("poll_cmd  --> Time = " + now.tv_sec + "," + now.tv_usec + " Dev name = "
		+ to_do.dev.get_name() + ", Cmd name = " + to_do.name);

	Any argout;
	final TimeVal before_cmd = new TimeVal();
	final TimeVal after_cmd = new TimeVal();
	TimeVal needed_time;
	try {
	    long ctm = System.currentTimeMillis();
	    before_cmd.tv_sec = (int) (ctm / 1000);
	    before_cmd.tv_usec = (int) (ctm - 1000 * before_cmd.tv_sec) * 1000;
	    before_cmd.tv_sec = before_cmd.tv_sec - Tango_DELTA_T;

	    // Execute the command
	    final Any in_any = fr.esrf.TangoApi.ApiUtil.get_orb().create_any();
	    argout = to_do.dev.command_inout(to_do.name, in_any);

	    ctm = System.currentTimeMillis();
	    after_cmd.tv_sec = (int) (ctm / 1000);
	    after_cmd.tv_usec = (int) (ctm - 1000 * after_cmd.tv_sec) * 1000;
	    after_cmd.tv_sec = after_cmd.tv_sec - Tango_DELTA_T;

	    needed_time = time_diff(before_cmd, after_cmd);

	    to_do.dev.get_dev_monitor().get_monitor();
	    final PollObj poll_obj = to_do.dev.get_polled_obj_by_type_name(to_do.type, to_do.name);
	    poll_obj.insert_data(argout, before_cmd, needed_time);
	    to_do.dev.get_dev_monitor().rel_monitor();
	} catch (final DevFailed e) {
	    final long ctm = System.currentTimeMillis();
	    after_cmd.tv_sec = (int) (ctm / 1000);
	    after_cmd.tv_usec = (int) (ctm - 1000 * after_cmd.tv_sec) * 1000;
	    after_cmd.tv_sec = after_cmd.tv_sec - Tango_DELTA_T;

	    needed_time = time_diff(before_cmd, after_cmd);

	    // to_do.dev.get_dev_monitor().get_monitor();
	    try {
		final PollObj poll_obj = to_do.dev.get_polled_obj_by_type_name(to_do.type,
			to_do.name);
		poll_obj.insert_except(e, before_cmd, needed_time);
	    } catch (final DevFailed ex) {
	    }
	    to_do.dev.get_dev_monitor().rel_monitor();
	}
    }
250597
@Override
    protected void onPersist(EntityMetadata entityMetadata, Object entity, Object id, List<RelationHolder> rlHolders)
    {
        MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                entityMetadata.getPersistenceUnit());

        AbstractManagedType managedType = (AbstractManagedType) metaModel.entity(entityMetadata.getEntityClazz());

        if (managedType.hasLobAttribute())
        {
            onPersistGFS(entity, id, entityMetadata, isUpdate);
        }

        else
        {
            Map<String, List<DBObject>> collections = new HashMap<String, List<DBObject>>();
            collections = onPersist(collections, entity, id, entityMetadata, rlHolders, isUpdate);
            onFlushCollection(collections);
        }
    }
199637
def exclude(self, d, item):
        
        try:
            md = d.__metadata__
            pmd = getattr(md, '__print__', None)
            if pmd is None:
                return False
            excludes = getattr(pmd, 'excludes', [])
            return ( item[0] in excludes ) 
        except:
            pass
        return False
357896
private static void checkPolymerIDSConnection(ConnectionNotation not, List<String> listPolymerIDs)
			throws PolymerIDsException {
		/* the polymer ids have to be there */
		checkExistenceOfPolymerID(not.getSourceId().getId(), listPolymerIDs);
		checkExistenceOfPolymerID(not.getTargetId().getId(), listPolymerIDs);
	}
849493
synchronized String[] dev_poll_status(final String dev_name) throws DevFailed {
        Util.out4.println("In dev_poll_status command");

        // Find the device
        final DeviceImpl dev = Util.instance().get_device_by_name(dev_name);

        final Vector poll_list = dev.get_poll_obj_list();
        final int nb_poll_obj = poll_list.size();

        // Return an empty sequence if nothing is polled for this device
        if (nb_poll_obj == 0) {
            return new String[0];
        }

        // Compute how many cmds and/or attributes are polled
        int nb_cmd = 0;
        for (int i = 0; i < nb_poll_obj; i++) {
            final PollObj poll_obj = (PollObj) poll_list.elementAt(i);
            if (poll_obj.get_type() == Tango_POLL_CMD) {
                nb_cmd++;
            }
        }

        // Allocate memory for returned strings
        final String[] ret = new String[nb_poll_obj];

        // Populate returned strings
        int cmd_ind = 0;
        int attr_ind = nb_cmd;
        String returned_info;

        for (int i = 0; i < nb_poll_obj; i++) {
            final PollObj poll_obj = (PollObj) poll_list.elementAt(i);
            // First, the name
            final int type = poll_obj.get_type();
            if (type == Tango_POLL_CMD) {
                returned_info = "Polled command name = ";
            } else {
                returned_info = "Polled attribute name = ";
            }
            returned_info += poll_obj.get_name();

            // Add update period
            returned_info += "\nPolling period (mS) = ";
            final int tmp = poll_obj.get_upd();
            returned_info = returned_info + tmp;

            // Add ring buffer depth
            returned_info += "\nPolling ring buffer depth = ";
            final int depth = dev.get_poll_ring_depth();
            if (depth == 0) {
                returned_info += Tango_DefaultPollRingDepth;
            } else {
                returned_info += depth;
            }

            // Add a message if the data ring is empty
            if (poll_obj.is_ring_empty() == true) {
                returned_info += "\nNo data recorded yet";
            } else {
                // Add needed time to execute last command
                returned_info += "\nTime needed for the last ";
                if (type == Tango_POLL_CMD) {
                    returned_info += "command execution (mS) = ";
                } else {
                    returned_info += "attribute reading (mS) = ";
                }
                returned_info += poll_obj.get_needed_time_i();

                // Add not updated since... info
                returned_info += "\nData not updated since ";
                final double since = poll_obj.get_last_insert_date_i();

                final long ctm = System.currentTimeMillis();
                final int tv_sec = (int) (ctm / 1000);
                final int tv_usec = (int) (ctm - 1000 * tv_sec) * 1000;

                final double now_d = tv_sec + (double) tv_usec / 1000000;
                final double diff_t = now_d - since;
                if (diff_t < 1.0) {
                    final int nb_msec = (int) (diff_t * 1000);
                    returned_info = returned_info + nb_msec + " mS";
                } else if (diff_t < 60.0) {
                    final int nb_sec = (int) diff_t;
                    final int nb_msec = (int) ((diff_t - nb_sec) * 1000);
                    returned_info = returned_info + nb_sec + " S and ";
                    returned_info = returned_info + nb_msec + " mS";
                } else {
                    final int nb_min = (int) (diff_t / 60);
                    final int nb_sec = (int) (diff_t - 60 * nb_min);
                    final int nb_msec = (int) ((diff_t - (int) diff_t) * 1000);

                    returned_info = returned_info + nb_min + " MN";

                    if (nb_sec != 0) {
                        returned_info = returned_info + " ," + nb_sec + " S";
                    }

                    if (nb_msec != 0) {
                        returned_info = returned_info + " and " + nb_msec + " mS";
                    }
                }

                // Add delta_t between last record(s)
                try {
                    returned_info += "\nDelta between last records (in mS) = ";
                    final double[] delta = poll_obj.get_delta_t_i(4);
                    for (int j = 0; j < delta.length; j++) {
                        final int nb_msec = (int) (delta[j] * 1000);
                        returned_info = returned_info + nb_msec;
                        if (j != delta.length - 1) {
                            returned_info = returned_info + ", ";
                        }
                    }
                } catch (final DevFailed e) {
                }

                // Add last polling exception fields (if any)
                if (poll_obj.is_last_an_error_i() == true) {
                    if (type == Tango_POLL_CMD) {
                        returned_info += "\nLast command execution FAILED :";
                    } else {
                        returned_info += "\nLast attribute read FAILED :";
                    }
                    final DevFailed ex = poll_obj.get_last_except_i();
                    returned_info += "\n\tReason = " + ex.errors[0].reason;
                    returned_info += "\n\tDesc = " + ex.errors[0].desc;
                    returned_info += "\n\tOrigin = " + ex.errors[0].origin;
                }
            }

            // Init. string in sequence
            if (type == Tango_POLL_CMD) {
                ret[cmd_ind] = returned_info;
                cmd_ind++;
            } else {
                ret[attr_ind] = returned_info;
                attr_ind++;
            }
        }
        return ret;
    }
843693
public static void assertNotEmpty(final String pstring, final String pmessage) {
    if (pstring == null || pstring.length() == 0) {
      throw new IllegalArgumentException(pmessage);
    }
  }
241259
public final void dppd(XMMRegister dst, XMMRegister src, Immediate imm8)
  {
    emitX86(INST_DPPD, dst, src, imm8);
  }
815274
public final void mPRED() throws RecognitionException {
        try {
            int _type = PRED;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:124:5: ( ( 'P' | 'p' ) ( 'R' | 'r' ) ( 'E' | 'e' ) ( 'D' | 'd' ) )
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:124:7: ( 'P' | 'p' ) ( 'R' | 'r' ) ( 'E' | 'e' ) ( 'D' | 'd' )
            {
            if ( input.LA(1)=='P'||input.LA(1)=='p' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='R'||input.LA(1)=='r' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='E'||input.LA(1)=='e' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='D'||input.LA(1)=='d' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }