Résultats CPD
Le document suivant contient les résultats de l'inspection CPD CPD 6.13.0.
Duplicatas
Fichier |
Ligne |
fr/paris/lutece/plugins/releaser/business/SiteDAO.java |
183 |
fr/paris/lutece/plugins/releaser/business/SiteDAO.java |
254 |
DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECTALL, plugin );
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
Site site = new Site( );
int nIndex = 1;
site.setId( daoUtil.getInt( nIndex++ ) );
site.setName( daoUtil.getString( nIndex++ ) );
site.setDescription( daoUtil.getString( nIndex++ ) );
site.setArtifactId( daoUtil.getString( nIndex++ ) );
site.setIdCluster( daoUtil.getInt( nIndex++ ) );
site.setCluster( daoUtil.getString( nIndex++ ) );
site.setScmUrl( daoUtil.getString( nIndex++ ) );
site.setJiraKey( daoUtil.getString( nIndex++ ) );
site.setTheme( daoUtil.getBoolean( nIndex++ ) );
siteList.add( site );
}
daoUtil.free( );
return siteList;
}
/**
* {@inheritDoc }
*/
@Override
public List<Integer> selectIdSitesList( Plugin plugin ) |
Fichier |
Ligne |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
289 |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
359 |
git.push( ).setCredentialsProvider( new UsernamePasswordCredentialsProvider( strLogin, strPassword ) ).call( );
}
catch( InvalidRemoteException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( TransportException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( IOException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( GitAPIException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
finally
{
if ( fLocalRepo != null )
{
fLocalRepo.close( );
}
if ( git != null )
{
git.close( );
}
}
}
/**
* Update master branch.
*
* @param context
* the context
* @param locale
* the locale
*/
@Override
public void updateMasterBranch( WorkflowReleaseContext context, Locale locale ) |
Fichier |
Ligne |
fr/paris/lutece/plugins/releaser/business/SiteDAO.java |
121 |
fr/paris/lutece/plugins/releaser/business/SiteDAO.java |
188 |
fr/paris/lutece/plugins/releaser/business/SiteDAO.java |
259 |
site = new Site( );
int nIndex = 1;
site.setId( daoUtil.getInt( nIndex++ ) );
site.setName( daoUtil.getString( nIndex++ ) );
site.setDescription( daoUtil.getString( nIndex++ ) );
site.setArtifactId( daoUtil.getString( nIndex++ ) );
site.setIdCluster( daoUtil.getInt( nIndex++ ) );
site.setCluster( daoUtil.getString( nIndex++ ) );
site.setScmUrl( daoUtil.getString( nIndex++ ) );
site.setJiraKey( daoUtil.getString( nIndex++ ) );
site.setTheme( daoUtil.getBoolean( nIndex++ ) ); |
Fichier |
Ligne |
fr/paris/lutece/plugins/releaser/service/WorkflowReleaseContextService.java |
369 |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
571 |
commandResult.setProgressValue( commandResult.getProgressValue( ) + 10 );
}
}
catch( InvalidRemoteException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( TransportException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( IOException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( GitAPIException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
finally
{
if ( fLocalRepo != null )
{
fLocalRepo.close( );
}
if ( git != null )
{
git.close( );
}
}
}
} |
Fichier |
Ligne |
fr/paris/lutece/plugins/releaser/service/WorkflowReleaseContextService.java |
371 |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
485 |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
573 |
}
}
catch( InvalidRemoteException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( TransportException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( IOException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( GitAPIException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
finally
{
if ( fLocalRepo != null )
{
fLocalRepo.close( );
}
if ( git != null )
{
git.close( );
}
} |
Fichier |
Ligne |
fr/paris/lutece/plugins/releaser/service/WorkflowReleaseContextService.java |
373 |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
290 |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
361 |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
575 |
}
catch( InvalidRemoteException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( TransportException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( IOException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( GitAPIException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
finally
{
if ( fLocalRepo != null )
{
fLocalRepo.close( );
}
if ( git != null )
{
git.close( );
}
}
} |
Fichier |
Ligne |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
290 |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
361 |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
486 |
}
catch( InvalidRemoteException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( TransportException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( IOException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
catch( GitAPIException e )
{
ReleaserUtils.addTechnicalError( commandResult, e.getMessage( ), e );
}
finally
{
if ( fLocalRepo != null )
{
fLocalRepo.close( );
}
if ( git != null )
{
git.close( );
}
} |
Fichier |
Ligne |
fr/paris/lutece/plugins/releaser/business/WorkflowContextHistoryDAO.java |
194 |
fr/paris/lutece/plugins/releaser/business/WorkflowContextHistoryDAO.java |
227 |
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
WorkflowContextHistory workflowContext = new WorkflowContextHistory( );
int nIndex = 1;
workflowContext.setId( daoUtil.getInt( nIndex++ ) );
workflowContext.setDateBegin( daoUtil.getTimestamp( nIndex++ ) );
workflowContext.setDateEnd( daoUtil.getTimestamp( nIndex++ ) );
workflowContext.setArtifactId( daoUtil.getString( nIndex++ ) );
workflowContext.setData( daoUtil.getString( nIndex++ ) );
workflowContext.setUser( daoUtil.getString( nIndex ) );
workflowContextList.add( workflowContext );
}
daoUtil.free( );
return workflowContextList;
}
} |
Fichier |
Ligne |
fr/paris/lutece/plugins/releaser/business/SiteDAO.java |
92 |
fr/paris/lutece/plugins/releaser/business/SiteDAO.java |
158 |
site.setId( newPrimaryKey( plugin ) );
int nIndex = 1;
daoUtil.setInt( nIndex++, site.getId( ) );
daoUtil.setString( nIndex++, site.getArtifactId( ) );
daoUtil.setInt( nIndex++, site.getIdCluster( ) );
daoUtil.setString( nIndex++, site.getScmUrl( ) );
daoUtil.setString( nIndex++, site.getName( ) );
daoUtil.setString( nIndex++, site.getDescription( ) );
daoUtil.setString( nIndex++, site.getJiraKey( ) );
daoUtil.setBoolean( nIndex++, site.isTheme( ) );
daoUtil.executeUpdate( ); |
Fichier |
Ligne |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
269 |
fr/paris/lutece/plugins/releaser/service/github/GitResourceService.java |
340 |
public void updateBranch( WorkflowReleaseContext context, String strBranch, Locale locale, String strMessage )
{
String strLogin = context.getReleaserUser( ).getCredential( context.getReleaserResource( ).getRepoType( ) ).getLogin( );
String strPassword = context.getReleaserUser( ).getCredential( context.getReleaserResource( ).getRepoType( ) ).getPassword( );
FileRepository fLocalRepo = null;
Git git = null;
CommandResult commandResult = context.getCommandResult( );
String strLocalComponentPath = ReleaserUtils.getLocalPath( context );
try
{
fLocalRepo = new FileRepository( strLocalComponentPath + "/.git" );
git = new Git( fLocalRepo );
git.checkout( ).setName( strBranch ).call( ); |